|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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<String,?> updateValues,
List<Long> 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 entityName,
Map<String,Object> fields)
Creates a new GenericValue, and persists it. |
List<org.ofbiz.core.entity.GenericValue> |
findAll(String s)
|
List<org.ofbiz.core.entity.GenericValue> |
findAll(String s,
List sortOrder)
|
List<org.ofbiz.core.entity.GenericValue> |
findByAnd(String entityName,
List<org.ofbiz.core.entity.EntityCondition> expressions)
|
List<org.ofbiz.core.entity.GenericValue> |
findByAnd(String entityName,
Map<String,?> fields)
Finds GenericValue records by all of the specified fields (ie: combined using AND). |
List<org.ofbiz.core.entity.GenericValue> |
findByAnd(String entityName,
Map<String,?> fields,
List<String> orderBy)
|
List<org.ofbiz.core.entity.GenericValue> |
findByCondition(String entityName,
org.ofbiz.core.entity.EntityCondition entityCondition,
Collection fieldsToSelect,
List orderBy)
Finds GenericValues by the conditions specified in the EntityCondition object. |
List<org.ofbiz.core.entity.GenericValue> |
findByField(String entityName,
String fieldName,
Object fieldValue)
Finds GenericValue records by the specified field value. |
List<org.ofbiz.core.entity.GenericValue> |
findByField(String entityName,
String fieldName,
Object fieldValue,
String orderBy)
Finds GenericValue records by the specified field value. |
List<org.ofbiz.core.entity.GenericValue> |
findByLike(String entityName,
Map map,
List list)
|
List<org.ofbiz.core.entity.GenericValue> |
findByOr(String entityName,
List<? extends org.ofbiz.core.entity.EntityCondition> expressions,
List orderBy)
|
org.ofbiz.core.entity.GenericValue |
findByPrimaryKey(String entityName,
Long id)
Find a Generic Entity by its single numeric Primary Key. |
org.ofbiz.core.entity.GenericValue |
findByPrimaryKey(String entityName,
Map fields)
Find a Generic Entity by its Primary Key. |
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<org.ofbiz.core.entity.GenericValue> |
getRelated(String relationName,
org.ofbiz.core.entity.GenericValue gv)
|
org.ofbiz.core.entity.GenericValue |
makeValue(String entityName)
Creates an Entity in the form of a GenericValue without persisting it. |
void |
removeAll(List<org.ofbiz.core.entity.GenericValue> genericValues)
|
int |
removeByAnd(String s,
Map map)
|
int |
removeByOr(String entityName,
String entityId,
List<Long> 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<org.ofbiz.core.entity.GenericValue> genericValues)
|
Field Detail |
---|
static final String VERSION
static final String ISSUE_LINK
static final String ISSUE_LINK_TYPE
static final String PROJECT_COMPONENT
Method Detail |
---|
List<org.ofbiz.core.entity.GenericValue> findByField(String entityName, String fieldName, Object fieldValue)
entityName
- The Name of the Entity as defined in the entity XML filefieldName
- The field to do filtering by.fieldValue
- The desired value for the filtering field.
DataAccessException
- If an error occurs in the persistence layer.List<org.ofbiz.core.entity.GenericValue> findByField(String entityName, String fieldName, Object fieldValue, String orderBy)
entityName
- The Name of the Entity as defined in the entity XML filefieldName
- The field to do filtering by.fieldValue
- The desired value for the filtering field.orderBy
- Single field to order by.
DataAccessException
- If an error occurs in the persistence layer.List<org.ofbiz.core.entity.GenericValue> findByAnd(String entityName, Map<String,?> fields) throws DataAccessException
entityName
- The Name of the Entity as defined in the entity XML filefields
- The fields of the named entity to query by with their corresponding values
DataAccessException
- If an error occurs in the persistence layer.List<org.ofbiz.core.entity.GenericValue> findByAnd(String entityName, Map<String,?> fields, List<String> orderBy) throws DataAccessException
DataAccessException
List<org.ofbiz.core.entity.GenericValue> findByAnd(String entityName, List<org.ofbiz.core.entity.EntityCondition> expressions) throws DataAccessException
DataAccessException
List<org.ofbiz.core.entity.GenericValue> findByOr(String entityName, List<? extends org.ofbiz.core.entity.EntityCondition> expressions, List orderBy) throws DataAccessException
DataAccessException
List<org.ofbiz.core.entity.GenericValue> findByLike(String entityName, Map map, List list) throws DataAccessException
DataAccessException
void removeAll(List<org.ofbiz.core.entity.GenericValue> genericValues) throws DataAccessException
DataAccessException
int removeByAnd(String s, Map map) throws DataAccessException
DataAccessException
int removeValue(org.ofbiz.core.entity.GenericValue value) throws DataAccessException
DataAccessException
void storeAll(List<org.ofbiz.core.entity.GenericValue> genericValues) throws DataAccessException
DataAccessException
List<org.ofbiz.core.entity.GenericValue> findAll(String s) throws DataAccessException
DataAccessException
List<org.ofbiz.core.entity.GenericValue> findAll(String s, List sortOrder) throws DataAccessException
DataAccessException
void store(org.ofbiz.core.entity.GenericValue gv) throws DataAccessException
DataAccessException
org.ofbiz.core.entity.GenericValue createValue(String entityName, Map<String,Object> fields) throws DataAccessException
entityName
- the entity name.fields
- field values
DataAccessException
- if an error occurs in the Database layermakeValue(String)
org.ofbiz.core.entity.GenericValue makeValue(String entityName)
entityName
- the entity name.
createValue(String, java.util.Map)
org.ofbiz.core.entity.GenericValue findByPrimaryKey(String entityName, Long id) throws DataAccessException
This method is a convenience for entities with a numeric primary key on single field called "id". This is the case for most JIRA entities.
entityName
- The Name of the Entity as defined in the entity XML fileid
- The numeric "id" field value that is the primary key of this entity.
DataAccessException
- DataAccessExceptionfindByPrimaryKey(String, java.util.Map)
org.ofbiz.core.entity.GenericValue findByPrimaryKey(String entityName, Map fields) throws DataAccessException
entityName
- The Name of the Entity as defined in the entity XML filefields
- The field/value pairs of the primary key (in JIRA, mostly just a single field "id")
DataAccessException
- DataAccessExceptionfindByPrimaryKey(String, Long)
List<org.ofbiz.core.entity.GenericValue> getRelated(String relationName, org.ofbiz.core.entity.GenericValue gv) throws DataAccessException
DataAccessException
long getCount(String entityName) throws DataAccessException
entityName
- entity name
DataAccessException
- if data access problems occurOfBizListIterator findListIteratorByCondition(String entityType, org.ofbiz.core.entity.EntityCondition condition) throws DataAccessException
DataAccessException
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) throws DataAccessException
DataAccessException
int bulkUpdateByPrimaryKey(String entityName, Map<String,?> updateValues, List<Long> keys) throws DataAccessException
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.
DataAccessException
- If an error occurs in the persistence layer.int bulkUpdateByAnd(String entityName, Map updateValues, Map criteria) throws DataAccessException
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.
DataAccessException
- If an error occurs in the persistence layer.int bulkCopyColumnValuesByAnd(String entityName, Map updateColumns, Map criteria) throws DataAccessException
entityName
- table na,eupdateColumns
- map of update to - update from columnscriteria
- map of column names and their values that will create WHERE clause
DataAccessException
- If an error occurs in the persistence layer.int removeByOr(String entityName, String entityId, List<Long> ids) throws DataAccessException, org.ofbiz.core.entity.GenericModelException
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
List<org.ofbiz.core.entity.GenericValue> findByCondition(String entityName, org.ofbiz.core.entity.EntityCondition entityCondition, Collection fieldsToSelect, List orderBy) throws DataAccessException
entityName
- The Name of the Entity as defined in the entity model XML fileentityCondition
- The EntityCondition object that specifies how to constrain this queryfieldsToSelect
- The fields of the named entity to get from the database; if empty or null all fields will be retreivedorderBy
- The fields of the named entity to order the query by; optionally add a " ASC" for ascending or " DESC" for descending
DataAccessException
- If an error occurs in the persistence layer.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |