net.java.ao.schema
Class TableAnnotationTableNameConverter
java.lang.Object
net.java.ao.schema.TableAnnotationTableNameConverter
- All Implemented Interfaces:
- TableNameConverter
public final class TableAnnotationTableNameConverter
- extends Object
- implements TableNameConverter
Gets the table name from the Table annotation. If no annotation is
present on the given entity then it will delegate to the configured TableNameConverter.
- Since:
- 0.9
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TABLE_ANNOTATION
public static final Class<Table> TABLE_ANNOTATION
TableAnnotationTableNameConverter
public TableAnnotationTableNameConverter(TableNameConverter delegateTableNameConverter)
TableAnnotationTableNameConverter
public TableAnnotationTableNameConverter(TableNameConverter delegateTableNameConverter,
CanonicalClassNameTableNameConverter postProcessingTableNameConverter)
getName
public String getName(Class<? extends RawEntity<?>> entityClass)
- Gets the name of the table either from the
Table annotation if present or from the
delegate.
- Specified by:
getName in interface TableNameConverter
- Parameters:
entityClass - the entity from which to extract the table name
- Returns:
- the table name for the given entity
- Throws:
IllegalStateException - if the Table annotation value is invalid (null or
empty String)
Copyright © 2007-2011. All Rights Reserved.