net.java.ao.schema
Class PluralizedTableNameConverter

java.lang.Object
  extended by net.java.ao.schema.CanonicalClassNameTableNameConverter
      extended by 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.


Constructor Summary
PluralizedTableNameConverter()
           
PluralizedTableNameConverter(CanonicalClassNameTableNameConverter delegateTableNameConverter)
           
 
Method Summary
 TableNameConverter getDelegate()
           
protected  String getName(String entityClassCanonicalName)
           
 
Methods inherited from class net.java.ao.schema.CanonicalClassNameTableNameConverter
getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluralizedTableNameConverter

public PluralizedTableNameConverter()

PluralizedTableNameConverter

public PluralizedTableNameConverter(CanonicalClassNameTableNameConverter delegateTableNameConverter)
Method Detail

getDelegate

public TableNameConverter getDelegate()

getName

protected final String getName(String entityClassCanonicalName)
Specified by:
getName in class CanonicalClassNameTableNameConverter


Copyright © 2007-2012. All Rights Reserved.