|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deduced.AbstractPropertyCollection<K,V> org.deduced.PropertyMap<java.lang.Object,V> org.deduced.IdPropertyMap<V> org.deduced.PropertyList<PropertyCollection<?,?>> org.deduced.dynamic.DynamicPropertyList
public class DynamicPropertyList
Class used to host a list of DynamicPropertyMap. The difference between this list and another implementation is that this list will actually propagate the changes to it's structure to it's parent in the hierarchy. This will allow the parents to override the required properties on the child objects.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.deduced.PropertyMap |
---|
PropertyMap.PropertyIterator, PropertyMap.ValueIterator |
Nested classes/interfaces inherited from class org.deduced.AbstractPropertyCollection |
---|
AbstractPropertyCollection.CollectionToDeleteMonitor |
Field Summary | |
---|---|
private static long |
serialVersionUID
serial ID |
private PropertyCollection<?,?> |
type
type of the list |
Fields inherited from class org.deduced.PropertyList |
---|
PROPERTY_LIST_TYPE |
Fields inherited from class org.deduced.PropertyMap |
---|
PROPERTY_MAP_TYPE |
Fields inherited from class org.deduced.AbstractPropertyCollection |
---|
CHECK_DELETE_MODE_AUTOMATIC, CHECK_DELETE_MODE_MANUAL, COLLECTION_TO_DELETE |
Fields inherited from interface org.deduced.PropertyCollection |
---|
PROPERTY_COLLECTION_TYPE |
Constructor Summary | |
---|---|
DynamicPropertyList()
constructor for the property list |
|
DynamicPropertyList(PropertyCollection<?,?> setFixedInstance,
PropertyCollection<?,?> setType)
constructor for the property list |
Method Summary | |
---|---|
void |
activate()
(non-Javadoc) |
protected void |
activateOwnedChildCollections()
activate all Owned Child Collections |
java.lang.Object |
addProperty(java.lang.Object key,
PropertyCollection<?,?> instance,
PropertyCollection<?,?> value)
(non-JSDoc) |
protected boolean |
clearValueParentIfNecessaryReturnIsReference(PropertyCollection<?,?> value)
clear the Parent field of the value if the parent is the local object |
protected java.lang.Object |
internalAddProperty(java.lang.Object propertyKey,
Property<PropertyCollection<?,?>> resultAdd)
(non-Javadoc) |
Property<PropertyCollection<?,?>> |
removeProperty(java.lang.Object propertyKey)
(non-Javadoc) |
PropertyCollection<?,?> |
setProperty(java.lang.Object propertyKey,
PropertyCollection<?,?> value)
(non-JSDoc) |
PropertyCollection<?,?> |
type()
(non-JSDoc) |
Methods inherited from class org.deduced.IdPropertyMap |
---|
areKeysAssignedAutomatically, createThrowMustNotSpecifyKeyError, equals, generateKey, hashCode, instanceKey, removePropertyInstance |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
private final PropertyCollection<?,?> type
Constructor Detail |
---|
public DynamicPropertyList()
public DynamicPropertyList(PropertyCollection<?,?> setFixedInstance, PropertyCollection<?,?> setType)
setFixedInstance
- the fixed instances in the listsetType
- type of the dynamic listMethod Detail |
---|
public void activate()
activate
in interface PropertyCollection<java.lang.Object,PropertyCollection<?,?>>
activate
in class AbstractPropertyCollection<java.lang.Object,PropertyCollection<?,?>>
AbstractPropertyCollection.activate()
protected void activateOwnedChildCollections()
public java.lang.Object addProperty(java.lang.Object key, PropertyCollection<?,?> instance, PropertyCollection<?,?> value)
addProperty
in interface PropertyCollection<java.lang.Object,PropertyCollection<?,?>>
addProperty
in class IdPropertyMap<PropertyCollection<?,?>>
key
- the key of the property. Some collections assign keys
automatically, for those collections, a null value is
expected. If the key is specified when they are assigned
automatically, an IllegalArgumentException will be throwninstance
- the property instance to add. Most collections assign the
instance automatically, for those collections, the instance
can either be null or be the same as the instance that is
automatically assigned, otherwise an error will be thrownvalue
- the property value. If the value is a property collection,
then the collection is expected to have a null parent if the
instance is owned (not by reference), otherwise an
IllegalArgumentException will be thrown
IdPropertyMap.addProperty(java.lang.Object,
org.deduced.PropertyCollection, java.lang.Object)
public PropertyCollection<?,?> setProperty(java.lang.Object propertyKey, PropertyCollection<?,?> value)
setProperty
in interface PropertyCollection<java.lang.Object,PropertyCollection<?,?>>
setProperty
in class PropertyMap<java.lang.Object,PropertyCollection<?,?>>
propertyKey
- the key of the propertyvalue
- the new value of the property. If the property is a
collection that is not by reference, this method requires that
the passed collection has a parent set to null since it will
reset the parent.
PropertyMap.setProperty(java.lang.Object,
java.lang.Object)
public PropertyCollection<?,?> type()
type
in interface PropertyCollection<java.lang.Object,PropertyCollection<?,?>>
type
in class PropertyList<PropertyCollection<?,?>>
PropertyList.type()
protected java.lang.Object internalAddProperty(java.lang.Object propertyKey, Property<PropertyCollection<?,?>> resultAdd)
internalAddProperty
in class PropertyMap<java.lang.Object,PropertyCollection<?,?>>
propertyKey
- the key of the added propertyresultAdd
- the property to add to the map
PropertyMap.internalAddProperty(java.lang.Object,
org.deduced.Property)
public Property<PropertyCollection<?,?>> removeProperty(java.lang.Object propertyKey)
removeProperty
in interface PropertyCollection<java.lang.Object,PropertyCollection<?,?>>
removeProperty
in class PropertyMap<java.lang.Object,PropertyCollection<?,?>>
propertyKey
- the key of the property
PropertyMap.removeProperty(java.lang.Object)
protected boolean clearValueParentIfNecessaryReturnIsReference(PropertyCollection<?,?> value)
value
- the value on which to clear the parent
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |