|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AssociationManager
This was taken from atlassian-ofbiz and placed into its now rightful home of JIRA.
Method Summary | |
---|---|
org.ofbiz.core.entity.GenericValue |
createAssociation(org.ofbiz.core.entity.GenericValue source,
org.ofbiz.core.entity.GenericValue sink,
String associationType)
Create an association between two entities, given a particular association type. |
org.ofbiz.core.entity.GenericValue |
createAssociation(Long sourceNodeId,
String sourceNodeEntity,
Long sinkNodeId,
String sinkNodeEntity,
String associationType)
Create an association between two entities, given a particular association type. |
org.ofbiz.core.entity.GenericValue |
createAssociation(String userName,
Long sinkNodeId,
String sinkNodeEntity,
String associationType)
Creates an association between a user and a sink node. |
org.ofbiz.core.entity.GenericValue |
createAssociation(User user,
org.ofbiz.core.entity.GenericValue sink,
String associationType)
Deprecated. Please use UserAssociationStore.createAssociation(String, com.atlassian.crowd.embedded.api.User, org.ofbiz.core.entity.GenericValue) . Deprecated since v4.3 |
org.ofbiz.core.entity.GenericValue |
getAssociation(org.ofbiz.core.entity.GenericValue source,
org.ofbiz.core.entity.GenericValue sink,
String associationType)
|
org.ofbiz.core.entity.GenericValue |
getAssociation(User user,
org.ofbiz.core.entity.GenericValue sink,
String associationType)
|
List<org.ofbiz.core.entity.GenericValue> |
getSinkFromSource(org.ofbiz.core.entity.GenericValue source,
String sinkName,
String associationType,
boolean useCache)
Operates on NodeAssociations - gets MANY sinks from ONE source |
List<org.ofbiz.core.entity.GenericValue> |
getSinkFromSource(org.ofbiz.core.entity.GenericValue source,
String sinkName,
String associationType,
boolean useCache,
boolean useSequence)
|
List<org.ofbiz.core.entity.GenericValue> |
getSinkFromUser(User source,
String sinkName,
String associationType,
boolean useCache)
Operates on UserAssociations - gets MANY sinks from ONE user |
List<org.ofbiz.core.entity.GenericValue> |
getSinkFromUser(User source,
String sinkName,
String associationType,
boolean useCache,
boolean useSequence)
Operates on UserAssociations - gets MANY sinks from ONE user. |
List<Long> |
getSinkIdsFromSource(org.ofbiz.core.entity.GenericValue source,
String sinkEntity,
String associationType)
|
List<Long> |
getSinkIdsFromUser(User source,
String sinkName,
String associationType,
boolean useCache)
Operates on UserAssociations - gets MANY sinks Ids from ONE user |
List<org.ofbiz.core.entity.GenericValue> |
getSourceFromSink(org.ofbiz.core.entity.GenericValue sink,
String sourceName,
String associationType,
boolean useCache)
Operates on NodeAssociations - gets MANY sources from ONE sink |
List<org.ofbiz.core.entity.GenericValue> |
getSourceFromSink(org.ofbiz.core.entity.GenericValue sink,
String sourceName,
String associationType,
boolean useCache,
boolean useSequence)
Operates on NodeAssociations - gets MANY sources from ONE sink |
List<Long> |
getSourceIdsFromSink(org.ofbiz.core.entity.GenericValue sink,
String sourceEntity,
String associationType)
|
List<User> |
getUserFromSink(org.ofbiz.core.entity.GenericValue sink,
String associationType,
boolean useCache)
Operates on UserAssociations - gets MANY users from ONE sink |
List<User> |
getUserFromSink(org.ofbiz.core.entity.GenericValue sink,
String associationType,
boolean useCache,
boolean useSequence)
Operates on UserAssociations - gets MANY users from ONE sink |
List<String> |
getUsernamesFromSink(org.ofbiz.core.entity.GenericValue sink,
String associationType,
boolean useCache,
boolean useSequence)
Finds and returns a list of associated usernames, never null. |
void |
removeAssociation(org.ofbiz.core.entity.GenericValue source,
org.ofbiz.core.entity.GenericValue sink,
String associationType)
|
void |
removeAssociation(String username,
org.ofbiz.core.entity.GenericValue sink,
String associationType)
Removes association between the user with given username and the generic value |
void |
removeAssociation(User user,
org.ofbiz.core.entity.GenericValue sink,
String associationType)
|
void |
removeAssociationsFromSink(org.ofbiz.core.entity.GenericValue sink)
Remove all entity<->entity associations, given the sink. |
void |
removeAssociationsFromSource(org.ofbiz.core.entity.GenericValue source)
Remove all entity<->entity associations, given the source. |
void |
removeUserAssociationsFromSink(org.ofbiz.core.entity.GenericValue sink)
Remove all user<->entity associations, given the entity |
void |
removeUserAssociationsFromSink(org.ofbiz.core.entity.GenericValue sink,
String associationType)
Remove all uer associations given an entity and association type |
void |
removeUserAssociationsFromUser(User user)
Remove all user<->entity associations, given the user |
void |
removeUserAssociationsFromUser(User user,
String associationType)
Remove all user<->entity associations, given the user and association type |
void |
removeUserAssociationsFromUser(User user,
String associationType,
String entityName)
Remove all user<->entity associations, given the user and association type |
void |
swapAssociation(List<org.ofbiz.core.entity.GenericValue> entities,
String associationType,
org.ofbiz.core.entity.GenericValue fromSink,
org.ofbiz.core.entity.GenericValue toSink)
Swaps all associations for a given list of entities (say move a list of unresolved issue entities to a new fix for version) |
void |
swapAssociation(String sourceEntityType,
String associationType,
org.ofbiz.core.entity.GenericValue fromSink,
org.ofbiz.core.entity.GenericValue toSink)
Swap all associations of a particular type from one sink to another. |
Method Detail |
---|
org.ofbiz.core.entity.GenericValue createAssociation(User user, org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
UserAssociationStore.createAssociation(String, com.atlassian.crowd.embedded.api.User, org.ofbiz.core.entity.GenericValue)
. Deprecated since v4.3
user
- the user to associate with the sink node.sink
- the sink node entityassociationType
- the association type
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.org.ofbiz.core.entity.GenericValue createAssociation(String userName, Long sinkNodeId, String sinkNodeEntity, String associationType) throws org.ofbiz.core.entity.GenericEntityException
userName
- the user name to associate with the sink node.sinkNodeId
- the id of the sink node entitysinkNodeEntity
- the entity name of the sink nodeassociationType
- the association type
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.org.ofbiz.core.entity.GenericValue createAssociation(org.ofbiz.core.entity.GenericValue source, org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
source
- the sourcesink
- the sinkassociationType
- the Association Type
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.org.ofbiz.core.entity.GenericValue createAssociation(Long sourceNodeId, String sourceNodeEntity, Long sinkNodeId, String sinkNodeEntity, String associationType) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.void removeAssociation(org.ofbiz.core.entity.GenericValue source, org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
void removeAssociation(User user, org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
void removeAssociation(String username, org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
username
- usernamesink
- generic value, e.g. issueassociationType
- association type
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.void removeAssociationsFromSource(org.ofbiz.core.entity.GenericValue source) throws org.ofbiz.core.entity.GenericEntityException
source
- the Source
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.void removeAssociationsFromSink(org.ofbiz.core.entity.GenericValue sink) throws org.ofbiz.core.entity.GenericEntityException
sink
- the sink
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.void removeUserAssociationsFromSink(org.ofbiz.core.entity.GenericValue sink) throws org.ofbiz.core.entity.GenericEntityException
sink
- the sink
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.void removeUserAssociationsFromSink(org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
sink
- The entity disassociate with all usersassociationType
- the association type to remove
org.ofbiz.core.entity.GenericEntityException
- throws if problem with ofbizvoid removeUserAssociationsFromUser(User user) throws org.ofbiz.core.entity.GenericEntityException
user
- the User
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.void removeUserAssociationsFromUser(User user, String associationType) throws org.ofbiz.core.entity.GenericEntityException
user
- The user to remove all associations withassociationType
- the type of associations to remove
org.ofbiz.core.entity.GenericEntityException
- if database exception occursvoid removeUserAssociationsFromUser(User user, String associationType, String entityName) throws org.ofbiz.core.entity.GenericEntityException
user
- The user to remove all associations withentityName
- The type of entity to removeassociationType
- the type of associations to remove
org.ofbiz.core.entity.GenericEntityException
- if database exception occursvoid swapAssociation(String sourceEntityType, String associationType, org.ofbiz.core.entity.GenericValue fromSink, org.ofbiz.core.entity.GenericValue toSink) throws org.ofbiz.core.entity.GenericEntityException
sourceEntityType
- the Source Entity TypeassociationType
- the Association TypefromSink
- the From sinktoSink
- the To sink
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.void swapAssociation(List<org.ofbiz.core.entity.GenericValue> entities, String associationType, org.ofbiz.core.entity.GenericValue fromSink, org.ofbiz.core.entity.GenericValue toSink) throws org.ofbiz.core.entity.GenericEntityException
entities
- the entitiesassociationType
- the Association TypefromSink
- the From sinktoSink
- the To sink
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.List<org.ofbiz.core.entity.GenericValue> getSinkFromSource(org.ofbiz.core.entity.GenericValue source, String sinkName, String associationType, boolean useCache) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.List<org.ofbiz.core.entity.GenericValue> getSinkFromSource(org.ofbiz.core.entity.GenericValue source, String sinkName, String associationType, boolean useCache, boolean useSequence) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
List<org.ofbiz.core.entity.GenericValue> getSourceFromSink(org.ofbiz.core.entity.GenericValue sink, String sourceName, String associationType, boolean useCache) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.List<org.ofbiz.core.entity.GenericValue> getSourceFromSink(org.ofbiz.core.entity.GenericValue sink, String sourceName, String associationType, boolean useCache, boolean useSequence) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.List<org.ofbiz.core.entity.GenericValue> getSinkFromUser(User source, String sinkName, String associationType, boolean useCache) throws org.ofbiz.core.entity.GenericEntityException
source
- The associated usersinkName
- The type of entityassociationType
- The association typeuseCache
- Do we use the cache
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.List<Long> getSinkIdsFromUser(User source, String sinkName, String associationType, boolean useCache) throws org.ofbiz.core.entity.GenericEntityException
source
- The associated usersinkName
- The type of entityassociationType
- The association typeuseCache
- Do we use the cache
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.List<org.ofbiz.core.entity.GenericValue> getSinkFromUser(User source, String sinkName, String associationType, boolean useCache, boolean useSequence) throws org.ofbiz.core.entity.GenericEntityException
source
- the source UsersinkName
- The type of entityassociationType
- the association typeuseCache
- use cache flaguseSequence
- use sequence number flag
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.List<User> getUserFromSink(org.ofbiz.core.entity.GenericValue sink, String associationType, boolean useCache) throws org.ofbiz.core.entity.GenericEntityException, EntityNotFoundException
sink
- the Sink generic valueassociationType
- association typeuseCache
- use cache flag
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.
EntityNotFoundException
List<User> getUserFromSink(org.ofbiz.core.entity.GenericValue sink, String associationType, boolean useCache, boolean useSequence) throws org.ofbiz.core.entity.GenericEntityException, EntityNotFoundException
sink
- the Sink generic valueassociationType
- association typeuseCache
- use cache flaguseSequence
- use sequence number flag
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.
EntityNotFoundException
List<String> getUsernamesFromSink(org.ofbiz.core.entity.GenericValue sink, String associationType, boolean useCache, boolean useSequence) throws org.ofbiz.core.entity.GenericEntityException
sink
- the Sink generic valueassociationType
- association typeuseCache
- use cache flaguseSequence
- use sequence number flag
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.org.ofbiz.core.entity.GenericValue getAssociation(org.ofbiz.core.entity.GenericValue source, org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericValue getAssociation(User user, org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
List<Long> getSinkIdsFromSource(org.ofbiz.core.entity.GenericValue source, String sinkEntity, String associationType) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
List<Long> getSourceIdsFromSink(org.ofbiz.core.entity.GenericValue sink, String sourceEntity, String associationType) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |