Package net.sf.minuteProject.configuration.bean.model.data

Examples of net.sf.minuteProject.configuration.bean.model.data.Component


  public Component getRoot() {
    return getUpperElement(this);
  }

  private Component getUpperElement (Component component) {
    Component parent = getParent();
    if (parent==null)
      return component;
    else
      return getUpperElement(parent);
  }
View Full Code Here


    Package pack = copyPackage(table);
    Hashtable<String, Component> components = new Hashtable<String, Component>();
    for (Column column : table.getColumns()) {
      String key = getComponentBeanPath(table.getName(), column.getName());
      String fullPath = getComponentBeanPropertyPath(table.getName(), column.getName());
      Component component = components.get(key);
      if (component==null) {
        // to set in create New component
        component = new ComponentDDLUtils();
        component.setPath(key);
        component.setName(getBeforeLastInPathElement(fullPath));
        //Package pack = table.getPackage();
        //pack.setName(pack.getName()+StringUtils.lowerCase(FormatUtils.getJavaName(table.getName())));
        component.setPackage(pack);
        component.setTable (table);
      }
      column.setName(getLastInPathElement(fullPath));
      component.addColumn(column);
      components.put(key, component);
    }
    return components;
  }
View Full Code Here

      StringBuffer sb = new StringBuffer();
      for (int i = 0; i < st.countTokens(); i++) {
        String componentName = (String)st.nextToken();
        sb.append(componentName);
        String currentPath = sb.toString();
        Component component2 = (Component)input.get(currentPath);
        if (component2==null) { 
          component2 = createNewComponent(componentName,currentPath, component);
          output.put(currentPath, component2);
        }   
      }
View Full Code Here

    }
    return output;
  }
 
  private static Component createNewComponent(String componentName, String path, Component component) {
    Component componentNew = new ComponentDDLUtils();
    componentNew.setPath(path);
    componentNew.setName(componentName);
    //Table table = component.getTable();
    Package pack = component.getPackage();
    //pack.setName(pack.getName()+StringUtils.lowerCase(FormatUtils.getJavaName(table.getName())));
    componentNew.setPackage(pack);
    componentNew.setTable(component.getTable());
    return componentNew;
   
  }
View Full Code Here

  private static Hashtable<String, Component> getSetAllParentChildRelationship (Hashtable<String, Component> input) {
    for (Component component : input.values()) {
      String path = component.getPath();
      String upPath = getPathBeforeLastInPathElement(path);
      Component parent = (Component)input.get(upPath);
      if (!upPath.equals("")) {
        if (parent==null) {
          System.out.println("Error in composition of the component tree");
        } else {
          component.setParent(parent);
          parent.addChild(component);
        }     
      }
    }   
    return input;
  }
View Full Code Here

        return; //stop generating directive
      context.put("updatedAreas", updatedAreas);
    String beanName = getAbstractBeanName(bean);
    context.put(beanName, bean);
    if (bean instanceof Component) {
      Component component = (Component) bean;
      Table table = component.getTable();
      context.put("table", table);
    }   
    if (bean instanceof Function) {
      context.put("table", bean);
    }   
View Full Code Here

      context.put("updatedAreas", updatedAreas);
    }
    String beanName = getAbstractBeanName(bean);
    context.put(beanName, bean);
    if (bean instanceof Component) {
      Component component = (Component) bean;
      Table table = component.getTable();
      context.put("table", table);
    }   
    if (bean instanceof Function) {
      context.put("function", bean);
      context.put("table", ((Function)bean).getEntity(Direction.ANY));
View Full Code Here

TOP

Related Classes of net.sf.minuteProject.configuration.bean.model.data.Component

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.