Class DerivadorDAO


  • public class DerivadorDAO
    extends BaseDAO<Derivador>
    Data Access Object for the Derivadores table Handles database operations for tap/splitter entities
    • Constructor Detail

      • DerivadorDAO

        public DerivadorDAO()
    • Method Detail

      • getTableName

        protected java.lang.String getTableName()
        Gets the name of the database table
        Specified by:
        getTableName in class BaseDAO<Derivador>
        Returns:
        The table name "derivadores"
      • getColumnNames

        protected java.lang.String[] getColumnNames()
        Gets the column names for the Derivadores table
        Specified by:
        getColumnNames in class BaseDAO<Derivador>
        Returns:
        Array of column names
      • mapResultSetToEntity

        protected Derivador mapResultSetToEntity​(java.sql.ResultSet rs)
                                          throws java.sql.SQLException
        Maps a ResultSet row to a Derivador entity
        Specified by:
        mapResultSetToEntity in class BaseDAO<Derivador>
        Parameters:
        rs - The ResultSet containing the database row
        Returns:
        A new Derivador object with data from the ResultSet
        Throws:
        java.sql.SQLException - if a database error occurs
      • setPreparedStatementParams

        protected void setPreparedStatementParams​(java.sql.PreparedStatement ps,
                                                  Derivador entity)
                                           throws java.sql.SQLException
        Sets the parameters for a PreparedStatement based on Derivador properties
        Specified by:
        setPreparedStatementParams in class BaseDAO<Derivador>
        Parameters:
        ps - The PreparedStatement to set parameters for
        entity - The Derivador entity containing the values to set
        Throws:
        java.sql.SQLException - if a database error occurs
      • findByComponenteId

        public Derivador findByComponenteId​(int componenteId)
                                     throws java.sql.SQLException
        Finds a derivador component by its componente ID
        Parameters:
        componenteId - The ID of the associated componente
        Returns:
        The Derivador object if found, null otherwise
        Throws:
        java.sql.SQLException - if a database error occurs