public void bind ( Object object , String name ) throws ObjectNameNotUniqueException { /** * Is DB open? ODMG 3.0 says it has to be to call bind. */ if ( ! this . isOpen ( ) ) { throw new DatabaseClosedException ( "Database is not open. Must have an open DB to call bind." ) ; } /** * Is Tx open? ODMG 3.0 says it has to be to call bind. */ TransactionImpl tx = getTransaction ( ) ; if ( tx == null || ! tx . isOpen ( ) ) { throw new TransactionNotInProgressException ( "Tx is not open. Must have an open TX to call bind." ) ; } tx . getNamedRootsMap ( ) . bind ( object , name ) ; }
Associate a name with an object and make it persistent . An object instance may be bound to more than one name . Binding a previously transient object to a name makes that object persistent .