jodd.db.orm
Enum ColumnAliasType

java.lang.Object
  extended by java.lang.Enum<ColumnAliasType>
      extended by jodd.db.orm.ColumnAliasType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<ColumnAliasType>

public enum ColumnAliasType
extends java.lang.Enum<ColumnAliasType>

Various column alias types. Sometimes, when database JDBC driver does not support table names in ResultSet metadata, it might be useful to include table name or a reference in the column name, separated by some separator.

Using TABLE_NAME type might be dangerous, since most databases (including Oracle) has some maximum length for column names, so adding table name prefix might be too much;)

Column types are usually used internally by SQL generators (see: DbSqlGenerator).


Enum Constant Summary
COLUMN_CODE
           
TABLE_NAME
           
TABLE_REFERENCE
           
 
Method Summary
static ColumnAliasType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static ColumnAliasType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TABLE_NAME

public static final ColumnAliasType TABLE_NAME

TABLE_REFERENCE

public static final ColumnAliasType TABLE_REFERENCE

COLUMN_CODE

public static final ColumnAliasType COLUMN_CODE
Method Detail

values

public static ColumnAliasType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ColumnAliasType c : ColumnAliasType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ColumnAliasType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null


Copyright ©2008 Jodd Team