com.h3c.util.persistence.cassandra.entitymgr.column

## Class ColumnCommandAdapter<K extends Serializable & Comparable<K>,E>

- java.lang.Object
- - com.h3c.util.persistence.cassandra.entitymgr.column.ColumnCommand<K,E>
  - - com.h3c.util.persistence.cassandra.entitymgr.column.ColumnCommandAdapter<K,E>

- Type Parameters:
    `K` - type of the column key or name
    `E` - type of the command result

      public class ColumnCommandAdapter<K extends Serializable & Comparable<K>,E>
      extends ColumnCommand<K,E>

  An abstract adapter class for executing column commands. The methods in this class returns the default value. This class exists as convenience for creating event commands.

  Class used to execute a command on a column when just a subset of type of columns is considered by the command; for the rest of column types a default value is returned.

  This class is not thread safe.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ColumnCommandAdapter(E defaultCommandResultvalue)` Creates a new event command adapter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected E` | `getResult(BooleanColumn<K> column)` Method getResult.
    `protected E` | `getResult(ByteArrayColumn<K> column)` Method getResult.
    `protected E` | `getResult(ByteColumn<K> column)` Method getResult.
    `protected E` | `getResult(CustomColumn<K,?> column)` Specific execution of the command.
    `protected E` | `getResult(DateColumn<K> column)` Method getResult.
    `protected E` | `getResult(DoubleColumn<K> column)` Method getResult.
    `protected E` | `getResult(EnumColumn<K,? extends Enum<?>> column)` Method getResult.
    `protected E` | `getResult(FloatColumn<K> column)` Method getResult.
    `protected E` | `getResult(IntegerColumn<K> column)` Method getResult.
    `protected E` | `getResult(LongColumn<K> column)` Method getResult.
    `protected E` | `getResult(StringColumn<K> column)` Method getResult.
    `protected E` | `getResult(ValuelessColumn<K> column)` Specific execution of the command.

    - ### Methods inherited from class com.h3c.util.persistence.cassandra.entitymgr.column.ColumnCommand

      `execute`

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

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

- - ### Constructor Detail

    - #### ColumnCommandAdapter

          public ColumnCommandAdapter(E defaultCommandResultvalue)

      Creates a new event command adapter.
      Parameters:
        `defaultCommandResultvalue` - default command result value

  - ### Method Detail

    - #### getResult

          protected E getResult(BooleanColumn<K> column)

      Method getResult.
      Specified by:
        `getResult` in class `ColumnCommand<K extends Serializable & Comparable<K>,E>`
      Parameters:
        `column` - BooleanColumn
      Returns:
        E

    - #### getResult

          protected E getResult(ByteColumn<K> column)

      Method getResult.
      Specified by:
        `getResult` in class `ColumnCommand<K extends Serializable & Comparable<K>,E>`
      Parameters:
        `column` - ByteColumn
      Returns:
        E

    - #### getResult

          protected E getResult(ByteArrayColumn<K> column)

      Method getResult.
      Specified by:
        `getResult` in class `ColumnCommand<K extends Serializable & Comparable<K>,E>`
      Parameters:
        `column` - ByteArrayColumn
      Returns:
        E

    - #### getResult

          protected E getResult(DateColumn<K> column)

      Method getResult.
      Specified by:
        `getResult` in class `ColumnCommand<K extends Serializable & Comparable<K>,E>`
      Parameters:
        `column` - DateColumn
      Returns:
        E

    - #### getResult

          protected E getResult(DoubleColumn<K> column)

      Method getResult.
      Specified by:
        `getResult` in class `ColumnCommand<K extends Serializable & Comparable<K>,E>`
      Parameters:
        `column` - DoubleColumn
      Returns:
        E

    - #### getResult

          protected E getResult(FloatColumn<K> column)

      Method getResult.
      Specified by:
        `getResult` in class `ColumnCommand<K extends Serializable & Comparable<K>,E>`
      Parameters:
        `column` - FloatColumn
      Returns:
        E

    - #### getResult

          protected E getResult(IntegerColumn<K> column)

      Method getResult.
      Specified by:
        `getResult` in class `ColumnCommand<K extends Serializable & Comparable<K>,E>`
      Parameters:
        `column` - IntegerColumn
      Returns:
        E

    - #### getResult

          protected E getResult(LongColumn<K> column)

      Method getResult.
      Specified by:
        `getResult` in class `ColumnCommand<K extends Serializable & Comparable<K>,E>`
      Parameters:
        `column` - LongColumn
      Returns:
        E

    - #### getResult

          protected E getResult(StringColumn<K> column)

      Method getResult.
      Specified by:
        `getResult` in class `ColumnCommand<K extends Serializable & Comparable<K>,E>`
      Parameters:
        `column` - StringColumn
      Returns:
        E

    - #### getResult

          protected E getResult(EnumColumn<K,? extends Enum<?>> column)

      Method getResult.
      Specified by:
        `getResult` in class `ColumnCommand<K extends Serializable & Comparable<K>,E>`
      Parameters:
        `column` - EnumColumn>
      Returns:
        E

    - #### getResult

          protected E getResult(CustomColumn<K,?> column)

      Description copied from class: `ColumnCommand`
      Specific execution of the command.
      Specified by:
        `getResult` in class `ColumnCommand<K extends Serializable & Comparable<K>,E>`
      Parameters:
        `column` - command input
      Returns:
        the command execution result

    - #### getResult

          protected E getResult(ValuelessColumn<K> column)

      Description copied from class: `ColumnCommand`
      Specific execution of the command.
      Specified by:
        `getResult` in class `ColumnCommand<K extends Serializable & Comparable<K>,E>`
      Parameters:
        `column` - command input
      Returns:
        the command execution result

Copyright © 2014. All Rights Reserved.