org.enhydra.shark.globalpersistence
Class DODSGlobalPersistenceManager

java.lang.Object
  extended by org.enhydra.shark.globalpersistence.DODSGlobalPersistenceManager
All Implemented Interfaces:
GlobalPersistenceManagerInterface

public class DODSGlobalPersistenceManager
extends java.lang.Object
implements GlobalPersistenceManagerInterface

Used to save, restore or delete global engine data objects from database, using DODS persistent layer.

Version:
1.0
Author:
Sasa Bojanic

Field Summary
protected  CallbackUtilities cus
           
protected  com.lutris.appserver.server.sql.LogicalDatabase db
           
protected static short DB_TYPE_BLOB
           
protected static short DB_TYPE_BOOLEAN
           
protected static short DB_TYPE_DATE
           
protected static short DB_TYPE_DOUBLE
           
protected static short DB_TYPE_LONG
           
protected static short DB_TYPE_VCHAR
           
protected static short DB_TYPE_XML
           
protected static java.lang.String LOG_CHANNEL
           
protected static int max_vchar_size
           
protected static int MAX_VCHAR_SIZE_LIMIT
           
protected  boolean storeArraysAsBLOBs
           
 
Constructor Summary
DODSGlobalPersistenceManager()
           
 
Method Summary
protected  com.lutris.appserver.server.sql.DBTransaction __getDBTransaction()
           
 void configure(CallbackUtilities cut)
           
protected  java.lang.Object[] createArray(short vtype, int length)
           
 void delete(WMSessionHandle shandle, GlobalDataPersistenceObject var)
           
 java.util.List getAll(WMSessionHandle shandle)
           
protected  java.util.List getAllBLOB(WMSessionHandle shandle)
           
protected  java.util.List getGlobalDataBLOB(WMSessionHandle shandle, java.lang.String sqlWhere, int startAt, int limit)
           
protected  GlobalDataDO[] getGlobalDataDOArray(java.lang.String sqlWhere, int startAt, int limit)
           
protected  java.lang.Object getGlobalDataValue(WMSessionHandle shandle, GlobalDataDO DO)
           
protected  GlobalDataDO getPersistedGlobalDataObject(java.lang.String dataId)
           
protected  GlobalDataDO[] getPersistedGlobalDataObjects(java.lang.String dataId)
           
protected  GlobalDataDO getPersistedObject(GlobalDataPersistenceObject var)
           
protected  GlobalDataDO[] getPersistedObjects(GlobalDataPersistenceObject var, boolean restore)
           
protected  java.util.List getSortedGlobalDataDOs(GlobalDataDO[] DOs)
           
 java.util.List getWhere(WMSessionHandle shandle, java.lang.String sqlWhere, int startAt, int limit)
           
 void persist(WMSessionHandle shandle, GlobalDataPersistenceObject var)
           
protected  void persistDataBLOB(WMSessionHandle shandle, GlobalDataDO DO, java.lang.Object vv, boolean isInitialPersistence, int ordNo)
           
protected  void persistDataBLOB(WMSessionHandle shandle, GlobalDataPersistenceObject var)
           
protected  void refreshDOCaches()
           
 boolean restore(WMSessionHandle shandle, GlobalDataPersistenceObject var)
           
protected  boolean restoreBLOB(WMSessionHandle shandle, GlobalDataPersistenceObject engineObj, GlobalDataDO[] DOs)
           
protected  void setLDBName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_CHANNEL

protected static final java.lang.String LOG_CHANNEL
See Also:
Constant Field Values

DB_TYPE_BOOLEAN

protected static final short DB_TYPE_BOOLEAN
See Also:
Constant Field Values

DB_TYPE_LONG

protected static final short DB_TYPE_LONG
See Also:
Constant Field Values

DB_TYPE_DOUBLE

protected static final short DB_TYPE_DOUBLE
See Also:
Constant Field Values

DB_TYPE_VCHAR

protected static final short DB_TYPE_VCHAR
See Also:
Constant Field Values

DB_TYPE_DATE

protected static final short DB_TYPE_DATE
See Also:
Constant Field Values

DB_TYPE_BLOB

protected static final short DB_TYPE_BLOB
See Also:
Constant Field Values

DB_TYPE_XML

protected static final short DB_TYPE_XML
See Also:
Constant Field Values

MAX_VCHAR_SIZE_LIMIT

protected static final int MAX_VCHAR_SIZE_LIMIT
See Also:
Constant Field Values

max_vchar_size

protected static int max_vchar_size

cus

protected CallbackUtilities cus

storeArraysAsBLOBs

protected boolean storeArraysAsBLOBs

db

protected com.lutris.appserver.server.sql.LogicalDatabase db
Constructor Detail

DODSGlobalPersistenceManager

public DODSGlobalPersistenceManager()
Method Detail

configure

public void configure(CallbackUtilities cut)
               throws java.lang.Exception
Specified by:
configure in interface GlobalPersistenceManagerInterface
Throws:
java.lang.Exception

persist

public void persist(WMSessionHandle shandle,
                    GlobalDataPersistenceObject var)
             throws java.lang.Exception
Specified by:
persist in interface GlobalPersistenceManagerInterface
Throws:
java.lang.Exception

restore

public boolean restore(WMSessionHandle shandle,
                       GlobalDataPersistenceObject var)
                throws java.lang.Exception
Specified by:
restore in interface GlobalPersistenceManagerInterface
Throws:
java.lang.Exception

delete

public void delete(WMSessionHandle shandle,
                   GlobalDataPersistenceObject var)
            throws java.lang.Exception
Specified by:
delete in interface GlobalPersistenceManagerInterface
Throws:
java.lang.Exception

getAll

public java.util.List getAll(WMSessionHandle shandle)
                      throws java.lang.Exception
Specified by:
getAll in interface GlobalPersistenceManagerInterface
Throws:
java.lang.Exception

getWhere

public java.util.List getWhere(WMSessionHandle shandle,
                               java.lang.String sqlWhere,
                               int startAt,
                               int limit)
                        throws java.lang.Exception
Specified by:
getWhere in interface GlobalPersistenceManagerInterface
Throws:
java.lang.Exception

persistDataBLOB

protected void persistDataBLOB(WMSessionHandle shandle,
                               GlobalDataPersistenceObject var)
                        throws java.lang.Exception
Throws:
java.lang.Exception

persistDataBLOB

protected void persistDataBLOB(WMSessionHandle shandle,
                               GlobalDataDO DO,
                               java.lang.Object vv,
                               boolean isInitialPersistence,
                               int ordNo)
                        throws java.lang.Throwable
Throws:
java.lang.Throwable

restoreBLOB

protected boolean restoreBLOB(WMSessionHandle shandle,
                              GlobalDataPersistenceObject engineObj,
                              GlobalDataDO[] DOs)
                       throws java.lang.Exception
Throws:
java.lang.Exception

getGlobalDataValue

protected java.lang.Object getGlobalDataValue(WMSessionHandle shandle,
                                              GlobalDataDO DO)
                                       throws java.lang.Throwable
Throws:
java.lang.Throwable

createArray

protected java.lang.Object[] createArray(short vtype,
                                         int length)

getAllBLOB

protected java.util.List getAllBLOB(WMSessionHandle shandle)
                             throws java.lang.Exception
Throws:
java.lang.Exception

getSortedGlobalDataDOs

protected java.util.List getSortedGlobalDataDOs(GlobalDataDO[] DOs)
                                         throws java.lang.Throwable
Throws:
java.lang.Throwable

getPersistedObject

protected GlobalDataDO getPersistedObject(GlobalDataPersistenceObject var)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getPersistedGlobalDataObject

protected GlobalDataDO getPersistedGlobalDataObject(java.lang.String dataId)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

getPersistedObjects

protected GlobalDataDO[] getPersistedObjects(GlobalDataPersistenceObject var,
                                             boolean restore)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

getPersistedGlobalDataObjects

protected GlobalDataDO[] getPersistedGlobalDataObjects(java.lang.String dataId)
                                                throws java.lang.Exception
Throws:
java.lang.Exception

getGlobalDataBLOB

protected java.util.List getGlobalDataBLOB(WMSessionHandle shandle,
                                           java.lang.String sqlWhere,
                                           int startAt,
                                           int limit)
                                    throws java.lang.Exception
Throws:
java.lang.Exception

getGlobalDataDOArray

protected GlobalDataDO[] getGlobalDataDOArray(java.lang.String sqlWhere,
                                              int startAt,
                                              int limit)
                                       throws java.lang.Throwable
Throws:
java.lang.Throwable

__getDBTransaction

protected com.lutris.appserver.server.sql.DBTransaction __getDBTransaction()
                                                                    throws java.lang.Exception
Throws:
java.lang.Exception

setLDBName

protected void setLDBName()

refreshDOCaches

protected void refreshDOCaches()
                        throws java.lang.Exception
Throws:
java.lang.Exception