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

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


  public DataDictionary read(String id,Model model) {
   
    model.addAttribute("valueTypes", SystemVariableUtils.getVariables(SystemDictionaryCode.ValueType));
    model.addAttribute("categoriesList", systemDictionaryManager.getDictionaryCategories());
   
    DataDictionary entity = new DataDictionary();
   
    if (StringUtils.isNotEmpty(id)) {
      entity = systemDictionaryManager.getDataDictionary(id);
    }
   
View Full Code Here


    }
   
    List<DataDictionary> dataDictionaries = systemVariableManager.getDataDictionariesByCategoryCode(systemDictionaryCode);
   
    for (Iterator<DataDictionary> iterator = dataDictionaries.iterator(); iterator.hasNext();) {
      DataDictionary dataDictionary = iterator.next();
     
      if (StringUtils.equals(dataDictionary.getValue(), value.toString())) {
        return dataDictionary.getName();
      }
    }
    return DEFAULT_DICTIONARY_VALUE;
  }
View Full Code Here

        if(type.equals("Date")) {
          type = "D";
        } else  if (type.equals("Double")) {
          type = "N";
        }
        result.add(new DataDictionary(ve.getName(),value.toString(),StringUtils.substring(type, 0, 1)));
      }
     
    }
   
    return result;
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");
    dataDictionary.setType(FieldType.I.toString());
    dataDictionary.setRemark("*");
   
    int beforeRow = countRowsInTable("TB_DATA_DICTIONARY");
    systemVariableManager.saveDataDictionary(dataDictionary);
    int afterRow = countRowsInTable("TB_DATA_DICTIONARY");
   
View Full Code Here

TOP

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

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.