com.tietoenator.trip.jxp.database

## Class TdbCompressionContext

- java.lang.Object
- - com.tietoenator.trip.jxp.database.TdbCompressionContext

- All Implemented Interfaces:
    com.tietoenator.trip.jxp.internal.utils.DOMSink

      public class TdbCompressionContext
      extends java.lang.Object
      implements com.tietoenator.trip.jxp.internal.utils.DOMSink

  This class provides contextual information for a database compression operation via the Compress method on the TdbDatabaseDesign class. Individual iterations of compression (i.e. calls within a complete cycle) are tied together using an instance of this class.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TdbCompressionContext()` Constructor, create a new blank context.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getKeepRecordIds()` Check whether the compression operation is maintaining record IDs.
    `int` | `getMaxRecs()` Retrieve the total number of records to be compressed.
    `java.lang.String` | `getNewName()` Retrieve the new filename of the database's BAF.
    `int` | `getProgress()` Retrieve the progress made to date by the compression operation.
    `boolean` | `hasUnindexedRecords()` Check if the database to be compressed contains modified unindexed records.
    `boolean` | `isComplete()` Check whether the compression operation has completed on the server
    `boolean` | `isStarted()` Check whether the compression operation has been started on the server
    `void` | `setKeepRecordIds(boolean keep)` Establish whether to maintain record IDs during compression.
    `void` | `setNewName(java.lang.String filename)` Set the new filename of the database's BAF.

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

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

    - ### Methods inherited from interface com.tietoenator.trip.jxp.internal.utils.DOMSink

      `sinkNode`

- - ### Constructor Detail

    - #### TdbCompressionContext

          public TdbCompressionContext()

      Constructor, create a new blank context.

  - ### Method Detail

    - #### isStarted

          public boolean isStarted()

      Check whether the compression operation has been started on the server
      Returns:
        true if the operation has started

    - #### isComplete

          public boolean isComplete()

      Check whether the compression operation has completed on the server
      Returns:
        true if the operation has completed

    - #### hasUnindexedRecords

          public boolean hasUnindexedRecords()

      Check if the database to be compressed contains modified unindexed records. This property is only valid after the first call to the Compress method on the TdbDatabaseDesign class.
      Returns:
        true if the database contains modified unindexed records.

    - #### getNewName

          public java.lang.String getNewName()

      Retrieve the new filename of the database's BAF.
      Returns:
        The name of the BAF that will contain the compressed form of the database contents.

    - #### setNewName

          public void setNewName(java.lang.String filename)

      Set the new filename of the database's BAF. This file will contain the result of the compression operation, the original BAF is unaffected.
      Parameters:
        `filename` - The name of the new file.

    - #### getMaxRecs

          public int getMaxRecs()

      Retrieve the total number of records to be compressed. This property is only valid after the first call to the Compress method on the TdbDatabaseDesign class.
      Returns:
        Total number of records to be compressed.

    - #### getProgress

          public int getProgress()

      Retrieve the progress made to date by the compression operation. This property assumes that the compression is operating iteratively, and has no meaning if the operation is being performed all at once.
      Returns:
        NUmber of records compressed to date.

    - #### getKeepRecordIds

          public boolean getKeepRecordIds()

      Check whether the compression operation is maintaining record IDs.
      Returns:
        true if record IDs are being maintained during the operation.

    - #### setKeepRecordIds

          public void setKeepRecordIds(boolean keep)

      Establish whether to maintain record IDs during compression. If this is set false, the database will require reindexing following compression.
      Parameters:
        `keep` - Flag determining whether to keep record IDs during compression.