edu.mssm.crover.webservices.rbde
Class DS_PersistenceScheme_JDBC_Impl

java.lang.Object
  |
  +--edu.mssm.crover.scentral.PersistenceScheme_JDBC_Impl
        |
        +--edu.mssm.crover.webservices.rbde.DS_PersistenceScheme_JDBC_Impl
All Implemented Interfaces:
DS_PersistenceScheme, PersistenceScheme

public class DS_PersistenceScheme_JDBC_Impl
extends PersistenceScheme_JDBC_Impl
implements DS_PersistenceScheme

JDBCsistence scheme. This scheme relies on JDBC compliant database to save the state of each object.


Field Summary
static java.lang.String DATABASE_DIAGRAM_KIND_STRING
           
static java.lang.String latestDiagramClassName
           
 
Fields inherited from class edu.mssm.crover.scentral.PersistenceScheme_JDBC_Impl
log, sc
 
Fields inherited from interface edu.mssm.crover.webservices.rbde.DS_PersistenceScheme
CUSTOMIZED_DIAGRAM_KIND, OWNER_REFERENCE_ID
 
Fields inherited from interface edu.mssm.crover.scentral.PersistenceScheme
USER_SESSION_KIND
 
Constructor Summary
DS_PersistenceScheme_JDBC_Impl()
           
 
Method Summary
 int createCustomizedDiagram(UserRecord ur, java.lang.String name, CustomizedDiagram cd, java.lang.String description)
          Create customized diagram in persistent storage.
 UserSession createServiceUserSession(UserRecord ur)
          Returns a new instance of the service UserSession implementation.
 CustomizedDiagram getCustomizedDiagram(UserRecord ur, int diagram_id)
          Get a CustomizedDiagram from the persistence storage.
 DS_UserSession getDSUserSession(UserRecord ur)
          Returns a previously serialized object or a new one if none exists.
 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 LibraryObjectInfo-s.
 java.lang.String getPutSessionProcedure()
          Returns the name of the procedure to obtain a session.
 java.lang.String getSessionTableName()
          Returns the name of the table that stores user sessions.
 void saveDSUserSession(DS_UserSession session)
          Serializes the object in a file and keep track of it.
 void updateCustomizedDiagram(UserRecord ur, int diagram_id, CustomizedDiagram cd, java.lang.String description)
          Update customized diagram in persistent storage.
 
Methods inherited from class edu.mssm.crover.scentral.PersistenceScheme_JDBC_Impl
byteToString, dropLibraryObjectReference, getInstance, getUserSession, initialize, insertSerializableLibraryObject, log, saveUserSession, storeInstance, updateSerializableLibraryObject, upgradeObject, userLogsIn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.mssm.crover.webservices.rbde.DS_PersistenceScheme
dropLibraryObjectReference
 
Methods inherited from interface edu.mssm.crover.scentral.PersistenceScheme
getUserSession, initialize, saveUserSession, userLogsIn
 

Field Detail

DATABASE_DIAGRAM_KIND_STRING

public static final java.lang.String DATABASE_DIAGRAM_KIND_STRING
See Also:
Constant Field Values

latestDiagramClassName

public static java.lang.String latestDiagramClassName
Constructor Detail

DS_PersistenceScheme_JDBC_Impl

public DS_PersistenceScheme_JDBC_Impl()
Method Detail

getDSUserSession

public DS_UserSession getDSUserSession(UserRecord ur)
Returns a previously serialized object or a new one if none exists. When userID is "guest" the user session returned is a newly constructed one.

Specified by:
getDSUserSession in interface DS_PersistenceScheme

createServiceUserSession

public UserSession createServiceUserSession(UserRecord ur)
Description copied from class: PersistenceScheme_JDBC_Impl
Returns a new instance of the service UserSession implementation.

Specified by:
createServiceUserSession in class PersistenceScheme_JDBC_Impl

getPutSessionProcedure

public java.lang.String getPutSessionProcedure()
Returns the name of the procedure to obtain a session.

Specified by:
getPutSessionProcedure in class PersistenceScheme_JDBC_Impl

getSessionTableName

public java.lang.String getSessionTableName()
Description copied from class: PersistenceScheme_JDBC_Impl
Returns the name of the table that stores user sessions.

Specified by:
getSessionTableName in class PersistenceScheme_JDBC_Impl

saveDSUserSession

public void saveDSUserSession(DS_UserSession session)
Serializes the object in a file and keep track of it. When userID is "guest" the user session the user session is not saved.

Specified by:
saveDSUserSession in interface DS_PersistenceScheme

getCustomizedDiagram

public CustomizedDiagram getCustomizedDiagram(UserRecord ur,
                                              int diagram_id)
Get a CustomizedDiagram from the persistence storage. Returns always the latest version of CustomizedDiagram

Specified by:
getCustomizedDiagram in interface DS_PersistenceScheme

createCustomizedDiagram

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

Specified by:
createCustomizedDiagram in interface DS_PersistenceScheme
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 ur,
                                    int diagram_id,
                                    CustomizedDiagram cd,
                                    java.lang.String description)
                             throws BadPersistentID
Update customized diagram in persistent storage.

Specified by:
updateCustomizedDiagram in interface DS_PersistenceScheme
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).

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 DS_PersistenceScheme
Overrides:
getLibraryObjectInfo in class PersistenceScheme_JDBC_Impl
Returns:
LibraryObjectInfo.
See Also:
LibraryObjectInfo

getLibraryObjectsInfo

public java.util.Collection getLibraryObjectsInfo(int kind,
                                                  UserRecord ur)
Get a collection of LibraryObjectInfo-s.

Specified by:
getLibraryObjectsInfo in interface DS_PersistenceScheme
Overrides:
getLibraryObjectsInfo in class PersistenceScheme_JDBC_Impl
Returns:
Vector of LibraryObjectInfo-s.
See Also:
LibraryObjectInfo


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