[cvs]
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj
DBObject.java
JCorporate Ltd
jcorp at jcorp2.servlets.net
Wed May 19 01:22:09 PDT 2004
Update of /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj
In directory jcorp2.servlets.net:/tmp/cvs-serv9575/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/dbobj
Modified Files:
DBObject.java
Log Message:
add javadoc for getFieldInt(); move getLogger() here (from RowSecuredDBObject())
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.192
retrieving revision 1.193
diff -C2 -d -r1.192 -r1.193
*** DBObject.java 10 May 2004 18:34:04 -0000 1.192
--- DBObject.java 19 May 2004 08:22:07 -0000 1.193
***************
*** 100,103 ****
--- 100,104 ----
import com.jcorporate.expresso.services.dbobj.DBObjLimit;
import com.jcorporate.expresso.services.dbobj.Setup;
+ import org.apache.log4j.Category;
import org.apache.log4j.Logger;
import org.apache.oro.text.regex.Pattern;
***************
*** 237,240 ****
--- 238,242 ----
}
};
+ private static Logger slog = null;
/**
***************
*** 3179,3187 ****
*
* @param fieldName Name of a field in this object
! * @return int The value of the field as a int
* @throws DBException if there is no such field or it's value cannot be
* converted to an integer.
*
* @see #setField(String,int)
*/
public int getFieldInt(String fieldName)
--- 3181,3190 ----
*
* @param fieldName Name of a field in this object
! * @return int The value of the field as a int; will return 0 if field is null; throw if underlying string is otherwise non-integer;
* @throws DBException if there is no such field or it's value cannot be
* converted to an integer.
*
* @see #setField(String,int)
+ * @see #isFieldNull(java.lang.String) in order to know if 0 is 'real' or because of an underlying null
*/
public int getFieldInt(String fieldName)
***************
*** 7630,7633 ****
--- 7633,7647 ----
return result;
+ }
+
+ /**
+ * convenience for getting logger for current (sub) class
+ *
+ * @return Category for logging
+ */
+ public Category getLogger() {
+ if (slog == null) slog = Logger.getLogger(getClass().getName());
+
+ return slog;
}
} // dbobject
More information about the cvs
mailing list