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.
Constructor and Description |
---|
PluralizedTableNameConverter() |
PluralizedTableNameConverter(CanonicalClassNameTableNameConverter delegateTableNameConverter) |
Modifier and Type | Method and Description |
---|---|
TableNameConverter |
getDelegate() |
protected String |
getName(String entityClassCanonicalName) |
getName
public PluralizedTableNameConverter()
public PluralizedTableNameConverter(CanonicalClassNameTableNameConverter delegateTableNameConverter)
public TableNameConverter getDelegate()
protected final String getName(String entityClassCanonicalName)
getName
in class CanonicalClassNameTableNameConverter
Copyright © 2007–2022 Atlassian. All rights reserved.