public method O2GOrdersTable.getNextRowByColumnValue

Brief

Gets the next row from O2GOrdersTable based on the column value.

Declaration
Java
O2GOrderTableRow  getNextRowByColumnValue (String columnId, Object columnValue, O2GTableIterator iterator)

Parameters
columnId

The name of a column in the Orders table. For example, RequestID.

columnValue

The value of the column specified by the columnId parameter. For example, if you created an entry order with attached stop/limit orders, all orders must have the same RequestID. If you want to search the Orders table for these orders only, the columnId parameter value is RequestID, the columnValue parameter value is obtained by calling the O2GRequest.getRequestId method.

iterator

The table iterator.

Details

If the row is not found, the method returns null.
Note: The returned row contains the current column values. The values are not automatically updated. To monitor changes, use IO2GTableListener.onChanged. The row interface is thread-safe. The returned row can be used in different threads without synchronization.

Example

Get orders with the same RequestID from the Orders table [hide]

    O2GOrdersTable ordersTable = (O2GOrdersTable)tableManager.getTable(O2GTableType.ORDERS);
    boolean found = false;
    O2GTableIterator iterator = new O2GTableIterator();
    O2GOrderTableRow order = ordersTable.getNextRowByColumnValue("RequestID", mRequestID, iterator);
    while (order != null) {
        found = true;
        System.out.println("OrderID: " + order.getOrderID() +
                           " Amount = " + order.getAmount() +
                           " BuySell = " + order.getBuySell() +
                           " Type = " + order.getType());
        order = ordersTable.getNextRowByColumnValue("RequestID", mRequestID, iterator);
    }
    if (!found) {
        System.out.println("No orders match your RequestID.");
    }

Declared in O2GOrdersTable

back