com.sage.orion.sdata.servlet
Class JDBCHelper.RequestPayloadProcessedInfo

java.lang.Object
  extended by com.sage.orion.sdata.servlet.JDBCHelper.RequestPayloadProcessedInfo
Enclosing class:
JDBCHelper

public static class JDBCHelper.RequestPayloadProcessedInfo
extends java.lang.Object

A read-only "struct-like" class that holds the processed information from the payload part of an SData insert (POST) or update (PUT) request.


Constructor Summary
JDBCHelper.RequestPayloadProcessedInfo(java.util.List<java.lang.String> columnNames, java.lang.String columnNamesForSql, java.util.List<java.lang.Object> columnValues, java.lang.String columnDynamicParamsForPreparedSql, int keyColumnValueCount, java.lang.String keyValuesSqlFilter)
          Constructs a struct-like object containing the processed information from the payload part of an SData insert (POST) or update (PUT) request.
 
Method Summary
 java.lang.String getColumnDynamicParamsForPreparedSql()
          Gets the comma-separated list of "?" (SQL indicating dynamic parameters) where there is one "?" per associated column.
 java.util.List<java.lang.String> getColumnNames()
          Gets the unmodifiable list of column (property) names from the payload.
 java.lang.String getColumnNamesForSql()
          Gets the comma-separated list of column names.
 java.util.List<java.lang.Object> getColumnValues()
          Gets the unmodifiable list of column (property) values from the payload.
 int getKeyColumnValueCount()
          Gets the number of key column values found in the payload.
 java.lang.String getKeyValuesSqlFilter()
          Gets the SQL filter (used in a WHERE clause) for selecting the record with those key values.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCHelper.RequestPayloadProcessedInfo

public JDBCHelper.RequestPayloadProcessedInfo(java.util.List<java.lang.String> columnNames,
                                              java.lang.String columnNamesForSql,
                                              java.util.List<java.lang.Object> columnValues,
                                              java.lang.String columnDynamicParamsForPreparedSql,
                                              int keyColumnValueCount,
                                              java.lang.String keyValuesSqlFilter)
Constructs a struct-like object containing the processed information from the payload part of an SData insert (POST) or update (PUT) request.

Parameters:
columnNames - The list of column (property) names from the payload.
columnNamesForSql - The comma-separated list of column names. That string is meant to be used as a clause in a SQL expression (such as SELECT) that lists the columns in question.
columnValues - The list of column (property) values from the payload.
columnDynamicParamsForPreparedSql - The comma-separated list of "?" (SQL indicating dynamic parameters) where there is one "?" per associated column. This lets us fill in the values of the prepared statement later using setObject calls.
keyColumnValueCount - The number of key column values found in the payload.
keyValuesSqlFilter - The SQL filter (used in a WHERE clause) for selecting the record with those key values. This filter is "" if there were no key column values. Also note that if there are more key columns than key column values included (in other words, if we only have part of a multi-segmented key), the filter may match multiple records.
Method Detail

getColumnNames

public java.util.List<java.lang.String> getColumnNames()
Gets the unmodifiable list of column (property) names from the payload.

Returns:
The unmodifiable list of column (property) names from the payload.

getColumnNamesForSql

public java.lang.String getColumnNamesForSql()
Gets the comma-separated list of column names. That string is meant to be used as a clause in a SQL expression (such as SELECT) that lists the columns in question.

Returns:
The comma-separated list of column names.

getColumnValues

public java.util.List<java.lang.Object> getColumnValues()
Gets the unmodifiable list of column (property) values from the payload.

Returns:
The unmodifiable list of column (property) values from the payload.

getColumnDynamicParamsForPreparedSql

public java.lang.String getColumnDynamicParamsForPreparedSql()
Gets the comma-separated list of "?" (SQL indicating dynamic parameters) where there is one "?" per associated column. This lets us fill in the values of the prepared statement later using setObject calls.

Returns:
The comma-separated list of "?" (SQL indicating dynamic parameters) where there is one "?" per associated column.

getKeyColumnValueCount

public int getKeyColumnValueCount()
Gets the number of key column values found in the payload.

Returns:
The number of key column values found in the payload.

getKeyValuesSqlFilter

public java.lang.String getKeyValuesSqlFilter()
Gets the SQL filter (used in a WHERE clause) for selecting the record with those key values. This filter is "" if no key values were included.

Returns:
The SQL filter (used in a WHERE clause) for selecting the record with those key values, or "" if no key values were included.


Copyright © 2011 Sage Software, Inc. All rights reserved.