All Downloads are FREE. Search and download functionalities are using the official Maven repository.

functions.Property.ext Maven / Gradle / Ivy

There is a newer version: 1.24.1
Show newest version
extension functions::TypeChecks;
extension java::GeneratorCommons;

cached boolean isProperty(uml::Element element):
    element.isInstanceOf("org.eclipse.uml2.uml.Property");
    
cached uml::Property asProperty(uml::Element element):
    (uml::Property) element;
    
boolean isTransient(uml::Property property):
  property.isStereotypeApplied("Transient") || property.isStereotypeApplied("CompositeDataTypePublicField");

cached boolean belongsToBidirectionalAssociation(uml::Property property):
    property.association != null && property.association.getAllAttributes().select(e|e.isNavigable()).size > 1;
    
cached boolean belongsToTransientBidirectionalAssociation(uml::Property property):
    property.belongsToBidirectionalAssociation() && property.association.getAllAttributes().selectFirst(e|e.isTransient()) != null;
    

    





© 2015 - 2024 Weber Informatics LLC | Privacy Policy