Package com.signalapp.dao
Class EsquematicoDAO
- java.lang.Object
-
- com.signalapp.dao.BaseDAO<Esquematico>
-
- com.signalapp.dao.EsquematicoDAO
-
public class EsquematicoDAO extends BaseDAO<Esquematico>
Data Access Object for the Esquematicos table Handles database operations for schematic entities
-
-
Field Summary
-
Fields inherited from class com.signalapp.dao.BaseDAO
connection
-
-
Constructor Summary
Constructors Constructor Description EsquematicoDAO()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddeleteBySimulacion(int idSimulacion)Deletes all schematic components for a specific simulationjava.util.List<Esquematico>getBySimulacion(int idSimulacion)Retrieves all schematic components for a specific simulationjava.util.List<Esquematico>getBySimulacionAndPiso(int idSimulacion, int piso)Retrieves all schematic components for a specific simulation and floorprotected java.lang.String[]getColumnNames()Gets the column names for the database tableprotected java.lang.StringgetTableName()Gets the name of the database table this DAO operates onprotected EsquematicomapResultSetToEntity(java.sql.ResultSet rs)Maps a ResultSet row to an entity objectprotected voidsetPreparedStatementParams(java.sql.PreparedStatement ps, Esquematico entity)Sets the parameters for a PreparedStatement based on entity properties
-
-
-
Method Detail
-
getTableName
protected java.lang.String getTableName()
Description copied from class:BaseDAOGets the name of the database table this DAO operates on- Specified by:
getTableNamein classBaseDAO<Esquematico>- Returns:
- The table name
-
getColumnNames
protected java.lang.String[] getColumnNames()
Description copied from class:BaseDAOGets the column names for the database table- Specified by:
getColumnNamesin classBaseDAO<Esquematico>- Returns:
- Array of column names
-
mapResultSetToEntity
protected Esquematico mapResultSetToEntity(java.sql.ResultSet rs) throws java.sql.SQLException
Description copied from class:BaseDAOMaps a ResultSet row to an entity object- Specified by:
mapResultSetToEntityin classBaseDAO<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.SQLExceptionDescription copied from class:BaseDAOSets the parameters for a PreparedStatement based on entity properties- Specified by:
setPreparedStatementParamsin classBaseDAO<Esquematico>- Parameters:
ps- The PreparedStatement to set parameters forentity- 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 simulationpiso- 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.SQLExceptionDeletes all schematic components for a specific simulation- Parameters:
idSimulacion- The ID of the simulation- Throws:
java.sql.SQLException- if a database error occurs
-
-