/* * Copyright (c) 2007 Declarative Engineering LLC. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Declarative Engineering LLC * verson 1 which accompanies this distribution, and is available at * http://declarativeengineering.com/legal/DE_Developer_License_v1.txt */ package com.foundation.util; import com.common.util.ICollection; public interface ITrackedCollection extends ICollection { /** * Determines whether the collection has any changes. * @return Whether the collection as any adds or removes. */ public boolean hasCollectionChanges(); /** * Creates the collection of adds and removes since the change flags were last reset. * @param added The collection to be filled with added values. This can be null if adds are ignored. * @param removed The collection to be filled with removed values. This can be null if removes are ignored. */ public void getCollectionChanges(ICollection added, ICollection removed); /** * Resets the change tracking collections. *

Does nothing if the collection is a reflection.

*/ public void resetChangeTracking(); /** * Resets the change tracking for this object and all part-of objects. */ public void resetVirtualObjectChangeFlags(); /** * Reverses any changes to this object (requires that change tracking be enabled which it is by default). */ public void reverseObjectChanges(); /** * Reverses any changes to this object and to any objects that are marked as being part of this object. */ public void reverseVirtualObjectChanges(); }//ITrackedCollection//