public class StaticDataSet extends DataSet
DataSet
objects, both having or not the
REFERENCE-ONLY
attribute. These proxy object that will redirect all calls to members
hinted with as LegacyAttribute
or LegacyMethod
to a handle which will check
whether the DataSetProxy
is bound to some other DatSet
. In this case the
attribute/method of the bound is called. Otherwise, depending on whether this is a
REFERENCE-ONLY
object an error will be thrown, or the original DataSet
method/
attribute is called.Modifier and Type | Class and Description |
---|---|
(package private) static class |
StaticDataSet.Handler
The proxy handle object.
|
DataSet.Builder, DataSet.FieldPair
Modifier and Type | Field and Description |
---|---|
private DataSet |
bound
The bounded
DataSet , if any. |
private static java.lang.Class<?>[] |
DATASET_INTERFACES
Cache all interfaces implemented by FWD
DataSet resource. |
private DataSet |
dsDef
The original definition of the
DataSet . |
private boolean |
referenceOnly
Flags the
REFERENCE-ONLY DataSet s. |
AFTER_FILL_EVENT, BEFORE_FILL_EVENT
nextSibling, prevSibling
instProc
Constructor and Description |
---|
StaticDataSet()
The constructor should be private.
|
Modifier and Type | Method and Description |
---|---|
boolean |
_dynamic()
This resource is never dynamic.
|
handle |
asHandle()
Convert this dataset to a handle.
|
(package private) boolean |
bind(DataSet newBind,
boolean input,
boolean output,
boolean permanent)
Binds a real
DataSet to this static one. |
static StaticDataSet |
create(DataSet target,
boolean referenceOnly)
Factory method.
|
<T extends BaseDataType> |
dereference(java.lang.Class<T> type,
java.lang.String memberName)
Dereference a named member from this collection.
|
BaseDataType |
dereference(java.lang.String memberName)
Dereference a named member from this collection.
|
void |
dereference(java.lang.String memberName,
java.lang.Object value)
This overloaded method is used when the dereference is the left-side of an assignment.
|
protected boolean |
isBound()
Checks if this
REFERENCE-ONLY DataSet was bound to a real DataSet . |
protected boolean |
isReferenceOnly()
Checks if this
DataSet was built with REFERENCE-ONLY attribute. |
protected boolean |
processResource()
Check if this resource must be processed via
ProcedureManager.processResource(com.goldencode.p2j.util.WrappedResource, boolean) , once
it has been instantiated. |
DataSet |
ref()
Obtains the original
DataSet definition. |
(package private) void |
unbind(DataSet dataset)
Unbind a dataset from this object.
|
boolean |
valid()
Reports if this object is valid for use.
|
_getNumTopBuffers, acceptChanges, addBuffer, addBuffer, addBuffer, addBuffer, addParentIdRelation, addParentIdRelation, addParentIdRelation, addParentIdRelation, addReference, addRelation, addRelation, addRelation, addRelation, addRelation, addRelation, addRelationImpl, allowsActiveChild, applyCallback, areRelationsActive, associate, associate, associate, bufferHandle, bufferHandle, bufferHandle, bufferHandle, bufferHandle, clear, copyDataset, copyDataset, copyDataset, copyDataset, copyDataset, copyDataset, copyDataset, copyDatasetImpl, copyTempTable, copyTempTable, copyTempTable, copyTempTable, copyTempTable, copyTempTable, copyTempTable, copyTempTable, copyTempTable, create, create, create, createDynamicDataSet, createDynamicDataSet, createLike, createLike, createLike, createLike, createLike, createLike, createLike, emptyDataset, error, error, error, fill, fillMode, fillMode, fillMode, getADMData, getBuffers, getCallbackProcContext, getCallbackProcName, getChanges, getChanges, getChanges, getIndexOf, getNextSibling, getNumReferences, getNumRelations, getNumTopBuffers, getPrevSibling, getRelation, getRelation, getRelation, getRelation, getRelation, getRelations, getSerializeHidden, getSerializeName, getTopBuffer, getTopBuffer, getTopBuffer, getTopNavQuery, getTopNavQuery, getTopNavQuery, getTopNavQuery, getTopNavQuery, getUniqueID, getXmlDataType, getXmlNodeName, getXmlNodeNameInternal, getXmlNodeType, hasNameConstraints, invokeCallback, isCompatibleWith, isDataSourceModified, isPostponedDelete, mergeChanges, mergeChanges, mergeChanges, name, name, name, namespacePrefix, namespacePrefix, namespacePrefix, namespaceURI, namespaceURI, namespaceURI, numBuffers, performOutputCopy, readJson, readJson, readXml, readXml, readXml, readXmlSchema, readXmlSchema, readXmlSchema, rejectChanges, rejected, rejected, rejected, removeReference, resourceDelete, setADMData, setADMData, setBuffers, setBuffers, setBuffers, setCallback, setCallbackProcedure, setDataSourceModified, setDataSourceModified, setPostponedDelete, setRelationsActive, setRelationsActive, setSerializeHidden, setSerializeHidden, setSerializeName, setSerializeName, setTopNavQuery, setTopNavQuery, setTopNavQuery, setTopNavQuery, setTopNavQuery, setXmlDataType, setXmlDataType, setXmlNodeName, setXmlNodeName, setXmlNodeType, setXmlNodeType, toString, writeJson, writeJson, writeJson, writeJson, writeJson, writeJson, writeToXml, writeXml, writeXml, writeXml, writeXml, writeXml, writeXml, writeXml, writeXml, writeXmlSchema, writeXmlSchema, writeXmlSchema, writeXmlSchema, writeXmlSchema
delete, firstResource, firstResource, getHead, getNextSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNameReadOnly, hasNextSibling, hasParent, hasPrevSibling, hasPrivateData, interlink, isChained, lastResource, lastResource, moveInChain, readOnlyError, readOnlyError, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData, validateName
doDelete, getResourceType, id, id, implicitDeletion, incrementTrigger, instantiatingProcedure, invalidAttribute, registerResource, setInstantiatingProcedure, type, unableToAssignUnknown, unknown
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
applyCallback, getCallbackProcContext, getCallbackProcName, setCallback, setCallback, setCallback, setCallback, setCallback, setCallback, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure
isDataSourceModified
dereference, dereference, dereference, dereference
dynamic
getResourceType
id, id, unknown
private static final java.lang.Class<?>[] DATASET_INTERFACES
DataSet
resource.private DataSet bound
DataSet
, if any. When null
all member attribute and methods
are invalid.private DataSet dsDef
DataSet
.private boolean referenceOnly
REFERENCE-ONLY
DataSet
s.public StaticDataSet()
create()
method.
Note: the cause because it is not private is because it is needed by the proxy factory.
public static StaticDataSet create(DataSet target, boolean referenceOnly)
target
- The original DataSet
. Used to check compatibility with future binding
DataSet
s.referenceOnly
- Designates a REFERENCE-ONLY
DataSet
. These are unusable, unless
they are bound to a real DataSet
.public boolean _dynamic()
_dynamic
in interface DynamicResource
_dynamic
in class DataSet
public handle asHandle()
This is not part of an interface so it must be handled manually.
public BaseDataType dereference(java.lang.String memberName)
handle
to a named buffer, if the collection is a buffer
the returned value is the field value with the respective name. In the case that this
collection does not have a named member with the name specified memberName
the unknown value is returned.
This interface member does not have a Legacy annotation so it must be handled manually.
dereference
in interface Dereferenceable
dereference
in class DataSet
memberName
- The name of the member to be extracted.public <T extends BaseDataType> T dereference(java.lang.Class<T> type, java.lang.String memberName)
handle
to a named buffer, if the collection is a buffer
the returned value is the field value with the respective name. In the case that this
collection does not have a named member with the name specified memberName
the unknown value is returned.
This interface member does not have a Legacy annotation so it must be handled manually.
dereference
in interface Dereferenceable
dereference
in class DataSet
type
- The expected type of the returned value.memberName
- The name of the member to be extracted.public void dereference(java.lang.String memberName, java.lang.Object value)
This interface member does not have a Legacy annotation, so it must be handled manually.
dereference
in interface Dereferenceable
dereference
in class DataSet
memberName
- The name of the member to be extracted.value
- The new value that will be assigned to the extracted field.public boolean valid()
DataSet
is validvalid
in interface WrappedResource
valid
in class DataSet
true
if we are valid (can be used).public DataSet ref()
DataSet
definition. This is for internal usage, in cases when this
information is needed and the proxy interface will mask and make the information unavailable.protected boolean processResource()
ProcedureManager.processResource(com.goldencode.p2j.util.WrappedResource, boolean)
, once
it has been instantiated.processResource
in class HandleResource
false
.protected boolean isReferenceOnly()
DataSet
was built with REFERENCE-ONLY
attribute.isReferenceOnly
in class DataSet
true
if this object was built with REFERENCE-ONLY
attribute.protected boolean isBound()
REFERENCE-ONLY
DataSet
was bound to a real DataSet
.boolean bind(DataSet newBind, boolean input, boolean output, boolean permanent)
DataSet
to this static one. The compatibility of the parameter DataSet
and the original defined DataSet (static define) is checked. An error is thrown in calling
procedure if a compatibility issue is detected.newBind
- The new real DataSet
to bind to.input
- If true
, records are copied from source table to destination table
immediately upon invocation of this method, otherwise they are not.output
- When true
, the records are copied from destination table back to source
table when the current transaction or sub-transaction is committed; otherwise they
are not.permanent
- If true
the bind is permanent (due a call with BIND passing mode) and the
link is kept even after the current method ends.
Otherwise, the bind is temporary meaning the association is kept only during the
execution of this method/procedure (BY-REFERENCE).void unbind(DataSet dataset)
dataset
- The DataSet
to unbind.