Exemplo n.º 1
0
 @Override
 public void createType(String name, NoteType parentNoteType) {
   NoteType t = new NoteType();
   t.setName(name);
   t.setParentType(parentNoteType);
   typeDAO.insert(t);
 }
Exemplo n.º 2
0
 @Override
 public boolean isTypeExist(NoteType noteType) {
   if (noteType.getId() == null) {
     return !typeDAO.selectByNameParentType(noteType).isEmpty();
   } else {
     return !typeDAO.selectByParentTypeNameDiffId(noteType).isEmpty();
   }
 }
Exemplo n.º 3
0
 @Override
 public void showType(NoteType noteType) {
   noteType.setShow(0);
   typeDAO.update(noteType);
 }
Exemplo n.º 4
0
 @Override
 public void logicalDeleteType(NoteType noteType) {
   noteType.setDel(1);
   typeDAO.update(noteType);
 }
Exemplo n.º 5
0
 @Override
 public void deepDeleteType(NoteType noteType) {
   typeDAO.delete(noteType);
   noteDAO.deepDeleteByType(noteType.getId());
 }