Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Package Attributes | Static Package Attributes

com.cosylab.cdb.jdal.HibernateWDALImpl Class Reference

Inheritance diagram for com.cosylab.cdb.jdal.HibernateWDALImpl:
com.cosylab.cdb.jdal.Recoverer

List of all members.

Classes

class  ComponentDAOImplSaver
class  SchemaResourceResolverLoader

Public Member Functions

 HibernateWDALImpl (String args[], ORB orb, POA poa, Logger logger)
String[] getSubNodes (DAL dal, String subnode) throws Throwable
void bindNonExpandedComponentXMLToAlmaBranch (Session session, Map< String, Object > parentMap, alma.TMCDB.maci.Component component)
List getListForConfiguration (Session session, Class type) throws Throwable
Map< String, Object > getTableMap (Session session, String keyField, Class type)
Map< String, Object > getComponentsTableMap ()
Map< String, Object > getContainersTableMap ()
Object getChannelsTableMap ()
DAO get_DAO_Servant (String curl) throws CDBXMLErrorEx, CDBRecordDoesNotExistEx
String get_DAO (String curl) throws CDBXMLErrorEx, CDBRecordDoesNotExistEx
String list_nodes (String curl)
String list_daos (String name)
String configuration_name ()
void add_node (String curl, String xml) throws CDBExceptionEx, CDBXMLErrorEx, CDBRecordAlreadyExistsEx
void remove_node (String curl) throws CDBRecordIsReadOnlyEx, CDBRecordDoesNotExistEx
WDAO get_WDAO_Servant (String curl) throws CDBRecordIsReadOnlyEx, CDBXMLErrorEx, CDBRecordDoesNotExistEx
void set_DAO (String curl, String xml) throws CDBFieldDoesNotExistEx, CDBRecordIsReadOnlyEx, CDBExceptionEx, CDBXMLErrorEx, CDBRecordDoesNotExistEx
void saveChanges (String curl, Map propertyMap) throws CDBXMLErrorEx, CDBExceptionEx, CDBFieldDoesNotExistEx, CDBRecordDoesNotExistEx
void recoverClients ()
void shutdown ()
void loadListeners ()
boolean saveListeners ()
int add_change_listener (DALChangeListener listener)
void listen_for_changes (String curl, int listenerID)
void remove_change_listener (int listenerID)
void clear_cache (String curl)
void clear_cache_all ()

Protected Member Functions

boolean loadXMLCDB (String args[], ORB orb, POA poa, String configName)
Map< String, Object > getAlmaBranch ()
void bindToAlmaBranch (Map< String, Object > parentMap, String name, String path, Object objectToBind)
synchronized void initializeRootNode ()
String listNodes (String curl, boolean daosOnly)
void object_changed (String curl)
File getStorageFile ()
void cleanListenedCurls ()

Protected Attributes

String configName = null
int configId = -1
Configuration config = null
final HibernateUtil hibernateUtil
final HibernateDBUtil hibernateDBUtil
volatile Session mainSession = null
boolean loadXMLCDB = false
boolean createTables = false
boolean forceInMemory = false
String[] args
ORB orb
POA poa
final Logger m_logger
volatile Object rootNode
SAXParser saxParser
LSParser parser
LSInput input
LSOutput output
DOMImplementationLS domImplementationLS
SchemaResourceResolverLoader schemaResourceResolverLoader
HibernateWDALPlugin plugin

Package Attributes

final int NULL_ID = 0
volatile boolean firstTime = true

Static Package Attributes

static final String TMCDB_CONFIGURATION_NAME_KEY = "TMCDB_CONFIGURATION_NAME"
static final String TMCDB_COMPONENT_TREE_NAME_KEY = "TMCDB_COMPONENT_TREE_NAME"
static final String COMPONENT_TREE_NAME = System.getProperty(TMCDB_COMPONENT_TREE_NAME_KEY, "alma")
static final boolean TMCDB_ACS_ONLY = Boolean.getBoolean("cdb_rdb.acsOnly")
static final String DUMMY_CONTAINER_FLAG = "dummy"

Detailed Description

WDAL implementation for hibernate w/ DOMJavaClassInspector.

Author:
msekoranja

Constructor & Destructor Documentation

com.cosylab.cdb.jdal.HibernateWDALImpl.HibernateWDALImpl ( String  args[],
ORB  orb,
POA  poa,
Logger  logger 
)

ctor that takes all command line args given to OracleServer

Parameters:
args 
orb_val 
poa_val 

References com.cosylab.cdb.jdal.hibernate.HibernateUtil.getInstance(), and com.cosylab.cdb.jdal.hibernate.HibernateDBUtil.setUp().


Member Function Documentation

int com.cosylab.cdb.jdal.HibernateWDALImpl.add_change_listener ( DALChangeListener  listener  ) 
void com.cosylab.cdb.jdal.HibernateWDALImpl.add_node ( String  curl,
String  xml 
) throws CDBExceptionEx, CDBXMLErrorEx, CDBRecordAlreadyExistsEx
void com.cosylab.cdb.jdal.HibernateWDALImpl.bindNonExpandedComponentXMLToAlmaBranch ( Session  session,
Map< String, Object >  parentMap,
alma.TMCDB.maci.Component  component 
)
void com.cosylab.cdb.jdal.HibernateWDALImpl.bindToAlmaBranch ( Map< String, Object >  parentMap,
String  name,
String  path,
Object  objectToBind 
) [protected]
void com.cosylab.cdb.jdal.HibernateWDALImpl.cleanListenedCurls (  )  [protected]

Cleans listened curls from invalid listeners to avoid repeatedly calling invalid listeners

void com.cosylab.cdb.jdal.HibernateWDALImpl.clear_cache ( String  curl  ) 
void com.cosylab.cdb.jdal.HibernateWDALImpl.clear_cache_all (  ) 
String com.cosylab.cdb.jdal.HibernateWDALImpl.configuration_name (  ) 
String com.cosylab.cdb.jdal.HibernateWDALImpl.get_DAO ( String  curl  )  throws CDBXMLErrorEx, CDBRecordDoesNotExistEx
DAO com.cosylab.cdb.jdal.HibernateWDALImpl.get_DAO_Servant ( String  curl  )  throws CDBXMLErrorEx, CDBRecordDoesNotExistEx
WDAO com.cosylab.cdb.jdal.HibernateWDALImpl.get_WDAO_Servant ( String  curl  )  throws CDBRecordIsReadOnlyEx, CDBXMLErrorEx, CDBRecordDoesNotExistEx
Map<String, Object> com.cosylab.cdb.jdal.HibernateWDALImpl.getComponentsTableMap (  ) 
Map<String, Object> com.cosylab.cdb.jdal.HibernateWDALImpl.getContainersTableMap (  ) 
List com.cosylab.cdb.jdal.HibernateWDALImpl.getListForConfiguration ( Session  session,
Class  type 
) throws Throwable
File com.cosylab.cdb.jdal.HibernateWDALImpl.getStorageFile (  )  [protected]
Returns:
File
String [] com.cosylab.cdb.jdal.HibernateWDALImpl.getSubNodes ( DAL  dal,
String  subnode 
) throws Throwable
Map<String, Object> com.cosylab.cdb.jdal.HibernateWDALImpl.getTableMap ( Session  session,
String  keyField,
Class  type 
)
String com.cosylab.cdb.jdal.HibernateWDALImpl.list_daos ( String  name  ) 
String com.cosylab.cdb.jdal.HibernateWDALImpl.list_nodes ( String  curl  ) 
void com.cosylab.cdb.jdal.HibernateWDALImpl.listen_for_changes ( String  curl,
int  listenerID 
)
String com.cosylab.cdb.jdal.HibernateWDALImpl.listNodes ( String  curl,
boolean  daosOnly 
) [protected]
void com.cosylab.cdb.jdal.HibernateWDALImpl.loadListeners (  ) 
void com.cosylab.cdb.jdal.HibernateWDALImpl.object_changed ( String  curl  )  [protected]
Parameters:
curl 
void com.cosylab.cdb.jdal.HibernateWDALImpl.recoverClients (  ) 

Recovery related implementation. Load list of listeners from the recovery file and notifies them to clear cache. NOTICE: This method should be called when DAL POA is alrady initialized and active. NOTE: Method execution depends on recoveryRead variable.

Implements com.cosylab.cdb.jdal.Recoverer.

void com.cosylab.cdb.jdal.HibernateWDALImpl.remove_change_listener ( int  listenerID  ) 
void com.cosylab.cdb.jdal.HibernateWDALImpl.remove_node ( String  curl  )  throws CDBRecordIsReadOnlyEx, CDBRecordDoesNotExistEx
void com.cosylab.cdb.jdal.HibernateWDALImpl.saveChanges ( String  curl,
Map  propertyMap 
) throws CDBXMLErrorEx, CDBExceptionEx, CDBFieldDoesNotExistEx, CDBRecordDoesNotExistEx

Save changes given by map to the node identified by curl

Parameters:
curl 
propertyMap 
Exceptions:
CDBXMLErrorEx 
CDBExceptionEx 
CDBFieldDoesNotExistEx 

TODO revert memory state?!!!

References com.cosylab.cdb.jdal.HibernateWDAOImpl.set_field_data().

boolean com.cosylab.cdb.jdal.HibernateWDALImpl.saveListeners (  ) 
Returns:
boolean
void com.cosylab.cdb.jdal.HibernateWDALImpl.set_DAO ( String  curl,
String  xml 
) throws CDBFieldDoesNotExistEx, CDBRecordIsReadOnlyEx, CDBExceptionEx, CDBXMLErrorEx, CDBRecordDoesNotExistEx
void com.cosylab.cdb.jdal.HibernateWDALImpl.shutdown (  ) 

Member Data Documentation

final String com.cosylab.cdb.jdal.HibernateWDALImpl.COMPONENT_TREE_NAME = System.getProperty(TMCDB_COMPONENT_TREE_NAME_KEY, "alma") [static, package]
Configuration com.cosylab.cdb.jdal.HibernateWDALImpl.config = null [protected]
final String com.cosylab.cdb.jdal.HibernateWDALImpl.DUMMY_CONTAINER_FLAG = "dummy" [static, package]
volatile boolean com.cosylab.cdb.jdal.HibernateWDALImpl.firstTime = true [package]
volatile Session com.cosylab.cdb.jdal.HibernateWDALImpl.mainSession = null [protected]
final boolean com.cosylab.cdb.jdal.HibernateWDALImpl.TMCDB_ACS_ONLY = Boolean.getBoolean("cdb_rdb.acsOnly") [static, package]
final String com.cosylab.cdb.jdal.HibernateWDALImpl.TMCDB_COMPONENT_TREE_NAME_KEY = "TMCDB_COMPONENT_TREE_NAME" [static, package]
final String com.cosylab.cdb.jdal.HibernateWDALImpl.TMCDB_CONFIGURATION_NAME_KEY = "TMCDB_CONFIGURATION_NAME" [static, package]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties