com.atlassian.jira.ofbiz
Interface OfBizDelegator

All Known Implementing Classes:
DefaultOfBizDelegator, LockedDatabaseOfBizDelegator

public interface OfBizDelegator

A wrapper around DelegatorInterface that does not throw GenericEntityException.


Field Summary
static String ISSUE_LINK
           
static String ISSUE_LINK_TYPE
           
static String PROJECT_COMPONENT
           
static String VERSION
           
 
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 DefaultOfBizDelegator.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)
           
 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.
 List getRelated(String relationName, org.ofbiz.core.entity.GenericValue gv)
           
 org.ofbiz.core.entity.GenericValue makeValue(String entity)
           
 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)
           
 

Field Detail

VERSION

static final String VERSION
See Also:
Constant Field Values

ISSUE_LINK

static final String ISSUE_LINK
See Also:
Constant Field Values

ISSUE_LINK_TYPE

static final String ISSUE_LINK_TYPE
See Also:
Constant Field Values

PROJECT_COMPONENT

static final String PROJECT_COMPONENT
See Also:
Constant Field Values
Method Detail

findByAnd

List findByAnd(String s,
               Map map)
               throws DataAccessException
Throws:
DataAccessException

findByAnd

List findByAnd(String s,
               Map map,
               List orderClause)
               throws DataAccessException
Throws:
DataAccessException

findByAnd

List findByAnd(String s,
               List expressions)
               throws DataAccessException
Throws:
DataAccessException

findByOr

List findByOr(String entityName,
              List expressions,
              List orderBy)
              throws DataAccessException
Throws:
DataAccessException

findByLike

List findByLike(String s,
                Map map,
                List list)
                throws DataAccessException
Throws:
DataAccessException

removeAll

void removeAll(List genericValues)
               throws DataAccessException
Throws:
DataAccessException

removeByAnd

int removeByAnd(String s,
                Map map)
                throws DataAccessException
Throws:
DataAccessException

removeValue

int removeValue(org.ofbiz.core.entity.GenericValue value)
                throws DataAccessException
Throws:
DataAccessException

storeAll

void storeAll(List genericValues)
              throws DataAccessException
Throws:
DataAccessException

findAll

List findAll(String s)
             throws DataAccessException
Throws:
DataAccessException

findAll

List findAll(String s,
             List sortOrder)
             throws DataAccessException
Throws:
DataAccessException

store

void store(org.ofbiz.core.entity.GenericValue gv)
           throws DataAccessException
Throws:
DataAccessException

createValue

org.ofbiz.core.entity.GenericValue createValue(String entity,
                                               Map params)
                                               throws DataAccessException
Throws:
DataAccessException

makeValue

org.ofbiz.core.entity.GenericValue makeValue(String entity)

findByPrimaryKey

org.ofbiz.core.entity.GenericValue findByPrimaryKey(String s,
                                                    Map map)

getRelated

List getRelated(String relationName,
                org.ofbiz.core.entity.GenericValue gv)

getCount

long getCount(String entityName)
              throws DataAccessException
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. For example for the 'Issue' entity the view-entity must be called 'IssueCount'. Otherwise an exception will be thrown.

Parameters:
entityName - entity name
Returns:
count
Throws:
DataAccessException - if data access problems occur

findListIteratorByCondition

OfBizListIterator findListIteratorByCondition(String entityType,
                                              org.ofbiz.core.entity.EntityCondition condition)

findListIteratorByCondition

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)

bulkUpdateByPrimaryKey

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.

Parameters:
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.
Returns:
the number of rows updated

bulkUpdateByAnd

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.

Parameters:
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.
Returns:
the number of rows updated

bulkCopyColumnValuesByAnd

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.

Parameters:
entityName - table na,e
updateColumns - map of update to - update from columns
criteria - map of column names and their values that will create WHERE clause
Returns:
the number of rows updated

removeByOr

int removeByOr(String entityName,
               String entityId,
               List ids)
               throws DataAccessException,
                      org.ofbiz.core.entity.GenericModelException
This can be used to remove rows for a given entity based on entityName and where entityId
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:
org.ofbiz.core.entity.GenericModelException - if the given entityId is not valid for the given entity
DataAccessException - if there are problems executing/accessing the data store

findByCondition

List findByCondition(String entityName,
                     org.ofbiz.core.entity.EntityCondition entityCondition,
                     Collection fieldsToSelect,
                     List orderBy)
Pass-through to the DefaultOfBizDelegator.findByCondition(String, org.ofbiz.core.entity.EntityCondition, java.util.Collection, java.util.List) method.

Since:
v3.12


Copyright © 2002-2009 Atlassian. All Rights Reserved.