Author: lektran
Date: Wed Apr 28 11:30:57 2010
New Revision: 938950
URL: http://svn.apache.org/viewvc?rev=938950&view=rev
Log:
The following deprecated classes, constructors or methods have been removed:
org.ofbiz.entity.GenericDelegator.findByOr(String, Object...)
- Use findList(String, EntityCondition, Set<String>, List<String>,
EntityFindOptions, boolean) instead
org.ofbiz.entity.GenericDelegator.findByOr(String, Map<String, ? extends
Object>)
- Use findList(String, EntityCondition, Set<String>, List<String>,
EntityFindOptions, boolean) instead
org.ofbiz.entity.GenericDelegator.findByOr(String, Map<String, ? extends
Object>, List<String>)
- Use findList(String, EntityCondition, Set<String>, List<String>,
EntityFindOptions, boolean) instead
org.ofbiz.entity.GenericDelegator.findByAndCache(String, Object...)
- Use findList(String, EntityCondition, Set<String>, List<String>,
EntityFindOptions, boolean) instead
org.ofbiz.entity.GenericDelegator.findByLike(String, Object...)
- Use findList(String, EntityCondition, Set<String>, List<String>,
EntityFindOptions, boolean) instead
org.ofbiz.entity.GenericDelegator.findByLike(String, Map<String, ? extends
Object>)
- Use findList(String, EntityCondition, Set<String>, List<String>,
EntityFindOptions, boolean) instead
org.ofbiz.entity.GenericDelegator.findByLike(String, Map<String, ? extends
Object>, List<String>)
- Use findList(String, EntityCondition, Set<String>, List<String>,
EntityFindOptions, boolean) instead
org.ofbiz.entity.GenericDelegator.findByCondition(String, EntityCondition,
Collection<String>, List<String>)
- Use findList(String, EntityCondition, Set<String>, List<String>,
EntityFindOptions, boolean) instead
org.ofbiz.entity.GenericDelegator.findByCondition(String, EntityCondition,
EntityCondition, Collection<String>, List<String>, EntityFindOptions)
- Use find(String, EntityCondition, EntityCondition, Set<String>, List<String>,
EntityFindOptions) instead
org.ofbiz.entity.GenericDelegator.findByConditionCache(String, EntityCondition,
Collection<String>, List<String>)
- Use findList(String, EntityCondition, Set<String>, List<String>,
EntityFindOptions, boolean) instead
org.ofbiz.entity.GenericDelegator.findListIteratorByCondition(String,
EntityCondition, Collection<String>, List<String>)
- Use find(String, EntityCondition, EntityCondition, Set<String>, List<String>,
EntityFindOptions) instead
org.ofbiz.entity.GenericDelegator.findListIteratorByCondition(String,
EntityCondition, EntityCondition, Collection<String>, List<String>,
EntityFindOptions)
- Use find(String, EntityCondition, EntityCondition, Set<String>, List<String>,
EntityFindOptions) instead
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java?rev=938950&r1=938949&r2=938950&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java
(original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericDelegator.java Wed
Apr 28 11:30:57 2010
@@ -1697,24 +1697,6 @@ public class GenericDelegator implements
}
/* (non-Javadoc)
- * @see org.ofbiz.entity.Delegator#findByOr(java.lang.String,
java.lang.Object)
- */
- @Deprecated
- public List<GenericValue> findByOr(String entityName, Object... fields)
throws GenericEntityException {
- EntityCondition ecl = EntityCondition.makeCondition(EntityOperator.OR,
fields);
- return this.findList(entityName, ecl, null, null, null, false);
- }
-
- /* (non-Javadoc)
- * @see org.ofbiz.entity.Delegator#findByOr(java.lang.String,
java.util.Map)
- */
- @Deprecated
- public List<GenericValue> findByOr(String entityName, Map<String, ?
extends Object> fields) throws GenericEntityException {
- EntityCondition ecl = EntityCondition.makeCondition(fields,
EntityOperator.OR);
- return this.findList(entityName, ecl, null, null, null, false);
- }
-
- /* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findByAnd(java.lang.String,
java.util.Map, java.util.List)
*/
public List<GenericValue> findByAnd(String entityName, Map<String, ?
extends Object> fields, List<String> orderBy) throws GenericEntityException {
@@ -1723,23 +1705,6 @@ public class GenericDelegator implements
}
/* (non-Javadoc)
- * @see org.ofbiz.entity.Delegator#findByOr(java.lang.String,
java.util.Map, java.util.List)
- */
- @Deprecated
- public List<GenericValue> findByOr(String entityName, Map<String, ?
extends Object> fields, List<String> orderBy) throws GenericEntityException {
- EntityCondition ecl = EntityCondition.makeCondition(fields,
EntityOperator.OR);
- return this.findList(entityName, ecl, null, orderBy, null, false);
- }
-
- /* (non-Javadoc)
- * @see org.ofbiz.entity.Delegator#findByAndCache(java.lang.String,
java.lang.Object)
- */
- @Deprecated
- public List<GenericValue> findByAndCache(String entityName, Object...
fields) throws GenericEntityException {
- return this.findByAndCache(entityName, UtilMisc.<String,
Object>toMap(fields));
- }
-
- /* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#findByAndCache(java.lang.String,
java.util.Map)
*/
public List<GenericValue> findByAndCache(String entityName, Map<String, ?
extends Object> fields) throws GenericEntityException {
@@ -1754,124 +1719,6 @@ public class GenericDelegator implements
}
/* (non-Javadoc)
- * @see org.ofbiz.entity.Delegator#findByLike(java.lang.String,
java.lang.Object)
- */
- @Deprecated
- public List<GenericValue> findByLike(String entityName, Object... fields)
throws GenericEntityException {
- Map<String, ? extends Object> fieldMap = UtilMisc.<String,
Object>toMap(fields);
- List<EntityExpr> likeExpressions = FastList.newInstance();
- if (fieldMap != null) {
- for (Map.Entry<String, ? extends Object> fieldEntry:
fieldMap.entrySet()) {
-
likeExpressions.add(EntityCondition.makeCondition(fieldEntry.getKey(),
EntityOperator.LIKE, fieldEntry.getValue()));
- }
- }
- EntityConditionList<EntityExpr> ecl =
EntityCondition.makeCondition(likeExpressions, EntityOperator.AND);
- return this.findList(entityName, ecl, null, null, null, false);
- }
-
- /* (non-Javadoc)
- * @see org.ofbiz.entity.Delegator#findByLike(java.lang.String,
java.util.Map)
- */
- @Deprecated
- public List<GenericValue> findByLike(String entityName, Map<String, ?
extends Object> fields) throws GenericEntityException {
- List<EntityExpr> likeExpressions = FastList.newInstance();
- if (fields != null) {
- for (Map.Entry<String, ? extends Object> fieldEntry:
fields.entrySet()) {
-
likeExpressions.add(EntityCondition.makeCondition(fieldEntry.getKey(),
EntityOperator.LIKE, fieldEntry.getValue()));
- }
- }
- EntityConditionList<EntityExpr> ecl =
EntityCondition.makeCondition(likeExpressions, EntityOperator.AND);
- return this.findList(entityName, ecl, null, null, null, false);
- }
-
- /* (non-Javadoc)
- * @see org.ofbiz.entity.Delegator#findByLike(java.lang.String,
java.util.Map, java.util.List)
- */
- @Deprecated
- public List<GenericValue> findByLike(String entityName, Map<String, ?
extends Object> fields, List<String> orderBy) throws GenericEntityException {
- List<EntityExpr> likeExpressions = FastList.newInstance();
- if (fields != null) {
- for (Map.Entry<String, ? extends Object> fieldEntry:
fields.entrySet()) {
-
likeExpressions.add(EntityCondition.makeCondition(fieldEntry.getKey(),
EntityOperator.LIKE, fieldEntry.getValue()));
- }
- }
- EntityConditionList<EntityExpr> ecl =
EntityCondition.makeCondition(likeExpressions, EntityOperator.AND);
- return this.findList(entityName, ecl, null, orderBy, null, false);
- }
-
- /* (non-Javadoc)
- * @see org.ofbiz.entity.Delegator#findByCondition(java.lang.String,
org.ofbiz.entity.condition.EntityCondition, java.util.Collection,
java.util.List)
- */
- @Deprecated
- public List<GenericValue> findByCondition(String entityName,
EntityCondition entityCondition, Collection<String> fieldsToSelect,
List<String> orderBy) throws GenericEntityException {
- return this.findList(entityName, entityCondition,
UtilMisc.toSet(fieldsToSelect), orderBy, null, false);
- }
-
- /* (non-Javadoc)
- * @see org.ofbiz.entity.Delegator#findByCondition(java.lang.String,
org.ofbiz.entity.condition.EntityCondition,
org.ofbiz.entity.condition.EntityCondition, java.util.Collection,
java.util.List, org.ofbiz.entity.util.EntityFindOptions)
- */
- @Deprecated
- public List<GenericValue> findByCondition(String entityName,
EntityCondition whereEntityCondition,
- EntityCondition havingEntityCondition, Collection<String>
fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions)
- throws GenericEntityException {
- boolean beganTransaction = false;
- try {
- if (alwaysUseTransaction) {
- beganTransaction = TransactionUtil.begin();
- }
-
- EntityListIterator eli = this.find(entityName,
whereEntityCondition, havingEntityCondition, UtilMisc.toSet(fieldsToSelect),
orderBy, findOptions);
- eli.setDelegator(this);
- List<GenericValue> list = eli.getCompleteList();
- eli.close();
-
- return list;
- } catch (GenericEntityException e) {
- String errMsg = "Failure in findByCondition operation for entity
[" + entityName + "]: " + e.toString() + ". Rolling back transaction.";
- Debug.logError(e, errMsg, module);
- try {
- // only rollback the transaction if we started one...
- TransactionUtil.rollback(beganTransaction, errMsg, e);
- } catch (GenericEntityException e2) {
- Debug.logError(e2, "[GenericDelegator] Could not rollback
transaction: " + e2.toString(), module);
- }
- // after rolling back, rethrow the exception
- throw e;
- } finally {
- // only commit the transaction if we started one... this will
throw an exception if it fails
- TransactionUtil.commit(beganTransaction);
- }
- }
-
- /* (non-Javadoc)
- * @see org.ofbiz.entity.Delegator#findByConditionCache(java.lang.String,
org.ofbiz.entity.condition.EntityCondition, java.util.Collection,
java.util.List)
- */
- @Deprecated
- public List<GenericValue> findByConditionCache(String entityName,
EntityCondition entityCondition, Collection<String> fieldsToSelect,
List<String> orderBy) throws GenericEntityException {
- return this.findList(entityName, entityCondition,
UtilMisc.collectionToSet(fieldsToSelect), orderBy, null, true);
- }
-
- /* (non-Javadoc)
- * @see
org.ofbiz.entity.Delegator#findListIteratorByCondition(java.lang.String,
org.ofbiz.entity.condition.EntityCondition, java.util.Collection,
java.util.List)
- */
- @Deprecated
- public EntityListIterator findListIteratorByCondition(String entityName,
EntityCondition entityCondition,
- Collection<String> fieldsToSelect, List<String> orderBy) throws
GenericEntityException {
- return this.find(entityName, entityCondition, null,
UtilMisc.collectionToSet(fieldsToSelect), orderBy, null);
- }
-
- /* (non-Javadoc)
- * @see
org.ofbiz.entity.Delegator#findListIteratorByCondition(java.lang.String,
org.ofbiz.entity.condition.EntityCondition,
org.ofbiz.entity.condition.EntityCondition, java.util.Collection,
java.util.List, org.ofbiz.entity.util.EntityFindOptions)
- */
- @Deprecated
- public EntityListIterator findListIteratorByCondition(String entityName,
EntityCondition whereEntityCondition,
- EntityCondition havingEntityCondition, Collection<String>
fieldsToSelect, List<String> orderBy, EntityFindOptions findOptions)
- throws GenericEntityException {
-
- return this.find(entityName, whereEntityCondition,
havingEntityCondition, UtilMisc.collectionToSet(fieldsToSelect), orderBy,
findOptions);
- }
-
- /* (non-Javadoc)
* @see org.ofbiz.entity.Delegator#find(java.lang.String,
org.ofbiz.entity.condition.EntityCondition,
org.ofbiz.entity.condition.EntityCondition, java.util.Set, java.util.List,
org.ofbiz.entity.util.EntityFindOptions)
*/
public EntityListIterator find(String entityName, EntityCondition
whereEntityCondition,