private void addAuditTable(XClass clazz) {
   AuditTable auditTable = clazz.getAnnotation(AuditTable.class);
   if (auditTable != null) {
     auditData.setAuditTable(auditTable);
   } else {
     auditData.setAuditTable(getDefaultAuditTable());
   }
 }
  public ClassAuditingData getAuditData() {
    if (pc.getClassName() == null) {
      return auditData;
    }

    try {
      XClass xclass = reflectionManager.classForName(pc.getClassName(), this.getClass());

      ModificationStore defaultStore = getDefaultAudited(xclass);
      if (defaultStore != null) {
        auditData.setDefaultAudited(true);
      }

      new AuditedPropertiesReader(
              defaultStore,
              new PersistentClassPropertiesSource(xclass),
              auditData,
              globalCfg,
              reflectionManager,
              "")
          .read();

      addAuditTable(xclass);
      addAuditSecondaryTables(xclass);
    } catch (ClassNotFoundException e) {
      throw new MappingException(e);
    }

    return auditData;
  }
  private void addAuditSecondaryTables(XClass clazz) {
    // Getting information on secondary tables
    SecondaryAuditTable secondaryVersionsTable1 = clazz.getAnnotation(SecondaryAuditTable.class);
    if (secondaryVersionsTable1 != null) {
      auditData
          .getSecondaryTableDictionary()
          .put(
              secondaryVersionsTable1.secondaryTableName(),
              secondaryVersionsTable1.secondaryAuditTableName());
    }

    SecondaryAuditTables secondaryAuditTables = clazz.getAnnotation(SecondaryAuditTables.class);
    if (secondaryAuditTables != null) {
      for (SecondaryAuditTable secondaryAuditTable2 : secondaryAuditTables.value()) {
        auditData
            .getSecondaryTableDictionary()
            .put(
                secondaryAuditTable2.secondaryTableName(),
                secondaryAuditTable2.secondaryAuditTableName());
      }
    }
  }