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.
| Modifier and Type | Field and Description |
|---|---|
protected String |
mClassProps |
protected CastorHashMap |
mProperties |
mMembers, mName, mVersion| Constructor and Description |
|---|
Dependency() |
Dependency(BuiltInCollections collection) |
Dependency(BuiltInCollections collection,
Integer version) |
Dependency(String name) |
Dependency(String name,
Integer version) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMember(DependencyMember depMember) |
DependencyMember |
addMember(ItemPath itemPath)
Add a member to the Dependency
|
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.
|
void |
addToItemProperties(PropertyArrayList props)
Add Dependency specific values to ItemProperties.
|
void |
addToVertexProperties(CastorHashMap props)
Add Dependency specific values to VertexProperties (CastorHashMap).
|
List<DependencyMember> |
compare(Dependency other)
Returns all DependencyMember that are members of the other collection but not members of this one.
|
boolean |
containsBuiltInProperty(BuiltInVertexProperties prop)
Method of convenience to check if property exists
|
DependencyMember |
createMember(ItemPath itemPath) |
DependencyMember |
createMember(ItemPath itemPath,
CastorHashMap props) |
Object |
getBuiltInProperty(BuiltInVertexProperties prop)
Method of convenience to get property value using BuiltInVertexProperties
|
Property[] |
getClassProperties() |
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) |
void |
updateMember(ItemPath childPath,
CastorHashMap memberNewProps) |
void |
updateMember(ItemPath childPath,
int memberID,
CastorHashMap memberNewProps) |
contains, equals, getClusterPath, getClusterType, getCounter, getDescVer, getMember, getMembers, getName, getVersion, getVersionName, hashCode, isFull, resolveMembers, setMembers, setName, setVersion, sizeclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitenforceValidNameprotected CastorHashMap mProperties
protected String mClassProps
public Dependency()
public Dependency(String name)
public Dependency(BuiltInCollections collection)
public Dependency(BuiltInCollections collection, Integer version)
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 Property[] getClassProperties()
public void updateMember(ItemPath childPath, CastorHashMap memberNewProps) throws ObjectNotFoundException, InvalidDataException, InvalidCollectionModification
childPath - memberNewProps - ObjectNotFoundExceptionInvalidDataExceptionInvalidCollectionModificationpublic void updateMember(ItemPath childPath, int memberID, CastorHashMap memberNewProps) throws ObjectNotFoundException, InvalidDataException, InvalidCollectionModification
childPath - memberID - memberNewProps - ObjectNotFoundExceptionInvalidDataExceptionInvalidCollectionModificationpublic DependencyMember addMember(ItemPath itemPath) throws InvalidCollectionModification, ObjectAlreadyExistsException
itemPath - the Item to be added as a MemberInvalidCollectionModification - if Item is null or the Properties of the Item (e.g. Type) does not match the Collection'sObjectAlreadyExistsException - Item is already a memberpublic void addMember(DependencyMember depMember) throws InvalidCollectionModification, ObjectAlreadyExistsException
depMember - InvalidCollectionModificationObjectAlreadyExistsExceptionpublic DependencyMember createMember(ItemPath itemPath) throws InvalidCollectionModification, ObjectAlreadyExistsException
itemPath - InvalidCollectionModificationObjectAlreadyExistsExceptionpublic List<DependencyMember> 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 DependencyMember createMember(ItemPath itemPath, CastorHashMap props) throws InvalidCollectionModification, ObjectAlreadyExistsException
itemPath - props - InvalidCollectionModificationObjectAlreadyExistsExceptionpublic void removeMember(int memberId)
throws ObjectNotFoundException
CollectionremoveMember in class Collection<DependencyMember>memberId - to removeObjectNotFoundException - when there was no slot with this ID found.public void addToItemProperties(PropertyArrayList props) throws InvalidDataException, ObjectNotFoundException
props - the current list of ItemPropertiesInvalidDataExceptionObjectNotFoundExceptionpublic void addToVertexProperties(CastorHashMap props) throws InvalidDataException, ObjectNotFoundException
props - the current list of VertexPropertiesInvalidDataException - inconsistent data was providedObjectNotFoundException - objects were not found while reading the propertiespublic Object getBuiltInProperty(BuiltInVertexProperties prop)
prop - the property to readpublic boolean containsBuiltInProperty(BuiltInVertexProperties prop)
prop - the property to checkCopyright © 1997–2019 CRISTAL-iSE. All rights reserved.