From 2d4b56a59937729d4c8a896847ccb95ae4e8bd8c Mon Sep 17 00:00:00 2001 From: Scott Gray Date: Wed, 28 Apr 2010 11:30:57 +0000 Subject: [PATCH] The following deprecated classes, constructors or methods have been removed: org.ofbiz.entity.GenericDelegator.findByOr(String, Object...) - Use findList(String, EntityCondition, Set, List, EntityFindOptions, boolean) instead org.ofbiz.entity.GenericDelegator.findByOr(String, Map) - Use findList(String, EntityCondition, Set, List, EntityFindOptions, boolean) instead org.ofbiz.entity.GenericDelegator.findByOr(String, Map, List) - Use findList(String, EntityCondition, Set, List, EntityFindOptions, boolean) instead org.ofbiz.entity.GenericDelegator.findByAndCache(String, Object...) - Use findList(String, EntityCondition, Set, List, EntityFindOptions, boolean) instead org.ofbiz.entity.GenericDelegator.findByLike(String, Object...) - Use findList(String, EntityCondition, Set, List, EntityFindOptions, boolean) instead org.ofbiz.entity.GenericDelegator.findByLike(String, Map) - Use findList(String, EntityCondition, Set, List, EntityFindOptions, boolean) instead org.ofbiz.entity.GenericDelegator.findByLike(String, Map, List) - Use findList(String, EntityCondition, Set, List, EntityFindOptions, boolean) instead org.ofbiz.entity.GenericDelegator.findByCondition(String, EntityCondition, Collection, List) - Use findList(String, EntityCondition, Set, List, EntityFindOptions, boolean) instead org.ofbiz.entity.GenericDelegator.findByCondition(String, EntityCondition, EntityCondition, Collection, List, EntityFindOptions) - Use find(String, EntityCondition, EntityCondition, Set, List, EntityFindOptions) instead org.ofbiz.entity.GenericDelegator.findByConditionCache(String, EntityCondition, Collection, List) - Use findList(String, EntityCondition, Set, List, EntityFindOptions, boolean) instead org.ofbiz.entity.GenericDelegator.findListIteratorByCondition(String, EntityCondition, Collection, List) - Use find(String, EntityCondition, EntityCondition, Set, List, EntityFindOptions) instead org.ofbiz.entity.GenericDelegator.findListIteratorByCondition(String, EntityCondition, EntityCondition, Collection, List, EntityFindOptions) - Use find(String, EntityCondition, EntityCondition, Set, List, EntityFindOptions) instead git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@938950 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/ofbiz/entity/GenericDelegator.java | 153 ------------------ 1 file changed, 153 deletions(-) diff --git a/framework/entity/src/org/ofbiz/entity/GenericDelegator.java b/framework/entity/src/org/ofbiz/entity/GenericDelegator.java index bc9b1dece8..eeca594dda 100644 --- a/framework/entity/src/org/ofbiz/entity/GenericDelegator.java +++ b/framework/entity/src/org/ofbiz/entity/GenericDelegator.java @@ -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 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 findByOr(String entityName, Map 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 findByOr(String entityName, Map fields, List 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 findByAndCache(String entityName, Object... fields) throws GenericEntityException { - return this.findByAndCache(entityName, UtilMisc.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 findByLike(String entityName, Object... fields) throws GenericEntityException { - Map fieldMap = UtilMisc.toMap(fields); - List likeExpressions = FastList.newInstance(); - if (fieldMap != null) { - for (Map.Entry fieldEntry: fieldMap.entrySet()) { - likeExpressions.add(EntityCondition.makeCondition(fieldEntry.getKey(), EntityOperator.LIKE, fieldEntry.getValue())); - } - } - EntityConditionList 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 findByLike(String entityName, Map fields) throws GenericEntityException { - List likeExpressions = FastList.newInstance(); - if (fields != null) { - for (Map.Entry fieldEntry: fields.entrySet()) { - likeExpressions.add(EntityCondition.makeCondition(fieldEntry.getKey(), EntityOperator.LIKE, fieldEntry.getValue())); - } - } - EntityConditionList 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 findByLike(String entityName, Map fields, List orderBy) throws GenericEntityException { - List likeExpressions = FastList.newInstance(); - if (fields != null) { - for (Map.Entry fieldEntry: fields.entrySet()) { - likeExpressions.add(EntityCondition.makeCondition(fieldEntry.getKey(), EntityOperator.LIKE, fieldEntry.getValue())); - } - } - EntityConditionList 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 findByCondition(String entityName, EntityCondition entityCondition, Collection fieldsToSelect, List 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 findByCondition(String entityName, EntityCondition whereEntityCondition, - EntityCondition havingEntityCondition, Collection fieldsToSelect, List 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 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 findByConditionCache(String entityName, EntityCondition entityCondition, Collection fieldsToSelect, List 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 fieldsToSelect, List 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 fieldsToSelect, List 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) */