Author: doogie
Date: Tue May 29 04:20:19 2012
New Revision: 1343526
URL: http://svn.apache.org/viewvc?rev=1343526&view=rev
Log:
Deprecate all GenericValue.getRelated and GenericValue.getRelatedCache,
and add a version that takes a cache parameter.
Continuing the simplication of the entity api, this is the final step to
replacing all the GenericValue.getRelated(and cache versions as well)
with a variant that takes a boolean useCache parameter.
GenericValue.getRelated(String) is replaced by
GenericValue.getRelated(String, Map, List, boolean).
GenericValue.getRelated(String, List) is replaced by
GenericValue.getRelated(String, Map, List, boolean).
GenericValue.getRelated(String, Map, List) is replaced by
GenericValue.getRelated(String, Map, List, boolean).
GenericValue.getRelatedCache(String) is replaced by
GenericValue.getRelated(String, Map, List, boolean).
GenericValue.getRelatedCache(String, Map, List) is replaced by
GenericValue.getRelated(String, Map, List, boolean).
Modified:
ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValue.java
Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValue.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValue.java?rev=1343526&r1=1343525&r2=1343526&view=diff
==============================================================================
--- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValue.java
(original)
+++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/GenericValue.java Tue May
29 04:20:19 2012
@@ -165,7 +165,9 @@ public class GenericValue extends Generi
/** Get the named Related Entity for the GenericValue from the persistent
store
*@param relationName String containing the relation name which is the
combination of relation.title and relation.rel-entity-name as specified in the
entity XML definition file
*@return List of GenericValue instances as specified in the relation
definition
+ *@deprecated use {@link #getRelated(String, Map, List, boolean)}
*/
+ @Deprecated
public List<GenericValue> getRelated(String relationName) throws
GenericEntityException {
return this.getDelegator().getRelated(relationName, null, null, this,
false);
}
@@ -175,7 +177,9 @@ public class GenericValue extends Generi
* @param orderBy The fields of the named entity to order the query by;
may be null;
* optionally add a " ASC" for ascending or " DESC" for descending
*@return List of GenericValue instances as specified in the relation
definition
+ *@deprecated use {@link #getRelated(String, Map, List, boolean)}
*/
+ @Deprecated
public List<GenericValue> getRelated(String relationName, List<String>
orderBy) throws GenericEntityException {
return this.getDelegator().getRelated(relationName, FastMap.<String,
Object>newInstance(), orderBy, this, false);
}
@@ -186,7 +190,9 @@ public class GenericValue extends Generi
* @param orderBy The fields of the named entity to order the query by;
may be null;
* optionally add a " ASC" for ascending or " DESC" for descending
*@return List of GenericValue instances as specified in the relation
definition
+ *@deprecated use {@link #getRelated(String, Map, List, boolean)}
*/
+ @Deprecated
public List<GenericValue> getRelated(String relationName, Map<String, ?
extends Object> byAndFields, List<String> orderBy) throws
GenericEntityException {
return this.getDelegator().getRelated(relationName, byAndFields,
orderBy, this, false);
}
@@ -195,7 +201,9 @@ public class GenericValue extends Generi
* store, looking first in the global generic cache (for the moment this
isn't true, is same as EmbeddedCache variant)
*@param relationName String containing the relation name which is the
combination of relation.title and relation.rel-entity-name as specified in the
entity XML definition file
*@return List of GenericValue instances as specified in the relation
definition
+ *@deprecated use {@link #getRelated(String, Map, List, boolean)}
*/
+ @Deprecated
public List<GenericValue> getRelatedCache(String relationName) throws
GenericEntityException {
return this.getDelegator().getRelated(relationName, null, null, this,
true);
}
@@ -247,7 +255,9 @@ public class GenericValue extends Generi
* @param orderBy The fields of the named entity to order the query by;
may be null;
* optionally add a " ASC" for ascending or " DESC" for descending
*@return List of GenericValue instances as specified in the relation
definition
+ *@deprecated use {@link #getRelated(String, Map, List, boolean)}
*/
+ @Deprecated
public List<GenericValue> getRelatedCache(String relationName, Map<String,
? extends Object> byAndFields, List<String> orderBy) throws
GenericEntityException {
return this.getDelegator().getRelated(relationName, byAndFields,
orderBy, this, true);
}
@@ -258,7 +268,9 @@ public class GenericValue extends Generi
* @param orderBy The fields of the named entity to order the query by;
may be null;
* optionally add a " ASC" for ascending or " DESC" for descending
*@return List of GenericValue instances as specified in the relation
definition
+ *@deprecated use {@link #getRelated(String, Map, List, boolean)}
*/
+ @Deprecated
public List<GenericValue> getRelatedCache(String relationName,
List<String> orderBy) throws GenericEntityException {
return this.getDelegator().getRelated(relationName, null, orderBy,
this, true);
}