public abstract class CompiledRecord extends CompiledNamespace implements RecordHolder
Constructor and Description |
---|
CompiledRecord(RecordHolder recordHolder,
CompiledContext mainContext) |
CompiledRecord(RecordHolder recordHolder,
Namespace nestedRecordNamespace,
CompiledContext mainContext) |
Modifier and Type | Method and Description |
---|---|
Map<String,Object> |
asMap()
Returns a map view of this record.
|
RecordHolder |
createChangeProxy(RecordHolder proxySet,
boolean isLazySpreading)
Creates change proxy on this record holder.
|
void |
createPropertyProxy(HolderFactory holderFactory,
String property,
RecordHolder proxySet)
Creates change proxy for all object referenced by the propery and sets the proxy values to the property.
|
boolean |
equals(Object obj) |
Object |
executeMethod(Namespace parentNamespace,
FunctionSignature signature,
Object... arguments)
Executes method with parameters.
|
long |
getBaseLevelEntityId()
Returns id of the corresponding record in the base level.
|
RecordHolder |
getBaseLevelHolder()
Returns base level record holder.
|
RecordHolder |
getCompiled(Object compiledContext)
Returns instance of the compiled record for this record holder.
|
CompiledContext |
getCompiledContext()
Returns main compiled context.
|
static CompiledContext |
getCompiledContext(String moduleName,
Namespace namespace) |
ExecutionContext |
getExecutionContext() |
static ExecutionContext |
getExecutionContext(Namespace namespace) |
String |
getId()
Returns the id of the holder if present.
|
String |
getIdentificationString()
Returns identification string (string form of primary key)
|
Object |
getJavaIdentification()
Returns identification in plain java form.
|
Object |
getJavaObject()
Returns underlying java object if there is some.
|
static Namespace |
getModuleNamespace(String moduleName,
Namespace namespace) |
Namespace |
getNamespace(Namespace parentNamespace)
Returns namespace of this record.
|
Namespace |
getNamespace(RecordType asType) |
ValueHolder |
getNotCompiledValueHolder() |
RecordHolder |
getOriginalRecord()
Returns proxied record that is not proxy.
|
Object |
getProperty(String name)
Returns the property given the property name, if no such property exists, exception is
thrown.
|
RecordHolder |
getProxiedRecord()
Returns proxied record of this record.
|
int |
getProxyLevel()
For original record it returns 0.
|
RecordHolder |
getProxySet()
Returns proxySet of this record.
|
RecordHolder |
getRecordHolder()
Returns corresponding record holder.
|
RecordHolder |
getRecordOnProxyLevel(int proxyLevel)
Returns record with the defined proxy level or with the smaller level if such does not exist.
|
static RecordType |
getStaticType() |
RecordType |
getType()
Returns the type of the holder.
|
Long |
getVersion()
Returns version in string format.
|
int |
hashCode() |
boolean |
hasOptimisticLockRelevantChanges()
Returns true if record has changes of properties that affect optimistic lock version.
|
boolean |
isProxy()
Returns true if record is proxy.
|
boolean |
isRemoved()
Returns true if the record is removed from the model instance.
|
boolean |
isUpdateNecessary(String property)
Returns true if association should be updated.
|
RecordHolder |
mergeChanges(Namespace namespace,
boolean checkConflicts)
If this is wrapper it merges all its changes to the wrapped record.
|
void |
remove(boolean isCascaded)
Removes record.
|
void |
resetAsType() |
void |
setCompiled(RecordHolder compiled)
Set instance of compiled record.
|
void |
setProperty(String name,
Object value)
Sets the property given the property name.
|
void |
setThisSideOfAssociation(RecordProperty property,
Object object)
Sets value only this side of the association.
|
String |
toString() |
addVariable, addVariable, checkRollback, checkRollback, checkTypeAndCast, concat, createChildNamespace, createList, createList, createMap, createMap, createOperationHolder, createOperationHolder, createOperationHolder, createOperationHolder, createRecord, createRecord, createRecordByConstructor, createRecordByConstructor, createReference, createSet, createSet, get, get, getCompiledNamespace, getComponent, getComponent, getComponentService, getComponentServiceStat, getConstantValue, getConstantValue, getEvaluationLevel, getEvaluationLevel, getModuleVariableValue, getNamespace, getPropertySafe, getReferencedOperation, getReferencedOperation, getStaticVariableValue, getStaticVariableValue, getType, getType, getType, getVariableValue, getVariableValue, getVariableValue, in, isInstanceOf, like, nullsOrEquals, requireNonNull, resolveVariableNamespace, resolveVariableNamespace, selectNamespace, setModuleVariableValue, setNamespace, setVariableValue, setVariableValue, special, toboolean, toboolean, toBoolean, toBoolean, toCompiled, toCompiled, toCompiled, toCompiledObject, toCompiledObject
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getEvaluationLevel
public CompiledRecord(RecordHolder recordHolder, Namespace nestedRecordNamespace, CompiledContext mainContext)
recordHolder
- nestedRecordNamespace
- mainContext
- public CompiledRecord(RecordHolder recordHolder, CompiledContext mainContext)
recordHolder
- mainContext
- public static RecordType getStaticType()
public Namespace getNamespace(RecordType asType)
public void resetAsType()
public static Namespace getModuleNamespace(String moduleName, Namespace namespace)
public static CompiledContext getCompiledContext(String moduleName, Namespace namespace)
public RecordHolder getRecordHolder()
public RecordHolder getCompiled(Object compiledContext)
RecordHolder
getCompiled
in interface RecordHolder
public void setCompiled(RecordHolder compiled)
RecordHolder
setCompiled
in interface RecordHolder
public CompiledContext getCompiledContext()
getCompiledContext
in class CompiledNamespace
public Object getProperty(String name)
RecordHolder
getProperty
in interface RecordHolder
public void setProperty(String name, Object value)
RecordHolder
setProperty
in interface RecordHolder
public String getId()
ValueHolder
getId
in interface ValueHolder
public void setThisSideOfAssociation(RecordProperty property, Object object)
AssociationHandler
setThisSideOfAssociation
in interface AssociationHandler
public boolean isUpdateNecessary(String property)
AssociationHandler
isUpdateNecessary
in interface AssociationHandler
public RecordType getType()
ValueHolder
getType
in interface RecordHolder
getType
in interface ValueHolder
public String getIdentificationString()
RecordHolder
getIdentificationString
in interface RecordHolder
public Long getVersion()
RecordHolder
getVersion
in interface RecordHolder
public Object getJavaIdentification()
RecordHolder
getJavaIdentification
in interface RecordHolder
public Map<String,Object> asMap()
RecordHolder
asMap
in interface RecordHolder
public void remove(boolean isCascaded)
RecordHolder
remove
in interface RecordHolder
public long getBaseLevelEntityId()
RecordHolder
getBaseLevelEntityId
in interface RecordHolder
public RecordHolder getBaseLevelHolder()
RecordHolder
getBaseLevelHolder
in interface RecordHolder
public boolean hasOptimisticLockRelevantChanges()
RecordHolder
hasOptimisticLockRelevantChanges
in interface RecordHolder
public boolean isRemoved()
RecordHolder
isRemoved
in interface RecordHolder
public Namespace getNamespace(Namespace parentNamespace)
RecordHolder
getNamespace
in interface RecordHolder
public Object getJavaObject()
RecordHolder
getJavaObject
in interface RecordHolder
public RecordHolder createChangeProxy(RecordHolder proxySet, boolean isLazySpreading)
RecordHolder
createChangeProxy
in interface RecordHolder
public RecordHolder mergeChanges(Namespace namespace, boolean checkConflicts) throws LspsException
RecordHolder
mergeChanges
in interface RecordHolder
LspsException
public int getProxyLevel()
RecordHolder
getProxyLevel
in interface RecordHolder
public RecordHolder getOriginalRecord()
RecordHolder
getOriginalRecord
in interface RecordHolder
public RecordHolder getProxiedRecord()
RecordHolder
getProxiedRecord
in interface RecordHolder
public RecordHolder getProxySet()
RecordHolder
getProxySet
in interface RecordHolder
public RecordHolder getRecordOnProxyLevel(int proxyLevel)
RecordHolder
getRecordOnProxyLevel
in interface RecordHolder
public void createPropertyProxy(HolderFactory holderFactory, String property, RecordHolder proxySet)
RecordHolder
createPropertyProxy
in interface RecordHolder
public boolean isProxy()
RecordHolder
isProxy
in interface RecordHolder
public Object executeMethod(Namespace parentNamespace, FunctionSignature signature, Object... arguments) throws ErrorException
RecordHolder
executeMethod
in interface RecordHolder
ErrorException
public ValueHolder getNotCompiledValueHolder()
getNotCompiledValueHolder
in interface ValueHolder
public ExecutionContext getExecutionContext()
public static ExecutionContext getExecutionContext(Namespace namespace)
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.