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 java.lang.Class<?> |
definingType
The defining type where this dataset is constructed.
|
private static java.lang.reflect.Method[] |
doNotProxy
Array of methods not to be proxied
|
private DataSet |
dsDef
The original definition of the
DataSet. |
private static CentralLogger |
LOG
Logger.
|
AFTER_FILL_EVENT, BEFORE_FILL_EVENT, referenceOnlynextSibling, prevSibling, wainstProc, pm| 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 targetDS,
boolean input,
boolean output,
boolean permanent,
boolean thisIsParam)
Binds a real
DataSet to the static targetDS. |
static StaticDataSet |
create(DataSet target)
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.
|
(package private) java.lang.Class<?> |
getDefiningType()
Get the dataset defining type.
|
java.lang.String |
getDefinitionName()
Get the dataset definition name.
|
protected boolean |
isBound()
Checks if this
REFERENCE-ONLY DataSet was bound to a real DataSet. |
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 |
setDefiningType(java.lang.Class<?> type)
Set the defining type where this dataset is constructed.
|
(package private) void |
unbind(DataSet dataset)
Unbind a dataset from this object.
|
boolean |
valid()
Reports if this object is valid for use.
|
_areRelationsActive, _getNumTopBuffers, _name, acceptChanges, addBuffer, addBuffer, addBuffer, addBuffer, addOutputParam, addParentIdRelation, addParentIdRelation, addParentIdRelation, addParentIdRelation, addReference, addRelation, addRelation, addRelation, addRelation, addRelation, addRelation, addRelationImpl, allowDelete, allowsActiveChild, applyCallback, areRelationsActive, associate, associate, associate, 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, createDynamicDataSet, createDynamicDataSet, createLike, createLike, createLike, createLike, createLike, createLike, createLike, derefPoly, emptyDataset, error, error, error, fill, fillMode, fillMode, fillMode, getADMData, getBufferByIndex, getBufferByName, getBufferBySerializeName, getBuffers, getCallbackProcContext, getCallbackProcName, getChanges, getChanges, getChanges, getIndexOf, getNextSibling, getNsUri, getNumRelations, getNumTopBuffers, getPrevSibling, getProxyDataSet, getRelation, getRelation, getRelation, getRelation, getRelation, getRelation, getRelationNative, getRelationNative, getRelations, getRelations, getSerializeHidden, getSerializeName, getTopBuffer, getTopBuffer, getTopBuffer, getTopBufferNative, getTopNavQuery, getTopNavQuery, getTopNavQuery, getTopNavQuery, getTopNavQuery, getUniqueID, getXmlDataType, getXmlNodeName, getXmlNodeNameInternal, getXmlNodeType, hasNameConstraints, invokeCallback, isCompatibleWith, isDataSourceModified, isPostponedDelete, isReuseFillQuery, mergeChanges, mergeChanges, mergeChanges, name, name, name, namespacePrefix, namespacePrefix, namespacePrefix, namespaceURI, namespaceURI, namespaceURI, numBuffers, numReferences, performOutputCopy, readJson, readJson, readXml, readXml, readXml, readXmlSchema, readXmlSchema, readXmlSchema, rejectChanges, rejected, rejected, rejected, removeReference, resetNames, resourceDelete, setADMData, setADMData, setBuffers, setBuffers, setBuffers, setBuffersImpl, setCallback, setCallbackProcedure, setDataSourceModified, setDataSourceModified, setPostponedDelete, setProxyDataSet, 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, writeXmlSchemadelete, firstResource, firstResource, getHead, getNextSibling, getPrevSibling, getPrivateData, getTail, hasName, hasNameReadOnly, hasNextSibling, hasParent, hasPrevSibling, hasPrivateData, interlink, isChained, lastResource, lastResource, moveInChain, readOnlyError, readOnlyError, resolveChainType, setHead, setNextSibling, setNextSibling, setPrevSibling, setPrevSibling, setPrivateData, setPrivateData, setPrivateData, validateName_instantiatingProcedure, addToPool, doDelete, equals, hashCode, id, id, implicitDeletion, incrementTrigger, instantiatingProcedure, invalidAttribute, registerResource, resourceType, setInstantiatingProcedure, type, unableToAssignUnknown, unknownclone, finalize, getClass, notify, notifyAll, wait, wait, waitapplyCallback, getCallbackProcContext, getCallbackProcName, setCallback, setCallback, setCallback, setCallback, setCallback, setCallback, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedure, setCallbackProcedureisDataSourceModifieddereference, dereference, dereference, dereferencedynamicresourceTypeid, id, unknownprivate static final CentralLogger LOG
private static final java.lang.Class<?>[] DATASET_INTERFACES
DataSet resource.private static final java.lang.reflect.Method[] doNotProxy
private DataSet bound
DataSet, if any. When null all member attribute and methods
are invalid.private DataSet dsDef
DataSet.private java.lang.Class<?> definingType
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)
target - The original DataSet. Used to check compatibility with future binding DataSets.public java.lang.String getDefinitionName()
dsDef.public boolean _dynamic()
_dynamic in interface DynamicResource_dynamic in class DataSetpublic 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 Dereferenceabledereference in class DataSetmemberName - 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 Dereferenceabledereference in class DataSettype - 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 Dereferenceabledereference in class DataSetmemberName - 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 WrappedResourcevalid in class DataSettrue 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 HandleResourcefalse.protected boolean isBound()
REFERENCE-ONLY DataSet was bound to a real DataSet.java.lang.Class<?> getDefiningType()
definingType.void setDefiningType(java.lang.Class<?> type)
type - The defining type.boolean bind(DataSet targetDS, boolean input, boolean output, boolean permanent, boolean thisIsParam)
DataSet to the static targetDS. 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.targetDS - The new real DataSet to bind to.input - If true, records are copied from source tables to destination tables
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.