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