org.apache.torque.engine.database.model
Class ConstraintNameGenerator

java.lang.Object
  extended byorg.apache.torque.engine.database.model.ConstraintNameGenerator
All Implemented Interfaces:
NameGenerator

public class ConstraintNameGenerator
extends java.lang.Object
implements NameGenerator

A NameGenerator implementation for table-specific constraints. Conforms to the maximum column name length for the type of database in use.

Version:
$Id: ConstraintNameGenerator.java,v 1.4 2002/11/29 13:50:29 mpoeschl Exp $
Author:
Field Summary
private static boolean DEBUG
          Conditional compilation flag.
 
Fields inherited from interface org.apache.torque.engine.database.model.NameGenerator
CONV_METHOD_JAVANAME, CONV_METHOD_NOCHANGE, CONV_METHOD_UNDERSCORE, STD_SEPARATOR_CHAR
 
Constructor Summary
ConstraintNameGenerator()
           
 
Method Summary
 java.lang.String generateName(java.util.List inputs)
          First element of inputs should be of type Database, second should be a table name, third is the type identifier (spared if trimming is necessary due to database type length constraints), and the fourth is a Integer indicating the number of this contraint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG

private static final boolean DEBUG
Conditional compilation flag.

See Also:
Constant Field Values
Constructor Detail

ConstraintNameGenerator

public ConstraintNameGenerator()
Method Detail

generateName

public java.lang.String generateName(java.util.List inputs)
                              throws EngineException
First element of inputs should be of type Database, second should be a table name, third is the type identifier (spared if trimming is necessary due to database type length constraints), and the fourth is a Integer indicating the number of this contraint.

Specified by:
generateName in interface NameGenerator
Parameters:
inputs - Inputs used to generate a name.
Returns:
The generated name.
Throws:
EngineException
See Also:
NameGenerator


Copyright © 1999-2003 Apache Software Foundation. All Rights Reserved.