|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.avaje.ebean.config.AbstractNamingConvention com.avaje.ebean.config.MatchingNamingConvention
public class MatchingNamingConvention
The JPA naming convention where column names match property names and table names match entity names.
The JPA specification states that the in the case of no annotations the name of the class will be take as the table name and the name of a property will be taken as the name of the column.
Field Summary |
---|
Fields inherited from class com.avaje.ebean.config.AbstractNamingConvention |
---|
DEFAULT_SEQ_FORMAT |
Constructor Summary | |
---|---|
MatchingNamingConvention()
Create with a sequence format of "{table}_seq". |
|
MatchingNamingConvention(String sequenceFormat)
Instantiates with a specific format for DB sequences. |
Method Summary | |
---|---|
String |
getColumnFromProperty(Class<?> beanClass,
String propertyName)
Return the column name given the property name. |
String |
getPropertyFromColumn(Class<?> beanClass,
String dbColumnName)
Return the property name from the column name. |
TableName |
getTableNameByConvention(Class<?> beanClass)
Return the tableName using the naming convention (rather than deployed Table annotation). |
Methods inherited from class com.avaje.ebean.config.AbstractNamingConvention |
---|
getCatalog, getM2MJoinTableName, getSchema, getSequenceFormat, getSequenceName, getTableName, isUseForeignKeyPrefix, setCatalog, setDatabasePlatform, setSchema, setSequenceFormat, setUseForeignKeyPrefix |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MatchingNamingConvention()
public MatchingNamingConvention(String sequenceFormat)
sequenceFormat
- the sequence formatMethod Detail |
---|
public String getColumnFromProperty(Class<?> beanClass, String propertyName)
NamingConvention
public TableName getTableNameByConvention(Class<?> beanClass)
AbstractNamingConvention
public String getPropertyFromColumn(Class<?> beanClass, String dbColumnName)
NamingConvention
This is used to help mapping of raw SQL queries onto bean properties.
beanClass
- the bean classdbColumnName
- the db column name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |