public class OrderSummary extends ERPInterfaceAS400 implements IOrderSummary
ERPInterfaceAS400.Pcml, ERPInterfaceAS400.Received
Modifier and Type | Field and Description |
---|---|
private static java.text.DecimalFormat |
FMT5
A number formatter of length 5.
|
protected java.lang.String |
ivCustomerPO
The PO number selection.
|
protected java.text.DateFormat |
ivDateFormatMDY
Month/day/year date formatter.
|
protected int |
ivDaysOfHistory
The supplied value that limits the orders retrieved to this many days
in the past.
|
protected java.util.Date |
ivFromDate
The starting date of the date range selection.
|
protected java.util.ArrayList<Order> |
ivOrders
A WIP collection of order summary objects.
|
protected java.lang.String |
ivOrderSelFlag
The supplied flag that indicates what status orders to retrieve.
|
protected java.lang.String |
ivProductCode
The product code selection.
|
protected java.util.Date |
ivReqShipDate
The requested ship date selection.
|
protected java.util.Date |
ivToDate
The ending date of the date range selection.
|
private static long |
serialVersionUID
The class' serialization version id.
|
AS400TEXT3, ivAS400, ivConfig
ivHashCode, ivHashFlds, ivObjAttrs
SELECT_ALL, SELECT_FOR_CONSOLIDATION, SELECT_OPEN
ERROR_CONNECT, ERROR_NONE, ERROR_PROGRAM, WARN_DUPLICATE, WARN_NONE
Constructor and Description |
---|
OrderSummary()
Constructs a new ERP order summary information interface.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
callProgram()
Calls the ERP program for execution.
|
java.util.ArrayList<Order> |
getOrderSummaryList(java.lang.String orderSelFlag,
int daysOfHistory,
java.util.Date fromDate,
java.util.Date toDate,
java.lang.String productCode,
java.lang.String customerPO,
java.util.Date reqShipDate)
Returns a list of order summary information for the current shopping user.
|
protected Order |
parseOrderSummary(ERPInterfaceAS400.Received rec)
Parses order summary data from the receive data queue and returns an
order summary object.
|
protected boolean |
parseQueueEntry(java.lang.String fmtid,
byte[] qbytes)
Parses a data queue entry that was received on the inbound receiving
data queue.
|
protected void |
sendDataQueue()
Places information on the outbound sending data queue.
|
equals, getContext, getEncryptAESLength, getErrorType, getMixedCase, getQueueKey, getRecordFormat, getRecordFormatFieldDecimals, getRecvQueue, getSendQueue, getStoreCompany, getStoreWarehouse, getWarningType, isEncryptAES, isYes, process, readDataQueue, setContext, setErrorType, setQueueKey, setWarningType
cloneMapAttributes, formatValue, formatValue, getHashFields, getMapArrayList, getMapAttributes, getMapBigDecimal, getMapBoolean, getMapDate, getMapDouble, getMapInteger, getMapLong, getMapMapped, getMapObject, getMapShort, getMapString, getMapString, getMapStringBuffer, getMapStringBuilder, getMapTime, getMapTimestamp, getMapVector, hashCode, setHashFields, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMapAttributes, setMapObject, setMapTime, setMapTimestamp, toStringArray
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getContext, getErrorType, getWarningType, setContext, setErrorType, setWarningType
private static final long serialVersionUID
private static final java.text.DecimalFormat FMT5
protected java.lang.String ivOrderSelFlag
protected int ivDaysOfHistory
protected java.util.Date ivFromDate
protected java.lang.String ivProductCode
protected java.lang.String ivCustomerPO
protected java.util.Date ivReqShipDate
protected java.util.Date ivToDate
protected java.util.ArrayList<Order> ivOrders
protected java.text.DateFormat ivDateFormatMDY
public OrderSummary()
public java.util.ArrayList<Order> getOrderSummaryList(java.lang.String orderSelFlag, int daysOfHistory, java.util.Date fromDate, java.util.Date toDate, java.lang.String productCode, java.lang.String customerPO, java.util.Date reqShipDate)
getOrderSummaryList
in interface IOrderSummary
orderSelFlag
- (String) Flag that designates how to select
orders (use constants, SELECT_OPEN, SELECT_ALL,
SELECT_FOR_CONSOLIDATION)daysOfHistory
- (int) Limits the orders retrieved to this many
days in the past.fromDate
- (Date) Selects only orders with order date greater than
or equal to this value. Requires toDate to be given and superceeds
daysOfHistory, if not null.toDate
- (Date) Selects only orders with order date greater than or
equal to this value. Requires from date to be given as well.productCode
- (String) Limits the orders retrieved to ones that
include this product code.customerPO
- (String) Limits the orders retrieved to ones that
include this PO number.reqShipDate
- (Date) Requested ship date of the current order.
Only used for order consolidation selection scenarios.protected boolean callProgram() throws java.lang.Exception
process
after
any data to be placed on the send queue has been successfully placed and
sent.
Overrides callProgram
in ERPInterfaceAS400
.callProgram
in class ERPInterfaceAS400
true
if the call was successful, otherwise
false
.java.lang.Exception
- - if an error occurs with the running of
the ERP program.protected boolean parseQueueEntry(java.lang.String fmtid, byte[] qbytes) throws java.lang.Exception
readDataQueue
for each queue entry that
is read for the current queue key.
Overrides parseQueueEntry
in ERPInterfaceAS400
.parseQueueEntry
in class ERPInterfaceAS400
fmtid
- (String) The record format id of the queue entry.qbytes
- (byte[]) The data queue entry's raw data.true
to read the next entry from the receive
data queue or false
to stop reading.java.lang.Exception
- - if an error occurs with reading data on
the queue.protected void sendDataQueue() throws java.lang.Exception
process
as the first step after a connection to the ERP system
has been successfully established.
Overrides sendDataQueue
in ERPInterfaceAS400
.sendDataQueue
in class ERPInterfaceAS400
java.lang.Exception
- - if an error occurs with placing data on
the queue and sending the queue.protected Order parseOrderSummary(ERPInterfaceAS400.Received rec) throws java.lang.Exception
rec
- (Received) The receive data queue data.java.lang.Exception
- - if an error occurs during the parsing of
the queue's data.