Class AbstractSelectingDelegate

    • Method Detail

      • getSelectSQL

        protected abstract java.lang.String getSelectSQL()
        Get the SQL statement to be used to retrieve generated key values.
        Returns:
        The SQL command string
      • bindParameters

        protected void bindParameters​(SharedSessionContractImplementor session,
                                      java.sql.PreparedStatement ps,
                                      java.lang.Object entity)
                               throws java.sql.SQLException
        Bind any required parameter values into the SQL command getSelectSQL().
        Parameters:
        session - The session
        ps - The prepared SQL command
        entity - The entity being saved.
        Throws:
        java.sql.SQLException
      • getResult

        protected abstract java.io.Serializable getResult​(SharedSessionContractImplementor session,
                                                          java.sql.ResultSet rs,
                                                          java.lang.Object entity)
                                                   throws java.sql.SQLException
        Extract the generated key value from the given result set.
        Parameters:
        session - The session
        rs - The result set containing the generated primay key values.
        entity - The entity being saved.
        Returns:
        The generated identifier
        Throws:
        java.sql.SQLException