# Buffer.java

    /*
    ** Module   : Buffer.java
    ** Abstract : interface which must be extended by any business DMO interface
    **
    ** Copyright (c) 2013-2023, Golden Code Development Corporation.
    **
    ** -#- -I- --Date-- ---------------------------------------Description---------------------------------------
    ** 001 ECF 20130118 Created initial version.
    ** 002 VMN 20130207 Added support for handle-based methods:
    **                  BUFFER-COPY (KW_BUF_COPY)
    **                  BUFFER-COMPARE (KW_BUF_COMP)
    **                  BUFFER-FIELD (KW_BUF_FLD)
    **                  BUFFER-RELEASE (KW_BUF_REL)
    **                  FIND-BY-ROWID (KW_FIND_BR)
    **                  FIND-UNIQUE (KW_GET_UNI)
    **                  FIND-FIRST (KW_FIND_1ST)
    **                  FIND-LAST (KW_FIND_LST)
    **                  and attributes:
    **                  NUM-FIELDS (KW_NUM_FLD).
    **                  INITIAL (KW_INIT)
    **                  AMBIGUOUS (KW_AMBIG)
    ** 003 OM  20130214 Added bufferCreate and variants of bufferCopy.
    ** 004 SVL 20130213 Added disable*Triggers functions.
    ** 005 VMN 20130217 Extended from WriteableError and added support
    **                  for handle-based attributes:
    **                  CURRENT-ITERATION (KW_CUR_ITER)
    **                  ERROR (KW_ERROR)
    **                  DBNAME (KW_DBNAME)
    **                  TABLE (KW_TABLE)
    ** 006 VMN 20130219 Added support for attributes
    **                  TABLE-HANDLE (KW_TAB_HAND)
    ** 007 CA  20130221 Added support for UNIQUE-ID, ADM-DATA, NAMESPACE-URI attributes.
    ** 008 GES 20130224 Added support for a DELETE statement with a validation expression.
    ** 009 ECF 20130224 Added limited support for embedded SQL.
    ** 010 OM  20130221 Added Dereferenceable interface.
    ** 011 OM  20130301 Pushed up defaultBufferHandle() from TempTable.
    ** 012 VMN 20130305 Corrected support for handle-based methods:
    **                  FIND-UNIQUE (KW_GET_UNI)
    **                  FIND-FIRST (KW_FIND_1ST)
    **                  FIND-LAST (KW_FIND_LST)
    ** 013 VMN 20130311 Corrected support for handle-based methods:
    **                  FIND-UNIQUE (KW_GET_UNI)
    **                  FIND-FIRST (KW_FIND_1ST)
    **                  FIND-LAST (KW_FIND_LST)
    **                  FIND-BY-ROWID (KW_FIND_BR)
    ** 014 ECF 20130309 Changed API for bufferCopy and bufferCompare; only wrapped data types are
    **                  allowed for literal parameters, to prevent the explosion of the API.
    ** 015 VMN 20130314 First parameter type changed from String to character for
    **                  FIND-UNIQUE (KW_GET_UNI)
    **                  FIND-FIRST (KW_FIND_1ST)
    **                  FIND-LAST (KW_FIND_LST)
    **                  BUFFER-COMPARE (KW_BUF_COMP): noLobs parameter type changed
    ** 016 CS  20130322 Moved the defaultBufferHandle method into BufferHandle interface.
    ** 017 CA  20130323 Changed the APIs for KW_BUF_DEL and KW_EMPTY_TT to return logical.
    ** 018 ECF 20130417 Moved initial() method to FieldInterface.
    ** 019 SVL 20130822 Added DYNAMIC attribute.
    ** 020 CA  20130927 Added LegacyResource annotation, to determine resource type.
    ** 021 EVL 20131008 Adding legacy attributes and methods annotation.
    ** 022 CA  20131021 Adds DynamicResource interface to support DYNAMIC attribute.
    ** 023 ECF 20131028 Import change.
    ** 024 SVL 20131203 Now extends Nameable.
    ** 025 OM  20140107 Removed unused openReadOnlyScope() method declaration.
    ** 026 VIG 20140121 currentIteration() moved to newly created interface IterableResource.
    ** 027 ECF 20141117 Added methods for all raw-transfer variants.
    ** 028 GES 20160530 Validation processing now uses lambdas instead of BufferValidator instances.
    ** 029 SVL 20160705 Added indexInformation method.
    ** 030 ECF 20170820 Added support for read-xml and write-xml methods.
    ** 031 OM  20171216 Added delete() variant with support for external buffers for nested selects.
    **     CA  20171220 Added INSTANTIATING-PROCEDURE interface.
    ** 032 GES 20180419 Added the RAW-TRANSFER() legacy method.
    ** 033 OM  20181114 Added NamedSerializable interface implementation.
    ** 034 ECF 20181208 Added recordLength and findCurrent methods.
    ** 035 OM  20190117 Declared CURRENT-CHANGED as a legacy attribute.
    ** 036 OM  20190325 Added method and attribute declarations related to DataSets.
    **     CA  20190416 Added DATA-SOURCE attribute.
    ** 037 CA  20190423 Added annotation for RECORD-LENGTH attribute.
    **     OM  20190423 Extended interface TempTableDuplicator. Dropped duplication of
    **                  INDEX-INFORMATION accessors.
    ** 038 CA  20190511 Added API for BUFFER-FIELD(POLY).
    **     OM  20190513 Extracted EMPTY-TEMP-TABLE in separate interface. Added ROW-STATE values.
    **     CA  20190514 Added BUFFER-VALIDATE stub.
    ** 039 CA  20190530 Added SYNCHRONIZE() stub.
    ** 040 OM  20190611 Defined constants. Extends DataSetChangeable interface now. Added missing
    **                  method.
    ** 041 OM  20190831 Added constants for hidden fields and index specific to BEFORE TEMP-TABLES.
    ** 042 OM  20191014 Extracted ERROR-STRING attribute in own interface.
    ** 043 IAS 20200221 Added Available interface.
    ** 044 CA  20200428 Added LAST-BATCH.
    ** 045 CA  20200503 Added BUFFER:IS-MULTI-TENANT runtime stub.
    ** 046 CA  20200910 Added BUFFER:SERIALIZE-ROW() runtime stub.
    **     OM  20201120 Redesign interface hierarchy.
    **     OM  20201205 Added AUTO-DELETE attribute definition.
    **     OM  20201218 Fixed implementation for error and rejected attributes/hidden fields.
    **     OM  20211020 Added _DATASOURCE_ROWID property.
    **     CA  20220426 Added PRIMARY attribute.
    **     OM  20220617 Added missing forms for DATA-SOURCE-ROWID attribute.
    **     OM  20220609 Fine-tuning interface hierarchy (fixes attributes appurtenance).
    ** 047 OM  20230511 Added static delete operation for quick delete cases.
    ** 048 ES  20250312 Added label methods.
    ** 049 ES  20250312 Added methods autoSynchronize and canRead methods.
    */

    /*
    ** This program is free software: you can redistribute it and/or modify
    ** it under the terms of the GNU Affero General Public License as
    ** published by the Free Software Foundation, either version 3 of the
    ** License, or (at your option) any later version.
    **
    ** This program is distributed in the hope that it will be useful,
    ** but WITHOUT ANY WARRANTY; without even the implied warranty of
    ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    ** GNU Affero General Public License for more details.
    **
    ** You may find a copy of the GNU Affero GPL version 3 at the following
    ** location: https://www.gnu.org/licenses/agpl-3.0.en.html
    **
    ** Additional terms under GNU Affero GPL version 3 section 7:
    **
    **   Under Section 7 of the GNU Affero GPL version 3, the following additional
    **   terms apply to the works covered under the License.  These additional terms
    **   are non-permissive additional terms allowed under Section 7 of the GNU
    **   Affero GPL version 3 and may not be removed by you.
    **
    **   0. Attribution Requirement.
    **
    **     You must preserve all legal notices or author attributions in the covered
    **     work or Appropriate Legal Notices displayed by works containing the covered
    **     work.  You may not remove from the covered work any author or developer
    **     credit already included within the covered work.
    **
    **   1. No License To Use Trademarks.
    **
    **     This license does not grant any license or rights to use the trademarks
    **     Golden Code, FWD, any Golden Code or FWD logo, or any other trademarks
    **     of Golden Code Development Corporation. You are not authorized to use the
    **     name Golden Code, FWD, or the names of any author or contributor, for
    **     publicity purposes without written authorization.
    **
    **   2. No Misrepresentation of Affiliation.
    **
    **     You may not represent yourself as Golden Code Development Corporation or FWD.
    **
    **     You may not represent yourself for publicity purposes as associated with
    **     Golden Code Development Corporation, FWD, or any author or contributor to
    **     the covered work, without written authorization.
    **
    **   3. No Misrepresentation of Source or Origin.
    **
    **     You may not represent the covered work as solely your work.  All modified
    **     versions of the covered work must be marked in a reasonable way to make it
    **     clear that the modified work is not originating from Golden Code Development
    **     Corporation or FWD.  All modified versions must contain the notices of
    **     attribution required in this license.
    */

    package com.goldencode.p2j.persist;

    import java.util.*;
    import java.util.function.*;
    import com.goldencode.p2j.persist.lock.*;
    import com.goldencode.p2j.util.*;

    /**
     * Defines the public API for services representing Progress builtin
     * functions, methods, attributes, and language statements, which operate on
     * record buffers.
     * <p>
     * Each DMO interface should contain a public, inner interface which extends
     * both this class and the enclosing DMO interface. This enables DMO proxies
     * used by business logic to invoke DMO-specific methods, as well as methods
     * which provide standard buffer services, without requiring a cast.
     */
    @LegacyResource(resource = LegacyResource.BUFFER)
    public interface Buffer
    extends ADMData,
            Available,
            BufferHandle,
            CallbackProcedure,
            DatabaseInfo,
            DataSourceModifiable,
            DataSetChangeable,
            Dereferenceable,
            DynamicResource,
            EmptyTempTable,
            Errorable,
            ErrorString,
            Fillable,
            IndexInformation,
            InstantiatingProcedure,
            IterableResource,
            IterCounter,
            JsonData,
            Keyable,
            Nameable,
            NamedSerializable,
            NamespaceURI,
            RefCounter,
            PrimaryIndex,
            QueryAssociable,
            Rejectable,
            TempTableDuplicator,
            UniqueID,
            WrappedResource,
            XmlNode,
            XmlData
    {
       /** The legacy name of the hidden error flag field in BEFORE-TEMP-TABLEs. */
       public static final String __ERROR_FLAG__ = "__error-flag__";

       /** The java (dmo/converted)  name of the hidden error flag field in BEFORE-TEMP-TABLEs. */
       public static final String ERROR_FLAG_FIELD = "_errorFlag";

       /** The legacy name of the hidden DATASOURCE field in BEFORE-TEMP-TABLEs. */
       public static final String __DATA_SOURCE_ROWID__ = "__datasource-rowid__";

       /** The java (dmo/converted) name of the hidden DATASOURCE field in BEFORE-TEMP-TABLEs. */
       public static final String DATA_SOURCE_ROWID_FIELD = "_datasourceRowid";

       /** The legacy name of the origin rowid field in BEFORE-TEMP-TABLEs. */
       public static final String __ORIGIN_ROWID__ = "__origin-rowid__";

       /** The java (dmo/converted)  name of the origin rowid field in BEFORE-TEMP-TABLEs. */
       public static final String ORIGIN_ROWID_FIELD = "_originRowid";

       /** The legacy name of the hidden error string field in BEFORE-TEMP-TABLEs. */
       public static final String __ERROR_STRING__ = "__error-string__";

       /** The java (dmo/converted)  name of the hidden error string field in BEFORE-TEMP-TABLEs. */
       public static final String ERROR_STRING_FIELD = "_errorString";

       /** The legacy name of the hidden after-rowid field in BEFORE-TEMP-TABLEs. */
       public static final String __AFTER_ROWID__ = "__after-rowid__";

       /** The java (dmo/converted)  name of the hidden after-rowid field in BEFORE-TEMP-TABLEs. */
       public static final String AFTER_ROWID_FIELD = "_peerRowid";

       /** The legacy name of the hidden row-state field in BEFORE-TEMP-TABLEs. */
       public static final String __ROW_STATE__ = "__row-state__";

       /** The java (dmo/converted) name of the hidden row-state field in BEFORE-TEMP-TABLEs. */
       public static final String ROW_STATE_FIELD = "_rowState";

       /** The legacy name of the index in BEFORE-TEMP-TABLEs . */
       public static final String ROW_STATE_IDX = "rowState";

       /** ROW-STATE constant value: the row was not modified. */
       public static final int ROW_UNMODIFIED = 0;

       /** ROW-STATE constant value: the row was deleted. */
       public static final int ROW_DELETED = 1;

       /** ROW-STATE constant value: the row was modified. */
       public static final int ROW_MODIFIED = 2;

       /** ROW-STATE constant value: the row was created. */
       public static final int ROW_CREATED = 3;

       /** A bitwise flag which marks a system error. It is saved in {@code __ERROR_FLAG__} attribute. */
       public static final int ERROR_ERROR = 1;

       /** A bitwise flag which marks a user error. It is saved in {@code __ERROR_FLAG__} attribute. */
       public static final int ERROR_REJECTED = 2;

       /** The {@code BEFORE-FILL} event string constant in upper case. */
       public static final String BEFORE_FILL_EVENT = "BEFORE-FILL";

       /** The {@code AFTER-FILL} event string constant in upper case. */
       public static final String AFTER_FILL_EVENT = "AFTER-FILL";

       /** The {@code BEFORE-ROW-FILL} event string constant in upper case. */
       public static final String BEFORE_ROW_FILL_EVENT = "BEFORE-ROW-FILL";

       /** The {@code AFTER-ROW-FILL} event string constant in upper case. */
       public static final String AFTER_ROW_FILL_EVENT = "AFTER-ROW-FILL";

       /** The {@code ROW-CREATE} event string constant in upper case. */
       public static final String ROW_CREATE_EVENT = "ROW-CREATE";

       /** The {@code ROW-DELETE} event string constant in upper case. */
       public static final String ROW_DELETE_EVENT = "ROW-DELETE";

       /** The {@code ROW-UPDATE} event string constant in upper case. */
       public static final String ROW_UPDATE_EVENT = "ROW-UPDATE";

       /** The {@code FIND-FAILED} event string constant in upper case. */
       public static final String FIND_FAILED_EVENT = "FIND-FAILED";

       /** The {@code SYNCHRONIZE} event string constant in upper case. */
       public static final String SYNCHRONIZE_EVENT = "SYNCHRONIZE";

       /**
        * Deletes a set of records from the specified buffer based on the given {@code where} predicate. The
        * method will translate dynamically the predicate if the buffer (reference-only or not) is bound to a
        * different table.
        *
        * @param   buff
        *          The buffer whose content will be altered based on {@code where} predicate.
        * @param   where
        *          The {@code where} predicate used for filtering the records to be deleted.
        * @param   args
        *          Query substitution arguments.
        */
       public static void delete(Buffer buff, String where, Object... args)
       {
          RecordBuffer buffDef = ((BufferReference) buff).definition();
          RecordBuffer buffBind = ((BufferReference) buff).buffer();

          if (!AbstractQuery.buffersMatch(buffDef, buffBind))
          {
             List<RecordBuffer> bound = new ArrayList<>(1);
             List<RecordBuffer> definition = new ArrayList<>(1);
             bound.add(buffBind);
             definition.add(buffDef);

             where = FQLPreprocessor.translate(bound, definition, where, true);
          }

          try
          {
             // use the already resolved proxy
             buffBind.delete(where, args);
          }
          catch (PersistenceException e)
          {
             ErrorManager.recordOrThrowError(e);
          }
       }

       /**
        * Deletes a set of records from the specified buffer based on the given {@code where} predicate. The
        * method will translate dynamically the predicate if the buffer (reference-only or not) or any
        * supplementary DMOs are bound to a different table.
        *
        * @param   buff
        *          The buffer whose content will be altered based on {@code where} predicate.
        * @param   suppDMOs
        *          The supplementary DMOs needed for the DELETE statement to be performed.
        * @param   where
        *          The {@code where} predicate used for filtering the records to be deleted.
        * @param   args
        *          Query substitution arguments.
        */
       public static void delete(Buffer buff, DataModelObject[] suppDMOs, String where, Object... args)
       {
          boolean translate = false;
          List<RecordBuffer> bound = new ArrayList<>(1 + suppDMOs.length);
          List<RecordBuffer> definition = new ArrayList<>(1 + suppDMOs.length);

          RecordBuffer buffDef = ((BufferReference) buff).definition();
          RecordBuffer buffBind = ((BufferReference) buff).buffer();
          if (!AbstractQuery.buffersMatch(buffDef, buffBind))
          {
             bound.add(buffBind);
             definition.add(buffDef);
             translate = true;
          }

          for (DataModelObject dmo : suppDMOs)
          {
             RecordBuffer supBuffDef = ((BufferReference) dmo).definition();
             RecordBuffer supBuffBind = ((BufferReference) dmo).buffer();
             if (!AbstractQuery.buffersMatch(supBuffDef, supBuffBind))
             {
                bound.add(supBuffBind);
                definition.add(supBuffDef);
                translate = true;
             }
          }

          if (translate)
          {
             where = FQLPreprocessor.translate(bound, definition, where, false);
          }

          try
          {
             buffBind.delete(suppDMOs, where, args);
          }
          catch (PersistenceException e)
          {
             ErrorManager.recordOrThrowError(e);
          }
       }

       /**
        * Implementation of the read access of the {@code LABEL}.
        *
        * @return  The current value of the {@code LABEL}.
        */
       public character label();

       /**
        * Implementation of the write access of the {@code LABEL}.
        *
        * @param   sName
        *          the new value for the {@code LABEL}.
        */
       public void label(Text sName);

       /**
        * Implementation of the write access of the {@code LABEL}.
        *
        * @param  sName
        *         The new value for the {@code LABEL}.
        */
       public void label(String sName);

       /**
        * Get the BUFFER:LAST-BATCH attribute.
        *
        * @return  the value of BUFFER:LAST-BATCH attribute.
        */
       @LegacyAttribute(name = "LAST-BATCH")
       public logical lastBatch();

       /**
        * Set the BUFFER:LAST-BATCH attribute.
        *
        * @param    lastBatch
        *           The flag state.
        */
       @LegacyAttribute(name = "LAST-BATCH", setter = true)
       public void lastBatch(boolean lastBatch);

       /**
        * Set the BUFFER:LAST-BATCH attribute.
        *
        * @param    lastBatch
        *           The flag state.
        */
       @LegacyAttribute(name = "LAST-BATCH", setter = true)
       public void lastBatch(logical lastBatch);

       /**
        * Get the record ID of the current buffer's current record, if any.  P2J
        * implementation of the RECID function.
        * <p>
        * This method will return a 32-bit recid which represents the internal
        * row ID of the given record.  If the actual row ID (which is implemented
        * as a wider integer) cannot fit due to overflow, an error condition will
        * be raised.
        *
        * @return  Record ID of the underlying data record. If no record currently
        *          backs the buffer associated with <code>dmo</code>, a recid
        *          initialized as unknown value is returned.
        *
        * @throws  ErrorConditionException
        *          if the actual record ID is too wide to fit within a 32-bit
        *          integer.
        */
       @LegacyAttribute(name = "RECID")
       public recid recordID();

       /**
        * Get the row ID of the current buffer's current record, if any.  P2J
        * implementation of the ROWID function.
        *
        * @return  Row ID of the underlying data record.  If no record currently
        *          backs the buffer associated with <code>dmo</code>, a
        *          <code>rowid</code> initialized as unknown value is returned.
        */
       @LegacyAttribute(name = "ROWID")
       public rowid rowID();

       /**
        * Indicate whether a backing data record currently is available.
        *
        * @return  <code>true</code> if data is available, <code>false</code> if
        *          no record backs this buffer.
        */
       public boolean _available();

       /**
        * Checks if the record in the buffer has changed in database since the
        * last <code>FIND CURRENT</code> or <code>GET CURRENT</code>.
        * P2J implementation of 4GL method and function <code>CURRENT-CHANGED</code>.
        *
        * @return  <code>true</code> if the database record differs from the
        *          value in memory buffer that was queried with the last
        *          <code>FIND</code> and <code>false</code> otherwise
        */
       @LegacyAttribute(name = "CURRENT-CHANGED")
       public logical currentChanged();

       /**
        * Checks if the record in the buffer has changed in database since the
        * last <code>FIND CURRENT</code> or <code>GET CURRENT</code>.
        * P2J implementation of 4GL function <code>CURRENT-CHANGED</code>.
        *
        * @return  <code>true</code> if the database record differs from the
        *          value in memory buffer that was queried with the last
        *          <code>FIND</code> and <code>false</code> otherwise
        */
       public boolean _currentChanged();

       /**
        * Indicate whether the buffer associated currently contains a record, and
        * whether that record is transient.  A record is transient if it has been
        * newly created and has not yet been saved to the database.
        *
        * @return  <code>true</code> if a record exists and is new, else
        *          <code>false</code>.
        */
       public logical newlyCreated();

       /**
        * Indicate whether the buffer associated currently contains a record, and
        * whether that record is transient.  A record is transient if it has been
        * newly created and has not yet been saved to the database.
        *
        * @return  <code>true</code> if a record exists and is new, else
        *          <code>false</code>.
        */
       public boolean _newlyCreated();

       /**
        * Indicate whether the last record retrieval attempt was denied because
        * the target record was locked.
        *
        * @return  <code>true</code> if the record was locked;  <code>false</code>
        *          if the attempt succeeded, or if this query has not yet
        *          attempted to retrieve a record.
        */
       @LegacyAttribute(name = "LOCKED")
       public logical locked();

       /**
        * Indicate whether the last record retrieval attempt was denied because
        * the target record was locked.
        *
        * @return  <code>true</code> if the record was locked;  <code>false</code>
        *          if the attempt succeeded, or if this query has not yet
        *          attempted to retrieve a record.
        */
       public boolean _locked();

       /**
        * Indicate whether the last record retrieval attempt failed because the
        * query criteria was ambiguous.
        *
        * @return  <code>true</code> if the query was ambiguous;
        *          <code>false</code> if the attempt succeeded, or if no attempt
        *          has yet been made.
        */
       @LegacyAttribute(name = "AMBIGUOUS")
       public logical ambiguous();

       /**
        * Indicate whether the last record retrieval attempt failed because the
        * query criteria was ambiguous.
        *
        * @return  <code>true</code> if the query was ambiguous;
        *          <code>false</code> if the attempt succeeded, or if no attempt
        *          has yet been made.
        */
       public boolean _ambiguous();

       /**
        * Perform a RAW-TRANSFER operation from this buffer to the given raw variable. Serializes the
        * record currently in the buffer into the specified field.
        *
        * @param   field
        *          A <code>raw</code> field to which to copy the record in this buffer.
        */
       public void rawCopyTo(raw field);

       /**
        * Perform a RAW-TRANSFER operation from this buffer to the given field, which should be of
        * type <code>raw</code>. Serializes the record currently in the buffer into the specified
        * field.
        *
        * @param   field
        *          A <code>raw</code> field to which to copy the record in this buffer.
        */
       public void rawCopyTo(FieldReference field);

       /**
        * Perform a RAW-TRANSFER operation from this buffer to the given buffer.
        *
        * @param   buffer
        *          A buffer into which to copy the record in this buffer.
        * @return <code>true</code> if successful
        */
       public boolean rawCopyTo(Buffer buffer);

       /**
        * Perform a RAW-TRANSFER operation from the given raw field into this buffer. Deserializes the
        * data in the specified field into this buffer.
        *
        * @param   field
        *          A <code>raw</code> field from which to copy the record into this buffer.
        */
       public void rawCopyFrom(FieldReference field);

       /**
        * Perform a RAW-TRANSFER operation from the given raw field into this buffer. Deserializes the
        * data in the specified field into this buffer.
        *
        * @param   field
        *          A <code>raw</code> field from which to copy the record into this buffer.
        * @return <code>true</code> if successful
        */
       public boolean rawCopyFrom(raw field);

       /**
        * RAW-TRANSFER() method implementation that maps its processing to the same methods used
        * for implementation of the RAW-TRANSFER statement.  This will serialize data from this
        * buffer into a RAW field or buffer OR it will deserialize data from a RAW field or buffer
        * into this buffer.
        *
        * @param   toMode
        *          {@code true} if the copy direction is into the handle's resource and {@code false}
        *          if the data is being copied into the buffer.
        * @param   h
        *          A buffer or raw buffer field.
        *
        * @return  <code>true</code> if RAW-TRANSFER() succeeds, else <code>false</code>.
        */
       @LegacyMethod(name = "RAW-TRANSFER")
       public logical rawTransfer(boolean toMode, handle h);

       /**
        * RAW-TRANSFER() method implementation that maps its processing to the same methods used
        * for implementation of the RAW-TRANSFER statement.  This will serialize data from this
        * buffer into a RAW field or buffer OR it will deserialize data from a RAW field or buffer
        * into this buffer.
        *
        * @param   toMode
        *          {@code true} if the copy direction is into the handle's resource and {@code false}
        *          if the data is being copied into the buffer.
        * @param   h
        *          A buffer or raw buffer field.
        *
        * @return  <code>true</code> if RAW-TRANSFER() succeeds, else <code>false</code>.
        */
       @LegacyMethod(name = "RAW-TRANSFER")
       public logical rawTransfer(logical toMode, handle h);

       /**
        * Create a new record in the buffer.
        *
        * @throws  ErrorConditionException
        *          if there is an error retrieving the next available primary key
        *          from the database or locking the record.
        */
       public void create();

       /**
        * Delete the record currently in the buffer, if any.
        *
        * @return  <code>true</code> if the delete was possible.
        *
        * @throws  ErrorConditionException
        *          if no record currently is loaded in the buffer, or if there is
        *          an error deleting the current record from the database.
        */
       @LegacyMethod(name = "BUFFER-DELETE")
       public logical deleteRecord();

       /**
        * Delete the record currently in the buffer, IF and ONLY IF the given validation expression
        * evaluates <code>true</code>.
        *
        * @param    valexp
        *           The validation expression to evaluate.
        * @param    valmsg
        *           The error message to display when validation fails.
        *
        * @return   <code>true</code> if validation succeeds, <code>false</code> if it fails and no
        *           exception is raised.
        *
        * @throws   ErrorConditionException
        *           If no record currently is loaded in the buffer, or if there is an error deleting
        *           the current record from the database or if the validation expression fails.
        */
       @LegacyMethod(name = "BUFFER-DELETE")
       public logical deleteRecord(Supplier<logical> valexp, String valmsg);

       /**
        * Delete the record currently in the buffer, IF and ONLY IF the given validation expression
        * evaluates <code>true</code>.
        *
        * @param    valexp
        *           The validation expression to evaluate.
        * @param    valmsg
        *           The error message to display when validation fails.
        *
        * @return   <code>true</code> if validation succeeds, <code>false</code> if it fails and no
        *           exception is raised.
        *
        * @throws   ErrorConditionException
        *           If no record currently is loaded in the buffer, or if there is an error deleting
        *           the current record from the database or if the validation expression fails.
        */
       @LegacyMethod(name = "BUFFER-DELETE")
       public logical deleteRecord(Supplier<logical> valexp, Supplier<character> valmsg);

       /**
        * Delete all records associated with this buffer, which match the criteria
        * specified by the given where clause.  Note that this where clause must
        * not contain DMO alias qualifiers.
        * <p>
        * <b>NOTE:</b>  the current implementation must not be invoked for a DMO
        * which is backed by a permanent table;  only temp-table bulk delete is
        * supported at this time.
        *
        * @param   where
        *          An HQL where clause snippet which defines the restriction
        *          criteria to apply to the delete.  All references to properties
        *          in a DMO must be unqualified.
        * @param   args
        *          Query substitution parameters required by the where clause.
        *
        * @throws  ErrorConditionException
        *          if there is an error deleting the records.
        * @throws  UnsupportedOperationException
        *          if invoked on a buffer associated with a permanent table.
        */
       public void delete(String where, Object ...args);

       /**
        * Delete all records associated with this buffer, which match the criteria
        * specified by the given where clause.  Note that this where clause must
        * not contain DMO alias qualifiers.
        * <p>
        * <b>NOTE:</b>  the current implementation must not be invoked for a DMO
        * which is backed by a permanent table;  only temp-table bulk delete is
        * supported at this time.
        *
        * @param   suppDMOs
        *          The DMOs for the external (additional) buffers that are accessed in inner
        *          subselect, or {@code null} in case of a simple {@code where} predicate.
        * @param   where
        *          An HQL where clause snippet which defines the restriction
        *          criteria to apply to the delete.  All references to properties
        *          in a DMO must be unqualified.
        * @param   args
        *          Query substitution parameters required by the where clause.
        *
        * @throws  ErrorConditionException
        *          if there is an error deleting the records.
        * @throws  UnsupportedOperationException
        *          if invoked on a buffer associated with a permanent table.
        */
       public void delete(DataModelObject[] suppDMOs, String where, Object ...args);

       /**
        * Aggregate method which averages the values of a single column across rows in the table
        * backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate.
        * @param   num
        *          Variable into which to store the aggregate result.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void average(String column, NumberType num);

       /**
        * Aggregate method which averages the values of a single column across rows in the table
        * backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate.
        * @param   num
        *          Variable into which to store the aggregate result.
        * @param   where
        *          HQL where clause used to filter the records.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void average(String column, NumberType num, String where);

       /**
        * Aggregate method which averages the values of a single column across rows in the table
        * backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate.
        * @param   num
        *          Variable into which to store the aggregate result.
        * @param   where
        *          HQL where clause used to filter the records.
        * @param   args
        *          Query substitution arguments.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void average(String column, NumberType num, String where, Object...args);

       /**
        * Aggregate method which counts the rows in the table backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate. May be the wildcard
        *          character ("*").
        * @param   num
        *          Variable into which to store the aggregate result.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void count(String column, NumberType num);

       /**
        * Aggregate method which counts the rows in the table backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate. May be the wildcard
        *          character ("*").
        * @param   num
        *          Variable into which to store the aggregate result.
        * @param   where
        *          HQL where clause used to filter the records.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void count(String column, NumberType num, String where);

       /**
        * Aggregate method which counts the rows in the table backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate. May be the wildcard
        *          character ("*").
        * @param   num
        *          Variable into which to store the aggregate result.
        * @param   where
        *          HQL where clause used to filter the records.
        * @param   args
        *          Query substitution arguments.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void count(String column, NumberType num, String where, Object...args);

       /**
        * Aggregate method which finds the minimum value of a single column across rows in the table
        * backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate.
        * @param   num
        *          Variable into which to store the aggregate result.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void minimum(String column, NumberType num);

       /**
        * Aggregate method which finds the minimum value of a single column across rows in the table
        * backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate.
        * @param   num
        *          Variable into which to store the aggregate result.
        * @param   where
        *          HQL where clause used to filter the records.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void minimum(String column, NumberType num, String where);

       /**
        * Aggregate method which finds the minimum value of a single column across rows in the table
        * backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate.
        * @param   num
        *          Variable into which to store the aggregate result.
        * @param   where
        *          HQL where clause used to filter the records.
        * @param   args
        *          Query substitution arguments.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void minimum(String column, NumberType num, String where, Object...args);

       /**
        * Aggregate method which finds the maximum value of a single column across rows in the table
        * backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate.
        * @param   num
        *          Variable into which to store the aggregate result.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void maximum(String column, NumberType num);

       /**
        * Aggregate method which finds the maximum value of a single column across rows in the table
        * backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate.
        * @param   num
        *          Variable into which to store the aggregate result.
        * @param   where
        *          HQL where clause used to filter the records.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void maximum(String column, NumberType num, String where);

       /**
        * Aggregate method which finds the maximum value of a single column across rows in the table
        * backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate.
        * @param   num
        *          Variable into which to store the aggregate result.
        * @param   where
        *          HQL where clause used to filter the records.
        * @param   args
        *          Query substitution arguments.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void maximum(String column, NumberType num, String where, Object...args);

       /**
        * Aggregate method which sums the values of a single column across rows in the table
        * backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate.
        * @param   num
        *          Variable into which to store the aggregate result.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void sum(String column, NumberType num);

       /**
        * Aggregate method which sums the values of a single column across rows in the table
        * backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate.
        * @param   num
        *          Variable into which to store the aggregate result.
        * @param   where
        *          HQL where clause used to filter the records.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void sum(String column, NumberType num, String where);

       /**
        * Aggregate method which sums the values of a single column across rows in the table
        * backing this buffer.
        *
        * @param   column
        *          An expression indicating the name of the column to aggregate.
        * @param   num
        *          Variable into which to store the aggregate result.
        * @param   where
        *          HQL where clause used to filter the records.
        * @param   args
        *          Query substitution arguments.
        *
        * @throws  ErrorConditionException
        *          if an error occurs performing the aggregate operation.
        */
       public void sum(String column, NumberType num, String where, Object...args);

       /**
        * Validate and release the record currently in the buffer, if any.
        *
        * @throws  ErrorConditionException
        *          if the buffer fails validation.
        */
       public void release();

       /**
        * Validate the record currently in the buffer, if any.
        *
        * @throws  ErrorConditionException
        *          if the buffer fails validation.
        */
       public void validate();

       /**
        * Definition of the BUFFER-VALIDATE method.
        *
        * @return   <code>true</code> if the validation passes.
        */
       @LegacyMethod(name = "BUFFER-VALIDATE")
       public logical bufferValidate();

       /**
        * Conversion of the RECORD-LENGTH built-in function.
        *
        * @return  Length of the record currently in the buffer, in bytes.
        */
       @LegacyAttribute(name = "RECORD-LENGTH")
       public integer recordLength();

       /**
        * Conversion of BUFFER-FIELD() method (KW_BUF_FLD).
        *
        * Gets the handle to a particular buffer of a query or DataSet object.
        *
        * @param   fieldNumber
        *          An INTEGER expression representing the sequence number of the field in the buffer.
        *
        * @return  handle to a particular field in the buffer.
        */
       @LegacyMethod(name = "BUFFER-FIELD")
       public handle bufferField(int fieldNumber);

       /**
        * Conversion of BUFFER-FIELD() method (KW_BUF_FLD).
        *
        * Gets the handle to a particular buffer of a query or DataSet object.
        *
        * @param   fieldNumber
        *          An INTEGER expression representing the sequence number of the field in the buffer.
        *
        * @return  handle to a particular field in the buffer.
        */
       @LegacyMethod(name = "BUFFER-FIELD")
       public handle bufferField(NumberType fieldNumber);

       /**
        * Conversion of BUFFER-FIELD() method (KW_BUF_FLD).
        *
        * Gets the handle to a particular buffer of a query or DataSet object.
        *
        * @param   fieldName
        *          A string expression representing the name of the field in the buffer.
        *
        * @return  handle to a particular field in the buffer.
        */
       @LegacyMethod(name = "BUFFER-FIELD")
       public handle bufferField(String fieldName);

       /**
        * Conversion of BUFFER-FIELD() method (KW_BUF_FLD).
        *
        * Gets the handle to a particular buffer of a query or DataSet object.
        *
        * @param   fieldName
        *          A CHARACTER string expression representing the name of the field in the buffer.
        *
        * @return  handle to a particular field in the buffer.
        */
       @LegacyMethod(name = "BUFFER-FIELD")
       public handle bufferField(character fieldName);

       /**
        * Conversion of BUFFER-FIELD() method (KW_BUF_FLD).
        *
        * Gets the handle to a particular buffer of a query or DataSet object.
        *
        * @param   fieldName
        *          A CHARACTER string expression representing the name of the field in the buffer.
        *
        * @return  handle to a particular field in the buffer.
        */
       @LegacyMethod(name = "BUFFER-FIELD")
       public handle bufferField(BaseDataType fieldName);

       /**
        * Conversion of BUFFER-COPY() method (KW_BUF_COPY).
        *
        * This method copies any common fields, determined by name, data type,
        * and extent-matching, from the source buffer to the receiving buffer.
        * If there are fields in one buffer that do not exist in the other, they
        * are ignored. This method is used to accommodate temp-tables of joins.
        *
        * @param   buffer
        *          The source buffer to copy from.
        *
        * @return  <code>true</code> if BUFFER-COPY() succeeds, else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COPY")
       public logical bufferCopy(Buffer buffer);

       /**
        * Conversion of BUFFER-COPY() method (KW_BUF_COPY).
        *
        * This method copies any common fields, determined by name, data type,
        * and extent-matching, from the source buffer to the receiving buffer.
        * If there are fields in one buffer that do not exist in the other, they
        * are ignored. This method is used to accommodate temp-tables of joins.
        *
        * @param   buffer
        *          The source buffer to copy from.
        * @param   except
        *          A comma-separated list of fields that will be ignored in the copy process.
        *
        * @return  <code>true</code> if BUFFER-COPY() succeeds, else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COPY")
       public logical bufferCopy(Buffer buffer, character except);

       /**
        * Conversion of BUFFER-COPY() method (KW_BUF_COPY).
        *
        * This method copies any common fields, determined by name, data type,
        * and extent-matching, from the source buffer to the receiving buffer.
        * If there are fields in one buffer that do not exist in the other, they
        * are ignored. This method is used to accommodate temp-tables of joins.
        *
        * @param   buffer
        *          The source buffer to copy from.
        * @param   except
        *          A comma-separated list of fields that will be ignored in the copy process.
        * @param   pairs
        *          A comma-separated list of field-name pairs to be copied.  Each pair must contain
        *          one field name from the source and one field name from the target.
        *
        * @return  <code>true</code> if BUFFER-COPY() succeeds, else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COPY")
       public logical bufferCopy(Buffer buffer, character except, character pairs);

       /**
        * Conversion of BUFFER-COPY() method (KW_BUF_COPY).
        *
        * This method copies any common fields, determined by name, data type,
        * and extent-matching, from the source buffer to the receiving buffer.
        * If there are fields in one buffer that do not exist in the other, they
        * are ignored. This method is used to accommodate temp-tables of joins.
        *
        * @param   buffer
        *          The source buffer to copy from.
        * @param   except
        *          A comma-separated list of fields that will be ignored in the copy process.
        * @param   pairs
        *          A comma-separated list of field-name pairs to be copied.  Each pair must contain
        *          one field name from the source and one field name from the target.
        * @param   noLobs
        *          If <code>TRUE</code>, BLOB and CLOB fields are ignored during the copy.
        *
        * @return  <code>true</code> if BUFFER-COPY() succeeds, else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COPY")
       public logical bufferCopy(Buffer buffer, character except, character pairs, logical noLobs);

       /**
        * Conversion of BUFFER-COPY() method (KW_BUF_COPY).
        *
        * This method copies any common fields, determined by name, data type,
        * and extent-matching, from the source buffer to the receiving buffer.
        * If there are fields in one buffer that do not exist in the other, they
        * are ignored. This method is used to accommodate temp-tables of joins.
        *
        * @param   bufHandle
        *          The handle of the source buffer to copy from.
        *
        * @return  <code>true</code> if BUFFER-COPY() succeeds, else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COPY")
       public logical bufferCopy(handle bufHandle);

       /**
        * Conversion of BUFFER-COPY() method (KW_BUF_COPY).
        *
        * This method copies any common fields, determined by name, data type,
        * and extent-matching, from the source buffer to the receiving buffer.
        * If there are fields in one buffer that do not exist in the other, they
        * are ignored. This method is used to accommodate temp-tables of joins.
        *
        * @param   bufHandle
        *          The handle of the source buffer to copy from.
        * @param   except
        *          A comma-separated list of fields that will be ignored in the copy process.
        *
        * @return  <code>true</code> if BUFFER-COPY() succeeds, else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COPY")
       public logical bufferCopy(handle bufHandle, character except);

       /**
        * Conversion of BUFFER-COPY() method (KW_BUF_COPY).
        *
        * This method copies any common fields, determined by name, data type,
        * and extent-matching, from the source buffer to the receiving buffer.
        * If there are fields in one buffer that do not exist in the other, they
        * are ignored. This method is used to accommodate temp-tables of joins.
        *
        * @param   bufHandle
        *          The handle of the source buffer to copy from.
        * @param   except
        *          A comma-separated list of fields that will be ignored in the copy process.
        * @param   pairs
        *          A comma-separated list of field-name pairs to be copied.  Each pair must contain
        *          one field name from the source and one field name from the target.
        *
        * @return  <code>true</code> if BUFFER-COPY() succeeds, else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COPY")
       public logical bufferCopy(handle bufHandle, character except, character pairs);

       /**
        * Conversion of BUFFER-COPY() method (KW_BUF_COPY).
        *
        * This method copies any common fields, determined by name, data type,
        * and extent-matching, from the source buffer to the receiving buffer.
        * If there are fields in one buffer that do not exist in the other, they
        * are ignored. This method is used to accommodate temp-tables of joins.
        *
        * @param   bufHandle
        *          The handle of the source buffer to copy from.
        * @param   except
        *          A comma-separated list of fields that will be ignored in the copy process.
        * @param   pairs
        *          A comma-separated list of field-name pairs to be copied.  Each pair must contain
        *          one field name from the source and one field name from the target.
        * @param   noLobs
        *          If <code>TRUE</code>, BLOB and CLOB fields are ignored during the copy.
        *
        * @return  <code>true</code> if BUFFER-COPY() succeeds, else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COPY")
       public logical bufferCopy(handle bufHandle, character except, character pairs, logical noLobs);

       /**
        * Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
        *
        * This method does a rough compare of any common fields, determined by
        * name, data type, and extent-matching, between the source buffer and the
        * target buffer. The resulting logical value is either TRUE or FALSE as
        * a whole. A single field that does not compare causes the entire buffer
        * to return FALSE. If there are fields in one buffer that do not exist in
        * the other, they are ignored.
        *
        * @param   buffer
        *          Buffer with which to compare.
        *
        * @return  <code>true</code> if BUFFER-COMPARE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COMPARE")
       public logical bufferCompare(Buffer buffer);

       /**
        * Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
        *
        * This method does a rough compare of any common fields, determined by
        * name, data type, and extent-matching, between the source buffer and the
        * target buffer. The resulting logical value is either TRUE or FALSE as
        * a whole. A single field that does not compare causes the entire buffer
        * to return FALSE. If there are fields in one buffer that do not exist in
        * the other, they are ignored.
        *
        * @param   buffer
        *          Buffer with which to compare.
        * @param   mode
        *          The text "binary" or "case-sensitive", to provide that type of comparison.
        *
        * @return  <code>true</code> if BUFFER-COMPARE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COMPARE")
       public logical bufferCompare(Buffer buffer, character mode);

       /**
        * Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
        *
        * This method does a rough compare of any common fields, determined by
        * name, data type, and extent-matching, between the source buffer and the
        * target buffer. The resulting logical value is either TRUE or FALSE as
        * a whole. A single field that does not compare causes the entire buffer
        * to return FALSE. If there are fields in one buffer that do not exist in
        * the other, they are ignored.
        *
        * @param   buffer
        *          Buffer with which to compare.
        * @param   mode
        *          The text "binary" or "case-sensitive", to provide that type of comparison.
        * @param   except
        *          A comma-separated list of fields that will be ignored in the compare process.
        *
        * @return  <code>true</code> if BUFFER-COMPARE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COMPARE")
       public logical bufferCompare(Buffer buffer, character mode, character except);

       /**
        * Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
        *
        * This method does a rough compare of any common fields, determined by
        * name, data type, and extent-matching, between the source buffer and the
        * target buffer. The resulting logical value is either TRUE or FALSE as
        * a whole. A single field that does not compare causes the entire buffer
        * to return FALSE. If there are fields in one buffer that do not exist in
        * the other, they are ignored.
        *
        * @param   buffer
        *          Buffer with which to compare.
        * @param   mode
        *          The text "binary" or "case-sensitive", to provide that type of comparison.
        * @param   except
        *          A comma-separated list of fields that will be ignored in the compare process.
        * @param   pairs
        *          A comma-separated list of field-name pairs to be compared.  Each pair must contain
        *          one field name from the source and one field name from the target.
        *
        * @return  <code>true</code> if BUFFER-COMPARE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COMPARE")
       public logical bufferCompare(Buffer buffer, character mode, character except, character pairs);

       /**
        * Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
        *
        * This method does a rough compare of any common fields, determined by
        * name, data type, and extent-matching, between the source buffer and the
        * target buffer. The resulting logical value is either TRUE or FALSE as
        * a whole. A single field that does not compare causes the entire buffer
        * to return FALSE. If there are fields in one buffer that do not exist in
        * the other, they are ignored.
        *
        * @param   buffer
        *          Buffer with which to compare.
        * @param   mode
        *          The text "binary" or "case-sensitive", to provide that type of comparison.
        * @param   except
        *          A comma-separated list of fields that will be ignored in the compare process.
        * @param   pairs
        *          A comma-separated list of field-name pairs to be compared.  Each pair must contain
        *          one field name from the source and one field name from the target.
        * @param   noLobs
        *          If <code>TRUE</code>, BLOB and CLOB fields are ignored during the copy.
        *
        * @return  <code>true</code> if BUFFER-COMPARE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COMPARE")
       public logical bufferCompare(Buffer    buffer,
                                    character mode,
                                    character except,
                                    character pairs,
                                    logical   noLobs);

       /**
        * Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
        *
        * This method does a rough compare of any common fields, determined by
        * name, data type, and extent-matching, between the source buffer and the
        * target buffer. The resulting logical value is either TRUE or FALSE as
        * a whole. A single field that does not compare causes the entire buffer
        * to return FALSE. If there are fields in one buffer that do not exist in
        * the other, they are ignored.
        *
        * @param   bufHandle
        *          Handle of buffer with which to compare.
        *
        * @return  <code>true</code> if BUFFER-COMPARE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COMPARE")
       public logical bufferCompare(handle bufHandle);

       /**
        * Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
        *
        * This method does a rough compare of any common fields, determined by
        * name, data type, and extent-matching, between the source buffer and the
        * target buffer. The resulting logical value is either TRUE or FALSE as
        * a whole. A single field that does not compare causes the entire buffer
        * to return FALSE. If there are fields in one buffer that do not exist in
        * the other, they are ignored.
        *
        * @param   bufHandle
        *          Handle of buffer with which to compare.
        * @param   mode
        *          The text "binary" or "case-sensitive", to provide that type of comparison.
        *
        * @return  <code>true</code> if BUFFER-COMPARE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COMPARE")
       public logical bufferCompare(handle bufHandle, character mode);

       /**
        * Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
        *
        * This method does a rough compare of any common fields, determined by
        * name, data type, and extent-matching, between the source buffer and the
        * target buffer. The resulting logical value is either TRUE or FALSE as
        * a whole. A single field that does not compare causes the entire buffer
        * to return FALSE. If there are fields in one buffer that do not exist in
        * the other, they are ignored.
        *
        * @param   bufHandle
        *          Handle of buffer with which to compare.
        * @param   mode
        *          The text "binary" or "case-sensitive", to provide that type of comparison.
        * @param   except
        *          A comma-separated list of fields that will be ignored in the compare process.
        *
        * @return  <code>true</code> if BUFFER-COMPARE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COMPARE")
       public logical bufferCompare(handle bufHandle, character mode, character except);

       /**
        * Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
        *
        * This method does a rough compare of any common fields, determined by
        * name, data type, and extent-matching, between the source buffer and the
        * target buffer. The resulting logical value is either TRUE or FALSE as
        * a whole. A single field that does not compare causes the entire buffer
        * to return FALSE. If there are fields in one buffer that do not exist in
        * the other, they are ignored.
        *
        * @param   bufHandle
        *          Handle of buffer with which to compare.
        * @param   mode
        *          The text "binary" or "case-sensitive", to provide that type of comparison.
        * @param   except
        *          A comma-separated list of fields that will be ignored in the compare process.
        * @param   pairs
        *          A comma-separated list of field-name pairs to be compared.  Each pair must contain
        *          one field name from the source and one field name from the target.
        *
        * @return  <code>true</code> if BUFFER-COMPARE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COMPARE")
       public logical bufferCompare(handle bufHandle,
                                    character mode,
                                    character except,
                                    character pairs);

       /**
        * Conversion of BUFFER-COMPARE() method (KW_BUF_COMP).
        *
        * This method does a rough compare of any common fields, determined by
        * name, data type, and extent-matching, between the source buffer and the
        * target buffer. The resulting logical value is either TRUE or FALSE as
        * a whole. A single field that does not compare causes the entire buffer
        * to return FALSE. If there are fields in one buffer that do not exist in
        * the other, they are ignored.
        *
        * @param   bufHandle
        *          Handle of buffer with which to compare.
        * @param   mode
        *          The text "binary" or "case-sensitive", to provide that type of comparison.
        * @param   except
        *          A comma-separated list of fields that will be ignored in the compare process.
        * @param   pairs
        *          A comma-separated list of field-name pairs to be compared.  Each pair must contain
        *          one field name from the source and one field name from the target.
        * @param   noLobs
        *          If <code>TRUE</code>, BLOB and CLOB fields are ignored during the copy.
        *
        * @return  <code>true</code> if BUFFER-COMPARE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-COMPARE")
       public logical bufferCompare(handle    bufHandle,
                                    character mode,
                                    character except,
                                    character pairs,
                                    logical   noLobs);

       /**
        * Conversion of BUFFER-CREATE() method (KW_BUF_CREA).
        *
        * Creates a record, sets fields to their default values, and moves a copy of the record into
        * the buffer.
        *
        * @return  <code>true</code> if successful
        */
       @LegacyMethod(name = "BUFFER-CREATE")
       public logical bufferCreate();

       /**
        * Conversion of FIND-FIRST() method (KW_FIND_1ST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        *
        * @return  <code>true</code> if FIND-FIRST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-FIRST")
       public logical findFirst();

       /**
        * Conversion of FIND-FIRST() method (KW_FIND_1ST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        *
        * @return  <code>true</code> if FIND-FIRST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-FIRST")
       public logical findFirst(character whereClause);

       /**
        * Conversion of FIND-FIRST() method (KW_FIND_1ST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lockType
        *          Lock type
        *
        * @return  <code>true</code> if FIND-FIRST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-FIRST")
       public logical findFirst(character whereClause, LockType lockType);

       /**
        * Conversion of FIND-FIRST() method (KW_FIND_1ST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        *
        * @return  <code>true</code> if FIND-FIRST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-FIRST")
       public logical findFirst(character whereClause, long lock);

       /**
        * Conversion of FIND-FIRST() method (KW_FIND_1ST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        *
        * @return  <code>true</code> if FIND-FIRST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-FIRST")
       public logical findFirst(character whereClause, NumberType lock);

       /**
        * Conversion of FIND-FIRST() method (KW_FIND_1ST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if FIND-FIRST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-FIRST")
       public logical findFirst(character whereClause, long lock, long nowait);

       /**
        * Conversion of FIND-FIRST() method (KW_FIND_1ST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if FIND-FIRST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-FIRST")
       public logical findFirst(character whereClause, NumberType lock, long nowait);

       /**
        * Conversion of FIND-FIRST() method (KW_FIND_1ST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if FIND-FIRST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-FIRST")
       public logical findFirst(character whereClause, long lock, NumberType nowait);

       /**
        * Conversion of FIND-FIRST() method (KW_FIND_1ST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if FIND-FIRST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-FIRST")
       public logical findFirst(character whereClause, NumberType lock, NumberType nowait);

       /**
        * Conversion of FIND-LAST() method (KW_FIND_LST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @return  <code>true</code> if FIND-LAST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-LAST")
       public logical findLast();

       /**
        * Conversion of FIND-LAST() method (KW_FIND_LST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        *
        * @return  <code>true</code> if FIND-LAST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-LAST")
       public logical findLast(character whereClause);

       /**
        * Conversion of FIND-LAST() method (KW_FIND_LST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lockType
        *          Lock type
        *
        * @return  <code>true</code> if FIND-LAST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-LAST")
       public logical findLast(character whereClause, LockType lockType);

       /**
        * Conversion of FIND-LAST() method (KW_FIND_LST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        *
        * @return  <code>true</code> if FIND-LAST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-LAST")
       public logical findLast(character whereClause, long lock);

       /**
        * Conversion of FIND-LAST() method (KW_FIND_LST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        *
        * @return  <code>true</code> if FIND-LAST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-LAST")
       public logical findLast(character whereClause, NumberType lock);

       /**
        * Conversion of FIND-LAST() method (KW_FIND_LST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if FIND-LAST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-LAST")
       public logical findLast(character whereClause, long lock, long nowait);

       /**
        * Conversion of FIND-LAST() method (KW_FIND_LST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if FIND-LAST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-LAST")
       public logical findLast(character whereClause, NumberType lock, long nowait);

       /**
        * Conversion of FIND-LAST() method (KW_FIND_LST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if FIND-LAST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-LAST")
       public logical findLast(character whereClause, long lock, NumberType nowait);

       /**
        * Conversion of FIND-LAST() method (KW_FIND_LST).
        *
        * Gets a single record. This method lets a user get the last record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if FIND-LAST() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-LAST")
       public logical findLast(character whereClause, NumberType lock, NumberType nowait);

       /**
        * Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
        *
        * Gets a single record. This method lets a user get a unique record that
        * satisfies the predicate expression.
        *
        * @return  <code>true</code> if FIND-UNIQUE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-UNIQUE")
       public logical findUnique();

       /**
        * Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
        *
        * Gets a single record. This method lets a user get a unique record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        *
        * @return  <code>true</code> if FIND-UNIQUE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-UNIQUE")
       public logical findUnique(character whereClause);

       /**
        * Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
        *
        * Gets a single record. This method lets a user get a unique record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lockType
        *          Lock type
        *
        * @return  <code>true</code> if FIND-UNIQUE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-UNIQUE")
       public logical findUnique(character whereClause, LockType lockType);

       /**
        * Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
        *
        * Gets a single record. This method lets a user get a unique record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        *
        * @return  <code>true</code> if FIND-UNIQUE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-UNIQUE")
       public logical findUnique(character whereClause, long lock);

       /**
        * Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
        *
        * Gets a single record. This method lets a user get a unique record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        *
        * @return  <code>true</code> if FIND-UNIQUE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-UNIQUE")
       public logical findUnique(character whereClause, NumberType lock);

       /**
        * Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
        *
        * Gets a single record. This method lets a user get a unique record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if FIND-UNIQUE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-UNIQUE")
       public logical findUnique(character whereClause, long lock, long nowait);

       /**
        * Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
        *
        * Gets a single record. This method lets a user get a unique record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if FIND-UNIQUE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-UNIQUE")
       public logical findUnique(character whereClause, NumberType lock, long nowait);

       /**
        * Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
        *
        * Gets a single record. This method lets a user get a unique record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if FIND-UNIQUE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-UNIQUE")
       public logical findUnique(character whereClause, long lock, NumberType nowait);

       /**
        * Conversion of FIND-UNIQUE() method (KW_FIND_UNI).
        *
        * Gets a single record. This method lets a user get a unique record that
        * satisfies the predicate expression.
        *
        * @param   whereClause
        *          where clause, predicate-expression.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if FIND-UNIQUE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "FIND-UNIQUE")
       public logical findUnique(character whereClause, NumberType lock, NumberType nowait);

       /**
        * Conversion of the FIND-CURRENT() method.
        *
        * Changes the lock type for the record currently in the buffer. Resets the CURRENT-CHANGED
        * attribute.
        *
        * @return  {@code true} if FIND-CURRENT() succeeds (the lock type is changed), else {@code
        *          false}.
        */
       @LegacyMethod(name = "FIND-CURRENT")
       public logical findCurrent();

       /**
        * Conversion of the FIND-CURRENT() method.
        *
        * Changes the lock type for the record currently in the buffer. Resets the CURRENT-CHANGED
        * attribute.
        *
        * @param   lockType
        *          Lock type.
        *
        * @return  {@code true} if FIND-CURRENT() succeeds (the lock type is changed), else {@code
        *          false}.
        */
       @LegacyMethod(name = "FIND-CURRENT")
       public logical findCurrent(LockType lockType);

       /**
        * Conversion of the FIND-CURRENT() method.
        *
        * Changes the lock type for the record currently in the buffer. Resets the CURRENT-CHANGED
        * attribute.
        *
        * @param   lock
        *          Lock type.
        *
        * @return  {@code true} if FIND-CURRENT() succeeds (the lock type is changed), else {@code
        *          false}.
        */
       @LegacyMethod(name = "FIND-CURRENT")
       public logical findCurrent(NumberType lock);

       /**
        * Conversion of the FIND-CURRENT() method.
        *
        * Changes the lock type for the record currently in the buffer. Resets the CURRENT-CHANGED
        * attribute.
        *
        * @param   lock
        *          Lock type.
        *
        * @return  {@code true} if FIND-CURRENT() succeeds (the lock type is changed), else {@code
        *          false}.
        */
       @LegacyMethod(name = "FIND-CURRENT")
       public logical findCurrent(long lock);

       /**
        * Conversion of the FIND-CURRENT() method.
        *
        * Changes the lock type for the record currently in the buffer. Resets the CURRENT-CHANGED
        * attribute.
        *
        * @param   lockType
        *          Lock type.
        * @param   noWait
        *          Zero to lock without waiting; non-zero to wait to acquire the lock.
        *
        * @return  {@code true} if FIND-CURRENT() succeeds (the lock type is changed), else {@code
        *          false}.
        */
       @LegacyMethod(name = "FIND-CURRENT")
       public logical findCurrent(LockType lockType, long noWait);

       /**
        * Conversion of the FIND-CURRENT() method.
        *
        * Changes the lock type for the record currently in the buffer. Resets the CURRENT-CHANGED
        * attribute.
        *
        * @param   lock
        *          Lock type.
        * @param   noWait
        *          Zero to lock without waiting; non-zero to wait to acquire the lock.
        *
        * @return  {@code true} if FIND-CURRENT() succeeds (the lock type is changed), else {@code
        *          false}.
        */
       @LegacyMethod(name = "FIND-CURRENT")
       public logical findCurrent(NumberType lock, long noWait);

       /**
        * Conversion of the FIND-CURRENT() method.
        *
        * Changes the lock type for the record currently in the buffer. Resets the CURRENT-CHANGED
        * attribute.
        *
        * @param   lock
        *          Lock type.
        * @param   noWait
        *          Zero to lock without waiting; non-zero to wait to acquire the lock.
        *
        * @return  {@code true} if FIND-CURRENT() succeeds (the lock type is changed), else {@code
        *          false}.
        */
       @LegacyMethod(name = "FIND-CURRENT")
       public logical findCurrent(long lock, long noWait);

       /**
        * Conversion of the FIND-CURRENT() method.
        *
        * Changes the lock type for the record currently in the buffer. Resets the CURRENT-CHANGED
        * attribute.
        *
        * @param   lockType
        *          Lock type.
        * @param   noWait
        *          Zero or unknown value to lock without waiting; non-zero to wait to acquire the
        *          lock.
        *
        * @return  {@code true} if FIND-CURRENT() succeeds (the lock type is changed), else {@code
        *          false}.
        */
       @LegacyMethod(name = "FIND-CURRENT")
       public logical findCurrent(LockType lockType, NumberType noWait);

       /**
        * Conversion of the FIND-CURRENT() method.
        *
        * Changes the lock type for the record currently in the buffer. Resets the CURRENT-CHANGED
        * attribute.
        *
        * @param   lock
        *          Lock type.
        * @param   noWait
        *          Zero or unknown value to lock without waiting; non-zero to wait to acquire the
        *          lock.
        *
        * @return  {@code true} if FIND-CURRENT() succeeds (the lock type is changed), else {@code
        *          false}.
        */
       @LegacyMethod(name = "FIND-CURRENT")
       public logical findCurrent(NumberType lock, NumberType noWait);

       /**
        * Conversion of the FIND-CURRENT() method.
        *
        * Changes the lock type for the record currently in the buffer. Resets the CURRENT-CHANGED
        * attribute.
        *
        * @param   lock
        *          Lock type.
        * @param   noWait
        *          Zero or unknown value to lock without waiting; non-zero to wait to acquire the
        *          lock.
        *
        * @return  {@code true} if FIND-CURRENT() succeeds (the lock type is changed), else {@code
        *          false}.
        */
       @LegacyMethod(name = "FIND-CURRENT")
       public logical findCurrent(long lock, NumberType noWait);

       /**
        * Conversion of BUFFER-RELEASE() method (KW_BUF_REL).
        *
        * Releases a record from a buffer object. The BUFFER-RELEASE method
        * corresponds to the RELEASE statement.
        *
        * @return  <code>true</code> if BUFFER-RELEASE() succeeds,
        *          else <code>false</code>.
        */
       @LegacyMethod(name = "BUFFER-RELEASE")
       public logical bufferRelease();

       /**
        * Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
        *
        * Locates the record with the rowid you specify, then moves the record
        * into the buffer.
        *
        * @param   id
        *          An expression of type ROWID that represents the rowid of the
        *          desired record.
        *
        * @return  <code>true</code> if it finds the record, else
        *          <code>false</code>.
        */
       @LegacyMethod(name = "FIND-BY-ROWID")
       public logical findByRowID(rowid id);

       /**
        * Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
        *
        * Locates the record with the rowid you specify, then moves the record
        * into the buffer.
        *
        * @param   id
        *          An expression of type ROWID that represents the rowid of the
        *          desired record.
        * @param   lockType
        *          Lock type
        *
        * @return  <code>true</code> if it finds the record, else
        *          <code>false</code>.
        */
       @LegacyMethod(name = "FIND-BY-ROWID")
       public logical findByRowID(rowid id, LockType lockType);

       /**
        * Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
        *
        * Locates the record with the rowid you specify, then moves the record
        * into the buffer.
        *
        * @param   id
        *          An expression of type ROWID that represents the rowid of the
        *          desired record.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        *
        * @return  <code>true</code> if it finds the record, else
        *          <code>false</code>.
        */
       @LegacyMethod(name = "FIND-BY-ROWID")
       public logical findByRowID(rowid id, long lock);

       /**
        * Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
        *
        * Locates the record with the rowid you specify, then moves the record
        * into the buffer.
        *
        * @param   id
        *          An expression of type ROWID that represents the rowid of the
        *          desired record.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        *
        * @return  <code>true</code> if it finds the record, else
        *          <code>false</code>.
        */
       @LegacyMethod(name = "FIND-BY-ROWID")
       public logical findByRowID(rowid id, NumberType lock);

       /**
        * Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
        *
        * Locates the record with the rowid you specify, then moves the record
        * into the buffer.
        *
        * @param   id
        *          An expression of type ROWID that represents the rowid of the
        *          desired record.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if it finds the record, else
        *          <code>false</code>.
        */
       @LegacyMethod(name = "FIND-BY-ROWID")
       public logical findByRowID(rowid id, long lock, long nowait);

       /**
        * Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
        *
        * Locates the record with the rowid you specify, then moves the record
        * into the buffer.
        *
        * @param   id
        *          An expression of type ROWID that represents the rowid of the
        *          desired record.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if it finds the record, else
        *          <code>false</code>.
        */
       @LegacyMethod(name = "FIND-BY-ROWID")
       public logical findByRowID(rowid id, NumberType lock, long nowait);

       /**
        * Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
        *
        * Locates the record with the rowid you specify, then moves the record
        * into the buffer.
        *
        * @param   id
        *          An expression of type ROWID that represents the rowid of the
        *          desired record.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if it finds the record, else
        *          <code>false</code>.
        */
       @LegacyMethod(name = "FIND-BY-ROWID")
       public logical findByRowID(rowid id, long lock, NumberType nowait);

       /**
        * Conversion of FIND-BY-ROWID() method (KW_FIND_BR).
        *
        * Locates the record with the rowid you specify, then moves the record
        * into the buffer.
        *
        * @param   id
        *          An expression of type ROWID that represents the rowid of the
        *          desired record.
        * @param   lock
        *          SHARE-LOCK|EXCLUSIVE-LOCK|NO-LOCK
        * @param   nowait
        *          NO-WAIT
        *
        * @return  <code>true</code> if it finds the record, else
        *          <code>false</code>.
        */
       @LegacyMethod(name = "FIND-BY-ROWID")
       public logical findByRowID(rowid id, NumberType lock, NumberType nowait);

       /**
        * Conversion of NUM-FIELDS attribute (KW_NUM_FLD).
        *
        * Getter of NUM-FIELDS attribute.
        *
        * @return  current value of NUM-FIELDS attribute.
        */
       @LegacyAttribute(name = "NUM-FIELDS")
       public integer numFields();

       /**
        * Disable the triggers associated with the FIND event for the buffer's table.
        */
       @LegacyMethod(name = "DISABLE-DUMP-TRIGGERS")
       public void disableDumpTriggers();

       /**
        * Disable the triggers associated with the CREATE, WRITE, DELETE and ASSIGN events for the
        * buffer's table.
        *
        * @param allowReplication
        *        If <code>true</code> then only CREATE, DELETE, ASSIGN and WRITE triggers are
        *        disabled, and not REPLICATION-CREATE, REPLICATION-DELETE and REPLICATION-WRITE
        *        triggers.
        */
       @LegacyMethod(name = "DISABLE-LOAD-TRIGGERS")
       public void disableLoadTriggers(boolean allowReplication);

       /**
        * Conversion of TABLE-HANDLE attribute (KW_TAB_HAND).
        *
        * Gets the handle of a temp-table object, if any, associated with the buffer object.
        *
        * @return  the handle of a temp-table object.
        */
       @LegacyAttribute(name = "TABLE-HANDLE")
       public handle tableHandle();

       /**
        * Gets the maximum number of {@code DataSet} temp-table rows to retrieve in each {@code FILL}
        * operation. The default value is zero (which retrieves all rows that satisfy the associated
        * query).
        *
        * @return  the maximum number of DataSet temp-table rows to retrieve in each {@code FILL}
        *          operation.
        */
       @LegacyAttribute(name = "BATCH-SIZE")
       public integer batchSize();

       /**
        * Sets the maximum number of {@code DataSet} temp-table rows to retrieve in each {@code FILL}
        * operation.
        *
        * @param   size
        *          The new value for the {@code BATCH-SIZE} attribute.
        */
       @LegacyAttribute(name = "BATCH-SIZE", setter = true)
       public void batchSize(long size);

       /**
        * Sets the maximum number of {@code DataSet} temp-table rows to retrieve in each {@code FILL}
        * operation.
        *
        * @param   size
        *          The new value for the {@code BATCH-SIZE} attribute.
        */
       @LegacyAttribute(name = "BATCH-SIZE", setter = true)
       public void batchSize(NumberType size);

       /**
        * Gets the {@code ROWID} of the row in the after-image table that is the current version of
        * the row in the before-image table currently associated with this buffer. This row can
        * be a new or modified row.
        *
        * @return  the {@code ROWID} of the row in the after-image table that is the current version
        *          of the row in the before-image table
        */
       @LegacyAttribute(name = "AFTER-ROWID")
       public rowid afterRowid();

       /**
        * Gets the {@code ROWID} of the row in the before-image table that is the current version of
        * the row in the before-image table currently associated with this buffer. This row can
        * be a new or modified row.
        *
        * @return  the {@code ROWID} of the row in the before-image table that is the current version
        *          of the row in the before-image table
        */
       @LegacyAttribute(name = "BEFORE-ROWID")
       public rowid beforeRowid();

       /**
        * Obtain the current change state of the {@code DataSet} temp-table row associated with this
        * buffer object.
        *
        * @return  the current change state of the {@code DataSet} temp-table row associated with this
        *          buffer object.
        */
       @LegacyAttribute(name = "ROW-STATE")
       public integer rowState();

       /**
        * Accepts changes to the data in one row of this {@code DataSet} temp-table.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "ACCEPT-ROW-CHANGES")
       public logical acceptRowChanges();

       /**
        * Rejects changes to the data in one row of this {@code DataSet} temp-table.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "REJECT-ROW-CHANGES")
       public logical rejectRowChanges();

       /**
        * Saves changes from one row of the {@code DataSet} temp-table to the associated data
        * source.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "SAVE-ROW-CHANGES")
       public logical saveRowChanges();

       /**
        * Saves changes from one row of the {@code DataSet} temp-table to the associated data source.
        *
        * @param   buffIndex
        *          The index of the buffer in the data source.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "SAVE-ROW-CHANGES")
       public logical saveRowChanges(NumberType buffIndex);

       /**
        * Saves changes from one row of the {@code DataSet} temp-table to the associated data source.
        *
        * @param   buffName
        *          The name of the buffer in the data source.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "SAVE-ROW-CHANGES")
       public logical saveRowChanges(Text buffName);

       /**
        * Saves changes from one row of the {@code DataSet} temp-table to the associated data source.
        *
        * @param   buffIndex
        *          The index of the buffer in the data source.
        * @param   skipList
        *          A list of field names that should not be assigned after a new row is created
        *          (comma-separated).
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "SAVE-ROW-CHANGES")
       public logical saveRowChanges(NumberType buffIndex, Text skipList);

       /**
        * Saves changes from one row of the {@code DataSet} temp-table to the associated data source.
        *
        * @param   buffName
        *          The name of the buffer in the data source.
        * @param   skipList
        *          A list of field names that should not be assigned after a new row is created
        *          (comma-separated).
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "SAVE-ROW-CHANGES")
       public logical saveRowChanges(Text buffName, Text skipList);

       /**
        * Saves changes from one row of the {@code DataSet} temp-table to the associated data source.
        * <p>
        * <strong>Note:</strong> this form is used when unknown literal {@code ?} is used to specify
        *         the buffer. In either case, numeric or character, the meaning is the same.
        *
        * @param   buffInfo
        *          Unknown value.
        * @param   skipList
        *          A list of field names that should not be assigned after a new row is created
        *          (comma-separated).
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "SAVE-ROW-CHANGES")
       public logical saveRowChanges(unknown buffInfo, Text skipList);

       /**
        * Saves changes from one row of the {@code DataSet} temp-table to the associated data source.
        *
        * @param   buffIndex
        *          The index of the buffer in the data source.
        * @param   skipList
        *          A list of field names that should not be assigned after a new row is created
        *          (comma-separated).
        * @param   noLobs
        *          Use {@code true} to specify the BLOB and CLOB fields should be ignored in the
        *          save operation.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "SAVE-ROW-CHANGES")
       public logical saveRowChanges(NumberType buffIndex, Text skipList, logical noLobs);

       /**
        * Saves changes from one row of the {@code DataSet} temp-table to the associated data source.
        * <p>
        * <strong>Note:</strong> this form is used when unknown literal {@code ?} is used to specify
        *         the buffer. In either case, numeric or character, the meaning is the same.
        *
        * @param   buffInfo
        *          Unknown value.
        * @param   skipList
        *          A list of field names that should not be assigned after a new row is created
        *          (comma-separated).
        * @param   noLobs
        *          Use {@code true} to specify the BLOB and CLOB fields should be ignored in the
        *          save operation.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "SAVE-ROW-CHANGES")
       public logical saveRowChanges(unknown buffInfo, Text skipList, logical noLobs);

       /**
        * Saves changes from one row of the {@code DataSet} temp-table to the associated data source.
        *
        * @param   buffName
        *          The name of the buffer in the data source.
        * @param   skipList
        *          A list of field names that should not be assigned after a new row is created
        *          (comma-separated).
        * @param   noLobs
        *          Use {@code true} to specify the BLOB and CLOB fields should be ignored in the
        *          save operation.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "SAVE-ROW-CHANGES")
       public logical saveRowChanges(Text buffName, Text skipList, logical noLobs);

       /**
        * Attaches a {@code DataSource} object to this temp-table {@code Buffer} in a {@code DataSet}
        * object.
        *
        * @param   ds
        *          The handle to the {@code DataSource} to be attached.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "ATTACH-DATA-SOURCE")
       public logical attachDataSource(handle ds);

       /**
        * Attaches a {@code DataSource} object to this temp-table {@code Buffer} in a {@code DataSet}
        * object.
        *
        * @param   ds
        *          The handle to the {@code DataSource} to be attached.
        * @param   pairList
        *          A comma-delimited list of field name pairs that specify a mapping between different
        *          field names in the {@code DataSource} buffer and the {@code DataSset} temp-table
        *          buffer.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "ATTACH-DATA-SOURCE")
       public logical attachDataSource(handle ds, character pairList);

       /**
        * Attaches a {@code DataSource} object to this temp-table {@code Buffer} in a {@code DataSet}
        * object.
        *
        * @param   ds
        *          The handle to the {@code DataSource} to be attached.
        * @param   pairList
        *          A comma-delimited list of field name pairs that specify a mapping between different
        *          field names in the {@code DataSource} buffer and the {@code DataSset} temp-table
        *          buffer.
        * @param   exceptFields
        *          A comma-separated list of fields in the {@code DataSet} object buffer that will not
        *          be populated with data from the data source.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "ATTACH-DATA-SOURCE")
       public logical attachDataSource(handle ds, character pairList, character exceptFields);

       /**
        * Attaches a {@code DataSource} object to this temp-table {@code Buffer} in a {@code DataSet}
        * object.
        *
        * @param   ds
        *          The handle to the {@code DataSource} to be attached.
        * @param   pairList
        *          A comma-delimited list of field name pairs that specify a mapping between different
        *          field names in the {@code DataSource} buffer and the {@code DataSset} temp-table
        *          buffer.
        * @param   exceptFields
        *          A comma-separated list of fields in the {@code DataSet} object buffer that will not
        *          be populated with data from the data source.
        * @param   includeFields
        *          A comma-separated list of fields to include in the {@code DataSet} object buffer,
        *          as an alternative to specifying fields to exclude in except-fields.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "ATTACH-DATA-SOURCE")
       public logical attachDataSource(handle ds,
                                       character pairList,
                                       character exceptFields,
                                       character includeFields);

       /**
        * Detaches the {@code DataSource} from the temp-table buffer in a {@code DataSet} object.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "DETACH-DATA-SOURCE")
       public logical detachDataSource();

       /**
        * Get the handle to the {@code DataSource} object currently attached to the {@code DataSet}
        * object buffer.
        *
        * @return  The value of {@code DATA-SOURCE} as described above.
        */
       @LegacyAttribute(name = "DATA-SOURCE")
       public handle dataSource();

       /**
        * Obtain the handle to the default buffer of the after-image table that corresponds to
        * the buffer of the before-image table currently associated with this buffer handle.
        *
        * @return  The value of {@code AFTER-BUFFER} attribute as described above.
        */
       @LegacyAttribute(name = "AFTER-BUFFER")
       public handle afterBuffer();

       /**
        * Obtain the {@code rowid} of the row in the original before-image table that corresponds to
        * the row in the change table currently associated with this buffer handle.
        *
        * @return  The value of {@code ORIGIN-ROWID} atribute as described above.
        */
       @LegacyAttribute(name = "ORIGIN-ROWID")
       public rowid originRowid();

       /**
        * Obtain the handle to the default buffer of the before-image table that corresponds to
        * the buffer of the after-image table currently associated with this buffer handle.
        *
        * @return  The value of {@code BEFORE-BUFFER} attribute as described above.
        */
       @LegacyAttribute(name = "BEFORE-BUFFER")
       public handle beforeBuffer();

       /**
        * The list of field name pairs for all fields  (in comm-delimited format) in a {@code DataSet}
        * temp-table buffer that are mapped to corresponding fields in an attached data-source object.
        *
        * @return  The value of {@code DATA-SOURCE-COMPLETE-MAP} attribute.
        */
       @LegacyAttribute(name = "DATA-SOURCE-COMPLETE-MAP")
       public character dataSourceCompleteMap();

       /**
        * Obtains the {@code DataSource} row corresponding to this buffer object.
        *
        * @return  The current value of {@code DATA-SOURCE-ROWID} ABL attribute.
        */
       @LegacyAttribute(name = "DATA-SOURCE-ROWID")
       public rowid dataSourceRowid();

       /**
        * Obtains the {@code DataSource} row corresponding to this buffer object.
        *
        * @param   joinLevel
        *          The level of join, if the data-source is a join.
        *
        * @return  The current value of {@code DATA-SOURCE-ROWID} ABL attribute.
        */
       @LegacyAttribute(name = "DATA-SOURCE-ROWID")
       public rowid dataSourceRowid(NumberType joinLevel);

       /**
        * Obtains the {@code DataSource} row corresponding to this buffer object.
        *
        * @param   joinLevel
        *          The level of join, if the data-source is a join.
        *
        * @return  The current value of {@code DATA-SOURCE-ROWID} ABL attribute.
        */
       @LegacyAttribute(name = "DATA-SOURCE-ROWID")
       public rowid dataSourceRowid(long joinLevel);

       /**
        * Obtains the {@code DataSource} row corresponding to this buffer object.
        *
        * @param   buffName
        *          The name of one of the data-source buffers.
        *
        * @return  The current value of {@code DATA-SOURCE-ROWID} ABL attribute.
        */
       @LegacyAttribute(name = "DATA-SOURCE-ROWID")
       public rowid dataSourceRowid(character buffName);

       /**
        * Obtains the {@code DataSource} row corresponding to this buffer object.
        *
        * @param   buffName
        *          The name of one of the data-source buffers.
        *
        * @return  The current value of {@code DATA-SOURCE-ROWID} ABL attribute.
        */
       @LegacyAttribute(name = "DATA-SOURCE-ROWID")
       public rowid dataSourceRowid(String buffName);

       /**
        * Configures the {@code DataSource} row corresponding to this buffer object.
        *
        * @param   val
        *          The new value of {@code DATA-SOURCE-ROWID} ABL attribute.
        */
       @LegacyAttribute(name = "DATA-SOURCE-ROWID", setter = true)
       public void dataSourceRowid(rowid val);

       /**
        * Configures the {@code DataSource} row corresponding to this buffer object.
        *
        * @param   joinLevel
        *          The level of join, if the data-source is a join.
        * @param   val
        *          The new value of {@code DATA-SOURCE-ROWID} ABL attribute.
        */
       @LegacyAttribute(name = "DATA-SOURCE-ROWID", setter = true)
       public void dataSourceRowid(int64 joinLevel, rowid val);

       /**
        * Configures the {@code DataSource} row corresponding to this buffer object.
        *
        * @param   buffName
        *          The name of one of the data-source buffers.
        * @param   val
        *          The new value of {@code DATA-SOURCE-ROWID} ABL attribute.
        */
       @LegacyAttribute(name = "DATA-SOURCE-ROWID", setter = true)
       public void dataSourceRowid(character buffName, rowid val);

       /**
        * Get the handle for the {@code DataSet} object of which the buffer is a member.
        *
        * @return  handle for the {@code DataSet} object of which the buffer is a member.
        */
       @LegacyAttribute(name = "DATASET")
       public handle dataSet();

       /**
        * Counts the relations for which the buffer is the parent. A buffer may be a parent in
        * multiple relations, but a child in only one.
        *
        * @return  The value of {@code NUM-CHILD-RELATIONS} attribute as described above.
        */
       @LegacyAttribute(name = "NUM-CHILD-RELATIONS")
       public integer numChildRelations();

       /**
        * Obtain the handle to the parent data-relation object for the parent of this buffer. Since a
        * buffer may be a child in only one relation, there can be only one parent for any buffer.
        *
        * @return  The value of {@code PARENT-RELATION} attribute as described above.
        */
       @LegacyAttribute(name = "PARENT-RELATION")
       public handle parentRelation();

       /**
        * Creates a blank before-table record for each buffer record, with a {@code ROW-STATE} of
        * {@code ROW-CREATED} for a table with only new data.
        *
        * @return  {@code true} on success.
        */
       @LegacyMethod(name = "MARK-NEW")
       public logical markNew();

       /**
        * Manually set the {@code ROW-STATE} attribute for the current record/row.
        *
        * @param   newState
        *          The new state the record is marked with. Legal values: {@code ROW_CREATED},
        *          {@code ROW_MODIFIED}, {@code ROW_DELETED}, and {@code ROW_UNMODIFIED}.
        *
        * @return {@code true} on success.
        */
       @LegacyMethod(name = "MARK-ROW-STATE")
       public logical markRowState(int64 newState);

       /**
        * Manually set the {@code ROW-STATE} attribute for the current record/row.
        *
        * @param   newState
        *          The new state the record is marked with. Legal values: {@code ROW_CREATED},
        *          {@code ROW_MODIFIED}, {@code ROW_DELETED}, and {@code ROW_UNMODIFIED}.
        *
        * @return {@code true} on success.
        */
       @LegacyMethod(name = "MARK-ROW-STATE")
       public logical markRowState(long newState);

       /**
        * Manually set the {@code ROW-STATE} attribute for the current record/row.
        *
        * @param   newState
        *          The new state the record is marked with. Legal values: {@code ROW_CREATED},
        *          {@code ROW_MODIFIED}, {@code ROW_DELETED}, and {@code ROW_UNMODIFIED}.
        * @param   before
        *          A handle to the before-image source buffer.
        *
        * @return {@code true} on success.
        */
       @LegacyMethod(name = "MARK-ROW-STATE")
       public logical markRowState(int64 newState, handle before);

       /**
        * Manually set the {@code ROW-STATE} attribute for the current record/row.
        *
        * @param   newState
        *          The new state the record is marked with. Legal values: {@code ROW_CREATED},
        *          {@code ROW_MODIFIED}, {@code ROW_DELETED}, and {@code ROW_UNMODIFIED}.
        * @param   before
        *          A handle to the before-image source buffer.
        *
        * @return {@code true} on success.
        */
       @LegacyMethod(name = "MARK-ROW-STATE")
       public logical markRowState(long newState, handle before);

       /**
        * Obtain the handle to a {@code DataRelation} object for which the buffer is the parent.
        *
        * @param   index
        *          The index of the data-relation object (1-based).
        *
        * @return  the handle to a {@code DataRelation} object for which the buffer is the parent.
        */
       @LegacyMethod(name = "GET-CHILD-RELATION")
       public handle childRelation(long index);

       /**
        * Obtain the handle to a {@code DataRelation} object for which the buffer is the parent.
        *
        * @param   index
        *          The index of the data-relation object (1-based).
        *
        * @return  the handle to a {@code DataRelation} object for which the buffer is the parent.
        */
       @LegacyMethod(name = "GET-CHILD-RELATION")
       public handle childRelation(int64 index);

       /**
        * Definition of the SYNCHRONIZE method.
        *
        * @return   <code>true</code> if the synchronization was performed.
        */
       @LegacyMethod(name = "SYNCHRONIZE")
       public logical querySynchronize();

       /**
        * Obtain a comma-separated list of field name pairs for fields in a {@code DataSet}
        * temp-table buffer that are mapped to corresponding fields in an attached {@code DataSource}
        * object. This list includes only the field name pairs you specified with the most recently
        * attached data-source object, in the order they were specified.
        *
        *
        * @return  the list of attach fields, as described above.
        */
       @LegacyMethod(name = "ATTACHED-PAIRLIST")
       public character attachedPairlist();

       /**
        * Merges single changed row of a single temp-table in a source {@code DataSet} object loaded
        * with the {@code GET-CHANGES()} method into the corresponding rows of a single temp-table
        * into the original (target) {@code DataSet} buffer.
        *
        * @return  {@code true} if operation is successful.
        */
       @LegacyMethod(name = "MERGE-ROW-CHANGES")
       public logical mergeRowChanges();

       /**
        * Merges single changed row of a single temp-table in a source {@code DataSet} object loaded
        * with the {@code GET-CHANGES()} method into the corresponding rows of a single temp-table
        * into the original (target) {@code DataSet} buffer.
        *
        * @param   original
        *          A handle to the original (target) buffer object of a single target {@code DataSet}
        *          temp-table to merge with the changed rows from the source object.
        *
        * @return  {@code true} if operation is successful.
        */
       @LegacyMethod(name = "MERGE-ROW-CHANGES")
       public logical mergeRowChanges(handle original);

       /**
        * Merges single changed row of a single temp-table in a source {@code DataSet} object loaded
        * with the {@code GET-CHANGES()} method into the corresponding rows of a single temp-table
        * into the original (target) {@code DataSet} buffer.
        *
        * @param   original
        *          A handle to the original (target) buffer object of a single target {@code DataSet}
        *          temp-table to merge with the changed rows from the source object.
        * @param   allCopyMode
        *          Use {@code TRUE} to indicates that all rows of the source after-image table must be
        *          merged.
        *
        * @return  {@code true} if operation is successful.
        */
       @LegacyMethod(name = "MERGE-ROW-CHANGES")
       public logical mergeRowChanges(handle original, boolean allCopyMode);

       /**
        * Merges single changed row of a single temp-table in a source {@code DataSet} object loaded
        * with the {@code GET-CHANGES()} method into the corresponding rows of a single temp-table
        * into the original (target) {@code DataSet} buffer.
        *
        * @param   original
        *          A handle to the original (target) buffer object of a single target {@code DataSet}
        *          temp-table to merge with the changed rows from the source object.
        * @param   allCopyMode
        *          Use {@code TRUE} to indicates that all rows of the source after-image table must be
        *          merged.
        *
        * @return  {@code true} if operation is successful.
        */
       @LegacyMethod(name = "MERGE-ROW-CHANGES")
       public logical mergeRowChanges(handle original, logical allCopyMode);

       /**
        * Getter for the IS-MULTI-TENANT attribute.
        *
        * @return   See above.
        */
       @LegacyAttribute(name = "IS-MULTI-TENANT")
       public logical isMultiTenant();

       /**
        * Setter for the IS-MULTI-TENANT attribute.
        *
        * @param    l
        *           The flag value.
        */
       @LegacyAttribute(name = "IS-MULTI-TENANT", setter = true)
       public void setMultiTenant(logical l);

       /**
        * Setter for the IS-MULTI-TENANT attribute.
        *
        * @param    l
        *           The flag value.
        */
       @LegacyAttribute(name = "IS-MULTI-TENANT", setter = true)
       public void setMultiTenant(boolean l);

       /**
        * Definition of the SERIALIZE-ROW method. Writes current row from this buffer into the specified data
        * target, using the specified format.
        *
        * @param   targetFormat
        *          The format ("xml" or "json").
        * @param   target
        *          Data target.
        * @param   formatted
        *          {@code True} to format the data for making it more readable; {@code false} to write it
        *          as unformatted text. Unknown value is treated as {@code false}.
        * @param   encoding
        *          Name of the character encoding to use.
        * @param   omitInitialValues
        *          {@code True} to omit data for fields whose values match their initial values.
        *
        * @return  {@code True} if the operation completed successfully, else {@code false}.
        */
       @LegacyMethod(name = "SERIALIZE-ROW")
       public logical serializeRow(character  targetFormat,
                                   TargetData target,
                                   logical    formatted,
                                   character  encoding,
                                   logical    omitInitialValues);

       /**
        * Definition of the SERIALIZE-ROW method. Writes current row from this buffer into the specified data
        * target, using the specified format.
        *
        * @param   targetFormat
        *          The format ("xml" or "json").
        * @param   target
        *          Data target.
        * @param   formatted
        *          {@code True} to format the data for making it more readable; {@code false} to write it
        *          as unformatted text. Unknown value is treated as {@code false}.
        * @param   encoding
        *          Name of the character encoding to use.
        *
        * @return  {@code True} if the operation completed successfully, else {@code false}.
        */
       @LegacyMethod(name = "SERIALIZE-ROW")
       public logical serializeRow(character targetFormat,
                                   TargetData target,
                                   logical    formatted,
                                   character  encoding);

       /**
        * Definition of the SERIALIZE-ROW method. Writes current row from this buffer into the specified data
        * target, using the specified format.
        *
        * @param   targetFormat
        *          The format ("xml" or "json").
        * @param   target
        *          Data target.
        * @param   formatted
        *          {@code True} to format the data for making it more readable; {@code false} to write it
        *          as unformatted text. Unknown value is treated as {@code false}.
        *
        * @return  {@code True} if the operation completed successfully, else {@code false}.
        */
       @LegacyMethod(name = "SERIALIZE-ROW")
       public logical serializeRow(character targetFormat, TargetData target, logical formatted);

       /**
        * Definition of the SERIALIZE-ROW method. Writes current row from this buffer into the specified data
        * target, using the specified format.
        *
        * @param   targetFormat
        *          The format ("xml" or "json").
        * @param   target
        *          Data target.
        *
        * @return  {@code True} if the operation completed successfully, else {@code false}.
        */
       @LegacyMethod(name = "SERIALIZE-ROW")
       public logical serializeRow(character targetFormat, TargetData target);

       /**
        * Definition of the SERIALIZE-ROW method. Writes current row from this buffer into the specified data
        * target, using the specified format.
        *
        * @param   targetFormat
        *          The format ("xml" or "json").
        * @param   target
        *          Data target.
        * @param   formatted
        *          {@code True} to format the data for making it more readable; {@code false} to write it
        *          as unformatted text. Unknown value is treated as {@code false}.
        * @param   encoding
        *          Name of the character encoding to use.
        * @param   omitInitialValues
        *          {@code True} to omit data for fields whose values match their initial values.
        * @param   omitOuterObject
        *          {@code True} to omit data for the outermost object from the output.
        *
        * @return  {@code True} if the operation completed successfully, else {@code false}.
        */
       @LegacyMethod(name = "SERIALIZE-ROW")
       public logical serializeRow(character  targetFormat,
                                   TargetData target,
                                   logical    formatted,
                                   character  encoding,
                                   logical    omitInitialValues,
                                   logical    omitOuterObject);

       /**
        * Get the BUFFER:AUTO-DELETE attribute.
        *
        * @return  the value of BUFFER:AUTO-DELETE attribute.
        */
       @LegacyAttribute(name = "AUTO-DELETE")
       public logical autoDelete();

       /**
        * Set the BUFFER:AUTO-DELETE attribute.
        *
        * @param    autoDelete
        *           The flag state.
        */
       @LegacyAttribute(name = "AUTO-DELETE", setter = true)
       public void autoDelete(boolean autoDelete);

       /**
        * Set the BUFFER:AUTO-DELETE attribute.
        *
        * @param    autoDelete
        *           The flag state.
        */
       @LegacyAttribute(name = "AUTO-DELETE", setter = true)
       public void autoDelete(logical autoDelete);

       /**
        * Get the BUFFER:CAN-READ attribute.
        *
        * @return  the value of BUFFER:CAN-READ attribute.
        */
       @LegacyAttribute(name = "CAN-READ")
       public logical canRead();

       /**
        * Get the BUFFER:AUTO-SYNCHRONIZE attribute.
        *
        * @return  the value of BUFFER:AUTO-SYNCHRONIZE attribute.
        */
       @LegacyAttribute(name = "AUTO-SYNCHRONIZE")
       public logical autoSynchronize();

       /**
        * Get the BUFFER:AUTO-SYNCHRONIZE attribute.
        *
        * @return  the value of BUFFER:AUTO-SYNCHRONIZE attribute.
        */
       @LegacyAttribute(name = "AUTO-SYNCHRONIZE", setter = true)
       public void autoSynchronize(boolean autoSyncronize);

       /**
        * Get the BUFFER:AUTO-SYNCHRONIZE attribute.
        *
        * @return  the value of BUFFER:AUTO-SYNCHRONIZE attribute.
        */
       @LegacyAttribute(name = "AUTO-SYNCHRONIZE", setter = true)
       public void autoSynchronize(logical autoSyncronize);
    }