Class CoaxialDAO


  • public class CoaxialDAO
    extends BaseDAO<Coaxial>
    Data Access Object for the Coaxiales table Handles database operations for coaxial cable entities
    • Constructor Detail

      • CoaxialDAO

        public CoaxialDAO()
    • Method Detail

      • getTableName

        protected java.lang.String getTableName()
        Gets the table name for this DAO
        Specified by:
        getTableName in class BaseDAO<Coaxial>
        Returns:
        The table name
      • getColumnNames

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

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

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

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