Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.java.ao.schema
Interface TableNameConverter

All Known Implementing Classes:
  AbstractTableNameConverter, CamelCaseTableNameConverter, PluralizedNameConverter, UnderscoreTableNameConverter

    public interface TableNameConverter

Superinterface to all table name converters; designed to impose conventions upon the auto-conversion of class names to database tables. The idea behind this is to allow user-specified table name conventions and standards rather than always enforcing ActiveObjects's idea of "good naming".

Every `EntityManager` contains a single table name converter which the entire library uses when performing operations. Any third-party code which interacts with tables directly should make use of this faculty. By using the table name converter even in ORM-external operations, the developers can control table names in a single location and ensure that the conventions need only be maintained in one spot.

Most new implementations of table name converters should extend `AbstractTableNameConverter` rather than implementing this interface directly. This allows third-party converters to take advantage of boiler-plate conversion code which would otherwise have to be duplicated in every converter.

Author:
  Daniel Spiewak

Method Summary
`String` | `getName(Class<? extends RawEntity<?>> clazz)` Generates a table name to correspond with the specified class.

Method Detail

### getName

    String getName(Class<? extends RawEntity<?>> clazz)

  Generates a table name to correspond with the specified class. The algorithm used must check for the existance of the `Table` annotation and use the appropriate override when necessary. If this check is not made, ActiveObjects will continue to function normally, but any code assuming the proper imlementation of `@Table` will likely fail.

  Parameters:
    `clazz` - The entity type for which a corresponding field name must be generated.
  Returns:
    A database table name which corresponds to the given entity type.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007-2011. All Rights Reserved.