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

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


//    System.out.println("m2m = "+m2m.getName());
    return getTargetReferenceEntityByMany2ManyForTag(origin, m2m, tag);
  }
 
  public static Reference getTargetReferenceEntityByMany2Many (Reference origin) {
    Table m2m = origin.getForeignTable();
    return getTargetReferenceEntityByMany2Many(origin, m2m);
  }
View Full Code Here


 
  public static Reference[] getLinkedRefenceByChildrenForTag (Table table, String tag, boolean filterMany2Many) {
    List<Reference> list = new ArrayList<Reference>();
    Reference[] reference = table.getChildren();
    for (int i = 0; i < reference.length; i++) {
      Table child = reference[i].getForeignTable();
      if (hasTag(child, tag))
        if (filterMany2Many) {
          if (child.isManyToMany())
            list.add(reference[i]);
        } else
        list.add(reference[i]);
    }
    return (Reference[]) list.toArray(new Reference[list.size()]);
View Full Code Here

    List<Reference> list = new ArrayList<Reference>();
//    System.out.println(">>table="+table);
//    System.out.println(">>table="+table.getName());
    Reference[] reference = table.getChildren();
    for (int i = 0; i < reference.length; i++) {
      Table child = reference[i].getForeignTable();
//      if (hasTag(child, tag))
        if (filterMany2Many) {
          if (child.isManyToMany()) {
            boolean present = false;
            for (Reference ref : list) {
              if (ref==reference[i]) present = true;
              break;
            }
View Full Code Here

    return (template.getPropertyValue(template.getPropertyValue(name))!=null)?true:false;
  }
 
  public static boolean isToGenerateBasedOnTagAndNotMany2Many(Template template, GeneratorBean bean) {
    if (bean instanceof Table) {
      Table table = (Table) bean;
      if (!table.isManyToMany()) {
        //return isToGenerateBasedOnTag(template, table);
        return true;
      }
    }
    return false;
View Full Code Here

    return false;
  }
 
  public static boolean isToGenerateBasedOnCompositePKNotMany2Many (Template template, GeneratorBean bean) {
    if (bean instanceof Table) {
      Table table = (Table) bean;
      return TableUtils.isCompositePrimaryKeyNotMany2Many(table);
    }
    return false;   
  }
View Full Code Here

    return false;   
  }
 
  public static boolean isToGenerateBasedOnNotMany2Many(Template template, GeneratorBean bean) {
    if (bean instanceof Table) {
      Table table = (Table) bean;
      if (!table.isManyToMany()) {
//        return isToGenerateBasedOnTag(template, table);
        return true;
      }
    }
    else if (bean instanceof View)
View Full Code Here

  }
 
  public static Table getTableOnly(Database database, String tablename){
    int maxTable = database.getTables().length;
    for (int i = 0; i < maxTable; i++) {
      Table table = database.getTables()[i];
      if (table.getName()!=null
        && table.getType()!=null
        && tablename!=null
        && table.getName().toUpperCase().equals(tablename.toUpperCase())
        && table.getType().equals(Table.TABLE))
        return table;
    }
    return null;
  }
View Full Code Here

  }

  public static Table getTableOnlyFromAlias(Database database, String tablename){
    int maxTable = database.getTables().length;
    for (int i = 0; i < maxTable; i++) {
      Table table = database.getTables()[i];
//      System.out.println("table.getAlias()="+table.getAlias()+"-name:"+table.getName());
      if (table.getAlias()!=null
        && table.getType()!=null
        && tablename!=null
        && table.getAlias().toUpperCase().equals(tablename.toUpperCase())
        && table.getType().equals(Table.TABLE))
        return table;
    }
    return null;
  }
View Full Code Here

      return Table.VIEW;
    return "NO_TYPE";
  }
 
  public static Table getEntity(Database database, String name) {
    Table table = getTableOnly(database, name);
    if (table==null)
      table = (Table) getView(database, name);
    return table;
  }
View Full Code Here

      table = (Table) getView(database, name);
    return table;
  }
 
  public static Table getEntityFromAlias(Database database, String name) {
    Table table = getTableOnlyFromAlias(database, name);
    if (table==null)
      table = (Table) getViewFromAlias(database, name);
    return table;
  }
View Full Code Here

TOP

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

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.