Interface OccurrenceService
- All Known Implementing Classes:
StandardOccurrenceService
UsesOccurrences,
PathOccurrences, CombinedPathOccurrences, UsesOccurrenceData,
PathOccurrenceData and CombinedPathOccurrenceData in
the context of OccurrenceableLinks, PathOccurrenceContexts
and CombinedPathOccurrenceContexts
- Cookie: None
- Helper:
OccurrenceHelperhas helper methods - Service implementation:
StandardOccurrenceServicehas listeners - ServiceEvent:
OccurrenceEvent - ServiceException:
OccurrenceException
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptiondeleteCombinedPathOccurrenceData(CombinedPathOccurrenceData combinedPathOccurrenceData) This method should always be used to delete aCombinedPathOccurrenceData.deletePathOccurrenceData(PathOccurrenceData pathOccurrenceData) This method should always be used to delete aPathOccurrenceData.getCombinedPathOccurrence(PathOccurrence parentOccurrence, PathParentableOccurrence childOccurrence) Returns aCombinedPathOccurrencewith the given parentPathOccurrenceand childPathParentableOccurrence.getCombinedPathOccurrenceData(CombinedPathOccurrence occurrence, PathOccurrenceContext context, Class target) Returns an array ofCombinedPathOccurrenceDataobjects of the givenClassthat are associated with the givenCombinedPathOccurrenceandPathOccurrenceContext.getCombinedPathOccurrenceData(CombinedPathOccurrence occurrence, PathOccurrenceContext context, Vector targets) Returns an array ofCombinedPathOccurrenceDataobjects of any of theClassesin thetargets Vectorassociated with the givenCombinedPathOccurrenceandPathOccurrenceContext.Returns an array ofCombinedPathOccurrenceDataobjects associated with the givenPathOccurrenceContext.Returns aQueryResultofCombinedPathOccurrences having the given context.getCombinedPathOccurrencesForChild(PathParentableOccurrence childPathOccurrence) Returns aQueryResultofCombinedPathOccurrences where the givenPathOccurrenceplays the 'child' role.getCombinedPathOccurrencesForParent(PathOccurrence parentPathOccurrence) Returns aQueryResultofCombinedPathOccurrences where the givenPathOccurrenceplays the 'parent' role.getOccurrences(Vector occurrenceableLinks) Returns aQueryResultof arrays where each array has one of the givenOccurrenceableLinks in position 0, an associatedUsesOccurrencein position 1 and an associatedPathOccurrence(that has no subPath) in position 2; thePathOccurrencecould be null.getOccurrences(Vector occurrenceableLinks, PathOccurrence subPathOccurrence) Returns aQueryResultof arrays where each array has one of the givenOccurrenceableLinkin position 0, an associatedUsesOccurrencein position 1 and an associatedPathOccurrence(having the given subPath) in position 2; thePathOccurrencecould be null.getPathOccurrenceData(WTCollection pathOccurrences, WTCollection pathContexts, Collection<Class<? extends PathOccurrenceData>> types) Returns the specified types ofPathOccurrenceDatafor the specifiedPathOccurrences andPathOccurrenceContexts.Returns an array ofPathOccurrenceDataobjects associated with the givenPathOccurrenceContext.getPathOccurrenceData(PathOccurrence occurrence, PathOccurrenceContext context, Class target) Returns an array ofPathOccurrenceDataobjects associated with the givenPathOccurrenceandPathOccurrenceContext.getPathOccurrenceData(PathOccurrence occurrence, PathOccurrenceContext context, Vector targets) Returns an array ofPathOccurrenceDataobjects associated with the givenPathOccurrenceandPathOccurrenceContext.Persistable[][][]getPathOccurrenceDataPopulatedUsages(Persistable[][][] usages, PathOccurrenceContext occurrenceContext, Class occurrenceDataClass) Updates thePathOccurrences in theusagesarray by addingPathOccurrenceDataof the specified type for the specifiedPathOccurrenceContext.Persistable[][][]getPathOccurrencePopulatedUsages(Persistable[][][] usages, List pathOccurrences) Updates theOccurrenceableLinks in theusagesarray by setting theirusesOccurrenceVectorwithUsesOccurrences and settingPathOccurrences on theUsesOccurrences.Returns aQueryResultofPathOccurrences having the given context.getPopulatedOccurrenceableLinks(Vector occurrenceableLinks) Returns aVectorofOccurrenceableLinks with theirusesOccurrenceVectorpopulated with theirUsesOccurrences; note that theUsesOccurrences also have theirpathOccurrencepopulated.getPopulatedOccurrenceableLinks(Vector occurrenceableLinks, PathOccurrence subPathOccurrence) Returns aVectorofOccurrenceableLinks with theirusesOccurrenceVectorpopulated with theirUsesOccurrences; note that theUsesOccurrences also have theirpathOccurrencepopulated.Takes a WTCollection of UsesOccurrence objects and returns a WTKeyedMap where the keys are the UsesOccurrences passed in and the values are WTCollections of the UsesOccurrenceData that correspond to the keys.getUsesOccurrenceData(UsesOccurrence occurrence) Deprecated.getUsesOccurrenceData(UsesOccurrence occurrence, Vector classes) Returns an array ofUsesOccurrenceDataobjects of the given classes and associated with the givenUsesOccurrenceobject.getUsesOccurrences(Vector occurrenceableLinks) Returns aQueryResultof arrays where each array has anOccurrenceableLinkin position 0 and aUsesOccurrencein position 1.getUsesOccurrences(WTCollection links) Returns aWTKeyedMapwhere the keys are the input collection of OccurrenceableLinks and the values are WTCollections of the correspondingUsesOccurrenceobjects.Returns aQueryResultofUsesOccurrenceobjects.Returns theUsesOccurrences associated with the givenPathOccurrence.getUsesOccurrences(UsesOccurrenceContext context) Returns aQueryResultofUsesOccurrenceobjects having the given context.saveCombinedPathOccurrenceData(CombinedPathOccurrenceData combinedPathOccurrenceData) This method should always be used to insert or store aCombinedPathOccurrenceData.savePathOccurrenceData(PathOccurrenceData pathOccurrenceData) This method should always be used to insert or store a .saveUsesOccurrenceAndData(WTKeyedMap occDataMap) This method should always be used to insert or store anOccurrenceand/orOccurrenceDataobjects since they need special identifiers that must be obtained in a special way.saveUsesOccurrenceAndData(WTKeyedMap occDataMap, WTKeyedMap occDataToDeleteMap) This method should always be used to insert or store anOccurrenceand/orOccurrenceDataobjects since they need special identifiers that must be obtained in a special way.saveUsesOccurrenceAndData(UsesOccurrence occurrence, Vector occurrenceData) Deprecated.saveUsesOccurrenceAndData(UsesOccurrence occurrence, Vector occurrenceData, Vector occurrenceDataToDelete) Deprecated.
-
Method Details
-
deleteCombinedPathOccurrenceData
CombinedPathOccurrenceData deleteCombinedPathOccurrenceData(CombinedPathOccurrenceData combinedPathOccurrenceData) throws WTException - Parameters:
combinedPathOccurrenceData-- Returns:
- CombinedPathOccurrenceData
- Throws:
WTException
-
deletePathOccurrenceData
PathOccurrenceData deletePathOccurrenceData(PathOccurrenceData pathOccurrenceData) throws WTException - Parameters:
pathOccurrenceData-- Returns:
- PathOccurrenceData
- Throws:
WTException
-
getCombinedPathOccurrenceData
QueryResult getCombinedPathOccurrenceData(CombinedPathOccurrence occurrence, PathOccurrenceContext context, Class target) throws WTException Returns an array ofCombinedPathOccurrenceDataobjects of the givenClassthat are associated with the givenCombinedPathOccurrenceandPathOccurrenceContext.
Supported API: true- Parameters:
occurrence-context-target-- Returns:
- QueryResult
- Throws:
WTException
-
getCombinedPathOccurrenceData
QueryResult getCombinedPathOccurrenceData(CombinedPathOccurrence occurrence, PathOccurrenceContext context, Vector targets) throws WTException Returns an array ofCombinedPathOccurrenceDataobjects of any of theClassesin thetargets Vectorassociated with the givenCombinedPathOccurrenceandPathOccurrenceContext.
Supported API: true- Parameters:
occurrence-context-targets-- Returns:
- QueryResult
- Throws:
WTException
-
getCombinedPathOccurrenceData
Returns an array ofCombinedPathOccurrenceDataobjects associated with the givenPathOccurrenceContext.
Supported API: true- Parameters:
context-- Returns:
- QueryResult
- Throws:
WTException
-
getCombinedPathOccurrence
CombinedPathOccurrence getCombinedPathOccurrence(PathOccurrence parentOccurrence, PathParentableOccurrence childOccurrence) throws WTException Returns aCombinedPathOccurrencewith the given parentPathOccurrenceand childPathParentableOccurrence.
Supported API: true- Parameters:
parentOccurrence-childOccurrence- ThisVectorofOccurrenceableLinks should be used to find the associatedUsesOccurrenceobjects.- Returns:
- CombinedPathOccurrence
- Throws:
WTException
-
getCombinedPathOccurrences
- Parameters:
context- ThisVectorofOccurrenceableLinks should be used to find the associatedUsesOccurrenceobjects.- Returns:
- QueryResult
- Throws:
WTException
-
getCombinedPathOccurrencesForChild
QueryResult getCombinedPathOccurrencesForChild(PathParentableOccurrence childPathOccurrence) throws WTException Returns aQueryResultofCombinedPathOccurrences where the givenPathOccurrenceplays the 'child' role.
Supported API: true- Parameters:
childPathOccurrence- ThisVectorofOccurrenceableLinks should be used to find the associatedUsesOccurrenceobjects.- Returns:
- QueryResult
- Throws:
WTException
-
getCombinedPathOccurrencesForParent
QueryResult getCombinedPathOccurrencesForParent(PathOccurrence parentPathOccurrence) throws WTException Returns aQueryResultofCombinedPathOccurrences where the givenPathOccurrenceplays the 'parent' role.
Supported API: true- Parameters:
parentPathOccurrence- ThisVectorofOccurrenceableLinks should be used to find the associatedUsesOccurrenceobjects.- Returns:
- QueryResult
- Throws:
WTException
-
getOccurrences
Returns aQueryResultof arrays where each array has one of the givenOccurrenceableLinks in position 0, an associatedUsesOccurrencein position 1 and an associatedPathOccurrence(that has no subPath) in position 2; thePathOccurrencecould be null.If there is no
UsesOccurrence, then noQueryResultentry is returned.
Supported API: true- Parameters:
occurrenceableLinks- ThisVectorofOccurrenceableLinks should be used to find the associatedUsesOccurrenceobjects.- Returns:
- QueryResult
- Throws:
WTException
-
getOccurrences
QueryResult getOccurrences(Vector occurrenceableLinks, PathOccurrence subPathOccurrence) throws WTException Returns aQueryResultof arrays where each array has one of the givenOccurrenceableLinkin position 0, an associatedUsesOccurrencein position 1 and an associatedPathOccurrence(having the given subPath) in position 2; thePathOccurrencecould be null.If there is no
UsesOccurrence, then noQueryResultentry is returned.
Supported API: true- Parameters:
occurrenceableLinks- ThisVectorofOccurrenceableLinks should be used to find the associatedUsesOccurrenceobjects.subPathOccurrence- ThisVectorofPathOccurrences should be used to find the associatedPathOccurrenceobjects which play thesuperPathrole. In other words we want to find thePathOccurrenceobjects that are oneUsesOccurrencelonger than thePathOccurrenceobjects contained in thisVector.- Returns:
- QueryResult
- Throws:
WTException
-
getPathOccurrenceData
WTKeyedMap getPathOccurrenceData(WTCollection pathOccurrences, WTCollection pathContexts, Collection<Class<? extends PathOccurrenceData>> types) throws WTException Returns the specified types ofPathOccurrenceDatafor the specifiedPathOccurrences andPathOccurrenceContexts. The keys in the returned map are thePathOccurrences passed in and the values areWTCollections of the relatedPathOccurrenceDatafetched from the database. If a path does not have anyPathOccurrenceDatathat matches the passed parameters, then there is no entry in the map for that path.
Supported API: true- Parameters:
pathOccurrences- A collection ofPathOccurrences whose path occurrence data is desired.pathContexts- A collection ofPathOccurrenceContexts whose path occurrence data is desired.types- A collection of sub-types ofPathOccurrenceDatawhich are the types of path occurrence data that is desired.- Returns:
- A Map where the keys are
PathOccurrences and values areWTCollections of the relatedPathOccurrenceDataor null. - Throws:
WTException- On error.
-
getPathOccurrenceData
QueryResult getPathOccurrenceData(PathOccurrence occurrence, PathOccurrenceContext context, Class target) throws WTException Returns an array ofPathOccurrenceDataobjects associated with the givenPathOccurrenceandPathOccurrenceContext.
Supported API: true- Parameters:
occurrence-context-target-- Returns:
- QueryResult
- Throws:
WTException
-
getPathOccurrenceData
QueryResult getPathOccurrenceData(PathOccurrence occurrence, PathOccurrenceContext context, Vector targets) throws WTException Returns an array ofPathOccurrenceDataobjects associated with the givenPathOccurrenceandPathOccurrenceContext.
Supported API: true- Parameters:
occurrence-context-targets-- Returns:
- QueryResult
- Throws:
WTException
-
getPathOccurrenceData
Returns an array ofPathOccurrenceDataobjects associated with the givenPathOccurrenceContext.
Supported API: true- Parameters:
context-- Returns:
- QueryResult
- Throws:
WTException
-
getPathOccurrencePopulatedUsages
Persistable[][][] getPathOccurrencePopulatedUsages(Persistable[][][] usages, List pathOccurrences) throws WTException Updates theOccurrenceableLinks in theusagesarray by setting theirusesOccurrenceVectorwithUsesOccurrences and settingPathOccurrences on theUsesOccurrences.
Supported API: true- Parameters:
usages- The three-dimensional array of Persistable returned from navigating manyused-byobjects at once.pathOccurrences- List of pathPathOccurrences that match the order of the first dimension of theusagesarray.- Returns:
- The
usagesarray passed in, withUsesOccurrences andPathOccurrences populated. - Throws:
WTException
-
getPathOccurrenceDataPopulatedUsages
Persistable[][][] getPathOccurrenceDataPopulatedUsages(Persistable[][][] usages, PathOccurrenceContext occurrenceContext, Class occurrenceDataClass) throws WTException Updates thePathOccurrences in theusagesarray by addingPathOccurrenceDataof the specified type for the specifiedPathOccurrenceContext.
Supported API: true- Parameters:
usages- The three-dimensional array of Persistable returned from navigating manyused-byobjects at once.occurrenceContext- The context of the path occurrence data to add to thePathOccurrences.occurrenceDataClass- The classPathOccurrenceDataor one of its sub-types specifying the type of path occurrence data to fetch.- Returns:
- The
usagesarray passed in, with the path occurrence data added. - Throws:
WTException
-
getPathOccurrences
- Parameters:
uses- ThisVectorofPathOccurrences should be used to find the associatedPathOccurrenceobjects which play thesuperPathrole. In other words we want to find thePathOccurrenceobjects that are oneUsesOccurrencelonger than thePathOccurrenceobjects contained in thisVector.- Returns:
- QueryResult
- Throws:
WTException
-
getPathOccurrences
- Parameters:
context- ThisVectorofPathOccurrences should be used to find the associatedPathOccurrenceobjects which play thesuperPathrole. In other words we want to find thePathOccurrenceobjects that are oneUsesOccurrencelonger than thePathOccurrenceobjects contained in thisVector.- Returns:
- QueryResult
- Throws:
WTException
-
getPopulatedOccurrenceableLinks
Vector getPopulatedOccurrenceableLinks(Vector occurrenceableLinks, PathOccurrence subPathOccurrence) throws WTException Returns aVectorofOccurrenceableLinks with theirusesOccurrenceVectorpopulated with theirUsesOccurrences; note that theUsesOccurrences also have theirpathOccurrencepopulated.
Supported API: true- Parameters:
occurrenceableLinks- ThisVectorofOccurrenceableLinks should be used to find the associatedUsesOccurrenceobjects.subPathOccurrence- ThisVectorofPathOccurrences should be used to find the associatedPathOccurrenceobjects which play thesuperPathrole. In other words we want to find thePathOccurrenceobjects that are oneUsesOccurrencelonger than thePathOccurrenceobjects contained in thisVector.- Returns:
- Vector
- Throws:
WTException
-
getPopulatedOccurrenceableLinks
Returns aVectorofOccurrenceableLinks with theirusesOccurrenceVectorpopulated with theirUsesOccurrences; note that theUsesOccurrences also have theirpathOccurrencepopulated.
Supported API: true- Parameters:
occurrenceableLinks- ThisVectorofOccurrenceableLinks should be used to find the associatedUsesOccurrenceobjects.- Returns:
- Vector
- Throws:
WTException
-
getUsesOccurrences
- Parameters:
path-- Returns:
- QueryResult
- Throws:
OccurrenceExceptionWTException
-
getUsesOccurrenceData
Takes a WTCollection of UsesOccurrence objects and returns a WTKeyedMap where the keys are the UsesOccurrences passed in and the values are WTCollections of the UsesOccurrenceData that correspond to the keys.
Supported API: true- Parameters:
occs-- Returns:
- WTKeyedMap
- Throws:
WTException
-
getUsesOccurrenceData
Deprecated.Returns an array ofUsesOccurrenceDataobjects associated with the givenUsesOccurrenceobject.
Supported API: true- Parameters:
occurrence-- Returns:
- QueryResult
- Throws:
WTException
-
getUsesOccurrenceData
Returns an array ofUsesOccurrenceDataobjects of the given classes and associated with the givenUsesOccurrenceobject.
Supported API: true- Parameters:
occurrence-classes-- Returns:
- QueryResult
- Throws:
WTException
-
getUsesOccurrences
Returns aQueryResultof arrays where each array has anOccurrenceableLinkin position 0 and aUsesOccurrencein position 1.If there is no
UsesOccurrence, then noQueryResultentry is returned.
Supported API: true- Parameters:
occurrenceableLinks-- Returns:
- QueryResult
- Throws:
WTException
-
getUsesOccurrences
- Parameters:
link-- Returns:
- QueryResult
- Throws:
WTException
-
getUsesOccurrences
- Parameters:
context-- Returns:
- QueryResult
- Throws:
WTException
-
getUsesOccurrences
Returns aWTKeyedMapwhere the keys are the input collection of OccurrenceableLinks and the values are WTCollections of the correspondingUsesOccurrenceobjects.
Supported API: true- Parameters:
links-- Returns:
- WTKeyedMap
- Throws:
WTException
-
saveCombinedPathOccurrenceData
CombinedPathOccurrenceData saveCombinedPathOccurrenceData(CombinedPathOccurrenceData combinedPathOccurrenceData) throws WTException This method should always be used to insert or store aCombinedPathOccurrenceData.
Supported API: true- Parameters:
combinedPathOccurrenceData-- Returns:
- CombinedPathOccurrenceData
- Throws:
WTException
-
savePathOccurrenceData
This method should always be used to insert or store a .
Supported API: true- Parameters:
pathOccurrenceData-- Returns:
- PathOccurrenceData
- Throws:
WTException
-
saveUsesOccurrenceAndData
QueryResult saveUsesOccurrenceAndData(UsesOccurrence occurrence, Vector occurrenceData) throws WTException Deprecated.This method should always be used to insert or store anOccurrenceand/orOccurrenceDataobjects since they need special identifiers that must be obtained in a special way.Returns a
QueryResultof theOccurrenceand theOccurrenceDatas that have been inserted or updated. Note that some otherOccurrenceDatas may have been updated, too, but since the user of this method did not have them in their list they will not be returned.If the
Occurrencehas a uniqueOccurrence#occurrenceDataIdentifier(no otherOccurrenceshares thatoccurrenceDataIdentifier), then save theOccurrenceDataassociated to theoccurrence, but otherwise, copy theOccurrenceto get one with a newdataIdentifierand copy all the associatedOccurrenceDataobjects and then save theoccurrenceDataassociated to the newly copiedOccurrence.
Supported API: true- Parameters:
occurrence-occurrenceData-- Returns:
- QueryResult
- Throws:
WTException
-
saveUsesOccurrenceAndData
QueryResult saveUsesOccurrenceAndData(UsesOccurrence occurrence, Vector occurrenceData, Vector occurrenceDataToDelete) throws WTException Deprecated.This method should always be used to insert or store anOccurrenceand/orOccurrenceDataobjects since they need special identifiers that must be obtained in a special way.Returns a
QueryResultof theOccurrenceand theOccurrenceDatas that have been inserted or updated. Note that some otherOccurrenceDatas may have been updated, too, but since the user of this method did not have them in their list they will not be returned.If the
Occurrencehas a uniqueOccurrence#occurrenceDataIdentifier(no otherOccurrenceshares thatoccurrenceDataIdentifier), then save theOccurrenceDataassociated to theoccurrence, but otherwise, copy theOccurrenceto get one with a newdataIdentifierand copy all the associatedOccurrenceDataobjects and then save theoccurrenceDataassociated to the newly copiedOccurrence.
Supported API: true- Parameters:
occurrence-occurrenceData-occurrenceDataToDelete-- Returns:
- QueryResult
- Throws:
WTException
-
saveUsesOccurrenceAndData
This method should always be used to insert or store anOccurrenceand/orOccurrenceDataobjects since they need special identifiers that must be obtained in a special way.Takes a
WTKeyedMapwhere the keys are theUsesOccurrences and the values are aWTCollectionofUsesOccurrenceDatathat correspond to the key.Returns a
WTCollectionof theUsesOccurrenceand theUsesOccurrenceDatas that have been inserted or updated. Note that some otherUsesOccurrenceDatas may have been updated, too, but since the user of this method did not have them in their list they will not be returned.If the
Occurrencehas a uniqueOccurrence#occurrenceDataIdentifier(no otherOccurrenceshares thatoccurrenceDataIdentifier), then save theOccurrenceDataassociated to theoccurrence, but otherwise, copy theOccurrenceto get one with a newdataIdentifierand copy all the associatedOccurrenceDataobjects and then save theoccurrenceDataassociated to the newly copiedOccurrence.
Supported API: true- Parameters:
occDataMap-- Returns:
- WTCollection
- Throws:
WTException
-
saveUsesOccurrenceAndData
WTCollection saveUsesOccurrenceAndData(WTKeyedMap occDataMap, WTKeyedMap occDataToDeleteMap) throws WTException This method should always be used to insert or store anOccurrenceand/orOccurrenceDataobjects since they need special identifiers that must be obtained in a special way.Takes two
WTKeyedMaps where the keys are theUsesOccurrences and the values are aWTCollectionofUsesOccurrenceDatathat correspond to the key. The second map identifies the UsesOccurrenceData to be deleted.Returns a
WTCollectionof theUsesOccurrenceand theUsesOccurrenceDatas that have been inserted or updated. Note that some otherUsesOccurrenceDatas may have been updated, too, but since the user of this method did not have them in their list they will not be returned.If the
Occurrencehas a uniqueOccurrence#occurrenceDataIdentifier(no otherOccurrenceshares thatoccurrenceDataIdentifier), then save theOccurrenceDataassociated to theoccurrence, but otherwise, copy theOccurrenceto get one with a newdataIdentifierand copy all the associatedOccurrenceDataobjects and then save theoccurrenceDataassociated to the newly copiedOccurrence.
Supported API: true- Parameters:
occDataMap-occDataToDeleteMap-- Returns:
- WTCollection
- Throws:
WTException
-