Class SimulacionDAO


  • public class SimulacionDAO
    extends BaseDAO<Simulacion>
    Data Access Object for the Simulaciones table Handles database operations for simulation entities
    • Constructor Detail

      • SimulacionDAO

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

        protected Simulacion 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<Simulacion>
        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,
                                                  Simulacion 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<Simulacion>
        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
      • getByConfiguracion

        public java.util.List<Simulacion> getByConfiguracion​(int idConfiguracion)
                                                      throws java.sql.SQLException
        Retrieves all simulations for a specific configuration
        Parameters:
        idConfiguracion - The ID of the configuration
        Returns:
        List of simulations for the configuration
        Throws:
        java.sql.SQLException - if a database error occurs
      • getLatestByConfiguracion

        public Simulacion getLatestByConfiguracion​(int idConfiguracion)
                                            throws java.sql.SQLException
        Retrieves the latest simulation for a specific configuration
        Parameters:
        idConfiguracion - The ID of the configuration
        Returns:
        The latest simulation, or null if none exists
        Throws:
        java.sql.SQLException - if a database error occurs