Package org.hibernate

Interface SharedSessionContract

    • Method Detail

      • getTenantIdentifier

        String getTenantIdentifier()
        Obtain the tenant identifier associated with this session.
        Returns:
        The tenant identifier associated with this session, or null
      • isOpen

        boolean isOpen()
        Check if the session is still open.
        Returns:
        boolean
      • isConnected

        boolean isConnected()
        Check if the session is currently connected.
        Returns:
        boolean
      • beginTransaction

        Transaction beginTransaction()
        Begin a unit of work and return the associated Transaction object. If a new underlying transaction is required, begin the transaction. Otherwise, continue the new work in the context of the existing underlying transaction.
        Returns:
        a Transaction instance
        See Also:
        getTransaction()
      • getTransaction

        Transaction getTransaction()
        Get the Transaction instance associated with this session.
        Returns:
        a Transaction instance
      • getNamedProcedureCall

        ProcedureCall getNamedProcedureCall​(String name)
        Obtain a ProcedureCall based on a named template
        Parameters:
        name - The name given to the template
        Returns:
        The ProcedureCall
        See Also:
        NamedStoredProcedureQuery
      • createStoredProcedureCall

        ProcedureCall createStoredProcedureCall​(String procedureName)
        Create a ProcedureCall to a stored procedure.
        Parameters:
        procedureName - The name of the procedure.
        Returns:
        The representation of the procedure call.
      • createStoredProcedureCall

        ProcedureCall createStoredProcedureCall​(String procedureName,
                                                Class<?>... resultClasses)
        Create a ProcedureCall to a stored procedure with the given result set entity mappings. Each given class is considered a "root return".
        Parameters:
        procedureName - The name of the procedure.
        resultClasses - The entity(s) to map the result on to.
        Returns:
        The representation of the procedure call.
      • createStoredProcedureCall

        ProcedureCall createStoredProcedureCall​(String procedureName,
                                                String... resultSetMappings)
        Create a ProcedureCall to a stored procedure with the given result set entity mappings.
        Parameters:
        procedureName - The name of the procedure.
        resultSetMappings - The explicit result set mapping(s) to use for mapping the results
        Returns:
        The representation of the procedure call.
      • createNamedStoredProcedureQuery

        ProcedureCall createNamedStoredProcedureQuery​(String name)
        Obtain a ProcedureCall based on a named template
        Parameters:
        name - The name given to the template
        Returns:
        The ProcedureCall
        See Also:
        NamedStoredProcedureQuery
      • createStoredProcedureQuery

        ProcedureCall createStoredProcedureQuery​(String procedureName)
        Create a ProcedureCall to a stored procedure.
        Parameters:
        procedureName - The name of the procedure.
        Returns:
        The representation of the procedure call.
      • createStoredProcedureQuery

        ProcedureCall createStoredProcedureQuery​(String procedureName,
                                                 Class<?>... resultClasses)
        Create a ProcedureCall to a stored procedure with the given result set entity mappings. Each given class is considered a "root return".
        Parameters:
        procedureName - The name of the procedure.
        resultClasses - The entity(s) to map the result on to.
        Returns:
        The representation of the procedure call.
      • createStoredProcedureQuery

        ProcedureCall createStoredProcedureQuery​(String procedureName,
                                                 String... resultSetMappings)
        Create a ProcedureCall to a stored procedure with the given result set entity mappings.
        Parameters:
        procedureName - The name of the procedure.
        resultSetMappings - The explicit result set mapping(s) to use for mapping the results
        Returns:
        The representation of the procedure call.