There is a basic reason for this, and it's because I'm lazy and also not sure how many of these "lower level" objects we even want interfaces for.

By doing it this way the ModelEntityInterface object is not meant to be used as a straight replacement of ModelEntity and does not have all of the methods of ModelEntity exposed through it. If I were to use the "Impl" pattern (which I did in many other places) instead of the "Interface" pattern then I'd really want to have the interface do everything the old object did.

For this particular entity there are dozens of old methods that have little value and many are unused. In general I also didn't want these interfaces to include ANY of the lower level stuff, and am thinking of simplifying these even more to just include the basic stuff. I originally didn't go for any of them at all, but they are actually used quite a bit so as the refactor propagation goes on we'll see how things look...

-David


On Jul 17, 2009, at 9:03 AM, Adrian Crum wrote:

Btw,

Instead of creating the interface ModelEntityInterface and having ModelEntity implement the interface, why not make ModelEntity an interface and make ModelEntityImpl the implementation of it. It seems to me that approach would require less re-writing of code.

-Adrian

Adrian Crum wrote:
David,
Thank you very much for working on this!
-Adrian
jone...@apache.org wrote:
Author: jonesde
Date: Fri Jul 17 09:56:47 2009
New Revision: 795024

URL: http://svn.apache.org/viewvc?rev=795024&view=rev
Log:
Initial work on the ExecutionContext and support interfaces; note that this does not compile at this point, which is part of why it is in a branch; this includes mostly interfaces for existing framework tools and a first pass at the ExecutionContext and related interfaces; for most Java code the interface changes will require something like the organize imports in Eclipse; also none of the cleanup work has been done yet on getting and keeping references to the delegator, dispatcher, etc so work needed on those too once the context access stuff is built out for this

Added:
   ofbiz/branches/executioncontext20090716/framework/context/
ofbiz/branches/executioncontext20090716/framework/context/ build.xml (with props)
   ofbiz/branches/executioncontext20090716/framework/context/src/
ofbiz/branches/executioncontext20090716/framework/context/src/ org/ ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/ ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/ ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/ExecutionArtifactInfo.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/ExecutionContext.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/ExecutionContextFactory.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/ ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/DynamicViewEntityInterface.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/EntityConditionInterface.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/EntityEcaHandler.java - copied, changed from r794912, ofbiz/branches/ executioncontext20090716/framework/entity/src/org/ofbiz/entity/eca/ EntityEcaHandler.java ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/EntityFindOptions.java - copied, changed from r794912, ofbiz/branches/ executioncontext20090716/framework/entity/src/org/ofbiz/entity/ util/EntityFindOptions.java ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/EntityListIterator.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/GenericDelegator.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/GenericEntity.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/GenericEntityException.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/GenericPK.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/GenericValue.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/ModelEntityInterface.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/ModelFieldInterface.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/ModelKeyMapInterface.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/entity/ModelRelationInterface.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/service/ ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/service/GenericRequester.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/service/GenericResultWaiter.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/service/GenericServiceCallback.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/service/GenericServiceException.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/service/JobManagerException.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/service/JobScheduler.java (with props) ofbiz/branches/executioncontext20090716/framework/context/src/ org/ofbiz/context/service/LocalDispatcher.java (with props) ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericDelegatorImpl.java - copied, changed from r793049, ofbiz/trunk/framework/entity/ src/org/ofbiz/entity/GenericDelegator.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericEntityImpl.java - copied, changed from r793049, ofbiz/trunk/framework/entity/ src/org/ofbiz/entity/GenericEntity.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericPKImpl.java - copied, changed from r793049, ofbiz/trunk/framework/entity/ src/org/ofbiz/entity/GenericPK.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericValueImpl.java - copied, changed from r793049, ofbiz/trunk/framework/entity/ src/org/ofbiz/entity/GenericValue.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/condition/EntityCondition.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/condition/EntityConditionBase.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/model/DynamicViewEntity.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/util/EntityListIteratorImpl.java - copied, changed from r794912, ofbiz/branches/ executioncontext20090716/framework/entity/src/org/ofbiz/entity/ util/EntityListIterator.java
Removed:
ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/DelegatorInterface.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericDelegator.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericEntity.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericEntityException.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericPK.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericValue.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/eca/EntityEcaHandler.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/util/EntityFindOptions.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/util/EntityListIterator.java ofbiz/branches/executioncontext20090716/framework/service/src/ org/ofbiz/service/GenericRequester.java ofbiz/branches/executioncontext20090716/framework/service/src/ org/ofbiz/service/GenericResultWaiter.java ofbiz/branches/executioncontext20090716/framework/service/src/ org/ofbiz/service/GenericServiceCallback.java ofbiz/branches/executioncontext20090716/framework/service/src/ org/ofbiz/service/GenericServiceException.java ofbiz/branches/executioncontext20090716/framework/service/src/ org/ofbiz/service/LocalDispatcher.java ofbiz/branches/executioncontext20090716/framework/service/src/ org/ofbiz/service/job/JobManagerException.java
Modified:
   ofbiz/branches/executioncontext20090716/.classpath
ofbiz/branches/executioncontext20090716/applications/content/ src/org/ofbiz/content/content/ContentWorker.java ofbiz/branches/executioncontext20090716/applications/order/src/ org/ofbiz/order/order/OrderServices.java ofbiz/branches/executioncontext20090716/applications/party/src/ org/ofbiz/party/party/PartyHelper.java ofbiz/branches/executioncontext20090716/applications/product/ src/org/ofbiz/product/category/CategoryContentWrapper.java ofbiz/branches/executioncontext20090716/applications/product/ src/org/ofbiz/product/product/ProductSearch.java
   ofbiz/branches/executioncontext20090716/framework/build.xml
ofbiz/branches/executioncontext20090716/framework/common/src/ org/ofbiz/common/KeywordSearchUtil.java ofbiz/branches/executioncontext20090716/framework/entity/ build.xml ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/EntityCryptoException.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericDataSourceException.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericEntityConfException.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericEntityNotFoundException.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericModelException.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericNotImplementedException.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/GenericResultSetClosedException.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/cache/AbstractCache.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/cache/AbstractEntityConditionCache.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/cache/Cache.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/cache/EntityCache.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/cache/EntityListCache.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/condition/EntityConditionParam.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/condition/EntityConditionSubSelect.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/condition/EntityConditionValue.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/condition/EntityConditionVisitor.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/condition/OrderByItem.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/condition/OrderByList.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/connection/ConnectionFactoryInterface.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/datasource/GenericHelper.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/jdbc/ConnectionFactory.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/jdbc/SqlJdbcUtil.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/model/ModelEntity.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/model/ModelEntityChecker.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/model/ModelField.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/model/ModelKeyMap.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/model/ModelReader.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/model/ModelRelation.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/transaction/GenericTransactionException.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/transaction/TransactionFactory.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/transaction/TransactionFactoryInterface.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/util/DistributedCacheClear.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/util/EntityCrypto.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/util/EntityUtil.java ofbiz/branches/executioncontext20090716/framework/entity/src/ org/ofbiz/entity/util/SequenceUtil.java ofbiz/branches/executioncontext20090716/framework/entityext/src/ org/ofbiz/entityext/eca/DelegatorEcaHandler.java ofbiz/branches/executioncontext20090716/framework/service/ build.xml ofbiz/branches/executioncontext20090716/framework/service/src/ org/ofbiz/service/DispatchContext.java ofbiz/branches/executioncontext20090716/framework/service/src/ org/ofbiz/service/ModelService.java ofbiz/branches/executioncontext20090716/framework/service/src/ org/ofbiz/service/ServiceValidationException.java ofbiz/branches/executioncontext20090716/framework/service/src/ org/ofbiz/service/job/InvalidJobException.java ofbiz/branches/executioncontext20090716/framework/service/src/ org/ofbiz/service/job/JobManager.java ofbiz/branches/executioncontext20090716/framework/webtools/src/ org/ofbiz/webtools/artifactinfo/ServiceArtifactInfo.java ofbiz/branches/executioncontext20090716/framework/webtools/src/ org/ofbiz/webtools/artifactinfo/ServiceEcaArtifactInfo.java ofbiz/branches/executioncontext20090716/framework/widget/src/ org/ofbiz/widget/ContentWorkerInterface.java

Reply via email to