public abstract class PersistenceSettings extends Object implements Serializable
Constructor and Description |
---|
PersistenceSettings(Element el)
Constructs persistence settings from corresponding XML element.
|
Modifier and Type | Method and Description |
---|---|
List<PojoField> |
cassandraUniqueFields()
List of POJO fields having unique mapping to Cassandra columns - skipping aliases pointing
to the same Cassandra table column.
|
protected void |
checkDuplicates(List<PojoField> fields)
Checks if there are POJO filed with the same name or same Cassandra column specified in persistence settings.
|
protected abstract PojoField |
createPojoField(Element el,
Class clazz)
Creates instance of
PojoField based on it's description in XML element. |
protected abstract PojoField |
createPojoField(PojoFieldAccessor accessor)
Creates instance of
PojoField from its field accessor. |
protected abstract String |
defaultColumnName()
Returns default name for Cassandra column (if it's not specified explicitly).
|
protected List<PojoField> |
detectPojoFields(NodeList fieldNodes)
Extracts POJO fields from a list of corresponding XML field nodes.
|
static PropertyDescriptor |
findPropertyDescriptor(List<PropertyDescriptor> descriptors,
String propName)
Extracts property descriptor from the descriptors list by its name.
|
String |
getColumn()
Returns Cassandra table column name where object should be persisted in
case of using BLOB or PRIMITIVE persistence strategy.
|
PojoField |
getFieldByColumn(String column)
Returns POJO field by Cassandra table column name.
|
abstract List<PojoField> |
getFields()
Returns a list of POJO fields to be persisted.
|
Class |
getJavaClass()
Returns java class of the object to be persisted.
|
Serializer |
getSerializer()
Returns serializer to be used for BLOBs.
|
PersistenceStrategy |
getStrategy()
Returns persistence strategy to use.
|
List<String> |
getTableColumns()
Returns set of database column names, used to persist field values
|
String |
getTableColumnsDDL()
Returns Cassandra table columns DDL, corresponding to POJO fields which should be persisted.
|
String |
getTableColumnsDDL(Set<String> ignoreColumns)
Returns Cassandra table columns DDL, corresponding to POJO fields which should be persisted.
|
protected void |
init()
Class instance initialization.
|
public PersistenceSettings(Element el)
el
- xml element containing persistence settings configuration.public static PropertyDescriptor findPropertyDescriptor(List<PropertyDescriptor> descriptors, String propName)
descriptors
- descriptors list.propName
- property name.public Class getJavaClass()
public PersistenceStrategy getStrategy()
public String getColumn()
public Serializer getSerializer()
public abstract List<PojoField> getFields()
public PojoField getFieldByColumn(String column)
column
- column name.public List<PojoField> cassandraUniqueFields()
public List<String> getTableColumns()
public String getTableColumnsDDL()
public String getTableColumnsDDL(Set<String> ignoreColumns)
ignoreColumns
- Table columns to ignore (exclude) from DDL.protected abstract String defaultColumnName()
protected abstract PojoField createPojoField(Element el, Class clazz)
PojoField
based on it's description in XML element.el
- XML element describing POJO fieldclazz
- POJO java class.protected abstract PojoField createPojoField(PojoFieldAccessor accessor)
PojoField
from its field accessor.accessor
- field accessor.protected void init()
protected void checkDuplicates(List<PojoField> fields)
fields
- List of fields to be persisted into Cassandra.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019