Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.exist.storage
Interface Indexable

All Superinterfaces:
  java.lang.Comparable

All Known Implementing Classes:
  AtomicValue

public interface Indexable
extends java.lang.Comparable

This interface should be implemented by all basic types to be used as keys in a value index.

Author:
  wolf
See Also:
  `NativeValueIndex`

Method Summary
`int` | `getType()` Returns the type of the Indexable as one of the constants defined in `Type`.
`byte[]` | `serialize(short collectionId, boolean caseSensitive)` Deprecated. use following function instead; this API should be local to value index class like `NativeValueIndex` The returned byte array has the following format: (short: collectionId, byte type, byte[] value)
`byte[]` | `serializeValue(int offset, boolean caseSensitive)` Serialize the value to an array of bytes for the persistant storage.

Methods inherited from interface java.lang.Comparable
`compareTo`

Method Detail

### serialize

    public byte[] serialize(short collectionId,
                            boolean caseSensitive)
                     throws EXistException

  Deprecated. use following function instead; this API should be local to value index class like `NativeValueIndex` The returned byte array has the following format: (short: collectionId, byte type, byte[] value)

  Serialize the value plus collection and possibly element information to an array of bytes.

  Parameters:
    `collectionId` - the collection id to use
    `caseSensitive` - only relevant for string values: if set to false, strings should be serialized in lower case
  Throws:
    `EXistException`

### serializeValue

    public byte[] serializeValue(int offset,
                                 boolean caseSensitive)
                          throws EXistException

  Serialize the value to an array of bytes for the persistant storage. The returned byte array has the following format: (offset-1 free bytes, byte type, byte[] value)

  Parameters:
    `offset` - starting index for writing in array data
  Returns:
    the size actually writen in the array argument
  Throws:
    `EXistException`

### getType

    public int getType()

  Returns the type of the Indexable as one of the constants defined in `Type`.

  Returns:
    Type of the Indexable

Overview | Package | Class | Deprecated | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright (C) Wolfgang Meier. All rights reserved.