Package org.hibernate

Interface SharedSessionBuilder<T extends SharedSessionBuilder>

    • Method Detail

      • transactionContext

        @Deprecated
        default T transactionContext()
        Deprecated.
        Use connection() instead
        Signifies that the transaction context from the original session should be used to create the new session.
        Returns:
        this, for method chaining
      • connection

        T connection()
        Signifies that the connection from the original session should be used to create the new session.
        Returns:
        this, for method chaining
      • interceptor

        T interceptor()
        Signifies the interceptor from the original session should be used to create the new session.
        Returns:
        this, for method chaining
      • connectionReleaseMode

        @Deprecated
        T connectionReleaseMode()
        Deprecated.
        (snce 6.0) use connectionHandlingMode() instead.
        Signifies that the connection release mode from the original session should be used to create the new session.
        Returns:
        this, for method chaining
      • connectionHandlingMode

        T connectionHandlingMode()
        Signifies that the connection release mode from the original session should be used to create the new session.
        Returns:
        this, for method chaining
      • autoJoinTransactions

        T autoJoinTransactions()
        Signifies that the autoJoinTransaction flag from the original session should be used to create the new session.
        Returns:
        this, for method chaining
      • flushMode

        T flushMode()
        Signifies that the FlushMode from the original session should be used to create the new session.
        Returns:
        this, for method chaining
      • autoClose

        T autoClose()
        Signifies that the autoClose flag from the original session should be used to create the new session.
        Returns:
        this, for method chaining
      • flushBeforeCompletion

        @Deprecated
        default T flushBeforeCompletion()
        Deprecated.
        (since 5.2) use flushMode() instead.
        Signifies that the flushBeforeCompletion flag from the original session should be used to create the new session.
        Returns:
        this, for method chaining
      • connection

        T connection​(java.sql.Connection connection)
        Description copied from interface: SessionBuilder
        Adds a specific connection to the session options.
        Specified by:
        connection in interface SessionBuilder<T extends SharedSessionBuilder>
        Parameters:
        connection - The connection to use.
        Returns:
        this, for method chaining
      • flushBeforeCompletion

        default T flushBeforeCompletion​(boolean flushBeforeCompletion)
        Description copied from interface: SessionBuilder
        Should the session be automatically flushed during the "before completion" phase of transaction handling.
        Specified by:
        flushBeforeCompletion in interface SessionBuilder<T extends SharedSessionBuilder>
        Parameters:
        flushBeforeCompletion - Should the session be automatically flushed
        Returns:
        this, for method chaining