|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.util.JiraEntityUtils
public class JiraEntityUtils
Field Summary | |
---|---|
static org.apache.commons.collections.Transformer |
GENERIC_VALUE_TO_ID_TRANSFORMER
Transformer for turning GenericValue objects into thier Long ids. |
static org.apache.commons.collections.Transformer |
GV_TO_ID_TRANSFORMER
|
Method Summary | |
---|---|
static Map |
createEntityMap(List entities,
String key,
String value)
Convert any list of entities into a sequenced hash map with two fields. |
static org.ofbiz.core.entity.GenericValue |
getProject(org.ofbiz.core.entity.GenericValue entity)
This method will return the project relevant to a given entity. |
static Collection |
transforToIdsCollection(Collection genericValues)
Creates a new collection of IDs from given collection of generic values. |
static List |
updateDependentEntities(org.ofbiz.core.entity.GenericValue issue,
Collection newEntities,
String relationType,
String changeItemField)
Deprecated. please use updateDependentEntitiesCheckId(org.ofbiz.core.entity.GenericValue, java.util.Collection, String, String) instead,
as it compares ids rather than GenericValues |
static List |
updateDependentEntitiesCheckId(org.ofbiz.core.entity.GenericValue issue,
Collection newEntities,
String relationType,
String changeItemField)
Slightly changed from updateDependentEntities(org.ofbiz.core.entity.GenericValue, java.util.Collection, String, String)
to cope with GV components that have different representation of null and empty strings (eg. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.apache.commons.collections.Transformer GV_TO_ID_TRANSFORMER
public static final org.apache.commons.collections.Transformer GENERIC_VALUE_TO_ID_TRANSFORMER
CollectionUtils.collect(java.util.Collection, org.apache.commons.collections.Transformer)
etc.
Method Detail |
---|
public static Collection transforToIdsCollection(Collection genericValues)
genericValues
- a collection of generic values [GenericValue]
public static org.ofbiz.core.entity.GenericValue getProject(org.ofbiz.core.entity.GenericValue entity) throws DataAccessException
entity
- Entity to determine the project from
GenericValue
if it can be found, otherwise null
DataAccessException
- in the event of some datalayer problem.public static List updateDependentEntitiesCheckId(org.ofbiz.core.entity.GenericValue issue, Collection newEntities, String relationType, String changeItemField) throws org.ofbiz.core.entity.GenericEntityException
updateDependentEntities(org.ofbiz.core.entity.GenericValue, java.util.Collection, String, String)
to cope with GV components that have different representation of null and empty strings (eg. Oracle) - JRA-12130
Update the dependent entities of this issue (for example versions, fix versions or components)
issue
- The issue to update entities fornewEntities
- The list of new dependent entities (GenericValue
's)relationType
- The dependency (association) type to look at, from IssueRelationConstants
changeItemField
- The fieldname of the change items generated
change items
or an empty list if nothing was changed
org.ofbiz.core.entity.GenericEntityException
- If something real bad happenspublic static List updateDependentEntities(org.ofbiz.core.entity.GenericValue issue, Collection newEntities, String relationType, String changeItemField) throws org.ofbiz.core.entity.GenericEntityException
updateDependentEntitiesCheckId(org.ofbiz.core.entity.GenericValue, java.util.Collection, String, String)
instead,
as it compares ids rather than GenericValues
issue
- The issue to update entities fornewEntities
- The list of new dependent entitiesrelationType
- The dependency (association) type to look at, from IssueRelationConstants
changeItemField
- The fieldname of the change items generated
org.ofbiz.core.entity.GenericEntityException
- If something real bad happenspublic static Map createEntityMap(List entities, String key, String value)
entities
- list of GenericValues
key
- the element to use as the keyvalue
- the element to use as the value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |