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 2007-10-21 07:57:27 abyrne Exp $
Author:
Byron Foster

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

Field Detail

STD_SEPARATOR_CHAR

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

See Also:
Constant Field Values

SCHEMA_SEPARATOR_CHAR

static final char SCHEMA_SEPARATOR_CHAR
The character which separates the schema name from the table name

See Also:
Constant Field Values

CONV_METHOD_UNDERSCORE

static final 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_UNDERSCORE_OMIT_SCHEMA

static final String CONV_METHOD_UNDERSCORE_OMIT_SCHEMA
Similar to CONV_METHOD_UNDERSCORE except a possible schema name (preceding a dot (.) )is omitted

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

CONV_METHOD_JAVANAME

static final 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

static final 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

String generateName(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 © 2004-2012 The Kuali Foundation. All Rights Reserved.