jodd.db.oom
Class DbMetaUtil

java.lang.Object
  extended by jodd.db.oom.DbMetaUtil

public class DbMetaUtil
extends java.lang.Object

Meta-data resolving utils.


Constructor Summary
DbMetaUtil()
           
 
Method Summary
static DbEntityColumnDescriptor resolveColumnDescriptors(DbEntityDescriptor dbEntityDescriptor, java.lang.reflect.Field field, boolean isAnnotated, ColumnNamingStrategy columnNamingStrategy)
          Resolves column descriptor from field.
static boolean resolveIsAnnotated(java.lang.Class<?> type)
          Returns true if class is annotated with DbTable annotation.
static java.lang.String resolveSchemaName(java.lang.Class<?> type, java.lang.String defaultSchemaName)
          Resolves schema name from a type.
static java.lang.String resolveTableName(java.lang.Class<?> type, TableNamingStrategy tableNamingStrategy)
          Resolves table name from a type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbMetaUtil

public DbMetaUtil()
Method Detail

resolveTableName

public static java.lang.String resolveTableName(java.lang.Class<?> type,
                                                TableNamingStrategy tableNamingStrategy)
Resolves table name from a type. If type is annotated, table name will be read from annotation value. If this value is empty or if type is not annotated, table name will be set to wildcard pattern '*' (to match all tables).


resolveSchemaName

public static java.lang.String resolveSchemaName(java.lang.Class<?> type,
                                                 java.lang.String defaultSchemaName)
Resolves schema name from a type. Uses default schema name if not specified.


resolveIsAnnotated

public static boolean resolveIsAnnotated(java.lang.Class<?> type)
Returns true if class is annotated with DbTable annotation.


resolveColumnDescriptors

public static DbEntityColumnDescriptor resolveColumnDescriptors(DbEntityDescriptor dbEntityDescriptor,
                                                                java.lang.reflect.Field field,
                                                                boolean isAnnotated,
                                                                ColumnNamingStrategy columnNamingStrategy)
Resolves column descriptor from field. If field is annotated value will be read from annotation. If field is not annotated, then field will be ignored if entity is annotated. Otherwise, column name is generated from the field name.



Copyright © 2003-2012 Jodd Team