[cvs] expresso commit by lhamel: change method name
JCorporate Ltd
jcorp at jcorporate.com
Mon Feb 21 17:30:40 UTC 2005
Log Message:
-----------
change method name
Modified Files:
--------------
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj:
DBObject.java
Revision Data
-------------
Index: DBObject.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java,v
retrieving revision 1.242
retrieving revision 1.243
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java -u -r1.242 -r1.243
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj/DBObject.java
@@ -7958,25 +7958,33 @@
}
/**
- * get actual cached object, which is flagged to be immutable. efficient for read-only
- * situations where you want to avoid making a new copy of the object.
+ * get object which which is flagged to be immutable (read-only). efficient for read-only
+ * uses because the actual cached item is returned without making a copy. will retrieve
+ * record from database if necessary.
+ * All PK (primary keys) must be provided in a single parameter, in format like "getKey()".
+ * This method has instance method equivalent: fetchImmut()
*
+ * @see DBObject#fetchImmut()
* @see DBObject#getKey()
* @param dbobjClass class of desired DBObject
* @param keyValues String combination of all PK values (see getKey())
+ * @return DBObject of class specified, or null if record with key not found.
*/
- public static DBObject getImmutableCachedObject(Class dbobjClass, String keyValues) {
- return cacheUtils.getImmutableCachedObject(dbobjClass, keyValues);
+ public static DBObject fetchImmutable(Class dbobjClass, String keyValues) {
+ return cacheUtils.fetchImmutable(dbobjClass, keyValues);
}
/**
- * get actual cached object, which is flagged to be immutable. efficient for read-only
- * situations where you want to avoid making a new copy of the object.
+ * get object which which is flagged to be immutable (read-only). efficient for read-only
+ * uses because the actual cached item is returned without making a copy. will retrieve
+ * record from database if necessary.
+ * All PK (primary keys) must be set.
+ * This method has static method equivalent: fetchImmutable()
*
* @see DBObject#getKey()
- * @param keyValues String combination of all PK values (see getKey())
+ * @return DBObject of subclass the same as the calling class, or null if key not found.
*/
- public DBObject getImmutableObjectFromCache(String keyValues) {
- return cacheUtils.getImmutableCachedObject(getClass(), keyValues);
+ public DBObject fetchImmut() {
+ return cacheUtils.fetchImmutable(getClass(), getKey());
}
} // dbobject
More information about the cvs
mailing list