home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-03-18 | 2.8 KB | 50 lines |
- /*
- * @(#MutableCollectionAccess.java
- *
- * Copyright (c) 1997 Symantec Corporation. All Rights Reserved.
- *
- */
-
- package symantec.itools.db.beans.binding.databus;
- public interface MutableCollectionAccess extends CollectionAccess
- {
- public void addDataItem(DataItem item);
-
- //This method adds the indicated data item to this collection. The implementation must create a copy of
- // the new value from the argument object before returning, rather than saving a reference to it, because
- // the caller may change its value after the return. In obtaining the new value from the argument, the
- //provider's implementation may need to make a deep (recursive) copy of the new value to get all values
- //changed by the consumer.
-
- //The implementation defines where the item is added to the collection. Following the addition of a new
- //item, if a DataCursor has been established on the collection, the new item may or may not be
- //accessible through the cursor, again depending on the implementation.
-
- public void insertBeforeCursor(DataCursor where, DataItem item);
-
- public void insertAfterCursor(DataCursor where, DataItem item);
-
- // This method inserts a copy of the indicated data item into this collection at the position indicated by the
- // cursor. The implementation must create a copy of the new value from the argument object before
- // returning, rather than saving a reference to it, because the caller may change its value after the return. In
- // obtaining the new value from the argument, the provider's implementation may need to make a deep
- // (recursive) copy of the new value to get all values changed by the consumer.
-
- //Some implementations may choose not to support this method, for example an unordered collection
- // where the cursor has no particular meaning. Such sources must throw the exception (TBD), and
- // document that the addDataItem is the only way to add an item to the collection.
-
- public void removeDataItem(DataItem item);
-
- //This method removes locates the referenced item and removes it from this collection. The reference
- // must be to an item returned from the collection, not one constructed by the client with the same value.
- // This method may throw an exception as appropriate to the various failures possible in the
- // implementation, or to indicate that the method is not supported.
-
- public void removeAtCursor(DataCursor cursor);
-
- //This method removes the item referenced by the cursor from this collection. The effect on the
- //DataCursor, if any, is defined by the implementation. This method may throw an exception as
- //appropriate to the various failures possible in the implementation, or to indicate that the method is not
- //supported.
- }