Package net.sf.minuteProject.loader.mapping.node

Examples of net.sf.minuteProject.loader.mapping.node.Bean


  public static final String DEFAULT_SUPER_CLASS = "DEFAULT_SUPER_CLASS";
  public static final String DEFAULT_SUPER_CLASS_OTHERWISE_SPECIFIED = "DEFAULT_SUPER_CLASS_OTHERWISE_SPECIFIED";

 
  public String getTypeFormObjectVariable (String variable, String objectName, BeanMapping beanMapping) {
    Bean bean = getBean(beanMapping, objectName);
    for (BeanAttribute att : bean.getAttributes()) {
      if (att.getName().equals(variable))
        return getType(att);
    }
    return "NOT TYPE FOUND";
  }
View Full Code Here


      return beanAttribute.getRefType();
    return type;
  }
 
  private BeanAttribute getBeanAttribute (String beanName, String attributeName, BeanMap beanMap) {
    Bean bean = getBean(beanMap, beanName);
    if (bean!=null) {
      getBeanAttribute(bean, attributeName);
    }
    return null;
  }
View Full Code Here

    String packageName = beanAttribute.getPackageName();
    if (packageName==null)
      return "ATTRIBUTE_DOES_NOT_HAVE_PACKAGE";
    if (!packageName.equals(""))
      return packageName;
    Bean attributeBean = getBean(beanAttribute);
    if (attributeBean==null)
      return "ATTRIBUTE_DOES_NOT_HAVE_PACKAGE";   
    return attributeBean.getPackageName();
  }
View Full Code Here

    }
    return "BEAN CANNOT BE NULL";
  }
 
  public String getBeanClassName (String beanName, BeanMapping beanMapping, Template template) {
    Bean bean = getBean(beanMapping, beanName);
    return getBeanClassName(bean, template);   
  }
View Full Code Here

    Bean bean = getBean(beanMapping, beanName);
    return getBeanClassName(bean, template);   
  }
 
  public String getBeanClassName (String beanName, BeanMap beanMap, Template template) {
    Bean bean = getBean(beanMap, beanName);
    return getBeanClassName(bean, template);   
  }
View Full Code Here

    Bean bean = getBean(beanMap, beanName);
    return getBeanClassName(bean, template);   
  }
 
  public String getBeanClassName (BeanAttribute beanAttribute, Template template) {
    Bean bean = getBean(beanAttribute);
    if (bean!=null) {
      getBeanClassName(bean, template);
    }
    return FormatUtils.firstUpperCase(beanAttribute.getRefType());
  }
View Full Code Here

    return getBeanDefaultSuperInfo (info);
  }
 
  private String getBeanSuperInfo (BeanMap beanMap, Bean bean, String info) {
    if (!bean.getExtendType().equals(DEFAULT_STRING_RETURN)) {
      Bean superBean = getBean(bean.getBeanMap(), bean.getExtendType());
      if (superBean!=null) {
        if (info.equals(NAME_INFO))
            return superBean.getName();
        if (info.equals(PACKAGE_INFO))
            return superBean.getPackageName();       
      }
    }
    return DEFAULT_STRING_RETURN;
  }
View Full Code Here

    return !isToGenerateBasedOnIsInPackage(template, generatorBean);
  }
 
  public boolean isToGenerateBasedOnIsInPackage(Template template, GeneratorBean generatorBean) {
      if (generatorBean instanceof Bean) {
        Bean bean = (Bean)generatorBean;
        return bean.isInPackage();
      }
      if (generatorBean instanceof Service) {
        Service service = (Service)generatorBean;
        return service.isInPackage();
      }     
View Full Code Here

//    System.out.println("function input ="+function.getInput());
    StringTokenizer st = new StringTokenizer(function.getInput(),",");
    while (st.hasMoreTokens()) {
      String s = (String) st.nextToken();
//      System.out.println("token = "+s);
      Bean bean = mappingMapBeanUtils.getBean(function.getBeanMap(), s);
//      System.out.println("bean = "+bean);
      list.add(bean);
   
    return list;
  }
View Full Code Here

  }
 
  public Map<String, Bean> getDistinctVariables(Function function) {
    Map<String, Bean> map = new HashMap<String, Bean>();
    for (Variable variable : function.getVariables().getVariables()) {
      Bean bean = mappingMapBeanUtils.getBean(function.getBeanMap(), variable.getBean());
      if (bean!=null)
        map.put(variable.getName(), bean);
    }
    return map;
  }
View Full Code Here

TOP

Related Classes of net.sf.minuteProject.loader.mapping.node.Bean

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.