Project Wonder 2.0

er.extensions
Class ERXEC.DefaultFactory

java.lang.Object
  extended byer.extensions.ERXEC.DefaultFactory
All Implemented Interfaces:
ERXEC.Factory
Direct Known Subclasses:
ERXObjectStoreCoordinatorPool.MultiOSCFactory
Enclosing class:
ERXEC

public static class ERXEC.DefaultFactory
extends Object
implements ERXEC.Factory

Default implementation of the Factory interface.


Field Summary
protected  Object defaultEditingContextDelegate
          holds a reference to the default ec delegate
protected  Object defaultNoValidationDelegate
          holds a reference to the default no validation delegate
static ERXLogger log
          logging support
protected  Boolean useSharedEditingContext
          holds whether to newly created instances use the shared editing context.
 
Constructor Summary
ERXEC.DefaultFactory()
           
 
Method Summary
protected  EOEditingContext _createEditingContext(EOObjectStore parent)
          Actual EC creation bottleneck.
 EOEditingContext _newEditingContext()
          See static method for documentation.
 EOEditingContext _newEditingContext(boolean validationEnabled)
          See static method for documentation.
 EOEditingContext _newEditingContext(EOObjectStore objectStore)
          See static method for documentation.
 EOEditingContext _newEditingContext(EOObjectStore objectStore, boolean validationEnabled)
          See static method for documentation.
 Object defaultEditingContextDelegate()
          Returns the default editing context delegate.
 Object defaultNoValidationDelegate()
          Default delegate that does not perform validation.
 void setDefaultDelegateOnEditingContext(EOEditingContext ec)
          Sets the default editing context delegate on the given editing context.
 void setDefaultDelegateOnEditingContext(EOEditingContext ec, boolean validation)
          Sets either the default editing context delegate that does or does not allow validation based on the validation flag passed in on the given editing context.
 void setDefaultEditingContextDelegate(Object delegate)
          Sets the default editing context delegate to be used for editing context creation.
 void setDefaultNoValidationDelegate(Object delegate)
          Sets the default editing context delegate to be used for editing context creation that does not allow validation.
 void setUseSharedEditingContext(boolean value)
           
 boolean useSharedEditingContext()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final ERXLogger log
logging support


defaultEditingContextDelegate

protected Object defaultEditingContextDelegate
holds a reference to the default ec delegate


defaultNoValidationDelegate

protected Object defaultNoValidationDelegate
holds a reference to the default no validation delegate


useSharedEditingContext

protected Boolean useSharedEditingContext
holds whether to newly created instances use the shared editing context.

Constructor Detail

ERXEC.DefaultFactory

public ERXEC.DefaultFactory()
Method Detail

defaultEditingContextDelegate

public Object defaultEditingContextDelegate()
Returns the default editing context delegate. This delegate is used by default for all editing contexts that are created.

Specified by:
defaultEditingContextDelegate in interface ERXEC.Factory
Returns:
the default editing context delegate

setDefaultEditingContextDelegate

public void setDefaultEditingContextDelegate(Object delegate)
Sets the default editing context delegate to be used for editing context creation.

Specified by:
setDefaultEditingContextDelegate in interface ERXEC.Factory
Parameters:
delegate - to be set on every created editing context by default.

defaultNoValidationDelegate

public Object defaultNoValidationDelegate()
Default delegate that does not perform validation. Not performing validation can be a good thing when using nested editing contexts as sometimes you only want to validation one object, not all the objects.

Specified by:
defaultNoValidationDelegate in interface ERXEC.Factory
Returns:
default delegate that doesn't perform validation

setDefaultNoValidationDelegate

public void setDefaultNoValidationDelegate(Object delegate)
Sets the default editing context delegate to be used for editing context creation that does not allow validation.

Specified by:
setDefaultNoValidationDelegate in interface ERXEC.Factory
Parameters:
delegate - to be set on every created editing context that doesn't allow validation.

setDefaultDelegateOnEditingContext

public void setDefaultDelegateOnEditingContext(EOEditingContext ec,
                                               boolean validation)
Sets either the default editing context delegate that does or does not allow validation based on the validation flag passed in on the given editing context.

Specified by:
setDefaultDelegateOnEditingContext in interface ERXEC.Factory
Parameters:
ec - editing context to have it's delegate set.
validation - flag that determines if the editing context should perform validation on objects being saved.

setDefaultDelegateOnEditingContext

public void setDefaultDelegateOnEditingContext(EOEditingContext ec)
Sets the default editing context delegate on the given editing context.

Specified by:
setDefaultDelegateOnEditingContext in interface ERXEC.Factory
Parameters:
ec - editing context to have it's delegate set.

_newEditingContext

public EOEditingContext _newEditingContext()
See static method for documentation.

Specified by:
_newEditingContext in interface ERXEC.Factory

_newEditingContext

public EOEditingContext _newEditingContext(boolean validationEnabled)
See static method for documentation.

Specified by:
_newEditingContext in interface ERXEC.Factory

_newEditingContext

public EOEditingContext _newEditingContext(EOObjectStore objectStore)
See static method for documentation.

Specified by:
_newEditingContext in interface ERXEC.Factory

_newEditingContext

public EOEditingContext _newEditingContext(EOObjectStore objectStore,
                                           boolean validationEnabled)
See static method for documentation.

Specified by:
_newEditingContext in interface ERXEC.Factory

_createEditingContext

protected EOEditingContext _createEditingContext(EOObjectStore parent)
Actual EC creation bottleneck. Override this to return other subclasses.


useSharedEditingContext

public boolean useSharedEditingContext()

setUseSharedEditingContext

public void setUseSharedEditingContext(boolean value)

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.