|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.ofbiz.DefaultOfBizDelegator
public class DefaultOfBizDelegator
Field Summary |
---|
Fields inherited from interface com.atlassian.jira.ofbiz.OfBizDelegator |
---|
ISSUE_LINK, ISSUE_LINK_TYPE, PROJECT_COMPONENT, VERSION |
Constructor Summary | |
---|---|
DefaultOfBizDelegator(org.ofbiz.core.entity.DelegatorInterface delegatorInterface)
|
Method Summary | |
---|---|
int |
bulkCopyColumnValuesByAnd(String entityName,
Map updateColumns,
Map criteria)
This can be used to perform an update on the entityName of all the rows identified by AND criteria of the fields specified by the criteria map. |
int |
bulkUpdateByAnd(String entityName,
Map updateValues,
Map criteria)
This can be used to perform an update on the entityName of all the rows identified by AND criteria of the fields specified by the criteria map. |
int |
bulkUpdateByPrimaryKey(String entityName,
Map updateValues,
List keys)
This can be used to perform an update on the entityName of all the rows identified by the keys with the values stored in the updateValues. |
org.ofbiz.core.entity.GenericValue |
createValue(String entity,
Map params)
|
List |
findAll(String s)
|
List |
findAll(String s,
List sortOrder)
|
List |
findByAnd(String s,
List expressions)
|
List |
findByAnd(String s,
Map map)
|
List |
findByAnd(String s,
Map map,
List orderClause)
|
List |
findByCondition(String entityName,
org.ofbiz.core.entity.EntityCondition entityCondition,
Collection fieldsToSelect,
List orderBy)
Pass-through to the findByCondition(String, org.ofbiz.core.entity.EntityCondition, java.util.Collection, java.util.List) method. |
List |
findByLike(String s,
Map map,
List list)
|
List |
findByOr(String entityName,
List expressions,
List orderBy)
|
org.ofbiz.core.entity.GenericValue |
findByPrimaryKey(String s,
Map map)
|
OfBizListIterator |
findListIteratorByCondition(String entityType,
org.ofbiz.core.entity.EntityCondition condition)
|
OfBizListIterator |
findListIteratorByCondition(String entityName,
org.ofbiz.core.entity.EntityCondition whereEntityCondition,
org.ofbiz.core.entity.EntityCondition havingEntityCondition,
Collection fieldsToSelect,
List orderBy,
org.ofbiz.core.entity.EntityFindOptions entityFindOptions)
Always close the iterator returned from this method when finished. |
long |
getCount(String entityName)
Ensure that there is a view-entity defined in entitymodel.xml (and entitygroup.xml) for the entity you are calling this method with, and that the view-entity is named correctly! The view-entity must be named the name of the normal entity with 'Count' appended. |
static int |
getQueryBatchSize()
|
List |
getRelated(String relationName,
org.ofbiz.core.entity.GenericValue gv)
|
void |
removeAll(List genericValues)
|
int |
removeByAnd(String s,
Map map)
|
int |
removeByOr(String entityName,
String entityId,
List ids)
This can be used to remove rows for a given entity based on entityName
and where entityId
|
int |
removeValue(org.ofbiz.core.entity.GenericValue value)
|
void |
store(org.ofbiz.core.entity.GenericValue gv)
|
void |
storeAll(List genericValues)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultOfBizDelegator(org.ofbiz.core.entity.DelegatorInterface delegatorInterface)
Method Detail |
---|
public static int getQueryBatchSize()
public List findByAnd(String s, Map map) throws InfrastructureException
findByAnd
in interface OfBizDelegator
InfrastructureException
public List findByAnd(String s, Map map, List orderClause) throws DataAccessException
findByAnd
in interface OfBizDelegator
DataAccessException
public List findByAnd(String s, List expressions) throws DataAccessException
findByAnd
in interface OfBizDelegator
DataAccessException
public List findByOr(String entityName, List expressions, List orderBy) throws DataAccessException
findByOr
in interface OfBizDelegator
DataAccessException
public List findByLike(String s, Map map, List list) throws DataAccessException
findByLike
in interface OfBizDelegator
DataAccessException
public void removeAll(List genericValues) throws DataAccessException
removeAll
in interface OfBizDelegator
DataAccessException
public List findByCondition(String entityName, org.ofbiz.core.entity.EntityCondition entityCondition, Collection fieldsToSelect, List orderBy)
OfBizDelegator
findByCondition(String, org.ofbiz.core.entity.EntityCondition, java.util.Collection, java.util.List)
method.
findByCondition
in interface OfBizDelegator
public int removeByOr(String entityName, String entityId, List ids) throws DataAccessException, org.ofbiz.core.entity.GenericModelException
OfBizDelegator
entityName
and where entityId
- Specified by:
removeByOr
in interface OfBizDelegator
- Parameters:
entityName
- identifies the table to perform the remove on.entityId
- the Ofbiz fieldName to be used for the identifier, eg WHERE fieldName IN (...). Must be the
same case as that found in entitymodel.xml.ids
- a list of entity IDs of the rows to be removed
- Returns:
- number of rows removed
- Throws:
DataAccessException
- if there are problems executing/accessing the data store
org.ofbiz.core.entity.GenericModelException
- if the given entityId is not valid for the given entity
public int removeByAnd(String s, Map map) throws DataAccessException
removeByAnd
in interface OfBizDelegator
DataAccessException
public int removeValue(org.ofbiz.core.entity.GenericValue value) throws DataAccessException
removeValue
in interface OfBizDelegator
DataAccessException
public void storeAll(List genericValues) throws DataAccessException
storeAll
in interface OfBizDelegator
DataAccessException
public List findAll(String s)
findAll
in interface OfBizDelegator
public List findAll(String s, List sortOrder) throws DataAccessException
findAll
in interface OfBizDelegator
DataAccessException
public void store(org.ofbiz.core.entity.GenericValue gv) throws DataAccessException
store
in interface OfBizDelegator
DataAccessException
public org.ofbiz.core.entity.GenericValue createValue(String entity, Map params)
createValue
in interface OfBizDelegator
public org.ofbiz.core.entity.GenericValue findByPrimaryKey(String s, Map map)
findByPrimaryKey
in interface OfBizDelegator
public List getRelated(String relationName, org.ofbiz.core.entity.GenericValue gv)
getRelated
in interface OfBizDelegator
public long getCount(String entityName)
OfBizDelegator
getCount
in interface OfBizDelegator
entityName
- entity name
public OfBizListIterator findListIteratorByCondition(String entityType, org.ofbiz.core.entity.EntityCondition condition)
findListIteratorByCondition
in interface OfBizDelegator
public OfBizListIterator findListIteratorByCondition(String entityName, org.ofbiz.core.entity.EntityCondition whereEntityCondition, org.ofbiz.core.entity.EntityCondition havingEntityCondition, Collection fieldsToSelect, List orderBy, org.ofbiz.core.entity.EntityFindOptions entityFindOptions)
findListIteratorByCondition
in interface OfBizDelegator
entityName
- whereEntityCondition
- havingEntityCondition
- fieldsToSelect
- orderBy
- entityFindOptions
-
public int bulkUpdateByPrimaryKey(String entityName, Map updateValues, List keys)
OfBizDelegator
bulkUpdateByPrimaryKey
in interface OfBizDelegator
entityName
- identifies the table to perform the update on.updateValues
- is a map where the key is the fieldName and the value
is the value to update the column to.keys
- is a list of Long values that represent the primary keys of the
the where clause.
public int bulkUpdateByAnd(String entityName, Map updateValues, Map criteria)
OfBizDelegator
bulkUpdateByAnd
in interface OfBizDelegator
entityName
- identifies the table to perform the update on.updateValues
- is a map where the key is the fieldName and the value
is the value to update the column to.criteria
- map of field to value mapping that will be used to generate the
where clause of the update SQL statement. Multiple entries in the map are joined using the
AND operator.
public int bulkCopyColumnValuesByAnd(String entityName, Map updateColumns, Map criteria)
OfBizDelegator
bulkCopyColumnValuesByAnd
in interface OfBizDelegator
entityName
- table na,eupdateColumns
- map of update to - update from columnscriteria
- map of column names and their values that will create WHERE clause
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |