Class StatelessSession

java.lang.Object
io.github.blyznytsiaorg.bibernate.StatelessSession

public class StatelessSession extends Object
The StatelessSession class represents a stateless session for executing database operations. It utilizes a transactional datasource obtained from Bibernate database settings.
Since:
1.0
Author:
Blyzhnytsia Team
See Also:
  • Field Details

    • dataSource

      private final TransactionalDatasource dataSource
      The transactional datasource used for database operations.
  • Constructor Details

    • StatelessSession

      public StatelessSession(BibernateDatabaseSettings bibernateDatabaseSettings)
      Constructs a new StatelessSession with the provided Bibernate database settings.
      Parameters:
      bibernateDatabaseSettings - the Bibernate database settings
  • Method Details

    • getDataSource

      public TransactionalDatasource getDataSource()
      Retrieves the Transactional datasource used by this stateless session.
      Returns:
      the transactional datasource
    • close

      public void close()
      Closes the stateless session by closing the associated datasource.