public abstract class CollectionValue extends ComplexValue
modelInstance
Modifier | Constructor and Description |
---|---|
protected |
CollectionValue()
Creates an empty instance.
|
protected |
CollectionValue(long id,
ModelInstance modelInstance,
String type,
Collection<? extends Value> values)
Creates new instance of
CollectionValue . |
protected |
CollectionValue(long id,
ModelInstance modelInstance,
String type,
Collection<? extends Value> values,
String level,
Long baseLevelValueId,
Long lowestLevelValueId,
Long lowerLevelValueId)
Creates new instance of
CollectionValue . |
Modifier and Type | Method and Description |
---|---|
protected List<Value> |
copyValues(ModelInstance targetModelInstance)
Copies the values into the target model instance.
|
Value |
get(int i)
Returns
i -th element of the collection. |
Collection<Collectible> |
getReferences()
Returns collection of all referenced collectible objects.
|
void |
postUnmarshal(javax.xml.bind.Unmarshaller unmarshaller,
Object parent)
Callback method invoked after unmarshalling XML data into target.
|
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 |
replaceReferencedIds(Map<Long,Long> replacementMap)
Replace referenced ids according to mappings in the replacement map.
|
void |
setValues(Collection<? extends Value> values)
Sets the list values.
|
int |
size()
Returns the element count.
|
String |
toString() |
List<Value> |
values()
Returns collection of values.
|
clear, collect, commonAfterUnmarshal, createContext, findReplacementId, getBaseLevelEntity, getBaseLevelEntityId, getCompiledType, getEvaluationLevel, getHandle, getId, getLowerLevelEntity, getLowerLevelEntityId, getLowestLevelEntity, getLowestLevelEntityId, getModelInstance, getOwnContext, getType, internalVersionConflictMessage, isInternalyVersioned, isLocked, isLowestExistingEntity, isPersistent, isRemoved, replaceIdAndEvaluationLevel, setLowerLevelEntityId, setPersistent, toSimpleValue, toValue, updateLevelData
protected CollectionValue()
protected CollectionValue(long id, ModelInstance modelInstance, String type, Collection<? extends Value> values, String level, Long baseLevelValueId, Long lowestLevelValueId, Long lowerLevelValueId)
CollectionValue
.id
- modelInstance
- type
- values
- contained valueslevel
- baseLevelValueId
- lowestLevelValueId
- lowerLevelValueId
- NullPointerException
- if modelInstance
or type
or values
is
null or values
contains nullprotected CollectionValue(long id, ModelInstance modelInstance, String type, Collection<? extends Value> values)
CollectionValue
.id
- modelInstance
- type
- values
- contained valuesNullPointerException
- if modelInstance
or type
or values
is
null or values
contains nullpublic int size()
public Value get(int i)
i
-th element of the collection.i
- i
-th element of the collectionIllegalArgumentException
- if the i
is out of boundspublic void setValues(Collection<? extends Value> values)
values
- public void preUnmarshal(javax.xml.bind.Unmarshaller unmarshaller, Object parent)
UnmarshalCallback
parent
- 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)
UnmarshalCallback
parent
- instance of JAXB mapped class that will reference target.
null when target is root element.public Collection<Collectible> getReferences()
Collectible
public void rebind(ModelInstance modelInstance)
rebind
in interface ModelInstanceAware
rebind
in class ComplexValue
modelInstance
- public void replaceReferencedIds(Map<Long,Long> replacementMap)
ComplexValue
replaceReferencedIds
in interface EvaluationLevelAware
replaceReferencedIds
in class ComplexValue
protected List<Value> copyValues(ModelInstance targetModelInstance)
targetModelInstance
- Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.