public final class TableAnnotationTableNameConverter extends java.lang.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
.
Modifier and Type | Field and Description |
---|---|
static java.lang.Class<Table> |
TABLE_ANNOTATION |
Constructor and Description |
---|
TableAnnotationTableNameConverter(TableNameConverter delegateTableNameConverter) |
TableAnnotationTableNameConverter(TableNameConverter delegateTableNameConverter,
CanonicalClassNameTableNameConverter postProcessingTableNameConverter) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName(java.lang.Class<? extends RawEntity<?>> entityClass)
Gets the name of the table either from the
Table annotation if present or from the
delegate . |
public static final java.lang.Class<Table> TABLE_ANNOTATION
public TableAnnotationTableNameConverter(TableNameConverter delegateTableNameConverter)
public TableAnnotationTableNameConverter(TableNameConverter delegateTableNameConverter, CanonicalClassNameTableNameConverter postProcessingTableNameConverter)
public java.lang.String getName(java.lang.Class<? extends RawEntity<?>> entityClass)
Table annotation
if present or from the
delegate
.getName
in interface TableNameConverter
entityClass
- the entity from which to extract the table namejava.lang.IllegalStateException
- if the Table annotation
value is invalid (null
or
empty String
)Copyright © 2007-2017. All Rights Reserved.