Package org.restsql.core

Examples of org.restsql.core.ResponseValue


          List<Set<ResponseValue>> childListResponseValues = null;
          Set<ResponseValue> childResponseValues = null;
          if (request.getType() == Type.INSERT) {
            childListResponseValues = new ArrayList<Set<ResponseValue>>(request
                .getChildrenParameters().size());
            responseValues.add(new ResponseValue(getChildRowsName(), childListResponseValues,
                Integer.MAX_VALUE));
            // Add parent params, since we won't be executing the write on the parent
            for (final TableMetaData table : metaData.getParentPlusExtTables()) {
              addRequestParamsToResponseValues(request, responseValues, table);
            }
View Full Code Here


      throws InvalidRequestException {
    if (request.getParameters() != null) {
      for (final RequestValue param : request.getParameters()) {
        final ColumnMetaData column = table.getColumns().get(param.getName());
        if (column != null && !column.isNonqueriedForeignKey()) {
          responseValues.add(new ResponseValue(param.getName(), param.getValue(), column
              .getColumnNumber()));
        }
      }
    }
    if (request.getResourceIdentifiers() != null) {
      for (final RequestValue param : request.getResourceIdentifiers()) {
        final ColumnMetaData column = table.getColumns().get(param.getName());
        if (column != null && !column.isNonqueriedForeignKey()) {
          column.normalizeValue(param); // this is called in the SQL Builder as well, but it's required here
                          // for parent res ids
          responseValues.add(new ResponseValue(param.getName(), param.getValue(), column
              .getColumnNumber()));
        }
      }
    }
  }
View Full Code Here

        // Find columns missing from the request params that are sequences and request the current value
        for (final ColumnMetaData column : table.getColumns().values()) {
          if (!request.hasParameter(column.getColumnLabel()) && column.isSequence()) {
            final int value = Factory.getSequenceManager().getCurrentValue(connection,
                column.getSequenceName());
            responseValues.add(new ResponseValue(column.getColumnLabel(), new Integer(value),
                column.getColumnNumber()));
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.restsql.core.ResponseValue

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.