org.nakedobjects.persistence.sql
Class IndirectOneToManySqlCollectionMapper

java.lang.Object
  extended byorg.nakedobjects.persistence.sql.DatabaseAccess
      extended byorg.nakedobjects.persistence.sql.IndirectOneToManySqlCollectionMapper
All Implemented Interfaces:
SqlCollectionMapper

public class IndirectOneToManySqlCollectionMapper
extends DatabaseAccess
implements SqlCollectionMapper

Author:
Razvan Pocaznoi

Field Summary
 
Fields inherited from class org.nakedobjects.persistence.sql.DatabaseAccess
store
 
Constructor Summary
IndirectOneToManySqlCollectionMapper(SqlObjectStore store, java.lang.String relatedClass, java.lang.String indirectionTable, java.lang.String indirectionFkToParentName, java.lang.String indirectionFkToChildName)
           
 
Method Summary
 void add(java.lang.Object collectionOid, NakedObject object)
           
 boolean containsElement(java.lang.Object collectionOid, NakedObject element)
           
 boolean isFirstElement(java.lang.Object collectionOid, NakedObject element)
           
 boolean isLastElement(java.lang.Object collectionOid, NakedObject element)
           
 java.util.Vector nextElements(java.lang.Object collectionOid, NakedObject fromElement, int size)
           
 int numberOfElements(java.lang.Object collectionOid)
           
 java.util.Vector previousElements(java.lang.Object collectionOid, NakedObject toElement, int size)
           
 void remove(java.lang.Object collectionOid, NakedObject object)
           
 
Methods inherited from class org.nakedobjects.persistence.sql.DatabaseAccess
createKey, databaseContainsTable, getConnection
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndirectOneToManySqlCollectionMapper

public IndirectOneToManySqlCollectionMapper(SqlObjectStore store,
                                            java.lang.String relatedClass,
                                            java.lang.String indirectionTable,
                                            java.lang.String indirectionFkToParentName,
                                            java.lang.String indirectionFkToChildName)
Parameters:
store -
Method Detail

add

public void add(java.lang.Object collectionOid,
                NakedObject object)
         throws ObjectStoreException
Specified by:
add in interface SqlCollectionMapper
Throws:
ObjectStoreException

containsElement

public boolean containsElement(java.lang.Object collectionOid,
                               NakedObject element)
                        throws ObjectStoreException
Specified by:
containsElement in interface SqlCollectionMapper
Throws:
ObjectStoreException

isFirstElement

public boolean isFirstElement(java.lang.Object collectionOid,
                              NakedObject element)
                       throws ObjectStoreException
Specified by:
isFirstElement in interface SqlCollectionMapper
Throws:
ObjectStoreException

isLastElement

public boolean isLastElement(java.lang.Object collectionOid,
                             NakedObject element)
                      throws ObjectStoreException
Specified by:
isLastElement in interface SqlCollectionMapper
Throws:
ObjectStoreException

nextElements

public java.util.Vector nextElements(java.lang.Object collectionOid,
                                     NakedObject fromElement,
                                     int size)
                              throws ObjectStoreException
Specified by:
nextElements in interface SqlCollectionMapper
Throws:
ObjectStoreException

numberOfElements

public int numberOfElements(java.lang.Object collectionOid)
                     throws ObjectStoreException
Specified by:
numberOfElements in interface SqlCollectionMapper
Throws:
ObjectStoreException

previousElements

public java.util.Vector previousElements(java.lang.Object collectionOid,
                                         NakedObject toElement,
                                         int size)
                                  throws ObjectStoreException
Specified by:
previousElements in interface SqlCollectionMapper
Throws:
ObjectStoreException

remove

public void remove(java.lang.Object collectionOid,
                   NakedObject object)
            throws ObjectStoreException
Specified by:
remove in interface SqlCollectionMapper
Throws:
ObjectStoreException