예제 #1
0
 @Override
 public boolean isTypeExist(NoteType noteType) {
   if (noteType.getId() == null) {
     return !typeDAO.selectByNameParentType(noteType).isEmpty();
   } else {
     return !typeDAO.selectByParentTypeNameDiffId(noteType).isEmpty();
   }
 }
예제 #2
0
 @Override
 public void createType(String name, NoteType parentNoteType) {
   NoteType t = new NoteType();
   t.setName(name);
   t.setParentType(parentNoteType);
   typeDAO.insert(t);
 }
예제 #3
0
 @Override
 public List<NoteType> findHiddenType() {
   return typeDAO.selectHidden();
 }
예제 #4
0
 @Override
 public void showType(NoteType noteType) {
   noteType.setShow(0);
   typeDAO.update(noteType);
 }
예제 #5
0
 @Override
 public void updateTypeDyn(NoteType noteType) {
   typeDAO.update(noteType);
 }
예제 #6
0
 @Override
 public void updateParentType(List<NoteType> noteTypes, int newParentTypeId) {
   typeDAO.updateParentType(noteTypes, newParentTypeId);
 }
예제 #7
0
 @Override
 public Integer getMaxTypeNo() {
   Integer maxNow = typeDAO.selectMaxTypeNo();
   return (maxNow != null ? maxNow : 0);
 }
예제 #8
0
 @Override
 public List<NoteType> getAllTypes() {
   return typeDAO.selectAll();
 }
예제 #9
0
 @Override
 public void logicalDeleteType(NoteType noteType) {
   noteType.setDel(1);
   typeDAO.update(noteType);
 }
예제 #10
0
 @Override
 public void deepDeleteType(NoteType noteType) {
   typeDAO.delete(noteType);
   noteDAO.deepDeleteByType(noteType.getId());
 }
예제 #11
0
 @Override
 public void createType(NoteType t) {
   typeDAO.insert(t);
 }