public class RootClassInfoImpl.POJOContext extends ClassInfoImpl.POJOContext
POJOContext class extends the
ClassInfoImpl.POJOContext.objectsuffixes| Constructor and Description |
|---|
POJOContext(T object)
Instantiates a new
POJOContext object. |
| Modifier and Type | Method and Description |
|---|---|
void |
addSuffix(String suffix,
Object value)
Adds a suffix to the context for use in keyspace name creation.
|
Pair<Object,CQLDataType> |
getColumnValue(String tname,
CharSequence name)
Retrieves the specified column value from the POJO and the specified
table.
|
Map<String,Pair<Object,CQLDataType>> |
getColumnValues(String tname)
Retrieves all columns and their values from the POJO and the specified
table.
|
Map<String,Pair<Object,CQLDataType>> |
getColumnValues(String tname,
CharSequence... names)
Retrieves the specified columns and their values from the POJO and the
specified table.
|
Map<String,Pair<Object,CQLDataType>> |
getColumnValues(String tname,
Iterable<CharSequence> names)
Retrieves the specified columns and their values from the POJO and the
specified table.
|
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.
|
Map<String,Pair<Object,CQLDataType>> |
getMandatoryAndPrimaryKeyColumnValues(String tname)
Retrieves all mandatory and primary key columns and their values from
the POJO and the specified table.
|
Map<String,Pair<Object,CQLDataType>> |
getNonPrimaryKeyColumnNonEncodedValues(String tname)
Retrieves all non primary key columns and their non-encoded values from
the POJO from the specified table.
|
T |
getObject(com.datastax.driver.core.Row row) |
Map<String,Pair<Object,CQLDataType>> |
getPartitionKeyColumnValues(String tname)
Retrieves all partition key columns and their values from the POJO and the
specified table.
|
Map<String,Pair<Object,CQLDataType>> |
getPrimaryKeyColumnValues(String tname)
Retrieves all primary key columns and their values from the POJO and the
specified table.
|
Map<String,Pair<Object,CQLDataType>> |
getSuffixAndPartitionKeyColumnValues(String tname)
Retrieves all suffix and partition key columns and their values from the
POJO and the specified table.
|
Map<String,Pair<Object,CQLDataType>> |
getSuffixAndPrimaryKeyColumnValues(String tname)
Retrieves all suffix and primary key columns and their values from the
POJO and the specified table.
|
Map<String,Pair<Object,CQLDataType>> |
getSuffixKeyValues()
Retrieves all suffix keys and their values from the POJO.
|
addSuffix, getColumnNonEncodedValue, getObject, getPrimaryKeyColumnValues, populateSuffixesgetClassInfo, getObject, getObjectClasspublic POJOContext(T object)
POJOContext object.object - the POJO objectNullPointerException - if object is nullIllegalArgumentException - if object is not of the
appropriate classpublic Map<String,Pair<Object,CQLDataType>> getColumnValues(String tname)
getColumnValues in class ClassInfoImpl.POJOContexttname - the name of the table from which to retrieve columnsnull map of all column/value pairs for the POJOClassInfoImpl.POJOContext.getColumnValues(java.lang.String)public Map<String,Pair<Object,CQLDataType>> getPartitionKeyColumnValues(String tname)
getPartitionKeyColumnValues in class ClassInfoImpl.POJOContexttname - the name of the table from which to retrieve columnsnull map of all partition key column/value pairs
for the POJOClassInfoImpl.POJOContext.getPartitionKeyColumnValues(java.lang.String)public Map<String,Pair<Object,CQLDataType>> getSuffixAndPartitionKeyColumnValues(String tname)
getSuffixAndPartitionKeyColumnValues in class ClassInfoImpl.POJOContexttname - the name of the table from which to retrieve columnsnull map of all suffix key and partition key
column/value pairs for the POJOClassInfoImpl.POJOContext.getSuffixAndPartitionKeyColumnValues(java.lang.String)public Map<String,Pair<Object,CQLDataType>> getPrimaryKeyColumnValues(String tname)
getPrimaryKeyColumnValues in class ClassInfoImpl.POJOContexttname - the name of the table from which to retrieve columnsnull map of all primary key column/value pairs
for the POJOClassInfoImpl.POJOContext.getPrimaryKeyColumnValues(java.lang.String)public Map<String,Pair<Object,CQLDataType>> getSuffixKeyValues()
getSuffixKeyValues in class ClassInfoImpl.POJOContextnull map of all suffix key name/value pairs
for the POJOClassInfoImpl.POJOContext.getSuffixKeyValues()public Map<String,Pair<Object,CQLDataType>> getSuffixAndPrimaryKeyColumnValues(String tname)
getSuffixAndPrimaryKeyColumnValues in class ClassInfoImpl.POJOContexttname - the name of the table from which to retrieve columnsnull map of all suffix key and primary key
column/value pairs for the POJOClassInfoImpl.POJOContext.getSuffixAndPrimaryKeyColumnValues(java.lang.String)public Map<String,Pair<Object,CQLDataType>> getMandatoryAndPrimaryKeyColumnValues(String tname)
getMandatoryAndPrimaryKeyColumnValues in class ClassInfoImpl.POJOContexttname - the name of the table from which to retrieve columnsnull map of all mandatory and primary key
column/value pairs for the POJOClassInfoImpl.POJOContext.getMandatoryAndPrimaryKeyColumnValues(java.lang.String)public Map<String,Pair<Object,CQLDataType>> getNonPrimaryKeyColumnNonEncodedValues(String tname)
Note: The returned values should not be encoded.
getNonPrimaryKeyColumnNonEncodedValues in class ClassInfoImpl.POJOContexttname - the name of the table from which to retrieve columnsnull map of all non primary key column/value
(non-encoded) pairs for the POJOClassInfoImpl.POJOContext.getNonPrimaryKeyColumnNonEncodedValues(java.lang.String)public Pair<Object,CQLDataType> getColumnValue(String tname, CharSequence name)
getColumnValue in class ClassInfoImpl.POJOContexttname - the name of the table from which to retrieve the columnname - the name of the column to retrieveClassInfoImpl.POJOContext.getColumnValue(java.lang.String, java.lang.CharSequence)public Map<String,Pair<Object,CQLDataType>> getColumnValues(String tname, Iterable<CharSequence> names)
getColumnValues in class ClassInfoImpl.POJOContexttname - the name of the table from which to retrieve the columnnames - the names of the columns to retrievenull map of all requested column/value pairs
for the POJOClassInfoImpl.POJOContext.getColumnValues(java.lang.String, java.lang.Iterable)public Map<String,Pair<Object,CQLDataType>> getColumnValues(String tname, CharSequence... names)
getColumnValues in class ClassInfoImpl.POJOContexttname - the name of the table from which to retrieve the columnnames - the names of the columns to retrievenull map of all requested column/value pairs
for the POJOClassInfoImpl.POJOContext.getColumnValues(java.lang.String, java.lang.CharSequence[])public String getKeyspace()
getKeyspace in class ClassInfoImpl.Contextnull keyspace name associated with this
contextClassInfoImpl.Context.getKeyspace()public void addSuffix(String suffix, Object value)
addSuffix in class ClassInfoImpl.Contextsuffix - the suffix namevalue - the suffix valueClassInfoImpl.Context.addSuffix(java.lang.String, java.lang.Object)public T getObject(com.datastax.driver.core.Row row)
getObject in interface StatementManager.Context<T>getObject in class ClassInfoImpl.ContextClassInfoImpl.Context.getObject(com.datastax.driver.core.Row)public Collection<T> getInitialObjects()
getInitialObjects in class ClassInfoImpl.Contextnull collection of the initial objects to insert
in the tableClassInfoImpl.Context.getInitialObjects()Copyright (C) 2015-2015 The Helenus Driver Project Authors.