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> |
suffixes
Holds the registered suffixes.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSuffix(String suffix,
Object value)
Adds a suffix 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 suffixesExcludedSuffixKeyException - if the context defines a suffix value
which is marked as excluded for a given suffix keypublic void addSuffix(String suffix, Object value)
suffix - the suffix namevalue - the suffix valueNullPointerException - if suffix or value
is nullIllegalArgumentException - if the POJO doesn't require the specified
suffix or if the value doesn't match the POJO's definition for the
specified suffixExcludedSuffixKeyException - if the specified suffix value is
marked as excluded the specified suffix 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-2015 The Helenus Driver Project Authors.