public method O2GMessagesTable.getNextRowByColumnValue

Brief

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

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

Parameters
columnId

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

columnValue

The value of the column specified by the columnId parameter. For example, if you want to search the Messages table for messages from a specific sender only, the columnId parameter value is From, the columnValue parameter value is the sender's login ID.

iterator

The table iterator.

Details

If the row is not found, the method returns null.

Example

Get messages from a specific sender [hide]

    O2GMessagesTable messagesTable = (O2GMessagesTable)tableManager.getTable(O2GTableType.MESSAGES);
    boolean found = false;
    O2GTableIterator iterator = new O2GTableIterator();
    O2GMessageTableRow message = messagesTable.getNextRowByColumnValue("From", mSender, iterator);
    while (message != null) {
        found = true;
        System.out.println("MessageID: " + message.getMsgID() +
                           " From = " + message.getFrom() ++
                           " Text = " + message.getText());
        message = messagesTable.getNextRowByColumnValue("From", mSender, iterator);
    }
    if (!found) {
        System.out.println("You don't have any messages sent by " + mSender + ".");
    }

Declared in O2GMessagesTable

back