|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.association.NodeAssociationStoreImpl
public class NodeAssociationStoreImpl
Constructor Summary | |
---|---|
NodeAssociationStoreImpl(OfBizDelegator ofBizDelegator)
|
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. |
void |
createAssociation(NodeAssocationType type,
Long sourceNodeId,
Long sinkNodeId)
Create an association between two entities, given a particular association type. |
org.ofbiz.core.entity.GenericValue |
createAssociation(String sourceNodeEntity,
Long sourceNodeId,
String sinkNodeEntity,
Long sinkNodeId,
String associationType)
Create an association between two entities, given a particular association type. |
org.ofbiz.core.entity.GenericValue |
getAssociation(org.ofbiz.core.entity.GenericValue source,
org.ofbiz.core.entity.GenericValue sink,
String associationType)
|
List<Long> |
getSinkIdsFromSource(org.ofbiz.core.entity.GenericValue source,
String sinkEntityName,
String associationType)
|
List<Long> |
getSinkIdsFromSource(NodeAssocationType nodeAssocationType,
Long sourceNodeId)
|
List<org.ofbiz.core.entity.GenericValue> |
getSinksFromSource(org.ofbiz.core.entity.GenericValue source,
String sinkEntityName,
String associationType)
Operates on NodeAssociations - gets MANY sinks from ONE source |
List<org.ofbiz.core.entity.GenericValue> |
getSinksFromSource(String sourceEntityName,
Long sourceNodeId,
String sinkEntityName,
String associationType)
|
List<Long> |
getSourceIdsFromSink(org.ofbiz.core.entity.GenericValue sink,
String sourceEntity,
String associationType)
|
List<Long> |
getSourceIdsFromSink(NodeAssocationType nodeAssocationType,
Long sinkNodeId)
|
List<org.ofbiz.core.entity.GenericValue> |
getSourcesFromSink(org.ofbiz.core.entity.GenericValue sink,
String sourceName,
String associationType)
Operates on NodeAssociations - gets MANY sources from ONE sink |
void |
removeAssociation(org.ofbiz.core.entity.GenericValue source,
org.ofbiz.core.entity.GenericValue sink,
String associationType)
|
void |
removeAssociation(NodeAssocationType type,
Long sourceNodeId,
Long sinkNodeId)
Removes the given association if it exists. |
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 |
removeAssociationsFromSource(NodeAssocationType nodeAssocationType,
Long sourceNodeId)
Remove associations of the given type from the given source. |
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 associations 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 NodeAssociationStoreImpl(OfBizDelegator ofBizDelegator)
Method Detail |
---|
public List<org.ofbiz.core.entity.GenericValue> getSinksFromSource(org.ofbiz.core.entity.GenericValue source, String sinkEntityName, String associationType) throws DataAccessException
NodeAssociationStore
getSinksFromSource
in interface NodeAssociationStore
source
- The source node to find all associated sink nodes for.sinkEntityName
- The sink Entity type.associationType
- the association type
DataAccessException
- If there is a DB Exception.public List<org.ofbiz.core.entity.GenericValue> getSinksFromSource(String sourceEntityName, Long sourceNodeId, String sinkEntityName, String associationType)
getSinksFromSource
in interface NodeAssociationStore
public List<org.ofbiz.core.entity.GenericValue> getSourcesFromSink(org.ofbiz.core.entity.GenericValue sink, String sourceName, String associationType) throws DataAccessException
NodeAssociationStore
getSourcesFromSink
in interface NodeAssociationStore
DataAccessException
- If there is a DB Exception.public org.ofbiz.core.entity.GenericValue createAssociation(org.ofbiz.core.entity.GenericValue source, org.ofbiz.core.entity.GenericValue sink, String associationType) throws DataAccessException
createAssociation
in interface NodeAssociationStore
source
- the sourcesink
- the sinkassociationType
- the Association Type
DataAccessException
- If there is a DB Exception.public void createAssociation(NodeAssocationType type, Long sourceNodeId, Long sinkNodeId)
NodeAssociationStore
createAssociation
in interface NodeAssociationStore
public org.ofbiz.core.entity.GenericValue createAssociation(String sourceNodeEntity, Long sourceNodeId, String sinkNodeEntity, Long sinkNodeId, String associationType) throws DataAccessException
NodeAssociationStore
createAssociation
in interface NodeAssociationStore
DataAccessException
- If there is a DB Exception.public void removeAssociation(NodeAssocationType type, Long sourceNodeId, Long sinkNodeId)
NodeAssociationStore
removeAssociation
in interface NodeAssociationStore
type
- NodeAssocation TypesourceNodeId
- The Source NodesinkNodeId
- The Sink Node (destination node).public void removeAssociation(org.ofbiz.core.entity.GenericValue source, org.ofbiz.core.entity.GenericValue sink, String associationType) throws DataAccessException
removeAssociation
in interface NodeAssociationStore
DataAccessException
public void removeAssociationsFromSource(org.ofbiz.core.entity.GenericValue source) throws DataAccessException
NodeAssociationStore
removeAssociationsFromSource
in interface NodeAssociationStore
source
- the Source
DataAccessException
- If there is a DB Exception.public void removeAssociationsFromSource(NodeAssocationType nodeAssocationType, Long sourceNodeId)
NodeAssociationStore
removeAssociationsFromSource
in interface NodeAssociationStore
nodeAssocationType
- the NodeAssocationTypesourceNodeId
- the ID of the sourcepublic void removeAssociationsFromSink(org.ofbiz.core.entity.GenericValue sink) throws DataAccessException
NodeAssociationStore
removeAssociationsFromSink
in interface NodeAssociationStore
sink
- the sink
DataAccessException
- If there is a DB Exception.public void swapAssociation(String sourceEntityName, String associationType, org.ofbiz.core.entity.GenericValue fromSink, org.ofbiz.core.entity.GenericValue toSink) throws DataAccessException
NodeAssociationStore
swapAssociation
in interface NodeAssociationStore
sourceEntityName
- the Source Entity TypeassociationType
- the Association TypefromSink
- the From sinktoSink
- the To sink
DataAccessException
- 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 DataAccessException
NodeAssociationStore
swapAssociation
in interface NodeAssociationStore
entities
- the entitiesassociationType
- the Association TypefromSink
- the From sinktoSink
- the To sink
DataAccessException
- 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 DataAccessException
getAssociation
in interface NodeAssociationStore
DataAccessException
public List<Long> getSinkIdsFromSource(org.ofbiz.core.entity.GenericValue source, String sinkEntityName, String associationType)
getSinkIdsFromSource
in interface NodeAssociationStore
public List<Long> getSinkIdsFromSource(NodeAssocationType nodeAssocationType, Long sourceNodeId)
getSinkIdsFromSource
in interface NodeAssociationStore
public List<Long> getSourceIdsFromSink(org.ofbiz.core.entity.GenericValue sink, String sourceEntity, String associationType)
getSourceIdsFromSink
in interface NodeAssociationStore
public List<Long> getSourceIdsFromSink(NodeAssocationType nodeAssocationType, Long sinkNodeId)
getSourceIdsFromSink
in interface NodeAssociationStore
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |