org.apache.ignite.cache.store.cassandra.persistence

## Class KeyPersistenceSettings

- java.lang.Object
- - org.apache.ignite.cache.store.cassandra.persistence.PersistenceSettings<PojoKeyField>
  - - org.apache.ignite.cache.store.cassandra.persistence.KeyPersistenceSettings

- All Implemented Interfaces:
    Serializable

      public class KeyPersistenceSettings
      extends PersistenceSettings<PojoKeyField>

  Stores persistence settings for Ignite cache key
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `KeyPersistenceSettings(Element el)` Creates key persistence settings object based on it's XML configuration.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected PojoKeyField` | `createPojoField(Element el, Class clazz)` Creates instance of `PojoField` based on it's description in XML element.
    `protected PojoKeyField` | `createPojoField(PojoFieldAccessor accessor)` Creates instance of `PojoField` from its field accessor.
    `protected PojoKeyField` | `createPojoField(PojoKeyField field, Class clazz)` Creates instance of `PojoField` based on the other instance and java class to initialize accessor.
    `protected String` | `defaultColumnName()` Returns default name for Cassandra column (if it's not specified explicitly).
    `String` | `getClusteringDDL()` Returns Cassandra DDL for cluster key.
    `List<PojoKeyField>` | `getFields()` Returns a list of POJO fields to be persisted.
    `String` | `getPrimaryKeyDDL()` Returns Cassandra DDL for primary key.

    - ### Methods inherited from class org.apache.ignite.cache.store.cassandra.persistence.PersistenceSettings

      `cassandraUniqueFields, checkDuplicates, detectPojoFields, enrichFields, findPropertyDescriptor, getColumn, getFieldByColumn, getJavaClass, getSerializer, getStrategy, getTableColumns, getTableColumnsDDL, getTableColumnsDDL, init`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### KeyPersistenceSettings

          public KeyPersistenceSettings(Element el)

      Creates key persistence settings object based on it's XML configuration.
      Parameters:
        `el` - XML element storing key persistence settings

  - ### Method Detail

    - #### getFields

          public List<PojoKeyField> getFields()

      Returns a list of POJO fields to be persisted.
      Specified by:
        `getFields` in class `PersistenceSettings<PojoKeyField>`
      Returns:
        list of fields.

    - #### createPojoField

          protected PojoKeyField createPojoField(Element el,
                                                 Class clazz)

      Creates instance of `PojoField` based on it's description in XML element.
      Specified by:
        `createPojoField` in class `PersistenceSettings<PojoKeyField>`
      Parameters:
        `el` - XML element describing POJO field
        `clazz` - POJO java class.

    - #### createPojoField

          protected PojoKeyField createPojoField(PojoFieldAccessor accessor)

      Creates instance of `PojoField` from its field accessor.
      Specified by:
        `createPojoField` in class `PersistenceSettings<PojoKeyField>`
      Parameters:
        `accessor` - field accessor.

    - #### createPojoField

          protected PojoKeyField createPojoField(PojoKeyField field,
                                                 Class clazz)

      Creates instance of `PojoField` based on the other instance and java class to initialize accessor.
      Specified by:
        `createPojoField` in class `PersistenceSettings<PojoKeyField>`
      Parameters:
        `field` - PojoField instance
        `clazz` - java class

    - #### getPrimaryKeyDDL

          public String getPrimaryKeyDDL()

      Returns Cassandra DDL for primary key.
      Returns:
        DDL statement.

    - #### getClusteringDDL

          public String getClusteringDDL()

      Returns Cassandra DDL for cluster key.
      Returns:
        Cluster key DDL.

    - #### defaultColumnName

          protected String defaultColumnName()

      Returns default name for Cassandra column (if it's not specified explicitly).
      Specified by:
        `defaultColumnName` in class `PersistenceSettings<PojoKeyField>`
      Returns:
        column name

2020 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020