Package de.mhus.lib.adb.annotations

Examples of de.mhus.lib.adb.annotations.DbTable


    this.tableName = tableName;
  }

  public void initDatabase(DbConnection con) throws Exception {
   
    DbTable table = clazz.getAnnotation(DbTable.class);
    if (tableName != null) {
      name = tableName;
    } else
    if (table == null || MString.isEmptyTrim(table.tableName())) {
      name = clazz.getSimpleName();
    } else {
      name = table.tableName();
    }
   
    if (table != null &&!MString.isEmptyTrim(table.attributes())) {
      attributes = MConfigFactory.getInstance().toConfig(table.attributes());
    } else {
      attributes = new HashConfig();
    }
   
    tableNameOrg = schema.getTableName(name);
    tableName = manager.getPool().getDialect().normalizeTableName(tableNameOrg);
   
    log().t("new table",name,tableName);
   
    parseFields();
   
    // features
    if (table != null && !MString.isEmptyTrim(table.features())) {
      for (String featureName : MString.split(table.features(),",")) {
        Feature feature = manager.getSchema().createFeature(manager, this, featureName);
        if (feature != null) features.add(feature);
      }
    }
   
View Full Code Here

TOP

Related Classes of de.mhus.lib.adb.annotations.DbTable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.