|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--edu.mssm.crover.scentral.PersistenceScheme_JDBC_Impl
JDBCsistence scheme. This scheme relies on JDBC compliant database to save the state of each object.
| Field Summary | |
protected static java.lang.String |
DATABASE_DIAGRAM_KIND_STRING
|
protected Log |
log
|
protected ServletCentral |
sc
|
| Fields inherited from interface edu.mssm.crover.scentral.PersistenceScheme |
OWNER_REFERENCE_ID, USER_SESSION_KIND |
| Constructor Summary | |
PersistenceScheme_JDBC_Impl()
|
|
| Method Summary | |
java.lang.String |
byteToString(byte b)
Converts a byte to a two character hexadecimal string representation. |
abstract UserSession |
createServiceUserSession(UserRecord ur)
Returns a new instance of the service UserSession implementation. |
void |
dropLibraryObjectReference(int object_id,
int reference_object_id,
UserRecord ur)
Drops a reference in the database to this object identified by object_id. |
protected java.lang.Object |
getInstance(java.lang.String query)
Get an instance from the storage directory. |
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. |
abstract java.lang.String |
getPutSessionProcedure()
Returns the name of the procedure to obtain a session. |
abstract java.lang.String |
getSessionTableName()
Returns the name of the table that stores user sessions. |
UserSession |
getUserSession(UserRecord ur)
Returns a previously serialized object or a new one if none exists. |
void |
initialize(Log log)
Initialized a PersistenceScheme_JDBC_Impl. |
protected int |
insertSerializableLibraryObject(java.lang.String query,
java.lang.String userID,
java.lang.String name,
java.io.Serializable library_object,
java.sql.Date created,
java.sql.Date last_modified,
java.lang.String description,
java.lang.String object_kind)
|
void |
log(int level,
java.lang.String msg,
java.lang.Exception e)
|
void |
saveUserSession(UserSession session)
Serializes the object in a file and keep track of it. |
protected void |
storeInstance(java.lang.String query,
java.lang.String userID,
java.io.Serializable instance)
Save an instance as a file in the storage directory. |
protected void |
updateSerializableLibraryObject(java.lang.String query,
int object_id,
java.io.Serializable library_object,
java.sql.Date last_modified,
java.lang.String description)
|
UpgradableObject |
upgradeObject(UpgradableObject original_object,
java.lang.Class current_class)
Upgrades an UpgradableObject instance. |
void |
userLogsIn(UserRecord ur,
java.util.Date loginTime)
Signal the storage that the user has logged in. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Log log
protected ServletCentral sc
protected static final java.lang.String DATABASE_DIAGRAM_KIND_STRING
| Constructor Detail |
public PersistenceScheme_JDBC_Impl()
| Method Detail |
public void initialize(Log log)
initialize in interface PersistenceSchemelog - The log system where warnings and errors are reported.public UserSession getUserSession(UserRecord ur)
getUserSession in interface PersistenceSchemepublic abstract UserSession createServiceUserSession(UserRecord ur)
public abstract java.lang.String getSessionTableName()
public abstract java.lang.String getPutSessionProcedure()
public void saveUserSession(UserSession session)
saveUserSession in interface PersistenceSchemepublic java.lang.String byteToString(byte b)
protected java.lang.Object getInstance(java.lang.String query)
public void log(int level,
java.lang.String msg,
java.lang.Exception e)
protected void storeInstance(java.lang.String query,
java.lang.String userID,
java.io.Serializable instance)
public void dropLibraryObjectReference(int object_id,
int reference_object_id,
UserRecord ur)
dropLibraryObjectReference in interface PersistenceScheme
public LibraryObjectInfo getLibraryObjectInfo(int kind,
int library_object_id,
UserRecord ur)
getLibraryObjectInfo in interface PersistenceSchemeLibraryObjectInfo
public java.util.Collection getLibraryObjectsInfo(int kind,
UserRecord ur)
getLibraryObjectsInfo in interface PersistenceSchemeLibraryObjectInfo
protected int insertSerializableLibraryObject(java.lang.String query,
java.lang.String userID,
java.lang.String name,
java.io.Serializable library_object,
java.sql.Date created,
java.sql.Date last_modified,
java.lang.String description,
java.lang.String object_kind)
throws BadPersistentID
BadPersistentID
protected void updateSerializableLibraryObject(java.lang.String query,
int object_id,
java.io.Serializable library_object,
java.sql.Date last_modified,
java.lang.String description)
throws BadPersistentID
BadPersistentID
public void userLogsIn(UserRecord ur,
java.util.Date loginTime)
PersistenceScheme
userLogsIn in interface PersistenceScheme
public UpgradableObject upgradeObject(UpgradableObject original_object,
java.lang.Class current_class)
original_object - The instance to be upgraded.current_class - The class that represents the latest version of the UpgradableObject.UpgradableObject
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||