edu.mssm.crover.webservices.rbde
Interface DS_PersistenceScheme

All Superinterfaces:
PersistenceScheme
All Known Implementing Classes:
DS_PersistenceScheme_JDBC_Impl

public interface DS_PersistenceScheme
extends PersistenceScheme

Interface to support plugable persistence schemes. Three types of persistence schemes are available.

  • The first provides no persistence, this defaults to obtaining newly initialized objects each time the getX method is invoked.
  • The second method uses serialization in files to save the state of each object.
  • The third method uses JDBC to save each object in a JDBC compliant DBMS.


    Field Summary
    static int CUSTOMIZED_DIAGRAM_KIND
              Customized diagram kind.
    static int OWNER_REFERENCE_ID
              Owner reference id for use in the dropLibraryObjectReference to drop owner reference
     
    Fields inherited from interface edu.mssm.crover.scentral.PersistenceScheme
    USER_SESSION_KIND
     
    Method Summary
     int createCustomizedDiagram(UserRecord ur, java.lang.String name, CustomizedDiagram cd, java.lang.String description)
              Creates customized diagriam in persistent storage.
     void dropLibraryObjectReference(int object_id, int reference_object_id, UserRecord ur)
              Drops a reference in the database to this object identified by object_id.
     CustomizedDiagram getCustomizedDiagram(UserRecord ur, int diagram_id)
              Get a CustomizedDiagram from the persitence storage.
     DS_UserSession getDSUserSession(UserRecord ur)
              Retrieve a rbde service session instance.
     LibraryObjectInfo getLibraryObjectInfo(int kind, int library_object_id, UserRecord ur)
              Get a LibraryObjectInfo for a given object kind with the given object ID.
     java.util.Collection getLibraryObjectsInfo(int kind, UserRecord ur)
              Get a collection of instance iterators for browsing purposes.
     void saveDSUserSession(DS_UserSession session)
              Save a rbde service session instance.
     void updateCustomizedDiagram(UserRecord us, int diagram_id, CustomizedDiagram cd, java.lang.String description)
              Updates customized diagriam in persistent storage.
     
    Methods inherited from interface edu.mssm.crover.scentral.PersistenceScheme
    getUserSession, initialize, saveUserSession, userLogsIn
     

    Field Detail

    CUSTOMIZED_DIAGRAM_KIND

    public static final int CUSTOMIZED_DIAGRAM_KIND
    Customized diagram kind.

    See Also:
    Constant Field Values

    OWNER_REFERENCE_ID

    public static final int OWNER_REFERENCE_ID
    Owner reference id for use in the dropLibraryObjectReference to drop owner reference

    See Also:
    Constant Field Values
    Method Detail

    getDSUserSession

    public DS_UserSession getDSUserSession(UserRecord ur)
    Retrieve a rbde service session instance.


    saveDSUserSession

    public void saveDSUserSession(DS_UserSession session)
    Save a rbde service session instance.


    getCustomizedDiagram

    public CustomizedDiagram getCustomizedDiagram(UserRecord ur,
                                                  int diagram_id)
    Get a CustomizedDiagram from the persitence storage.


    createCustomizedDiagram

    public int createCustomizedDiagram(UserRecord ur,
                                       java.lang.String name,
                                       CustomizedDiagram cd,
                                       java.lang.String description)
                                throws BadPersistentID
    Creates customized diagriam in persistent storage.

    Parameters:
    name - name for this diagram.
    cd - The customized diagram to be stored.
    description - The customized diagram description to be stored.
    Throws:
    BadPersistentID - Thrown when the underlying persistence storage mechanism cannot handle such a persistent identifier (possible causes: invalid character, null or empty value, already allocated ID).

    updateCustomizedDiagram

    public void updateCustomizedDiagram(UserRecord us,
                                        int diagram_id,
                                        CustomizedDiagram cd,
                                        java.lang.String description)
                                 throws BadPersistentID
    Updates customized diagriam in persistent storage.

    Parameters:
    diagram_id - unique diagram identifier.
    cd - The customized diagram to be stored.
    description - The customized diagram description to be stored.
    Throws:
    BadPersistentID - Thrown when the underlying persistence storage mechanism cannot handle such a persistent identifier (possible causes: invalid character, null or empty value, ID does not exist).

    dropLibraryObjectReference

    public void dropLibraryObjectReference(int object_id,
                                           int reference_object_id,
                                           UserRecord ur)
    Drops a reference in the database to this object identified by object_id. The object_id referencing the object is reference_object_id. When owner requests to drop an object, the owner is identified by reference_object_id = 0(OWNER_REFERENCE_ID), which could never occur for regular objects. Regular objects have id-s > 0. An object is dropped when all references to it are dropped including the owner reference.

    Specified by:
    dropLibraryObjectReference in interface PersistenceScheme

    getLibraryObjectsInfo

    public java.util.Collection getLibraryObjectsInfo(int kind,
                                                      UserRecord ur)
    Get a collection of instance iterators for browsing purposes.

    Specified by:
    getLibraryObjectsInfo in interface PersistenceScheme
    Returns:
    Collection of LibraryObjectInfo-s.
    See Also:
    LibraryObjectInfo

    getLibraryObjectInfo

    public LibraryObjectInfo getLibraryObjectInfo(int kind,
                                                  int library_object_id,
                                                  UserRecord ur)
    Get a LibraryObjectInfo for a given object kind with the given object ID.

    Specified by:
    getLibraryObjectInfo in interface PersistenceScheme
    Returns:
    LibraryObjectInfo.
    See Also:
    LibraryObjectInfo


    Copyright @ 2003 Mount Sinai School of Medicine. All Rights Reserved.