org.hydrateframework
Class ObjectRelationshipFactory

java.lang.Object
  extended by org.hydrateframework.ObjectRelationshipFactory

public class ObjectRelationshipFactory
extends java.lang.Object

This object is used to save many-to-many relationships into the relational database.

Version:
@(#)$Revision: 1.8 $
Author:
David Chamberlin

Nested Class Summary
static class ObjectRelationshipFactory.RelationshipMap<S,T>
           
 
Constructor Summary
ObjectRelationshipFactory(ObjectContext ctx, java.lang.String relName, java.lang.String nameA, java.lang.String nameB, ObjectFactory factA, ObjectFactory factB, java.lang.Class keyAssemblerA, java.lang.Class keyAssemblerB, java.lang.Class queryToUse, java.lang.String dsName)
          Construct the factory
 
Method Summary
 NamedParameterStatement getStatement(RequestContext rc)
           
 void save(SaveContext sc, ObjectRelationshipFactory.RelationshipMap map, java.lang.Class familyClass)
          Update the database with changes to the many-to-many relationship.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectRelationshipFactory

public ObjectRelationshipFactory(ObjectContext ctx,
                                 java.lang.String relName,
                                 java.lang.String nameA,
                                 java.lang.String nameB,
                                 ObjectFactory factA,
                                 ObjectFactory factB,
                                 java.lang.Class keyAssemblerA,
                                 java.lang.Class keyAssemblerB,
                                 java.lang.Class queryToUse,
                                 java.lang.String dsName)
Construct the factory

Parameters:
ctx - the ObjectContext from which this factory is saving objects.
Method Detail

getStatement

public NamedParameterStatement getStatement(RequestContext rc)
                                     throws SaveException
Returns:
the query object that is used to update the many-to-many link table.
Throws:
SaveException

save

public void save(SaveContext sc,
                 ObjectRelationshipFactory.RelationshipMap map,
                 java.lang.Class familyClass)
          throws SaveException
Update the database with changes to the many-to-many relationship.

Parameters:
sc - the save context that keeps track of the objects being saved
map - the many to many map relationship to be saved
Throws:
SaveException


Copyright © 2000 The Hydrate Project. All Rights Reserved.