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.ru.curs.celesta.dbutils.adaptors.DBAdaptorgetScore()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
- Specified by:
getSetupPropertiesin interfaceICelesta
-
getPermissionManager
- Specified by:
getPermissionManagerin interfaceICelesta
-
getLoggingManager
- Specified by:
getLoggingManagerin interfaceICelesta
-
getConnectionPool
- Specified by:
getConnectionPoolin interfaceICelesta
-
getProfiler
- Specified by:
getProfilerin interfaceICelesta
-
getDBAdaptor
public ru.curs.celesta.dbutils.adaptors.DBAdaptor getDBAdaptor()- Specified by:
getDBAdaptorin interfaceICelesta
-
getTriggerDispatcher
- Specified by:
getTriggerDispatcherin interfaceICelesta
-
getScore
-
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
-