| 
 | ||||||||||
| 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_BIGINTThe 'BIGINT' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_BINARYThe 'BINARY' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_BINARY_LARGE_OBJECTThe 'BINARY LARGE OBJECT' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_BINARY_VARYINGThe 'BINARY VARYING' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_BOOLEANThe 'BOOLEAN' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_CHARACTERThe 'CHARACTER' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_CHARACTER_LARGE_OBJECTThe 'CHARACTER LARGE OBJECT' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_CHARACTER_VARYINGThe 'CHARACTER VARYING' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_DATALINKThe 'DATALINK' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_DATEThe 'DATE' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_DECIMALThe 'DECIMAL' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_DOUBLE_PRECISIONThe 'DOUBLE PRECISION' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_FLOATThe 'FLOAT' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_INTEGERThe 'INTEGER' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_INTERVALThe 'INTERVAL' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_NATIONAL_CHARACTERThe 'NATIONAL CHARACTER' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_NATIONAL_CHARACTER_LARGE_OBJECTThe 'NATIONAL CHARACTER LARGE OBJECT' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_NATIONAL_CHARACTER_VARYINGThe 'NATIONAL CHARACTER VARYING' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_NUMERICThe 'NUMERIC' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_REALThe 'REAL' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_SMALLINTThe 'SMALLINT' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_TIMEThe 'TIME' PrimitiveTypeconstant. | 
| static int | PRIMITIVE_TYPE_TIMESTAMPThe 'TIMESTAMP' PrimitiveTypeconstant. | 
| static java.lang.String | UNIT_INDICATOR_GThe one character String constant 'G' representing the unit Gigabyte. | 
| static java.lang.String | UNIT_INDICATOR_KThe one character String constant 'K' representing the unit Kilobyte. | 
| static java.lang.String | UNIT_INDICATOR_MThe one character String constant 'M' representing the unit Megabyte. | 
| Method Summary | |
|---|---|
|  ArrayDataType | createDataTypeArray(DataType elementDataType)Factory method to construct a ArrayDataTypewith the
 element data typeelementDataType. | 
|  ArrayDataType | createDataTypeArray(DataType elementDataType,
                    int maxCardinality)Factory method to construct a ArrayDataTypewith the
 element data typeelementDataTypeand with maximum
 cardinality specified bymaxCardinality. | 
|  BinaryStringDataType | createDataTypeBinaryString(int primitiveType,
                           int length,
                           java.lang.String optionalUnitsIndicator)Factory method to construct a BinaryStringDataTypewith
 itsprimitiveTypeandlength. | 
|  BooleanDataType | createDataTypeBoolean()Factory method to construct a BooleanDataTypewithprimitiveTypePrimitiveType.BOOLEAN_LITERAL. | 
|  CharacterStringDataType | createDataTypeCharacterString(int primitiveType,
                              int length,
                              java.lang.String optionalUnitsIndicator)Factory method to construct a CharacterStringDataTypewith
 itsprimitiveTypeandlength. | 
|  DataLinkDataType | createDataTypeDataLink(int length)TODO: finish method signature and doc properly! | 
|  DateDataType | createDataTypeDate()Factory method to construct a DateDataTypewithprimitiveTypePrimitiveType.DATE_LITERAL. | 
|  IntervalDataType | createDataTypeInterval(IntervalQualifierType leadingQualifier,
                       IntervalQualifierType trailingQualifier,
                       int leadingFieldPrecision,
                       int trailingFieldPrecision,
                       int fractionalSecondsPrecision)Factory method to construct a IntervalDataTypewithprimitiveTypePrimitiveType.INTERVAL. | 
|  MultisetDataType | createDataTypeMultiset(DataType elementDataType)Factory method to construct a MultisetDataTypewith the
 element data typeelementDataType. | 
|  ApproximateNumericDataType | createDataTypeNumericApproximate(int primitiveType,
                                 int precision)Factory method to construct a ApproximateNumericDataTypewith
 itsprimitiveTypeandprecision. | 
|  FixedPrecisionDataType | createDataTypeNumericFixedPrecision(int primitiveType,
                                    int precision,
                                    int scale)Factory method to construct a FixedPrecisionDataTypewith
 itsprimitiveType,precisionandscale. | 
|  IntegerDataType | createDataTypeNumericInteger(int primitiveType,
                             int precision)Factory method to construct a IntegerDataTypewith
 itsprimitiveType. | 
|  TimeDataType | createDataTypeTime(int primitiveType,
                   int fractionalSecondsPrecision)Factory method to construct a TimeDataTypewith
 itsprimitiveTypeandlength. | 
| 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 | |||||||||