public class UDTClassInfoImpl.POJOContext extends ClassInfoImpl.POJOContext
POJOContext class provides a specific context for the POJO
as referenced while building an insert or update statement.objectsuffixes| Constructor and Description |
|---|
POJOContext(T object)
Instantiates a new
POJOContext object. |
| Modifier and Type | Method and Description |
|---|---|
Pair<Object,CQLDataType> |
getColumnValue(CharSequence name)
Retrieves the specified column value from the POJO.
|
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()
Retrieves all columns and their values from the POJO.
|
Map<String,Pair<Object,CQLDataType>> |
getColumnValues(CharSequence... names)
Retrieves the specified columns and their values from the POJO.
|
Map<String,Pair<Object,CQLDataType>> |
getColumnValues(Iterable<CharSequence> names)
Retrieves the specified columns and their values from the POJO.
|
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.
|
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>> |
getMandatoryColumnValues()
Retrieves all mandatory columns and their values from the POJO.
|
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.
|
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.
|
protected void |
populateSuffixes(Map<String,FieldInfoImpl<T>> suffixFields)
Populates the suffixes defined in the given map from the POJO.
|
addSuffix, getColumnNonEncodedValue, getObject, getPrimaryKeyColumnValues, getSuffixKeyValuesaddSuffix, getClassInfo, getInitialObjects, getKeyspace, getObject, getObject, getObjectClasspublic POJOContext(T object)
POJOContext object.object - the POJO objectNullPointerException - if object is nullIllegalArgumentException - if object is not of the
appropriate classprotected final void populateSuffixes(Map<String,FieldInfoImpl<T>> suffixFields)
populateSuffixes in class ClassInfoImpl.POJOContextsuffixFields - the map of suffix fields from the POJO where to extract
the suffix valuesClassInfoImpl.POJOContext.populateSuffixes(java.util.Map)public Map<String,Pair<Object,CQLDataType>> getColumnValues()
null map of all column/value pairs for the POJOIllegalArgumentException - if a mandatory column is missing from the POJOColumnPersistenceException - if unable to persist a column's valuepublic final 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 final 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 final 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 final 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 final 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>> getMandatoryColumnValues()
null map of all mandatory column/value pairs
for the POJOIllegalArgumentException - if a column is missing from the POJOColumnPersistenceException - if unable to persist a column's valuepublic final 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 final 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(CharSequence name)
name - the name of the column to retrieveIllegalArgumentException - if the column name is not defined by the
POJO or is mandatory and missing from the POJOColumnPersistenceException - if unable to persist a column's valuepublic final 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(Iterable<CharSequence> names)
names - the names of the columns to retrievenull map of all requested column/value pairs
for the POJOIllegalArgumentException - if any of the column names are not defined
by the POJO or is mandatory and missing from the POJOColumnPersistenceException - if unable to persist a column's valuepublic final 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(CharSequence... names)
names - the names of the columns to retrievenull map of all requested column/value pairs
for the POJOIllegalArgumentException - if any of the column names are not defined
by the POJO or is mandatory and missing from the POJOColumnPersistenceException - if unable to persist a column's valuepublic final 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[])Copyright (C) 2015-2015 The Helenus Driver Project Authors.