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