net.java.ao.schema
Class PluralizedTableNameConverter
java.lang.Object
net.java.ao.schema.CanonicalClassNameTableNameConverter
net.java.ao.schema.PluralizedTableNameConverter
- All Implemented Interfaces:
- TableNameConverter
public final class PluralizedTableNameConverter
- extends CanonicalClassNameTableNameConverter
A simple table name converter which imposes a set of regular-expression
rules to pluralize names generated by the delegate converter.
Unfortunately, due to complexities innate to the English language,
automatic pluralization is never very accurate. The sheer number of
irregular nouns, coupled with the different conjugations which can
unrecognizably mangle even an "every day" noun makes it extremely difficult
to define generic rules which can control pluralization. ActiveObjects
attempts to uphold the highest standards of quality in its pluralization
engine by imposing rigorous tests using a wide variety of dictionary words.
However, the pluralization should be considered experimental at best.
To enable table name pluralization, simply set the name converter for
the EntityManager
in question to an instance of this class.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PluralizedTableNameConverter
public PluralizedTableNameConverter()
PluralizedTableNameConverter
public PluralizedTableNameConverter(CanonicalClassNameTableNameConverter delegateTableNameConverter)
getDelegate
public TableNameConverter getDelegate()
getName
protected final String getName(String entityClassCanonicalName)
- Specified by:
getName
in class CanonicalClassNameTableNameConverter
Copyright © 2007-2015. All Rights Reserved.