| Modifier and Type | Field and Description |
|---|---|
| private TypeId |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv String | dataValueMethodName()
Return the method name to get a Derby DataValueDescriptor object of the correct type and set it to a specific value. |
| public void | generateDataValue(MethodBuilder
The method to put the expression in mb, int For character DVDs, this will be used to determine
what Collator should be associated with the DVD which in turn will
decide whether to generate CollatorSQLcharDVDs or SQLcharDVDs. For
other types of DVDs, this parameter will be ignored. collationType, LocalField LocalField field)Implements org. The caller will have pushed a DataValueFactory and value of that can be converted to the correct type, e.g. int for a SQL INTEGER. |
| public void | generateNull(MethodBuilder
The method to put the expression in mb, int For character DVDs, this will be used to determine
what Collator should be associated with the DVD which in turn will
decide whether to generate CollatorSQLcharDVDs or SQLcharDVDs. collationType)Implements org. The caller will have pushed a DataValueFactory and a null or a value of the correct type (interfaceName()). |
| public String | Returns: String The method call name for getting the corresponding primitive Java type.Implements org. Get the method name for getting out the corresponding primitive Java type. |
| protected int | Returns: The StoredFormatId from the corresponding TypeId.Get the StoredFormatId from the corresponding TypeId. |
| protected TypeCompiler | |
| protected TypeId | |
| pack-priv abstract String | nullMethodName()
Return the method name to get a Derby DataValueDescriptor object of the correct type set to SQL NULL. |
| pack-priv boolean | numberConvertible(TypeId
The TypeId of the other type. otherType, boolean was this called from a scalarFunction like
CHAR() or DOUBLE() forDataTypeFunction)Tell whether this numeric type can be converted to the given type. |
| pack-priv boolean | numberStorable(TypeId
The TypeId of this type thisType, TypeId The TypeId of the other type. otherType, ClassFactory A ClassFactory cf)Tell whether this numeric type can be stored into from the given type. |
| pack-priv boolean | Returns: true collationType will be pushed, false collationType will be ignored.Collation type of character values. collationType)Return true if the collationType is to be passed to the methods generated by generateNull and generateDataValue. |
| public DataTypeDescriptor | resolveArithmeticOperation(DataTypeDescriptor
The type of the left parameter leftType, DataTypeDescriptor The type of the right parameter rightType, String The name of the operator (e.g. "+"). operator)Implements org. Type resolution methods on binary operators |
| pack-priv void | |
| protected boolean | Returns: true if thisType is storable in otherTypeThe TypeId of the value to be stored thisType, TypeId The TypeId of the value to be stored in otherType, ClassFactory cf)Determine whether thisType is storable in otherType due to otherType being a user type. |
| correspondingTypeId | back to summary |
|---|---|
| private TypeId correspondingTypeId | |
| BaseTypeCompiler | back to summary |
|---|---|
| pack-priv BaseTypeCompiler() | |
| dataValueMethodName | back to summary |
|---|---|
| pack-priv String dataValueMethodName() Return the method name to get a Derby DataValueDescriptor object of the correct type and set it to a specific value. The method named will be called with two arguments, a value to set the returned value to and a holder object if pushCollationForDataValue() returns false. Otherwise three arguments, the third being the collationType. This implementation returns "getDataValue" to map to the overloaded methods DataValueFactory.getDataValue(type, dvd type) | |
| generateDataValue | back to summary |
|---|---|
| public void generateDataValue(MethodBuilder mb, int collationType, LocalField field) Implements org. The caller will have pushed a DataValueFactory and value of that can be converted to the correct type, e.g. int for a SQL INTEGER. Thus upon entry the stack looks like: ...,dvf,value If field is not null then it is used as the holder of the generated DataValueDescriptor to avoid object creations on multiple passes through this code. The field may contain null or a valid value. This method then sets up to call the required method on DataValueFactory using the dataValueMethodName(). The value left on the stack will be a DataValueDescriptor of the correct type: If the field contained a valid value then generated code will return that value rather than a newly created object. If field was not-null then the generated code will set the value of field to be the return from the DataValueFactory method call. Thus if the field was empty (set to null) when this code is executed it will contain the newly generated value, otherwise it will be reset to the same value. ...,dvd
| |
| generateNull | back to summary |
|---|---|
| public void generateNull(MethodBuilder mb, int collationType) Implements org. The caller will have pushed a DataValueFactory and a null or a value of the correct type (interfaceName()). Thus upon entry the stack looks like on of: ...,dvf,ref ...,dvf,null This method then sets up to call the required method on DataValueFactory using the nullMethodName(). The value left on the stack will be a DataValueDescriptor of the correct type: ...,dvd
| |
| getPrimitiveMethodName | back to summary |
|---|---|
| public String getPrimitiveMethodName() Implements org. Get the method name for getting out the corresponding primitive Java type.
| |
| getStoredFormatIdFromTypeId | back to summary |
|---|---|
| protected int getStoredFormatIdFromTypeId() Get the StoredFormatId from the corresponding TypeId.
| |
| getTypeCompiler | back to summary |
|---|---|
| protected TypeCompiler getTypeCompiler(TypeId typeId) Get the TypeCompiler that corresponds to the given TypeId. | |
| getTypeId | back to summary |
|---|---|
| protected TypeId getTypeId() Get the TypeId that corresponds to this TypeCompiler. | |
| nullMethodName | back to summary |
|---|---|
| pack-priv abstract String nullMethodName() Return the method name to get a Derby DataValueDescriptor object of the correct type set to SQL NULL. The method named will be called with one argument: a holder object if pushCollationForDataValue() returns false, otherwise two arguments, the second being the collationType. | |
| numberConvertible | back to summary |
|---|---|
| pack-priv boolean numberConvertible(TypeId otherType, boolean forDataTypeFunction) Tell whether this numeric type can be converted to the given type.
| |
| numberStorable | back to summary |
|---|---|
| pack-priv boolean numberStorable(TypeId thisType, TypeId otherType, ClassFactory cf) Tell whether this numeric type can be stored into from the given type.
| |
| pushCollationForDataValue | back to summary |
|---|---|
| pack-priv boolean pushCollationForDataValue(int collationType) Return true if the collationType is to be passed to the methods generated by generateNull and generateDataValue.
| |
| resolveArithmeticOperation | back to summary |
|---|---|
| public DataTypeDescriptor resolveArithmeticOperation(DataTypeDescriptor leftType, DataTypeDescriptor rightType, String operator) throws StandardException Implements org. Doc from org. Type resolution methods on binary operators
| |
| setTypeId | back to summary |
|---|---|
| pack-priv void setTypeId(TypeId typeId) Set the TypeCompiler that corresponds to the given TypeId. | |
| userTypeStorable | back to summary |
|---|---|
| protected boolean userTypeStorable(TypeId thisType, TypeId otherType, ClassFactory cf) Determine whether thisType is storable in otherType due to otherType being a user type. | |