java.lang.Object
pt.unl.fct.di.novasys.babel.protocols.storage.operations.common.CommonOperation
pt.unl.fct.di.novasys.babel.protocols.storage.operations.CassandraOperation

public class CassandraOperation extends CommonOperation
An operation to be issued to a Cassandra storage layer. The operation contains a Map where the keys represent the column names, and the value - a Entry(PrimitiveType,Object) - where the first element of the pair represents the data type and the second element the value to be passed onto the column.
  • Constructor Details

    • CassandraOperation

      public CassandraOperation(CommonOperationType operationType, Map<String,Map.Entry<com.datastax.oss.driver.internal.core.type.PrimitiveType,Object>> tableColumns)
      Creates a Cassandra operation, with the specific type and the the associated data (represented as columns).
      Parameters:
      operationType - the type of operation
      tableColumns - the data associated with the operation
  • Method Details

    • getTableColumns

      public Map<String,Map.Entry<com.datastax.oss.driver.internal.core.type.PrimitiveType,Object>> getTableColumns()
      Gets the columns to be updated on the operation. The Map has the following structure - where the keys represent the column names, and the value - a Entry(PrimitiveType,Object) - where the first element of the pair represents the data type and the second element the value to be passed onto the column.
      Returns:
    • getColumn

      public Object getColumn(String columnKey)
      Gets the data associated with the column
      Parameters:
      columnKey - the column key
      Returns:
      the data associated with the column