Constructor and Description |
---|
PatientJDBCTemplate() |
Modifier and Type | Method and Description |
---|---|
int |
create(Patient entity)
create a new entity of implement dao
|
int |
delete(int id)
delete a record from dao object
|
java.util.List<Patient> |
filterByEntity(Patient entity)
returns all filtered entities.
|
java.util.List<Patient> |
get()
gives all the records form the dao object
|
Patient |
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,
Patient newEntity)
update a entity of dao objects
|
public void setDataSource(javax.sql.DataSource dataSource)
ICrud
setDataSource
in interface ICrud<Patient>
dataSource
- database connectionpublic int create(Patient entity)
ICrud
public Patient getById(int id)
ICrud
public java.util.List<Patient> get()
ICrud
public java.util.List<Patient> filterByEntity(Patient entity)
ICrud
filterByEntity
in interface ICrud<Patient>
entity
- to filterpublic int delete(int id)
ICrud