|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.ibm.etill.framework.xdm.QueryRequest
An abstract base class for all of the query request objects. The QueryRequest object encapsulates the standard parameters that are required for all queries on Payment Server objects.
Its direct known subclasses are AccountQueryRequest
,
CassetteQueryRequest
, ErrorQueryRequest
,
EventListenerQueryRequest
, FinancialObjectQueryRequest
,
MerchantQueryRequest, PayServerQueryRequest, PaymentSystemQueryRequest
.
Cassettes extend this class to build their own classes which perform database query. A substantial amount of cassette processing is centered around getting and using persistent objects data.
Inner Class Summary | |
---|---|
protected class |
QueryRequest.QueryCondition
An inner class used to build a query condition. |
Field Summary | |
---|---|
protected Vector |
objects
A vector to hold PSServerObjects objects. |
protected static int |
QueryRequestAll
|
protected int |
resultCount
|
protected Integer |
returnAtMost
|
protected static String |
RS_COUNT
|
Constructor Summary | |
---|---|
protected |
QueryRequest(int kind)
Constructor used to retrieveAll Admin queries |
protected |
QueryRequest(QueryRequest originalRequest)
A copy constructor for Payment/Credit queries within OrderQuery |
|
QueryRequest(String command,
Hashtable keywords,
Hashtable srcMapping)
A constructor with parameters |
Method Summary | |
---|---|
protected abstract String |
fromClause()
|
int |
getApproximateXDMSize()
Sums the approximate sizes of all of the PSServerObjects contained in the QueryRequest |
protected Boolean |
getBooleanParameter(String keyword)
Returns true or false value from a boolean parameter. |
protected String[] |
getCassetteListParameter(String keyword)
Returns an array of strings from a cassette list parameter. |
protected String |
getCassetteParameter(String keyword)
Returns a string value from a cassette parameter. |
String |
getCommand()
Gets the QueryRequest command. |
protected Short |
getCurrencyParameter(String keyword)
Returns a Short value from a currency parameter. |
String |
getDTDPath()
Gets the value of the DTD Path. |
protected Integer[] |
getIntegerListParameter(String keyword)
Returns an array of Integer values from an integer list parameter. |
protected Integer |
getIntegerParameter(String keyword)
Returns an Integer value from an integer parameter. |
boolean |
getKeysOnly()
Gets the boolean value indicating whether the request is for keys only or not. |
Hashtable |
getKeywords()
Gets the hash table of keywords. |
protected Long |
getLongParameter(String keyword)
Returns a long value from a long parameter. |
protected Integer |
getMaxObjectsToReturn()
Gets the maximum number of objects to be returned in the query request. |
protected Integer[] |
getNonNegativeIntegerListParameter(String keyword)
Returns an array of Integer values from non-negative integer list parameter. |
protected Integer |
getNonNegativeIntegerParameter(String keyword)
Returns an array of Integer values from non-negative integer parameter. |
protected String[] |
getNumericTokenListParameter(String keyword)
Returns a list of string from numeric token list parameters. |
protected String |
getNumericTokenParameter(String keyword)
Returns a string from a numeric token parameter. |
Vector |
getObjects()
Gets the PSServerObjects objects. |
QueryRequest |
getOriginalRequest()
Gets the original request. |
int |
getResultCount()
Gets a count of this query result. |
protected Integer |
getReturnAtMost()
Retrieves the maximum number of objects to be returned in the query request. |
protected Short |
getShortParameter(String keyword)
Returns a Short value from a short parameter. |
boolean |
getShowSensitiveData()
Indicates whether this request should return the cassette's sensitive data to the user or hide it by masking with asterisks. |
protected String[] |
getStringListParameter(String keyword)
Returns a list of string list parameters. |
protected String |
getStringParameter(String keyword)
Returns a string parameter value. |
protected Timestamp |
getTimestampParameter(String keyword)
Returns a Timestamp value from a timestamp parameter. |
protected static void |
initializeSrcMapping(Hashtable srcMapping)
Initializes the srcMapping hash table. |
protected String |
orderBy()
|
protected abstract int |
processQueryResults(ResultSet resultSet)
|
protected void |
query()
Builds the query statement and executes the SQL query command. |
void |
queryCassettes(Vector allObjectsList)
Builds a hash table mapping payment type to a vector of PSServerObject . |
protected abstract String |
selectStatement()
These are abstract methods used to build a query statement. |
protected abstract String |
tableName()
|
protected void |
validateAmounts(String minKeyword,
Integer minAmount,
String maxKeyword,
Integer maxAmount)
Returns an array of Integer values from an integer list parameter. |
protected void |
validateModifiers()
Validates constrained parameters. |
protected void |
validateTimeInterval(String beginKeyword,
Timestamp beginTime,
String endKeyword,
Timestamp endTime)
Returns an array of Integer values from an integer list parameter. |
abstract String |
whereCondition()
|
Field Detail |
protected int resultCount
protected Integer returnAtMost
protected Vector objects
protected static final String RS_COUNT
protected static final int QueryRequestAll
Constructor Detail |
public QueryRequest(String command, Hashtable keywords, Hashtable srcMapping) throws com.ibm.etill.framework.payapi.ETillAbortOperation
command
- a string representing the query command which is one of the
constants defined in PaymentServletConstants
and
PaymentCommandConstants
keywords
- a hash table of query key words; for example, RC_MERCHANTNUMBERsrcMapping
- a hash table of keywords and requests return codes mappingcom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if catastrophic
errors are encounteredprotected QueryRequest(QueryRequest originalRequest)
originalRequest
- a QueryRequest
to be clonedprotected QueryRequest(int kind)
kind
- an unused integer value representing kind of requestMethod Detail |
public Vector getObjects()
PSServerObjects
objects.PSServerObjects
objectspublic int getApproximateXDMSize()
PSServerObjects
contained in the QueryRequest
PSServerObjects
objects in bytespublic String getCommand()
QueryRequest
command.public Hashtable getKeywords()
public String getDTDPath()
protected Integer getReturnAtMost()
public boolean getKeysOnly()
public boolean getShowSensitiveData()
public int getResultCount()
public QueryRequest getOriginalRequest()
QueryRequest
objectprotected Integer getMaxObjectsToReturn()
protected void validateModifiers() throws com.ibm.etill.framework.payapi.ETillAbortOperation
com.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if number of objects to return
is less than 0 or greater than QUERY_MAX_KEYS_TO_RETURN
QueryRequestConstants
protected String[] getStringListParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
keyword
- a string to be matched with entries in the keywords hash tablecom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected String getStringParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
keyword
- a string to be matched with entries in the keywords hash tablecom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected String[] getNumericTokenListParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
keyword
- a string to be matched with entries in the keywords hash tablecom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected String getNumericTokenParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
keyword
- a string to be matched with entries in the keywords hash tablecom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected String[] getCassetteListParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
keyword
- a string to be matched with entries in the keywords hash tablecom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected String getCassetteParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
keyword
- a string to be matched with entries in the keywords hash tablecom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected Long getLongParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
keyword
- a string to be matched with entries in the keywords hash tablecom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected Integer[] getIntegerListParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
Integer
values from an integer list parameter.keyword
- a string to be matched with entries in the keywords hash tableInteger
value that matched the keywordcom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected Integer getIntegerParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
Integer
value from an integer parameter.keyword
- a string to be matched with entries in the keywords hash tableInteger
value that matched the keywordcom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected Integer[] getNonNegativeIntegerListParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
Integer
values from non-negative integer list parameter.keyword
- a string to be matched with entries in the keywords hash tableInteger
value that matched the keywordcom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected Integer getNonNegativeIntegerParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
Integer
values from non-negative integer parameter.keyword
- a string to be matched with entries in the keywords hash tableInteger
value that matched the keywordcom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected Short getShortParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
Short
value from a short parameter.keyword
- a string to be matched with entries in the keywords hash tableShort
value that matched the keywordcom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected Short getCurrencyParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
Short
value from a currency parameter. The value is
validated against currency code length constraints.keyword
- a string to be matched with entries in the keywords hash tableShort
value that matched the keywordcom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected Boolean getBooleanParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
keyword
- a string to be matched with entries in the keywords hash tablecom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected Timestamp getTimestampParameter(String keyword) throws com.ibm.etill.framework.payapi.ETillAbortOperation
Timestamp
value from a timestamp parameter. The result is
validated against an upper bound timestamp. If the upper bound time is exceeded
an error condition is thrown.keyword
- a string to be matched with entries in the keywords hash tableTimestamp
value that matched the keywordcom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected void validateAmounts(String minKeyword, Integer minAmount, String maxKeyword, Integer maxAmount) throws com.ibm.etill.framework.payapi.ETillAbortOperation
Integer
values from an integer list parameter.keyword
- a string to be matched with entries in the keywords hash tableInteger
value that matched the keywordcom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected void validateTimeInterval(String beginKeyword, Timestamp beginTime, String endKeyword, Timestamp endTime) throws com.ibm.etill.framework.payapi.ETillAbortOperation
Integer
values from an integer list parameter.keyword
- a string to be matched with entries in the keywords hash tableInteger
value that matched the keywordcom.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during the processingprotected static void initializeSrcMapping(Hashtable srcMapping)
srcMapping
- a hash table of query commands and return codes.protected abstract String selectStatement()
QueryRequest
class.protected abstract String tableName()
protected abstract String fromClause()
public abstract String whereCondition()
protected String orderBy()
protected abstract int processQueryResults(ResultSet resultSet) throws com.ibm.etill.framework.payapi.ETillAbortOperation
protected void query() throws com.ibm.etill.framework.payapi.ETillAbortOperation
com.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if an error is encountered during processingpublic void queryCassettes(Vector allObjectsList) throws com.ibm.etill.framework.payapi.ETillAbortOperation
PSServerObject
.
For each cassette, build a CassetteQuery
by querying the cassette for
its objects. The output from this query is usually combined with non-cassette specific
information to form a query result.
allObjectsList
- a vector of PSSeverObject
com.ibm.etill.framework.payapi.ETillAbortOperation
- thrown if unrecoverable error is encountered
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |