Class ResultadoSimulacionDAO


  • public class ResultadoSimulacionDAO
    extends BaseDAO<ResultadoSimulacion>
    Data Access Object for the ResultadosSimulacion table Handles database operations for simulation result entities
    • Constructor Detail

      • ResultadoSimulacionDAO

        public ResultadoSimulacionDAO()
    • 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<ResultadoSimulacion>
        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<ResultadoSimulacion>
        Returns:
        Array of column names
      • mapResultSetToEntity

        protected ResultadoSimulacion 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<ResultadoSimulacion>
        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 stmt,
                                                  ResultadoSimulacion 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<ResultadoSimulacion>
        Parameters:
        stmt - The PreparedStatement to set parameters for
        entity - The entity containing the values to set
        Throws:
        java.sql.SQLException - if a database error occurs
      • findBySimulacionId

        public java.util.List<ResultadoSimulacion> findBySimulacionId​(int idSimulacion)
                                                               throws java.sql.SQLException
        Find all results for a specific simulation
        Parameters:
        idSimulacion - The simulation ID
        Returns:
        List of results for the simulation
        Throws:
        java.sql.SQLException - If a database error occurs
      • deleteBySimulacionId

        public void deleteBySimulacionId​(int idSimulacion)
                                  throws java.sql.SQLException
        Delete all results for a specific simulation
        Parameters:
        idSimulacion - The simulation ID
        Throws:
        java.sql.SQLException - If a database error occurs