org.exolab.castor.persist
Class SQLRelationLoader

java.lang.Object
  extended by org.exolab.castor.persist.SQLRelationLoader

public class SQLRelationLoader
extends java.lang.Object

SQLRelationLoader is a quick hack for creating and removing relation from a many-to-many relation database from ClassMolder. Eventually, it will be merged into SQLEngine. But, it requires chaning of the Persistence interface.

Author:
Thomas Yip

Constructor Summary
SQLRelationLoader(java.lang.String table, java.lang.String[] key, int[] keyType, TypeConvertor[] idTo, TypeConvertor[] idFrom, java.lang.String[] otherKey, int[] otherKeyType, TypeConvertor[] ridTo, TypeConvertor[] ridFrom)
           
 
Method Summary
 void createRelation(java.sql.Connection conn, Identity left, Identity right)
           
 void deleteRelation(java.sql.Connection conn, Identity left)
           
 void deleteRelation(java.sql.Connection conn, Identity left, Identity right)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLRelationLoader

public SQLRelationLoader(java.lang.String table,
                         java.lang.String[] key,
                         int[] keyType,
                         TypeConvertor[] idTo,
                         TypeConvertor[] idFrom,
                         java.lang.String[] otherKey,
                         int[] otherKeyType,
                         TypeConvertor[] ridTo,
                         TypeConvertor[] ridFrom)
Method Detail

createRelation

public void createRelation(java.sql.Connection conn,
                           Identity left,
                           Identity right)
                    throws PersistenceException
Throws:
PersistenceException

deleteRelation

public void deleteRelation(java.sql.Connection conn,
                           Identity left)
                    throws PersistenceException
Throws:
PersistenceException

deleteRelation

public void deleteRelation(java.sql.Connection conn,
                           Identity left,
                           Identity right)
                    throws PersistenceException
Throws:
PersistenceException


Copyright © 2011. All Rights Reserved.