public class StaticTempTable extends AbstractTempTable
AbstractTempTable.CallingFunction
admData, DEFAULT_COPY_TEMP_TABLE_PREFIX, defaultBufferHandle, error, errorString, undoable
name, nextSibling, prevSibling
instProc
Constructor and Description |
---|
StaticTempTable(Temporary defaultBuffer)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
_dynamic()
Conversion of DYNAMIC attribute.
|
logical |
addFieldLike(character name,
character source)
Adds to the temp-table a field like the one specified.
|
logical |
addFieldLike(character name,
handle source)
Adds to the temp-table a field like the one specified.
|
logical |
addFieldLike(java.lang.String name,
handle source)
Adds to the temp-table a field like the one specified.
|
logical |
addFieldLike(java.lang.String name,
java.lang.String source)
Adds to the temp-table a field like the one specified.
|
logical |
addFieldsFrom(character tableName)
Adds fields from another table into this temp-table.
|
logical |
addFieldsFrom(character tableName,
character except)
Adds fields from another table into this temp-table.
|
logical |
addFieldsFrom(handle hbuf)
Adds fields from another table into this temp-table.
|
logical |
addFieldsFrom(handle hbuf,
character except)
Adds fields from another table into this temp-table.
|
logical |
addFieldsFrom(handle hbuf,
java.lang.String except)
Adds fields from another table into this temp-table.
|
logical |
addFieldsFrom(java.lang.String tableName)
Adds fields from another table into this temp-table.
|
logical |
addFieldsFrom(java.lang.String tableName,
character except)
Adds fields from another table into this temp-table.
|
logical |
addFieldsFrom(java.lang.String tableName,
java.lang.String except)
Adds fields from another table into this temp-table.
|
logical |
addFieldToIndex(character indexName,
character field)
Construct an index of this temp-table by adding a new field to it.
|
logical |
addFieldToIndex(character indexName,
character field,
character ascending)
Construct an index of this temp-table by adding a new field to it.
|
logical |
addFieldToIndex(character indexName,
character field,
java.lang.String ascending)
Construct an index of this temp-table by adding a new field to it.
|
logical |
addFieldToIndex(character indexName,
java.lang.String field)
Construct an index of this temp-table by adding a new field to it.
|
logical |
addFieldToIndex(character indexName,
java.lang.String field,
character ascending)
Construct an index of this temp-table by adding a new field to it.
|
logical |
addFieldToIndex(character indexName,
java.lang.String field,
java.lang.String ascending)
Construct an index of this temp-table by adding a new field to it.
|
logical |
addFieldToIndex(java.lang.String indexName,
character field)
Construct an index of this temp-table by adding a new field to it.
|
logical |
addFieldToIndex(java.lang.String indexName,
character field,
character ascending)
Construct an index of this temp-table by adding a new field to it.
|
logical |
addFieldToIndex(java.lang.String indexName,
character field,
java.lang.String ascending)
Construct an index of this temp-table by adding a new field to it.
|
logical |
addFieldToIndex(java.lang.String indexName,
java.lang.String field)
Construct an index of this temp-table by adding a new field to it.
|
logical |
addFieldToIndex(java.lang.String indexName,
java.lang.String field,
character ascending)
Construct an index of this temp-table by adding a new field to it.
|
logical |
addFieldToIndex(java.lang.String indexName,
java.lang.String field,
java.lang.String ascending)
Construct an index of this temp-table by adding a new field to it.
|
protected boolean |
addFunctionWasCalled()
Determine if an ADD-* function was called for the table (CLEAR function resets the state).
|
logical |
addIndexLike(character name,
character sourceName,
character dbTable)
Adds to the temp-table an index like the one specified.
|
logical |
addIndexLike(character name,
character sourceName,
handle sourceBuffer)
Adds to the temp-table an index like the one specified.
|
logical |
addIndexLike(java.lang.String name,
java.lang.String sourceName,
handle sourceBuffer)
Adds to the temp-table an index like the one specified.
|
logical |
addIndexLike(java.lang.String name,
java.lang.String sourceName,
java.lang.String dbTable)
Adds to the temp-table an index like the one specified.
|
logical |
addNewField(character name,
character type)
Adds a field with the specified properties to the temp-table.
|
logical |
addNewField(character name,
character type,
integer extent)
Adds a field with the specified properties to the temp-table.
|
logical |
addNewField(character name,
character type,
integer extent,
character format)
Adds a field with the specified properties to the temp-table.
|
logical |
addNewField(character name,
character type,
integer extent,
character format,
BaseDataType initial)
Adds a field with the specified properties to the temp-table.
|
logical |
addNewField(character name,
character type,
integer extent,
character format,
BaseDataType initial,
character label)
Adds a field with the specified properties to the temp-table.
|
logical |
addNewField(character name,
character type,
integer extent,
character format,
BaseDataType initial,
character label,
character columnLabel)
Adds a field with the specified properties to the temp-table.
|
logical |
addNewIndex(character name)
Adds a new empty index with the specified name to the temp-table.
|
logical |
addNewIndex(character name,
logical unique)
Adds a new empty index with the specified name to the temp-table.
|
logical |
addNewIndex(character name,
logical unique,
logical primary)
Adds a new empty index with the specified name to the temp-table.
|
logical |
addNewIndex(character name,
logical unique,
logical primary,
logical word)
Adds a new empty index with the specified name to the temp-table.
|
logical |
canUndo()
Obtain the current UNDO attribute of 4GL temp-table.
|
logical |
clear()
Returns the temp-table to it's clear state, removing all defined fields and indexes.
|
logical |
createTableLike(character tableName)
Duplicates the structure of an existing table, copying the field
definitions, and optionally, the indexes.
|
logical |
createTableLike(character tableName,
character indexName)
Duplicates the structure of an existing table, copying the field
definitions, and optionally, the indexes.
|
logical |
createTableLike(handle hbuf)
Duplicates the structure of an existing table, copying the field
definitions, and optionally, the indexes.
|
logical |
createTableLike(handle hbuf,
character indexName)
Duplicates the structure of an existing table, copying the field
definitions, and optionally, the indexes.
|
logical |
createTableLike(handle hbuf,
java.lang.String indexName)
Duplicates the structure of an existing table, copying the field
definitions, and optionally, the indexes.
|
logical |
createTableLike(java.lang.String tableName)
Duplicates the structure of an existing table, copying the field
definitions, and optionally, the indexes.
|
logical |
createTableLike(java.lang.String tableName,
java.lang.String indexName)
Duplicates the structure of an existing table, copying the field
definitions, and optionally, the indexes.
|
handle |
defaultBufferHandle()
Obtain the handle to the buffer that was created by default for this temporary table.
|
logical |
dynamic()
Checks whether the resource is dynamic or static.
|
boolean |
equals(java.lang.Object other)
Indicates whether some other object represents the same temp table.
|
java.lang.Class<?> |
getDMOClass()
Get DMO implementation class associated with this table.
|
java.lang.Class<?> |
getDMOInterface()
Get DMO interface associated with this table.
|
int |
hashCode()
Override parent's implementation to be consistent with
equals(Object) . |
logical |
prepared()
Returns
true if this temp-table is in prepared state (after a successful call
to tempTablePrepare(java.lang.String) ). |
protected boolean |
resourceDelete()
Worker to be implemented by each resource.
|
logical |
tempTablePrepare(character name)
Signals that all the field and index definitions for a temp-table have been provided.
|
logical |
tempTablePrepare(java.lang.String name)
Signals that all the field and index definitions for a temp-table
have been provided.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
boolean |
valid()
Reports if this object is valid for use.
|
_hasRecords, changeErrorString, copyTempTable, copyTempTable, copyTempTable, copyTempTable, copyTempTable, copyTempTable, copyTempTable, copyTempTable, copyTempTable, defaultBuffer, deleteAllBuffers, displayCannotClear, displayCopyTempTableHalfDefined, displayCopyTempTableInvalidFirstArg, displayCouldNotFindLikeTableFromHandle, displayCreateLikeNotFirst, displayNotPrepared, displayPrepared, displayPreparedIgnoring, displayUnableAddFieldsFrom, displayUnableAssignUnknownUndo, displayUnableCreateLike, errorString, getADMData, getRecordBufferByHandle, getUniqueID, hasRecords, isError, isUndoable, setADMData, setADMData, setCanUndo, setError, setError
delete, firstResource, firstResource, getHead, getNextSibling, getNextSibling, getPrevSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNameReadOnly, hasNextSibling, hasParent, hasPrevSibling, hasPrivateData, interlink, isChained, lastResource, lastResource, moveInChain, name, name, name, readOnlyError, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData
getResourceType, id, id, implicitDeletion, instantiatingProcedure, invalidAttribute, setInstantiatingProcedure, type, unknown
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getNextSibling, getPrevSibling, getPrivateData, setPrivateData, setPrivateData
getResourceType, readOnlyError
id, id, unknown
instantiatingProcedure
public StaticTempTable(Temporary defaultBuffer)
defaultBuffer
- Default buffer of the target table.public java.lang.Class<?> getDMOInterface()
null
if the
table is not initialized yet.public java.lang.Class<?> getDMOClass()
null
if the
table is not initialized yet.public logical createTableLike(handle hbuf)
CREATE-LIKE
method
of Progress 4GL.hbuf
- A handle to a buffer or table from which to copy the definitions.true
on success.public logical createTableLike(java.lang.String tableName)
CREATE-LIKE
method
of Progress 4GL.tableName
- The name of a table to create the copy of.true
on success.public logical createTableLike(character tableName)
CREATE-LIKE
method
of Progress 4GL.tableName
- The name of a table to create the copy of.true
on success.public logical createTableLike(handle hbuf, java.lang.String indexName)
CREATE-LIKE
method
of Progress 4GL.hbuf
- A handle to a buffer or table from which to copy the definitions.indexName
- The name of a single index which is copied from the source table.true
on success.public logical createTableLike(handle hbuf, character indexName)
CREATE-LIKE
method
of Progress 4GL.hbuf
- A handle to a buffer or table from which to copy the definitions.indexName
- The name of a single index which is copied from the source table.true
on success.public logical createTableLike(java.lang.String tableName, java.lang.String indexName)
CREATE-LIKE
method
of Progress 4GL.tableName
- The name of a table to create the copy of.indexName
- The name of a single index which is copied from the source table.true
on success.public logical createTableLike(character tableName, character indexName)
CREATE-LIKE
method
of Progress 4GL.tableName
- The name of a table to create the copy of.indexName
- The name of a single index which is copied from the source table.true
on success.public logical addNewField(character name, character type)
ADD-NEW-FIELD
method
of Progress 4GL.name
- The name of the field to be created in the temp-table.type
- The data type of the specified field.true
on success.public logical addNewField(character name, character type, integer extent)
ADD-NEW-FIELD
method
of Progress 4GL.name
- The name of the field to be created in the temp-table.type
- The data type of the specified field.extent
- An integer expression specifying the extent of an array.true
on success.public logical addNewField(character name, character type, integer extent, character format)
ADD-NEW-FIELD
method
of Progress 4GL.name
- The name of the field to be created in the temp-table.type
- The data type of the specified field.extent
- An integer expression specifying the extent of an array.format
- The data format for the defined data type. If null or unknown,
the default format will be used.true
on success.public logical addNewField(character name, character type, integer extent, character format, BaseDataType initial)
ADD-NEW-FIELD
method
of Progress 4GL.name
- The name of the field to be created in the temp-table.type
- The data type of the specified field.extent
- An integer expression specifying the extent of an array.format
- The data format for the defined data type. If null or unknown,
the default format will be used.initial
- An expression that evaluates to the initial value of the
defined field.
TODO: this method will probably be overloaded because of this.true
on success.public logical addNewField(character name, character type, integer extent, character format, BaseDataType initial, character label)
ADD-NEW-FIELD
method
of Progress 4GL.name
- The name of the field to be created in the temp-table.type
- The data type of the specified field.extent
- An integer expression specifying the extent of an array.format
- The data format for the defined data type. If null or unknown,
the default format will be used.initial
- An expression that evaluates to the initial value of the
defined field.
TODO: this method will probably be overloaded because of this.label
- The label of the defined field. If null or unknown the name
parameter will be used.true
on success.public logical addNewField(character name, character type, integer extent, character format, BaseDataType initial, character label, character columnLabel)
ADD-NEW-FIELD
method
of Progress 4GL.name
- The name of the field to be created in the temp-table.type
- The data type of the specified field.extent
- An integer expression specifying the extent of an array.format
- The data format for the defined data type. If null or unknown,
the default format will be used.initial
- An expression that evaluates to the initial value of the
defined field.
TODO: this method will probably be overloaded because of this.label
- The label of the defined field. If null or unknown the name
parameter will be used.columnLabel
- The label of the column associated with the defined fieldtrue
on success.public logical addNewIndex(character name)
ADD-INDEX-FIELD()
method.
This method is the P2J equivalent of ADD-NEW-INDEX
method
of Progress 4GL.name
- The name of the index to be created.true
on success.public logical addNewIndex(character name, logical unique)
ADD-INDEX-FIELD()
method.
This method is the P2J equivalent of ADD-NEW-INDEX
method
of Progress 4GL.name
- The name of the index to be created.unique
- TRUE if this index is unique.true
on success.public logical addNewIndex(character name, logical unique, logical primary)
ADD-INDEX-FIELD()
method.
This method is the P2J equivalent of ADD-NEW-INDEX
method
of Progress 4GL.name
- The name of the index to be created.unique
- TRUE if this index is unique.primary
- TRUE if this is the primary index.true
on success.public logical addNewIndex(character name, logical unique, logical primary, logical word)
ADD-INDEX-FIELD()
method.
This method is the P2J equivalent of ADD-NEW-INDEX
method
of Progress 4GL.name
- The name of the index to be created.unique
- TRUE if this index is unique.primary
- TRUE if this is the primary index.word
- TRUE if this is a word index.true
on success.public logical addFieldLike(java.lang.String name, java.lang.String source)
ADD-LIKE-FIELD
method of Progress 4GL.name
- The name of the field to be created in the temp-table.source
- Database field name from which to copy the field. The table
name must be qualified with the database name.true
on success.public logical addFieldLike(character name, character source)
ADD-LIKE-FIELD
method of Progress 4GL.name
- The name of the field to be created in the temp-table.source
- Database field name from which to copy the field. The table
name must be qualified with the database name.true
on success.public logical addFieldLike(java.lang.String name, handle source)
ADD-LIKE-FIELD
method of Progress 4GL.name
- The name of the field to be created in the temp-table.source
- Handle to field name from which to copy the field.true
on success.public logical addFieldLike(character name, handle source)
ADD-LIKE-FIELD
method of Progress 4GL.name
- The name of the field to be created in the temp-table.source
- Handle to field name from which to copy the field.true
on success.public logical addIndexLike(java.lang.String name, java.lang.String sourceName, java.lang.String dbTable)
ADD-LIKE-INDEX
method of Progress 4GL.name
- The name of the index to which the source index is being copied. Progress ignores
this option and uses the name of the source index instead.sourceName
- The name of the index in the source table that is being copied
to the temp-table.dbTable
- The database table name from which to copy the index.true
on success.public logical addIndexLike(character name, character sourceName, character dbTable)
ADD-LIKE-INDEX
method
of Progress 4GL.name
- The name of the index to which the source index is being copied. Progress ignores
this option and uses the name of the source index instead.sourceName
- The name of the index in the source table that is being copied
to the temp-table.dbTable
- The database table name from which to copy the index.true
on success.public logical addIndexLike(java.lang.String name, java.lang.String sourceName, handle sourceBuffer)
ADD-LIKE-INDEX
method
of Progress 4GL.name
- The name of the index to which the source index is being copied. Progress ignores
this option and uses the name of the source index instead.sourceName
- The name of the index in the source table that is being copied
to the temp-table.sourceBuffer
- Buffer handle from which to copy the index.true
on success.public logical addIndexLike(character name, character sourceName, handle sourceBuffer)
ADD-LIKE-INDEX
method
of Progress 4GL.name
- The name of the index to which the source index is being copied. Progress ignores
this option and uses the name of the source index instead.sourceName
- The name of the index in the source table that is being copied
to the temp-table.sourceBuffer
- Buffer handle from which to copy the index.true
on success.public logical tempTablePrepare(java.lang.String name)
TEMP-TABLE-PREPARE
method of Progress 4GL.name
- Temp-table name to be used in subsequent query statements that refer to
this temp-table.true
on success.public logical tempTablePrepare(character name)
TEMP-TABLE-PREPARE
method of Progress 4GL.name
- Temp-table name to be used in subsequent query statements that
refer to this temp-table.true
on success.public logical prepared()
true
if this temp-table is in prepared state (after a successful call
to tempTablePrepare(java.lang.String)
).
This method implements the read-only PREPARED attribute from 4GL.public logical canUndo()
canUndo
in interface TempTable
canUndo
in class AbstractTempTable
public logical clear()
public logical addFieldToIndex(java.lang.String indexName, java.lang.String field, java.lang.String ascending)
addNewIndex(com.goldencode.p2j.util.character)
and cannot be called after the
prepared()
.indexName
- The name of the index being built.field
- The name of the temp-table to be added to the index.ascending
- "asc" if the ascending ordering, "desc" for descending other -> error.true
for success.public logical addFieldToIndex(java.lang.String indexName, java.lang.String field, character ascending)
addNewIndex(com.goldencode.p2j.util.character)
and cannot be called after the
prepared()
.indexName
- The name of the index being built.field
- The name of the temp-table to be added to the index.ascending
- "asc" if the ascending ordering, "desc" for descending other -> error.true
for success.public logical addFieldToIndex(character indexName, java.lang.String field, java.lang.String ascending)
addNewIndex(com.goldencode.p2j.util.character)
and cannot be called after the
prepared()
.indexName
- The name of the index being built.field
- The name of the temp-table to be added to the index.ascending
- "asc" if the ascending ordering, "desc" for descending other -> error.true
for success.public logical addFieldToIndex(character indexName, java.lang.String field, character ascending)
addNewIndex(com.goldencode.p2j.util.character)
and cannot be called after the
prepared()
.indexName
- The name of the index being built.field
- The name of the temp-table to be added to the index.ascending
- "asc" if the ascending ordering, "desc" for descending other -> error.true
for success.public logical addFieldToIndex(java.lang.String indexName, character field, java.lang.String ascending)
addNewIndex(com.goldencode.p2j.util.character)
and cannot be called after the
prepared()
.indexName
- The name of the index being built.field
- The name of the temp-table to be added to the index.ascending
- "asc" if the ascending ordering, "desc" for descending other -> error.true
for success.public logical addFieldToIndex(java.lang.String indexName, character field, character ascending)
addNewIndex(com.goldencode.p2j.util.character)
and cannot be called after the
prepared()
.indexName
- The name of the index being built.field
- The name of the temp-table to be added to the index.ascending
- "asc" if the ascending ordering, "desc" for descending other -> error.true
for success.public logical addFieldToIndex(character indexName, character field, java.lang.String ascending)
addNewIndex(com.goldencode.p2j.util.character)
and cannot be called after the
prepared()
.indexName
- The name of the index being built.field
- The name of the temp-table to be added to the index.ascending
- "asc" if the ascending ordering, "desc" for descending other -> error.true
for success.public logical addFieldToIndex(character indexName, character field, character ascending)
addNewIndex(com.goldencode.p2j.util.character)
and cannot be called after the
prepared()
.indexName
- The name of the index being built.field
- The name of the temp-table to be added to the index.ascending
- "asc" if the ascending ordering, "desc" for descending other -> error.true
for success.public logical addFieldToIndex(java.lang.String indexName, java.lang.String field)
addNewIndex(com.goldencode.p2j.util.character)
and cannot be called after the prepared()
.indexName
- The name of the index being built.field
- The name of the temp-table to be added to the index.true
for success.public logical addFieldToIndex(character indexName, java.lang.String field)
addNewIndex(com.goldencode.p2j.util.character)
and cannot be called after the prepared()
.indexName
- The name of the index being built.field
- The name of the temp-table to be added to the index.true
for success.public logical addFieldToIndex(java.lang.String indexName, character field)
addNewIndex(com.goldencode.p2j.util.character)
and cannot be called after the prepared()
.indexName
- The name of the index being built.field
- The name of the temp-table to be added to the index.true
for success.public logical addFieldToIndex(character indexName, character field)
addNewIndex(com.goldencode.p2j.util.character)
and cannot be called after the prepared()
.indexName
- The name of the index being built.field
- The name of the temp-table to be added to the index.true
for success.public logical addFieldsFrom(handle hbuf)
hbuf
- A handle to a buffer or table from which to copy the field definitions.true
for success.public logical addFieldsFrom(handle hbuf, java.lang.String except)
hbuf
- A handle to a buffer or table from which to copy the field definitions.except
- A comma-separated list of field names to be excluded from the copy process.true
for success.public logical addFieldsFrom(handle hbuf, character except)
hbuf
- A handle to a buffer or table from which to copy the field definitions.except
- A comma-separated list of field names to be excluded from the copy process.true
for success.public logical addFieldsFrom(java.lang.String tableName)
tableName
- The name of the table from which to copy the field definitions.true
for success.public logical addFieldsFrom(character tableName)
tableName
- The name of the table from which to copy the field definitions.true
for success.public logical addFieldsFrom(java.lang.String tableName, character except)
tableName
- The name of the table from which to copy the field definitions.except
- A comma-separated list of field names to be excluded from the copy process.true
for success.public logical addFieldsFrom(character tableName, character except)
tableName
- The name of the table from which to copy the field definitions.except
- A comma-separated list of field names to be excluded from the copy process.true
for success.public logical addFieldsFrom(java.lang.String tableName, java.lang.String except)
tableName
- The name of the table from which to copy the field definitions.except
- A comma-separated list of field names to be excluded from the copy process.true
for success.public handle defaultBufferHandle()
tempTablePrepare()
method.
This method is the P2J equivalent of DEFAULT-BUFFER-HANDLE
attribute.public logical dynamic()
true
if the resource is dynamic, false
otherwise.public boolean _dynamic()
true
if the buffer is dynamic.true
if the resource is dynamic, false
otherwise.protected boolean resourceDelete()
HandleChain.delete()
.resourceDelete
in class HandleChain
true
if the resource was deleted.public boolean valid()
true
if we are valid (can be used).public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- Other object to compare.true
if the other object represents the same temp table.public int hashCode()
equals(Object)
.hashCode
in class java.lang.Object
protected boolean addFunctionWasCalled()
addFunctionWasCalled
in class AbstractTempTable
true
.