Class Celesta

java.lang.Object
ru.curs.celesta.Celesta
All Implemented Interfaces:
AutoCloseable, ICelesta

public final class Celesta extends Object implements ICelesta
Celesta instance.
  • Field Details

  • Method Details

    • getSetupProperties

      public Properties getSetupProperties()
      Specified by:
      getSetupProperties in interface ICelesta
    • getPermissionManager

      public IPermissionManager getPermissionManager()
      Specified by:
      getPermissionManager in interface ICelesta
    • getLoggingManager

      public ILoggingManager getLoggingManager()
      Specified by:
      getLoggingManager in interface ICelesta
    • getConnectionPool

      public ConnectionPool getConnectionPool()
      Specified by:
      getConnectionPool in interface ICelesta
    • getProfiler

      public IProfiler getProfiler()
      Specified by:
      getProfiler in interface ICelesta
    • getDBAdaptor

      public ru.curs.celesta.dbutils.adaptors.DBAdaptor getDBAdaptor()
      Specified by:
      getDBAdaptor in interface ICelesta
    • getTriggerDispatcher

      public TriggerDispatcher getTriggerDispatcher()
      Specified by:
      getTriggerDispatcher in interface ICelesta
    • getScore

      public Score getScore()
      Specified by:
      getScore in interface ICelesta
    • close

      public void close()
      Stops working of Celesta. After the call the instance of Celesta becomes unusable.
      Specified by:
      close in interface AutoCloseable
    • createInstance

      public static Celesta createInstance(Properties properties, DataSource dataSource)
      Creates Celesta instance with specified properties and DataSource.
      Parameters:
      properties - Celesta initialization properties. All the properties regarding db connection will be ignored, but rdbms.connection.url is 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

      public static Celesta createInstance(Properties properties, ConnectionPool connectionPool)
      Creates Celesta instance with specified properties and ConnectionPool.
      Parameters:
      properties - Celesta initialization properties. All the properties regarding db connection will be ignored, but rdbms.connection.url is 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 (either DatasourceConnectionPool or InternalConnectionPool).
      Returns:
    • createInstance

      public static Celesta createInstance(Properties properties)
      Creates Celesta instance with the specified properties and internal connection pool.
      Parameters:
      properties - Celesta initialization properties
      Returns:
    • createInstance

      public static Celesta createInstance()
      Creates Celesta instance with properties specified in celesta.properties file.
      Returns:
    • loadPropertiesDynamically

      public static Properties 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 behavior NULLS FIRST of current database.
      Returns:
    • setProfilemode

      public void setProfilemode(boolean profilemode)
      Sets profiling mode.
      Parameters:
      profilemode - profiling mode