Class AbstractSortBean

java.lang.Object
com.softwaremining.wrappers.CBLBean
com.softwaremining.wrappers.AbstractSortBean
All Implemented Interfaces:
AbstractDataObject, ICBLBeanNGroup, ICBLContainer, IFieldContainer, ISMBean, ISMDataType

public abstract class AbstractSortBean extends CBLBean
Providing Sort Capabilities to DataBeans
  • Constructor Details

    • AbstractSortBean

      public AbstractSortBean()
      for internal use only ... profiling information
    • AbstractSortBean

      public AbstractSortBean(BaseService owner)
  • Method Details

    • retrieveFirstLevelEntry

      public abstract AbstractCBLField retrieveFirstLevelEntry()
    • setAccessMode

      public void setAccessMode(int value)
    • setDuplicatesInOrder

      public void setDuplicatesInOrder(boolean duplicatesInOrder)
      Controls Sort of records with duplicate keys: Whether original order is maintained. Defaults is to true
      Parameters:
      duplicatesInOrder -
    • addKeyAscending

      public void addKeyAscending(ISMObject field)
    • addKeyAscending

      public void addKeyAscending(String[] keyNames)
    • addKeyDescending

      public void addKeyDescending(String[] keyNames)
    • addKeyAscending

      public void addKeyAscending(ISMObject[] fields)
    • addKeyDescending

      public void addKeyDescending(ISMObject[] fields)
    • addKeyDescending

      public void addKeyDescending(AbstractCBLField field)
    • setEbcdicSort

      public void setEbcdicSort(boolean newValue)
      ===== WARNING ====>: Please note, DO NOT use when sorting Numeric VALUES In ASCII character '1' is before 'A', in EBCDIC it is the other way ('A' before '1') Setting EBCDIC Sort will convert all the values to EBCDIC before comparison (Hence lower performance).
      Parameters:
      newValue -
    • next

      public void next()
    • nextRecord

      public void nextRecord() throws AtEndException, IOStatusException
      Throws:
      AtEndException
      IOStatusException
    • isEof

      public boolean isEof() throws CBLException
      have we reached the end of the file ?
      Returns:
      Throws:
      CBLException
    • size

      public int size()
      have we reached the end of the file ?
      Returns:
      Throws:
      CBLException
    • release

      public void release()
      The release statement transfers records from the INPUT PROCEDURE to the input Phase of the sort operation.
      Internally, it will call the InsertRecord() method for performing the transfer.
    • releaseRecord

      public void releaseRecord()
      The release statement transfers records from the INPUT PROCEDURE to the input Phase of the sort operation.
      Internally, it will call the InsertRecord() method for performing the transfer.
      The "xxxRecord" is generated by the translator when it expect there may be an Exception. In this case, it doesn't apply. The method is here merely to provide consistency with Translator
    • sort

      public void sort()
      Sort data (See COBOL's SORT statement)
    • merge

      public void merge()
      Merge two or more files (See COBOL's MERGE statement)
    • insert

      public void insert()
      insert a record into the to-be-sorted-list
    • assignStatus

      public void assignStatus(ISMObject status)
    • assignStatusValue

      public void assignStatusValue(int value)
      Used internally to set the IO operation status-values. Also if a FileStatus field is defined, the system will allocate correct values to it.
      Parameters:
      value - - .. one of ACMBasePersistent.STATUS_xxxx
    • assignStatusValue

      protected void assignStatusValue(String value)
      Method for assigning a string to the status. Note that in MicroFOcus, the LOCK status is represented bt "9D", ie the 2nd value is a String
      Parameters:
      value -
    • retrieveStatusValue

      public int retrieveStatusValue()
      Used internally to set the IO operation status-values. Also if a FileStatus field is defined, the system will allocate correct values to it.
      Returns:
      - the status value .. one of ACMBasePersistent.STATUS_xxxx
    • retrieveSortResult

      public int retrieveSortResult()
    • retrieveStatusField

      public ISMObject retrieveStatusField()
      Used internally to set the IO operation status-values.
    • assignSortModeSize

      public void assignSortModeSize(int size)
      Deprecated.
      - not needed or supported
    • loadForMerge

      public void loadForMerge(AbstractBasePersistence file) throws CBLException
      load a file for Merge operation
      Parameters:
      file -
      Throws:
      CBLException
    • load

      public void load(AbstractBasePersistence file) throws CBLException
      load a file for Sort Operation
      Parameters:
      file -
      Throws:
      CBLException
    • save

      public void save(AbstractSequentialFile file) throws CBLException
      Throws:
      CBLException