public class MedicalHistoryJDBCTemplate extends java.lang.Object implements ICrud<MedicalHistory>
Constructor and Description |
---|
MedicalHistoryJDBCTemplate() |
Modifier and Type | Method and Description |
---|---|
int |
create(MedicalHistory entity)
create a new entity of implement dao
|
int |
delete(int id)
delete a record from dao object
|
java.util.List<MedicalHistory> |
filterByEntity(MedicalHistory entity)
returns all filtered entities.
|
java.util.List<MedicalHistory> |
get()
gives all the records form the dao object
|
MedicalHistory |
getById(int id)
looking for a id from implement dao
|
void |
setDataSource(javax.sql.DataSource dataSource)
used to initialize database resources connection.
|
int |
update(int id,
MedicalHistory newEntity)
update a entity of dao objects
|
public void setDataSource(javax.sql.DataSource dataSource)
ICrud
setDataSource
in interface ICrud<MedicalHistory>
dataSource
- database connectionpublic int create(MedicalHistory entity)
ICrud
create
in interface ICrud<MedicalHistory>
entity
- new modelpublic MedicalHistory getById(int id)
ICrud
getById
in interface ICrud<MedicalHistory>
id
- of dao entitypublic java.util.List<MedicalHistory> get()
ICrud
get
in interface ICrud<MedicalHistory>
public java.util.List<MedicalHistory> filterByEntity(MedicalHistory entity)
ICrud
filterByEntity
in interface ICrud<MedicalHistory>
entity
- to filterpublic int delete(int id)
ICrud
delete
in interface ICrud<MedicalHistory>
id
- of entitypublic int update(int id, MedicalHistory newEntity)
ICrud
update
in interface ICrud<MedicalHistory>
id
- to updatenewEntity
- includes the new values for update a entity