com.atlassian.jira.ofbiz
Interface OfBizDelegator

All Known Implementing Classes:
DefaultOfBizDelegator

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 VERSION
           
 
Method Summary
 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 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, 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)
           
 void removeAll(List genericValues)
           
 int removeByAnd(String s, Map map)
           
 int removeValue(org.ofbiz.core.entity.GenericValue value)
           
 void store(org.ofbiz.core.entity.GenericValue gv)
           
 void storeAll(List genericValues)
           
 

Field Detail

VERSION

public static final String VERSION
See Also:
Constant Field Values

ISSUE_LINK

public static final String ISSUE_LINK
See Also:
Constant Field Values

ISSUE_LINK_TYPE

public static final String ISSUE_LINK_TYPE
See Also:
Constant Field Values
Method Detail

findByAnd

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

findByAnd

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

findByAnd

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

findByOr

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

removeAll

public void removeAll(List genericValues)
               throws DataAccessException
Throws:
DataAccessException

removeByAnd

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

removeValue

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

storeAll

public void storeAll(List genericValues)
              throws DataAccessException
Throws:
DataAccessException

findAll

public List findAll(String s)
             throws DataAccessException
Throws:
DataAccessException

findAll

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

store

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

createValue

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

findByPrimaryKey

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

getRelated

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

getCount

public 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.

Throws:
DataAccessException

findListIteratorByCondition

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

findListIteratorByCondition

public OfBizListIterator findListIteratorByCondition(String entityName,
                                                     org.ofbiz.core.entity.EntityCondition whereEntityCondition,
                                                     org.ofbiz.core.entity.EntityCondition havingEntityCondition,
                                                     Collection fieldsToSelect,
                                                     org.ofbiz.core.entity.EntityFindOptions entityFindOptions)

bulkUpdateByPrimaryKey

public 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.

bulkUpdateByAnd

public 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.


Copyright © 2002-2006 Atlassian. All Rights Reserved.