public class SqlComposedTypeFactory extends Object implements SqlTypeFactory
SqlMetaType instances.
It's used to combine the factory of the underlying stack (on top of which the SQL Processor works) and the custom
META types provided in the time of SqlProcessorLoader construction.| Modifier and Type | Field and Description |
|---|---|
private Map<Class<?>,SqlMetaType> |
classToTypeMap
The map between a Java class type and an internal type.
|
private Map<String,SqlMetaType> |
metaToTypeMap
The map between a String representation of an internal type and an internal type.
|
private SqlTypeFactory |
typeFactory
The factory of the underlying stack.
|
| Constructor and Description |
|---|
SqlComposedTypeFactory(SqlTypeFactory typeFactory)
Creates a new instance of this factory.
|
SqlComposedTypeFactory(SqlTypeFactory typeFactory,
List<SqlInternalType> customTypes)
Creates a new instance of this factory.
|
| Modifier and Type | Method and Description |
|---|---|
SqlMetaType[] |
getAllTypes()
Returns the collection of all the META types provided by this factory.
|
SqlMetaType |
getDefaultType()
Returns the default META type.
|
SqlMetaType |
getEnumIntegerType()
Returns the META type for the enumerations based on Integer internal type.
|
SqlMetaType |
getEnumStringType()
Returns the META type for the enumerations based on String internal type.
|
SqlMetaType |
getIdentityType()
Returns the META type for an auto-generated identity.
|
SqlMetaType |
getMetaType(Class<?> clazz)
Returns the META type, which can be used to handle input/output values of provided Java type.
|
SqlMetaType |
getMetaType(String name)
Returns the META type with the provided name.
|
private Map<Class<?>,SqlMetaType> classToTypeMap
private Map<String,SqlMetaType> metaToTypeMap
private SqlTypeFactory typeFactory
public SqlComposedTypeFactory(SqlTypeFactory typeFactory)
typeFactory - the factory of the underlying stackpublic SqlComposedTypeFactory(SqlTypeFactory typeFactory, List<SqlInternalType> customTypes)
typeFactory - the factory of the underlying stackcustomTypes - a collection of the custom META types provided by an userpublic SqlMetaType getDefaultType()
getDefaultType in interface SqlTypeFactorypublic SqlMetaType getEnumIntegerType()
getEnumIntegerType in interface SqlTypeFactorypublic SqlMetaType getEnumStringType()
getEnumStringType in interface SqlTypeFactorypublic SqlMetaType getIdentityType()
getIdentityType in interface SqlTypeFactorypublic SqlMetaType[] getAllTypes()
getAllTypes in interface SqlTypeFactorypublic SqlMetaType getMetaType(Class<?> clazz)
getMetaType in interface SqlTypeFactoryclazz - the input/output value Java typepublic SqlMetaType getMetaType(String name)
getMetaType in interface SqlTypeFactoryname - the name of the META SQL typeCopyright © 2014. All Rights Reserved.