org.umlg.qualifiertest.Many1 Maven / Gradle / Ivy
The newest version!
package org.umlg.qualifiertest;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.tinkerpop.gremlin.process.traversal.Compare;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.structure.Direction;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Element;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.umlg.concretetest.God;
import org.umlg.qualifiertest.Many1.Many1RuntimePropertyEnum;
import org.umlg.runtime.adaptor.TransactionThreadEntityVar;
import org.umlg.runtime.adaptor.UMLG;
import org.umlg.runtime.adaptor.UmlgLabelConverterFactory;
import org.umlg.runtime.adaptor.UmlgQualifierIdFactory;
import org.umlg.runtime.adaptor.UmlgTmpIdManager;
import org.umlg.runtime.collection.Filter;
import org.umlg.runtime.collection.Multiplicity;
import org.umlg.runtime.collection.Qualifier;
import org.umlg.runtime.collection.UmlgCollection;
import org.umlg.runtime.collection.UmlgQualifiedSequence;
import org.umlg.runtime.collection.UmlgQualifiedSet;
import org.umlg.runtime.collection.UmlgRuntimeProperty;
import org.umlg.runtime.collection.UmlgSequence;
import org.umlg.runtime.collection.UmlgSet;
import org.umlg.runtime.collection.memory.UmlgMemorySet;
import org.umlg.runtime.collection.persistent.PropertyTree;
import org.umlg.runtime.collection.persistent.UmlgQualifiedSequenceImpl;
import org.umlg.runtime.collection.persistent.UmlgQualifiedSetImpl;
import org.umlg.runtime.collection.persistent.UmlgSequenceClosableIterableImpl;
import org.umlg.runtime.collection.persistent.UmlgSequenceImpl;
import org.umlg.runtime.collection.persistent.UmlgSetClosableIterableImpl;
import org.umlg.runtime.collection.persistent.UmlgSetImpl;
import org.umlg.runtime.domain.BaseUmlgCompositionNode;
import org.umlg.runtime.domain.CompositionNode;
import org.umlg.runtime.domain.DataTypeEnum;
import org.umlg.runtime.domain.UmlgNode;
import org.umlg.runtime.util.ObjectMapperFactory;
import org.umlg.runtime.util.Pair;
import org.umlg.runtime.util.UmlgFormatter;
import org.umlg.runtime.validation.UmlgConstraintViolation;
import org.umlg.runtime.validation.UmlgConstraintViolationException;
import org.umlg.runtime.validation.UmlgValidation;
public class Many1 extends BaseUmlgCompositionNode implements CompositionNode {
static final public long serialVersionUID = 1L;
private UmlgSet name;
private UmlgSet god;
private UmlgQualifiedSet many2;
private UmlgQualifiedSequence many2List;
private UmlgSequence many2UnqualifiedList;
private String tmpId; // tmpId is only used the umlg restlet gui. It is never persisted. Its value is generated by the gui.
/**
* constructor for Many1
*
* @param compositeOwner
*/
public Many1(God compositeOwner) {
super(true);
compositeOwner.addToMany1(this);
}
/**
* constructor for Many1
*
* @param id
*/
public Many1(Object id) {
super(id);
}
/**
* constructor for Many1
*
* @param vertex
*/
public Many1(Vertex vertex) {
super(vertex);
}
/**
* default constructor for Many1
*/
public Many1() {
this(true);
}
/**
* constructor for Many1
*
* @param persistent
*/
public Many1(Boolean persistent) {
super(persistent);
}
public void addToGod(God god) {
if ( god != null ) {
if ( !this.god.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::qualifiertest::A__::god is a one and already has a value!");
}
this.god.add(god);
}
}
public void addToGodIgnoreInverse(God god) {
if ( god != null ) {
if ( !this.god.isEmpty() ) {
throw new RuntimeException("Property umlgtest::org::umlg::qualifiertest::A__::god is a one and already has a value!");
}
this.god.addIgnoreInverse(god);
}
}
public void addToMany2(Many2 many2) {
if ( many2 != null ) {
this.many2.add(many2);
}
}
public void addToMany2(UmlgSet many2) {
for ( Many2 _m : many2 ) {
this.addToMany2(_m);
}
}
public void addToMany2IgnoreInverse(Many2 many2) {
if ( many2 != null ) {
this.many2.addIgnoreInverse(many2);
}
}
public void addToMany2List(Many2 many2List) {
if ( many2List != null ) {
this.many2List.add(many2List);
}
}
public void addToMany2List(UmlgSequence many2List) {
for ( Many2 _m : many2List ) {
this.addToMany2List(_m);
}
}
public void addToMany2List(int index, Many2 many2List) {
if ( many2List != null ) {
this.many2List.add(index, many2List);
}
}
public void addToMany2List(int index, UmlgSequence many2List) {
for ( Many2 _m : many2List ) {
this.addToMany2List(_m);
}
}
public void addToMany2ListIgnoreInverse(Many2 many2List) {
if ( many2List != null ) {
this.many2List.addIgnoreInverse(many2List);
}
}
public void addToMany2UnqualifiedList(Many2 many2UnqualifiedList) {
if ( many2UnqualifiedList != null ) {
this.many2UnqualifiedList.add(many2UnqualifiedList);
}
}
public void addToMany2UnqualifiedList(UmlgSequence many2UnqualifiedList) {
if ( !many2UnqualifiedList.isEmpty() ) {
this.many2UnqualifiedList.addAll(many2UnqualifiedList);
}
}
public void addToMany2UnqualifiedList(int index, Many2 many2UnqualifiedList) {
if ( many2UnqualifiedList != null ) {
this.many2UnqualifiedList.add(index, many2UnqualifiedList);
}
}
public void addToMany2UnqualifiedList(int index, UmlgSequence many2UnqualifiedList) {
if ( !many2UnqualifiedList.isEmpty() ) {
this.many2UnqualifiedList.addAll(many2UnqualifiedList);
}
}
public void addToMany2UnqualifiedListIgnoreInverse(Many2 many2UnqualifiedList) {
if ( many2UnqualifiedList != null ) {
this.many2UnqualifiedList.addIgnoreInverse(many2UnqualifiedList);
}
}
public void addToName(String name) {
if ( !this.name.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( name != null ) {
List violations = validateName(name);
if ( violations.isEmpty() ) {
this.name.add(name);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
public void addToNameIgnoreInverse(String name) {
if ( !this.name.isEmpty() ) {
throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
}
if ( name != null ) {
List violations = validateName(name);
if ( violations.isEmpty() ) {
this.name.add(name);
} else {
throw new UmlgConstraintViolationException(violations);
}
}
}
static public UmlgSet extends Many1> allInstances(Filter filter) {
UmlgSet result = new UmlgMemorySet();
result.addAll(UMLG.get().allInstances(Many1.class.getName(), filter));
return result;
}
static public UmlgSet extends Many1> allInstances() {
UmlgSet result = new UmlgMemorySet();
result.addAll(UMLG.get().allInstances(Many1.class.getName()));
return result;
}
@Override
public List checkClassConstraints() {
List result = new ArrayList();
return result;
}
public void clearGod() {
this.god.clear();
}
public void clearMany2() {
this.many2.clear();
}
public void clearMany2List() {
this.many2List.clear();
}
public void clearMany2UnqualifiedList() {
this.many2UnqualifiedList.clear();
}
public void clearName() {
this.name.clear();
}
@Override
public void delete() {
this.many2UnqualifiedList.clear();
this.many2List.clear();
this.god.clear();
this.many2.clear();
TransactionThreadEntityVar.remove(this);
this.vertex.remove();
}
@Override
public void fromJson(Map propertyMap) {
fromJsonDataTypeAndComposite(propertyMap);
fromJsonNonCompositeOne(propertyMap);
fromJsonNonCompositeRequiredMany(propertyMap);
}
@Override
public void fromJson(String json) {
ObjectMapper mapper = ObjectMapperFactory.INSTANCE.getObjectMapper();
try {
@SuppressWarnings( "unchecked")
Map propertyMap = mapper.readValue(json, Map.class);
fromJson(propertyMap);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Override
public void fromJsonDataTypeAndComposite(Map propertyMap) {
if ( propertyMap.containsKey("name") ) {
if ( propertyMap.get("name") != null ) {
String name = (String)propertyMap.get("name");
setName(name);
} else {
setName(null);
}
}
if ( propertyMap.containsKey("tmpId") ) {
if ( propertyMap.get("tmpId") != null ) {
this.tmpId = (String)propertyMap.get("tmpId");
UmlgTmpIdManager.INSTANCE.put(this.tmpId, getId());
} else {
this.tmpId = null;
}
}
}
@Override
public void fromJsonNonCompositeOne(Map propertyMap) {
}
@Override
public void fromJsonNonCompositeRequiredMany(Map propertyMap) {
}
public God getGod() {
UmlgSet tmp = this.god;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
public UmlgQualifiedSet getMany2() {
return this.many2;
}
public Many2 getMany2ForMany2Qualifier1(Pair many2Qualifier1) {
GraphTraversal graphTraversalmany2_Many2 = UMLG.get().traversal().V(this.vertex).to(
Many1RuntimePropertyEnum.many2.isControllingSide() ? Direction.OUT : Direction.IN,
Many1RuntimePropertyEnum.many2.getLabel())
.has(T.label, "Many2");
UmlgSet result;
graphTraversalmany2_Many2.has("name", many2Qualifier1.getSecond());
UmlgSet many2_many2_Many2 = new UmlgSetClosableIterableImpl(graphTraversalmany2_Many2, Many1RuntimePropertyEnum.many2);
result = many2_many2_Many2;
if ( result.iterator().hasNext() ) {
return result.iterator().next();
} else {
return null;
}
}
public UmlgQualifiedSequence getMany2List() {
return this.many2List;
}
public UmlgSequence getMany2ListForListQualifier2(Pair listQualifier2) {
GraphTraversal graphTraversalmany2List_Many2 = UMLG.get().traversal().V(this.vertex).to(
Many1RuntimePropertyEnum.many2List.isControllingSide() ? Direction.OUT : Direction.IN,
Many1RuntimePropertyEnum.many2List.getLabel())
.has(T.label, "Many2");
UmlgSequence result;
graphTraversalmany2List_Many2.has("name", listQualifier2.getSecond());
UmlgSequence many2List_many2List_Many2 = new UmlgSequenceClosableIterableImpl(graphTraversalmany2List_Many2, Many1RuntimePropertyEnum.many2List);
result = many2List_many2List_Many2;
return result;
}
public UmlgSequence getMany2UnqualifiedList() {
return this.many2UnqualifiedList;
}
@Override
public String getMetaDataAsJson() {
return Many1.Many1RuntimePropertyEnum.asJson();
}
public String getName() {
UmlgSet tmp = this.name;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
@Override
public UmlgNode getOwningObject() {
UmlgNode result;
if ( getGod() != null ) {
result = getGod();
} else {
result = null;
}
return result;
}
@Override
public String getQualifiedName() {
return "umlgtest::org::umlg::qualifiertest::Many1";
}
public List getQualifierForMany2(Many2 context) {
List result = new ArrayList<>();
result.add(new Qualifier("name", context.getName(), Multiplicity.ZERO_TO_ONE, Many2.Many2RuntimePropertyEnum.name));
return result;
}
public List getQualifierForMany2List(Many2 context) {
List result = new ArrayList<>();
result.add(new Qualifier("name", context.getName(), Multiplicity.ZERO_TO_MANY, Many2.Many2RuntimePropertyEnum.name));
return result;
}
/**
* getQualifiers is called from the collection in order to update the index used to implement the qualifier
*
* @param tumlRuntimeProperty
* @param node
* @param inverse
*/
@Override
public List getQualifiers(UmlgRuntimeProperty tumlRuntimeProperty, UmlgNode node, boolean inverse) {
List result = Collections.emptyList();
Many1RuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = Many1RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
} else {
runtimeProperty = Many1RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
}
if ( runtimeProperty != null && result.isEmpty() ) {
switch ( runtimeProperty ) {
case many2List:
result = getQualifierForMany2List((Many2)node);
break;
case many2:
result = getQualifierForMany2((Many2)node);
break;
default:
result = Collections.emptyList();
}
}
return result;
}
/**
* getSize is called from the BaseCollection.addInternal in order to save the size of the inverse collection to update the edge's sequence order
*
* @param inverse
* @param tumlRuntimeProperty
*/
@Override
public int getSize(boolean inverse, UmlgRuntimeProperty tumlRuntimeProperty) {
int result = 0;
Many1RuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = Many1RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
} else {
runtimeProperty = Many1RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
}
if ( runtimeProperty != null && result == 0 ) {
switch ( runtimeProperty ) {
case many2UnqualifiedList:
result = many2UnqualifiedList.size();
break;
case many2List:
result = many2List.size();
break;
case god:
result = god.size();
break;
case many2:
result = many2.size();
break;
case name:
result = name.size();
break;
default:
result = 0;
}
}
return result;
}
@Override
public String getUid() {
String uid;
if ( !this.vertex.property("uid").isPresent() && this.vertex.property("uid").value() != null ) {
uid=UUID.randomUUID().toString();
this.vertex.property("uid", uid);
} else {
uid=this.vertex.value("uid");
}
return uid;
}
@Override
public boolean hasOnlyOneCompositeParent() {
int result = 0;
result = result + (getGod() != null ? 1 : 0);
return result == 1;
}
public void initDataTypeVariablesWithDefaultValues() {
}
public void initVariables() {
setName("");
setName("");
}
/**
* boolean properties' default values are initialized in the constructor via z_internalBooleanProperties
*
* @param loaded
*/
@Override
public void initialiseProperties(boolean loaded) {
this.many2UnqualifiedList = new UmlgSequenceImpl(this, PropertyTree.from(Many1RuntimePropertyEnum.many2UnqualifiedList), loaded);
this.many2List = new UmlgQualifiedSequenceImpl(this, PropertyTree.from(Many1RuntimePropertyEnum.many2List), loaded);
this.god = new UmlgSetImpl(this, PropertyTree.from(Many1RuntimePropertyEnum.god), loaded);
this.many2 = new UmlgQualifiedSetImpl(this, PropertyTree.from(Many1RuntimePropertyEnum.many2), loaded);
this.name = new UmlgSetImpl(this, PropertyTree.from(Many1RuntimePropertyEnum.name), loaded);
}
@Override
public void initialiseProperty(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, boolean loaded) {
Many1RuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (Many1RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (Many1RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case many2UnqualifiedList:
this.many2UnqualifiedList = new UmlgSequenceImpl(this, PropertyTree.from(Many1RuntimePropertyEnum.many2UnqualifiedList), loaded);
break;
case many2List:
this.many2List = new UmlgQualifiedSequenceImpl(this, PropertyTree.from(Many1RuntimePropertyEnum.many2List), loaded);
break;
case god:
this.god = new UmlgSetImpl(this, PropertyTree.from(Many1RuntimePropertyEnum.god), loaded);
break;
case many2:
this.many2 = new UmlgQualifiedSetImpl(this, PropertyTree.from(Many1RuntimePropertyEnum.many2), loaded);
break;
case name:
this.name = new UmlgSetImpl(this, PropertyTree.from(Many1RuntimePropertyEnum.name), loaded);
break;
}
}
}
@Override
public UmlgRuntimeProperty inverseAdder(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, UmlgNode umlgNode) {
Many1RuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (Many1RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (Many1RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case many2UnqualifiedList:
this.many2UnqualifiedList.inverseAdder((Many2)umlgNode);
break;
case many2List:
this.many2List.inverseAdder((Many2)umlgNode);
break;
case god:
this.god.inverseAdder((God)umlgNode);
break;
case many2:
this.many2.inverseAdder((Many2)umlgNode);
break;
}
return runtimeProperty;
} else {
return null;
}
}
@Override
public boolean isTinkerRoot() {
return false;
}
public UmlgSet lookupFor_many1List_many2List() {
UmlgSet result = new UmlgMemorySet();
result.addAll(org.umlg.qualifiertest.Many2.allInstances());
return result;
}
public UmlgSet lookupFor_many1UnqualifiedList_many2UnqualifiedList() {
UmlgSet result = new UmlgMemorySet();
result.addAll(org.umlg.qualifiertest.Many2.allInstances());
return result;
}
public UmlgSet lookupFor_many1_many2() {
UmlgSet result = new UmlgMemorySet();
Filter filter = new Filter() {
@Override
public boolean filter(Many2 entity){
return !entity.getMany1().contains(Many1.this);
}
};
result.addAll(org.umlg.qualifiertest.Many2.allInstances(filter));
return result;
}
public void removeFromGod(God god) {
if ( god != null ) {
this.god.remove(god);
}
}
public void removeFromGod(UmlgSet god) {
if ( !god.isEmpty() ) {
this.god.removeAll(god);
}
}
public void removeFromMany2(Many2 many2) {
if ( many2 != null ) {
this.many2.remove(many2);
}
}
public void removeFromMany2(UmlgSet many2) {
if ( !many2.isEmpty() ) {
this.many2.removeAll(many2);
}
}
public void removeFromMany2List(Many2 many2List) {
if ( many2List != null ) {
this.many2List.remove(many2List);
}
}
public void removeFromMany2List(UmlgSequence many2List) {
if ( !many2List.isEmpty() ) {
this.many2List.removeAll(many2List);
}
}
public void removeFromMany2UnqualifiedList(Many2 many2UnqualifiedList) {
if ( many2UnqualifiedList != null ) {
this.many2UnqualifiedList.remove(many2UnqualifiedList);
}
}
public void removeFromMany2UnqualifiedList(UmlgSequence many2UnqualifiedList) {
if ( !many2UnqualifiedList.isEmpty() ) {
this.many2UnqualifiedList.removeAll(many2UnqualifiedList);
}
}
public void removeFromName(String name) {
if ( name != null ) {
this.name.remove(name);
}
}
public void removeFromName(UmlgSet name) {
if ( !name.isEmpty() ) {
this.name.removeAll(name);
}
}
public void setGod(God god) {
clearGod();
addToGod(god);
}
public void setMany2(UmlgSet many2) {
clearMany2();
if ( many2 != null ) {
addToMany2(many2);
}
}
public void setMany2List(UmlgSequence many2List) {
clearMany2List();
if ( many2List != null ) {
addToMany2List(many2List);
}
}
public void setMany2UnqualifiedList(UmlgSequence many2UnqualifiedList) {
clearMany2UnqualifiedList();
if ( many2UnqualifiedList != null ) {
addToMany2UnqualifiedList(many2UnqualifiedList);
}
}
public void setName(String name) {
if ( name == null ) {
clearName();
} else {
z_internalClearName();
}
addToName(name);
}
/**
* deep indicates that components also be serialized.
*
* @param deep
*/
@Override
public String toJson(Boolean deep) {
StringBuilder sb = new StringBuilder();
if ( this.tmpId != null ) {
sb.append("\"tmpId\": \"" + this.tmpId + "\", ");
}
sb.append("\"id\": \"" + getId() + "\", ");
if ( getGod() != null ) {
if ( UmlgTmpIdManager.INSTANCE.get(getGod().getId()) != null ) {
sb.append("\"god\": " + "{\"id\": \"" + getGod().getId() + "\", \"tmpId\": \"" + UmlgTmpIdManager.INSTANCE.get(getGod().getId()) + "\",\"displayName\": \"" + getGod().getName() + "\"}" + "");
} else {
sb.append("\"god\": " + "{\"id\": \"" + getGod().getId() + "\", \"displayName\": \"" + getGod().getName() + "\"}" + "");
}
} else {
sb.append("\"god\": " + "{\"id\": " + null + ", \"displayName\": " + null + "}");
}
sb.append(", ");
sb.append("\"name\": " + (getName() != null ? "\"" + StringEscapeUtils.escapeJson(getName()) + "\"" : null ));
sb.append(", ");
sb.append("\"qualifiedName\": \"" + getQualifiedName() + "\"");
sb.append(", ");
//PlaceHolder for restful
sb.append("\"uri\": {}");
sb.insert(0, "{");
sb.append("}");
return sb.toString();
}
@Override
public String toJson() {
return toJson(false);
}
/**
* deep indicates that components also be serialized.
*
* @param deep
*/
@Override
public String toJsonWithoutCompositeParent(Boolean deep) {
StringBuilder sb = new StringBuilder();
if ( this.tmpId != null ) {
sb.append("\"tmpId\": \"" + this.tmpId + "\", ");
}
sb.append("\"id\": \"" + getId() + "\", ");
sb.append("\"name\": " + (getName() != null ? "\"" + StringEscapeUtils.escapeJson(getName()) + "\"" : null ));
sb.append(", ");
sb.append("\"qualifiedName\": \"" + getQualifiedName() + "\"");
sb.append(", ");
//PlaceHolder for restful
sb.append("\"uri\": {}");
sb.insert(0, "{");
sb.append("}");
return sb.toString();
}
@Override
public String toJsonWithoutCompositeParent() {
return toJsonWithoutCompositeParent(false);
}
@Override
public List validateMultiplicities() {
List result = new ArrayList();
if ( getGod() == null ) {
result.add(new UmlgConstraintViolation("multiplicity", "umlgtest::org::umlg::qualifiertest::A__::god", "lower multiplicity is 1"));
}
if ( getName() == null ) {
result.add(new UmlgConstraintViolation("multiplicity", "umlgtest::org::umlg::qualifiertest::Many1::name", "lower multiplicity is 1"));
}
return result;
}
public List validateName(String name) {
List result = new ArrayList();
return result;
}
@Override
public void z_internalAddPersistentValueToCollection(UmlgRuntimeProperty umlgRuntimeProperty, Object umlgNode) {
Many1RuntimePropertyEnum runtimeProperty;
runtimeProperty = (Many1RuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case many2UnqualifiedList:
this.many2UnqualifiedList.z_internalAdder((Many2)umlgNode);
break;
case many2List:
this.many2List.z_internalAdder((Many2)umlgNode);
break;
case god:
this.god.z_internalAdder((God)umlgNode);
break;
case many2:
this.many2.z_internalAdder((Many2)umlgNode);
break;
case name:
this.name.z_internalAdder((String)umlgNode);
break;
}
}
}
@Override
public void z_internalAddToCollection(UmlgRuntimeProperty umlgRuntimeProperty, Object umlgNode) {
Many1RuntimePropertyEnum runtimeProperty;
runtimeProperty = (Many1RuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case many2UnqualifiedList:
this.many2UnqualifiedList.z_internalAdder((Many2)umlgNode);
break;
case many2List:
this.many2List.z_internalAdder((Many2)umlgNode);
break;
case god:
this.god.z_internalAdder((God)umlgNode);
break;
case many2:
this.many2.z_internalAdder((Many2)umlgNode);
break;
case name:
this.name.z_internalAdder((String)umlgNode);
break;
}
}
}
@Override
public Set z_internalBooleanProperties() {
Set result = new HashSet();
return result;
}
public void z_internalClearGod() {
this.god.z_internalClear();
}
public void z_internalClearMany2() {
this.many2.z_internalClear();
}
public void z_internalClearMany2List() {
this.many2List.z_internalClear();
}
public void z_internalClearMany2UnqualifiedList() {
this.many2UnqualifiedList.z_internalClear();
}
public void z_internalClearName() {
this.name.z_internalClear();
}
@Override
public Set z_internalDataTypeProperties() {
Set result = new HashSet();
result.add(Many1RuntimePropertyEnum.name);
return result;
}
@Override
public Map z_internalDataTypePropertiesWithDefaultValues() {
Map result = new HashMap();
return result;
}
@Override
public UmlgCollection extends Object> z_internalGetCollectionFor(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse) {
UmlgCollection extends Object> result = null;
if ( result == null ) {
Many1RuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (Many1RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (Many1RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case many2UnqualifiedList:
result = this.many2UnqualifiedList;
break;
case many2List:
result = this.many2List;
break;
case god:
result = this.god;
break;
case many2:
result = this.many2;
break;
case name:
result = this.name;
break;
}
}
}
return result;
}
@Override
public UmlgRuntimeProperty z_internalInverseAdder(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, UmlgNode umlgNode) {
Many1RuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (Many1RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (Many1RuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case many2UnqualifiedList:
this.many2UnqualifiedList.z_internalAdder((Many2)umlgNode);
break;
case many2List:
this.many2List.z_internalAdder((Many2)umlgNode);
break;
case god:
this.god.z_internalAdder((God)umlgNode);
break;
case many2:
this.many2.z_internalAdder((Many2)umlgNode);
break;
}
return runtimeProperty;
} else {
return null;
}
}
@Override
public void z_internalMarkCollectionLoaded(UmlgRuntimeProperty umlgRuntimeProperty, boolean loaded) {
Many1RuntimePropertyEnum runtimeProperty;
runtimeProperty = (Many1RuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case many2UnqualifiedList:
this.many2UnqualifiedList.setLoaded(loaded);
break;
case many2List:
this.many2List.setLoaded(loaded);
break;
case god:
this.god.setLoaded(loaded);
break;
case many2:
this.many2.setLoaded(loaded);
break;
case name:
this.name.setLoaded(loaded);
break;
}
}
}
static public enum Many1RuntimePropertyEnum implements UmlgRuntimeProperty {
many2UnqualifiedList(/* qualifiedName */ "umlgtest::org::umlg::qualifiertest::A___3::many2UnqualifiedList",/* persistentName */ "many2UnqualifiedList",/* inverseName */ "many1UnqualifiedList",/* inverseQualifiedName */ "umlgtest::org::umlg::qualifiertest::A___3::many1UnqualifiedList",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ false,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("A___3"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ false,/* isManyToMany */ true,/* upper */ -1,/* lower */ 0,/* inverseUpper */ -1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ true,/* isInverseOrdered */ true,/* isUnique */ false,/* isInverseUnique */ false,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Many2.class,/* json */ "{\"name\": \"many2UnqualifiedList\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::qualifiertest::A___3::many2UnqualifiedList\", \"persistentName\": \"many2UnqualifiedList\", \"inverseName\": \"many1UnqualifiedList\", \"inverseQualifiedName\": \"umlgtest::org::umlg::qualifiertest::A___3::many1UnqualifiedList\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": false, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": false, \"manyToMany\": true, \"upper\": -1, \"lower\": 0, \"inverseUpper\": -1, \"label\": \"A___3\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": true, \"inverseOrdered\": true, \"unique\": false, \"inverseUnique\": false, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
many2List(/* qualifiedName */ "umlgtest::org::umlg::qualifiertest::A___2::many2List",/* persistentName */ "many2List",/* inverseName */ "many1List",/* inverseQualifiedName */ "umlgtest::org::umlg::qualifiertest::A___2::many1List",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ false,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("A___2"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ false,/* isManyToMany */ true,/* upper */ -1,/* lower */ 0,/* inverseUpper */ -1,/* isQualified */ true,/* isInverseQualified */ true,/* isOrdered */ true,/* isInverseOrdered */ true,/* isUnique */ false,/* isInverseUnique */ false,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Many2.class,/* json */ "{\"name\": \"many2List\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::qualifiertest::A___2::many2List\", \"persistentName\": \"many2List\", \"inverseName\": \"many1List\", \"inverseQualifiedName\": \"umlgtest::org::umlg::qualifiertest::A___2::many1List\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": false, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": false, \"manyToMany\": true, \"upper\": -1, \"lower\": 0, \"inverseUpper\": -1, \"label\": \"A___2\", \"qualified\": true, \"inverseQualified\": true, \"ordered\": true, \"inverseOrdered\": true, \"unique\": false, \"inverseUnique\": false, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
god(/* qualifiedName */ "umlgtest::org::umlg::qualifiertest::A__::god",/* persistentName */ "god",/* inverseName */ "many1",/* inverseQualifiedName */ "umlgtest::org::umlg::concretetest::God::many1",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ false,/* isComposite */ false,/* isInverseComposite */ true,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("A__"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ true,/* isManyToMany */ false,/* upper */ 1,/* lower */ 1,/* inverseUpper */ -1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ God.class,/* json */ "{\"name\": \"god\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::qualifiertest::A__::god\", \"persistentName\": \"god\", \"inverseName\": \"many1\", \"inverseQualifiedName\": \"umlgtest::org::umlg::concretetest::God::many1\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": false, \"composite\": false, \"inverseComposite\": true, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 1, \"inverseUpper\": -1, \"label\": \"A__\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
many2(/* qualifiedName */ "umlgtest::org::umlg::qualifiertest::A__::many2",/* persistentName */ "many2",/* inverseName */ "many1",/* inverseQualifiedName */ "umlgtest::org::umlg::qualifiertest::A__::many1",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ false,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("A__"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ false,/* isManyToMany */ true,/* upper */ 1,/* lower */ 0,/* inverseUpper */ -1,/* isQualified */ true,/* isInverseQualified */ true,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Many2.class,/* json */ "{\"name\": \"many2\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::qualifiertest::A__::many2\", \"persistentName\": \"many2\", \"inverseName\": \"many1\", \"inverseQualifiedName\": \"umlgtest::org::umlg::qualifiertest::A__::many1\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": false, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": false, \"manyToMany\": true, \"upper\": 1, \"lower\": 0, \"inverseUpper\": -1, \"label\": \"A__\", \"qualified\": true, \"inverseQualified\": true, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
name(/* qualifiedName */ "umlgtest::org::umlg::qualifiertest::Many1::name",/* persistentName */ "name",/* inverseName */ "inverseOf::name",/* inverseQualifiedName */ "inverseOf::umlgtest::org::umlg::qualifiertest::Many1::name",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ true,/* isReadOnly */ false,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("name"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ true,/* isManyToMany */ false,/* upper */ 1,/* lower */ 1,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ false,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ String.class,/* json */ "{\"name\": \"name\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": true, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::qualifiertest::Many1::name\", \"persistentName\": \"name\", \"inverseName\": \"inverseOf::name\", \"inverseQualifiedName\": \"inverseOf::umlgtest::org::umlg::qualifiertest::Many1::name\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 1, \"inverseUpper\": 1, \"label\": \"name\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false);
private String _qualifiedName;
private String _persistentName;
private String _inverseName;
private String _inverseQualifiedName;
private boolean _associationClassOne;
private boolean _memberEndOfAssociationClass;
private String _associationClassPropertyName;
private String _inverseAssociationClassPropertyName;
private boolean _associationClassProperty;
private boolean _onePrimitivePropertyOfAssociationClass;
private boolean _onePrimitive;
private Boolean _readOnly;
private DataTypeEnum dataTypeEnum;
private List validations;
private boolean _manyPrimitive;
private boolean _oneEnumeration;
private boolean _manyEnumeration;
private boolean _controllingSide;
private boolean _composite;
private boolean _inverseComposite;
private String _label;
private boolean _oneToOne;
private boolean _oneToMany;
private boolean _manyToOne;
private boolean _manyToMany;
private int _upper;
private int _lower;
private int _inverseUpper;
private boolean _qualified;
private boolean _inverseQualified;
private boolean _ordered;
private boolean _inverseOrdered;
private boolean _unique;
private boolean _inverseUnique;
private boolean _derived;
private boolean _navigability;
private Class _propertyType;
private String _json;
private boolean _changeListener;
/**
* constructor for Many1RuntimePropertyEnum
*
* @param _qualifiedName
* @param _persistentName
* @param _inverseName
* @param _inverseQualifiedName
* @param _associationClassOne
* @param _memberEndOfAssociationClass
* @param _associationClassPropertyName
* @param _inverseAssociationClassPropertyName
* @param _associationClassProperty
* @param _onePrimitivePropertyOfAssociationClass
* @param _onePrimitive
* @param _readOnly
* @param dataTypeEnum
* @param validations
* @param _manyPrimitive
* @param _oneEnumeration
* @param _manyEnumeration
* @param _controllingSide
* @param _composite
* @param _inverseComposite
* @param _label
* @param _oneToOne
* @param _oneToMany
* @param _manyToOne
* @param _manyToMany
* @param _upper
* @param _lower
* @param _inverseUpper
* @param _qualified
* @param _inverseQualified
* @param _ordered
* @param _inverseOrdered
* @param _unique
* @param _inverseUnique
* @param _derived
* @param _navigability
* @param _propertyType
* @param _json
* @param _changeListener
*/
private Many1RuntimePropertyEnum(String _qualifiedName, String _persistentName, String _inverseName, String _inverseQualifiedName, boolean _associationClassOne, boolean _memberEndOfAssociationClass, String _associationClassPropertyName, String _inverseAssociationClassPropertyName, boolean _associationClassProperty, boolean _onePrimitivePropertyOfAssociationClass, boolean _onePrimitive, Boolean _readOnly, DataTypeEnum dataTypeEnum, List validations, boolean _manyPrimitive, boolean _oneEnumeration, boolean _manyEnumeration, boolean _controllingSide, boolean _composite, boolean _inverseComposite, String _label, boolean _oneToOne, boolean _oneToMany, boolean _manyToOne, boolean _manyToMany, int _upper, int _lower, int _inverseUpper, boolean _qualified, boolean _inverseQualified, boolean _ordered, boolean _inverseOrdered, boolean _unique, boolean _inverseUnique, boolean _derived, boolean _navigability, Class _propertyType, String _json, boolean _changeListener) {
this._qualifiedName = _qualifiedName;
this._persistentName = _persistentName;
this._inverseName = _inverseName;
this._inverseQualifiedName = _inverseQualifiedName;
this._associationClassOne = _associationClassOne;
this._memberEndOfAssociationClass = _memberEndOfAssociationClass;
this._associationClassPropertyName = _associationClassPropertyName;
this._inverseAssociationClassPropertyName = _inverseAssociationClassPropertyName;
this._associationClassProperty = _associationClassProperty;
this._onePrimitivePropertyOfAssociationClass = _onePrimitivePropertyOfAssociationClass;
this._onePrimitive = _onePrimitive;
this._readOnly = _readOnly;
this.dataTypeEnum = dataTypeEnum;
this.validations = validations;
this._manyPrimitive = _manyPrimitive;
this._oneEnumeration = _oneEnumeration;
this._manyEnumeration = _manyEnumeration;
this._controllingSide = _controllingSide;
this._composite = _composite;
this._inverseComposite = _inverseComposite;
this._label = _label;
this._oneToOne = _oneToOne;
this._oneToMany = _oneToMany;
this._manyToOne = _manyToOne;
this._manyToMany = _manyToMany;
this._upper = _upper;
this._lower = _lower;
this._inverseUpper = _inverseUpper;
this._qualified = _qualified;
this._inverseQualified = _inverseQualified;
this._ordered = _ordered;
this._inverseOrdered = _inverseOrdered;
this._unique = _unique;
this._inverseUnique = _inverseUnique;
this._derived = _derived;
this._navigability = _navigability;
this._propertyType = _propertyType;
this._json = _json;
this._changeListener = _changeListener;
}
static public String asJson() {
int count = 1;
StringBuilder sb = new StringBuilder();;
sb.append("{\"name\": \"Many1\", ");
sb.append("\"qualifiedName\": \"umlgtest::org::umlg::qualifiertest::Many1\", ");
sb.append("\"uri\": \"TODO\", ");
sb.append("\"properties\": [");
for ( Many1RuntimePropertyEnum l : Many1RuntimePropertyEnum.values() ) {
sb.append(l.toJson());
if ( count < Many1RuntimePropertyEnum.values().length ) {
count++;
sb.append(",");
}
}
sb.append("]}");
return sb.toString();
}
static public Many1RuntimePropertyEnum fromInverseQualifiedName(String inverseQualifiedName) {
if ( name.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return name;
}
if ( many2.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return many2;
}
if ( god.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return god;
}
if ( many2List.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return many2List;
}
if ( many2UnqualifiedList.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return many2UnqualifiedList;
}
return null;
}
static public Many1RuntimePropertyEnum fromLabel(String _label) {
if ( name.getLabel().equals(_label) ) {
return name;
}
if ( many2.getLabel().equals(_label) ) {
return many2;
}
if ( god.getLabel().equals(_label) ) {
return god;
}
if ( many2List.getLabel().equals(_label) ) {
return many2List;
}
if ( many2UnqualifiedList.getLabel().equals(_label) ) {
return many2UnqualifiedList;
}
return null;
}
static public Many1RuntimePropertyEnum fromQualifiedName(String qualifiedName) {
if ( name.getQualifiedName().equals(qualifiedName) ) {
return name;
}
if ( many2.getQualifiedName().equals(qualifiedName) ) {
return many2;
}
if ( god.getQualifiedName().equals(qualifiedName) ) {
return god;
}
if ( many2List.getQualifiedName().equals(qualifiedName) ) {
return many2List;
}
if ( many2UnqualifiedList.getQualifiedName().equals(qualifiedName) ) {
return many2UnqualifiedList;
}
return null;
}
public String getAssociationClassPropertyName() {
return this._associationClassPropertyName;
}
public DataTypeEnum getDataTypeEnum() {
return this.dataTypeEnum;
}
public String getInverseAssociationClassPropertyName() {
return this._inverseAssociationClassPropertyName;
}
public String getInverseName() {
return this._inverseName;
}
public String getInverseQualifiedName() {
return this._inverseQualifiedName;
}
public int getInverseUpper() {
return this._inverseUpper;
}
public String getJson() {
return this._json;
}
public String getLabel() {
return this._label;
}
public int getLower() {
return this._lower;
}
public String getPersistentName() {
return this._persistentName;
}
public Class getPropertyType() {
return this._propertyType;
}
public String getQualifiedName() {
return this._qualifiedName;
}
public Boolean getReadOnly() {
return this._readOnly;
}
public int getUpper() {
return this._upper;
}
public List getValidations() {
return this.validations;
}
public boolean isAssociationClassOne() {
return this._associationClassOne;
}
public boolean isAssociationClassProperty() {
return this._associationClassProperty;
}
public boolean isChangeListener() {
return this._changeListener;
}
public boolean isComposite() {
return this._composite;
}
public boolean isControllingSide() {
return this._controllingSide;
}
public boolean isDerived() {
return this._derived;
}
public boolean isInverseComposite() {
return this._inverseComposite;
}
public boolean isInverseOrdered() {
return this._inverseOrdered;
}
public boolean isInverseQualified() {
return this._inverseQualified;
}
public boolean isInverseUnique() {
return this._inverseUnique;
}
public boolean isManyEnumeration() {
return this._manyEnumeration;
}
public boolean isManyPrimitive() {
return this._manyPrimitive;
}
public boolean isManyToMany() {
return this._manyToMany;
}
public boolean isManyToOne() {
return this._manyToOne;
}
public boolean isMemberEndOfAssociationClass() {
return this._memberEndOfAssociationClass;
}
public boolean isNavigability() {
return this._navigability;
}
public boolean isOneEnumeration() {
return this._oneEnumeration;
}
public boolean isOnePrimitive() {
return this._onePrimitive;
}
public boolean isOnePrimitivePropertyOfAssociationClass() {
return this._onePrimitivePropertyOfAssociationClass;
}
public boolean isOneToMany() {
return this._oneToMany;
}
public boolean isOneToOne() {
return this._oneToOne;
}
public boolean isOrdered() {
return this._ordered;
}
public boolean isQualified() {
return this._qualified;
}
public boolean isUnique() {
return this._unique;
}
@Override
public boolean isValid(int elementCount) {
if ( isQualified() ) {
return elementCount >= getLower();
} else {
return (getUpper() == -1 || elementCount <= getUpper()) && elementCount >= getLower();
}
}
@Override
public String toJson() {
return getJson();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy