Package com.github.dactiv.showcase.entity.foundation.variable

Examples of com.github.dactiv.showcase.entity.foundation.variable.DictionaryCategory


   
    List<DictionaryCategory> result = new ArrayList<DictionaryCategory>();
   
    for (DictionaryCategory r : list) {
      if (r.getParent() == null) {
        DictionaryCategory temp = new DictionaryCategory();
        BeanUtils.copyProperties(r, temp);
        mergeToParent(list,temp);
        result.add(temp);
      }
    }
View Full Code Here


    parent.setLeaf(false);
   
    for (DictionaryCategory r: list) {
     
      if (StringUtils.equals(r.getParentId(),parent.getId())) {
        DictionaryCategory temp = new DictionaryCategory();
        BeanUtils.copyProperties(r, temp);
        temp.setChildren(null);
        mergeToParent(list,temp);
        parent.getChildren().add(temp);
        parent.setLeaf(true);
      }
     
View Full Code Here

   *
   */
  @ModelAttribute("entity")
  public DictionaryCategory bindingModel(String id) {

    DictionaryCategory category = new DictionaryCategory();
   
    if (StringUtils.isNotEmpty(id)) {
      category = systemDictionaryManager.getDictionaryCategory(id);
    }

View Full Code Here

  private SystemVariableManager systemVariableManager;
 
  @Test
  @Transactional
  public void testSaveDictionaryCategory() {
    DictionaryCategory category = new DictionaryCategory();
    category.setCode("test");
    category.setName("测试");
    category.setRemark("*");
   
    int beforeRow = countRowsInTable("TB_DICTIONARY_CATEGORY");
    systemVariableManager.saveDictionaryCategory(category);
    int afterRow = countRowsInTable("TB_DICTIONARY_CATEGORY");
   
    assertEquals(afterRow, beforeRow + 1);
    assertFalse(category.getLeaf());
   
    DictionaryCategory parent = systemVariableManager.getDictionaryCategory("402881e437d47b250137d485274b0005");
    category.setParent(parent);
    systemVariableManager.saveDictionaryCategory(category);
    assertTrue(parent.getLeaf());
    category.setParent(null);
    systemVariableManager.saveDictionaryCategory(category);
    assertFalse(parent.getLeaf());
  }
View Full Code Here

  }
 
  @Test
  public void testSaveDataDictionary() {
   
    DictionaryCategory category = systemVariableManager.getDictionaryCategory("402881e437d467d80137d46fc0e50001");
   
    DataDictionary dataDictionary = new DataDictionary();
    dataDictionary.setCategory(category);
    dataDictionary.setName("test");
    dataDictionary.setValue("4");
View Full Code Here

TOP

Related Classes of com.github.dactiv.showcase.entity.foundation.variable.DictionaryCategory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.