|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2001 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.mdr.storagemodel; import java.lang.ref.WeakReference; import java.lang.ref.Reference; import java.lang.ref.ReferenceQueue; import java.util.HashMap; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.Map; import java.util.List; import org.netbeans.mdr.persistence.MOFID; import org.netbeans.mdr.persistence.StorageException; import org.netbeans.mdr.persistence.StorageBadRequestException; /** * * @author Tomas Zezula */ public class TransientStorableClass extends StorableClass implements Transient { /** Creates a new instance of TransientStorableClass */ public TransientStorableClass() { super (); } public TransientStorableClass(MdrStorage mdrStorage, org.netbeans.mdr.persistence.MOFID packageId, org.netbeans.mdr.persistence.MOFID metaId, List attrDescs, List clAttrDescs, Map datatypes, boolean classDerived, boolean instanceDerived, boolean isSingleton, boolean isAbstract) throws StorageException { super (mdrStorage, packageId, metaId, attrDescs, clAttrDescs, datatypes, classDerived, instanceDerived, isSingleton, isAbstract); } public Collection allObjects (boolean subclasses) throws StorageException { if (subclasses) { return super.allObjects (subclasses); } else { return collectInstances (); } } public boolean isTransient () { return true; } private synchronized Collection collectInstances () throws StorageException { MdrStorage storage = this.getMdrStorage (); return new IndexImmutSet(storage, storage.getTransientStorage ().getMultivaluedIndex (MdrStorage.IDX_OBJECTS_BY_CLASSES), this.getMofId ()); } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.