public abstract class AmberType
extends java.lang.Object
Constructor and Description |
---|
AmberType() |
Modifier and Type | Method and Description |
---|---|
EntityItem |
findItem(AmberConnection aConn,
java.sql.ResultSet rs,
int index)
Finds the object
|
java.lang.String |
fromObject(java.lang.String value)
Converts from an object.
|
java.lang.String |
generateCastFromObject(java.lang.String value)
Converts the value.
|
java.lang.String |
generateCreateColumnSQL(AmberPersistenceUnit manager,
int length,
int precision,
int scale)
Generates the type for the table.
|
java.lang.String |
generateEquals(java.lang.String a,
java.lang.String b)
Returns a boolean equality.
|
java.lang.String |
generateIncrementVersion(java.lang.String value)
Generates the increment version.
|
java.lang.String |
generateIsNull(java.lang.String value)
Returns a test for null.
|
int |
generateLoad(JavaWriter out,
java.lang.String rs,
java.lang.String indexVar,
int index)
Generates a string to load the type as a property.
|
int |
generateLoad(JavaWriter out,
java.lang.String rs,
java.lang.String indexVar,
int index,
java.lang.Class targetType)
Generates a string to load the type as a property.
|
int |
generateLoadForeign(JavaWriter out,
java.lang.String rs,
java.lang.String indexVar,
int index)
Generates a string to load the type as a property.
|
int |
generateLoadNative(JavaWriter out,
int index)
Generates a string to load the type as a property.
|
java.lang.String |
generateNull()
Returns a test for null.
|
void |
generateSet(JavaWriter out,
java.lang.String pstmt,
java.lang.String index,
java.lang.String value)
Generates a string to set the type as a property.
|
void |
generateSetNull(JavaWriter out,
java.lang.String pstmt,
java.lang.String index)
Generates a string to set the property.
|
void |
generateSetVersion(JavaWriter out,
java.lang.String pstmt,
java.lang.String index,
java.lang.String value)
Generates a string to set the type as a property.
|
int |
getColumnCount()
Returns the number of columns the type takes up.
|
AmberType |
getForeignType()
Returns the type as a foreign key.
|
java.lang.String |
getForeignTypeName()
Returns the java class of the type as a foreign key.
|
java.lang.String |
getJavaTypeName()
Returns the java type.
|
abstract java.lang.String |
getName()
Returns the type name.
|
java.lang.Object |
getObject(AmberConnection aConn,
java.sql.ResultSet rs,
int index)
Gets the value.
|
java.lang.Object |
getObject(java.sql.ResultSet rs,
int index)
Gets the value.
|
void |
init()
Initialize the type.
|
boolean |
isAssignableTo(java.lang.Class javaType)
Returns true if the value is assignable to the Java type.
|
boolean |
isAutoIncrement()
Returns true for an auto-increment type.
|
boolean |
isBoolean()
Returns true for a boolean type.
|
boolean |
isNumeric()
Returns true for a numeric type.
|
void |
setParameter(java.sql.PreparedStatement pstmt,
int index,
java.lang.Object value)
Sets the value.
|
java.lang.Object |
toObject(long value)
Converts to an object.
|
java.lang.String |
toObject(java.lang.String value)
Converts to an object.
|
public abstract java.lang.String getName()
public boolean isBoolean()
public boolean isNumeric()
public java.lang.String getJavaTypeName()
public int getColumnCount()
public void init() throws ConfigException
ConfigException
public AmberType getForeignType()
public java.lang.String getForeignTypeName()
public boolean isAssignableTo(java.lang.Class javaType)
public java.lang.String generateCreateColumnSQL(AmberPersistenceUnit manager, int length, int precision, int scale)
public int generateLoad(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index) throws java.io.IOException
java.io.IOException
public int generateLoadNative(JavaWriter out, int index) throws java.io.IOException
java.io.IOException
public int generateLoad(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index, java.lang.Class targetType) throws java.io.IOException
java.io.IOException
public int generateLoadForeign(JavaWriter out, java.lang.String rs, java.lang.String indexVar, int index) throws java.io.IOException
java.io.IOException
public void generateSet(JavaWriter out, java.lang.String pstmt, java.lang.String index, java.lang.String value) throws java.io.IOException
java.io.IOException
public void generateSetVersion(JavaWriter out, java.lang.String pstmt, java.lang.String index, java.lang.String value) throws java.io.IOException
java.io.IOException
public java.lang.String generateIncrementVersion(java.lang.String value) throws java.io.IOException
java.io.IOException
public void generateSetNull(JavaWriter out, java.lang.String pstmt, java.lang.String index) throws java.io.IOException
java.io.IOException
public void setParameter(java.sql.PreparedStatement pstmt, int index, java.lang.Object value) throws java.sql.SQLException
java.sql.SQLException
public java.lang.Object getObject(java.sql.ResultSet rs, int index) throws java.sql.SQLException
java.sql.SQLException
public EntityItem findItem(AmberConnection aConn, java.sql.ResultSet rs, int index) throws java.sql.SQLException
java.sql.SQLException
public java.lang.Object getObject(AmberConnection aConn, java.sql.ResultSet rs, int index) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String toObject(java.lang.String value)
public java.lang.String fromObject(java.lang.String value)
public java.lang.Object toObject(long value)
public java.lang.String generateCastFromObject(java.lang.String value)
public java.lang.String generateEquals(java.lang.String a, java.lang.String b)
public java.lang.String generateIsNull(java.lang.String value)
public java.lang.String generateNull()
public boolean isAutoIncrement()