Examples of DbParameterAccessor


Examples of dbfit.util.DbParameterAccessor

            while (rs.next()) {
                String paramName = rs.getString(1);
                if (paramName == null)
                    paramName = "";
                String dataType = rs.getString(2);
                DbParameterAccessor dbp = new DbParameterAccessor(paramName,
                        Direction.INPUT, getSqlType(dataType),
                        getJavaClass(dataType), position++);
                allParams.put(NameNormaliser.normaliseName(paramName), dbp);
            }
            rs.close();
View Full Code Here

Examples of dbfit.util.DbParameterAccessor

            } else {
                paramName = "$" + (position + 1);
                dataType = token;
            }

            DbParameterAccessor dbp = new DbParameterAccessor(paramName,
                    direction, getSqlType(dataType), getJavaClass(dataType),
                    position++);
            allParams.put(NameNormaliser.normaliseName(paramName), dbp);
        }

        if ("FUNCTION".equals(type)) {
            StringTokenizer s = new StringTokenizer(returns.trim()
                    .toLowerCase(), " ()");
            dataType = s.nextToken();

            if (!dataType.equals("void")) {
                allParams.put("", new DbParameterAccessor("",
                        Direction.RETURN_VALUE, getSqlType(dataType),
                        getJavaClass(dataType), -1));
            }
        }
View Full Code Here

Examples of dbfit.util.DbParameterAccessor

            Map<String, DbParameterAccessor> allParams = new HashMap<String, DbParameterAccessor>();
            int position = 0;
            while (rs.next()) {
                String columnName = rs.getString(1);
                String dataType = rs.getString(2);
                DbParameterAccessor dbp = new DbParameterAccessor(columnName,
                        Direction.INPUT,
                        typeMapper.getJDBCSQLTypeForDBType(dataType),
                        getJavaClass(dataType), position++);
                allParams.put(NameNormaliser.normaliseName(columnName), dbp);
            }
View Full Code Here

Examples of dbfit.util.DbParameterAccessor

                    paramName = "";
                String dataType = rs.getString(2);
                // int length=rs.getInt(3);
                String direction = rs.getString(4);
                Direction paramDirection = getParameterDirection(direction);
                DbParameterAccessor dbp = new DbParameterAccessor(paramName,
                        paramDirection, getSqlType(dataType),
                        getJavaClass(dataType),
                        paramDirection == RETURN_VALUE ? -1
                                : position++);
                allParams.put(NameNormaliser.normaliseName(paramName), dbp);
View Full Code Here

Examples of dbfit.util.DbParameterAccessor

                    paramName = "";
                String dataType = rs.getString(2);
                // int length=rs.getInt(3);
                String direction = rs.getString(4);
                Direction paramDirection = getParameterDirection(direction);
                DbParameterAccessor dbp = new DbParameterAccessor(paramName,
                        paramDirection, getSqlType(dataType),
                        getJavaClass(dataType),
                        paramDirection == RETURN_VALUE ? -1
                                : position++);
                allParams.put(NameNormaliser.normaliseName(paramName), dbp);
View Full Code Here

Examples of dbfit.util.DbParameterAccessor

            Map<String, DbParameterAccessor> allParams = new HashMap<String, DbParameterAccessor>();
            int position = 0;
            while (rs.next()) {
                String columnName = rs.getString(1);
                String dataType = rs.getString(2);
                DbParameterAccessor dbp = new DbParameterAccessor(columnName,
                        INPUT,
                        typeMapper.getJDBCSQLTypeForDBType(dataType),
                        getJavaClass(dataType), position++);
                allParams.put(NameNormaliser.normaliseName(columnName), dbp);
            }
View Full Code Here

Examples of dbfit.util.DbParameterAccessor

        command.generate();
        return command.toString();
    }

    private void addAccessor(Map<String, DbParameterAccessor> map, DbParameterAccessor acc) {
        DbParameterAccessor prevAcc = map.get(acc.getName());
        if (prevAcc != null) {
            // Duplicated parameters are indication for single IN/OUT one.
            // So merging them here.
            prevAcc.setDirection(Direction.INPUT_OUTPUT);
        } else {
            // Put a copy - we don't want to change shared state
            map.put(acc.getName(), acc.clone());
        }
    }
View Full Code Here

Examples of org.jtester.module.dbfit.db.model.DbParameterAccessor

      while (rs.next()) {
        String paramName = rs.getString(1);
        if (paramName == null)
          paramName = "";
        String dataType = rs.getString(2);
        DbParameterAccessor dbp = new DbParameterAccessor(paramName, DbParameterAccessor.INPUT,
            getSqlType(dataType), getJavaClass(dataType), position++);
        allParams.put(NameNormaliser.normaliseName(paramName), dbp);
      }

      return allParams;
View Full Code Here

Examples of org.jtester.module.dbfit.db.model.DbParameterAccessor

          token = s.nextToken();
        }
        String paramName = token;
        String dataType = s.nextToken();

        DbParameterAccessor dbp = new DbParameterAccessor(paramName, direction, getSqlType(dataType),
            getJavaClass(dataType), position++);
        allParams.put(NameNormaliser.normaliseName(paramName), dbp);
      }
      if ("FUNCTION".equals(type)) {
        StringTokenizer s = new StringTokenizer(returns.trim().toLowerCase(), " ()");
        String dataType = s.nextToken();
        allParams.put("", new DbParameterAccessor("", DbParameterAccessor.RETURN_VALUE, getSqlType(dataType),
            getJavaClass(dataType), -1));
      }
      return allParams;
    } finally {
      DBHelper.closeResultSet(rs);
View Full Code Here

Examples of org.jtester.module.dbfit.db.model.DbParameterAccessor

        int paramDirection;
        if (paramName.trim().length() == 0)
          paramDirection = DbParameterAccessor.RETURN_VALUE;
        else
          paramDirection = getParameterDirection(direction);
        DbParameterAccessor dbp = new DbParameterAccessor(paramName, paramDirection, getSqlType(dataType),
            getJavaClass(dataType), position++);
        allParams.put(NameNormaliser.normaliseName(paramName), dbp);
      }
      return allParams;
    } finally {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.