org.apache.torque.engine.database.model
Interface NameGenerator

All Known Implementing Classes:
ConstraintNameGenerator, JavaNameGenerator

public interface NameGenerator

The generic interface to a name generation algorithm.

Version:
$Id: NameGenerator.java,v 1.1.2.2 2004/05/20 04:34:15 seade Exp $
Author:
Byron Foster

Field Summary
static java.lang.String CONV_METHOD_JAVANAME
          Similar to CONV_METHOD_UNDERSCORE except nothing is converted to lowercase.
static java.lang.String CONV_METHOD_NOCHANGE
          Specifies no modification when converting from a schema column or table name to a java name.
static java.lang.String CONV_METHOD_UNDERSCORE
          Traditional method for converting schema table and column names to java names.
static char STD_SEPARATOR_CHAR
          The character used by most implementations as the separator between name elements.
 
Method Summary
 java.lang.String generateName(java.util.List inputs)
          Given a list of String objects, implements an algorithm which produces a name.
 

Field Detail

STD_SEPARATOR_CHAR

public static final char STD_SEPARATOR_CHAR
The character used by most implementations as the separator between name elements.

See Also:
Constant Field Values

CONV_METHOD_UNDERSCORE

public static final java.lang.String CONV_METHOD_UNDERSCORE
Traditional method for converting schema table and column names to java names. The CONV_METHOD_XXX constants define how names for columns and tables in the database schema will be converted to java source names.

See Also:
JavaNameGenerator.underscoreMethod(String), Constant Field Values

CONV_METHOD_JAVANAME

public static final java.lang.String CONV_METHOD_JAVANAME
Similar to CONV_METHOD_UNDERSCORE except nothing is converted to lowercase.

See Also:
JavaNameGenerator.javanameMethod(String), Constant Field Values

CONV_METHOD_NOCHANGE

public static final java.lang.String CONV_METHOD_NOCHANGE
Specifies no modification when converting from a schema column or table name to a java name.

See Also:
Constant Field Values
Method Detail

generateName

public java.lang.String generateName(java.util.List inputs)
                              throws EngineException
Given a list of String objects, implements an algorithm which produces a name.

Parameters:
inputs - Inputs used to generate a name.
Returns:
The generated name.
Throws:
EngineException - if the name could not be generated


Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.