T - The type of POJO represented by this classpublic abstract class UDTClassInfoImpl<T> extends ClassInfoImpl<T> implements CQLDataType
UDTClassInfoImpl class provides information about a
particular POJO class.| Modifier and Type | Class and Description |
|---|---|
class |
UDTClassInfoImpl.POJOContext
The
POJOContext class provides a specific context for the POJO
as referenced while building an insert or update statement. |
ClassInfoImpl.Contextclazz, constructor, entityAnnotationClass, finalFields, keyspaceKeysByName, keyspaceKeysByType, mgr| Modifier | Constructor and Description |
|---|---|
protected |
UDTClassInfoImpl(StatementManagerImpl mgr,
Class<T> clazz,
Class<? extends Annotation> entityAnnotationClass)
Instantiates a new
UDTClassInfoImpl object. |
protected |
UDTClassInfoImpl(UDTClassInfoImpl<T> cinfo,
Class<T> clazz)
Instantiates a new
UDTClassInfoImpl object. |
| Modifier and Type | Method and Description |
|---|---|
List<CQLDataType> |
getArgumentTypes() |
protected com.datastax.driver.core.TypeCodec<T> |
getCodec(com.google.common.reflect.TypeToken<T> token,
com.datastax.driver.core.CodecRegistry codecRegistry)
Gets a codec for this user data type.
|
com.datastax.driver.core.DataType |
getDataType() |
CQLDataType |
getElementType() |
CQLDataType |
getFirstArgumentType() |
CQLDataType |
getMainType() |
String |
getName()
Gets a name representation for this data type.
|
int |
getNumTables() |
T |
getObject(com.datastax.driver.core.Row row,
Map<String,Object> kkeys)
Converts the specified result row into a POJO object defined by this
class information and keyspace key map.
|
T |
getObject(com.datastax.driver.core.UDTValue uval)
Converts the specified UDT value into a POJO object defined by this
class information.
|
TableInfoImpl<T> |
getTableImpl()
Gets the fake table info defined by the user-defined POJO.
|
TableInfoImpl<T> |
getTableImpl(String name)
Gets the table info corresponding to the given table name.
|
Collection<TableInfo<T>> |
getTables() |
protected Collection<TableInfoImpl<T>> |
getTablesImpl()
Gets the tables info defined by the POJO.
|
com.datastax.driver.core.UDTValue |
getUDTValue(T object,
com.datastax.driver.core.CodecRegistry codecRegistry)
Gets a
UDTValue corresponding to the given object based on this
user defined type class information. |
boolean |
isAlterableTo(CQLDataType to) |
boolean |
isCollection() |
boolean |
isFrozen() |
boolean |
isTuple() |
boolean |
isUserDefined() |
String |
name() |
UDTClassInfoImpl.POJOContext |
newContext(T object)
Creates a new context for this class info with the given POJO object.
|
boolean |
supportsTablesAndIndexes() |
java.util.stream.Stream<TableInfo<T>> |
tables() |
String |
toCQL() |
String |
toString() |
classInfos, equals, getAuditTable, getColumns, getDefaultValue, getEntityAnnotationClass, getInitialObjects, getKeyspace, getKeyspaceKey, getKeyspaceKeyByType, getKeyspaceKeys, getKeyspaceKeyTypes, getNumKeyspaceKeys, getObjectClass, getPrimaryTable, getTable, hashCode, isColumn, isKeyspaceKey, iterator, newContext, objectClasses, tablesImpl, udts, validateColumn, validateColumnAndValue, validateColumnOrKeyspaceKey, validateColumns, validateColumns, validateKeyspaceKeyclone, finalize, getClass, notify, notifyAll, wait, wait, waitforEach, spliteratorprotected UDTClassInfoImpl(StatementManagerImpl mgr, Class<T> clazz, Class<? extends Annotation> entityAnnotationClass)
UDTClassInfoImpl object.mgr - the non-null statement managerclazz - the class of POJO for which to get a class info object forentityAnnotationClass - the non-null entity annotation
class to compute fromNullPointerException - if clazz is nullIllegalArgumentException - if clazz doesn't represent
a valid POJO classprotected UDTClassInfoImpl(UDTClassInfoImpl<T> cinfo, Class<T> clazz)
UDTClassInfoImpl object.cinfo - the non-null class info to link toclazz - the class of POJO for which to get a class info object forNullPointerException - if clazz is nullIllegalArgumentException - if clazz doesn't represent
a valid POJO classprotected Collection<TableInfoImpl<T>> getTablesImpl()
getTablesImpl in class ClassInfoImpl<T>ClassInfoImpl.getTablesImpl()protected com.datastax.driver.core.TypeCodec<T> getCodec(com.google.common.reflect.TypeToken<T> token, com.datastax.driver.core.CodecRegistry codecRegistry)
token - the type to decode tocodecRegistry - the codec registry to use when finding codecspublic String name()
name in interface CQLDataTypeCQLDataType.name()public String getName()
null name representation for this data typepublic boolean isFrozen()
isFrozen in interface CQLDataTypeCQLDataType.isFrozen()public boolean isCollection()
isCollection in interface CQLDataTypeCQLDataType.isCollection()public boolean isTuple()
isTuple in interface CQLDataTypeCQLDataType.isTuple()public boolean isUserDefined()
isUserDefined in interface CQLDataTypeCQLDataType.isUserDefined()public com.datastax.driver.core.DataType getDataType()
getDataType in interface CQLDataTypeCQLDataType.getDataType()public CQLDataType getMainType()
getMainType in interface CQLDataTypeCQLDataType.getMainType()public CQLDataType getElementType()
getElementType in interface CQLDataTypeCQLDataType.getElementType()public List<CQLDataType> getArgumentTypes()
getArgumentTypes in interface CQLDataTypeCQLDataType.getArgumentTypes()public CQLDataType getFirstArgumentType()
getFirstArgumentType in interface CQLDataTypeCQLDataType.getFirstArgumentType()public boolean isAlterableTo(CQLDataType to)
isAlterableTo in interface CQLDataTypeCQLDataType.isAlterableTo(org.helenus.driver.persistence.CQLDataType)public String toCQL()
toCQL in interface CQLDataTypeCQLDataType.toCQL()public boolean supportsTablesAndIndexes()
supportsTablesAndIndexes in interface ClassInfo<T>supportsTablesAndIndexes in class ClassInfoImpl<T>ClassInfoImpl.supportsTablesAndIndexes()public TableInfoImpl<T> getTableImpl()
public java.util.stream.Stream<TableInfo<T>> tables()
tables in interface ClassInfo<T>tables in class ClassInfoImpl<T>ClassInfoImpl.tables()public TableInfoImpl<T> getTableImpl(String name)
getTableImpl in class ClassInfoImpl<T>name - the name of the table to getClassInfoImpl.getTableImpl(java.lang.String)public int getNumTables()
getNumTables in interface ClassInfo<T>getNumTables in class ClassInfoImpl<T>ClassInfoImpl.getNumTables()public Collection<TableInfo<T>> getTables()
getTables in interface ClassInfo<T>getTables in class ClassInfoImpl<T>ClassInfoImpl.getTables()public UDTClassInfoImpl.POJOContext newContext(T object)
newContext in class ClassInfoImpl<T>object - the POJO objectnull newly created context for this class infoClassInfoImpl.newContext(java.lang.Object)public T getObject(com.datastax.driver.core.Row row, Map<String,Object> kkeys)
getObject in class ClassInfoImpl<T>row - the result row to convert into a POJOkkeys - a map of keyspace key values to report back into the created
POJOClassInfoImpl.getObject(com.datastax.driver.core.Row, java.util.Map)public T getObject(com.datastax.driver.core.UDTValue uval)
getObject in class ClassInfoImpl<T>uval - the UDT value to convert into a POJOClassInfoImpl.getObject(com.datastax.driver.core.UDTValue)public com.datastax.driver.core.UDTValue getUDTValue(T object, com.datastax.driver.core.CodecRegistry codecRegistry)
UDTValue corresponding to the given object based on this
user defined type class information.object - the pojo object from which to retrieve the column valuescodecRegistry - the codec registry to use when finding codecsUDTValue corresponding to the specified pojoIllegalArgumentException - if the combination of fields and data types
is not supportedpublic String toString()
toString in class ClassInfoImpl<T>Object.toString()Copyright (C) 2015-2017 The Helenus Driver Project Authors.