com.atlassian.jira.ofbiz
Class DefaultOfBizDelegator
java.lang.Object
com.atlassian.jira.ofbiz.DefaultOfBizDelegator
- All Implemented Interfaces:
- OfBizDelegator
- public class DefaultOfBizDelegator
- extends Object
- implements OfBizDelegator
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)
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. |
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultOfBizDelegator
public DefaultOfBizDelegator(org.ofbiz.core.entity.DelegatorInterface delegatorInterface)
findByAnd
public List findByAnd(String s,
Map map)
throws InfrastructureException
- Specified by:
findByAnd
in interface OfBizDelegator
- Throws:
InfrastructureException
findByAnd
public List findByAnd(String s,
Map map,
List orderClause)
throws DataAccessException
- Specified by:
findByAnd
in interface OfBizDelegator
- Throws:
DataAccessException
findByAnd
public List findByAnd(String s,
List expressions)
throws DataAccessException
- Specified by:
findByAnd
in interface OfBizDelegator
- Throws:
DataAccessException
findByOr
public List findByOr(String entityName,
List expressions,
List orderBy)
throws DataAccessException
- Specified by:
findByOr
in interface OfBizDelegator
- Throws:
DataAccessException
removeAll
public void removeAll(List genericValues)
throws DataAccessException
- Specified by:
removeAll
in interface OfBizDelegator
- Throws:
DataAccessException
removeByAnd
public int removeByAnd(String s,
Map map)
throws DataAccessException
- Specified by:
removeByAnd
in interface OfBizDelegator
- Throws:
DataAccessException
removeValue
public int removeValue(org.ofbiz.core.entity.GenericValue value)
throws DataAccessException
- Specified by:
removeValue
in interface OfBizDelegator
- Throws:
DataAccessException
storeAll
public void storeAll(List genericValues)
throws DataAccessException
- Specified by:
storeAll
in interface OfBizDelegator
- Throws:
DataAccessException
findAll
public List findAll(String s)
- Specified by:
findAll
in interface OfBizDelegator
findAll
public List findAll(String s,
List sortOrder)
throws DataAccessException
- Specified by:
findAll
in interface OfBizDelegator
- Throws:
DataAccessException
store
public void store(org.ofbiz.core.entity.GenericValue gv)
throws DataAccessException
- Specified by:
store
in interface OfBizDelegator
- Throws:
DataAccessException
createValue
public org.ofbiz.core.entity.GenericValue createValue(String entity,
Map params)
- Specified by:
createValue
in interface OfBizDelegator
findByPrimaryKey
public org.ofbiz.core.entity.GenericValue findByPrimaryKey(String s,
Map map)
- Specified by:
findByPrimaryKey
in interface OfBizDelegator
getRelated
public List getRelated(String relationName,
org.ofbiz.core.entity.GenericValue gv)
- Specified by:
getRelated
in interface OfBizDelegator
getCount
public long getCount(String entityName)
- Description copied from interface:
OfBizDelegator
- 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.
- Specified by:
getCount
in interface OfBizDelegator
findListIteratorByCondition
public OfBizListIterator findListIteratorByCondition(String entityType,
org.ofbiz.core.entity.EntityCondition condition)
- Specified by:
findListIteratorByCondition
in interface OfBizDelegator
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)
- Always close the iterator returned from this method when finished.
- Specified by:
findListIteratorByCondition
in interface OfBizDelegator
- Parameters:
entityName
- whereEntityCondition
- havingEntityCondition
- fieldsToSelect
- entityFindOptions
-
- Returns:
- OfBizListIterator
bulkUpdateByPrimaryKey
public int bulkUpdateByPrimaryKey(String entityName,
Map updateValues,
List keys)
- Description copied from interface:
OfBizDelegator
- 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.
- Specified by:
bulkUpdateByPrimaryKey
in interface OfBizDelegator
- 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)
- Description copied from interface:
OfBizDelegator
- 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.
- Specified by:
bulkUpdateByAnd
in interface OfBizDelegator
- 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.