public class ClassInfoImpl.Context extends Object implements StatementManager.Context<T>
Context class provides a specific context for the POJO
as referenced while building a statement.| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Object> |
keyspaceKeys
Holds the registered keyspace keys.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addKeyspaceKey(String name,
Object value)
Adds a keyspace key to the context for use in keyspace name creation.
|
ClassInfoImpl<T> |
getClassInfo()
Gets the class info for the POJO.
|
Collection<T> |
getInitialObjects()
Gets the initial objects to insert in a newly created table for this
entity based on this context.
|
String |
getKeyspace()
Gets the keyspace name associated with this context.
|
T |
getObject(com.datastax.driver.core.Row row) |
T |
getObject(com.datastax.driver.core.UDTValue uval)
Converts the specified UDT value into a POJO object defined by this
class information.
|
Class<T> |
getObjectClass() |
public Class<T> getObjectClass()
getObjectClass in interface StatementManager.Context<T>StatementManager.Context.getObjectClass()public ClassInfoImpl<T> getClassInfo()
null class info for the POJOpublic String getKeyspace()
null keyspace name associated with this
contextObjectNotFoundException - if unable to compute the keyspace name
based on provided keyspace keysExcludedKeyspaceKeyException - if the context defines a keyspace key value
which is marked as excluded for a given keyspace keypublic void addKeyspaceKey(String name, Object value)
name - the keyspace key namevalue - the keyspace key valueNullPointerException - if name or value
is nullIllegalArgumentException - if the POJO doesn't require the specified
keyspace key or if the value doesn't match the POJO's definition for the
specified keyspace keyExcludedKeyspaceKeyException - if the specified keyspace key value is
marked as excluded the specified keyspace keypublic T getObject(com.datastax.driver.core.Row row)
getObject in interface StatementManager.Context<T>StatementManager.Context.getObject(com.datastax.driver.core.Row)public T getObject(com.datastax.driver.core.UDTValue uval)
uval - the UDT value to convert into a POJOObjectConversionException - if unable to convert to a POJOpublic Collection<T> getInitialObjects()
null collection of the initial objects to insert
in the tableCopyright (C) 2015-2017 The Helenus Driver Project Authors.