RecordNumberBinding (Oracle - Berkeley DB Client-Server API)
Date: 2018-05-29

com.sleepycat.client.bind

## Class RecordNumberBinding

- java.lang.Object
- - com.sleepycat.client.bind.RecordNumberBinding

- All Implemented Interfaces:
    EntryBinding

      public class RecordNumberBinding
      extends java.lang.Object
      implements EntryBinding

  An `EntryBinding` that treats a record number key entry as a `Long` key object.

  Record numbers are returned as `Long` objects, although on input any `Number` object may be used.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RecordNumberBinding(java.nio.ByteOrder byteOrder)` Creates a byte array binding.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Long` | `entryToObject(SDatabaseEntry entry)` Converts a entry buffer into an Object.
    `static long` | `entryToRecordNumber(SDatabaseEntry entry, java.nio.ByteOrder byteOrder)` Utility method for use by bindings to translate a entry buffer to an record number integer.
    `void` | `objectToEntry(java.lang.Object object, SDatabaseEntry entry)` Converts an Object into a entry buffer.
    `static void` | `recordNumberToEntry(long recordNumber, SDatabaseEntry entry, java.nio.ByteOrder byteOrder)` Utility method for use by bindings to translate a record number integer to a entry buffer.

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

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

- - ### Constructor Detail

    - #### RecordNumberBinding

          public RecordNumberBinding(java.nio.ByteOrder byteOrder)

      Creates a byte array binding.
      Parameters:
        `byteOrder` - the server's native byte order

  - ### Method Detail

    - #### entryToObject

          public java.lang.Long entryToObject(SDatabaseEntry entry)

      Description copied from interface: `EntryBinding`
      Converts a entry buffer into an Object.
      Specified by:
        `entryToObject` in interface `EntryBinding`
      Parameters:
        `entry` - is the source entry buffer.
      Returns:
        the resulting Object.

    - #### objectToEntry

          public void objectToEntry(java.lang.Object object,
                                    SDatabaseEntry entry)

      Description copied from interface: `EntryBinding`
      Converts an Object into a entry buffer.
      Specified by:
        `objectToEntry` in interface `EntryBinding`
      Parameters:
        `object` - is the source Object.
        `entry` - is the destination entry buffer.

    - #### entryToRecordNumber

          public static long entryToRecordNumber(SDatabaseEntry entry,
                                                 java.nio.ByteOrder byteOrder)

      Utility method for use by bindings to translate a entry buffer to an record number integer.
      Parameters:
        `entry` - the entry buffer.
        `byteOrder` - the server's native byte order
      Returns:
        the record number.

    - #### recordNumberToEntry

          public static void recordNumberToEntry(long recordNumber,
                                                 SDatabaseEntry entry,
                                                 java.nio.ByteOrder byteOrder)

      Utility method for use by bindings to translate a record number integer to a entry buffer.
      Parameters:
        `recordNumber` - the record number.
        `entry` - the entry buffer to hold the record number.
        `byteOrder` - the server's native byte order

Copyright (c) 2016, 2018 Oracle and/or its affiliates. All rights reserved.