

Public Member Functions | |
| void | testCreateDB () throws Exception |
| void | testDrop () throws Exception |
| void | testSimpleSave () throws Exception |
| void | testXmlTypeSave () throws Exception |
| void | testSaveInheritance () throws Exception |
| void | testShutdown () throws HibernateUtilException |
Protected Member Functions | |
| void | setUp () throws Exception |
| void | tearDown () throws Exception |
Private Member Functions | |
| Component | createTrascientComponent (ComponentType componentType, Configuration config) |
| void | createDB () throws HibernateUtilException |
| void | dropDB () throws HibernateUtilException |
| void | runScriptFile (String script, Connection conn) throws SQLException |
| void | runScript (String sql, Connection conn) throws SQLException |
| InputStream | getResourceStream (String pathname) throws IOException |
| String | fileToString (Reader reader) throws IOException |
Private Attributes | |
| final String | CREATE_TMCDB_SWCORE = System.getenv("ACSDATA") + "/config/DDL/hsqldb/TMCDB_swconfigcore/CreateHsqldbTables.sql" |
| final String | CREATE_TMCDB_SWEXT = System.getenv("ACSDATA") + "/config/DDL/hsqldb/TMCDB_swconfigext/CreateHsqldbTables.sql" |
| final String | DROP_TMCDB_SWCORE = System.getenv("ACSDATA") + "/config/DDL/hsqldb/TMCDB_swconfigcore/DropAllTables.sql" |
| final String | DROP_TMCDB_SWEXT = System.getenv("ACSDATA") + "/config/DDL/hsqldb/TMCDB_swconfigext/DropAllTables.sql" |
| final String | COMPUTER_NAME = "eva" |
| final String | COMPUTER_NETNAME = "eva.eso.org" |
| final String | COMPUTER_PROCTYPE = "uni" |
| final String | COMPUTER_LOCATION = "A033" |
| final boolean | COMPUTER_RT = true |
| final boolean | COMPUTER_DISKLESS = false |
| Logger | logger |
| HibernateUtil | hibernateUtil |
Static Private Attributes | |
| static final int | DEFAULT_BUF_LEN = 64 * 1024 |
| void alma::acs::tmcdb::TestPojosPersistence::createDB | ( | ) | throws HibernateUtilException [inline, private] |
References com::cosylab::cdb::jdal::hibernate::HibernateUtil::beginTransaction(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::commitTransaction(), CREATE_TMCDB_SWCORE, CREATE_TMCDB_SWEXT, com::cosylab::cdb::jdal::hibernate::HibernateUtil::getConfiguration(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::getSession(), hibernateUtil, and runScriptFile().
Referenced by testCreateDB(), testSaveInheritance(), testSimpleSave(), and testXmlTypeSave().
| Component alma::acs::tmcdb::TestPojosPersistence::createTrascientComponent | ( | ComponentType | componentType, | |
| Configuration | config | |||
| ) | [inline, private] |
Referenced by testXmlTypeSave().
| void alma::acs::tmcdb::TestPojosPersistence::dropDB | ( | ) | throws HibernateUtilException [inline, private] |
References com::cosylab::cdb::jdal::hibernate::HibernateUtil::beginTransaction(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::commitTransaction(), DROP_TMCDB_SWCORE, DROP_TMCDB_SWEXT, com::cosylab::cdb::jdal::hibernate::HibernateUtil::getConfiguration(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::getSession(), hibernateUtil, runScript(), and runScriptFile().
Referenced by testDrop(), testSaveInheritance(), testSimpleSave(), and testXmlTypeSave().
| String alma::acs::tmcdb::TestPojosPersistence::fileToString | ( | Reader | reader | ) | throws IOException [inline, private] |
References DEFAULT_BUF_LEN.
Referenced by runScriptFile().
| InputStream alma::acs::tmcdb::TestPojosPersistence::getResourceStream | ( | String | pathname | ) | throws IOException [inline, private] |
Referenced by runScriptFile().
| void alma::acs::tmcdb::TestPojosPersistence::runScript | ( | String | sql, | |
| Connection | conn | |||
| ) | throws SQLException [inline, private] |
Referenced by dropDB(), runScriptFile(), and testShutdown().
| void alma::acs::tmcdb::TestPojosPersistence::runScriptFile | ( | String | script, | |
| Connection | conn | |||
| ) | throws SQLException [inline, private] |
References fileToString(), getResourceStream(), and runScript().
Referenced by createDB(), and dropDB().
| void alma::acs::tmcdb::TestPojosPersistence::setUp | ( | ) | throws Exception [inline, protected] |
References com::cosylab::cdb::jdal::hibernate::HibernateUtil::getInstance(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::getSessionFactory(), hibernateUtil, logger, com::cosylab::cdb::jdal::hibernate::HibernateUtil::setConfiguration(), com::cosylab::cdb::jdal::logging::AcsLoggerHelper::setDefaultLogLevels(), com::cosylab::cdb::jdal::logging::AcsLoggerHelper::setHibernateLogLevels(), com::cosylab::cdb::jdal::logging::AcsLoggerHelper::setHibernateSqlLogLevels(), and com::cosylab::cdb::jdal::logging::AcsLoggerHelper::setLoggerName().
| void alma::acs::tmcdb::TestPojosPersistence::tearDown | ( | ) | throws Exception [inline, protected] |
| void alma::acs::tmcdb::TestPojosPersistence::testCreateDB | ( | ) | throws Exception [inline] |
References createDB().
| void alma::acs::tmcdb::TestPojosPersistence::testDrop | ( | ) | throws Exception [inline] |
References dropDB().
| void alma::acs::tmcdb::TestPojosPersistence::testSaveInheritance | ( | ) | throws Exception [inline] |
References com::cosylab::cdb::jdal::hibernate::HibernateUtil::beginTransaction(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::commitTransaction(), COMPUTER_DISKLESS, COMPUTER_LOCATION, COMPUTER_NAME, COMPUTER_NETNAME, COMPUTER_PROCTYPE, COMPUTER_RT, createDB(), dropDB(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::getList(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::getSession(), and hibernateUtil.
| void alma::acs::tmcdb::TestPojosPersistence::testShutdown | ( | ) | throws HibernateUtilException [inline] |
References com::cosylab::cdb::jdal::hibernate::HibernateUtil::beginTransaction(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::commitTransaction(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::getConfiguration(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::getSession(), hibernateUtil, and runScript().
| void alma::acs::tmcdb::TestPojosPersistence::testSimpleSave | ( | ) | throws Exception [inline] |
References com::cosylab::cdb::jdal::hibernate::HibernateUtil::beginTransaction(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::closeSession(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::commitTransaction(), COMPUTER_LOCATION, COMPUTER_NAME, COMPUTER_NETNAME, createDB(), dropDB(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::getSession(), hibernateUtil, and com::cosylab::cdb::jdal::hibernate::HibernateUtil::rollbackTransaction().
| void alma::acs::tmcdb::TestPojosPersistence::testXmlTypeSave | ( | ) | throws Exception [inline] |
References com::cosylab::cdb::jdal::hibernate::HibernateUtil::beginTransaction(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::closeSession(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::commitTransaction(), createDB(), createTrascientComponent(), dropDB(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::getConfiguration(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::getList(), com::cosylab::cdb::jdal::hibernate::HibernateUtil::getSession(), and hibernateUtil.
final boolean alma::acs::tmcdb::TestPojosPersistence::COMPUTER_DISKLESS = false [private] |
Referenced by testSaveInheritance().
final String alma::acs::tmcdb::TestPojosPersistence::COMPUTER_LOCATION = "A033" [private] |
Referenced by testSaveInheritance(), and testSimpleSave().
final String alma::acs::tmcdb::TestPojosPersistence::COMPUTER_NAME = "eva" [private] |
Referenced by testSaveInheritance(), and testSimpleSave().
final String alma::acs::tmcdb::TestPojosPersistence::COMPUTER_NETNAME = "eva.eso.org" [private] |
Referenced by testSaveInheritance(), and testSimpleSave().
final String alma::acs::tmcdb::TestPojosPersistence::COMPUTER_PROCTYPE = "uni" [private] |
Referenced by testSaveInheritance().
final boolean alma::acs::tmcdb::TestPojosPersistence::COMPUTER_RT = true [private] |
Referenced by testSaveInheritance().
final String alma::acs::tmcdb::TestPojosPersistence::CREATE_TMCDB_SWCORE = System.getenv("ACSDATA") + "/config/DDL/hsqldb/TMCDB_swconfigcore/CreateHsqldbTables.sql" [private] |
Referenced by createDB().
final String alma::acs::tmcdb::TestPojosPersistence::CREATE_TMCDB_SWEXT = System.getenv("ACSDATA") + "/config/DDL/hsqldb/TMCDB_swconfigext/CreateHsqldbTables.sql" [private] |
Referenced by createDB().
final int alma::acs::tmcdb::TestPojosPersistence::DEFAULT_BUF_LEN = 64 * 1024 [static, private] |
Referenced by fileToString().
final String alma::acs::tmcdb::TestPojosPersistence::DROP_TMCDB_SWCORE = System.getenv("ACSDATA") + "/config/DDL/hsqldb/TMCDB_swconfigcore/DropAllTables.sql" [private] |
Referenced by dropDB().
final String alma::acs::tmcdb::TestPojosPersistence::DROP_TMCDB_SWEXT = System.getenv("ACSDATA") + "/config/DDL/hsqldb/TMCDB_swconfigext/DropAllTables.sql" [private] |
Referenced by dropDB().
Referenced by createDB(), dropDB(), setUp(), testSaveInheritance(), testShutdown(), testSimpleSave(), and testXmlTypeSave().
Logger alma::acs::tmcdb::TestPojosPersistence::logger [private] |
Referenced by setUp().
1.6.2