db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/util BrokerHelper.java
Date Sat, 19 Mar 2005 14:05:01 GMT
arminw      2005/03/19 06:05:01

  Modified:    src/java/org/apache/ojb/broker/util Tag: OJB_1_0_RELEASE
                        BrokerHelper.java
  Log:
  update javadoc
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.57.2.10 +38 -11    db-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java
  
  Index: BrokerHelper.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/BrokerHelper.java,v
  retrieving revision 1.57.2.9
  retrieving revision 1.57.2.10
  diff -u -r1.57.2.9 -r1.57.2.10
  --- BrokerHelper.java	18 Mar 2005 19:25:05 -0000	1.57.2.9
  +++ BrokerHelper.java	19 Mar 2005 14:05:01 -0000	1.57.2.10
  @@ -871,19 +871,33 @@
           }        
       }
   
  -    public void unlink(Object obj, CollectionDescriptor cds, List referencesToUnlink)
  +    /**
  +     * Unlink a bunch of 1:n or m:n objects.
  +     *
  +     * @param source The source object with reference.
  +     * @param cds The {@link org.apache.ojb.broker.metadata.CollectionDescriptor} of the
relation.
  +     * @param referencesToUnlink List of referenced objects to unlink.
  +     */
  +    public void unlink(Object source, CollectionDescriptor cds, List referencesToUnlink)
       {
           for(int i = 0; i < referencesToUnlink.size(); i++)
           {
  -            unlink(obj, cds, referencesToUnlink.get(i));
  +            unlink(source, cds, referencesToUnlink.get(i));
           }
       }
   
  -    public void unlink(Object obj, CollectionDescriptor cds, Object referenceToUnlink)
  +    /**
  +     * Unlink a single 1:n or m:n object.
  +     *
  +     * @param source The source object with reference.
  +     * @param cds The {@link org.apache.ojb.broker.metadata.CollectionDescriptor} of the
relation.
  +     * @param referenceToUnlink The referenced object to link.
  +     */
  +    public void unlink(Object source, CollectionDescriptor cds, Object referenceToUnlink)
       {
           if(cds.isMtoNRelation())
           {
  -            m_broker.deleteMtoNImplementor(new MtoNImplementor(obj, referenceToUnlink));
  +            m_broker.deleteMtoNImplementor(new MtoNImplementor(source, referenceToUnlink));
           }
           else
           {
  @@ -892,28 +906,41 @@
           }
       }
   
  -    public void link(Object obj, CollectionDescriptor cds, List referencesToLink)
  +    /**
  +     * Link a bunch of 1:n or m:n objects.
  +     *
  +     * @param source The source object with reference.
  +     * @param cds The {@link org.apache.ojb.broker.metadata.CollectionDescriptor} of the
relation.
  +     * @param referencesToLink List of referenced objects to link.
  +     */
  +    public void link(Object source, CollectionDescriptor cds, List referencesToLink)
       {
           for(int i = 0; i < referencesToLink.size(); i++)
           {
  -            link(obj, cds, referencesToLink.get(i));
  +            link(source, cds, referencesToLink.get(i));
           }
       }
   
  -    public void link(Object obj, CollectionDescriptor cds, Object referenceToLink)
  +    /**
  +     * Link a single 1:n or m:n object.
  +     *
  +     * @param source The source object with reference.
  +     * @param cds The {@link org.apache.ojb.broker.metadata.CollectionDescriptor} of the
relation.
  +     * @param referenceToLink The referenced object to link.
  +     */
  +    public void link(Object source, CollectionDescriptor cds, Object referenceToLink)
       {
           if(cds.isMtoNRelation())
           {
  -            m_broker.addMtoNImplementor(new MtoNImplementor(obj, referenceToLink));
  +            m_broker.addMtoNImplementor(new MtoNImplementor(source, referenceToLink));
           }
           else
           {
               ClassDescriptor cld = m_broker.getClassDescriptor(referenceToLink.getClass());
  -            m_broker.link(referenceToLink, cld, cds, obj, false);
  +            m_broker.link(referenceToLink, cld, cds, source, false);
           }
       }
   
  -
       /**
        * Returns an Iterator instance for {@link java.util.Collection}, object Array or
        * {@link org.apache.ojb.broker.ManageableCollection} instances.
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message