/** * @see org.andromda.metafacades.uml14.ManageableEntityLogic#handleGetReferencingManageables() */ protected List handleGetReferencingManageables() { final Set referencingManageables = new LinkedHashSet(); final Collection associationEnds = getAssociationEnds(); for (final Iterator associationEndIterator = associationEnds.iterator(); associationEndIterator.hasNext();) { final AssociationEndFacade associationEnd = (AssociationEndFacade)associationEndIterator.next(); if (associationEnd.isNavigable()) { if (associationEnd.isMany() || (associationEnd.isOne2One() && associationEnd.isChild())) { final Object otherEndType = associationEnd.getOtherEnd().getType(); if (otherEndType instanceof Entity) { referencingManageables.add(otherEndType); } } } } return new ArrayList(referencingManageables); }
public boolean evaluate(final Object object) { return ((AssociationEndFacade)object).getOtherEnd().isComposition(); } });
public boolean evaluate(final Object object) { final ClassifierFacade type = ((AssociationEndFacade)object).getOtherEnd().getType(); /*if (!(type instanceof Entity || type instanceof EnumerationFacade)) { logger.debug("EntityLogic.getAssociationEnds " + type); }*/ return type != null && (type instanceof Entity || type instanceof EnumerationFacade); } });
/** * @return entityRelations * @see EJB3EntityFacade#getEntityRelations() */ protected Collection handleGetEntityRelations() { Collection<AssociationEndFacade> result = new ArrayList<AssociationEndFacade>(); for (final AssociationEndFacade associationEnd : this.getAssociationEnds()) { ClassifierFacade target = associationEnd.getOtherEnd().getType(); if (target instanceof EJB3EntityFacade && associationEnd.getOtherEnd().isNavigable()) { result.add(associationEnd); } } return result; }
AssociationEndFacade otherEnd = associationEnd.getOtherEnd(); ObjectUtils.toString(otherEnd.findTaggedValue( "andromda_persistence_associationEnd_primary")))) ObjectUtils.toString(otherEnd.findTaggedValue( "andromda_persistence_associationEnd_primary")))) else if (associationEnd.isNavigable() && !otherEnd.isNavigable()) else if (!associationEnd.isNavigable() && otherEnd.isNavigable()) else if (otherEnd.isAggregation() || otherEnd.isComposition()) else if (associationEnd.isAggregation() || associationEnd.isComposition()) else if (!associationEnd.isMany() && otherEnd.isMany()) else if (associationEnd.isMany() && !otherEnd.isMany()) else if (associationEnd.getLower() > 0 && otherEnd.getLower() == 0) else if (associationEnd.getName().length() < otherEnd.getName().length()) else if (associationEnd.getName().compareTo( otherEnd.getName()) < 0)
public boolean evaluate(final Object object) { return object != null && ((AssociationEndFacade)object).isNavigable(); } });
/** * @see org.andromda.metafacades.uml.ClassifierFacade#getProperties() */ public List<ModelElementFacade> getProperties() { List<ModelElementFacade> properties = new ArrayList<ModelElementFacade>(); properties.addAll(this.getAttributes()); for (final AssociationEndFacade end : this.getAssociationEnds()) { final AssociationEndFacade otherEnd = end.getOtherEnd(); if (otherEnd.isNavigable() || (end.isChild() && isForeignHibernateGeneratorClass())) { properties.add(otherEnd); } } return properties; }
if (this.getOtherEnd().isComposition()) else if (this.getOtherEnd().isAggregation()) if (this.getOtherEnd().isOne2Many() || this.getOtherEnd().isMany2Many())
boolean inverse = this.isNavigable() && this.getOtherEnd().isNavigable(); if (this.getOtherEnd().isAggregation() || this.getOtherEnd().isComposition())
public boolean evaluate(Object object) { return ((AssociationEndFacade)object).isComposition(); } };
public Object transform(final Object object) { if (object == null) return null; return ((AssociationEndFacade)object).getOtherEnd(); } });
/** * <p> * The name of the model element. * </p> * @see ModelElementFacade#getName() */ public String getName() { return this.getSuperAssociationEndFacade().getName(); }
/** * <p> * True if this association end's multiplicity is greater than one. * </p> * @see AssociationEndFacade#isMany() */ public boolean isMany() { return this.getSuperAssociationEndFacade().isMany(); }
/** * <p> * The classifier attached to this association end. * </p> * @see AssociationEndFacade#getType() */ public ClassifierFacade getType() { return this.getSuperAssociationEndFacade().getType(); }
(this.getOtherEnd().isAggregation() || this.getOtherEnd().isComposition())) if (this.getOtherEnd().isComposition()) else if (this.getOtherEnd().isAggregation())
/** * <p> * True if this association end's and the other end's * multiplicities are both many. * </p> * @see AssociationEndFacade#isMany2Many() */ public boolean isMany2Many() { return this.getSuperAssociationEndFacade().isMany2Many(); }
/** * <p> * True if this association end represents an aggregation * relationship. * </p> * @see AssociationEndFacade#isAggregation() */ public boolean isAggregation() { return this.getSuperAssociationEndFacade().isAggregation(); }
/** * <p> * Finds the tagged value with the specified 'tagName'. In case * there are more values the first one found will be returned. * </p> * @see ModelElementFacade#findTaggedValue(String tagName) */ public Object findTaggedValue(String tagName) { return this.getSuperAssociationEndFacade().findTaggedValue(tagName); }