Package org.apache.torque.om
Interface Persistent
-
- All Superinterfaces:
ObjectModel
public interface Persistent extends ObjectModel
This interface defines methods related to saving an object- Version:
- $Id: Persistent.java 1754260 2016-07-27 12:26:53Z tv $
- Author:
- John D. McNally, Fedor K.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsave()Saves the object.voidsave(String dbName)Stores the object in the database.voidsave(Connection con)Stores the object in the database.-
Methods inherited from interface org.apache.torque.om.ObjectModel
getPrimaryKey, isModified, isNew, setModified, setNew, setPrimaryKey, setPrimaryKey
-
-
-
-
Method Detail
-
save
void save() throws Exception
Saves the object.- Throws:
Exception- This method might throw an exception
-
save
void save(String dbName) throws Exception
Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed.- Parameters:
dbName- the name of the database- Throws:
Exception- This method might throw an exception
-
save
void save(Connection con) throws Exception
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- Parameters:
con- the Connection used to store the object- Throws:
Exception- This method might throw an exception
-
-