| java.lang.Object com.caucho.amber.type.Type com.caucho.amber.type.EnumType
EnumType | public class EnumType extends Type (Code) | | The enum type.
|
Method Summary | |
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 int | generateLoad(JavaWriter out, String rs, String indexVar, int index) Generates a string to load the property. | public int | generateLoadForeign(JavaWriter out, String rs, String indexVar, int index) Generates a string to load the property. | public void | generateSet(JavaWriter out, String pstmt, String index, String value) Generates a string to set the property. | public JClass | getBeanClass() Gets the bean class. | public Type | getForeignType() Returns the type as a foreign key. | public String | getName() Returns the type name. | public Object | getObject(ResultSet rs, int index) Gets the value. | public boolean | isNumeric() Returns true for a numeric type. | public boolean | isOrdinal() | public void | setBeanClass(JClass beanClass) Sets the bean class. | public void | setName(String name) Sets the name. | public void | setOrdinal(boolean isOrdinal) | public void | setParameter(PreparedStatement pstmt, int index, Object value) Sets the value. | public static Object | toEnum(int ordinal, boolean wasNull, Object values) Converts a value to a enum. | public static Object | toEnum(String name, boolean wasNull, Class cl) Converts a value to a enum. | public String | toObject(String value) Converts to an object. | public Object | toObject(long value) Converts to an object. |
EnumType | public EnumType()(Code) | | |
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.
|
getBeanClass | public JClass getBeanClass()(Code) | | Gets the bean class.
|
getForeignType | public Type getForeignType()(Code) | | Returns the type as a foreign key.
|
isNumeric | public boolean isNumeric()(Code) | | Returns true for a numeric type.
|
isOrdinal | public boolean isOrdinal()(Code) | | Returns true for ordinal
|
setBeanClass | public void setBeanClass(JClass beanClass)(Code) | | Sets the bean class.
|
setName | public void setName(String name)(Code) | | Sets the name.
|
setOrdinal | public void setOrdinal(boolean isOrdinal)(Code) | | Sets true for ordinal
|
toEnum | public static Object toEnum(int ordinal, boolean wasNull, Object values)(Code) | | Converts a value to a enum.
|
toObject | public Object toObject(long value)(Code) | | Converts to an object.
|
Methods inherited from com.caucho.amber.type.Type | public EntityItem findItem(AmberConnection aConn, ResultSet rs, int index) throws SQLException(Code)(Java Doc) public String fromObject(String value)(Code)(Java Doc) public String generateCastFromObject(String value)(Code)(Java Doc) public String generateCreateColumnSQL(AmberPersistenceUnit manager, int length, int precision, int scale)(Code)(Java Doc) public String generateEquals(String a, String b)(Code)(Java Doc) public String generateIncrementVersion(String value) throws IOException(Code)(Java Doc) public String generateIsNull(String value)(Code)(Java Doc) public int generateLoad(JavaWriter out, String rs, String indexVar, int index) throws IOException(Code)(Java Doc) public int generateLoad(JavaWriter out, String rs, String indexVar, int index, JClass targetType) throws IOException(Code)(Java Doc) public int generateLoadForeign(JavaWriter out, String rs, String indexVar, int index) throws IOException(Code)(Java Doc) public String generateNull()(Code)(Java Doc) public void generateSet(JavaWriter out, String pstmt, String index, String value) throws IOException(Code)(Java Doc) public void generateSetNull(JavaWriter out, String pstmt, String index) throws IOException(Code)(Java Doc) public void generateSetVersion(JavaWriter out, String pstmt, String index, String value) throws IOException(Code)(Java Doc) public int getColumnCount()(Code)(Java Doc) public Type getForeignType()(Code)(Java Doc) public String getForeignTypeName()(Code)(Java Doc) public String getJavaTypeName()(Code)(Java Doc) abstract public String getName()(Code)(Java Doc) public Object getObject(ResultSet rs, int index) throws SQLException(Code)(Java Doc) public Object getObject(AmberConnection aConn, ResultSet rs, int index) throws SQLException(Code)(Java Doc) public void init() throws ConfigException(Code)(Java Doc) public boolean isAssignableTo(JClass javaType)(Code)(Java Doc) public boolean isAutoIncrement()(Code)(Java Doc) public boolean isBoolean()(Code)(Java Doc) public boolean isNumeric()(Code)(Java Doc) public void setParameter(PreparedStatement pstmt, int index, Object value) throws SQLException(Code)(Java Doc) public String toObject(String value)(Code)(Java Doc) public Object toObject(long value)(Code)(Java Doc)
|
|
|