|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataTypeFactory
This is factory for creating SQL data types. Typically required when defining tables.
TableDefinition| Method Summary | |
|---|---|
BigInt |
bigInt()
Creates data type representing BIGINT. |
SQLDate |
date()
Creates a DATE type. |
SQLInterval |
dayTimeInterval(IntervalDataType startField,
java.lang.Integer startFieldPrecision,
IntervalDataType endField,
java.lang.Integer secondFracs)
Creates a new day-time INTERVAL. |
Decimal |
decimal()
Creates plain DECIMAL type. |
Decimal |
decimal(java.lang.Integer precision)
Creates DECIMAL(p) type, where p is given precision. |
Decimal |
decimal(java.lang.Integer precision,
java.lang.Integer scale)
Creates DECIMAL(p,s) type, where p is given precision, and s is given scale. |
DoublePrecision |
doublePrecision()
Creates data type representing DOUBLE PRECISION. |
SQLInteger |
integer()
Creates new instance of INTEGER type. |
Numeric |
numeric()
Creates plain NUMERIC type. |
Numeric |
numeric(java.lang.Integer precision)
Creates NUMERIC(p) type, where p is given precision. |
Numeric |
numeric(java.lang.Integer precision,
java.lang.Integer scale)
Creates NUMERIC(p,s) type, where p is given precision, and s is given scale. |
Real |
real()
Creates data type representing REAL. |
SmallInt |
smallInt()
Creates data type representing SMALLINT. |
SQLBoolean |
sqlBoolean()
Creates data type representing BOOLEAN. |
SQLChar |
sqlChar()
Creates a new CHARACTER type. |
SQLChar |
sqlChar(java.lang.Integer length)
Creates a new CHARACTER type. |
SQLFloat |
sqlFloat()
Creates new instance of FLOAT type. |
SQLFloat |
sqlFloat(java.lang.Integer precision)
Creates new instance of FLOAT type. |
SQLChar |
sqlVarChar()
Creates a new CHARACTER VARYING type. |
SQLChar |
sqlVarChar(java.lang.Integer length)
Creates a new CHARACTER VARYING type. |
SQLTime |
time()
Creates TIME type with unspecified precision and unspecified value for including time zone. |
SQLTime |
time(java.lang.Boolean withTimeZone)
Creates TIME type with unspecified precision and given value for including time zone. |
SQLTime |
time(java.lang.Integer precision)
Creates TIME type with given precision and unspecified value for including time zone. |
SQLTime |
time(java.lang.Integer precision,
java.lang.Boolean withTimeZone)
Creates TIME type with given precision and whether to include time zone. |
SQLTimeStamp |
timeStamp()
Creates TIMESTAMP type with unspecified precision and unspecified value for including time zone. |
SQLTimeStamp |
timeStamp(java.lang.Boolean withTimeZone)
Creates TIMESTAMP type with unspecified precision and given value for including time zone. |
SQLTimeStamp |
timeStamp(java.lang.Integer precision)
Creates TIMESTAMP type with given precision and unspecified value for including time zone. |
SQLTimeStamp |
timeStamp(java.lang.Integer precision,
java.lang.Boolean withTimeZone)
Creates TIMESTAMP type with given precision and whether to include time zone. |
UserDefinedType |
userDefined(java.lang.String textualContent)
Creates a user-defined type which will be inserted into SQL statement as-such. |
SQLInterval |
yearMonthInterval(IntervalDataType startField,
java.lang.Integer startFieldPrecision,
IntervalDataType endField)
Creates a new year-month INTERVAL. |
| Method Detail |
|---|
BigInt bigInt()
BIGINT.
BIGINT.Decimal decimal()
Creates plain DECIMAL type. Calling this method is equivalent to calling
decimal(Integer, Integer) and passing null as both parameters.
The site http://intelligent-enterprise.informationweek.com/000626/celko.jhtml explains difference between
NUMERIC and DECIMAL:
The difference between DECIMAL(s,p) and NUMERIC(s,p) is subtle in the SQL-92 Standard -- DECIMAL(s,p) must be
exactly as precise as declared, while NUMERIC(s,p) must be at least as precise as declared.
DECIMAL type.Decimal decimal(java.lang.Integer precision)
Creates DECIMAL(p) type, where p is given precision. Calling this method is equivalent to calling
decimal(Integer, Integer) and passing null as second parameter.
The site http://intelligent-enterprise.informationweek.com/000626/celko.jhtml explains difference between
NUMERIC and DECIMAL:
The difference between DECIMAL(s,p) and NUMERIC(s,p) is subtle in the SQL-92 Standard -- DECIMAL(s,p) must be
exactly as precise as declared, while NUMERIC(s,p) must be at least as precise as declared.
precision - The precision for this DECIMAL. May be null to create plain DECIMAL
type.
DECIMAL type.
Decimal decimal(java.lang.Integer precision,
java.lang.Integer scale)
Creates DECIMAL(p,s) type, where p is given precision, and s is given scale.
The site http://intelligent-enterprise.informationweek.com/000626/celko.jhtml explains difference between
NUMERIC and DECIMAL:
The difference between DECIMAL(s,p) and NUMERIC(s,p) is subtle in the SQL-92 Standard -- DECIMAL(s,p) must be
exactly as precise as declared, while NUMERIC(s,p) must be at least as precise as declared.
precision - The precision for this DECIMAL. May be null to create plain DECIMAL.scale - The scale for this DECIMAL. Is ignored if precision is null.
DECIMAL type.DoublePrecision doublePrecision()
DOUBLE PRECISION.
DOUBLE PRECISION.Numeric numeric()
Creates plain NUMERIC type. Calling this method is equivalent to calling
numeric(Integer, Integer) and passing null as both parameters.
The site http://intelligent-enterprise.informationweek.com/000626/celko.jhtml explains difference between
NUMERIC and DECIMAL:
The difference between DECIMAL(s,p) and NUMERIC(s,p) is subtle in the SQL-92 Standard -- DECIMAL(s,p) must be
exactly as precise as declared, while NUMERIC(s,p) must be at least as precise as declared.
NUMERIC type.Numeric numeric(java.lang.Integer precision)
Creates NUMERIC(p) type, where p is given precision. Calling this method is equivalent to calling
numeric(Integer, Integer) and passing null as second parameter.
The site http://intelligent-enterprise.informationweek.com/000626/celko.jhtml explains difference between
NUMERIC and DECIMAL:
The difference between DECIMAL(s,p) and NUMERIC(s,p) is subtle in the SQL-92 Standard -- DECIMAL(s,p) must be
exactly as precise as declared, while NUMERIC(s,p) must be at least as precise as declared.
precision - The precision for this NUMERIC. May be null to create plain NUMERIC
type.
NUMERIC type.
Numeric numeric(java.lang.Integer precision,
java.lang.Integer scale)
Creates NUMERIC(p,s) type, where p is given precision, and s is given scale.
The site http://intelligent-enterprise.informationweek.com/000626/celko.jhtml explains difference between
NUMERIC and DECIMAL:
The difference between DECIMAL(s,p) and NUMERIC(s,p) is subtle in the SQL-92 Standard -- DECIMAL(s,p) must be
exactly as precise as declared, while NUMERIC(s,p) must be at least as precise as declared.
precision - The precision for this NUMERIC. May be null to create plain NUMERIC.scale - The scale for this NUMERIC. Is ignored if precision is null.
NUMERIC type.Real real()
REAL.
REAL.SmallInt smallInt()
SMALLINT.
SMALLINT.SQLBoolean sqlBoolean()
BOOLEAN.
BOOLEAN.SQLChar sqlChar()
CHARACTER type. Calling this method is equivalent to calling sqlChar(Integer) and
passing null as parameter.
CHARACTER type.SQLChar sqlChar(java.lang.Integer length)
CHARACTER type.
length - The length for this CHARACTER. May be null.
CHARACTER type.SQLChar sqlVarChar()
CHARACTER VARYING type. Calling this method is equivalent to calling
sqlVarChar(Integer) and passing null as parameter.
CHARACTER VARYING type.SQLChar sqlVarChar(java.lang.Integer length)
CHARACTER VARYING type.
length - The length for this CHARACTER VARYING. May be null.
CHARACTER VARYING type.SQLDate date()
DATE type.
DATE type.SQLFloat sqlFloat()
FLOAT type. Calling this method is equivalent to calling
sqlFloat(Integer) and passing null as argument.
FLOAt type.SQLFloat sqlFloat(java.lang.Integer precision)
FLOAT type.
precision - The precision for this FLOAT type. May be null.
FLOAT type.SQLInteger integer()
INTEGER type.
INTEGER type.
SQLInterval yearMonthInterval(IntervalDataType startField,
java.lang.Integer startFieldPrecision,
IntervalDataType endField)
INTERVAL.
startField - The type of start field for this INTERVAL. Must be either IntervalDataType.YEAR
or IntervalDataType.MONTH.startFieldPrecision - The precision for the start field. May be null if none specified.endField - The type of end field for this INTERVAL. May be null for single date interval. If
it is not null, must be either IntervalDataType.YEAR or IntervalDataType.MONTH
.
INTERVAL with specified values.
NullArgumentException - If startField is null.
java.lang.IllegalArgumentException - If requirements for startField or endField fail.
SQLInterval dayTimeInterval(IntervalDataType startField,
java.lang.Integer startFieldPrecision,
IntervalDataType endField,
java.lang.Integer secondFracs)
INTERVAL.
startField - The type of start field for this INTERVAL. Must not be IntervalDataType.YEAR
nor IntervalDataType.MONTH.startFieldPrecision - The precision for the start field. May null if none specified.endField - The type of end field for this INTERVAL. May be null for single day-time
interval. If it is not null, it must not be IntervalDataType.YEAR nor
IntervalDataType.MONTH.secondFracs - The fractional precision for when end field is IntervalDataType.SECOND or when this is
single day-time interval and start field is IntervalDataType.SECOND. Otherwise this value is
ignored.
INTERVAL.
NullArgumentException - If startField is null.
java.lang.IllegalArgumentException - If requirements for startField or endField fail, or if when
using single day-time interval with type IntervalDataType.SECOND, and secondFracs
is specified, but startFieldPrecision is not specified.SQLTime time()
TIME type with unspecified precision and unspecified value for including time zone. Calling this
method is equivalent to calling time(Integer, Boolean) and pass null as both parameters.
TIME type without precision and unspecified value for including time zone.SQLTime time(java.lang.Integer precision)
TIME type with given precision and unspecified value for including time zone. Calling this method
is equivalent to calling time(Integer, Boolean) and pass null as second parameter.
precision - The precision for TIME. May be null.
TIME type with given precision and unspecified value for including time zone.SQLTime time(java.lang.Boolean withTimeZone)
TIME type with unspecified precision and given value for including time zone. Calling this method
is equivalent to calling time(Integer, Boolean) and pass null as first parameter.
withTimeZone - Whether to include time zone. May be null if no decision is wanted.
TIME type with unspecified precision and given value for including time zone.
SQLTime time(java.lang.Integer precision,
java.lang.Boolean withTimeZone)
TIME type with given precision and whether to include time zone.
precision - The precision for TIME. May be null.withTimeZone - Whether to include time zone. May be null if no decision is wanted.
TIME type with given precision and whether to include time zone.SQLTimeStamp timeStamp()
TIMESTAMP type with unspecified precision and unspecified value for including time zone. Calling
this method is equivalent to calling timeStamp(Integer, Boolean) and pass null as both
parameters.
TIMESTAMP type without precision and unspecified value for including time zone.SQLTimeStamp timeStamp(java.lang.Integer precision)
TIMESTAMP type with given precision and unspecified value for including time zone. Calling this
method is equivalent to calling timeStamp(Integer, Boolean) and pass null as second parameter.
precision - The precision for TIME. May be null.
TIMESTAMP type with given precision and unspecified value for including time zone.SQLTimeStamp timeStamp(java.lang.Boolean withTimeZone)
TIMESTAMP type with unspecified precision and given value for including time zone. Calling this
method is equivalent to calling timeStamp(Integer, Boolean) and pass null as first parameter.
withTimeZone - Whether to include time zone. May be null if no decision is wanted.
TIMESTAMP type with unspecified precision and given value for including time zone.
SQLTimeStamp timeStamp(java.lang.Integer precision,
java.lang.Boolean withTimeZone)
TIMESTAMP type with given precision and whether to include time zone.
precision - The precision for TIMESTAMP. May be null.withTimeZone - Whether to include time zone. May be null if no decision is wanted.
TIMESTAMP type with given precision and whether to include time zone.UserDefinedType userDefined(java.lang.String textualContent)
textualContent - The textual contents for user-defined type.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||