|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface defines methods associated with a TypeId that are used by the compiler.
Field Summary | |
static java.lang.String |
AVG_OP
|
static int |
BOOLEAN_MAXWIDTH_AS_CHAR
|
static int |
DEFAULT_DECIMAL_PRECISION
|
static int |
DEFAULT_DECIMAL_SCALE
|
static java.lang.String |
DIVIDE_OP
|
static int |
DOUBLE_MAXWIDTH_AS_CHAR
|
static int |
INT_MAXWIDTH_AS_CHAR
|
static int |
LONGINT_MAXWIDTH_AS_CHAR
Various fixed numbers related to datatypes. |
static int |
MAX_DECIMAL_PRECISION_SCALE
|
static java.lang.String |
MINUS_OP
|
static java.lang.String |
MOD_OP
|
static java.lang.String |
PLUS_OP
|
static int |
REAL_MAXWIDTH_AS_CHAR
|
static int |
SMALLINT_MAXWIDTH_AS_CHAR
|
static java.lang.String |
SUM_OP
|
static java.lang.String |
TIMES_OP
|
static int |
TINYINT_MAXWIDTH_AS_CHAR
|
Method Summary | |
boolean |
comparable(TypeId otherType,
boolean forEquals,
ClassFactory cf)
Determine if this type can be compared to some other type |
boolean |
compatible(TypeId otherType)
Determine if this type is compatible to some other type (e.g. |
boolean |
convertible(TypeId otherType,
boolean forDataTypeFunction)
Determine if this type can be CONVERTed to some other type |
void |
generateDataValue(MethodBuilder eb,
LocalField field)
Generate the code necessary to produce a SQL value based on a value. |
void |
generateNull(MethodBuilder mb)
Generate the code necessary to produce a SQL null of the appropriate type. |
int |
getCastToCharWidth(DataTypeDescriptor dts)
Return the maximum width for this data type when cast to a char type. |
java.lang.String |
getCorrespondingPrimitiveTypeName()
Get the name of the corresponding Java type. |
java.lang.String |
getMatchingNationalCharTypeName()
Get the name of the matching national char type. |
java.lang.String |
getPrimitiveMethodName()
Get the method name for getting out the corresponding primitive Java type from a DataValueDescriptor. |
java.lang.String |
interfaceName()
Get the name of the interface for this type. |
DataTypeDescriptor |
resolveArithmeticOperation(DataTypeDescriptor leftType,
DataTypeDescriptor rightType,
java.lang.String operator)
Type resolution methods on binary operators |
boolean |
storable(TypeId otherType,
ClassFactory cf)
Determine if this type can have a value of another type stored into it. |
Field Detail |
public static final int LONGINT_MAXWIDTH_AS_CHAR
public static final int INT_MAXWIDTH_AS_CHAR
public static final int SMALLINT_MAXWIDTH_AS_CHAR
public static final int TINYINT_MAXWIDTH_AS_CHAR
public static final int DOUBLE_MAXWIDTH_AS_CHAR
public static final int REAL_MAXWIDTH_AS_CHAR
public static final int DEFAULT_DECIMAL_PRECISION
public static final int DEFAULT_DECIMAL_SCALE
public static final int MAX_DECIMAL_PRECISION_SCALE
public static final int BOOLEAN_MAXWIDTH_AS_CHAR
public static final java.lang.String PLUS_OP
public static final java.lang.String DIVIDE_OP
public static final java.lang.String MINUS_OP
public static final java.lang.String TIMES_OP
public static final java.lang.String SUM_OP
public static final java.lang.String AVG_OP
public static final java.lang.String MOD_OP
Method Detail |
public DataTypeDescriptor resolveArithmeticOperation(DataTypeDescriptor leftType, DataTypeDescriptor rightType, java.lang.String operator) throws StandardException
leftType
- The type of the left parameterrightType
- The type of the right parameteroperator
- The name of the operator (e.g. "+").
StandardException
- Thrown on errorpublic boolean comparable(TypeId otherType, boolean forEquals, ClassFactory cf)
otherType
- The CompilationType of the other type to compare
this type toforEquals
- True if this is an = or <> comparison, false otherwise.cf
- A ClassFactory
public boolean convertible(TypeId otherType, boolean forDataTypeFunction)
otherType
- The CompilationType of the other type to compare
this type toforDataTypeFunction
- true if this is a type function that
requires more liberal behavior (e.g DOUBLE can convert a char but
you cannot cast a CHAR to double.
public boolean compatible(TypeId otherType)
otherType
- The CompilationType of the other type to compare
this type to
public boolean storable(TypeId otherType, ClassFactory cf)
otherType
- The TypeId of the other type to compare this type tocf
- A ClassFactory
public java.lang.String interfaceName()
public java.lang.String getCorrespondingPrimitiveTypeName()
public java.lang.String getPrimitiveMethodName()
public java.lang.String getMatchingNationalCharTypeName()
public void generateNull(MethodBuilder mb)
mb
- The method to put the expression inpublic void generateDataValue(MethodBuilder eb, LocalField field)
public int getCastToCharWidth(DataTypeDescriptor dts)
dts
- The associated DataTypeDescriptor for this TypeId.
|
Built on Tue 2006-10-10 19:23:47+0200, from revision exported | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |