You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by fe...@apache.org on 2001/09/03 08:01:48 UTC
cvs commit: jakarta-turbine-2/src/java/org/apache/turbine/om BaseObject.java
fedor 01/09/02 23:01:48
Modified: src/java/org/apache/turbine/om BaseObject.java
Log:
implementing save(..) methods from Persistent in BaseObject since some classes do not implement them.
Revision Changes Path
1.2 +24 -1 jakarta-turbine-2/src/java/org/apache/turbine/om/BaseObject.java
Index: BaseObject.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-2/src/java/org/apache/turbine/om/BaseObject.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- BaseObject.java 2001/08/16 05:08:38 1.1
+++ BaseObject.java 2001/09/03 06:01:48 1.2
@@ -54,6 +54,8 @@
* <http://www.apache.org/>.
*/
+import org.apache.turbine.util.db.pool.DBConnection;
+
import java.io.Serializable;
import java.math.BigDecimal;
@@ -63,7 +65,7 @@
*
* @author <a href="mailto:frank.kim@clearink.com">Frank Y. Kim</a>
* @author <a href="mailto:john.mcnally@clearink.com">John D. McNally</a>
- * @version $Id: BaseObject.java,v 1.1 2001/08/16 05:08:38 jvanzyl Exp $
+ * @version $Id: BaseObject.java,v 1.2 2001/09/03 06:01:48 fedor Exp $
*/
public abstract class BaseObject implements Persistent, Serializable
{
@@ -403,6 +405,27 @@
}
return ok.hashCode();
+ }
+
+ /**
+ * Stores the object in the database. If the object is new,
+ * it inserts it; otherwise an update is performed.
+ */
+ public void save(String dbName) throws Exception
+ {
+ throw new UnsupportedOperationException("Method must be implemented if called");
+ }
+
+ /**
+ * Stores the object in the database. If the object is new,
+ * it inserts it; otherwise an update is performed. This method
+ * is meant to be used as part of a transaction, otherwise use
+ * the save() method and the connection details will be handled
+ * internally
+ */
+ public void save(DBConnection dbCon) throws Exception
+ {
+ throw new UnsupportedOperationException("Method must be implemented if called");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org