public final class SchemaTypeHelper extends Object
Modifier and Type | Method and Description |
---|---|
static SqlType |
getDomain(Column column,
ControllerState controllerState) |
static SqlType |
getDomain(SourceElement columnElement,
ControllerState controllerState) |
static SchemaType |
getSchemaType(Column column,
ControllerState controllerState)
Determines the schema type of a column.
|
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.
|
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 SchemaType getSchemaType(Column column, ControllerState controllerState) throws SourceTransformerException
column
- 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
public static SqlType getDomain(Column column, ControllerState controllerState) throws SourceTransformerException
SourceTransformerException
Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.