java.lang.Object
io.ebeaninternal.server.type.DefaultTypeManager
- All Implemented Interfaces:
TypeManager
Default implementation of TypeManager.
Manages the list of ScalarType that is available.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultTypeManager(DatabaseBuilder.Settings config, BootupClasses bootupClasses) Create the DefaultTypeManager. -
Method Summary
Modifier and TypeMethodDescriptionConvert the Object to the required datatype.ScalarType<?> dbArrayType(Class<?> type, Type genericType, boolean nullable) Return the ScalarType used to handle DB ARRAY.ScalarType<?> dbJsonType(DeployBeanProperty prop, int dbType, int dbLength) Return the ScalarType used to handle JSON content.ScalarType<?> Return the ScalarType used to handle HSTORE (Mapinvalid input: '<'String,String>).ScalarType<?> Create a ScalarType for an Enum that has additional mapping.Return the Geometry type binder if provided.ScalarType<?> type(int jdbcType) Return the ScalarType for the given jdbc type as per java.sql.Types.ScalarType<?> This can return null if no matching ScalarType is found.ScalarType<?> Return a ScalarType for a given class.ScalarType<?> Find and return the ScalarType taking into account the property type with generics.ScalarType<?> Return the scalar type for the given logical type.
-
Constructor Details
-
DefaultTypeManager
Create the DefaultTypeManager.
-
-
Method Details
-
type
Description copied from interface:TypeManagerReturn the scalar type for the given logical type.- Specified by:
typein interfaceTypeManager
-
type
Return the ScalarType for the given jdbc type as per java.sql.Types.- Specified by:
typein interfaceTypeManager- Parameters:
jdbcType- as per java.sql.Types
-
type
Description copied from interface:TypeManagerFind and return the ScalarType taking into account the property type with generics.For example Array based ScalarType for types like
List<String>.- Specified by:
typein interfaceTypeManager
-
type
This can return null if no matching ScalarType is found.- Specified by:
typein interfaceTypeManager
-
geoTypeBinder
Description copied from interface:TypeManagerReturn the Geometry type binder if provided.- Specified by:
geoTypeBinderin interfaceTypeManager
-
dbMapType
Description copied from interface:TypeManagerReturn the ScalarType used to handle HSTORE (Mapinvalid input: '<'String,String>).- Specified by:
dbMapTypein interfaceTypeManager
-
dbArrayType
Description copied from interface:TypeManagerReturn the ScalarType used to handle DB ARRAY.- Specified by:
dbArrayTypein interfaceTypeManager
-
dbJsonType
Description copied from interface:TypeManagerReturn the ScalarType used to handle JSON content.Note that type expected to be JsonNode or Map.
- Specified by:
dbJsonTypein interfaceTypeManager
-
type
Return a ScalarType for a given class.Used for java.util.Date and java.util.Calendar which can be mapped to different jdbcTypes in a single system.
- Specified by:
typein interfaceTypeManager
-
convert
Convert the Object to the required datatype. The- Parameters:
value- the Object valuetoJdbcType- the type as per java.sql.Types.
-
enumType
Create a ScalarType for an Enum that has additional mapping.The reason for this is that often in a DB there will be short codes used such as A,I,N rather than the ACTIVE, INACTIVE, NEW. So there really needs to be a mapping from the nicely named enumeration values to the typically much shorter codes used in the DB.
- Specified by:
enumTypein interfaceTypeManager
-