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 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