Class TdbDatabaseDesign

All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink, TdbControlObjectProvider
Direct Known Subclasses:
TdbThesaurusDesign

public class TdbDatabaseDesign extends TdbSerializableObject implements com.tietoenator.trip.jxp.internal.utils.DOMSink
Container and manipulation logic for a database design.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor, creates a new, blank container
    Constructor, creates a container for the database referenced by the provided Control object
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Append a new field definition to the current design.
    void
    addForeignKey(String key, String linkdb, String linkfld, TdbIntegrityType on_update, TdbIntegrityType on_delete)
    Create a foreign key relationship between this database (as the slave) and another database (as the master).
    boolean
    Check if database's data file (BAF) needs to be defragmented.
    boolean
    Check if database's primary index file (BIF) needs to be defragmented.
    void
    changeMgr(String newmgr)
    Transfer ownership of all databases from the calling user to another.
    void
    changeMgr(String newmgr, String oldmgr)
    Transfer ownership of all databases from one user to another.
    void
    changeMgr(String newmgr, String oldmgr, String name)
    Transfer ownership of one or more database objects from one user to another.
    void
    compress(TdbCompressionContext ctx, boolean all)
    Requests a database compression operation, akin to the command line utility PACKIT.
    void
    copy(String newname, TdbControlObject newobj)
    Create a shallow copy of the current database / thesaurus, preserving base design but ignoring associated reports / forms, locations and access rights.
    boolean
    Check if any of the database's files (BAF, BIF or VIF) need to be defragmented.
    void
    deepCopy(String newname, TdbControlObject newobj)
    Create a deep copy of the current database / thesaurus, creating a new one that is exactly the same, but with a different name (and correspondibly different filenames on the server).
    void
    Delete the current database from the server.
    void
    delete(String name)
    Delete a named database from the server.
    void
    Remove any existing foreign key relationship from the named field.
    void
    Removes all existing referential integrity rules from the database design.
    void
    Check the database's primary data file (the BAF) for errors or conditions that might cause errors in the future.
    void
    diagnose(TdbErrorCheckSink sink, int phase)
    Check the database's primary data file (the BAF) for errors or conditions that might cause errors in the future.
    void
    export(String filename)
    Exports the current database's design to the named file, including all associated form definitions and file specifications.
    void
    export(String filename, boolean full, boolean incfiles)
    Export the current database's design to the named file, optionally including all associated form definitions.
    void
    export(String db, String filename, boolean full, boolean incfiles)
    Export the named database's design to the named file, optionally including all associated form definitions.
    Retrieve the field collection, i.e. the set of field designs that comprise the database design.
    void
    get()
    Retrieve the database design of the database referenced by the Control object used to construct this object.
    void
    get(String name)
    Retrieve the named database design and all associated properties.
    void
    get(String name, boolean update)
    Retrieve the named database design and all associated properties, optionally with the default database design parameters in preparation for the creation of a new database.
    Retrieve an opaque identifier that applications can use to store whatever they desire.
    Retrieve the name of the ASE function that is called whenever a record is being committed to the database, after the record has actually been written to physical storage.
    Retrieve the name of the ASE function that will be invoked after submitting a background task to an execution queue.
    Retrieve the name of the ASE function that is called whenever a record is being committed to the database, before the record has actually been written to physical storage.
    Retrieve the name of the ASE function that will be invoked prior to submitting a background task to an execution queue.
    Retrieve the filename of the database's data file (the BAF)
    Retrieve the filename of the database's primary index file (the BIF)
    Retrieve the "native" character set that will be used within the database.
    Retrieve the type of word segmentation algorithm that is being used to process Chinese text in this database.
    Retrieve the name of the classification scheme (database) that will be used to classify records within this database.
    Retrieve the name of the default TRIPclassic entry form for the database.
    Retrieve the name of the default output format for the database.
    Retrieve any comment or description associated with the database design
    Retrieve the list of TRIPclassic entry forms defined for the database
    getFieldById(int id)
    Retrieve a reference to the design for a field with the specified field number.
    getFieldByIndex(int index)
    Retrieve the n'th field within the database design.
    Retrieve the named field within the database design.
    int
    Retrieve a count of the number of fields in this database design.
    Retrieve a reference to the design for a field group with the specified field number.
    Retrieve the n'th field group within the database design.
    Retrieve the named field group within the database design.
    int
    Retrieve a count of the number of fields groups in this database design.
    Get the field groups collection for the database.
    Retrieve the character folding class to be applied to data within the database.
    Retrieve the indexing rules (parsing rules) that are to be applied to data stored in this database.
    Retrieve the natural language used for the text in the database.
    Retrieve the last index date/time for the database
    Retrieve the last update date/time for the database
    Retrieve the filename of the database's transaction log file
    Retrieve the database's name
    Retrieve the list of avaiable output formats defined for the database
    Retrieve the name of the database's owner.
    Retrieve the name of the record part name field, i.e. the field that holds the primary key of part records within a particular record.
    int
    Retrieve the number of records in the database; this count does not only include records that have been indexed, but rather is the physical count of records in the BAF.
    Retrieve the name of the record name field, i.e. the database's primary key field.
    Retrieve the name of the record number field, i.e. the field that will hold the ordinal identifier assigned to each record by the server during storage.
    boolean
    Check if the logfiles generated by background tasks are being kept or discarded.
    boolean
    Check if background tasks should attempt to notify foreground tasks when they complete.
    int
    Retrieve the server-specific submit options for background tasks.
    boolean
    Check if the logfiles generated by background tasks will be queued for printing upon completion of the task.
    Retrieve the name of the submission queue to which background tasks will be sent by the server.
    boolean
    Check if a query audit trail is established for this database.
    boolean
    Check if the database's index files automatically reorganize, or whether the DBA gets alerted to the fact that the files are in need of reorganization.
    boolean
    Check if the database's transaction log file contains the full content of records that are deleted, or simply a delete marker.
    Retrieve the filename of the database's secondary index file (the VIF)
    Retrieve the set of normally unindexed characters that are to be considered searchable within this database.
    boolean
    Check if this database has a record part name field defined
    boolean
    Check if this database has a record name field defined, i.e. a primary key.
    boolean
    Check if this database has a record number field defined
    void
    importDesign(String filename, String name)
    Import a new database or thesaurus design from a named file.
    void
    importUpdate(String filename)
    Import an update to the current database's / thesaurus' design from a named file.
    void
    importUpdate(String filename, String name)
    Import an update to an existing database / thesaurus from a named file.
    void
    Request a background task be submitted to index the current database.
    void
    index(boolean reindex, boolean batchjob)
    Request the current database to be indexed.
    Retrieve a collection of integrity rules established for the database.
    boolean
    Check if the database is an import connector database.
    boolean
    Check if the database is a graph database.
    boolean
    Check if the calling user has ownership rights to this database.
    boolean
    Check if the database is enabled for XML storage and XPath searching.
    void
    load(String tform)
    Request a background task to be submitted to load the named TFORM file into the current database.
    void
    Request a background task to be submitted to load and subsequently index the named TFORM file into the current database.
    void
    Request a background task to be submitted to load and subsequently reindex the named TFORM file into the current database.
    void
    put()
    Store the current design to the server, including all associated properties.
    void
    put(String name)
    Commit a new/updated database design to the server, including all associated properties.
    void
    Store a single modified field's properties to the server.
    void
    Store a single modified field group's properties to the server.
    void
    Store the current database's field group collection to the server.
    void
    Store the current database's fields collection to the server.
    void
    Store the general and indexing properties of the current design to the server.
    void
    Store the general and indexing properties of the named design to the server.
    void
    Deprecated.
    Use index(boolean,boolean) instead.
    void
    Remove a particular field from the current database design.
    void
    Remove a particular field group from the current database design.
    void
    rename(String newname)
    Rename the current database.
    void
    Establish an opaque identifier that applications can use to store whatever they desire.
    void
    Establish the name of an ASE function that will be called whenever a record is being committed to the database, after the record has actually been written to physical storage.
    void
    Establish the name of the ASE function that will be invoked after submitting a background task to an execution queue.
    void
    Establish the name of an ASE function that will be called whenever a record is being committed to the database, before the record has actually been written to physical storage.
    void
    Establish the name of the ASE function that will be invoked prior to submitting a background task to an execution queue.
    void
    setBafFile(String filename)
    Establish the filename of the database's data file (the BAF)
    void
    setBifFile(String filename)
    Establish the filename of the database's primary index file (the BIF)
    void
    Establish the "native" character set that will be used within the database.
    void
    Establish the type of word segmentation algorithm that should be used to process Chinese text in this database.
    void
    Establish the name of the classification scheme (database) that will be used to classify records within this database.
    void
    setConnectorDatabase(boolean mode)
    Establish whether the database should be an import connector database.
    void
    Establish the name of the default TRIPclassic entry form for the database.
    void
    Establish the name of the default output format for the database.
    void
    Establish a comment or description to associate with the database design
    void
    Set the field groups collection for the database.
    void
    Replace or establish the field collection, i.e. the set of field designs that comprise the database design.
    void
    Establish the character folding class to be applied to data within the database.
    void
    setGraph(boolean mode)
    Establish whether the database should be a graph database.
    void
    Establish the indexing rules (parsing rules) that are to be applied to data stored in this database.
    void
    Establish a new set of integrity rules for the database.
    void
    Establish the natural language used for the text in the database.
    void
    setLogFile(String filename)
    Establish the filename of the database's transaction log file
    void
    Establish the database's name
    void
    Establish the name of the record part name field, i.e. the field that will hold the primary key of part records within a particular record.
    void
    Establish the name of the record name field, i.e. the database's primary key field.
    void
    Establish the name of the record number field, i.e. the field that will hold the ordinal identifier assigned to each record by the server during storage.
    void
    setSubmitKeepLogfile(boolean mode)
    Establish whether the logfiles generated by background tasks should be kept or discarded.
    void
    Establish whether background tasks should attempt to notify foreground tasks when they complete.
    void
    setSubmitOptions(int options)
    Establish the server-specific submit options for background tasks.
    void
    setSubmitPrintLogfile(boolean mode)
    Establish whether the logfiles generated by background tasks should be queued for printing upon completion of the task.
    void
    Establish the name of the submission queue to which background tasks will be sent by the server.
    void
    setUsesAudit(boolean mode)
    Establish a query audit trail for this database.
    void
    setUsesAutoReorg(boolean mode)
    Establish whether the database's index files should automatically reorganize, or whether the DBA should be alerted to the fact that the files are in need of reorganization.
    void
    setUsesLogDeletes(boolean mode)
    Establish whether the database's transaction log file should contain the full content of records that are deleted, or simply a delete marker.
    void
    setVifFile(String filename)
    Establish the filename of the database's secondary index file (the VIF)
    void
    Retrieve the set of normally unindexed characters that are to be considered searchable within this database.
    void
    setXmlEnabled(boolean mode)
    Establish whether the database should be enabled for XML storage and XPath searching.
    void
    Refresh the status information of the current database.
    void
    status(String name)
    Refresh the status information of the named database.
    void
    Validate a particular field's design against the database design.
    void
    validateRestriction(int type, String rest, boolean pattern, boolean fileref)
    Attempt to validate that a restriction value is valid for a particular type of field; this checks both the availability of the restriction type for that field type, and the data type of the restriction.
    boolean
    Check if database's secondary index file (VIF) needs to be defragmented.

    Methods inherited from class com.tietoenator.trip.jxp.session.TdbSerializableObject

    getControlObject

    Methods inherited from class com.tietoenator.trip.jxp.TdbMessageProvider

    codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages

    Methods inherited from class com.tietoenator.trip.jxp.session.TdbSessionObject

    cancel, getSession, isCancelable, setCancelable

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TdbDatabaseDesign

      public TdbDatabaseDesign(TdbSession session) throws TdbException
      Constructor, creates a new, blank container
      Parameters:
      session - Active session
      Throws:
      TdbException
    • TdbDatabaseDesign

      public TdbDatabaseDesign(TdbSession session, TdbControlObject ob) throws TdbException
      Constructor, creates a container for the database referenced by the provided Control object
      Parameters:
      session - Active session
      ob - Control object referencing the database required
      Throws:
      TdbException
  • Method Details

    • isOwner

      public boolean isOwner()
      Check if the calling user has ownership rights to this database. This method may return true even if the calling user is not the actual owner. This happens if the calling user is SYSTEM and the TDBS_SUPERMAN configuration property has been set on the server.
      Returns:
      true if the calling user has ownership rights to this database
    • getName

      public String getName()
      Retrieve the database's name
      Returns:
      Database name
    • setName

      public void setName(String name)
      Establish the database's name
      Parameters:
      name - Database name
    • getOwnerName

      public String getOwnerName()
      Retrieve the name of the database's owner.
      Returns:
      Name of user who owns the database
    • getRecordCount

      public int getRecordCount()
      Retrieve the number of records in the database; this count does not only include records that have been indexed, but rather is the physical count of records in the BAF.
      Returns:
      Record count
    • getFieldCount

      public int getFieldCount()
      Retrieve a count of the number of fields in this database design. NOTE: This is not the same as the max field number in the database design.
      Returns:
      The number of fields in the database design.
    • fields

      public List<TdbFieldDesign> fields()
      Retrieve the field collection, i.e. the set of field designs that comprise the database design. This method returns a snapshot copy of the field collection. For repeated use, please retain the object returned.
      Returns:
      Field collection
    • setFields

      public void setFields(Collection<TdbFieldDesign> fields)
      Replace or establish the field collection, i.e. the set of field designs that comprise the database design.
      Parameters:
      fields - Field collection
    • getFieldGroupCount

      public int getFieldGroupCount()
      Retrieve a count of the number of fields groups in this database design.
      Returns:
      The number of field groups in the database design.
      Since:
      TRIPjxp 8.0-0
    • getFieldGroups

      public List<TdbFieldGroupDesign> getFieldGroups()
      Get the field groups collection for the database.
      Since:
      TRIPjxp 8.0-0
    • setFieldGroups

      public void setFieldGroups(Collection<TdbFieldGroupDesign> groups)
      Set the field groups collection for the database.
      Since:
      TRIPjxp 8.0-0
    • integrityRules

      public List<TdbIntegrityRule> integrityRules()
      Retrieve a collection of integrity rules established for the database. The resulting collection is a snapshot copy (is not live), and cannot be used to propagate changes down to the underlying rule set.
      Returns:
      Integrity rules collection
    • setIntegrityRules

      public void setIntegrityRules(Collection<TdbIntegrityRule> rules)
      Establish a new set of integrity rules for the database. This provided rule set completely replaces any existing rules defined for the database.
      Parameters:
      rules - New integrity rules collection
    • getIndexingRules

      public TdbTextSeparators getIndexingRules()
      Retrieve the indexing rules (parsing rules) that are to be applied to data stored in this database. The result of this function is a copy of the current indexing rules and cannot be used to update the underlying design. Use setIndexingRules()) to store any modifications to the rule set.
      Returns:
      Indexing rules
    • setIndexingRules

      public void setIndexingRules(TdbTextSeparators spec)
      Establish the indexing rules (parsing rules) that are to be applied to data stored in this database.
      Parameters:
      spec - Indexing rules
    • getBafFile

      public String getBafFile()
      Retrieve the filename of the database's data file (the BAF)
      Returns:
      BAF specification
    • setBafFile

      public void setBafFile(String filename)
      Establish the filename of the database's data file (the BAF)
      Parameters:
      filename - New BAF specification
    • getBifFile

      public String getBifFile()
      Retrieve the filename of the database's primary index file (the BIF)
      Returns:
      BIF specification
    • setBifFile

      public void setBifFile(String filename)
      Establish the filename of the database's primary index file (the BIF)
      Parameters:
      filename - New BIF specification
    • getVifFile

      public String getVifFile()
      Retrieve the filename of the database's secondary index file (the VIF)
      Returns:
      VIF specification
    • setVifFile

      public void setVifFile(String filename)
      Establish the filename of the database's secondary index file (the VIF)
      Parameters:
      filename - New VIF specification
    • getLogFile

      public String getLogFile()
      Retrieve the filename of the database's transaction log file
      Returns:
      Logfile specification
    • setLogFile

      public void setLogFile(String filename)
      Establish the filename of the database's transaction log file
      Parameters:
      filename - New logfile specification
    • getWordChars

      public String getWordChars()
      Retrieve the set of normally unindexed characters that are to be considered searchable within this database.
      By default, there is a reasonably small number of characters within each character set that are indexed, e.g. alphanumerics. Specifically, punctuation characters are normally excluded, so if the application requires characters such as ^ or / to be indexed, they need to be set in the "word characters" set.
      Returns:
      Special indexable characters
    • setWordChars

      public void setWordChars(String chars)
      Retrieve the set of normally unindexed characters that are to be considered searchable within this database.
      By default, there is a reasonably small number of characters within each character set that are indexed, e.g. alphanumerics. Specifically, punctuation characters are normally excluded, so if the application requires characters such as ^ or / to be indexed, they need to be set in the "word characters" set.
      Parameters:
      chars - Special indexable characters
    • getAsePreCommit

      public String getAsePreCommit()
      Retrieve the name of the ASE function that is called whenever a record is being committed to the database, before the record has actually been written to physical storage.
      Returns:
      ASE name, if any
    • setAsePreCommit

      public void setAsePreCommit(String ase)
      Establish the name of an ASE function that will be called whenever a record is being committed to the database, before the record has actually been written to physical storage.
      Parameters:
      ase - ASE name
    • getAsePostCommit

      public String getAsePostCommit()
      Retrieve the name of the ASE function that is called whenever a record is being committed to the database, after the record has actually been written to physical storage.
      Returns:
      ASE name, if any
    • setAsePostCommit

      public void setAsePostCommit(String ase)
      Establish the name of an ASE function that will be called whenever a record is being committed to the database, after the record has actually been written to physical storage.
      Parameters:
      ase - ASE name
    • getCharacterSet

      public String getCharacterSet()
      Retrieve the "native" character set that will be used within the database. This property is reserved for use with Unicode databases. Retrieving this property with a non-Unicode database has no meaning.
      Returns:
      Native character set, if any
    • setCharacterSet

      public void setCharacterSet(String charset)
      Establish the "native" character set that will be used within the database. This property is reserved for use with Unicode databases. Setting this property with a non-Unicode database has no meaning.
      Parameters:
      charset - Native character set name
    • getFoldingClass

      public String getFoldingClass()
      Retrieve the character folding class to be applied to data within the database.

      Character folding is used to indicate that language-specific character replacement should be performed. This is meaningful only for non-English text and is used to exchange certain characters with others based on phonetic similarity or difference, for example the sound of the Swedish national characters �, and � exist in the Norwegian language as well but they have different character representations, namely �, and �. So, if you use SWE as the folding class, these Norwegian characters will be converted to their Swedish equivalent when indexing and/or searching.

      This means that you can search for Norwegian words, names, etc. within a Swedish database, which can be very useful as national keyboards only have one variety of these phonetically similar characters and using tools such as the Windows character map is an annoyingly cumbersome option for end users.

      Note that you can also fold a Swedish/German/Norwegian/etc. database to ENG, which means that all diacritics are removed and just the base forms of characters are used.

      Folding as MUL (the default) means that no character conversion is performed.

      Returns:
      Folding class
    • setFoldingClass

      public void setFoldingClass(String folding)
      Establish the character folding class to be applied to data within the database.

      Character folding is used to indicate that language-specific character replacement should be performed. This is meaningful only for non-English text and is used to exchange certain characters with others based on phonetic similarity or difference, for example the sound of the Swedish national characters �, and � exist in the Norwegian language as well but they have different character representations, namely �, and �. So, if you use SWE as the folding class, these Norwegian characters will be converted to their Swedish equivalent when indexing and/or searching.

      This means that you can search for Norwegian words, names, etc. within a Swedish database, which can be very useful as national keyboards only have one variety of these phonetically similar characters and using tools such as the Windows character map is an annoyingly cumbersome option for end users.

      Note that you can also fold a Swedish/German/Norwegian/etc. database to ENG, which means that all diacritics are removed and just the base forms of characters are used.

      Folding as MUL (the default) means that no character conversion is performed.

      Parameters:
      folding - Folding class
    • getLanguage

      public String getLanguage()
      Retrieve the natural language used for the text in the database.

      This property affects stemming and other language-specific characteristics of the index.

      Setting the language to CHI (Chinese) is required in order to for the word segmentation property to be valid.

      Returns:
      Natural language type string (ENG, GER, SWE, NOR, FIN, or CHI)
    • setLanguage

      public void setLanguage(String lang)
      Establish the natural language used for the text in the database.

      This property affects stemming and other language-specific characteristics of the index.

      Setting the language to CHI (Chinese) is required in order to for the word segmentation property to be valid.

      Parameters:
      lang - Natural language type string (ENG, GER, SWE, NOR, FIN, or CHI)
    • getRecordNameField

      public String getRecordNameField()
      Retrieve the name of the record name field, i.e. the database's primary key field. See TdbFieldDesign for other means of determining that a particular field is the record name field.
      Returns:
      The name of the record name field, if any
    • setRecordNameField

      public void setRecordNameField(String name)
      Establish the name of the record name field, i.e. the database's primary key field. See TdbFieldDesign for other means of establishing that a particular field is the record name field.
      Parameters:
      name - The name of the record name field
    • hasRecordNameField

      public boolean hasRecordNameField()
      Check if this database has a record name field defined, i.e. a primary key.
      Returns:
      true if the database has a record name field
    • getRecordNumberField

      public String getRecordNumberField()
      Retrieve the name of the record number field, i.e. the field that will hold the ordinal identifier assigned to each record by the server during storage. See TdbFieldDesign for other means of determining that a particular field is the record number field.
      Returns:
      The name of the record number field, if any
    • setRecordNumberField

      public void setRecordNumberField(String name)
      Establish the name of the record number field, i.e. the field that will hold the ordinal identifier assigned to each record by the server during storage. See TdbFieldDesign for other means of establishing that a particular field is the record number field.
      Parameters:
      name - The name of the record number field
    • hasRecordNumberField

      public boolean hasRecordNumberField()
      Check if this database has a record number field defined
      Returns:
      true if the database has a record number field
    • getPartNameField

      public String getPartNameField()
      Retrieve the name of the record part name field, i.e. the field that holds the primary key of part records within a particular record. See TdbFieldDesign for other means of determining that a particular field is the record part name field.
      Returns:
      The name of the record number field, if any
    • setPartNameField

      public void setPartNameField(String name)
      Establish the name of the record part name field, i.e. the field that will hold the primary key of part records within a particular record. See TdbFieldDesign for other means of establishing that a particular field is the record part name field.
      Parameters:
      name - The name of the record number field
    • hasPartNameField

      public boolean hasPartNameField()
      Check if this database has a record part name field defined
      Returns:
      true if the database has a record part name field
    • getApplicationId

      public String getApplicationId()
      Retrieve an opaque identifier that applications can use to store whatever they desire. This value passes unmodified and uninterpreted through the server.
      Returns:
      Application data, if any
    • setApplicationId

      public void setApplicationId(String id)
      Establish an opaque identifier that applications can use to store whatever they desire. This value passes unmodified and uninterpreted through the server.
      Parameters:
      id - Application data
    • getDescription

      public String getDescription()
      Retrieve any comment or description associated with the database design
      Returns:
      Database comment, if any
    • setDescription

      public void setDescription(String comment)
      Establish a comment or description to associate with the database design
      Parameters:
      comment - Database comment
    • getSubmitQueue

      public String getSubmitQueue()
      Retrieve the name of the submission queue to which background tasks will be sent by the server. All tasks queued to the same queue (i.e. with the same queue name) will operate sequentially.
      Returns:
      Submission queue
    • setSubmitQueue

      public void setSubmitQueue(String queue)
      Establish the name of the submission queue to which background tasks will be sent by the server. All tasks queued to the same queue (i.e. with the same queue name) will operate sequentially.
      Parameters:
      queue - Submission queue
    • getAsePreSubmit

      public String getAsePreSubmit()
      Retrieve the name of the ASE function that will be invoked prior to submitting a background task to an execution queue.
      Returns:
      Ase name, if any
    • setAsePreSubmit

      public void setAsePreSubmit(String ase)
      Establish the name of the ASE function that will be invoked prior to submitting a background task to an execution queue.
      Parameters:
      ase - Ase name
    • getAsePostSubmit

      public String getAsePostSubmit()
      Retrieve the name of the ASE function that will be invoked after submitting a background task to an execution queue.
      Returns:
      Ase name, if any
    • setAsePostSubmit

      public void setAsePostSubmit(String ase)
      Establish the name of the ASE function that will be invoked after submitting a background task to an execution queue.
      Parameters:
      ase - Ase name
    • getLastUpdate

      public String getLastUpdate()
      Retrieve the last update date/time for the database
      Returns:
      Last update
    • getLastIndex

      public String getLastIndex()
      Retrieve the last index date/time for the database
      Returns:
      Last index
    • getClassificationScheme

      public String getClassificationScheme()
      Retrieve the name of the classification scheme (database) that will be used to classify records within this database.
      Returns:
      Classification scheme name, if any
    • setClassificationScheme

      public void setClassificationScheme(String scheme)
      Establish the name of the classification scheme (database) that will be used to classify records within this database.
      Parameters:
      scheme - Classification scheme name
    • isXmlEnabled

      public boolean isXmlEnabled()
      Check if the database is enabled for XML storage and XPath searching.
      Returns:
      XML enablement status
    • setXmlEnabled

      public void setXmlEnabled(boolean mode)
      Establish whether the database should be enabled for XML storage and XPath searching. Note that this flag can only successfully be set when the database is being created. Any attempt to modify the database's XML enablement status after the initial creation of the database design will fail.
      Parameters:
      mode - true if the database should be enabled for XML
    • isGraph

      public boolean isGraph()
      Check if the database is a graph database.
      Returns:
      True if this is a graph database
    • setGraph

      public void setGraph(boolean mode)
      Establish whether the database should be a graph database. Note that this flag can only successfully be set when the database is being created. Any attempt to modify the database's graph status after the initial creation of the database design will fail.
      Parameters:
      mode - true if the database should be a graph
    • isConnectorDatabase

      public boolean isConnectorDatabase()
      Check if the database is an import connector database.
      Returns:
      True if this is an import connector database
    • setConnectorDatabase

      public void setConnectorDatabase(boolean mode) throws TdbException
      Establish whether the database should be an import connector database. Note that this flag can only successfully be set when the database is being created. Any attempt to modify the database's status after the initial creation of the database design will fail.
      Parameters:
      mode - true if the database should be a connector database
      Throws:
      TdbException - If connector databases are not supported
    • getChineseSegmentation

      public TdbSegmentationType getChineseSegmentation()
      Retrieve the type of word segmentation algorithm that is being used to process Chinese text in this database. Obviously only relevant if the server is setup to use Chinese.
      Returns:
      Segmentation type
    • setChineseSegmentation

      public void setChineseSegmentation(TdbSegmentationType type)
      Establish the type of word segmentation algorithm that should be used to process Chinese text in this database. Obviously only relevant if the server is setup to use Chinese.
      Parameters:
      type - Segmentation type
    • getUsesAutoReorg

      public boolean getUsesAutoReorg()
      Check if the database's index files automatically reorganize, or whether the DBA gets alerted to the fact that the files are in need of reorganization. See setUsesAutoReorg() for more detail.
      Returns:
      true if index files are allowed to automatically reorganize when indexing
    • setUsesAutoReorg

      public void setUsesAutoReorg(boolean mode)
      Establish whether the database's index files should automatically reorganize, or whether the DBA should be alerted to the fact that the files are in need of reorganization.

      It is sometimes not possible to allow TRIP to automatically reorganize index files when indexing due to the length of time that this operation might take. When databases are very large, reorganzing the index can take considerable time, during which any attempt to search the database could result in an error being reported to the user. To avoid this ever happening, set this flag false and TRIP will simply report in the index logfile when the index files are in need of reorganization. The DBA can then schedule downtime for the database to perform such maintenance as is required.

      Parameters:
      mode - true if index files are to be allowed to automatically reorganize when indexing
    • getUsesAudit

      public boolean getUsesAudit()
      Check if a query audit trail is established for this database. See setUsesAudit for more detail.
      Returns:
      true if a query audit has been established
    • setUsesAudit

      public void setUsesAudit(boolean mode)
      Establish a query audit trail for this database. Doing this requires significant system privileges, and due to the extreme performance impact that it can impose, its use is not encouraged in any but the most severe of circumstance under the direction of TRIP customer support.
      Parameters:
      mode - Set this true to establish a query audit log
    • getUsesLogDeletes

      public boolean getUsesLogDeletes()
      Check if the database's transaction log file contains the full content of records that are deleted, or simply a delete marker. In application contexts where it is possible that incorrect delete operations may take place, it is useful to have the content of deleted records available in the transaction log for rollback purposes.
      Returns:
      true if the database is setup to log deleted record content
    • setUsesLogDeletes

      public void setUsesLogDeletes(boolean mode)
      Establish whether the database's transaction log file should contain the full content of records that are deleted, or simply a delete marker. In application contexts where it is possible that incorrect delete operations may take place, it is useful to have the content of deleted records available in the transaction log for rollback purposes.
      Parameters:
      mode - Set this true if the database is to log deleted record content
    • getSubmitOptions

      public int getSubmitOptions()
      Retrieve the server-specific submit options for background tasks. For better ways to check these options, see the more granular methods getSubmitNotifyOnCompletion, getSubmitPrintLogfile and getSubmitKeepLogfile
      Returns:
      Background task submission options bitmask
    • setSubmitOptions

      public void setSubmitOptions(int options)
      Establish the server-specific submit options for background tasks. For better ways to set these options, see the more granular methods setSubmitNotifyOnCompletion, setSubmitPrintLogfile and setSubmitKeepLogfile
      Parameters:
      options - Background task submission options bitmask
    • getSubmitNotifyOnCompletion

      public boolean getSubmitNotifyOnCompletion()
      Check if background tasks should attempt to notify foreground tasks when they complete. Note that this is dependent both on server platform capabilities, and on server applications integrating correctly with the TRIPdaemon.
      Returns:
      true if background tasks are to notify of their completion
    • setSubmitNotifyOnCompletion

      public void setSubmitNotifyOnCompletion(boolean mode)
      Establish whether background tasks should attempt to notify foreground tasks when they complete. Note that this is dependent both on server platform capabilities, and on server applications integrating correctly with the TRIPdaemon.
      Parameters:
      mode - true if background tasks are to notify of their completion
    • getSubmitPrintLogfile

      public boolean getSubmitPrintLogfile()
      Check if the logfiles generated by background tasks will be queued for printing upon completion of the task.
      Returns:
      true if logfile printing is turned on
    • setSubmitPrintLogfile

      public void setSubmitPrintLogfile(boolean mode)
      Establish whether the logfiles generated by background tasks should be queued for printing upon completion of the task.
      Parameters:
      mode - true if logfile printing is to be turned on
    • getSubmitKeepLogfile

      public boolean getSubmitKeepLogfile()
      Check if the logfiles generated by background tasks are being kept or discarded.
      Returns:
      true if logfiles from background tasks are being kept
    • setSubmitKeepLogfile

      public void setSubmitKeepLogfile(boolean mode)
      Establish whether the logfiles generated by background tasks should be kept or discarded.
      Parameters:
      mode - true if logfiles from background tasks are to be kept
    • bafNeedsDefrag

      public boolean bafNeedsDefrag()
      Check if database's data file (BAF) needs to be defragmented. Not all server platforms support this property.
      Returns:
      true if defragmentation is recommended for the BAF
    • bifNeedsDefrag

      public boolean bifNeedsDefrag()
      Check if database's primary index file (BIF) needs to be defragmented. Not all server platforms support this property.
      Returns:
      true if defragmentation is recommended for the BIF
    • vifNeedsDefrag

      public boolean vifNeedsDefrag()
      Check if database's secondary index file (VIF) needs to be defragmented. Not all server platforms support this property.
      Returns:
      true if defragmentation is recommended for the VIF
    • databaseNeedsDefrag

      public boolean databaseNeedsDefrag()
      Check if any of the database's files (BAF, BIF or VIF) need to be defragmented. Not all server platforms support this property.
      Returns:
      true if defragmentation is recommended for one or more of the database's files
    • getDefaultOutputFormat

      public String getDefaultOutputFormat()
      Retrieve the name of the default output format for the database. This format will be used when processing CCL Show orders that do not specify a particular format.
      Returns:
      Name of the default output format
    • setDefaultOutputFormat

      public void setDefaultOutputFormat(String name)
      Establish the name of the default output format for the database. This format will be used when processing CCL Show orders that do not specify a particular format.
      Parameters:
      name - Name of the default output format
    • getOutputFormats

      public TdbControlObjectList getOutputFormats() throws TdbException
      Retrieve the list of avaiable output formats defined for the database
      Returns:
      List of available output formats
      Throws:
      TdbException
    • getDefaultEntryForm

      public String getDefaultEntryForm()
      Retrieve the name of the default TRIPclassic entry form for the database. This property only has meaning if the application being used for data update is TRIPclassic.
      Returns:
      Name of the default entry form
    • setDefaultEntryForm

      public void setDefaultEntryForm(String name)
      Establish the name of the default TRIPclassic entry form for the database. This property only has meaning if the application being used for data update is TRIPclassic.
      Parameters:
      name - Name of the default entry form
    • getEntryForms

      public TdbControlObjectList getEntryForms() throws TdbException
      Retrieve the list of TRIPclassic entry forms defined for the database
      Returns:
      List of available entry forms
      Throws:
      TdbException
    • get

      public void get(String name) throws TdbException
      Retrieve the named database design and all associated properties. The calling user must have some level of read access to the database in order for this to succeed.

      This method causes network I/O.

      Parameters:
      name - The name of the database to retrieve
      Throws:
      TdbException
    • get

      public void get(String name, boolean update) throws TdbException
      Retrieve the named database design and all associated properties, optionally with the default database design parameters in preparation for the creation of a new database.

      If the update parameter is set to false, the calling user must have some level of read access to the database in order for this to succeed.

      If the update parameter is set to true, the calling user must either be the owner of the specified database, or have file manager privileges.

      This method requires TRIPsystem 8.1 or later.

      This method causes network I/O.

      Parameters:
      name - The name of the database to retrieve
      update - True if the database design is to be create or altrered
      Throws:
      TdbException
      Since:
      TRIPjxp 8.1-0
    • get

      public void get() throws TdbException
      Retrieve the database design of the database referenced by the Control object used to construct this object. The calling user must have some level of read access to the database in order for this to succeed.

      This method causes network I/O.

      Throws:
      TdbException
    • addField

      public void addField(TdbFieldDesign field)
      Append a new field definition to the current design.
      Parameters:
      field - The new field to add to the design
    • getFieldById

      public TdbFieldDesign getFieldById(int id) throws TdbException
      Retrieve a reference to the design for a field with the specified field number. This reference is live, and can be used to propagate changes into the underlying design.
      Parameters:
      id - The number of the field to retrieve
      Returns:
      The field design for the appropriate field, or null if not found
      Throws:
      TdbException
    • getFieldByIndex

      public TdbFieldDesign getFieldByIndex(int index) throws TdbException
      Retrieve the n'th field within the database design. This does not take field number into account. This reference is live and can be used to propagate changes into the underlying design.
      Parameters:
      index - The offset of the field within the design
      Returns:
      The appropriate field
      Throws:
      TdbException
    • getFieldByName

      public TdbFieldDesign getFieldByName(String name)
      Retrieve the named field within the database design. This reference is live and can be used to propagate changes into the underlying design.
      Parameters:
      name - The name of the field to retrieve
      Returns:
      The appropriate field
    • getFieldGroupById

      public TdbFieldGroupDesign getFieldGroupById(int id) throws TdbException
      Retrieve a reference to the design for a field group with the specified field number.
      Parameters:
      id - The number of the field group to retrieve
      Returns:
      Field group design object, or null if not found.
      Throws:
      TdbException - If the id is not a positive integer
      Since:
      TRIPjxp 8.0-0 The returned reference is live and can be used to propagate changes into the underlying design.
    • getFieldGroupByIndex

      public TdbFieldGroupDesign getFieldGroupByIndex(int index) throws TdbException
      Retrieve the n'th field group within the database design.
      Parameters:
      index - The zero-based offset of the field group within the design.
      Returns:
      Field group design object.
      Throws:
      TdbException - If the index is outside the valid range.
      Since:
      TRIPjxp 8.0-0 The returned reference is live and can be used to propagate changes into the underlying design.
    • getFieldGroupByName

      public TdbFieldGroupDesign getFieldGroupByName(String name)
      Retrieve the named field group within the database design.
      Parameters:
      name - Name of field group to retrieve.
      Returns:
      Field group design object, or null if not found
      Since:
      TRIPjxp 8.0-0 The returned reference is live and can be used to propagate changes into the underlying design.
    • validateRestriction

      public void validateRestriction(int type, String rest, boolean pattern, boolean fileref) throws TdbException
      Attempt to validate that a restriction value is valid for a particular type of field; this checks both the availability of the restriction type for that field type, and the data type of the restriction.

      This method causes network I/O.

      Parameters:
      type - The type of field for which the restriction is to be validated
      rest - The value of the restriction
      pattern - If true, the restriction is interpreted as a regular expression
      fileref - If true, the restriction is interpreted as a database.field reference
      Throws:
      TdbException
    • validateField

      public void validateField(TdbFieldDesign field) throws TdbException
      Validate a particular field's design against the database design.

      The purpose of this function is to make sure that the field design specified will be accepted as part of a larger bulk update when committing the entire database design. This is intended for use in an interactive context where fields are being accumulated on the client prior to a single commit operation.

      This method causes network I/O.

      Parameters:
      field - The field design to validate
      Throws:
      TdbException
    • status

      public void status(String name) throws TdbException
      Refresh the status information of the named database. After calling this method, the properties RecordCount, LastUpdate and LastIndex will hold up-to-date values.

      This method causes network I/O.

      Parameters:
      name - The name of the database for which information is to be retrieved
      Throws:
      TdbException
    • status

      public void status() throws TdbException
      Refresh the status information of the current database. After calling this method, the properties RecordCount, LastUpdate and LastIndex will hold up-to-date values.

      This method causes network I/O.

      Throws:
      TdbException
    • export

      public void export(String db, String filename, boolean full, boolean incfiles) throws TdbException
      Export the named database's design to the named file, optionally including all associated form definitions. The file is written in UTF-8.

      This method causes network I/O.

      Parameters:
      db - Name of database to export
      filename - The name of the file to write the exported definition to
      full - If set true, all associated forms are also exported, otherwise not
      incfiles - If set true, the file definitions for the database are written, otherwise not
      Throws:
      TdbException
    • export

      public void export(String filename, boolean full, boolean incfiles) throws TdbException
      Export the current database's design to the named file, optionally including all associated form definitions. The file is written in UTF-8.

      This method causes network I/O.

      Parameters:
      filename - The name of the file to write the exported definition to
      full - If set true, all associated forms are also exported, otherwise not
      incfiles - If set true, the file definitions for the database are written, otherwise not
      Throws:
      TdbException
    • export

      public void export(String filename) throws TdbException
      Exports the current database's design to the named file, including all associated form definitions and file specifications. The file is written in UTF8.

      This method causes network I/O.

      Parameters:
      filename - The name of the file to write the exported definition to
      Throws:
      TdbException
    • importDesign

      public void importDesign(String filename, String name) throws TdbException
      Import a new database or thesaurus design from a named file.

      This method causes network I/O.

      Parameters:
      filename - Filename from which to read the design
      name - The name of the new database / thesaurus to create
      Throws:
      TdbException
    • importUpdate

      public void importUpdate(String filename, String name) throws TdbException
      Import an update to an existing database / thesaurus from a named file.

      This method causes network I/O.

      Parameters:
      filename - Filename from which to read the updated design
      name - The name of the database/thesaurus to update
      Throws:
      TdbException
    • importUpdate

      public void importUpdate(String filename) throws TdbException
      Import an update to the current database's / thesaurus' design from a named file.

      This method causes network I/O.

      Parameters:
      filename - Filename from which to read the updated design
      Throws:
      TdbException
    • put

      public void put(String name) throws TdbException
      Commit a new/updated database design to the server, including all associated properties.

      This method causes network I/O.

      Parameters:
      name - The name of the database design to commit
      Throws:
      TdbException
    • put

      public void put() throws TdbException
      Store the current design to the server, including all associated properties.

      This method causes network I/O.

      Throws:
      TdbException
    • putProperties

      public void putProperties(String db) throws TdbException
      Store the general and indexing properties of the named design to the server. This method does not store any field design information.

      This method causes network I/O.

      Parameters:
      db - The name of the database / thesaurus to store
      Throws:
      TdbException
    • putProperties

      public void putProperties() throws TdbException
      Store the general and indexing properties of the current design to the server. This method does not store any field design information.

      This method causes network I/O.

      Throws:
      TdbException
    • putFields

      public void putFields() throws TdbException
      Store the current database's fields collection to the server. This method does not update any general or indexing properties of the database/thesaurus.

      This method causes network I/O.

      Throws:
      TdbException
    • putField

      public void putField(TdbFieldDesign field) throws TdbException
      Store a single modified field's properties to the server. This also serves to update that field's representation in the internal structure of the database design that is cached on the client.

      This method causes network I/O.

      Parameters:
      field - The modified field design
      Throws:
      TdbException
    • putFieldGroups

      public void putFieldGroups() throws TdbException
      Store the current database's field group collection to the server. This method does not update any general or indexing properties of the database/thesaurus.
      Throws:
      TdbException
      Since:
      TRIPjxp 8.0-0
    • putFieldGroup

      public void putFieldGroup(TdbFieldGroupDesign fgroup) throws TdbException
      Store a single modified field group's properties to the server.
      Parameters:
      fgroup - The modified field group design
      Throws:
      TdbException
      Since:
      TRIPjxp 8.0-0 This also serves to update that field group's representation in the internal structure of the database design that is cached on the client.
    • delete

      public void delete(String name) throws TdbException
      Delete a named database from the server.

      The calling user must be the file manager (FM) of the database for this to succeed. In addition, the database must not contain any records (whether indexed or not).

      This method causes network I/O.

      Parameters:
      name - The name of the database to delete
      Throws:
      TdbException
    • delete

      public void delete() throws TdbException
      Delete the current database from the server.

      The calling user must be the file manager (FM) of the database for this to succeed. In addition, the database must not contain any records (whether indexed or not).

      This method causes network I/O.

      Throws:
      TdbException
    • removeField

      public void removeField(TdbFieldDesign field) throws TdbException
      Remove a particular field from the current database design.

      Note that after the completion of this call, the field specified is no longer part of the design, although the object used will still be valid, and can (for example) be added back to the design (or to another design, etc).

      This method causes network I/O.

      Parameters:
      field - The field design to remove from the database
      Throws:
      TdbException
    • removeFieldGroup

      public void removeFieldGroup(TdbFieldGroupDesign fgroup) throws TdbException
      Remove a particular field group from the current database design.

      Note that after the completion of this call, the field group specified is no longer part of the design, although the object used will still be valid, and can (for example) be added back to the design (or to another design, etc).

      Parameters:
      fgroup - The field group design to remove from the database.
      Throws:
      TdbException
      Since:
      TRIPjxp 8.0-0
    • rename

      public void rename(String newname) throws TdbException
      Rename the current database.

      This method causes network I/O.

      Parameters:
      newname - The new name for the database/thesaurus
      Throws:
      TdbException
    • changeMgr

      public void changeMgr(String newmgr, String oldmgr, String name) throws TdbException
      Transfer ownership of one or more database objects from one user to another. The calling user must either be the existing manager of the object(s) being transfered, or must be the SYSTEM user.

      This method causes network I/O.

      Parameters:
      newmgr - The name of the user to which to transfer ownership
      oldmgr - The name of the user from which to transfer ownership
      name - The name of the object to transfer; set this to "*" to transfer everything
      Throws:
      TdbException
    • changeMgr

      public void changeMgr(String newmgr, String oldmgr) throws TdbException
      Transfer ownership of all databases from one user to another. The calling user must be the SYSTEM user.

      This method causes network I/O.

      Parameters:
      newmgr - The name of the user to which to transfer ownership
      oldmgr - The name of the user from which to transfer ownership
      Throws:
      TdbException
    • changeMgr

      public void changeMgr(String newmgr) throws TdbException
      Transfer ownership of all databases from the calling user to another.

      This method causes network I/O.

      Parameters:
      newmgr - The name of the user to which to transfer ownership
      Throws:
      TdbException
    • index

      public void index(boolean reindex, boolean batchjob) throws TdbException
      Request the current database to be indexed.

      Synchronous indexing is supported with TRIPsystem 7.0 and later. Note that indexing a database with a very large number of new or changed records may take a long time.

      If you index synchronously, best practise is to regularly schedule a regular index batch job. Not doing this may degrade performance over time.

      This method causes network I/O.

      Parameters:
      reindex - pass true to reindex the database and false to index incrementally
      batchjob - pass true to index in a background task and false to index synchronously.
      Throws:
      TdbException
    • index

      public void index() throws TdbException
      Request a background task be submitted to index the current database. Calling this method is the same as calling index(false,true).

      This method causes network I/O.

      Throws:
      TdbException
    • reindex

      @Deprecated public void reindex() throws TdbException
      Deprecated.
      Use index(boolean,boolean) instead.
      Request a background task to be submitted to reindex the current database.

      This method causes network I/O.

      Throws:
      TdbException
    • load

      public void load(String tform) throws TdbException
      Request a background task to be submitted to load the named TFORM file into the current database.

      This method causes network I/O.

      Parameters:
      tform - Name of TFORM file to be loaded -- this is a server-specific file specification
      Throws:
      TdbException
    • loadAndIndex

      public void loadAndIndex(String tform) throws TdbException
      Request a background task to be submitted to load and subsequently index the named TFORM file into the current database.

      This method causes network I/O.

      Parameters:
      tform - Name of TFORM file to be loaded -- this is a server-specific file specification
      Throws:
      TdbException
    • loadAndReindex

      public void loadAndReindex(String tform) throws TdbException
      Request a background task to be submitted to load and subsequently reindex the named TFORM file into the current database.

      This method causes network I/O.

      Parameters:
      tform - Name of TFORM file to be loaded -- this is a server-specific file specification
      Throws:
      TdbException
    • copy

      public void copy(String newname, TdbControlObject newobj) throws TdbException
      Create a shallow copy of the current database / thesaurus, preserving base design but ignoring associated reports / forms, locations and access rights.

      This method causes network I/O.

      Parameters:
      newname - The name to be assigned to the copied database / thesaurus
      newobj - If not null on input, this object will contain the Control reference for the newly created object upon return
      Throws:
      TdbException
    • deepCopy

      public void deepCopy(String newname, TdbControlObject newobj) throws TdbException
      Create a deep copy of the current database / thesaurus, creating a new one that is exactly the same, but with a different name (and correspondibly different filenames on the server). All access rights, forms / reports and general file specifications are maintained between the copies.

      This method causes network I/O.

      Parameters:
      newname - The name to be assigned to the new copy
      newobj - If not null on input, this object will contain the Control reference for the newly created object upon return
      Throws:
      TdbException
    • addForeignKey

      public void addForeignKey(String key, String linkdb, String linkfld, TdbIntegrityType on_update, TdbIntegrityType on_delete) throws TdbException
      Create a foreign key relationship between this database (as the slave) and another database (as the master). This relationship will be validated at the time of placing this call, before it is added to the client-side cache of integrity rules.

      This method causes network I/O.

      Parameters:
      key - Foreign key field name
      linkdb - Master database name
      linkfld - Master key field name
      on_update - Action to take on update of master field in master database
      on_delete - Action to take on deletion of records from the master database
      Throws:
      TdbException
    • deleteForeignKey

      public void deleteForeignKey(String key) throws TdbException
      Remove any existing foreign key relationship from the named field.

      This method causes network I/O.

      Parameters:
      key - The field from which to remove any foreign keys
      Throws:
      TdbException
    • deleteForeignKeys

      public void deleteForeignKeys() throws TdbException
      Removes all existing referential integrity rules from the database design.

      This method causes network I/O.

      Throws:
      TdbException
    • diagnose

      public void diagnose(TdbErrorCheckSink sink, int phase) throws TdbException
      Check the database's primary data file (the BAF) for errors or conditions that might cause errors in the future. The phases involved in the diagnosis reflect the phases run by the command-line utility BAF DOCTOR.

      This method causes network I/O.

      Parameters:
      sink - A sink object that will collect results from the operation -- this must be provided by the caller and must not be null.
      phase - A value determining the phase or phases of diagnosis to execute: 0 - all phases; 1 - gross file integrity; 2 - simple internal file structure; 3 - (obsolete) cache-defeat file structure check; 4 - directory track validation; 5 - free list validation; 6 - rigorous data structure validation.
      Throws:
      TdbException
    • diagnose

      public void diagnose(TdbErrorCheckSink sink) throws TdbException
      Check the database's primary data file (the BAF) for errors or conditions that might cause errors in the future. This version of the method invokes all phases of diagnosis in one shot.

      This method causes network I/O.

      Parameters:
      sink - A sink object that will collect results from the operation -- this must be provided by the caller and must not be null.
      Throws:
      TdbException
    • compress

      public void compress(TdbCompressionContext ctx, boolean all) throws TdbException
      Requests a database compression operation, akin to the command line utility PACKIT. The operation can either be performed all at once, or using a call loop so as to allow the calling application to give the end user feedback on progress.

      This method causes network I/O.

      Parameters:
      ctx - Compression context. This context is used to tie together the compression operation and must be provided by the caller. If the application is using a call loop, i.e. calling this function iteratively until completed, the same context object must be provided for each iteration. Applications can test for the completion of the operation by testing the isComplete property of the context. Note that the new location of the database BAF must be provided using the NewName property of the context prior to the first call to this method. Calling applications can check the progress of the compression operation using the Progress and MaxRecs properties of the context following a successful invocation of the Compress method.
      all - If set true, the compression operation will take place in a single call. This might take considerable time, however, so the caller is encouraged to set this flag false and instead to place calls to this method within a loop that gives feedback to the user.
      Throws:
      TdbException