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

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@938950 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Scott Gray
2010-04-28 11:30:57 +00:00
parent 28b1ea8962
commit 2d4b56a599
@@ -1696,24 +1696,6 @@ public class GenericDelegator implements Delegator {
return this.findList(entityName, ecl, null, null, null, false);
}
/* (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)
*/
@@ -1722,23 +1704,6 @@ public class GenericDelegator implements Delegator {
return this.findList(entityName, ecl, null, orderBy, null, false);
}
/* (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)
*/
@@ -1753,124 +1718,6 @@ public class GenericDelegator implements Delegator {
return this.findList(entityName, EntityCondition.makeCondition(fields), null, orderBy, null, true);
}
/* (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)
*/