|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IDao<T extends ITable>
Interface to implement DAO
| Method Summary | |
|---|---|
void |
createTableIfNotExists()
Create table for entity |
int |
delete(T entity)
Delete entity from database |
int |
insert(T entity)
Insert entity to database |
List<T> |
selectAllBy(List<String> fieldNames,
Object... fieldValues)
Select all entity objects with specified values of fields |
T |
selectBy(List<String> fieldNames,
Object... fieldValues)
Select first found entity object with specified values of fields |
int |
update(T entity)
Update entity in database |
| Method Detail |
|---|
void createTableIfNotExists()
throws AnnotationException
AnnotationException
T selectBy(List<String> fieldNames,
Object... fieldValues)
throws AnnotationException
fieldNames - list of field names (Recommend to use constants from entity class)fieldValues - array of filed values according and in the same order to fieldNames
AnnotationException
List<T> selectAllBy(List<String> fieldNames,
Object... fieldValues)
throws AnnotationException
fieldNames - list of field names (Recommend to use constants from entity class)fieldValues - array of filed values according and in the same order to fieldNames
AnnotationExceptionint insert(T entity)
entity - entity to insert
AnnotationExceptionint update(T entity)
entity - entity to update
int delete(T entity)
entity - entity to delete
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||