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 |
|---|---|
protected void |
deregister(com.datastax.driver.core.UserType definition)
Deregisters the corresponding definition for this user data type.
|
List<CQLDataType> |
getArgumentTypes() |
protected UDTCodecImpl<T> |
getCodec(String keyspace)
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(String keyspace,
Map<String,String> values)
Converts the specified parsed values into a POJO object defined by this
class information.
|
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.UserType |
getUserType(String keyspace)
Gets the corresponding default Cassandra user type.
|
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.
|
T |
newObject()
Instantiates a new blank object.
|
protected void |
register(com.datastax.driver.core.UserType definition)
Registers a new cluster-defined definition for this user data type.
|
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 UDTCodecImpl<T> getCodec(String keyspace)
keyspace - the keyspace for which to get a codecprotected void register(com.datastax.driver.core.UserType definition)
definition - the new user definition for this the user type to registerprotected void deregister(com.datastax.driver.core.UserType definition)
definition - the definition for the user type to deregisterpublic 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.UserType getUserType(String keyspace)
keyspace - the keyspace for which to get a user typenull corresponding Cassandra user typepublic 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 newObject()
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 T getObject(String keyspace, Map<String,String> values)
keyspace - the keyspace for which to create the objectvalues - the formated values to convert into a POJOObjectConversionException - if unable to convert to a POJOpublic String toString()
toString in class ClassInfoImpl<T>Object.toString()Copyright (C) 2015-2017 The Helenus Driver Project Authors.