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

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


  public static List<Column> getSemanticReferenceColumns(Table table) {
    List<Column> columns = new ArrayList<Column>();
    SemanticReference semanticReference = table.getSemanticReference();
    if (semanticReference!=null) {
      for (String sqlPath : semanticReference.getSemanticReferenceSqlPath()) {
        Column column = ColumnUtils.getColumn(table, sqlPath);
        if (column!=null)
          columns.add(column);
      }
    }
    return columns;
View Full Code Here


  public static Column getColumn(Table table, String columnName) {
    if (table!=null && columnName!=null) {
      columnName = columnName.toUpperCase();
      int maxColumn = table.getColumns().length;
      for (int i = 0; i < maxColumn; i++) {
        Column column = table.getColumns()[i];
        if (column.getName().toUpperCase().equals(columnName))
          return column;
      }
    }
    return null;   
  }
View Full Code Here

    }
    return null;   
  }
 
  public static String getPrimaryKeyClassName (Table table, String columnName) {
    Column column = getPrimaryKeyColumn(table, columnName);
    if (column==null) return "GET PRIMARY KEY COLUMN should not be null";
    return FormatUtils.getJavaName(column.getAlias());
  }
View Full Code Here

  public static Column getPrimaryKeyColumn(Table table, String columnName) {
    if (table!=null && columnName!=null) {
      columnName = columnName.toUpperCase();
      int maxColumn = table.getPrimaryKeyColumns().length;
      for (int i = 0; i < maxColumn; i++) {
        Column column = table.getPrimaryKeyColumns()[i];
        if (column.getName().toUpperCase().equals(columnName))
          return column;
      }
    }
    return null;   
  }
View Full Code Here

      String tablename = foreignKeys[i].getForeignTableName();
      Table table2 = TableUtils.getTable(database,tablename);
      String columnName = null;
      if (ref!=null)
        columnName = ref.getForeignColumnName();
      Column column2 = ColumnUtils.getColumn (table2, columnName);
      //reference = new Reference(table2, ColumnUtils.getColumn(table2, ref.getLocalColumnName()), tablename, ref.getLocalColumnName());
      reference = new Reference(table2, column2, tablename, columnName);
      reference.setLocalColumn(ref.getLocalColumn());
     
      //logger.info("table = "+tablename+", columnName = "+columnName);
View Full Code Here

                columnRef = new String();
                ref = fk[j].getReference(0);
                columnRef = ref.getLocalColumnName();
//                if (columnRef==null)
//                  logger.info("- no localcolumnName for tab");
                Column column2 = ColumnUtils.getColumn (tables[i], ref.getLocalColumnName());
                reference = new Reference(tables[i], column2, tables[i].getName(), ref.getLocalColumnName());
                reference.setLocalColumnName(ref.getLocalColumnName());
                reference.setForeignColumnName(ref.getForeignColumnName());
                addReference(list, reference);
              }
View Full Code Here

    String s = ConvertUtils.getJavaTypeFromDBFullType(RoutineUtils.getColumn(function.getReturnFunctionColumn()));
    return (s!=null)?s:JAVA_LANG_VOID;
  }
 
  public static String getReturnFullType (Function function) {
    Column column = RoutineUtils.getColumn(function.getReturnFunctionColumn());
    if (column==null)
      return JAVA_LANG_VOID;
    return getJooqFullType(column);
  }
View Full Code Here

    if (table.isManyToMany())
      return true;
    if (table.hasPrimaryKey()) {
      Column [] columns = table.getPrimaryKeyColumns();
      for (int i = 0; i < columns.length; i++) {
        Column column = columns[i];
        if (!ColumnUtils.isPkUserProvided(column))
          return false;
      }
      return true;
    }
View Full Code Here

//    Column c = getPrimaryColumnForLinkTable(database, column);
//    if (c==null) return "COLUMN should not be null!";
    return FormatUtils.getJavaName(column.getAlias());
  }
  public static String getColumnClassAliasUpperCaseForLinkTable(Database database, Column column) {
    Column c = getPrimaryColumnForLinkTable(database, column);
    if (c==null) return "COLUMN should not be null!";
    return FormatUtils.upperCase(c.getAlias());
  }
View Full Code Here

        ref.getLocalColumn().setAlias(newName);
    }
  }
 
  public static net.sf.minuteProject.configuration.bean.model.data.Reference getReference (Table table, String columnName) {
    Column column = ColumnUtils.getColumn(table, columnName);
    return getReference(column);
  }
View Full Code Here

TOP

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

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.