org.apache.ojb.broker.core
Class MtoNBroker

java.lang.Object
  extended by org.apache.ojb.broker.core.MtoNBroker

public class MtoNBroker
extends java.lang.Object

Manage all stuff related to non-decomposed M:N association.

Version:
$Id: MtoNBroker.java 365232 2005-12-21 22:36:07Z tomdz $
Author:
Thomas Mahler, Leandro Rodrigo Saad Cruz, Matthew Baird, Jakob Braeuchi, Armin Waibel

Constructor Summary
MtoNBroker(PersistenceBrokerImpl broker)
           
 
Method Summary
 void deleteMtoNImplementor(CollectionDescriptor cod, java.lang.Object obj)
          delete all rows from m:n table belonging to obj
 void deleteMtoNImplementor(CollectionDescriptor cod, java.lang.Object obj, java.util.Iterator collectionIterator, java.util.Collection mnKeys)
          deletes all rows from m:n table that are not used in relatedObjects
 void deleteMtoNImplementor(MtoNImplementor m2n)
           
 java.util.List getMtoNImplementor(CollectionDescriptor cod, java.lang.Object obj)
          get a Collection of Keys of already existing m:n rows
 void reset()
           
 void storeMtoNImplementor(CollectionDescriptor cod, java.lang.Object realObject, java.lang.Object otherObj, java.util.Collection mnKeys)
          Stores new values of a M:N association in a indirection table.
 void storeMtoNImplementor(MtoNImplementor m2n)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MtoNBroker

public MtoNBroker(PersistenceBrokerImpl broker)
Method Detail

reset

public void reset()

storeMtoNImplementor

public void storeMtoNImplementor(CollectionDescriptor cod,
                                 java.lang.Object realObject,
                                 java.lang.Object otherObj,
                                 java.util.Collection mnKeys)
Stores new values of a M:N association in a indirection table.

Parameters:
cod - The CollectionDescriptor for the m:n relation
realObject - The real object
otherObj - The referenced object
mnKeys - The all MtoNBroker.Key matching the real object

getMtoNImplementor

public java.util.List getMtoNImplementor(CollectionDescriptor cod,
                                         java.lang.Object obj)
get a Collection of Keys of already existing m:n rows

Parameters:
cod -
obj -
Returns:
Collection of Key

deleteMtoNImplementor

public void deleteMtoNImplementor(CollectionDescriptor cod,
                                  java.lang.Object obj)
delete all rows from m:n table belonging to obj

Parameters:
cod -
obj -

deleteMtoNImplementor

public void deleteMtoNImplementor(CollectionDescriptor cod,
                                  java.lang.Object obj,
                                  java.util.Iterator collectionIterator,
                                  java.util.Collection mnKeys)
deletes all rows from m:n table that are not used in relatedObjects

Parameters:
cod -
obj -
collectionIterator -
mnKeys -

storeMtoNImplementor

public void storeMtoNImplementor(MtoNImplementor m2n)
Parameters:
m2n -

deleteMtoNImplementor

public void deleteMtoNImplementor(MtoNImplementor m2n)
Parameters:
m2n -


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30