Package io.ebeaninternal.server.type
Class DefaultTypeFactory
- java.lang.Object
-
- io.ebeaninternal.server.type.DefaultTypeFactory
-
public class DefaultTypeFactory extends Object
Helper to create some default ScalarType objects for Booleans, java.util.Date, java.util.Calendar etc.
-
-
Constructor Summary
Constructors Constructor Description DefaultTypeFactory(ServerConfig serverConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScalarTypeBool
createBoolean()
Create the ScalarType for mapping Booleans.ScalarType<Calendar>
createCalendar(JsonConfig.DateTime mode)
Create the default ScalarType for java.util.Calendar.ScalarType<Calendar>
createCalendar(JsonConfig.DateTime mode, int jdbcType)
Create a ScalarType for java.util.Calendar explicitly specifying the type to map to.ScalarType<BigInteger>
createMathBigInteger()
Create a ScalarType for java.math.BigInteger.ScalarType<Date>
createUtilDate(JsonConfig.DateTime mode, JsonConfig.Date jsonDate)
Create the default ScalarType for java.util.Date.ScalarType<Date>
createUtilDate(JsonConfig.DateTime jsonDateTime, JsonConfig.Date jsonDate, int utilDateType)
Create a ScalarType for java.util.Date explicitly specifying the type to map to.
-
-
-
Constructor Detail
-
DefaultTypeFactory
public DefaultTypeFactory(ServerConfig serverConfig)
-
-
Method Detail
-
createBoolean
public ScalarTypeBool createBoolean()
Create the ScalarType for mapping Booleans. For some databases this is a native data type and for others Booleans will be converted to Y/N or 0/1 etc.
-
createUtilDate
public ScalarType<Date> createUtilDate(JsonConfig.DateTime mode, JsonConfig.Date jsonDate)
Create the default ScalarType for java.util.Date.
-
createUtilDate
public ScalarType<Date> createUtilDate(JsonConfig.DateTime jsonDateTime, JsonConfig.Date jsonDate, int utilDateType)
Create a ScalarType for java.util.Date explicitly specifying the type to map to.
-
createCalendar
public ScalarType<Calendar> createCalendar(JsonConfig.DateTime mode)
Create the default ScalarType for java.util.Calendar.
-
createCalendar
public ScalarType<Calendar> createCalendar(JsonConfig.DateTime mode, int jdbcType)
Create a ScalarType for java.util.Calendar explicitly specifying the type to map to.
-
createMathBigInteger
public ScalarType<BigInteger> createMathBigInteger()
Create a ScalarType for java.math.BigInteger.
-
-