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)
ICrudsetDataSource in interface ICrud<MedicalHistory>dataSource - database connectionpublic int create(MedicalHistory entity)
ICrudcreate in interface ICrud<MedicalHistory>entity - new modelpublic MedicalHistory getById(int id)
ICrudgetById in interface ICrud<MedicalHistory>id - of dao entitypublic java.util.List<MedicalHistory> get()
ICrudget in interface ICrud<MedicalHistory>public java.util.List<MedicalHistory> filterByEntity(MedicalHistory entity)
ICrudfilterByEntity in interface ICrud<MedicalHistory>entity - to filterpublic int delete(int id)
ICruddelete in interface ICrud<MedicalHistory>id - of entitypublic int update(int id,
MedicalHistory newEntity)
ICrudupdate in interface ICrud<MedicalHistory>id - to updatenewEntity - includes the new values for update a entity