public abstract class AbstractTempTable extends HandleChain implements TempTable
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractTempTable.CallingFunction
Enumeration which represents some temp-table functions.
|
TempTable.BeforeType| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
admData
Corresponds ADM-DATA attribute.
|
protected java.util.Set<Buffer> |
allBuffers
The set of child buffers, in registration order.
|
protected TempTable.BeforeType |
beforeTableType
Is this an AFTER-TABLE or BEFORE-TABLE? Cached after value is computed.
|
private boolean |
dataSourceModified
Current value of the
DATA-SOURCE-MODIFIED attribute. |
protected static java.lang.String |
DEFAULT_COPY_TEMP_TABLE_PREFIX
Default prefix for the name of a temp-table copied with COPY-TEMP-TABLE.
|
protected BufferImpl |
defaultBuffer
Default buffer.
|
protected java.lang.Boolean |
error
Corresponds ERROR attribute.
|
protected java.lang.String |
errorString
Corresponds ERROR-STRING attribute.
|
private java.util.Map<java.lang.String,TableMapper.MutableFieldInfo> |
fieldInfo
The mutable field info for this temp-table instance.
|
private java.lang.String |
namespacePrefix
The NAMESPACE-PREFIX of the XML node for serialized data of this
TEMP-TABLE. |
private java.lang.String |
namespaceURI
The NAMESPACE-URI of the XML node for serialized data of this
TEMP-TABLE. |
private TempTable |
originTable
The current value resource of the
ORIGIN-HANDLE attribute. |
protected TempTable |
peerTable
The cached peer buffer.
|
private boolean |
rejected
The current value of boolean
REJECTED attribute: indicates whether a change to the
data of this DataSet is rejected. |
private int |
schemaMarshal
The current value of the
SCHEMA-MARSHAL attribute. |
private java.lang.String |
serializeName
The current value of the
SERIALIZE-NAME attribute. |
static int |
SM_DEFAULT
The default
SCHEMA-MARSHAL level. |
static int |
SM_FULL
Encodes the
MIN SCHEMA-MARSHAL level. |
static int |
SM_MIN
Encodes the
MIN SCHEMA-MARSHAL level. |
static int |
SM_NONE
Encodes the
NONE SCHEMA-MARSHAL level. |
(package private) TableMapper.LegacyTableInfo |
tableInfo
Direct reference to the table mapper's structure.
|
private boolean |
trackingChanges
The current value of
TRACKING-CHANGES attribute. |
protected boolean |
undoable
true if changes made to the records the temporary table can be undone. |
private java.lang.Long |
uniqueId
Corresponds UNIQUE-ID attribute.
|
private java.lang.String |
xmlNodeName
The name of the XML node for serialized data of this
TEMP-TABLE. |
name, nextSibling, prevSibling, wainstProc, pmSCHEMA_MARSHAL_FULL, SCHEMA_MARSHAL_MIN, SCHEMA_MARSHAL_NONE| Constructor and Description |
|---|
AbstractTempTable(boolean dynamic)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
_clear()
Check whether this TEMP-TABLE is in CLEAR state: I.e.
|
protected boolean |
_hasRecords()
Worker for
hasRecords. |
(package private) boolean |
_isTrackingChanges()
Checks whether changes in this temp-table is enabled for a
DataSet. |
abstract boolean |
_prepared()
Returns
true if this temp-table is in prepared state (after a successful call to
TempTable.tempTablePrepare(java.lang.String)). |
protected abstract boolean |
addFunctionWasCalled()
Determine if an ADD-* function was called for the table (CLEAR function resets the state).
|
logical |
canUndo()
Obtain the current UNDO attribute of 4GL temp-table.
|
void |
changeErrorString(character errStr)
Sets the ERROR-STRING attribute of 4GL temp-table.
|
private TempTable.BeforeType |
computeTableType()
Computes the temp-table type and if it is an
AFTER_TABLE or a BEFORE_TABLE
the peer (complementary) buffer is also stored in peerTable. |
logical |
copyTempTable(handle other)
Copies the other temp-table.
|
logical |
copyTempTable(handle other,
boolean append)
Copies the other temp-table.
|
logical |
copyTempTable(handle other,
boolean append,
boolean replace)
Copies the other temp-table.
|
logical |
copyTempTable(handle other,
boolean append,
boolean replace,
boolean looseCopy)
Copies the other temp-table.
|
logical |
copyTempTable(handle other,
boolean append,
boolean replace,
boolean looseCopy,
java.lang.String prefix)
Copies the other temp-table.
|
logical |
copyTempTable(handle other,
logical append)
Copies the other temp-table.
|
logical |
copyTempTable(handle other,
logical append,
logical replace)
Copies the other temp-table.
|
logical |
copyTempTable(handle other,
logical append,
logical replace,
logical looseCopy)
Copies the other temp-table.
|
logical |
copyTempTable(handle other,
logical append,
logical replace,
logical looseCopy,
character prefix)
Copies the other temp-table.
|
(package private) TemporaryBuffer |
defaultBuffer()
Get default buffer for the static temp-table.
|
logical |
deleteAll()
Bulk delete all records associated with the
TempTable. |
protected void |
deleteAllBuffers()
Delete all the buffers (master and slave) associated with this temporary table (static or
dynamic).
|
(package private) void |
deleteAllImpl()
Implementation of bulk delete all records associated with the
TempTable. |
void |
deleteForAll()
Bulk delete all records associated with the
Buffer or TempTable. |
<T extends BaseDataType> |
dereference(java.lang.Class<T> type,
java.lang.String memberName)
All kind of temp-tables can be dereferenced.
|
BaseDataType |
dereference(java.lang.String memberName)
All kind of temp-tables can be dereferenced.
|
void |
dereference(java.lang.String memberName,
java.lang.Object value)
All kind of temp-tables can be dereferenced.
|
java.lang.Object |
derefPoly(java.lang.String memberName)
Emitted for
:: operator used as r-value in a dynamic extent assignment, as the conversion
rules doesn't know if the target field is extent or scalar. |
(package private) void |
deregisterBuffer(Buffer buf)
Deregister a buffer which has gone out of scope.
|
protected void |
displayCannotClear()
Display "CLEAR method may not be called on a static temp-table object, nor on a dynamic one
with records; use buffer:EMPTY-TEMP-TABLE" error message.
|
protected void |
displayCopyTempTableHalfDefined()
Display "COPY-TEMP-TABLE target temp-table must be either PREPARED or CLEAR, but not
half-defined" error message.
|
protected void |
displayCopyTempTableInvalidFirstArg()
Display "COPY-TEMP-TABLE must have valid buffer/temp-table handle as first argument" error
message.
|
protected void |
displayCouldNotFindLikeTableFromHandle()
Display "TEMP-TABLE method could not find LIKE table from BUFFER handle" error message.
|
protected void |
displayCreateLikeNotFirst()
Display "CREATE-LIKE must be the first method on a newly CREATEd TEMP-TABLE, or a newly
CLEARed one" error message.
|
protected void |
displayNotPrepared()
Display "TEMP-TABLE must be PREPARED before referencing NAME/DEFAULT-BUFFER-HANDLE etc"
error message.
|
protected void |
displayPrepared()
Display "Definitional TEMP-TABLE methods (ADD-NEW/LIKE) may not be called after
TEMP-TABLE-PREPARE has been called unless a CLEAR is done first, and may never be called on
a DEFINED static table" error message.
|
protected void |
displayPreparedIgnoring()
Display "TEMP-TABLE is already prepared--ignoring" error message.
|
protected void |
displayUnableAddFieldsFrom()
Display "Unable to ADD-FIELDS-FROM for TEMP-TABLE" error message.
|
protected void |
displayUnableAssignUnknownUndo()
Display "Unable to assign UNKNOWN value to attribute UNDO on TEMP-TABLE widget" error
message.
|
protected void |
displayUnableCreateLike()
Display "Unable to CREATE-LIKE for TEMP-TABLE--try using a smaller source table" error
message.
|
protected void |
displayUninitialized()
Display "Attempt to reference uninitialized temp-table" error message.
|
logical |
error()
Returns the state of the ERROR attribute
|
void |
error(boolean value)
Setter for ERROR attribute.
|
void |
error(logical value)
Setter for ERROR attribute.
|
character |
errorString()
Obtain the current ERROR-STRING attribute of 4GL temp-table.
|
(package private) boolean |
flushBuffers()
Make sure content from all buffers of this temp-table are flushed.
|
character |
getADMData()
Get the value of the ADM-DATA attribute.
|
handle |
getAfterTable()
Get the handle of the after-image table that corresponds to the before-image table
currently associated with this temp-table handle.
|
TempTable |
getAfterTableNative()
Get the handle of the after-image table that corresponds to the before-image table
currently associated with this temp-table handle.
|
handle |
getBeforeTable()
Get the handle of the before-image table that corresponds to the after-image table
currently associated with this temp-table handle.
|
TempTable |
getBeforeTableNative()
Get the handle of the before-image table that corresponds to the after-image table
currently associated with this temp-table handle.
|
java.util.Collection<P2JField> |
getFields()
Get the collection of table fields.
|
(package private) TableMapper.MutableFieldInfo |
getMutableInfo(java.lang.String fieldLegacyName,
boolean setter,
java.util.function.BiFunction<TempTable,java.lang.String,TableMapper.MutableFieldInfo> field)
Resolve the mutable information for the given field.
|
handle |
getOriginHandle()
Get the handle of the TEMP-TABLE in the original source
DataSet object that
corresponds to the TEMP-TABLE currently associated with this TEMP-TABLE handle. |
TempTable |
getOriginTable()
Get the handle of the TEMP-TABLE in the original source
DataSet object that
corresponds to the TEMP-TABLE currently associated with this TEMP-TABLE handle. |
protected RecordBuffer |
getRecordBufferByHandle(handle hbuf,
AbstractTempTable.CallingFunction callingFunction)
Get record buffer by buffer or temp-table handle.
|
character |
getSchemaMarshal()
Obtain the current value of
SCHEMA-MARSHAL attribute. |
int |
getSchemaMarshalLevel()
Obtain the current
SCHEMA-MARSHAL level. |
character |
getSerializeName()
Implementation of the read access of the
SERIALIZE-NAME attribute. |
integer |
getUniqueID()
Gets the the unique ID number associated to this object by the
underlying system.
|
character |
getXmlDataType()
Obtain the XML Schema data type for the buffer-field object.
|
character |
getXmlNodeName()
Obtain the name of the XML element or attribute representing the target object (a
TEMP-TABLE)
name in an XML document. |
character |
getXmlNodeType()
Obtain the XML node type of this object.
|
logical |
hasRecords()
Checks whether this temp-table contains any records.
|
logical |
isDataSourceModified()
Checks whether the data in the data source has been modified.
|
logical |
isMinSchemaMarshal()
Implements the
MIN-SCHEMA-MARSHAL attribute getter. |
logical |
isNoSchemaMarshal()
Implements the
NO-SCHEMA-MARSHAL attribute getter. |
logical |
isTrackingChanges()
Checks whether changes in this temp-table is enabled for a
DataSet. |
boolean |
isUndoable()
Get the current value of UNDO attribute of this temp-table.
|
character |
namespacePrefix()
Returns the value of the NAMESPACE-PREFIX attribute.
|
void |
namespacePrefix(character prefix)
Setter for NAMESPACE-PREFIX attribute.
|
void |
namespacePrefix(java.lang.String prefix)
Setter for NAMESPACE-PREFIX attribute.
|
character |
namespaceURI()
Returns the value of the NAMESPACE-URI attribute.
|
void |
namespaceURI(character uri)
Setter for NAMESPACE-URI attribute.
|
void |
namespaceURI(java.lang.String uri)
Setter for NAMESPACE-URI attribute.
|
integer |
numReferences()
Getter for
NUM-REFERENCES attribute: obtains number of references to this TempTable
object that is defined as a parameter to which reference-only objects are bound. |
logical |
prepared()
Returns
true if this temp-table is in prepared state (after a successful call
to TempTable.tempTablePrepare(java.lang.String)). |
character |
primaryIndex()
Get the PRIMARY attribute.
|
void |
primaryIndex(java.lang.String primary)
Set the PRIMARY attribute.
|
void |
primaryIndex(Text primary)
Set the PRIMARY attribute.
|
logical |
readJson(SourceData source)
Implementation of the READ-JSON method.
|
logical |
readJson(SourceData source,
character readMode)
Implementation of the READ-JSON method.
|
abstract boolean |
readTable(java.lang.String tableName,
TableReader reader)
Read XML/JSON data from the input source and store it in the just created empty TEMP-TABLE.
|
logical |
readXml(SourceData source,
character readMode,
character schemaLocation,
logical overrideDefaultMapping)
Implementation of the READ-XML method.
|
logical |
readXml(SourceData source,
character readMode,
character schemaLocation,
logical overrideDefaultMapping,
character fieldTypeMapping)
Implementation of the READ-XML method.
|
logical |
readXml(SourceData source,
character readMode,
character schemaLocation,
logical overrideDefaultMapping,
character fieldTypeMapping,
character verifySchemaMode)
Implementation of the READ-XML method.
|
logical |
readXmlSchema(SourceData source,
logical override)
Reads XML Schema from an XML document and uses that schema to either create a schema for a
TempTable or TempTable or verify existing schema in a TempTable,
TempTable or temp-table Buffer object. |
logical |
readXmlSchema(SourceData source,
logical override,
Text mapping)
Reads XML Schema from an XML document and uses that schema to either create a schema for a
TempTable or TempTable or verify existing schema in a TempTable,
TempTable or temp-table Buffer object. |
logical |
readXmlSchema(SourceData source,
logical override,
Text strMapping,
Text verifyMode)
Reads XML Schema from an XML document and uses that schema to either create a schema for a
TempTable or TempTable or verify existing schema in a TempTable,
TempTable or temp-table Buffer object. |
(package private) void |
registerBuffer(Buffer buf)
Register a new buffer with this table.
|
logical |
rejected()
Returns the state of the REJECTED attribute
|
void |
rejected(boolean value)
Setter for REJECTED attribute.
|
void |
rejected(logical value)
Setter for REJECTED attribute.
|
void |
setADMData(character value)
Set the value of the ADM-DATA attribute.
|
void |
setADMData(java.lang.String value)
Set the value of the ADM-DATA attribute.
|
void |
setCanUndo(logical undo)
Sets the UNDO attribute of 4GL temp-table.
|
void |
setDataSourceModified(boolean mod)
Manually mark the data in the target structure as modified.
|
void |
setDataSourceModified(logical mod)
Manually mark the data in the target structure as modified.
|
void |
setMinSchemaMarshal(boolean on)
Sets the
SCHEMA-MARSHAL attribute to "MIN" value when on = true or
back to default value on = false. |
void |
setMinSchemaMarshal(logical on)
Sets the
SCHEMA-MARSHAL attribute to "MIN" value when on = true or
back to default value on = false. |
void |
setNoSchemaMarshal(boolean on)
Sets the
SCHEMA-MARSHAL attribute to "NO" value when on = true or
back to default value on = false. |
void |
setNoSchemaMarshal(logical on)
Sets the
SCHEMA-MARSHAL attribute to "NO" value when on = true or
back to default value on = false. |
(package private) void |
setOriginTable(TempTable origin)
Sets the origin table.
|
void |
setSchemaMarshal(java.lang.String level)
Sets a new value for
SCHEMA-MARSHAL attribute. |
void |
setSchemaMarshal(Text level)
Sets a new value for
SCHEMA-MARSHAL attribute. |
void |
setSchemaMarshalLevel(int schemaMarshalLevel)
Set the current
SCHEMA-MARSHAL level. |
void |
setSerializeName(java.lang.String sName)
Implementation of the write access of the
SERIALIZE-NAME attribute. |
void |
setSerializeName(Text sName)
Implementation of the write access of the
SERIALIZE-NAME attribute. |
void |
setTrackingChanges(boolean on)
Enable or disable changes tracking this temp-table is enabled for a
DataSet. |
void |
setTrackingChanges(logical val)
Enable or disable changes tracking this temp-table is enabled for a
DataSet. |
void |
setXmlDataType(java.lang.String newType)
Configures the XML Schema data type for the buffer-field object.
|
void |
setXmlDataType(Text newType)
Configures the XML Schema data type for the buffer-field object.
|
void |
setXmlNodeName(java.lang.String name)
Sets the name of the XML element or attribute representing the target object (either a
DataSet,
a TempTable, a TemporaryBuffer, or a temp-table BufferField) name in an XML
document. |
void |
setXmlNodeName(Text name)
Sets the name of the XML element or attribute representing the target object (either a
DataSet,
a TempTable, a TemporaryBuffer, or a temp-table BufferField) name in an XML
document. |
void |
setXmlNodeType(java.lang.String newType)
Allows specifying how this object will be represented in XML and XML Schema.
|
void |
setXmlNodeType(Text newType)
Allows specifying how this object will be represented in XML and XML Schema.
|
java.lang.String |
tableDefinition()
Constructs and returns a string containing the P4GL schema definition of the table.
|
boolean |
validateAllBuffers()
Validate all buffers from this table, in the reverse order they were created.
|
logical |
writeJson(TargetData target)
Implementation of the WRITE-JSON method.
|
logical |
writeJson(TargetData target,
logical formatted)
Implementation of the WRITE-JSON method.
|
logical |
writeJson(TargetData target,
logical formatted,
character encoding)
Implementation of the WRITE-JSON method.
|
logical |
writeJson(TargetData target,
logical formatted,
character encoding,
logical omitInitialValues)
Implementation of the WRITE-JSON method.
|
logical |
writeJson(TargetData target,
logical formatted,
character encoding,
logical omitInitialValues,
logical omitOuterObject)
Implementation of the WRITE-JSON method.
|
logical |
writeJson(TargetData target,
logical formatted,
character encoding,
logical omitInitialValues,
logical omitOuterObject,
logical writeBeforeImage)
Implementation of the WRITE-JSON method.
|
logical |
writeXml(TargetData target)
Implementation of the WRITE-XML method.
|
logical |
writeXml(TargetData target,
logical formatted)
Implementation of the WRITE-XML method.
|
logical |
writeXml(TargetData target,
logical formatted,
character encoding)
Implementation of the WRITE-XML method.
|
logical |
writeXml(TargetData target,
logical formatted,
character encoding,
character schemaLocation)
Implementation of the WRITE-XML method.
|
logical |
writeXml(TargetData target,
logical formatted,
character encoding,
character schemaLocation,
logical writeXmlSchema)
Implementation of the WRITE-XML method.
|
logical |
writeXml(TargetData target,
logical formatted,
character encoding,
character schemaLocation,
logical writeXmlSchema,
logical minXmlSchema)
Implementation of the WRITE-XML method.
|
logical |
writeXml(TargetData target,
logical formatted,
character encoding,
character schemaLocation,
logical writeXmlSchema,
logical minXmlSchema,
logical writeBeforeImage)
Implementation of the WRITE-XML method.
|
logical |
writeXml(TargetData target,
logical formatted,
character encoding,
character schemaLocation,
logical writeXmlSchema,
logical minXmlSchema,
logical beforeImage,
logical noInitialVals)
Implementation of the WRITE-XML method.
|
logical |
writeXmlSchema(TargetData target)
Writes an XML representation of the definition of this
TempTable. |
logical |
writeXmlSchema(TargetData target,
logical formatted)
Writes an XML representation of the definition of this
TempTable. |
logical |
writeXmlSchema(TargetData target,
logical formatted,
Text encoding)
Writes an XML representation of the definition of this
TempTable. |
logical |
writeXmlSchema(TargetData target,
logical formatted,
Text encoding,
logical minXmlSchema)
Writes an XML representation of the definition of this
TempTable. |
logical |
writeXmlSchema(TargetData target,
logical formatted,
Text encoding,
logical minXmlSchema,
logical omitInitVal)
Writes an XML representation of the definition of this
TempTable. |
_name, delete, firstResource, firstResource, getHead, getNextSibling, getNextSibling, getPrevSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNameConstraints, hasNameReadOnly, hasNextSibling, hasParent, hasPrevSibling, hasPrivateData, interlink, isChained, lastResource, lastResource, moveInChain, name, name, name, readOnlyError, readOnlyError, resolveChainType, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData, validateName_instantiatingProcedure, addToPool, doDelete, equals, hashCode, id, id, implicitDeletion, incrementTrigger, instantiatingProcedure, invalidAttribute, processResource, registerResource, resourceDelete, resourceType, setInstantiatingProcedure, toString, type, unableToAssignUnknown, unknownclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddFieldLike, addFieldLike, addFieldLike, addFieldLike, addFieldLike, addFieldLike, addFieldsFrom, addFieldsFrom, addFieldsFrom, addFieldsFrom, addFieldsFrom, addFieldsFrom, addFieldsFrom, addFieldsFrom, addFieldToIndex, addFieldToIndex, addFieldToIndex, addFieldToIndex, addFieldToIndex, addFieldToIndex, addFieldToIndex, addFieldToIndex, addFieldToIndex, addFieldToIndex, addFieldToIndex, addFieldToIndex, addIndexLike, addIndexLike, addIndexLike, addIndexLike, addNewField, addNewField, addNewField, addNewField, addNewField, addNewField, addNewIndex, addNewIndex, addNewIndex, addNewIndex, getCodePage, getCodePageSupplier, getDMOBufInterface, getDMOClass, getDMOInterface, getDmoMeta, setCodePage, setCodePageSupplier, tempTablePrepare, tempTablePrepare, tempTablePrepare, tempTablePrepare, tempTablePrepare, tempTablePreparedefaultBufferHandle, defaultBufferHandleNativegetNextSibling, getPrevSibling, getPrivateData, setPrivateData, setPrivateDatareadOnlyError, readOnlyError, resourceTypeid, id, unknown, validcreateLike, createLike, createLike, createLike, createLike, createLike, createLikeisDataSourceModifiedallowDelete, deletedereference, dereference, dereference, dereference_dynamic, dynamicinstantiatingProcedurepublic static final int SM_DEFAULT
SCHEMA-MARSHAL level. Encodes the unknown value of the attribute. It is
semantically equivalent to SM_FULL.public static final int SM_NONE
NONE SCHEMA-MARSHAL level. No attributes are marshaled.public static final int SM_MIN
MIN SCHEMA-MARSHAL level. The marshaled schema is minimized. At this level
the following data will still BE marshaled:
public static final int SM_FULL
MIN SCHEMA-MARSHAL level. The full schema is marshalled.protected static final java.lang.String DEFAULT_COPY_TEMP_TABLE_PREFIX
protected BufferImpl defaultBuffer
protected java.lang.String errorString
protected java.lang.Boolean error
protected java.lang.String admData
protected boolean undoable
true if changes made to the records the temporary table can be undone.TableMapper.LegacyTableInfo tableInfo
private java.lang.String xmlNodeName
TEMP-TABLE.private java.lang.String namespaceURI
TEMP-TABLE.private java.lang.String namespacePrefix
TEMP-TABLE.private java.lang.String serializeName
SERIALIZE-NAME attribute.private int schemaMarshal
SCHEMA-MARSHAL attribute.
The following encoding is used internally: 0 = unknown, 1: NONE, 2: MIN, 3: FULL (see above, the SM_* static constants).
private boolean rejected
REJECTED attribute: indicates whether a change to the
data of this DataSet is rejected. The attribute is writable.protected final java.util.Set<Buffer> allBuffers
private java.lang.Long uniqueId
private boolean trackingChanges
TRACKING-CHANGES attribute.private TempTable originTable
ORIGIN-HANDLE attribute.protected TempTable.BeforeType beforeTableType
protected TempTable peerTable
private boolean dataSourceModified
DATA-SOURCE-MODIFIED attribute.private java.util.Map<java.lang.String,TableMapper.MutableFieldInfo> fieldInfo
public AbstractTempTable(boolean dynamic)
dynamic - Flag indicating if this is a static or a dynamic temp-table.public character primaryIndex()
primaryIndex in interface PrimaryIndexpublic void primaryIndex(Text primary)
primaryIndex in interface PrimaryIndexprimary - The primary index.public void primaryIndex(java.lang.String primary)
primaryIndex in interface PrimaryIndexprimary - The primary index.public integer getUniqueID()
getUniqueID in interface UniqueIDpublic logical copyTempTable(handle other)
copyTempTable in interface TempTableDuplicatorother - Some other temp-table to copy from.public logical copyTempTable(handle other, logical append)
copyTempTable in interface TempTableDuplicatorother - Some other temp-table to copy from.append - Append mode.public logical copyTempTable(handle other, logical append, logical replace)
copyTempTable in interface TempTableDuplicatorother - Some other temp-table to copy from.append - Append mode.replace - Replace mode.public logical copyTempTable(handle other, logical append, logical replace, logical looseCopy)
copyTempTable in interface TempTableDuplicatorother - Some other temp-table to copy from.append - Append mode.replace - Replace mode.looseCopy - Loose copy mode.public logical copyTempTable(handle other, boolean append)
copyTempTable in interface TempTableDuplicatorother - Some other temp-table to copy from.append - Append mode.public logical copyTempTable(handle other, boolean append, boolean replace)
copyTempTable in interface TempTableDuplicatorother - Some other temp-table to copy from.append - Append mode.replace - Replace mode.public logical copyTempTable(handle other, boolean append, boolean replace, boolean looseCopy)
copyTempTable in interface TempTableDuplicatorother - Some other temp-table to copy from.append - Append mode.replace - Replace mode.looseCopy - Loose copy mode.public logical copyTempTable(handle other, boolean append, boolean replace, boolean looseCopy, java.lang.String prefix)
copyTempTable in interface TempTableDuplicatorother - Some other temp-table to copy from.append - Append mode.replace - Replace mode.looseCopy - Loose copy mode.prefix - Prefix for naming the copied temp-table.public logical copyTempTable(handle other, logical append, logical replace, logical looseCopy, character prefix)
copyTempTable in interface TempTableDuplicatorother - Some other temp-table to copy from.append - Append mode.replace - Replace mode.looseCopy - Loose copy mode.prefix - Prefix for naming the copied temp-table.public java.lang.Object derefPoly(java.lang.String memberName)
:: operator used as r-value in a dynamic extent assignment, as the conversion
rules doesn't know if the target field is extent or scalar.derefPoly in interface DereferenceablememberName - The name of the member to be extracted.public BaseDataType dereference(java.lang.String memberName)
defaultBuffer if not null. Otherwise, the table was not prepared
(for dynamic temp-tables).dereference in interface DereferenceablememberName - The name of the member to be extracted.defaultBuffer.public <T extends BaseDataType> T dereference(java.lang.Class<T> type, java.lang.String memberName)
defaultBuffer if not null. Otherwise, the table was not prepared
(for dynamic temp-tables).dereference in interface Dereferenceabletype - The expected type of the returned value.memberName - The name of the member to be extracted.defaultBuffer.public void dereference(java.lang.String memberName,
java.lang.Object value)
defaultBuffer if not null. Otherwise, the table was not prepared
(for dynamic temp-tables) and the uninitialized error should be displayed.dereference in interface DereferenceablememberName - The name of the member to be extracted.value - The new value that will be assigned to the extracted field.public logical prepared()
true if this temp-table is in prepared state (after a successful call
to TempTable.tempTablePrepare(java.lang.String)).
This method implements the read-only PREPARED attribute from 4GL.public void changeErrorString(character errStr)
changeErrorString in interface ErrorStringerrStr - The new value for the ERROR-STRING attribute.public character errorString()
errorString in interface ErrorStringpublic character getADMData()
getADMData in interface ADMDatapublic void setADMData(java.lang.String value)
setADMData in interface ADMDatavalue - The new value.public void setADMData(character value)
setADMData in interface ADMDatavalue - The new value.public logical error()
public void error(boolean value)
public void error(logical value)
public void setCanUndo(logical undo)
setCanUndo in interface TempTableundo - The new value for the attribute.public logical canUndo()
public logical hasRecords()
hasRecords in interface TempTablepublic final boolean isUndoable()
isUndoable in interface UndoStateProviderpublic logical deleteAll()
TempTable.deleteAll in interface EmptyTempTabletrue if the delete was possible.ErrorConditionException - If an error occurs performing the bulk delete operation.public void deleteForAll()
Buffer or TempTable. This allows bulk
delete when TRACKING-CHANGES is on, as this emulates a FOR EACH tt1. DELETE tt1. end. block.deleteForAll in interface EmptyTempTableErrorConditionException - If an error occurs performing the bulk delete operation.public int getSchemaMarshalLevel()
SCHEMA-MARSHAL level. Refer to SM_DEFAULT, SM_NONE,
SM_MIN, and SM_FULL static constants for details.SCHEMA-MARSHAL level.public void setSchemaMarshalLevel(int schemaMarshalLevel)
SCHEMA-MARSHAL level. Refer to SM_DEFAULT, SM_NONE,
SM_MIN, and SM_FULL static constants for details.public logical isNoSchemaMarshal()
NO-SCHEMA-MARSHAL attribute getter.isNoSchemaMarshal in interface TempTabletrue when SCHEMA-MARSHAL attribute is set to "NONE".public void setNoSchemaMarshal(boolean on)
SCHEMA-MARSHAL attribute to "NO" value when on = true or
back to default value on = false.setNoSchemaMarshal in interface TempTableon - The new value of SCHEMA-MARSHAL attribute.public void setNoSchemaMarshal(logical on)
SCHEMA-MARSHAL attribute to "NO" value when on = true or
back to default value on = false.setNoSchemaMarshal in interface TempTableon - The new value of SCHEMA-MARSHAL attribute.public logical isMinSchemaMarshal()
MIN-SCHEMA-MARSHAL attribute getter.isMinSchemaMarshal in interface TempTabletrue when SCHEMA-MARSHAL attribute is set to "MIN".public void setMinSchemaMarshal(boolean on)
SCHEMA-MARSHAL attribute to "MIN" value when on = true or
back to default value on = false.setMinSchemaMarshal in interface TempTableon - The new value of SCHEMA-MARSHAL attribute.public void setMinSchemaMarshal(logical on)
SCHEMA-MARSHAL attribute to "MIN" value when on = true or
back to default value on = false.setMinSchemaMarshal in interface TempTableon - The new value of SCHEMA-MARSHAL attribute.public character getSchemaMarshal()
SCHEMA-MARSHAL attribute.getSchemaMarshal in interface TempTableSCHEMA-MARSHAL attribute.public void setSchemaMarshal(java.lang.String level)
SCHEMA-MARSHAL attribute.setSchemaMarshal in interface TempTablelevel - the new value or SCHEMA-MARSHAL attribute.public void setSchemaMarshal(Text level)
SCHEMA-MARSHAL attribute.setSchemaMarshal in interface TempTablelevel - the new value or SCHEMA-MARSHAL attribute.public logical isTrackingChanges()
DataSet.isTrackingChanges in interface TempTableTRACKING-CHANGES as described above.public logical rejected()
rejected in interface Rejectablepublic void rejected(boolean value)
rejected in interface Rejectablevalue - The new value of REJECTED attribute.public void rejected(logical value)
rejected in interface Rejectablevalue - The new value of REJECTED attribute.public void setTrackingChanges(logical val)
DataSet.setTrackingChanges in interface TempTableval - The new value for TRACKING-CHANGES attribute.public void setTrackingChanges(boolean on)
DataSet.setTrackingChanges in interface TempTableon - The new value for TRACKING-CHANGES attribute.public handle getBeforeTable()
getBeforeTable in interface TempTableBEFORE-TABLE as described above.public TempTable getBeforeTableNative()
getBeforeTableNative in interface TempTableBEFORE-TABLE as described above.public handle getAfterTable()
getAfterTable in interface TempTableAFTER-TABLE as described above.public TempTable getAfterTableNative()
getAfterTableNative in interface TempTableAFTER-TABLE as described above.public handle getOriginHandle()
DataSet object that
corresponds to the TEMP-TABLE currently associated with this TEMP-TABLE handle.getOriginHandle in interface TempTableORIGIN-HANDLE attribute.public TempTable getOriginTable()
DataSet object that
corresponds to the TEMP-TABLE currently associated with this TEMP-TABLE handle.getOriginTable in interface TempTablepublic logical readXml(SourceData source, character readMode, character schemaLocation, logical overrideDefaultMapping)
Defaults applied:
readXml in interface XmlDatasource - Data source.readMode - Mode in which data is read into buffer. Must evaluate to APPEND,
EMPTY, MERGE, or REPLACE.schemaLocation - Name of an external XML schema file, or empty string or unknown value to use the
xsi:noNamespaceSchemaLocation value set in the XML data, if any.overrideDefaultMapping - true to override the default string-to-binary data type mappings when
creating a temp-table schema from an XML schema.true if the operation completed successfully, else false.public logical readXml(SourceData source, character readMode, character schemaLocation, logical overrideDefaultMapping, character fieldTypeMapping)
readXml in interface XmlDatasource - Data source.readMode - Mode in which data is read into buffer. Must evaluate to APPEND, EMPTY, MERGE, or REPLACE.schemaLocation - Name of an external XML schema file, or empty string or unknown value to use the
xsi:noNamespaceSchemaLocation value set in the XML data, if any.overrideDefaultMapping - True to override the default string-to-binary data type mappings when
creating a temp-table schema from an XML schema.fieldTypeMapping - Comma-delimited list of field name and data type name pairs to use to override
data type mappings of specific fields. Specify unknown value to use default
mappings.True if the operation completed successfully, else false.public logical readXml(SourceData source, character readMode, character schemaLocation, logical overrideDefaultMapping, character fieldTypeMapping, character verifySchemaMode)
readXml in interface XmlDatasource - Data source.readMode - Mode in which data is read into buffer. Must evaluate to APPEND, EMPTY, MERGE, or REPLACE.schemaLocation - Name of an external XML schema file, or empty string or unknown value to use the
xsi:noNamespaceSchemaLocation value set in the XML data, if any.overrideDefaultMapping - True to override the default string-to-binary data type mappings when
creating a temp-table schema from an XML schema.fieldTypeMapping - Comma-delimited list of field name and data type name pairs to use to override
data type mappings of specific fields. Specify unknown value to use default
mappings.verifySchemaMode - Schema verification mode. Must evaluate to IGNORE, LOOSE, or
STRICT. Default is LOOSE.True if the operation completed successfully, else false.public logical writeXml(TargetData target)
Defaults applied:
public logical writeXml(TargetData target, logical formatted)
Defaults applied:
public logical writeXml(TargetData target, logical formatted, character encoding)
Defaults applied:
writeXml in interface XmlDatatarget - Data target.formatted - True to format the XML to make it more readable; false to write it
as unformatted text. Unknown value is treated as false.encoding - Name of the character encoding to use.True if the operation completed successfully, else false.public logical writeXml(TargetData target, logical formatted, character encoding, character schemaLocation)
Defaults applied:
writeXml in interface XmlDatatarget - Data target.formatted - True to format the XML to make it more readable; false to write it
as unformatted text. Unknown value is treated as false.encoding - Name of the character encoding to use.schemaLocation - Name of an external XML schema file, or empty string or unknown value to set the
xsi:noNamespaceSchemaLocation to empty string or unknown value.True if the operation completed successfully, else false.public logical writeXml(TargetData target, logical formatted, character encoding, character schemaLocation, logical writeXmlSchema)
Defaults applied:
writeXml in interface XmlDatatarget - Data target.formatted - True to format the XML to make it more readable; false to write it
as unformatted text. Unknown value is treated as false.encoding - Name of the character encoding to use.schemaLocation - Name of an external XML schema file, or empty string or unknown value to set the
xsi:noNamespaceSchemaLocation to empty string or unknown value.writeXmlSchema - True to write XML schema information, else false.True if the operation completed successfully, else false.public logical writeXml(TargetData target, logical formatted, character encoding, character schemaLocation, logical writeXmlSchema, logical minXmlSchema)
Defaults applied:
writeXml in interface XmlDatatarget - Data target.formatted - True to format the XML to make it more readable; false to write it
as unformatted text. Unknown value is treated as false.encoding - Name of the character encoding to use.schemaLocation - Name of an external XML schema file, or empty string or unknown value to set the
xsi:noNamespaceSchemaLocation to empty string or unknown value.writeXmlSchema - True to write XML schema information, else false.minXmlSchema - True to write minimal XML schema information, else false. Must be
false if writeXmlSchema is false.True if the operation completed successfully, else false.public logical writeXml(TargetData target, logical formatted, character encoding, character schemaLocation, logical writeXmlSchema, logical minXmlSchema, logical writeBeforeImage)
Defaults applied:
writeXml in interface XmlDatatarget - Data target.formatted - True to format the XML to make it more readable; false to write it
as unformatted text. Unknown value is treated as false.encoding - Name of the character encoding to use.schemaLocation - Name of an external XML schema file, or empty string or unknown value to set the
xsi:noNamespaceSchemaLocation to empty string or unknown value.writeXmlSchema - True to write XML schema information, else false.minXmlSchema - True to write minimal XML schema information, else false. Must be
false if writeXmlSchema is false.writeBeforeImage - True to write before-image data and error information, else false.True if the operation completed successfully, else false.public logical writeXml(TargetData target, logical formatted, character encoding, character schemaLocation, logical writeXmlSchema, logical minXmlSchema, logical beforeImage, logical noInitialVals)
writeXml in interface XmlDatatarget - Data target.formatted - True to format the XML to make it more readable; false to write it
as unformatted text. Unknown value is treated as false.encoding - Name of the character encoding to use.schemaLocation - Name of an external XML schema file, or empty string or unknown value to set the
xsi:noNamespaceSchemaLocation to empty string or unknown value.writeXmlSchema - True to write XML schema information, else false.minXmlSchema - True to write minimal XML schema information, else false. Must be
false if writeXmlSchema is false.beforeImage - True to write before-image data and error information, else false.noInitialVals - True to omit data for fields whose values match their initial values.True if the operation completed successfully, else false.public logical writeXmlSchema(TargetData target)
TempTable.writeXmlSchema in interface XmlDatatarget - Data target.true if operation is successful.public logical writeXmlSchema(TargetData target, logical formatted)
TempTable.writeXmlSchema in interface XmlDatatarget - Data target.formatted - Use true for a more human-readable document.true if operation is successful.public logical writeXmlSchema(TargetData target, logical formatted, Text encoding)
TempTable.writeXmlSchema in interface XmlDatatarget - Data target.formatted - Use true for a more human-readable document.encoding - The character encoding. The default is UTF-8.true if operation is successful.public logical writeXmlSchema(TargetData target, logical formatted, Text encoding, logical minXmlSchema)
TempTable.writeXmlSchema in interface XmlDatatarget - Data target.formatted - Use true for a more human-readable document.encoding - The character encoding. The default is UTF-8.minXmlSchema - If true, the minimum amount of schema for the object will be written.true if operation is successful.public logical writeXmlSchema(TargetData target, logical formatted, Text encoding, logical minXmlSchema, logical omitInitVal)
TempTable.writeXmlSchema in interface XmlDatatarget - Data target.formatted - Use true for a more human-readable document.encoding - The character encoding. The default is UTF-8.minXmlSchema - If true, the minimum amount of schema for the object will be written.omitInitVal - Use true to omit the initial values.true if operation is successful.public logical readXmlSchema(SourceData source, logical override)
TempTable or TempTable or verify existing schema in a TempTable,
TempTable or temp-table Buffer object.readXmlSchema in interface XmlDatasource - Data source.override - If true the default mapping between XML Schema string and binary data types
and ABL data types when creating an ABL temp-table schema from an XML Schema will
be overwritten.true if operation is successful.public logical readXmlSchema(SourceData source, logical override, Text mapping)
TempTable or TempTable or verify existing schema in a TempTable,
TempTable or temp-table Buffer object.readXmlSchema in interface XmlDatasource - Data source.override - If true the default mapping between XML Schema string and binary data types
and ABL data types when creating an ABL temp-table schema from an XML Schema will
be overwritten.mapping - A comma-delimited list of field name, data type pairs. This allows to specify the
data type for a specific field.true if operation is successful.public logical readXmlSchema(SourceData source, logical override, Text strMapping, Text verifyMode)
TempTable or TempTable or verify existing schema in a TempTable,
TempTable or temp-table Buffer object.readXmlSchema in interface XmlDatasource - Data source.override - If true the default mapping between XML Schema string and binary data types
and ABL data types when creating an ABL temp-table schema from an XML Schema will
be overwritten.strMapping - A comma-delimited list of field name, data type pairs. This allows to specify the
data type for a specific field.verifyMode - Specifies how the XML will be verified against the schema. Valid values: "LOOSE" or
"STRICT".true if operation is successful.public logical readJson(SourceData source)
Defaults applied:
MERGE read modepublic logical readJson(SourceData source, character readMode)
public logical writeJson(TargetData target)
Defaults applied:
target represents a JsonArray object.
public logical writeJson(TargetData target, logical formatted)
Defaults applied:
target represents a JsonArray object.
public logical writeJson(TargetData target, logical formatted, character encoding)
Defaults applied:
target represents a JsonArray object.
writeJson in interface JsonDatatarget - Data target.formatted - True to format the JSON to make it more readable; false to write it
as unformatted text. Unknown value is treated as false.encoding - Name of the character encoding to use.True if the operation completed successfully, else false.public logical writeJson(TargetData target, logical formatted, character encoding, logical omitInitialValues)
Defaults applied:
target represents a JsonArray object.
writeJson in interface JsonDatatarget - Data target.formatted - True to format the JSON to make it more readable; false to write it
as unformatted text. Unknown value is treated as false.encoding - Name of the character encoding to use.omitInitialValues - True to omit data for fields whose values match their initial values.True if the operation completed successfully, else false.public logical writeJson(TargetData target, logical formatted, character encoding, logical omitInitialValues, logical omitOuterObject)
Defaults applied:
writeJson in interface JsonDatatarget - Data target.formatted - True to format the JSON to make it more readable; false to write it
as unformatted text. Unknown value is treated as false.encoding - Name of the character encoding to use.omitInitialValues - True to omit data for fields whose values match their initial values.omitOuterObject - True to omit data for the outermost object from the output.True if the operation completed successfully, else false.public logical writeJson(TargetData target, logical formatted, character encoding, logical omitInitialValues, logical omitOuterObject, logical writeBeforeImage)
writeJson in interface JsonDatatarget - Data target.formatted - True to format the JSON to make it more readable; false to write it
as unformatted text. Unknown value is treated as false.encoding - Name of the character encoding to use.omitInitialValues - True to omit data for fields whose values match their initial values.omitOuterObject - True to omit data for the outermost object from the output.writeBeforeImage - True to write before-image data and error information, else false.True if the operation completed successfully, else false.public character getXmlNodeName()
TEMP-TABLE)
name in an XML document. If not set the name is returned.getXmlNodeName in interface XmlNodepublic void setXmlNodeName(java.lang.String name)
DataSet,
a TempTable, a TemporaryBuffer, or a temp-table BufferField) name in an XML
document.setXmlNodeName in interface XmlNodename - The new name of the XML element for this object.public void setXmlNodeName(Text name)
DataSet,
a TempTable, a TemporaryBuffer, or a temp-table BufferField) name in an XML
document.setXmlNodeName in interface XmlNodename - The new name of the XML element for this object.public character getXmlDataType()
getXmlDataType in interface XmlNodepublic void setXmlDataType(java.lang.String newType)
setXmlDataType in interface XmlNodenewType - the new XML Schema data type for the buffer-field object.public void setXmlDataType(Text newType)
setXmlDataType in interface XmlNodenewType - the new XML Schema data type for the buffer-field object.public character getXmlNodeType()
XML-NODE-TYPE ABL
attribute.getXmlNodeType in interface XmlNodepublic void setXmlNodeType(java.lang.String newType)
XML-NODE-TYPE ABL
attribute.setXmlNodeType in interface XmlNodenewType - The new type.public void setXmlNodeType(Text newType)
XML-NODE-TYPE ABL
attribute.setXmlNodeType in interface XmlNodenewType - The new type.public integer numReferences()
NUM-REFERENCES attribute: obtains number of references to this TempTable
object that is defined as a parameter to which reference-only objects are bound.
numReferences in interface RefCounterpublic character namespaceURI()
namespaceURI in interface NamespaceURIpublic void namespaceURI(java.lang.String uri)
namespaceURI in interface NamespaceURIuri - The new value of the NAMESPACE-URI attribute.public void namespaceURI(character uri)
namespaceURI in interface NamespaceURIuri - The new value of the NAMESPACE-URI attribute.public character namespacePrefix()
namespacePrefix in interface NamespaceURIpublic void namespacePrefix(java.lang.String prefix)
namespacePrefix in interface NamespaceURIprefix - The new value of the NAMESPACE-PREFIX attribute.public void namespacePrefix(character prefix)
namespacePrefix in interface NamespaceURIprefix - The new value of the NAMESPACE-PREFIX attribute.public logical isDataSourceModified()
isDataSourceModified in interface DataSourceModifiabletrue when the data has been modified.public void setDataSourceModified(logical mod)
setDataSourceModified in interface DataSourceModifiablemod - true when the data is marked as modified and false otherwise.public void setDataSourceModified(boolean mod)
setDataSourceModified in interface DataSourceModifiablemod - true when the data is marked as modified and false otherwise.public character getSerializeName()
SERIALIZE-NAME attribute.getSerializeName in interface NamedSerializableSERIALIZE-NAME attribute.public void setSerializeName(Text sName)
SERIALIZE-NAME attribute.setSerializeName in interface NamedSerializablesName - the new value for the SERIALIZE-NAME attribute.public void setSerializeName(java.lang.String sName)
SERIALIZE-NAME attribute.setSerializeName in interface NamedSerializablesName - the new value for the SERIALIZE-NAME attribute.public java.lang.String tableDefinition()
public boolean validateAllBuffers()
true on success.ErrorConditionException - If any of the buffer fails validation.public java.util.Collection<P2JField> getFields()
void registerBuffer(Buffer buf)
buf - The buffer to be registered. Must not be null.void deregisterBuffer(Buffer buf)
buf - The buffer to be deregistered. Must not be null.TemporaryBuffer defaultBuffer()
boolean _isTrackingChanges()
DataSet.TRACKING-CHANGES as described above.protected abstract boolean addFunctionWasCalled()
true if an ADD-* function was called for the table.public abstract boolean readTable(java.lang.String tableName,
TableReader reader)
throws PersistenceException
tableName - table namereader - XML/JSON source reader and table creator.true on success.PersistenceException - if there is any error reading or storing XML/JSON data.protected void deleteAllBuffers()
protected boolean _hasRecords()
hasRecords. Checks whether this temp-table contains any records.protected void displayCreateLikeNotFirst()
protected void displayPrepared()
protected void displayPreparedIgnoring()
protected void displayUnableAssignUnknownUndo()
protected void displayCannotClear()
protected void displayNotPrepared()
protected void displayUninitialized()
protected void displayUnableCreateLike()
protected void displayUnableAddFieldsFrom()
protected void displayCouldNotFindLikeTableFromHandle()
protected void displayCopyTempTableInvalidFirstArg()
protected void displayCopyTempTableHalfDefined()
protected RecordBuffer getRecordBufferByHandle(handle hbuf, AbstractTempTable.CallingFunction callingFunction)
hbuf - Buffer or temp-table handle.callingFunction - Calling function. Affects error messaging.null if the case of error.public abstract boolean _prepared()
true if this temp-table is in prepared state (after a successful call to
TempTable.tempTablePrepare(java.lang.String)).
This method implements the read-only PREPARED getter attribute from 4GL.true if table is in PREPARED state.public abstract boolean _clear()
This method is FWD-internal. The programmer can check whether the temp-table is in an UNPREPARED or PREPARED state by checking the PREPARED attribute, but the CLEAR state is transparent.
true if this table is in CLEAR state.void setOriginTable(TempTable origin)
GET-CHANGES method).origin - The origin table.boolean flushBuffers()
false
is returned.
All buffers from both this table and its peer table will be flushed (in other words, the after table and the before table, if it exists, will flush all buffers).
true on success.private TempTable.BeforeType computeTableType()
AFTER_TABLE or a BEFORE_TABLE
the peer (complementary) buffer is also stored in peerTable.beforeTableType).void deleteAllImpl()
TempTable.ErrorConditionException - If an error occurs performing the bulk delete operation.TableMapper.MutableFieldInfo getMutableInfo(java.lang.String fieldLegacyName, boolean setter, java.util.function.BiFunction<TempTable,java.lang.String,TableMapper.MutableFieldInfo> field)
null if the info has not yet been added to fieldInfo.fieldLegacyName - The legacy field name, already lowercased.setter - Flag indicating if this call is for a setter or a getter call.field - The function to calculate the mutable field info.fieldInfo or calculated, or null in case of
a getter call and this info has not yet been calculated.