Package jodd.db.oom.meta

Examples of jodd.db.oom.meta.DbTable


   * type is not annotated, table name will be set to wildcard pattern '*'
   * (to match all tables).
   */
  public static String resolveTableName(Class<?> type, TableNamingStrategy tableNamingStrategy) {
    String tableName = null;
    DbTable dbTable = type.getAnnotation(DbTable.class);
    if (dbTable != null) {
      tableName = dbTable.value().trim();
    }
    if ((tableName == null) || (tableName.length() == 0)) {
      tableName = tableNamingStrategy.convertEntityNameToTableName(type);
    } else {
      if (!tableNamingStrategy.isStrictAnnotationNames()) {
View Full Code Here


  /**
   * Resolves schema name from a type. Uses default schema name if not specified.
   */
  public static String resolveSchemaName(Class<?> type, String defaultSchemaName) {
    String schemaName = null;
    DbTable dbTable = type.getAnnotation(DbTable.class);
    if (dbTable != null) {
      schemaName = dbTable.schema().trim();
    }
    if ((schemaName == null) || (schemaName.length() == 0)) {
      schemaName = defaultSchemaName;
    }
    return schemaName;
View Full Code Here

  /**
   * Returns <code>true</code> if class is annotated with <code>DbTable</code> annotation.
   */
  public static boolean resolveIsAnnotated(Class<?> type) {
    DbTable dbTable = type.getAnnotation(DbTable.class);
    return dbTable != null;
  }
View Full Code Here

    try {
      beanClass = loadClass(entryName);
    } catch (ClassNotFoundException cnfex) {
      throw new DbOomException("Entry class not found: " + entryName, cnfex);
    }
    DbTable dbTable = beanClass.getAnnotation(DbTable.class);
    if (dbTable == null) {
      return;
    }
    if (registerAsEntities == true) {
      dbOomManager.registerEntity(beanClass);
View Full Code Here

    if (beanClass == null) {
      return;
    }

    DbTable dbTable = beanClass.getAnnotation(DbTable.class);
    if (dbTable == null) {
      return;
    }
    if (registerAsEntities == true) {
      dbOomManager.registerEntity(beanClass);
View Full Code Here

   * type is not annotated, table name will be set to wildcard pattern '*'
   * (to match all tables).
   */
  public static String resolveTableName(Class<?> type, TableNamingStrategy tableNamingStrategy) {
    String tableName = null;
    DbTable dbTable = type.getAnnotation(DbTable.class);
    if (dbTable != null) {
      tableName = dbTable.value().trim();
    }
    if ((tableName == null) || (tableName.length() == 0)) {
      tableName = tableNamingStrategy.convertEntityNameToTableName(type);
    } else {
      if (!tableNamingStrategy.isStrictAnnotationNames()) {
View Full Code Here

  /**
   * Resolves schema name from a type. Uses default schema name if not specified.
   */
  public static String resolveSchemaName(Class<?> type, String defaultSchemaName) {
    String schemaName = null;
    DbTable dbTable = type.getAnnotation(DbTable.class);
    if (dbTable != null) {
      schemaName = dbTable.schema().trim();
    }
    if ((schemaName == null) || (schemaName.length() == 0)) {
      schemaName = defaultSchemaName;
    }
    return schemaName;
View Full Code Here

  /**
   * Returns <code>true</code> if class is annotated with <code>DbTable</code> annotation.
   */
  public static boolean resolveIsAnnotated(Class<?> type) {
    DbTable dbTable = type.getAnnotation(DbTable.class);
    return dbTable != null;
  }
View Full Code Here

TOP

Related Classes of jodd.db.oom.meta.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.