public class RecordValue extends ComplexValue implements RecordChangeProxy, MarshalCallback
modelInstance| Modifier | Constructor and Description |
|---|---|
protected |
RecordValue()
Creates new instance of
RecordValue. |
|
RecordValue(ExternalValue value)
Creates change proxy on external value.
|
|
RecordValue(long id,
ModelInstance modelInstance,
String type,
Map<String,? extends Value> values)
Creates new instance of
RecordValue. |
|
RecordValue(long id,
ModelInstance modelInstance,
String type,
Map<String,? extends Value> values,
String level,
Long baseLevelValueId,
Long lowestLevelValueId,
Long lowerLevelValueId)
Creates new instance of
RecordValue. |
|
RecordValue(long id,
ModelInstance modelInstance,
String type,
Map<String,? extends Value> values,
String level,
Long baseLevelValueId,
Long lowestLevelValueId,
Long lowerLevelValueId,
boolean isChangeProxy,
Long proxiedRecordId)
Creates new instance of
RecordValue. |
|
RecordValue(ModelInstance modelInstance,
ExternalRecordType externalRecordType)
Creates change proxy on non-created external value.
|
|
RecordValue(ModelInstance modelInstance,
String type,
Map<String,? extends Value> values)
Creates new instance of
RecordValue. |
|
RecordValue(ModelInstance modelInstance,
String type,
Map<String,? extends Value> values,
String level,
Long baseLevelValueId,
Long lowestLevelValueId,
Long lowerLevelValueId)
Creates new instance of
RecordValue. |
|
RecordValue(RecordValue value)
Creates change proxy on record value.
|
| Modifier and Type | Method and Description |
|---|---|
<T,E extends Throwable> |
accept(ValueVisitor<T,E> visitor)
Accepts visitor.
|
void |
clear()
Clears evaluation data.
|
void |
clearProxy(Collection<String> properties)
Clear properties on proxy.
|
void |
clearTouchedProxies()
Clears touched proxies.
|
RecordValue |
createChangeProxy()
Created a change proxy on this object.
|
Collection<? extends RecordValue> |
getAllProxies()
Returns all proxies of this record.
|
RecordChangeProxy |
getOriginalRecord()
Returns a record object that is original non-proxy record.
|
Set<String> |
getProperties()
Returns the unmodifiable set of property names.
|
Value |
getProperty(String name)
Returns record property by its name or null if given property does not
exist.
|
Long |
getPropertyInitialVersion(String name)
Returns initial version of the property.
|
Long |
getPropertyVersion(String name)
Returns version of the property.
|
RecordChangeProxy |
getProxiedRecord()
Returns proxied record.
|
Long |
getProxiedRecordId()
Returns id of proxied record.
|
int |
getProxyLevel()
Gets number of proxies from this object to original non-proxy record.
|
Collection<Collectible> |
getReferences()
Returns collection of all referenced collectible objects.
|
Set<RecordValue> |
getTouchedProxies()
Returns touched proxies that are or were in association with this proxy.
|
String |
getVersionString() |
boolean |
hasProperties()
Returns
true if there is any property set. |
boolean |
hasProperty(String name)
Returns true if the value contains the property.
|
protected void |
initItemsMap()
Initializes item map.
|
String |
internalVersionConflictMessage(EvaluationLevelAware entity)
Returns message for internal versioning conflict.
|
boolean |
isInternalyVersioned()
Returns true if the entity is internally (in scope of model instance) versioned.
|
boolean |
isProxy()
Returns true if this is change proxy for a record.
|
boolean |
isProxyOf(RecordChangeProxy record)
Returns true if this is direct or non-direct proxy of the record.
|
boolean |
isRemoved()
Returns true if value is removed
|
RecordValue |
makeCopy(ModelInstance targetModelInstance)
Creates copy of the value in the target model instance.
|
void |
postMarshal(javax.xml.bind.Marshaller marshaller)
Callback method invoked after marshalling source to XML.
|
void |
postUnmarshal(javax.xml.bind.Unmarshaller unmarshaller,
Object parent)
Callback method invoked after unmarshalling XML data into target.
|
void |
preMarshal(javax.xml.bind.Marshaller marshaller)
Callback method invoked before marshalling from source to XML.
|
void |
preUnmarshal(javax.xml.bind.Unmarshaller unmarshaller,
Object parent)
Callback method invoked before unmarshalling into target.
|
void |
rebind(ModelInstance modelInstance)
Re-binds to a model instance.
|
void |
remove()
Set this value to removed.
|
void |
replaceReferencedIds(Map<Long,Long> replacementMap)
Replace referenced ids according to mappings in the replacement map.
|
void |
setProperty(String name,
Value value)
Sets record property.
|
void |
setProxiedRecord(ExternalValue val)
Sets proxied record.
|
void |
setVersionString(String versionString) |
String |
toString() |
Map<String,Value> |
values()
Returns the contained values.
|
collect, commonAfterUnmarshal, createContext, findReplacementId, getBaseLevelEntity, getBaseLevelEntityId, getCompiledType, getEvaluationLevel, getHandle, getId, getLowerLevelEntity, getLowerLevelEntityId, getLowestLevelEntity, getLowestLevelEntityId, getModelInstance, getOwnContext, getType, isLocked, isLowestExistingEntity, isPersistent, replaceIdAndEvaluationLevel, setLowerLevelEntityId, setPersistent, toSimpleValue, toValue, updateLevelDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCompiledType, getType, toSimpleValue, toValueprotected RecordValue()
RecordValue.public RecordValue(long id,
ModelInstance modelInstance,
String type,
Map<String,? extends Value> values,
String level,
Long baseLevelValueId,
Long lowestLevelValueId,
Long lowerLevelValueId)
RecordValue.id - modelInstance - type - values - a map of values, may be nulllevel - baseLevelValueId - lowestLevelValueId - lowerLevelValueId - NullPointerException - if modelInstance or type or any of its
elements is nullpublic RecordValue(long id,
ModelInstance modelInstance,
String type,
Map<String,? extends Value> values,
String level,
Long baseLevelValueId,
Long lowestLevelValueId,
Long lowerLevelValueId,
boolean isChangeProxy,
Long proxiedRecordId)
RecordValue.id - modelInstance - type - values - a map of values, may be nulllevel - baseLevelValueId - lowestLevelValueId - lowerLevelValueId - isChangeProxy - proxiedRecordId - NullPointerException - if modelInstance or type or any of its
elements is nullpublic RecordValue(long id,
ModelInstance modelInstance,
String type,
Map<String,? extends Value> values)
RecordValue.id - modelInstance - type - values - a map of values, may be nullNullPointerException - if modelInstance or type or any of its
elements is nullpublic RecordValue(ModelInstance modelInstance, String type, Map<String,? extends Value> values, String level, Long baseLevelValueId, Long lowestLevelValueId, Long lowerLevelValueId)
RecordValue.modelInstance - type - values - a map of values, may be nulllevel - baseLevelValueId - lowestLevelValueId - lowerLevelValueId - NullPointerException - if modelInstance or type or any of its
elements is nullpublic RecordValue(ModelInstance modelInstance, String type, Map<String,? extends Value> values)
RecordValue.modelInstance - type - values - a map of values, may be nullNullPointerException - if modelInstance or type or any of its
elements is nullpublic RecordValue(RecordValue value)
value - public RecordValue(ExternalValue value)
value - public RecordValue(ModelInstance modelInstance, ExternalRecordType externalRecordType)
modelInstance - externalRecordType - public boolean hasProperty(String name)
name - public void setProperty(String name, Value value)
name - property namevalue - new property valueNullPointerException - if name or value is nuvoid checkConflictsOnInternalVersions(EvaluationLevelAware entity);llpublic void clearTouchedProxies()
public Value getProperty(String name)
name - NullPointerException - if name is nullpublic Long getPropertyInitialVersion(String name)
name - public Long getPropertyVersion(String name)
name - public Set<String> getProperties()
public boolean hasProperties()
true if there is any property set.
It is equivalent to !getProperties().isEmpty().
true if there is any property setpublic Map<String,Value> values()
public <T,E extends Throwable> T accept(ValueVisitor<T,E> visitor) throws E extends Throwable
Valuepublic void preMarshal(javax.xml.bind.Marshaller marshaller)
MarshalCallbackpreMarshal in interface MarshalCallbackpublic void postMarshal(javax.xml.bind.Marshaller marshaller)
MarshalCallbackpostMarshal in interface MarshalCallbackpublic void preUnmarshal(javax.xml.bind.Unmarshaller unmarshaller, Object parent)
UnmarshalCallbackpreUnmarshal in interface UnmarshalCallbackparent - instance of JAXB mapped class that will eventually reference target.
null when target is root element.public void postUnmarshal(javax.xml.bind.Unmarshaller unmarshaller, Object parent)
UnmarshalCallbackpostUnmarshal in interface UnmarshalCallbackparent - instance of JAXB mapped class that will reference target.
null when target is root element.protected void initItemsMap()
public Collection<Collectible> getReferences()
CollectiblegetReferences in interface Collectiblepublic void replaceReferencedIds(Map<Long,Long> replacementMap)
ComplexValuereplaceReferencedIds in interface EvaluationLevelAwarereplaceReferencedIds in class ComplexValuepublic void rebind(ModelInstance modelInstance)
rebind in interface ModelInstanceAwarerebind in class ComplexValuemodelInstance - public void clear()
EvaluationLevelAwareclear in interface EvaluationLevelAwareclear in class ComplexValuepublic void clearProxy(Collection<String> properties)
properties - public boolean isInternalyVersioned()
EvaluationLevelAwareisInternalyVersioned in interface EvaluationLevelAwareisInternalyVersioned in class ComplexValuepublic String internalVersionConflictMessage(EvaluationLevelAware entity)
EvaluationLevelAwareinternalVersionConflictMessage in interface EvaluationLevelAwareinternalVersionConflictMessage in class ComplexValuepublic boolean isRemoved()
ValueisRemoved in interface ValueisRemoved in class ComplexValuepublic void remove()
public RecordValue makeCopy(ModelInstance targetModelInstance)
Valuepublic RecordValue createChangeProxy()
RecordChangeProxycreateChangeProxy in interface RecordChangeProxypublic boolean isProxy()
public boolean isProxyOf(RecordChangeProxy record)
RecordChangeProxyisProxyOf in interface RecordChangeProxypublic Collection<? extends RecordValue> getAllProxies()
public Long getProxiedRecordId()
isProxy() returns true and proxied record id is null it means that this is proxy for external/shared record that is not created so far.public RecordChangeProxy getProxiedRecord()
public int getProxyLevel()
RecordChangeProxygetProxyLevel in interface RecordChangeProxypublic RecordChangeProxy getOriginalRecord()
RecordChangeProxygetOriginalRecord in interface RecordChangeProxypublic void setProxiedRecord(ExternalValue val)
val - public Set<RecordValue> getTouchedProxies()
public String getVersionString()
public void setVersionString(String versionString)
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.