| java.lang.Object com.caucho.amber.type.Type
All known Subclasses: com.caucho.amber.type.ObjectType, com.caucho.amber.type.PrimitiveByteArrayType, com.caucho.amber.type.YesNoType, com.caucho.amber.type.BlobType, com.caucho.amber.type.ArrayType, com.caucho.amber.type.ByteType, com.caucho.amber.type.IntegerType, com.caucho.amber.type.SqlDateType, com.caucho.amber.type.StringType, com.caucho.amber.type.GeneratorTableType, com.caucho.amber.type.LongType, com.caucho.amber.type.SqlTimeType, com.caucho.amber.type.FloatType, com.caucho.amber.type.SqlTimestampType, com.caucho.amber.type.UtilDateType, com.caucho.amber.type.BigDecimalType, com.caucho.amber.type.Primitive, com.caucho.amber.type.CalendarType, com.caucho.amber.type.ClassType, com.caucho.amber.type.PrimitiveType, com.caucho.amber.type.DoubleType, com.caucho.amber.type.PrimitiveCharArrayType, com.caucho.amber.type.BooleanType, com.caucho.amber.type.ShortType, com.caucho.amber.type.TrueFalseType, com.caucho.amber.type.EnumType, com.caucho.amber.type.AbstractEnhancedType, com.caucho.amber.type.ClobType, com.caucho.amber.type.CharacterType, com.caucho.amber.type.BigIntegerType,
Type | abstract public class Type (Code) | | The type of a property.
|
Method Summary | |
public EntityItem | findItem(AmberConnection aConn, ResultSet rs, int index) | public String | fromObject(String value) Converts from an object. | public String | generateCastFromObject(String value) Converts the value. | public String | generateCreateColumnSQL(AmberPersistenceUnit manager, int length, int precision, int scale) Generates the type for the table. | public String | generateEquals(String a, String b) Returns a boolean equality. | public String | generateIncrementVersion(String value) Generates the increment version. | public String | generateIsNull(String value) Returns a test for null. | public int | generateLoad(JavaWriter out, String rs, String indexVar, int index) Generates a string to load the type as a property. | public int | generateLoad(JavaWriter out, String rs, String indexVar, int index, JClass targetType) Generates a string to load the type as a property. | public int | generateLoadForeign(JavaWriter out, String rs, String indexVar, int index) Generates a string to load the type as a property. | public String | generateNull() Returns a test for null. | public void | generateSet(JavaWriter out, String pstmt, String index, String value) Generates a string to set the type as a property. | public void | generateSetNull(JavaWriter out, String pstmt, String index) Generates a string to set the property. | public void | generateSetVersion(JavaWriter out, String pstmt, String index, String value) Generates a string to set the type as a property. | public int | getColumnCount() Returns the number of columns the type takes up. | public Type | getForeignType() Returns the type as a foreign key. | public String | getForeignTypeName() Returns the java class of the type as a foreign key. | public String | getJavaTypeName() Returns the java type. | abstract public String | getName() Returns the type name. | public Object | getObject(ResultSet rs, int index) Gets the value. | public Object | getObject(AmberConnection aConn, ResultSet rs, int index) Gets the value. | public void | init() Initialize the type. | public boolean | isAssignableTo(JClass javaType) Returns true if the value is assignable to the Java type. | public boolean | isAutoIncrement() Returns true for an auto-increment type. | public boolean | isBoolean() Returns true for a boolean type. | public boolean | isNumeric() Returns true for a numeric type. | public void | setParameter(PreparedStatement pstmt, int index, Object value) Sets the value. | public String | toObject(String value) Converts to an object. | public Object | toObject(long value) Converts to an object. |
generateCastFromObject | public String generateCastFromObject(String value)(Code) | | Converts the value.
|
generateCreateColumnSQL | public String generateCreateColumnSQL(AmberPersistenceUnit manager, int length, int precision, int scale)(Code) | | Generates the type for the table.
|
generateNull | public String generateNull()(Code) | | Returns a test for null.
|
getColumnCount | public int getColumnCount()(Code) | | Returns the number of columns the type takes up.
|
getForeignType | public Type getForeignType()(Code) | | Returns the type as a foreign key.
|
getForeignTypeName | public String getForeignTypeName()(Code) | | Returns the java class of the type as a foreign key.
|
getJavaTypeName | public String getJavaTypeName()(Code) | | Returns the java type.
|
getName | abstract public String getName()(Code) | | Returns the type name.
|
init | public void init() throws ConfigException(Code) | | Initialize the type.
|
isAssignableTo | public boolean isAssignableTo(JClass javaType)(Code) | | Returns true if the value is assignable to the Java type.
|
isAutoIncrement | public boolean isAutoIncrement()(Code) | | Returns true for an auto-increment type.
|
isBoolean | public boolean isBoolean()(Code) | | Returns true for a boolean type.
|
isNumeric | public boolean isNumeric()(Code) | | Returns true for a numeric type.
|
toObject | public Object toObject(long value)(Code) | | Converts to an object.
|
|
|