org.exolab.castor.persist

Class 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(String table, String[] key, int[] keyType, TypeConvertor[] idTo, TypeConvertor[] idFrom, String[] idParam, String[] otherKey, int[] otherKeyType, TypeConvertor[] ridTo, TypeConvertor[] ridFrom, String[] ridParam)

Method Summary

void
createRelation(Connection conn, Object leftValue, Object rightValue)
void
deleteRelation(Connection conn, Object leftValue)
void
deleteRelation(Connection conn, Object leftValue, Object rightValue)

Constructor Details

SQLRelationLoader

public SQLRelationLoader(String table,
                         String[] key,
                         int[] keyType,
                         TypeConvertor[] idTo,
                         TypeConvertor[] idFrom,
                         String[] idParam,
                         String[] otherKey,
                         int[] otherKeyType,
                         TypeConvertor[] ridTo,
                         TypeConvertor[] ridFrom,
                         String[] ridParam)

Method Details

createRelation

public void createRelation(Connection conn,
                           Object leftValue,
                           Object rightValue)
            throws PersistenceException

deleteRelation

public void deleteRelation(Connection conn,
                           Object leftValue)
            throws PersistenceException

deleteRelation

public void deleteRelation(Connection conn,
                           Object leftValue,
                           Object rightValue)
            throws PersistenceException

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com