MultipleEntry (Oracle - Berkeley DB Java API)
Date: 2020-06-01

Package com.sleepycat.db

## Class MultipleEntry

- java.lang.Object
- - com.sleepycat.db.DatabaseEntry
  - - com.sleepycat.db.MultipleEntry

- Direct Known Subclasses:
    `MultipleDataEntry`, `MultipleKeyDataEntry`, `MultipleKeyNIODataEntry`, `MultipleNIODataEntry`, `MultipleRecnoDataEntry`, `MultipleRecnoNIODataEntry`

      public abstract class MultipleEntry
      extends DatabaseEntry

  An abstract class representing a DatabaseEntry that holds multiple results returned by a single `Cursor` get method. Use one of the concrete subclasses depending on whether you need:
  - multiple data items only: `MultipleDataEntry`
  - multiple key / data item pairs: `MultipleKeyDataEntry`
  - multiple record number / data item pairs: `MultipleRecnoDataEntry`

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected boolean` | `append_internal​(byte[] newdata, int offset, int len)` |
    `protected boolean` | `append_internal​(byte[] newdata, int offset, int len, int recno)` |
    `void` | `setUserBuffer​(int length, boolean usermem)` | Configures the entry with an application-owned buffer.

    - ### Methods inherited from class com.sleepycat.db.DatabaseEntry

      `equals, getBlob, getData, getDataNIO, getExternalFile, getOffset, getPartial, getPartialLength, getPartialOffset, getReadOnly, getRecordNumber, getReuseBuffer, getSize, getUserBuffer, getUserBufferLength, hashCode, setBlob, setData, setData, setDataNIO, setDataNIO, setExternalFile, setOffset, setPartial, setPartial, setPartialLength, setPartialOffset, setReadOnly, setRecordNumber, setReuseBuffer, setSize`

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

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

- - ### Method Detail

    - #### setUserBuffer

          public void setUserBuffer​(int length,
                                    boolean usermem)

      Description copied from class: `DatabaseEntry`
      Configures the entry with an application-owned buffer.

      The `data` field of the entry must refer to a buffer that is at least `length` bytes in length.

      If the length of the requested item is less than or equal to that number of bytes, the item is copied into the memory to which the `data` field refers. Otherwise, the `size` field is set to the length needed for the requested item, and a `MemoryException` is thrown.

      Applications can determine the length of a record by setting `length` to 0 and calling `DatabaseEntry.getSize` on the return value.

      Overrides:
        `setUserBuffer` in class `DatabaseEntry`
      Parameters:
        `length` - the length of the buffer

        `usermem` - whether the buffer is owned by the application

    - #### append_internal

          protected boolean append_internal​(byte[] newdata,
                                            int offset,
                                            int len,
                                            int recno)
                                     throws DatabaseException

      Throws:
        `DatabaseException`

    - #### append_internal

          protected boolean append_internal​(byte[] newdata,
                                            int offset,
                                            int len)
                                     throws DatabaseException

      Throws:
        `DatabaseException`

Copyright (c) 1996, 2020 Oracle and/or its affiliates. All rights reserved.