org.apache.ojb.odmg
Class NamedRootsMap

java.lang.Object
  extended byorg.apache.ojb.odmg.NamedRootsMap

public class NamedRootsMap
extends java.lang.Object

ODMG NamedRoots implementation. this implementation stores the (name, Identity) pairs in a database table. therefore the NamedRootsMap underlies the same transaction management as all other persistent objects

Version:
$Id: NamedRootsMap.java,v 1.10 2003/08/20 19:43:46 brj Exp $
Author:
Thomas Mahler

Method Summary
 Identity get(java.lang.String key)
          lookup key in map.
static NamedRootsMap getInstance()
          factory method returns singleton instance
 void put(java.lang.String key, Identity oid)
          put a serialized version of oid into the map
 void unbind(java.lang.String key)
          remove an entry from the NamedRoots map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public Identity get(java.lang.String key)
lookup key in map. If found return a deserialized Identity object, else null


getInstance

public static NamedRootsMap getInstance()
factory method returns singleton instance


put

public void put(java.lang.String key,
                Identity oid)
         throws ObjectNameNotUniqueException
put a serialized version of oid into the map

Throws:
ObjectNameNotUniqueException

unbind

public void unbind(java.lang.String key)
            throws ObjectNameNotFoundException
remove an entry from the NamedRoots map

Throws:
ObjectNameNotFoundException


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14