Class EsquematicoDAO


  • public class EsquematicoDAO
    extends BaseDAO<Esquematico>
    Data Access Object for the Esquematicos table Handles database operations for schematic entities
    • Constructor Detail

      • EsquematicoDAO

        public EsquematicoDAO()
    • Method Detail

      • getTableName

        protected java.lang.String getTableName()
        Description copied from class: BaseDAO
        Gets the name of the database table this DAO operates on
        Specified by:
        getTableName in class BaseDAO<Esquematico>
        Returns:
        The table name
      • getColumnNames

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

        protected Esquematico mapResultSetToEntity​(java.sql.ResultSet rs)
                                            throws java.sql.SQLException
        Description copied from class: BaseDAO
        Maps a ResultSet row to an entity object
        Specified by:
        mapResultSetToEntity in class BaseDAO<Esquematico>
        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,
                                                  Esquematico entity)
                                           throws java.sql.SQLException
        Description copied from class: BaseDAO
        Sets the parameters for a PreparedStatement based on entity properties
        Specified by:
        setPreparedStatementParams in class BaseDAO<Esquematico>
        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
      • getBySimulacion

        public java.util.List<Esquematico> getBySimulacion​(int idSimulacion)
                                                    throws java.sql.SQLException
        Retrieves all schematic components for a specific simulation
        Parameters:
        idSimulacion - The ID of the simulation
        Returns:
        List of schematic components for the simulation
        Throws:
        java.sql.SQLException - if a database error occurs
      • getBySimulacionAndPiso

        public java.util.List<Esquematico> getBySimulacionAndPiso​(int idSimulacion,
                                                                  int piso)
                                                           throws java.sql.SQLException
        Retrieves all schematic components for a specific simulation and floor
        Parameters:
        idSimulacion - The ID of the simulation
        piso - The floor number
        Returns:
        List of schematic components for the simulation and floor
        Throws:
        java.sql.SQLException - if a database error occurs
      • deleteBySimulacion

        public void deleteBySimulacion​(int idSimulacion)
                                throws java.sql.SQLException
        Deletes all schematic components for a specific simulation
        Parameters:
        idSimulacion - The ID of the simulation
        Throws:
        java.sql.SQLException - if a database error occurs