|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.torque.templates.transformer.SchemaTypeHelper
public final class SchemaTypeHelper
Helper class for retrieving the schema type of a column. $Id: SchemaTypeHelper.java 1436342 2013-01-21 13:40:05Z tfischer $
Method Summary | |
---|---|
static SqlType |
getDomain(SourceElement columnElement,
ControllerState controllerState)
|
static SchemaType |
getSchemaType(SourceElement columnElement,
ControllerState controllerState)
Determines the schema type of a column. |
static SqlType |
getSqlType(SchemaType schemaType,
SqlType domainType,
ControllerState controllerState,
String size,
String scale,
String defaultValue)
Returns the SQL type for a schema type and the specified target database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static SchemaType getSchemaType(SourceElement columnElement, ControllerState controllerState) throws SourceTransformerException
columnElement
- the source element which defines the column
for which the schema type should be determined; not null.controllerState
- the controller state, not null.
SourceTransformerException
- if the name attribute is not set
in the column or if the type refers to an unknown type.public static SqlType getSqlType(SchemaType schemaType, SqlType domainType, ControllerState controllerState, String size, String scale, String defaultValue)
schemaType
- the schema type for which the SQL type should be
determined, not null.domainType
- the domain type which overrides the schema type,
or null if no domain is defined.controllerState
- the controller state, not null.size
- overrides the size from schemaType and/or domainType,
or null to use the default from domainType or schemaType.scale
- overrides the scale from schemaType and/or domainType,
or null to use the default from domainType or schemaType.defaultValue
- overrides the defaultValue from schemaType
and/or domainType, or null to use the default from domainType
or schemaType.
public static SqlType getDomain(SourceElement columnElement, ControllerState controllerState) throws SourceTransformerException
SourceTransformerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |