|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.entity.EntityUtils
public class EntityUtils
Has some utility methods for working with Entity Engine.
This originally lived in atlassian-core, but got moved to JIRA in v4.3 and moved to the com.atlassian.jira package in v5.1
Constructor Summary | |
---|---|
EntityUtils()
|
Method Summary | ||
---|---|---|
static
|
convertToGenericValues(EntityFactory<E> entityFactory,
List<E> entityList)
|
|
static org.ofbiz.core.entity.GenericValue |
createValue(String entityName,
Map<String,Object> fields)
Create a new entity. |
|
static String |
getNextStringId(String entityName)
Calculate a new entity ID (by basically taking one more than the max integer that exists). |
|
static boolean |
identical(org.ofbiz.core.entity.GenericValue v1,
org.ofbiz.core.entity.GenericValue v2)
Compare two GenericValues based on their content. |
|
static void |
internStringFieldValue(org.ofbiz.core.entity.GenericValue value,
String fieldName)
Forcibly interns the contents of a String field in a GenericValue. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EntityUtils()
Method Detail |
---|
public static org.ofbiz.core.entity.GenericValue createValue(String entityName, Map<String,Object> fields)
If there is no "id" in the parameter list, one is created using the entity sequence.
entityName
- the entity name.fields
- field values
DataAccessException
- if an error occurs in the Database layerOfBizDelegator.createValue(String, java.util.Map)
public static boolean identical(org.ofbiz.core.entity.GenericValue v1, org.ofbiz.core.entity.GenericValue v2)
v1
- the first GenericValuev2
- the second GenericValue
public static String getNextStringId(String entityName)
entityName
- The entity name
public static void internStringFieldValue(org.ofbiz.core.entity.GenericValue value, String fieldName)
GenericValue
s and need to cache them, it may make
sense to use this method to avoid keeping excessive duplicate copies
of their values.
Caveats:
public static <E> List<org.ofbiz.core.entity.GenericValue> convertToGenericValues(EntityFactory<E> entityFactory, List<E> entityList)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |