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 473814 2006-11-11 22:30:30Z tv $
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 java.lang.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
 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

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

static final java.lang.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 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

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

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-2012 Apache Software Foundation. All Rights Reserved.