From: Vance K. <va...@us...> - 2006-04-27 06:52:47
|
User: vancek Date: 06/04/26 23:52:44 Modified: andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades EJB3EntityFacadeLogicImpl.java Log: fixed formatting. handleIsRequiresSpecializationMapping should not check for root entity. handleIsEntityImplementationRequired should not check for entity being a mapped superclass. implemented handleGetInstanceAttributes method with args follow and withIdentifiers. Revision Changes Path 1.20 +34 -18 cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityFacadeLogicImpl.java Index: EJB3EntityFacadeLogicImpl.java =================================================================== RCS file: /cvsroot/andromdaplugins/cartridges/andromda-ejb3/src/main/java/org/andromda/cartridges/ejb3/metafacades/EJB3EntityFacadeLogicImpl.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -r1.19 -r1.20 --- EJB3EntityFacadeLogicImpl.java 26 Apr 2006 15:21:59 -0000 1.19 +++ EJB3EntityFacadeLogicImpl.java 27 Apr 2006 06:52:44 -0000 1.20 @@ -332,7 +332,9 @@ protected java.util.Collection handleGetValueDependencies() { Collection dependencies = super.getSourceDependencies(); - CollectionUtils.filter(dependencies, new Predicate() + CollectionUtils.filter( + dependencies, + new Predicate() { public boolean evaluate(Object object) { @@ -866,10 +868,8 @@ */ protected boolean handleIsRequiresSpecializationMapping() { - return this.isRoot() - && (this.isInheritanceSingleTable() - || this.isInheritanceTablePerClass() || this.isInheritanceJoined()) - && (!this.getSpecializations().isEmpty()); + return (this.isInheritanceSingleTable() || this.isInheritanceTablePerClass() || this.isInheritanceJoined()) + && !this.getSpecializations().isEmpty(); } /** @@ -1372,6 +1372,22 @@ */ protected boolean handleIsEntityImplementationRequired() { - return !this.getBusinessOperations().isEmpty() || this.isEmbeddableSuperclass(); + return !this.getBusinessOperations().isEmpty(); + } + + /** + * @see org.andromda.cartridges.ejb3.metafacades.EJB3EntityFacadeLogic#handleGetInstanceAttributes(boolean, boolean) + */ + protected Collection handleGetInstanceAttributes( + boolean follow, + boolean withIdentifiers) + { + return new FilteredCollection(this.getAttributes(follow, withIdentifiers)) + { + public boolean evaluate(Object object) + { + return !((AttributeFacade)object).isStatic(); + } + }; } } \ No newline at end of file |