|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SQLQueryParserFactoryDataTypes
This interface defines methods and constants needed to construct
PredefinedDataTypes.
TODO: should we enforce restrictions here on values for length, precision, ...
| Field Summary | |
|---|---|
static int |
PRIMITIVE_TYPE_BIGINT
The 'BIGINT' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_BINARY
The 'BINARY' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_BINARY_LARGE_OBJECT
The 'BINARY LARGE OBJECT' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_BINARY_VARYING
The 'BINARY VARYING' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_BOOLEAN
The 'BOOLEAN' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_CHARACTER
The 'CHARACTER' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_CHARACTER_LARGE_OBJECT
The 'CHARACTER LARGE OBJECT' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_CHARACTER_VARYING
The 'CHARACTER VARYING' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_DATALINK
The 'DATALINK' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_DATE
The 'DATE' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_DECIMAL
The 'DECIMAL' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_DOUBLE_PRECISION
The 'DOUBLE PRECISION' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_FLOAT
The 'FLOAT' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_INTEGER
The 'INTEGER' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_INTERVAL
The 'INTERVAL' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_NATIONAL_CHARACTER
The 'NATIONAL CHARACTER' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_NATIONAL_CHARACTER_LARGE_OBJECT
The 'NATIONAL CHARACTER LARGE OBJECT' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_NATIONAL_CHARACTER_VARYING
The 'NATIONAL CHARACTER VARYING' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_NUMERIC
The 'NUMERIC' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_REAL
The 'REAL' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_SMALLINT
The 'SMALLINT' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_TIME
The 'TIME' PrimitiveType constant. |
static int |
PRIMITIVE_TYPE_TIMESTAMP
The 'TIMESTAMP' PrimitiveType constant. |
static java.lang.String |
UNIT_INDICATOR_G
The one character String constant 'G' representing the unit Gigabyte. |
static java.lang.String |
UNIT_INDICATOR_K
The one character String constant 'K' representing the unit Kilobyte. |
static java.lang.String |
UNIT_INDICATOR_M
The one character String constant 'M' representing the unit Megabyte. |
| Method Summary | |
|---|---|
ArrayDataType |
createDataTypeArray(DataType elementDataType)
Factory method to construct a ArrayDataType with the
element data type elementDataType. |
ArrayDataType |
createDataTypeArray(DataType elementDataType,
int maxCardinality)
Factory method to construct a ArrayDataType with the
element data type elementDataType and with maximum
cardinality specified by maxCardinality. |
BinaryStringDataType |
createDataTypeBinaryString(int primitiveType,
int length,
java.lang.String optionalUnitsIndicator)
Factory method to construct a BinaryStringDataType with
its primitiveType and length. |
BooleanDataType |
createDataTypeBoolean()
Factory method to construct a BooleanDataType with
primitiveType PrimitiveType.BOOLEAN_LITERAL. |
CharacterStringDataType |
createDataTypeCharacterString(int primitiveType,
int length,
java.lang.String optionalUnitsIndicator)
Factory method to construct a CharacterStringDataType with
its primitiveType and length. |
DataLinkDataType |
createDataTypeDataLink(int length)
TODO: finish method signature and doc properly! |
DateDataType |
createDataTypeDate()
Factory method to construct a DateDataType with
primitiveType PrimitiveType.DATE_LITERAL. |
IntervalDataType |
createDataTypeInterval(IntervalQualifierType leadingQualifier,
IntervalQualifierType trailingQualifier,
int leadingFieldPrecision,
int trailingFieldPrecision,
int fractionalSecondsPrecision)
Factory method to construct a IntervalDataType with
primitiveType PrimitiveType.INTERVAL. |
MultisetDataType |
createDataTypeMultiset(DataType elementDataType)
Factory method to construct a MultisetDataType with the
element data type elementDataType. |
ApproximateNumericDataType |
createDataTypeNumericApproximate(int primitiveType,
int precision)
Factory method to construct a ApproximateNumericDataType with
its primitiveType and precision. |
FixedPrecisionDataType |
createDataTypeNumericFixedPrecision(int primitiveType,
int precision,
int scale)
Factory method to construct a FixedPrecisionDataType with
its primitiveType, precision and scale. |
IntegerDataType |
createDataTypeNumericInteger(int primitiveType,
int precision)
Factory method to construct a IntegerDataType with
its primitiveType. |
TimeDataType |
createDataTypeTime(int primitiveType,
int fractionalSecondsPrecision)
Factory method to construct a TimeDataType with
its primitiveType and length. |
| Field Detail |
|---|
static final int PRIMITIVE_TYPE_CHARACTER
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#CHARACTER,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_CHARACTER_VARYING
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#CHARACTER_VARYING,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_CHARACTER_LARGE_OBJECT
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#CHARACTER_LARGE_OBJECT,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_NATIONAL_CHARACTER
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#NATIONAL_CHARACTER,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_NATIONAL_CHARACTER_VARYING
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#NATIONAL_CHARACTER_VARYING,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_NATIONAL_CHARACTER_LARGE_OBJECT
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#NATIONAL_CHARACTER_LARGE_OBJECT,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_BINARY
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#BINARY,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_BINARY_VARYING
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#BINARY_VARYING,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_BINARY_LARGE_OBJECT
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#BINARY_LARGE_OBJECT,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_NUMERIC
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#NUMERIC,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_DECIMAL
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#DECIMAL,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_SMALLINT
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#SMALLINT,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_INTEGER
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#INTEGER,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_BIGINT
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#BIGINT,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_FLOAT
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#FLOAT,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_REAL
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#REAL,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_DOUBLE_PRECISION
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#DOUBLE_PRECISION,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_BOOLEAN
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#BOOLEAN,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_DATE
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#DATE,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_TIME
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#TIME,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_TIMESTAMP
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#TIMESTAMP,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_INTERVAL
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#INTERVAL,
Constant Field Valuesstatic final int PRIMITIVE_TYPE_DATALINK
PrimitiveType constant.
org.eclipse.wst.rdb.internal.models.sql.datatypes.PrimitiveType#DATALINK,
Constant Field Valuesstatic final java.lang.String UNIT_INDICATOR_K
static final java.lang.String UNIT_INDICATOR_M
static final java.lang.String UNIT_INDICATOR_G
| Method Detail |
|---|
ArrayDataType createDataTypeArray(DataType elementDataType)
ArrayDataType with the
element data type elementDataType.
elementDataType -
ArrayDataType
ArrayDataType createDataTypeArray(DataType elementDataType,
int maxCardinality)
ArrayDataType with the
element data type elementDataType and with maximum
cardinality specified by maxCardinality.
elementDataType - maxCardinality -
ArrayDataType
CharacterStringDataType createDataTypeCharacterString(int primitiveType,
int length,
java.lang.String optionalUnitsIndicator)
CharacterStringDataType with
its primitiveType and length.
Note: The optional parameter optionalUnitsIndicator
may only be specified with the given primitiveType
PRIMITIVE_TYPE_CHARACTER_LARGE_OBJECTor
PRIMITIVE_TYPE_NATIONAL_CHARACTER_LARGE_OBJECT, where
UNIT_INDICATOR_Kmeasures the given length in
Kilobyte (for the given length<= 2097152),
UNIT_INDICATOR_Mmeasures the given length in
Megabyte (for the given length<= 2048),
UNIT_INDICATOR_Gmeasures the given length in
Gigabyte (for the given length<= 2).
Note: The given primitiveType must be one of the
constants for the primitve types in this interface/class correlated to
the CharacterStringDataType.
primitiveType - one of the correlated the primitive types for the
CharacterStringDataTypelength - the length of this CharacterStringDataTypeoptionalUnitsIndicator - optional parameter indicating the given
length is measured in Kilobyte (use
UNIT_INDICATOR_K), Megabyte (use
UNIT_INDICATOR_M) or Gigabyte (use
UNIT_INDICATOR_G)
PRIMITIVE_TYPE_CHARACTER,
PRIMITIVE_TYPE_CHARACTER_VARYING,
PRIMITIVE_TYPE_CHARACTER_LARGE_OBJECT,
PRIMITIVE_TYPE_NATIONAL_CHARACTER,
PRIMITIVE_TYPE_NATIONAL_CHARACTER_VARYING,
PRIMITIVE_TYPE_NATIONAL_CHARACTER_LARGE_OBJECTBooleanDataType createDataTypeBoolean()
BooleanDataType with
primitiveType PrimitiveType.BOOLEAN_LITERAL.
BinaryStringDataType createDataTypeBinaryString(int primitiveType,
int length,
java.lang.String optionalUnitsIndicator)
BinaryStringDataType with
its primitiveType and length.
Note:
The optional parameter optionalUnitsIndicator may only be
specified with the given primitiveType
PRIMITIVE_TYPE_BINARY_LARGE_OBJECT, where
UNIT_INDICATOR_K measures the given length
in Kilobyte (for the given length <= 2097152),
UNIT_INDICATOR_M measures the given length
in Megabyte (for the given length <= 2048),
UNIT_INDICATOR_G measures the given length
in Gigabyte (for the given length <= 2).
Note:
The given primitiveType must be one of the constants for the
primitve types in this interface/class correlated to the
BinaryStringDataType.
primitiveType - one of the correlated the primitive types for
the BinaryStringDataTypelength - the length of this BinaryStringDataTypeoptionalUnitsIndicator - optional parameter indicating the given length
is measured in Kilobyte (use UNIT_INDICATOR_K),
Megabyte (use UNIT_INDICATOR_M) or
Gigabyte (use UNIT_INDICATOR_G)
PRIMITIVE_TYPE_BINARY,
PRIMITIVE_TYPE_BINARY_VARYING,
PRIMITIVE_TYPE_BINARY_LARGE_OBJECTDataLinkDataType createDataTypeDataLink(int length)
length -
IntervalDataType createDataTypeInterval(IntervalQualifierType leadingQualifier,
IntervalQualifierType trailingQualifier,
int leadingFieldPrecision,
int trailingFieldPrecision,
int fractionalSecondsPrecision)
IntervalDataType with
primitiveType PrimitiveType.INTERVAL.
leadingQualifier - trailingQualifier - leadingFieldPrecision - trailingFieldPrecision - fractionalSecondsPrecision -
TimeDataType createDataTypeTime(int primitiveType,
int fractionalSecondsPrecision)
TimeDataType with
its primitiveType and length.
Note:
The given primitiveType must be one of the constants for the
primitve types in this interface/class correlated to the
TimeDataType.
primitiveType - one of the correlated the primitive types for
the TimeDataType PRIMITIVE_TYPE_TIME,
PRIMITIVE_TYPE_TIMESTAMPfractionalSecondsPrecision - optional precision in fractional seconds of
this TimeDataType
(TimeDataType.setFractionalSecondsPrecision(int)), if not
specified default value for given primitiveType
PRIMITIVE_TYPE_TIME is 0 and for
PRIMITIVE_TYPE_TIMESTAMP is 6
PRIMITIVE_TYPE_TIME,
Note:
If the optional parameter fractionalSecondsPrecision is not
specified, the default value for the given primitiveType
{@link #PRIMITIVE_TYPE_TIME} is 0 and for primitiveType
{@link #PRIMITIVE_TYPE_TIMESTAMP} is 6.
DateDataType createDataTypeDate()
DateDataType with
primitiveType PrimitiveType.DATE_LITERAL.
PRIMITIVE_TYPE_DATEMultisetDataType createDataTypeMultiset(DataType elementDataType)
MultisetDataType with the
element data type elementDataType.
elementDataType -
MultisetDataType
FixedPrecisionDataType createDataTypeNumericFixedPrecision(int primitiveType,
int precision,
int scale)
FixedPrecisionDataType with
its primitiveType, precision and scale.
Note:
The given primitiveType must be one of the constants for the
primitve types in this interface/class correlated to the
FixedPrecisionDataType.
primitiveType - one of the correlated the primitive types for
the FixedPrecisionDataType PRIMITIVE_TYPE_NUMERIC,
PRIMITIVE_TYPE_DECIMALprecision - the total number of digits
org.eclipse.wst.rdb.internal.models.sql.datatypes.NumericalDataType#setPrecision(int) ranges between 1 and 31scale - the number of digits to the right of the decimal point,
ranges between 0 and precision
org.eclipse.wst.rdb.internal.models.sql.datatypes.ExactNumericDataType#setScale(int)
PRIMITIVE_TYPE_NUMERIC,
PRIMITIVE_TYPE_DECIMAL
IntegerDataType createDataTypeNumericInteger(int primitiveType,
int precision)
IntegerDataType with
its primitiveType. The precision is implicitly
given for the primitiveTypes
PRIMITIVE_TYPE_SMALLINT (5) and
PRIMITIVE_TYPE_INTEGER (10). The precision has to
be explicitely specified for the primitiveType
PRIMITIVE_TYPE_BIGINT or will be set to 10 by default.
Note:
The given primitiveType must be one of the constants for the
primitve types in this interface/class correlated to the
intDataType.
primitiveType - one of the correlated the primitive types for
the intDataType PRIMITIVE_TYPE_SMALLINT precision is 5,
PRIMITIVE_TYPE_INTEGER precision is 10,
PRIMITIVE_TYPE_BIGINT precision has to be given, default is 10precision - the total number of digits for given primitiveType
PRIMITIVE_TYPE_BIGINT, default is 10
org.eclipse.wst.rdb.internal.models.sql.datatypes.NumericalDataType#setPrecision(int) ranges between 1 and 31
PRIMITIVE_TYPE_SMALLINT,
PRIMITIVE_TYPE_INTEGER,
PRIMITIVE_TYPE_BIGINT
ApproximateNumericDataType createDataTypeNumericApproximate(int primitiveType,
int precision)
ApproximateNumericDataType with
its primitiveType and precision.
Note:
The given primitiveType must be one of the constants for the
primitve types in this interface/class correlated to the
ApproximateNumericDataType.
primitiveType - one of the correlated the primitive types for
the FixedPrecisionDataType PRIMITIVE_TYPE_FLOAT,
PRIMITIVE_TYPE_REAL, PRIMITIVE_TYPE_DOUBLE_PRECISIONprecision - the total number of digits
org.eclipse.wst.rdb.internal.models.sql.datatypes.NumericalDataType#setPrecision(int) ranges between 1 and 31
PRIMITIVE_TYPE_FLOAT,
PRIMITIVE_TYPE_REAL,
PRIMITIVE_TYPE_DOUBLE_PRECISION
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||