org.melati.poem
Class ColumnTypePoemType

Package class diagram package ColumnTypePoemType
java.lang.Object
  extended by org.melati.poem.BasePoemType<T>
      extended by org.melati.poem.AtomPoemType<T>
          extended by org.melati.poem.IntegerPoemType
              extended by org.melati.poem.IndexPoemType
                  extended by org.melati.poem.ColumnTypePoemType
All Implemented Interfaces:
Cloneable, PoemType, SQLPoemType, SQLType

public class ColumnTypePoemType
extends IndexPoemType

A metadata type which defines the type of another Column. Used in the ColumnInfoTable it can take positive values to indicate a reference to a type defined in the TableInfoTable or a negative value to point to a fundamental type.

See Also:
PoemTypeFactory.forCode(org.melati.poem.Database, int)

Field Summary
 
Fields inherited from class org.melati.poem.IntegerPoemType
nullableInstance
 
Fields inherited from class org.melati.poem.AtomPoemType
sqlTypeName
 
Fields inherited from class org.melati.poem.BasePoemType
nullable
 
Constructor Summary
ColumnTypePoemType(Database database)
          Constructor for a non nullable column type.
 
Method Summary
protected  void _assertValidCooked(Object cooked)
           
protected  boolean _canRepresent(SQLPoemType other)
          
protected  Object _cookedOfRaw(Object raw)
          Returns the given value unchanged.
protected  Object _rawOfCooked(Object cooked)
          Returns the given value unchanged.
protected  void _saveColumnInfo(ColumnInfo columnInfo)
           
protected  String _stringOfCooked(Object cooked, PoemLocale locale, int style)
           
 Enumeration<Integer> possibleRaws()
          Get the possible values for this field, null for rangeable types with no range set.
 String toDsdType()
          The field type used in the Data Structure Definition language.
 String toString()
          
 
Methods inherited from class org.melati.poem.IntegerPoemType
_assertValidRaw, _getRaw, _possibleRaws, _rawOfString, _setRaw
 
Methods inherited from class org.melati.poem.AtomPoemType
_quotedRaw, _sqlDefinition, _stringOfRaw, _toString, sqlDefaultValue
 
Methods inherited from class org.melati.poem.BasePoemType
assertValidCooked, assertValidRaw, canRepresent, clone, cookedOfRaw, getLimitRaw, getLowRaw, getNullable, getRaw, quotedRaw, rawOfCooked, rawOfString, saveColumnInfo, setRaw, setRawRange, sqlDefinition, sqlTypeCode, sqlTypeDefinition, stringOfCooked, stringOfRaw, withNullable
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColumnTypePoemType

public ColumnTypePoemType(Database database)
Constructor for a non nullable column type.

Parameters:
database - the db we are dealing with
Method Detail

possibleRaws

public Enumeration<Integer> possibleRaws()
Get the possible values for this field, null for rangeable types with no range set. NOTE Null is a possible value for nullable types

Specified by:
possibleRaws in interface PoemType
Overrides:
possibleRaws in class BasePoemType
Returns:
an Enumeration of possibilities or null
See Also:
BasePoemType.possibleRaws()

_assertValidCooked

protected void _assertValidCooked(Object cooked)
                           throws ValidationPoemException
Overrides:
_assertValidCooked in class AtomPoemType
Throws:
ValidationPoemException

_cookedOfRaw

protected Object _cookedOfRaw(Object raw)
                       throws NoSuchRowPoemException
Description copied from class: AtomPoemType
Returns the given value unchanged.

Overrides:
_cookedOfRaw in class AtomPoemType
Parameters:
raw - the base object or Integer object id
Returns:
the unchanged base object or an instantiated type
Throws:
NoSuchRowPoemException

_rawOfCooked

protected Object _rawOfCooked(Object cooked)
Description copied from class: AtomPoemType
Returns the given value unchanged.

Overrides:
_rawOfCooked in class AtomPoemType

_stringOfCooked

protected String _stringOfCooked(Object cooked,
                                 PoemLocale locale,
                                 int style)
                          throws PoemException
Overrides:
_stringOfCooked in class AtomPoemType
Throws:
PoemException

_canRepresent

protected boolean _canRepresent(SQLPoemType other)
Description copied from class: IntegerPoemType

Overrides:
_canRepresent in class IntegerPoemType
See Also:
BasePoemType._canRepresent(org.melati.poem.SQLPoemType)

_saveColumnInfo

protected void _saveColumnInfo(ColumnInfo columnInfo)
                        throws AccessPoemException
Overrides:
_saveColumnInfo in class IntegerPoemType
Throws:
AccessPoemException

toString

public String toString()

Overrides:
toString in class BasePoemType
See Also:
BasePoemType.toString()

toDsdType

public String toDsdType()
The field type used in the Data Structure Definition language.

Specified by:
toDsdType in interface PoemType
Overrides:
toDsdType in class IntegerPoemType
Returns:
the Type name
See Also:
PoemType.toDsdType()


Copyright © 2000-2010 PanEris. All Rights Reserved.