Package oracle.kv

Interface ValueBinding<T>

Type Parameters:
T - is the type of the deserialized object that is passed to toValue and returned by toObject. The specific type depends on the particular binding that is used.

@Deprecated public interface ValueBinding<T>
Deprecated.
as of 4.0, use the table API instead.
Generic interface for translating between Values (stored byte arrays) and typed objects representing that value. In other words, this interface is used for serialization and deserialization of Values.
Since:
2.0
  • Method Summary

    Modifier and Type
    Method
    Description
    toObject(Value value)
    Deprecated.
    After doing a read operation using a KVStore method, the user calls toObject with the Value obtained from the read operation.
    toValue(T object)
    Deprecated.
    Before doing a write operation, the user calls toValue passing an object she wishes to store.
  • Method Details

    • toObject

      T toObject(Value value) throws RuntimeException
      Deprecated.
      After doing a read operation using a KVStore method, the user calls toObject with the Value obtained from the read operation.
      Parameters:
      value - the Value obtained from a KVStore read operation method.
      Returns:
      the deserialized object.
      Throws:
      RuntimeException - if a parameter value is disallowed by the binding
    • toValue

      Value toValue(T object) throws RuntimeException
      Deprecated.
      Before doing a write operation, the user calls toValue passing an object she wishes to store. The resulting Value is then passed to the write operation method in KVStore.
      Parameters:
      object - the object the user wishes to store, or at least serialize.
      Returns:
      the serialized object.
      Throws:
      RuntimeException - if a parameter value is disallowed by the binding