1 /* 2 * The contents of this file are subject to the terms 3 * of the Common Development and Distribution License 4 * (the "License"). You may not use this file except 5 * in compliance with the License. 6 * 7 * You can obtain a copy of the license at 8 * glassfish/bootstrap/legal/CDDLv1.0.txt or 9 * https://glassfish.dev.java.net/public/CDDLv1.0.html. 10 * See the License for the specific language governing 11 * permissions and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL 14 * HEADER in each file and include the License file at 15 * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, 16 * add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your 18 * own identifying information: Portions Copyright [yyyy] 19 * [name of copyright owner] 20 */ 21 // Copyright (c) 1998, 2005, Oracle. All rights reserved. 22 package oracle.toplink.essentials.changesets; 23 24 import java.util.Hashtable; 25 import java.util.Vector; 26 27 /** 28 * <p> 29 * <b>Purpose</b>: Provide public API to the OrderedCollectionChangeRecord. 30 * <p> 31 * <b>Description</b>: OrderedCollections, used in TopLink SDK, must be tracked differently from regulat Collections. 32 * As the objects in the collection have a particular index which must be stored. This class stores the objects which must be written 33 * into the collection and the indexes they must be written in at. Inserting a new element at the beginning of the list will result 34 * in the intire list being stored in the change set as the index of all other objects has changed. Everything after the remove index will 35 * be remove. 36 */ 37 public interface OrderedCollectionChangeRecord extends ChangeRecord { 38 39 /** 40 * ADVANCED: 41 * This method returns the collection of indexes in which changes were made to this collection. 42 * @return java.util.Vector 43 */ 44 public Vector getAddIndexes(); 45 46 /** 47 * ADVANCED: 48 * This method returns the collection of ChangeSets that were added to the collection. 49 * The indexes of these objects are the Keys of the Hashtable 50 * @return java.util.Hashtable 51 */ 52 public Hashtable getAddObjectList(); 53 54 /** 55 * ADVANCED: 56 * This method returns the index from where objects must be removed from the collection 57 * @return int 58 */ 59 public int getStartRemoveIndex(); 60 } 61