net.java.ao.schema
Class UnderscoreTableNameConverter
java.lang.Object
net.java.ao.schema.CanonicalClassNameTableNameConverter
net.java.ao.schema.UnderscoreTableNameConverter
- All Implemented Interfaces:
- TableNameConverter
public final class UnderscoreTableNameConverter
- extends CanonicalClassNameTableNameConverter
Imposes an underscore word-separation convention on table
names. This will convert entity names in the following way:
Entity Name |
Table Name |
Person |
person |
LicenseRegistration |
license_registration |
Volume4 |
volume_4 |
Company |
company |
This converter allows for both all-lowercase and all-uppercase
table name conventions. For example, depending on the configuration,
LicenseRegistration
may convert to "LICENSE_REGISTRATION".
This converter, coupled with PluralizedTableNameConverter
is
all that is required to emulate the ActiveRecord table name conversion.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnderscoreTableNameConverter
public UnderscoreTableNameConverter(Case tableNameCase)
getName
protected String getName(String entityClassCanonicalName)
- Specified by:
getName
in class CanonicalClassNameTableNameConverter
Copyright © 2007-2011. All Rights Reserved.