public class Dependency extends Collection<DependencyMember>
ClassProps are stored at the collection level and duplicated in each slot. Slots may still have their own individual properties annotating their link. Predefined steps managing Dependencies:
| Modifier and Type | Field and Description |
|---|---|
protected String |
mClassProps |
protected CastorHashMap |
mProperties |
EMPTY, mMembers, mName, mVersion| Constructor and Description |
|---|
Dependency() |
Dependency(String name) |
| Modifier and Type | Method and Description |
|---|---|
DependencyMember |
addMember(ItemPath itemPath) |
DependencyMember |
addMember(ItemPath itemPath,
CastorHashMap props,
String classProps)
Add a member to this collection, with the given property and class properties
and optionally an Item to assign, which may be null if the collection allows
empty slots.
|
List<ItemPath> |
compare(Dependency other)
Returns all ItemPaths that are members of the other collection but not members of this one.
|
String |
getClassProps() |
KeyValuePair[] |
getKeyValuePairs() |
CastorHashMap |
getProperties() |
void |
removeMember(int memberId)
Removes the slot with the given ID from the collection.
|
void |
setClassProps(String classProps) |
void |
setKeyValuePairs(KeyValuePair[] pairs) |
void |
setProperties(CastorHashMap props) |
contains, equals, getClusterType, getCounter, getDescVer, getMember, getMembers, getName, getVersion, getVersionName, hashCode, isFull, setMembers, setName, setVersion, sizeprotected CastorHashMap mProperties
protected String mClassProps
public Dependency()
public Dependency(String name)
public CastorHashMap getProperties()
public void setProperties(CastorHashMap props)
public KeyValuePair[] getKeyValuePairs()
public void setKeyValuePairs(KeyValuePair[] pairs)
public void setClassProps(String classProps)
public String getClassProps()
public DependencyMember addMember(ItemPath itemPath) throws InvalidCollectionModification, ObjectAlreadyExistsException
public List<ItemPath> compare(Dependency other)
other - - The collection to comparepublic DependencyMember addMember(ItemPath itemPath, CastorHashMap props, String classProps) throws InvalidCollectionModification, ObjectAlreadyExistsException
CollectionaddMember in class Collection<DependencyMember>itemPath - the Item to assign to the new slot. Optional for collections
that allow empty slotsprops - the Properties of the new memberclassProps - the names of the properties that dictate the type of
assigned Items.InvalidCollectionModification - when the assignment was invalid because
of collection constraints, such as global type constraints, or not allowing
empty slots.ObjectAlreadyExistsException - some collections don't allow multiple
slots assigned to the same Item, and throw this Exception if it is attemptedpublic void removeMember(int memberId)
throws ObjectNotFoundException
CollectionremoveMember in class Collection<DependencyMember>memberId - to removeObjectNotFoundException - when there was no slot with this ID found.Copyright © 1997–2016 CRISTAL-iSE. All rights reserved.