Package cn.org.rapid_framework.generator.provider.db.table.model

Examples of cn.org.rapid_framework.generator.provider.db.table.model.Column


    private LinkedHashSet<SqlParameter> parseForSqlParameters(ParsedSql parsedSql,Sql sql) throws Exception {
      LinkedHashSet<SqlParameter> result = new LinkedHashSet<SqlParameter>();
      long start = System.currentTimeMillis();
      for(int i = 0; i < parsedSql.getParameterNames().size(); i++) {
        String paramName = parsedSql.getParameterNames().get(i);
        Column column = findColumnByParamName(parsedSql, sql, paramName);
        if(column == null) {
          column = specialParametersMapping.get(paramName);
          if(column == null) {
            //FIXME 不能猜测的column类型
            column = new Column(null,JdbcType.UNDEFINED.TYPE_CODE,"UNDEFINED",paramName,0,0,false,false,false,false,null,null);
          }
        }
        SqlParameter param = new SqlParameter(column);
       
        param.setParamName(paramName);
View Full Code Here


        for(SqlParameter customParam : customParameters) {
            if(customParam.getParamName().equals(paramName)) {
                return customParam;
            }
        }
      Column column = sql.getColumnByName(paramName);
      if(column == null) {
        //FIXME 还未处理 t.username = :username的t前缀问题
        column = findColumnByParseSql(parsedSql, SqlParseHelper.getColumnNameByRightCondition(parsedSql.toString(), paramName) );
      }
      if(column == null) {
View Full Code Here

    private Column findColumnByParseSql(ParsedSql sql, String paramName) throws Exception {
      Collection<NameWithAlias> tableNames = SqlParseHelper.getTableNamesByQuery(sql.toString());
      for(NameWithAlias tableName : tableNames) {
        Table t = TableFactory.getInstance().getTable(tableName.getName());
        if(t != null) {
          Column column = t.getColumnByName(paramName);
          if(column != null) {
            return column;
          }
        }
      }
View Full Code Here

        }

        List columns = getTableColumns(table, primaryKeys, indices, uniqueIndices, uniqueColumns);

        for (Iterator i = columns.iterator(); i.hasNext(); ) {
           Column column = (Column)i.next();
           table.addColumn(column);
        }

        // In case none of the columns were primary keys, issue a warning.
        if (primaryKeys.size() == 0) {
View Full Code Here

           boolean isUnique = columnsInUniqueIndex != null && columnsInUniqueIndex.size() == 1;
           if (isUnique) {
              GLogger.trace("unique column:" + columnName);
           }
           Column column = new Column(
                 table,
                 sqlType,
                 sqlTypeName,
                 columnName,
                 size,
View Full Code Here

TOP

Related Classes of cn.org.rapid_framework.generator.provider.db.table.model.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.