public class TdbDatabaseDesign extends TdbSerializableObject implements com.tietoenator.trip.jxp.internal.utils.DOMSink
Constructor and Description |
---|
TdbDatabaseDesign(TdbSession session)
Constructor, creates a new, blank container
|
TdbDatabaseDesign(TdbSession session,
TdbControlObject ob)
Constructor, creates a container for the database referenced by the provided
Control object
|
Modifier and Type | Method and Description |
---|---|
void |
addField(TdbFieldDesign field)
Append a new field definition to the current design.
|
void |
addForeignKey(java.lang.String key,
java.lang.String linkdb,
java.lang.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 |
bafNeedsDefrag()
Check if database's data file (BAF) needs
to be defragmented.
|
boolean |
bifNeedsDefrag()
Check if database's primary index file (BIF) needs
to be defragmented.
|
void |
changeMgr(java.lang.String newmgr)
Transfer ownership of all databases from the calling user to another.
|
void |
changeMgr(java.lang.String newmgr,
java.lang.String oldmgr)
Transfer ownership of all databases from one user to another.
|
void |
changeMgr(java.lang.String newmgr,
java.lang.String oldmgr,
java.lang.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(java.lang.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 |
databaseNeedsDefrag()
Check if any of the database's files (BAF, BIF or VIF) need
to be defragmented.
|
void |
deepCopy(java.lang.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()
Delete the current database from the server.
|
void |
delete(java.lang.String name)
Delete a named database from the server.
|
void |
deleteForeignKey(java.lang.String key)
Remove any existing foreign key relationship from the named field.
|
void |
deleteForeignKeys()
Removes all existing referential integrity rules from the database design.
|
void |
diagnose(TdbErrorCheckSink sink)
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(java.lang.String filename)
Exports the current database's design to the named file, including all
associated form definitions and file specifications.
|
void |
export(java.lang.String filename,
boolean full,
boolean incfiles)
Export the current database's design to the named file, optionally including
all associated form definitions.
|
void |
export(java.lang.String db,
java.lang.String filename,
boolean full,
boolean incfiles)
Export the named database's design to the named file, optionally including
all associated form definitions.
|
java.util.List<TdbFieldDesign> |
fields()
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(java.lang.String name)
Retrieve the named database design and all associated properties.
|
java.lang.String |
getApplicationId()
Retrieve an opaque identifier that applications can use to store whatever they
desire.
|
java.lang.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.
|
java.lang.String |
getAsePostSubmit()
Retrieve the name of the ASE function that will be invoked after
submitting a background task to an execution queue.
|
java.lang.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.
|
java.lang.String |
getAsePreSubmit()
Retrieve the name of the ASE function that will be invoked prior to
submitting a background task to an execution queue.
|
java.lang.String |
getBafFile()
Retrieve the filename of the database's data file (the BAF)
|
java.lang.String |
getBifFile()
Retrieve the filename of the database's primary index file (the BIF)
|
java.lang.String |
getCharacterSet()
Retrieve the "native" character set that will be used within the database.
|
TdbSegmentationType |
getChineseSegmentation()
Retrieve the type of word segmentation algorithm that is being used
to process Chinese text in this database.
|
java.lang.String |
getClassificationScheme()
Retrieve the name of the classification scheme (database) that will be used
to classify records within this database.
|
java.lang.String |
getDefaultEntryForm()
Retrieve the name of the default TRIPclassic entry form for the database.
|
java.lang.String |
getDefaultOutputFormat()
Retrieve the name of the default output format for the database.
|
java.lang.String |
getDescription()
Retrieve any comment or description associated with the database design
|
TdbControlObjectList |
getEntryForms()
Retrieve the list of TRIPclassic entry forms defined for the database
|
TdbFieldDesign |
getFieldById(int id)
Retrieve a reference to the design for a field with the specified field number.
|
TdbFieldDesign |
getFieldByIndex(int index)
Retrieve the n'th field within the database design.
|
TdbFieldDesign |
getFieldByName(java.lang.String name)
Retrieve the named field within the database design.
|
int |
getFieldCount()
Retrieve a count of the number of fields in this database design.
|
java.lang.String |
getFoldingClass()
Retrieve the character folding class to be applied to data within the database.
|
TdbTextSeparators |
getIndexingRules()
Retrieve the indexing rules (parsing rules) that are to be applied to
data stored in this database.
|
java.lang.String |
getLanguage()
Retrieve the natural language used for the text in the database.
|
java.lang.String |
getLastIndex()
Retrieve the last index date/time for the database
|
java.lang.String |
getLastUpdate()
Retrieve the last update date/time for the database
|
java.lang.String |
getLogFile()
Retrieve the filename of the database's transaction log file
|
java.lang.String |
getName()
Retrieve the database's name
|
TdbControlObjectList |
getOutputFormats()
Retrieve the list of avaiable output formats defined for the database
|
java.lang.String |
getOwnerName()
Retrieve the name of the database's owner.
|
java.lang.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.
|
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.
|
java.lang.String |
getRecordNameField()
Retrieve the name of the record name field, i.e. the database's primary key field.
|
java.lang.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.
|
boolean |
getSubmitKeepLogfile()
Check if the logfiles generated by background
tasks are being kept or discarded.
|
boolean |
getSubmitNotifyOnCompletion()
Check if background tasks should attempt to
notify foreground tasks when they complete.
|
int |
getSubmitOptions()
Retrieve the server-specific submit options for background tasks.
|
boolean |
getSubmitPrintLogfile()
Check if the logfiles generated by background
tasks will be queued for printing upon completion of the task.
|
java.lang.String |
getSubmitQueue()
Retrieve the name of the submission queue to which background tasks
will be sent by the server.
|
boolean |
getUsesAudit()
Check if a query audit trail is established for this database.
|
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.
|
boolean |
getUsesLogDeletes()
Check if the database's transaction log file
contains the full content of records that are deleted, or simply a
delete marker.
|
java.lang.String |
getVifFile()
Retrieve the filename of the database's secondary index file (the VIF)
|
java.lang.String |
getWordChars()
Retrieve the set of normally unindexed characters that are to be considered
searchable within this database.
|
boolean |
hasPartNameField()
Check if this database has a record part name field defined
|
boolean |
hasRecordNameField()
Check if this database has a record name field defined, i.e. a primary key.
|
boolean |
hasRecordNumberField()
Check if this database has a record number field defined
|
void |
importDesign(java.lang.String filename,
java.lang.String name)
Import a new database or thesaurus design from a named file.
|
void |
importUpdate(java.lang.String filename)
Import an update to the current database's / thesaurus' design from a named file.
|
void |
importUpdate(java.lang.String filename,
java.lang.String name)
Import an update to an existing database / thesaurus from a named file.
|
void |
index()
Request a background task be submitted to index the current database.
|
void |
index(boolean reindex,
boolean batchjob)
Request the current database to be indexed.
|
java.util.List<TdbIntegrityRule> |
integrityRules()
Retrieve a collection of integrity rules established for the database.
|
boolean |
isGraph()
Check if the database is a graph database.
|
boolean |
isOwner()
Check if the calling user has ownership rights to this database.
|
boolean |
isXmlEnabled()
Check if the database is enabled for XML storage and XPath searching.
|
void |
load(java.lang.String tform)
Request a background task to be submitted to load the named TFORM file
into the current database.
|
void |
loadAndIndex(java.lang.String tform)
Request a background task to be submitted to load and subsequently index the named TFORM file
into the current database.
|
void |
loadAndReindex(java.lang.String tform)
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(java.lang.String name)
Commit a new/updated database design to the server, including all associated
properties.
|
void |
putField(TdbFieldDesign field)
Store a single modified field's properties to the server.
|
void |
putFields()
Store the current database's fields collection to the server.
|
void |
putProperties()
Store the general and indexing properties of the current design to the server.
|
void |
putProperties(java.lang.String db)
Store the general and indexing properties of the named design to the server.
|
void |
reindex()
Deprecated.
Use index(boolean,boolean) instead.
|
void |
removeField(TdbFieldDesign field)
Remove a particular field from the current database design.
|
void |
rename(java.lang.String newname)
Rename the current database.
|
void |
setApplicationId(java.lang.String id)
Establish an opaque identifier that applications can use to store whatever they
desire.
|
void |
setAsePostCommit(java.lang.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.
|
void |
setAsePostSubmit(java.lang.String ase)
Establish the name of the ASE function that will be invoked after
submitting a background task to an execution queue.
|
void |
setAsePreCommit(java.lang.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.
|
void |
setAsePreSubmit(java.lang.String ase)
Establish the name of the ASE function that will be invoked prior to
submitting a background task to an execution queue.
|
void |
setBafFile(java.lang.String filename)
Establish the filename of the database's data file (the BAF)
|
void |
setBifFile(java.lang.String filename)
Establish the filename of the database's primary index file (the BIF)
|
void |
setCharacterSet(java.lang.String charset)
Establish the "native" character set that will be used within the database.
|
void |
setChineseSegmentation(TdbSegmentationType type)
Establish the type of word segmentation algorithm that should be used
to process Chinese text in this database.
|
void |
setClassificationScheme(java.lang.String scheme)
Establish the name of the classification scheme (database) that will be used
to classify records within this database.
|
void |
setDefaultEntryForm(java.lang.String name)
Establish the name of the default TRIPclassic entry form for the database.
|
void |
setDefaultOutputFormat(java.lang.String name)
Establish the name of the default output format for the database.
|
void |
setDescription(java.lang.String comment)
Establish a comment or description to associate with the database design
|
void |
setFields(java.util.Collection<TdbFieldDesign> fields)
Replace or establish the field collection, i.e. the set of field designs that
comprise the database design.
|
void |
setFoldingClass(java.lang.String folding)
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 |
setIndexingRules(TdbTextSeparators spec)
Establish the indexing rules (parsing rules) that are to be applied to
data stored in this database.
|
void |
setIntegrityRules(java.util.Collection<TdbIntegrityRule> rules)
Establish a new set of integrity rules for the database.
|
void |
setLanguage(java.lang.String lang)
Establish the natural language used for the text in the database.
|
void |
setLogFile(java.lang.String filename)
Establish the filename of the database's transaction log file
|
void |
setName(java.lang.String name)
Establish the database's name
|
void |
setPartNameField(java.lang.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.
|
void |
setRecordNameField(java.lang.String name)
Establish the name of the record name field, i.e. the database's primary key field.
|
void |
setRecordNumberField(java.lang.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.
|
void |
setSubmitKeepLogfile(boolean mode)
Establish whether the logfiles generated by background
tasks should be kept or discarded.
|
void |
setSubmitNotifyOnCompletion(boolean mode)
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 |
setSubmitQueue(java.lang.String queue)
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(java.lang.String filename)
Establish the filename of the database's secondary index file (the VIF)
|
void |
setWordChars(java.lang.String chars)
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 |
status()
Refresh the status information of the current database.
|
void |
status(java.lang.String name)
Refresh the status information of the named database.
|
void |
validateField(TdbFieldDesign field)
Validate a particular field's design against the database design.
|
void |
validateRestriction(int type,
java.lang.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 |
vifNeedsDefrag()
Check if database's secondary index file (VIF) needs
to be defragmented.
|
getControlObject
codeList, getLastCode, getLastMessage, hasMessages, messageList, resetMessages
cancel, getSession, isCancelable, setCancelable
public TdbDatabaseDesign(TdbSession session) throws TdbException
session
- Active sessionTdbException
public TdbDatabaseDesign(TdbSession session, TdbControlObject ob) throws TdbException
session
- Active sessionob
- Control object referencing the database requiredTdbException
public boolean isOwner()
public java.lang.String getName()
public void setName(java.lang.String name)
name
- Database namepublic java.lang.String getOwnerName()
public int getRecordCount()
public int getFieldCount()
public java.util.List<TdbFieldDesign> fields()
public void setFields(java.util.Collection<TdbFieldDesign> fields)
fields
- Field collectionpublic java.util.List<TdbIntegrityRule> integrityRules()
public void setIntegrityRules(java.util.Collection<TdbIntegrityRule> rules)
rules
- New integrity rules collectionpublic TdbTextSeparators getIndexingRules()
setIndexingRules())
to store any modifications to the rule set.public void setIndexingRules(TdbTextSeparators spec)
spec
- Indexing rulespublic java.lang.String getBafFile()
public void setBafFile(java.lang.String filename)
filename
- New BAF specificationpublic java.lang.String getBifFile()
public void setBifFile(java.lang.String filename)
filename
- New BIF specificationpublic java.lang.String getVifFile()
public void setVifFile(java.lang.String filename)
filename
- New VIF specificationpublic java.lang.String getLogFile()
public void setLogFile(java.lang.String filename)
filename
- New logfile specificationpublic java.lang.String getWordChars()
public void setWordChars(java.lang.String chars)
chars
- Special indexable characterspublic java.lang.String getAsePreCommit()
public void setAsePreCommit(java.lang.String ase)
ase
- ASE namepublic java.lang.String getAsePostCommit()
public void setAsePostCommit(java.lang.String ase)
ase
- ASE namepublic java.lang.String getCharacterSet()
public void setCharacterSet(java.lang.String charset)
charset
- Native character set namepublic java.lang.String getFoldingClass()
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.
public void setFoldingClass(java.lang.String folding)
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.
folding
- Folding classpublic java.lang.String getLanguage()
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.
public void setLanguage(java.lang.String lang)
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.
lang
- Natural language type string (ENG, GER, SWE, NOR, FIN, or CHI)public java.lang.String getRecordNameField()
TdbFieldDesign
for other means of
determining that a particular field is the record name field.public void setRecordNameField(java.lang.String name)
TdbFieldDesign
for other means of
establishing that a particular field is the record name field.name
- The name of the record name fieldpublic boolean hasRecordNameField()
public java.lang.String getRecordNumberField()
TdbFieldDesign
for other means of
determining that a particular field is the record number field.public void setRecordNumberField(java.lang.String name)
TdbFieldDesign
for other means of
establishing that a particular field is the record number field.name
- The name of the record number fieldpublic boolean hasRecordNumberField()
public java.lang.String getPartNameField()
TdbFieldDesign
for other means of
determining that a particular field is the record part name field.public void setPartNameField(java.lang.String name)
TdbFieldDesign
for other means of
establishing that a particular field is the record part name field.name
- The name of the record number fieldpublic boolean hasPartNameField()
public java.lang.String getApplicationId()
public void setApplicationId(java.lang.String id)
id
- Application datapublic java.lang.String getDescription()
public void setDescription(java.lang.String comment)
comment
- Database commentpublic java.lang.String getSubmitQueue()
public void setSubmitQueue(java.lang.String queue)
queue
- Submission queuepublic java.lang.String getAsePreSubmit()
public void setAsePreSubmit(java.lang.String ase)
ase
- Ase namepublic java.lang.String getAsePostSubmit()
public void setAsePostSubmit(java.lang.String ase)
ase
- Ase namepublic java.lang.String getLastUpdate()
public java.lang.String getLastIndex()
public java.lang.String getClassificationScheme()
public void setClassificationScheme(java.lang.String scheme)
scheme
- Classification scheme namepublic boolean isXmlEnabled()
public void setXmlEnabled(boolean mode)
mode
- true if the database should be enabled for XMLpublic boolean isGraph()
public void setGraph(boolean mode)
mode
- true if the database should be a graphpublic TdbSegmentationType getChineseSegmentation()
public void setChineseSegmentation(TdbSegmentationType type)
type
- Segmentation typepublic boolean getUsesAutoReorg()
setUsesAutoReorg()
for more detail.public void setUsesAutoReorg(boolean mode)
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.
mode
- true if index files are to be allowed to automatically reorganize
when indexingpublic boolean getUsesAudit()
setUsesAudit
for more detail.public void setUsesAudit(boolean mode)
mode
- Set this true to establish a query audit logpublic boolean getUsesLogDeletes()
public void setUsesLogDeletes(boolean mode)
mode
- Set this true if the database is to log deleted record contentpublic int getSubmitOptions()
getSubmitNotifyOnCompletion
,
getSubmitPrintLogfile
and
getSubmitKeepLogfile
public void setSubmitOptions(int options)
setSubmitNotifyOnCompletion
,
setSubmitPrintLogfile
and
setSubmitKeepLogfile
options
- Background task submission options bitmaskpublic boolean getSubmitNotifyOnCompletion()
public void setSubmitNotifyOnCompletion(boolean mode)
mode
- true if background tasks are to notify of their completionpublic boolean getSubmitPrintLogfile()
public void setSubmitPrintLogfile(boolean mode)
mode
- true if logfile printing is to be turned onpublic boolean getSubmitKeepLogfile()
public void setSubmitKeepLogfile(boolean mode)
mode
- true if logfiles from background tasks are to be keptpublic boolean bafNeedsDefrag()
public boolean bifNeedsDefrag()
public boolean vifNeedsDefrag()
public boolean databaseNeedsDefrag()
public java.lang.String getDefaultOutputFormat()
public void setDefaultOutputFormat(java.lang.String name)
name
- Name of the default output formatpublic TdbControlObjectList getOutputFormats() throws TdbException
TdbException
public java.lang.String getDefaultEntryForm()
public void setDefaultEntryForm(java.lang.String name)
name
- Name of the default entry formpublic TdbControlObjectList getEntryForms() throws TdbException
TdbException
public void get(java.lang.String name) throws TdbException
name
- The name of the database to retrieveTdbException
public void get() throws TdbException
TdbException
public void addField(TdbFieldDesign field)
field
- The new field to add to the designpublic TdbFieldDesign getFieldById(int id) throws TdbException
id
- The number of the field to retrieveTdbException
public TdbFieldDesign getFieldByIndex(int index) throws TdbException
index
- The offset of the field within the designTdbException
public TdbFieldDesign getFieldByName(java.lang.String name)
name
- The name of the field to retrievepublic void validateRestriction(int type, java.lang.String rest, boolean pattern, boolean fileref) throws TdbException
type
- The type of field for which the restriction is to be validatedrest
- The value of the restrictionpattern
- If true, the restriction is interpreted as a regular expressionfileref
- If true, the restriction is interpreted as a database.field referenceTdbException
public void validateField(TdbFieldDesign field) throws TdbException
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.
field
- The field design to validateTdbException
public void status(java.lang.String name) throws TdbException
RecordCount
, LastUpdate
and LastIndex
will hold up-to-date values.
name
- The name of the database for which information is to be retrievedTdbException
public void status() throws TdbException
RecordCount
, LastUpdate
and LastIndex
will hold up-to-date values.
TdbException
public void export(java.lang.String db, java.lang.String filename, boolean full, boolean incfiles) throws TdbException
db
- Name of database to exportfilename
- The name of the file to write the exported definition tofull
- If set true, all associated forms are also exported, otherwise notincfiles
- If set true, the file definitions for the database are written, otherwise notTdbException
public void export(java.lang.String filename, boolean full, boolean incfiles) throws TdbException
filename
- The name of the file to write the exported definition tofull
- If set true, all associated forms are also exported, otherwise notincfiles
- If set true, the file definitions for the database are written, otherwise notTdbException
public void export(java.lang.String filename) throws TdbException
filename
- The name of the file to write the exported definition toTdbException
public void importDesign(java.lang.String filename, java.lang.String name) throws TdbException
filename
- Filename from which to read the designname
- The name of the new database / thesaurus to createTdbException
public void importUpdate(java.lang.String filename, java.lang.String name) throws TdbException
filename
- Filename from which to read the updated designname
- The name of the database/thesaurus to updateTdbException
public void importUpdate(java.lang.String filename) throws TdbException
filename
- Filename from which to read the updated designTdbException
public void put(java.lang.String name) throws TdbException
name
- The name of the database design to commitTdbException
public void put() throws TdbException
TdbException
public void putProperties(java.lang.String db) throws TdbException
db
- The name of the database / thesaurus to storeTdbException
public void putProperties() throws TdbException
TdbException
public void putFields() throws TdbException
TdbException
public void putField(TdbFieldDesign field) throws TdbException
field
- The modified field designTdbException
public void delete(java.lang.String name) throws TdbException
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.
name
- The name of the database to deleteTdbException
public void delete() throws TdbException
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.
TdbException
public void removeField(TdbFieldDesign field) throws TdbException
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.
field
- The field design to remove from the databaseTdbException
public void rename(java.lang.String newname) throws TdbException
newname
- The new name for the database/thesaurusTdbException
public void changeMgr(java.lang.String newmgr, java.lang.String oldmgr, java.lang.String name) throws TdbException
newmgr
- The name of the user to which to transfer ownershipoldmgr
- The name of the user from which to transfer ownershipname
- The name of the object to transfer; set this to "*" to transfer everythingTdbException
public void changeMgr(java.lang.String newmgr, java.lang.String oldmgr) throws TdbException
newmgr
- The name of the user to which to transfer ownershipoldmgr
- The name of the user from which to transfer ownershipTdbException
public void changeMgr(java.lang.String newmgr) throws TdbException
newmgr
- The name of the user to which to transfer ownershipTdbException
public void index(boolean reindex, boolean batchjob) throws TdbException
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.
reindex
- pass true to reindex the database and false to index incrementallybatchjob
- pass true to index in a background task and false to index synchronously.TdbException
public void index() throws TdbException
TdbException
@Deprecated public void reindex() throws TdbException
TdbException
public void load(java.lang.String tform) throws TdbException
tform
- Name of TFORM file to be loaded -- this is a server-specific
file specificationTdbException
public void loadAndIndex(java.lang.String tform) throws TdbException
tform
- Name of TFORM file to be loaded -- this is a server-specific
file specificationTdbException
public void loadAndReindex(java.lang.String tform) throws TdbException
tform
- Name of TFORM file to be loaded -- this is a server-specific
file specificationTdbException
public void copy(java.lang.String newname, TdbControlObject newobj) throws TdbException
newname
- The name to be assigned to the copied database / thesaurusnewobj
- If not null on input, this object will contain the
Control reference for the newly created object upon returnTdbException
public void deepCopy(java.lang.String newname, TdbControlObject newobj) throws TdbException
newname
- The name to be assigned to the new copynewobj
- If not null on input, this object will contain the
Control reference for the newly created object upon returnTdbException
public void addForeignKey(java.lang.String key, java.lang.String linkdb, java.lang.String linkfld, TdbIntegrityType on_update, TdbIntegrityType on_delete) throws TdbException
key
- Foreign key field namelinkdb
- Master database namelinkfld
- Master key field nameon_update
- Action to take on update of master field in master databaseon_delete
- Action to take on deletion of records from the master databaseTdbException
public void deleteForeignKey(java.lang.String key) throws TdbException
key
- The field from which to remove any foreign keysTdbException
public void deleteForeignKeys() throws TdbException
TdbException
public void diagnose(TdbErrorCheckSink sink, int phase) throws TdbException
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.TdbException
public void diagnose(TdbErrorCheckSink sink) throws TdbException
sink
- A sink object that will collect results from the operation -- this
must be provided by the caller and must not be null.TdbException
public void compress(TdbCompressionContext ctx, boolean all) throws TdbException
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.TdbException