gov.nasa.arc.brahms.vm.api.convert
Interface IInstanceMapping

All Known Implementing Classes:
InstanceMappingSingleton

public interface IInstanceMapping

IInstanceMapping is an interface to access a mapping between existing Brahms and Java objects used to ensure that during the conversion between Brahms and Java objects no new objects are created when a mapping already exists, in that case state information is updated in the mapped object.

Version:
$Revision: 1.1 $ $Date: 2008/06/23 18:45:01 $ $Author: rvhoof $
Author:
Ron van Hoof

Method Summary
 void addMapping(java.lang.Object jobj, IObject bobj)
          Adds the specified mapping between the specified Java object and Brahms object.
 IObject getBrahmsMapping(java.lang.Object obj)
          Returns the Brahms object mapped to the specified Java object.
 java.lang.Object getJavaMapping(IObject obj)
          Returns the Java object mapped to the specified Brahms object.
 void removeMapping(java.lang.Object jobj, IObject bobj)
          Removes the specified mapping between the specified Java object and Brahms object.
 

Method Detail

addMapping

void addMapping(java.lang.Object jobj,
                IObject bobj)
Adds the specified mapping between the specified Java object and Brahms object. The mapping is maintained in a hashtable so the hashkey of each is used to maintain the mapping.

Parameters:
jobj - the Java Object being mapped
bobj - the Brahms IObject being mapped

removeMapping

void removeMapping(java.lang.Object jobj,
                   IObject bobj)
Removes the specified mapping between the specified Java object and Brahms object. The mapping is maintained in a hashtable so the hashkey of each is used to maintain the mapping.

Parameters:
jobj - the mapped Java Object
bobj - the mapped Brahms IObject

getJavaMapping

java.lang.Object getJavaMapping(IObject obj)
Returns the Java object mapped to the specified Brahms object.

Parameters:
obj - the Brahms IObject for which to return its Java counterpart
Returns:
Object the Java object mapped to the specified Brahms object, null if no mapping exists

getBrahmsMapping

IObject getBrahmsMapping(java.lang.Object obj)
Returns the Brahms object mapped to the specified Java object.

Parameters:
obj - the Java Object for which to return its Brahms counterpart
Returns:
IObject the Brahms object mapped to the specified Java object, null if no mapping exists


Copyright © 1997-2012 All Rights Reserved.