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()
      Description copied from interface: ICelesta
      Returns 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:
      getSetupProperties in interface ICelesta
    • getPermissionManager

      public IPermissionManager getPermissionManager()
      Description copied from interface: ICelesta
      Returns a IPermissionManager of this celesta instance.
      Specified by:
      getPermissionManager in interface ICelesta
      Returns:
      a permission manager of this celesta instance.
    • getLoggingManager

      public ILoggingManager getLoggingManager()
      Description copied from interface: ICelesta
      Returns a ILoggingManager of this celesta instance.
      Specified by:
      getLoggingManager in interface ICelesta
      Returns:
      a logging manager of this celesta instance.
    • getConnectionPool

      public ConnectionPool getConnectionPool()
      Description copied from interface: ICelesta
      Returns a ConnectionPool of this celesta instance.
      Specified by:
      getConnectionPool in interface ICelesta
      Returns:
      a connection poll of this celesta instance.
    • getProfiler

      public IProfiler getProfiler()
      Description copied from interface: ICelesta
      Returns a IProfiler of this celesta instance.
      Specified by:
      getProfiler in interface ICelesta
      Returns:
      a profiler of this celesta instance.
    • getDBAdaptor

      public DBAdaptor getDBAdaptor()
      Description copied from interface: ICelesta
      Returns a DBAdaptor of this celesta instance.
      Specified by:
      getDBAdaptor in interface ICelesta
      Returns:
      a db adaptor of this celesta instance.
    • getTriggerDispatcher

      public TriggerDispatcher getTriggerDispatcher()
      Description copied from interface: ICelesta
      Returns a TriggerDispatcher of this celesta instance.
      Specified by:
      getTriggerDispatcher in interface ICelesta
      Returns:
      a trigger dispatcher of this celesta instance.
    • getScore

      public Score getScore()
      Description copied from interface: ICelesta
      Returns Celesta metadata (tables description).
      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