Package io.ebeaninternal.server.type
Class EnumToDbIntegerMap
- java.lang.Object
-
- io.ebeaninternal.server.type.EnumToDbValueMap<Integer>
-
- io.ebeaninternal.server.type.EnumToDbIntegerMap
-
public class EnumToDbIntegerMap extends EnumToDbValueMap<Integer>
Used to map enum values to database integer values.
-
-
Constructor Summary
Constructors Constructor Description EnumToDbIntegerMap()
Construct with allowNulls defaulting to false and integerType=trueEnumToDbIntegerMap(boolean allowNulls)
Construct with integerType=true
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Object beanValue, Integer dbValue, String name)
EnumToDbIntegerMap
add(Object beanValue, String stringDbValue, String name)
Add name value pair where the dbValue is the raw string and may need to be converted (to an Integer for example).void
bind(DataBind b, Object value)
Bind using the correct database type.int
getDbType()
Return the database type.Object
read(DataReader dataReader)
Read using the correct database type.-
Methods inherited from class io.ebeaninternal.server.type.EnumToDbValueMap
create, dbValues, getBeanValue, getDbValue, isIntegerType
-
-
-
-
Constructor Detail
-
EnumToDbIntegerMap
public EnumToDbIntegerMap()
Construct with allowNulls defaulting to false and integerType=true
-
EnumToDbIntegerMap
public EnumToDbIntegerMap(boolean allowNulls)
Construct with integerType=true
-
-
Method Detail
-
getDbType
public int getDbType()
Description copied from class:EnumToDbValueMap
Return the database type.- Specified by:
getDbType
in classEnumToDbValueMap<Integer>
-
add
public EnumToDbIntegerMap add(Object beanValue, String stringDbValue, String name)
Description copied from class:EnumToDbValueMap
Add name value pair where the dbValue is the raw string and may need to be converted (to an Integer for example).- Specified by:
add
in classEnumToDbValueMap<Integer>
-
bind
public void bind(DataBind b, Object value) throws SQLException
Description copied from class:EnumToDbValueMap
Bind using the correct database type.- Specified by:
bind
in classEnumToDbValueMap<Integer>
- Throws:
SQLException
-
read
public Object read(DataReader dataReader) throws SQLException
Description copied from class:EnumToDbValueMap
Read using the correct database type.- Specified by:
read
in classEnumToDbValueMap<Integer>
- Throws:
SQLException
-
-