Package pl.net.bluesoft.rnd.processtool.dict.mapping.metadata.entry

Examples of pl.net.bluesoft.rnd.processtool.dict.mapping.metadata.entry.EntryInfo


    return getPropertyInfo(item, property).getDictEntryProvider();
  }
                        
  public EntryInfo getEntryInfo(Class clazz) {
    if (!entryInfos.containsKey(clazz)) {
      EntryInfo entryInfo = new EntryInfo();
      entryInfo.setEntryClass(clazz);
      for (Field field : getDeclaredFields(clazz)) {
        if (field.getAnnotation(Key.class) != null) {
          entryInfo.setKeyProperty(field.getName());
          entryInfo.setKeyType(field.getType());
        }
        else if (field.getAnnotation(Value.class) != null) {
          entryInfo.setValueProperty(field.getName());
          entryInfo.setValueType(field.getType());
        }
        else if (field.getAnnotation(Description.class) != null) {
          entryInfo.setDescriptionProperty(field.getName());
          entryInfo.setDescriptionType(field.getType());
        }
        else {
          Ext ext = field.getAnnotation(Ext.class);
          if (ext != null) {
            ExtInfo extInfo = new ExtInfo();
            extInfo.setName(ext.name());
            extInfo.setProperty(field.getName());
            extInfo.setType(field.getType());
            Default def = field.getAnnotation(Default.class);
            if (def != null) {
              extInfo.setDefaultValue(def.value());
            }
            ComplexContent compl = field.getAnnotation(ComplexContent.class);
            if (compl != null) {
              extInfo.setElementClass(compl.elementClass());
              extInfo.setSeparator(compl.separator());
              extInfo.setDefaultNull(compl.defaultNull());
            }
            entryInfo.addExtInfo(extInfo);
          }
        }
      }
      entryInfos.put(clazz, entryInfo);
    }
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.processtool.dict.mapping.metadata.entry.EntryInfo

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.