com.wm.data
Interface IDataHashCursor

All Superinterfaces:
IDataCursor

public interface IDataHashCursor
extends IDataCursor

This cursor class has been deprecated. To position a cursor by key, use the key-based methods in the IDataCursor or IDataSharedCursor class.

This interface defines methods you can use to traverse an IData object by key. It is returned by an IData object's getHashCursor method.

Because this interface extends IDataCursor, you can also use the methods from that interface to access, traverse, and manipulate the IData object--you may arbitrarily mix the methods in IDataHashCursor and IDataCursor as needed. For example, you might use IDataHashCursor.first(key) method to initially position the cursor at a particular key, and then use IDataCursor.next to move through the rest of the object.

If you write a class that implements the IData interface, that class must support the getHashCursor method and that method must return a class that implements this interface.

Note: The contents of an IData object is not synchronized, so information, such as the value returned by count, might not be accurate if multiple cursors modify a single IData.

See Also:
IData, IDataFactory, IDataCursor, IDataTreeCursor

Method Summary
 boolean first(java.lang.String key)
          Deprecated. Replaced by key-based methods in IDataCursor.
 boolean last(java.lang.String key)
          Deprecated. Replaced by key-based methods in IDataCursor.
 boolean next(java.lang.String key)
          Deprecated. Replaced by key-based methods in IDataCursor.
 boolean previous(java.lang.String key)
          Deprecated. Replaced by key-based methods in IDataCursor.
 
Methods inherited from interface com.wm.data.IDataCursor
delete, destroy, first, getCursorClone, getKey, getLastError, getValue, hasMoreData, hasMoreErrors, insertAfter, insertBefore, insertDataAfter, insertDataBefore, last, next, previous, setErrorMode, setKey, setValue
 

Method Detail

first

boolean first(java.lang.String key)
Deprecated. Replaced by key-based methods in IDataCursor.

Moves the cursor position to the first key/value pair that has the specified key. If there are no occurrences of the specified key, first returns false.

Specified by:
first in interface IDataCursor
Parameters:
key - a String that specifies the name of the key to which you want the cursor moved.
Returns:
true if the cursor was moved; false if the specified key does not exist in the IData object.
See Also:
previous(java.lang.String), next(java.lang.String), last(java.lang.String)

last

boolean last(java.lang.String key)
Deprecated. Replaced by key-based methods in IDataCursor.

Moves the cursor position to the last key/value pair that has the specified key. If there are no occurrences of the specified key, last returns false.

Specified by:
last in interface IDataCursor
Parameters:
key - a String that specifies the name of the key to which you want the cursor moved.
Returns:
true if the cursor was moved; false > if the specified key does not exist in the IData object.
See Also:
previous(java.lang.String), next(java.lang.String), first(java.lang.String)

next

boolean next(java.lang.String key)
Deprecated. Replaced by key-based methods in IDataCursor.

Moves the cursor position to the next key/value pair with the specified key. If the cursor has not yet been positioned within the IData object, the operation sets the cursor to the first occurrence of the key in the IData structure. If the cursor is already pointing to the last occurrence of the specified key, it cannot be moved using this method and next will return false.

Specified by:
next in interface IDataCursor
Parameters:
key - a String that specifies the name of the key to which you want the cursor moved.
Returns:
true if the cursor was moved; false otherwise.
See Also:
previous(java.lang.String), first(java.lang.String), last(java.lang.String)

previous

boolean previous(java.lang.String key)
Deprecated. Replaced by key-based methods in IDataCursor.

Moves the cursor position to the previous key/value pair with the specified key. If the cursor has not yet been positioned within the IData object, or if the cursor is already pointing to the first occurrence of the specified key, it cannot be moved using this method and previous will return false.

Specified by:
previous in interface IDataCursor
Parameters:
key - a String that specifies the name of the key to which you want the cursor moved.
Returns:
true if the cursor was moved; false otherwise.
See Also:
next(java.lang.String), first(java.lang.String), last(java.lang.String)