com.webobjects.eoaccess
Class ERXEntityDependencyOrderingDelegate
java.lang.Object
com.webobjects.eoaccess.ERXEntityDependencyOrderingDelegate
public class ERXEntityDependencyOrderingDelegate
- extends Object
EODatabaseContext delegate to order adaptor operations by FK constraints. This prevents most ordering
operations on databases like MS SQL that do not support deferred constraints like a real database.
The easiest way to use this is:
ERXDatabaseContextMulticastingDelegate.addDefaultDelegate(new ERXEntityDependencyOrderingDelegate());
To turn this on for a Wonder application, just set this property:
com.webobjects.eoaccess.ERXEntityDependencyOrderingDelegate.active = true
- Author:
- chill
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERXEntityDependencyOrderingDelegateActiveKey
public static final String ERXEntityDependencyOrderingDelegateActiveKey
- See Also:
- Constant Field Values
adaptorOpComparator
protected NSComparator adaptorOpComparator
ERXEntityDependencyOrderingDelegate
public ERXEntityDependencyOrderingDelegate()
adaptorOpComparator
protected NSComparator adaptorOpComparator()
- Lazy creation of an EOAdaptorOpComparator that uses a list of entities that are in FK dependancy order.
Enable DEBUG logging to see the ordered list of entity names.
- Returns:
- EOAdaptorOpComparator that uses a list of entities that are in FK dependancy order
- See Also:
EOAdaptorOpComparator
databaseContextWillPerformAdaptorOperations
public NSArray databaseContextWillPerformAdaptorOperations(EODatabaseContext aDatabaseContext,
NSArray adaptorOperations,
EOAdaptorChannel adaptorChannel)
- EODatabaseContext.Delegate method to order a list of adaptor operations. Uses adaptorOpComparator() for the ordering.
- Parameters:
aDatabaseContext - EODatabaseContext that the operations will be executed inadaptorOperations - list of operations to executeadaptorChannel - the adaptor channel these will be executed on
- Returns:
- operations in an order that should avoid FK constraint violations
- See Also:
EODatabaseContext.Delegate.databaseContextWillPerformAdaptorOperations(EODatabaseContext, NSArray,EOAdaptorChannel)
databaseContextShouldHandleDatabaseException
public boolean databaseContextShouldHandleDatabaseException(EODatabaseContext dbCtxt,
Throwable exception)
Copyright © 2002 – 2011 Project Wonder.