|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.core.ofbiz.association.DefaultAssociationManager
public class DefaultAssociationManager
This was taken from atlassian-ofbiz and placed into its now rightful home of JIRA.
Constructor Summary | |
---|---|
DefaultAssociationManager(org.ofbiz.core.entity.DelegatorInterface delegator)
|
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)
|
org.ofbiz.core.entity.GenericValue |
createAssociation(com.atlassian.crowd.embedded.api.User user,
org.ofbiz.core.entity.GenericValue sink,
String associationType)
|
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(com.atlassian.crowd.embedded.api.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(com.atlassian.crowd.embedded.api.User source,
String sinkName,
String associationType,
boolean useCache)
Operates on UserAssociations - gets MANY sinks from ONE user |
List<org.ofbiz.core.entity.GenericValue> |
getSinkFromUser(com.atlassian.crowd.embedded.api.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(com.atlassian.crowd.embedded.api.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<com.atlassian.crowd.embedded.api.User> |
getUserFromSink(org.ofbiz.core.entity.GenericValue sink,
String associationType,
boolean useCache)
Operates on UserAssociations - gets MANY users from ONE sink |
List<com.atlassian.crowd.embedded.api.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)
Removes association between two entities, given a particular association type. |
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(com.atlassian.crowd.embedded.api.User user,
org.ofbiz.core.entity.GenericValue sink,
String associationType)
Removes association between the user with given username and the generic value. |
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 user<->entity associations, given the entity and association type |
void |
removeUserAssociationsFromUser(com.atlassian.crowd.embedded.api.User user)
Remove all user<->entity associations, given the user |
void |
removeUserAssociationsFromUser(com.atlassian.crowd.embedded.api.User user,
String associationType)
Remove all user<->entity associations, given the user and association type |
void |
removeUserAssociationsFromUser(com.atlassian.crowd.embedded.api.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 sourceEntityName,
String associationType,
org.ofbiz.core.entity.GenericValue fromSink,
org.ofbiz.core.entity.GenericValue toSink)
Swap all assocaitions of a particular type from one sink to another. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultAssociationManager(org.ofbiz.core.entity.DelegatorInterface delegator)
Method Detail |
---|
public 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
createAssociation
in interface AssociationManager
source
- the sourcesink
- the sinkassociationType
- the Association Type
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public org.ofbiz.core.entity.GenericValue createAssociation(Long sourceNodeId, String sourceNodeEntity, Long sinkNodeId, String sinkNodeEntity, String associationType) throws org.ofbiz.core.entity.GenericEntityException
AssociationManager
createAssociation
in interface AssociationManager
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public org.ofbiz.core.entity.GenericValue createAssociation(String userName, Long sinkNodeId, String sinkNodeEntity, String associationType) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
public org.ofbiz.core.entity.GenericValue createAssociation(com.atlassian.crowd.embedded.api.User user, org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
org.ofbiz.core.entity.GenericEntityException
public void removeAssociation(com.atlassian.crowd.embedded.api.User user, org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
AssociationManager
removeAssociation
in interface AssociationManager
user
- the usersink
- generic value, e.g. issueassociationType
- association type
org.ofbiz.core.entity.GenericEntityException
public void removeAssociation(String username, org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
AssociationManager
removeAssociation
in interface AssociationManager
username
- usernamesink
- generic value, e.g. issueassociationType
- association type
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public void removeAssociation(org.ofbiz.core.entity.GenericValue source, org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
AssociationManager
removeAssociation
in interface AssociationManager
source
- the source entitysink
- generic value, e.g. issueassociationType
- association type
org.ofbiz.core.entity.GenericEntityException
public void removeAssociationsFromSource(org.ofbiz.core.entity.GenericValue source) throws org.ofbiz.core.entity.GenericEntityException
removeAssociationsFromSource
in interface AssociationManager
source
- the Source
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public void removeAssociationsFromSink(org.ofbiz.core.entity.GenericValue sink) throws org.ofbiz.core.entity.GenericEntityException
AssociationManager
removeAssociationsFromSink
in interface AssociationManager
sink
- the sink
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public void removeUserAssociationsFromSink(org.ofbiz.core.entity.GenericValue sink) throws org.ofbiz.core.entity.GenericEntityException
removeUserAssociationsFromSink
in interface AssociationManager
sink
- the sink
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public void removeUserAssociationsFromSink(org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
removeUserAssociationsFromSink
in interface AssociationManager
sink
- The entity disassociate with all usersassociationType
- the association type to remove
org.ofbiz.core.entity.GenericEntityException
- throws if problem with ofbizpublic void removeUserAssociationsFromUser(com.atlassian.crowd.embedded.api.User user) throws org.ofbiz.core.entity.GenericEntityException
removeUserAssociationsFromUser
in interface AssociationManager
user
- the User
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public void removeUserAssociationsFromUser(com.atlassian.crowd.embedded.api.User user, String associationType) throws org.ofbiz.core.entity.GenericEntityException
AssociationManager
removeUserAssociationsFromUser
in interface AssociationManager
user
- The user to remove all associations withassociationType
- the type of associations to remove
org.ofbiz.core.entity.GenericEntityException
- if database exception occurspublic void removeUserAssociationsFromUser(com.atlassian.crowd.embedded.api.User user, String associationType, String entityName) throws org.ofbiz.core.entity.GenericEntityException
AssociationManager
removeUserAssociationsFromUser
in interface AssociationManager
user
- The user to remove all associations withassociationType
- the type of associations to removeentityName
- The type of entity to remove
org.ofbiz.core.entity.GenericEntityException
- if database exception occurspublic void swapAssociation(String sourceEntityName, String associationType, org.ofbiz.core.entity.GenericValue fromSink, org.ofbiz.core.entity.GenericValue toSink) throws org.ofbiz.core.entity.GenericEntityException
swapAssociation
in interface AssociationManager
sourceEntityName
- the Source Entity TypeassociationType
- the Association TypefromSink
- the From sinktoSink
- the To sink
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public 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
AssociationManager
swapAssociation
in interface AssociationManager
entities
- the entitiesassociationType
- the Association TypefromSink
- the From sinktoSink
- the To sink
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public 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
getAssociation
in interface AssociationManager
org.ofbiz.core.entity.GenericEntityException
public org.ofbiz.core.entity.GenericValue getAssociation(com.atlassian.crowd.embedded.api.User user, org.ofbiz.core.entity.GenericValue sink, String associationType) throws org.ofbiz.core.entity.GenericEntityException
getAssociation
in interface AssociationManager
org.ofbiz.core.entity.GenericEntityException
public 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
getSinkFromSource
in interface AssociationManager
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public 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
getSinkFromSource
in interface AssociationManager
org.ofbiz.core.entity.GenericEntityException
public 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
getSourceFromSink
in interface AssociationManager
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public 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
getSourceFromSink
in interface AssociationManager
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public List<org.ofbiz.core.entity.GenericValue> getSinkFromUser(com.atlassian.crowd.embedded.api.User source, String sinkName, String associationType, boolean useCache) throws org.ofbiz.core.entity.GenericEntityException
getSinkFromUser
in interface AssociationManager
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.public List<Long> getSinkIdsFromUser(com.atlassian.crowd.embedded.api.User source, String sinkName, String associationType, boolean useCache) throws org.ofbiz.core.entity.GenericEntityException
AssociationManager
getSinkIdsFromUser
in interface AssociationManager
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.public List<org.ofbiz.core.entity.GenericValue> getSinkFromUser(com.atlassian.crowd.embedded.api.User source, String sinkName, String associationType, boolean useCache, boolean useSequence) throws org.ofbiz.core.entity.GenericEntityException
getSinkFromUser
in interface AssociationManager
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.public List<com.atlassian.crowd.embedded.api.User> getUserFromSink(org.ofbiz.core.entity.GenericValue sink, String associationType, boolean useCache) throws org.ofbiz.core.entity.GenericEntityException
getUserFromSink
in interface AssociationManager
sink
- the Sink generic valueassociationType
- association typeuseCache
- use cache flag
org.ofbiz.core.entity.GenericEntityException
- If there is a DB Exception.public List<com.atlassian.crowd.embedded.api.User> getUserFromSink(org.ofbiz.core.entity.GenericValue sink, String associationType, boolean useCache, boolean useSequence) throws org.ofbiz.core.entity.GenericEntityException
getUserFromSink
in interface AssociationManager
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.public List<String> getUsernamesFromSink(org.ofbiz.core.entity.GenericValue sink, String associationType, boolean useCache, boolean useSequence) throws org.ofbiz.core.entity.GenericEntityException
AssociationManager
getUsernamesFromSink
in interface AssociationManager
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.public List<Long> getSinkIdsFromSource(org.ofbiz.core.entity.GenericValue source, String sinkEntity, String associationType) throws org.ofbiz.core.entity.GenericEntityException
getSinkIdsFromSource
in interface AssociationManager
org.ofbiz.core.entity.GenericEntityException
public List<Long> getSourceIdsFromSink(org.ofbiz.core.entity.GenericValue sink, String sourceEntity, String associationType) throws org.ofbiz.core.entity.GenericEntityException
getSourceIdsFromSink
in interface AssociationManager
org.ofbiz.core.entity.GenericEntityException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |