Package ru.curs.celesta
Class Celesta
java.lang.Object
ru.curs.celesta.Celesta
- All Implemented Interfaces:
AutoCloseable,ICelesta
Celesta instance.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Stops working of Celesta.static CelestaCreates Celesta instance with properties specified in celesta.properties file.static CelestacreateInstance(Properties properties) Creates Celesta instance with the specified properties and internal connection pool.static CelestacreateInstance(Properties properties, DataSource dataSource) Creates Celesta instance with specified properties andDataSource.static CelestacreateInstance(Properties properties, ConnectionPool connectionPool) Creates Celesta instance with specified properties and ConnectionPool.Returns aConnectionPoolof this celesta instance.Returns aDBAdaptorof this celesta instance.Returns aILoggingManagerof this celesta instance.Returns aIPermissionManagerof this celesta instance.Returns aIProfilerof this celesta instance.getScore()Returns Celesta metadata (tables description).Returns properties that were used to initialize Celesta.Returns aTriggerDispatcherof this celesta instance.booleanReturns if profiling mode is set (whether the time of method calls is written to 'calllog' table).static PropertiesReads and returns properties from celesta.properties file.booleanReturns the behaviorNULLS FIRSTof current database.voidsetProfilemode(boolean profilemode) Sets profiling mode.
-
Field Details
-
VERSION
Celesta version.- See Also:
-
-
Method Details
-
getSetupProperties
Description copied from interface:ICelestaReturns properties that were used to initialize Celesta. Attention: it makes sense using this object as read only, dynamic change of these properties does lead to nothing.- Specified by:
getSetupPropertiesin interfaceICelesta
-
getPermissionManager
Description copied from interface:ICelestaReturns aIPermissionManagerof this celesta instance.- Specified by:
getPermissionManagerin interfaceICelesta- Returns:
- a permission manager of this celesta instance.
-
getLoggingManager
Description copied from interface:ICelestaReturns aILoggingManagerof this celesta instance.- Specified by:
getLoggingManagerin interfaceICelesta- Returns:
- a logging manager of this celesta instance.
-
getConnectionPool
Description copied from interface:ICelestaReturns aConnectionPoolof this celesta instance.- Specified by:
getConnectionPoolin interfaceICelesta- Returns:
- a connection poll of this celesta instance.
-
getProfiler
Description copied from interface:ICelestaReturns aIProfilerof this celesta instance.- Specified by:
getProfilerin interfaceICelesta- Returns:
- a profiler of this celesta instance.
-
getDBAdaptor
Description copied from interface:ICelestaReturns aDBAdaptorof this celesta instance.- Specified by:
getDBAdaptorin interfaceICelesta- Returns:
- a db adaptor of this celesta instance.
-
getTriggerDispatcher
Description copied from interface:ICelestaReturns aTriggerDispatcherof this celesta instance.- Specified by:
getTriggerDispatcherin interfaceICelesta- Returns:
- a trigger dispatcher of this celesta instance.
-
getScore
Description copied from interface:ICelestaReturns Celesta metadata (tables description). -
close
public void close()Stops working of Celesta. After the call the instance of Celesta becomes unusable.- Specified by:
closein interfaceAutoCloseable
-
createInstance
Creates Celesta instance with specified properties andDataSource.- Parameters:
properties- Celesta initialization properties. All the properties regarding db connection will be ignored, butrdbms.connection.urlis still required in order for Celesta to define the database type (you may pass only the prefix, e. g.jdbc:postgresql)dataSource- Provided data source.- Returns:
-
createInstance
Creates Celesta instance with specified properties and ConnectionPool.- Parameters:
properties- Celesta initialization properties. All the properties regarding db connection will be ignored, butrdbms.connection.urlis still required in order for Celesta to define the database type (you may pass only the prefix, e. g.jdbc:postgresql)connectionPool- Provided connection pool (eitherDatasourceConnectionPoolorInternalConnectionPool).- Returns:
-
createInstance
Creates Celesta instance with the specified properties and internal connection pool.- Parameters:
properties- Celesta initialization properties- Returns:
-
createInstance
Creates Celesta instance with properties specified in celesta.properties file.- Returns:
-
loadPropertiesDynamically
Reads and returns properties from celesta.properties file.- Returns:
-
isProfilemode
public boolean isProfilemode()Returns if profiling mode is set (whether the time of method calls is written to 'calllog' table).- Returns:
-
nullsFirst
public boolean nullsFirst()Returns the behaviorNULLS FIRSTof current database.- Returns:
-
setProfilemode
public void setProfilemode(boolean profilemode) Sets profiling mode.- Parameters:
profilemode- profiling mode
-