public method O2GMessagesTable.getNextRowByColumnValues

Brief

Gets the next row from O2GMessagesTable based on any of the column values.

Declaration
Java
O2GMessageTableRow  getNextRowByColumnValues (String columnName, Object[] columnValues, O2GTableIterator iterator)

Parameters
columnName

The name of a column in the Messages table. For example, From.

columnValues

The values of the column specified by the columnName parameter. For example, if you want to search the Messages table for pop-up messages only, the columnName parameter value is Type, and the columnValues parameter value is an array of 1 and 2.

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 pop-up messages [hide]

    public void enumeratePopUpMessages() {
        O2GMessagesTable messages = (O2GMessagesTable)mTblMgr.getTable(O2GTableType.MESSAGES);
        O2GTableIterator iterator = new O2GTableIterator();
        Object[] columnValues = new Object[] { "1", "2" };
        O2GMessageTableRow message = messages.getNextRowByColumnValues("Type", columnValues, iterator);
        while (message != null) {
            System.out.println(String.format("MsgID=%s, From=%s, To=%s",
                    message.getMsgID(), message.getFrom(), message.getTo()));
            message = messages.getNextRowByColumnValues("Type", columnValues, iterator);
        }
    }

Declared in O2GMessagesTable

back