org.umlg.qualifier.Bank Maven / Gradle / Ivy
package org.umlg.qualifier;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.apache.commons.lang3.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.qualifier.Bank.BankRuntimePropertyEnum;
import org.umlg.qualifier.Customer.CustomerRuntimePropertyEnum;
import org.umlg.qualifier.Employee.EmployeeRuntimePropertyEnum;
import org.umlg.qualifier.meta.BankMeta;
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.UmlgOrderedSet;
import org.umlg.runtime.collection.UmlgQualifiedSet;
import org.umlg.runtime.collection.UmlgRuntimeProperty;
import org.umlg.runtime.collection.UmlgSet;
import org.umlg.runtime.collection.memory.UmlgMemorySet;
import org.umlg.runtime.collection.ocl.*;
import org.umlg.runtime.collection.persistent.UmlgOrderedSetImpl;
import org.umlg.runtime.collection.persistent.UmlgQualifiedSetImpl;
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.UmlgMetaNode;
import org.umlg.runtime.domain.UmlgNode;
import org.umlg.runtime.domain.UmlgRootNode;
import org.umlg.runtime.domain.json.ToJsonUtil;
import org.umlg.runtime.util.ObjectMapperFactory;
import org.umlg.runtime.util.Pair;
import org.umlg.runtime.util.UmlgCollections;
import org.umlg.runtime.validation.UmlgConstraintViolation;
import org.umlg.runtime.validation.UmlgConstraintViolationException;
import org.umlg.runtime.validation.UmlgValidation;
public class Bank extends BaseUmlgCompositionNode implements UmlgRootNode, CompositionNode {
static final public long serialVersionUID = 1L;
private UmlgSet name;
private UmlgQualifiedSet customer;
private UmlgOrderedSet employee;
private String tmpId; // tmpId is only used the umlg restlet gui. It is never persisted. Its value is generated by the gui.
/**
* constructor for Bank
*
* @param id
*/
public Bank(Object id) {
super(id);
}
/**
* constructor for Bank
*
* @param vertex
*/
public Bank(Vertex vertex) {
super(vertex);
}
/**
* default constructor for Bank
*/
public Bank() {
this(true);
}
/**
* constructor for Bank
*
* @param persistent
*/
public Bank(Boolean persistent) {
super(persistent);
Edge edge = UMLG.get().getRoot().addEdge(getEdgeToRootLabel(), this.vertex);
edge.property("inClass", this.getClass().getName());
}
public void addToCustomer(Customer customer) {
if ( customer != null ) {
customer.clearBank();
customer.initialiseProperty(CustomerRuntimePropertyEnum.bank, false);
removeFromCustomer(customer);
}
if ( customer != null ) {
this.customer.add(customer);
}
}
public void addToCustomer(UmlgSet customer) {
for ( Customer _c : customer ) {
this.addToCustomer(_c);
}
}
public void addToCustomerIgnoreInverse(Customer customer) {
if ( customer != null ) {
customer.clearBank();
customer.initialiseProperty(CustomerRuntimePropertyEnum.bank, false);
removeFromCustomer(customer);
}
if ( customer != null ) {
this.customer.addIgnoreInverse(customer);
}
}
public void addToEmployee(Employee employee) {
if ( employee != null ) {
employee.clearBank();
employee.initialiseProperty(EmployeeRuntimePropertyEnum.bank, false);
removeFromEmployee(employee);
}
if ( employee != null ) {
this.employee.add(employee);
}
}
public void addToEmployee(UmlgOrderedSet employee) {
if ( !employee.isEmpty() ) {
this.employee.addAll(employee);
}
}
public void addToEmployee(int index, Employee employee) {
if ( employee != null ) {
employee.clearBank();
employee.initialiseProperty(EmployeeRuntimePropertyEnum.bank, false);
removeFromEmployee(employee);
}
if ( employee != null ) {
this.employee.add(index, employee);
}
}
public void addToEmployee(int index, UmlgOrderedSet employee) {
if ( !employee.isEmpty() ) {
this.employee.addAll(employee);
}
}
public void addToEmployeeIgnoreInverse(Employee employee) {
if ( employee != null ) {
employee.clearBank();
employee.initialiseProperty(EmployeeRuntimePropertyEnum.bank, false);
removeFromEmployee(employee);
}
if ( employee != null ) {
this.employee.addIgnoreInverse(employee);
}
}
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 Bank> allInstances(Filter filter) {
UmlgSet result = new UmlgMemorySet();
result.addAll(UMLG.get().allInstances(Bank.class.getName(), filter));
return result;
}
static public UmlgSet extends Bank> allInstances() {
UmlgSet result = new UmlgMemorySet();
result.addAll(UMLG.get().allInstances(Bank.class.getName()));
return result;
}
@Override
public List checkClassConstraints() {
List result = new ArrayList();
return result;
}
public void clearCustomer() {
this.customer.clear();
}
public void clearEmployee() {
this.employee.clear();
}
public void clearName() {
this.name.clear();
}
@Override
public void delete() {
for ( Customer child : getCustomer() ) {
child.delete();
}
for ( Employee child : getEmployee() ) {
child.delete();
}
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 UmlgQualifiedSet getCustomer() {
return this.customer;
}
public Customer getCustomerForNameQualifierandAccountNumberQualifier(Pair nameQualifier, Pair accountNumberQualifier) {
GraphTraversal graphTraversalcustomer_Customer = UMLG.get().traversal().V(this.vertex).to(
BankRuntimePropertyEnum.customer.isControllingSide() ? Direction.OUT : Direction.IN,
BankRuntimePropertyEnum.customer.getLabel())
.has(T.label, "Customer");
UmlgSet result;
graphTraversalcustomer_Customer.has("name", nameQualifier.getSecond());
graphTraversalcustomer_Customer.has("accountNumber", accountNumberQualifier.getSecond());
UmlgSet customer_customer_Customer = new UmlgSetClosableIterableImpl(graphTraversalcustomer_Customer, BankRuntimePropertyEnum.customer);
result = customer_customer_Customer;
if ( result.iterator().hasNext() ) {
return result.iterator().next();
} else {
return null;
}
}
public UmlgSet getCustomerForPartialNameQualifierandAccountNumberQualifier(Pair nameQualifier, Pair accountNumberQualifier) {
GraphTraversal graphTraversal = UMLG.get().traversal().V(this.vertex).to(
BankRuntimePropertyEnum.customer.isControllingSide() ? Direction.OUT : Direction.IN,
BankRuntimePropertyEnum.customer.getLabel())
.has(T.label, "Customer");
if ( nameQualifier != null ) {
graphTraversal.has("name", nameQualifier.getSecond());
}
if ( accountNumberQualifier != null ) {
graphTraversal.has("accountNumber", accountNumberQualifier.getSecond());
}
if ( graphTraversal.hasNext() ) {
return new UmlgSetClosableIterableImpl(graphTraversal, BankRuntimePropertyEnum.customer);
} else {
return UmlgCollections.emptySet();
}
}
/**
* Implements the ocl statement for derived property 'customerJohn001'
*
* package testoclmodel::org::umlg::qualifier
* context Bank::customerJohn001 : testoclmodel::org::umlg::qualifier::Customer
* derive: self.customer['john',1]
* endpackage
*
*/
public Customer getCustomerJohn001() {
return getCustomerForNameQualifierandAccountNumberQualifier(Pair.of(Compare.eq, "john"), Pair.of(Compare.eq, 1));
}
public String getEdgeToRootLabel() {
return UmlgLabelConverterFactory.getUmlgLabelConverter().convert("root_Bank");
}
public UmlgOrderedSet getEmployee() {
return this.employee;
}
/**
* Implements the ocl statement for derived property 'employeeNames'
*
* package testoclmodel::org::umlg::qualifier
* context Bank::employeeNames : Set(PrimitiveTypes::String)
* derive: self.employee.name->asSet()
* endpackage
*
*/
public UmlgSet getEmployeeNames() {
return getEmployee().collect(new BodyExpressionEvaluator() {
@Override
public String evaluate(Employee temp1) {
return temp1.getName();
}
}).asSet();
}
/**
* Implements the ocl statement for derived property 'employeeSize'
*
* package testoclmodel::org::umlg::qualifier
* context Bank::employeeSize : PrimitiveTypes::Integer
* derive: self.employee->size()
* endpackage
*
*/
public Integer getEmployeeSize() {
return getEmployee().size();
}
@Override
public String getMetaDataAsJson() {
return Bank.BankRuntimePropertyEnum.asJson();
}
public UmlgMetaNode getMetaNode() {
return BankMeta.getInstance();
}
public String getName() {
UmlgSet tmp = this.name;
if ( !tmp.isEmpty() ) {
return tmp.iterator().next();
} else {
return null;
}
}
@Override
public UmlgNode getOwningObject() {
return null;
}
@Override
public String getQualifiedName() {
return "testoclmodel::org::umlg::qualifier::Bank";
}
public List getQualifierForCustomer(Customer context) {
List result = new ArrayList<>();
result.add(new Qualifier("name", context.getName(), Multiplicity.ZERO_TO_ONE, Customer.CustomerRuntimePropertyEnum.name));
result.add(new Qualifier("accountNumber", context.getAccountNumber(), Multiplicity.ZERO_TO_ONE, Customer.CustomerRuntimePropertyEnum.accountNumber));
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();
BankRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = BankRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
} else {
runtimeProperty = BankRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
}
if ( runtimeProperty != null && result.isEmpty() ) {
switch ( runtimeProperty ) {
case customer:
result = getQualifierForCustomer((Customer)node);
break;
default:
result = Collections.emptyList();
}
}
return result;
}
/**
* getSize is called from the BaseCollection.addInternal in order to save the sice 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;
BankRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = BankRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
} else {
runtimeProperty = BankRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
}
if ( runtimeProperty != null && result == 0 ) {
switch ( runtimeProperty ) {
case name:
result = name.size();
break;
case customer:
result = customer.size();
break;
case employee:
result = employee.size();
break;
default:
result = 0;
}
}
return result;
}
@Override
public String getUid() {
String uid;
if ( !this.vertex.property("uid").isPresent() ) {
uid=UUID.randomUUID().toString();
this.vertex.property("uid", uid);
} else {
uid=this.vertex.value("uid");
}
return uid;
}
@Override
public boolean hasOnlyOneCompositeParent() {
int result = 0;
return result == 1;
}
public void initVariables() {
}
@Override
public void initialiseProperties() {
this.name = new UmlgSetImpl(this, BankRuntimePropertyEnum.name);
this.customer = new UmlgQualifiedSetImpl(this, BankRuntimePropertyEnum.customer);
this.employee = new UmlgOrderedSetImpl(this, BankRuntimePropertyEnum.employee);
}
@Override
public void initialiseProperty(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse) {
BankRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (BankRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (BankRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case name:
this.name = new UmlgSetImpl(this, BankRuntimePropertyEnum.name);
break;
case customer:
this.customer = new UmlgQualifiedSetImpl(this, BankRuntimePropertyEnum.customer);
break;
case employee:
this.employee = new UmlgOrderedSetImpl(this, BankRuntimePropertyEnum.employee);
break;
}
}
}
@Override
public UmlgRuntimeProperty inverseAdder(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, UmlgNode umlgNode) {
BankRuntimePropertyEnum runtimeProperty;
if ( !inverse ) {
runtimeProperty = (BankRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
} else {
runtimeProperty = (BankRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
}
if ( runtimeProperty != null ) {
switch ( runtimeProperty ) {
case customer:
this.customer.inverseAdder((Customer)umlgNode);
break;
case employee:
this.employee.inverseAdder((Employee)umlgNode);
break;
}
return runtimeProperty;
} else {
return null;
}
}
@Override
public boolean isTinkerRoot() {
return true;
}
public void removeFromCustomer(Customer customer) {
if ( customer != null ) {
this.customer.remove(customer);
}
}
public void removeFromCustomer(UmlgSet customer) {
if ( !customer.isEmpty() ) {
this.customer.removeAll(customer);
}
}
public void removeFromEmployee(Employee employee) {
if ( employee != null ) {
this.employee.remove(employee);
}
}
public void removeFromEmployee(UmlgOrderedSet employee) {
if ( !employee.isEmpty() ) {
this.employee.removeAll(employee);
}
}
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 setCustomer(UmlgSet customer) {
clearCustomer();
if ( customer != null ) {
addToCustomer(customer);
}
}
public void setEmployee(UmlgOrderedSet employee) {
clearEmployee();
if ( employee != null ) {
addToEmployee(employee);
}
}
public void setName(String name) {
clearName();
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() + "\", ");
sb.append("\"metaNodeId\": \"" + getMetaNode().getId() + "\", ");
sb.append("\"name\": " + (getName() != null ? "\"" + StringEscapeUtils.escapeJson(getName()) + "\"" : null ));
sb.append(", ");
if ( getCustomerJohn001() != null ) {
if ( UmlgTmpIdManager.INSTANCE.get(getCustomerJohn001().getId()) != null ) {
sb.append("\"customerJohn001\": " + "{\"id\": \"" + getCustomerJohn001().getId() + "\", \"tmpId\": \"" + UmlgTmpIdManager.INSTANCE.get(getCustomerJohn001().getId()) + "\",\"displayName\": \"" + getCustomerJohn001().getName() + "\"}" + "");
} else {
sb.append("\"customerJohn001\": " + "{\"id\": \"" + getCustomerJohn001().getId() + "\", \"displayName\": \"" + getCustomerJohn001().getName() + "\"}" + "");
}
} else {
sb.append("\"customerJohn001\": " + "{\"id\": " + null + ", \"displayName\": " + null + "}");
}
sb.append(", ");
sb.append("\"employeeSize\": " + getEmployeeSize() + "");
sb.append(", ");
sb.append("\"employeeNames\": " + ToJsonUtil.primitivesToJson(getEmployeeNames()) + "");
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("\"metaNodeId\": \"" + getMetaNode().getId() + "\", ");
sb.append("\"name\": " + (getName() != null ? "\"" + StringEscapeUtils.escapeJson(getName()) + "\"" : null ));
sb.append(", ");
if ( getCustomerJohn001() != null ) {
if ( UmlgTmpIdManager.INSTANCE.get(getCustomerJohn001().getId()) != null ) {
sb.append("\"customerJohn001\": " + "{\"id\": \"" + getCustomerJohn001().getId() + "\", \"tmpId\": \"" + UmlgTmpIdManager.INSTANCE.get(getCustomerJohn001().getId()) + "\",\"displayName\": \"" + getCustomerJohn001().getName() + "\"}" + "");
} else {
sb.append("\"customerJohn001\": " + "{\"id\": \"" + getCustomerJohn001().getId() + "\", \"displayName\": \"" + getCustomerJohn001().getName() + "\"}" + "");
}
} else {
sb.append("\"customerJohn001\": " + "{\"id\": " + null + ", \"displayName\": " + null + "}");
}
sb.append(", ");
sb.append("\"employeeSize\": " + getEmployeeSize() + "");
sb.append(", ");
sb.append("\"employeeNames\": " + ToJsonUtil.primitivesToJson(getEmployeeNames()) + "");
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 ( getName() == null ) {
result.add(new UmlgConstraintViolation("multiplicity", "testoclmodel::org::umlg::qualifier::Bank::name", "lower multiplicity is 1"));
}
return result;
}
public List validateName(String name) {
List result = new ArrayList();
return result;
}
static public enum BankRuntimePropertyEnum implements UmlgRuntimeProperty {
name(/* qualifiedName */ "testoclmodel::org::umlg::qualifier::Bank::name",/* persistentName */ "name",/* inverseName */ "inverseOf::name",/* inverseQualifiedName */ "inverseOf::testoclmodel::org::umlg::qualifier::Bank::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\": \"testoclmodel::org::umlg::qualifier::Bank::name\", \"persistentName\": \"name\", \"inverseName\": \"inverseOf::name\", \"inverseQualifiedName\": \"inverseOf::testoclmodel::org::umlg::qualifier::Bank::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),
customerJohn001(/* qualifiedName */ "testoclmodel::org::umlg::qualifier::Bank::customerJohn001",/* persistentName */ "customerJohn001",/* inverseName */ "inverseOf::customerJohn001",/* inverseQualifiedName */ "inverseOf::testoclmodel::org::umlg::qualifier::Bank::customerJohn001",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ true,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("customerJohn001"),/* 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 */ true,/* isNavigable */ true,/* propertyType */ Customer.class,/* json */ "{\"name\": \"customerJohn001\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": true, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"testoclmodel::org::umlg::qualifier::Bank::customerJohn001\", \"persistentName\": \"customerJohn001\", \"inverseName\": \"inverseOf::customerJohn001\", \"inverseQualifiedName\": \"inverseOf::testoclmodel::org::umlg::qualifier::Bank::customerJohn001\", \"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\": \"customerJohn001\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": true, \"navigable\": true}",/* isChangeListenerAttribute */ false),
employeeSize(/* qualifiedName */ "testoclmodel::org::umlg::qualifier::Bank::employeeSize",/* persistentName */ "employeeSize",/* inverseName */ "inverseOf::employeeSize",/* inverseQualifiedName */ "inverseOf::testoclmodel::org::umlg::qualifier::Bank::employeeSize",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ true,/* isReadOnly */ true,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("employeeSize"),/* 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 */ true,/* isNavigable */ true,/* propertyType */ Integer.class,/* json */ "{\"name\": \"employeeSize\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": true, \"readOnly\": true, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"testoclmodel::org::umlg::qualifier::Bank::employeeSize\", \"persistentName\": \"employeeSize\", \"inverseName\": \"inverseOf::employeeSize\", \"inverseQualifiedName\": \"inverseOf::testoclmodel::org::umlg::qualifier::Bank::employeeSize\", \"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\": \"employeeSize\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": true, \"navigable\": true}",/* isChangeListenerAttribute */ false),
customer(/* qualifiedName */ "testoclmodel::org::umlg::qualifier::Bank::customer",/* persistentName */ "customer",/* inverseName */ "bank",/* inverseQualifiedName */ "testoclmodel::org::umlg::qualifier::A__::bank",/* 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 */ true,/* isComposite */ true,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("A__"),/* isOneToOne */ false,/* isOneToMany */ true,/* isManyToOne */ false,/* isManyToMany */ false,/* upper */ 1,/* lower */ 0,/* inverseUpper */ 1,/* isQualified */ true,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Customer.class,/* json */ "{\"name\": \"customer\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"testoclmodel::org::umlg::qualifier::Bank::customer\", \"persistentName\": \"customer\", \"inverseName\": \"bank\", \"inverseQualifiedName\": \"testoclmodel::org::umlg::qualifier::A__::bank\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": true, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": true, \"manyToOne\": false, \"manyToMany\": false, \"upper\": 1, \"lower\": 0, \"inverseUpper\": 1, \"label\": \"A__\", \"qualified\": true, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
employeeNames(/* qualifiedName */ "testoclmodel::org::umlg::qualifier::Bank::employeeNames",/* persistentName */ "employeeNames",/* inverseName */ "inverseOf::employeeNames",/* inverseQualifiedName */ "inverseOf::testoclmodel::org::umlg::qualifier::Bank::employeeNames",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ true,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ true,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("employeeNames"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ false,/* isManyToMany */ true,/* upper */ -1,/* lower */ 0,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ false,/* isDerived */ true,/* isNavigable */ true,/* propertyType */ String.class,/* json */ "{\"name\": \"employeeNames\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": true, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"testoclmodel::org::umlg::qualifier::Bank::employeeNames\", \"persistentName\": \"employeeNames\", \"inverseName\": \"inverseOf::employeeNames\", \"inverseQualifiedName\": \"inverseOf::testoclmodel::org::umlg::qualifier::Bank::employeeNames\", \"manyPrimitive\": true, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": false, \"manyToMany\": true, \"upper\": -1, \"lower\": 0, \"inverseUpper\": 1, \"label\": \"employeeNames\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": true, \"navigable\": true}",/* isChangeListenerAttribute */ false),
employee(/* qualifiedName */ "testoclmodel::org::umlg::qualifier::Bank::employee",/* persistentName */ "employee",/* inverseName */ "bank",/* inverseQualifiedName */ "testoclmodel::org::umlg::qualifier::A__::bank",/* 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 */ true,/* isComposite */ true,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("A__"),/* isOneToOne */ false,/* isOneToMany */ true,/* isManyToOne */ false,/* isManyToMany */ false,/* upper */ -1,/* lower */ 0,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ true,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ Employee.class,/* json */ "{\"name\": \"employee\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"testoclmodel::org::umlg::qualifier::Bank::employee\", \"persistentName\": \"employee\", \"inverseName\": \"bank\", \"inverseQualifiedName\": \"testoclmodel::org::umlg::qualifier::A__::bank\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": true, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": true, \"manyToOne\": false, \"manyToMany\": false, \"upper\": -1, \"lower\": 0, \"inverseUpper\": 1, \"label\": \"A__\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": true, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
testoclmodel(/* qualifiedName */ "testoclmodel",/* persistentName */ "testoclmodel",/* inverseName */ "inverseOftestoclmodel",/* inverseQualifiedName */ "inverseOftestoclmodel",/* 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 */ true,/* isComposite */ false,/* isInverseComposite */ true,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("rootBank"),/* isOneToOne */ true,/* isOneToMany */ false,/* isManyToOne */ false,/* isManyToMany */ false,/* upper */ -1,/* lower */ 0,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ false,/* isInverseUnique */ false,/* isDerived */ false,/* isNavigable */ false,/* propertyType */ Object.class,/* json */ "{\"name\": \"testoclmodel\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"testoclmodel\", \"persistentName\": \"testoclmodel\", \"inverseName\": \"inverseOftestoclmodel\", \"inverseQualifiedName\": \"inverseOftestoclmodel\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": false, \"inverseComposite\": true, \"oneToOne\": true, \"oneToMany\": false, \"manyToOne\": false, \"manyToMany\": false, \"upper\": -1, \"lower\": 0, \"inverseUpper\": 1, \"label\": \"rootBank\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": false, \"inverseUnique\": false, \"derived\": false, \"navigable\": false}",/* 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 BankRuntimePropertyEnum
*
* @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 BankRuntimePropertyEnum(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\": \"Bank\", ");
sb.append("\"qualifiedName\": \"testoclmodel::org::umlg::qualifier::Bank\", ");
sb.append("\"uri\": \"TODO\", ");
sb.append("\"properties\": [");
for ( BankRuntimePropertyEnum l : BankRuntimePropertyEnum.values() ) {
sb.append(l.toJson());
if ( count < BankRuntimePropertyEnum.values().length ) {
count++;
sb.append(",");
}
}
sb.append("]}");
return sb.toString();
}
static public BankRuntimePropertyEnum fromInverseQualifiedName(String inverseQualifiedName) {
if ( testoclmodel.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return testoclmodel;
}
if ( employee.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return employee;
}
if ( employeeNames.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return employeeNames;
}
if ( customer.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return customer;
}
if ( employeeSize.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return employeeSize;
}
if ( customerJohn001.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return customerJohn001;
}
if ( name.getInverseQualifiedName().equals(inverseQualifiedName) ) {
return name;
}
return null;
}
static public BankRuntimePropertyEnum fromLabel(String _label) {
if ( testoclmodel.getLabel().equals(_label) ) {
return testoclmodel;
}
if ( employee.getLabel().equals(_label) ) {
return employee;
}
if ( employeeNames.getLabel().equals(_label) ) {
return employeeNames;
}
if ( customer.getLabel().equals(_label) ) {
return customer;
}
if ( employeeSize.getLabel().equals(_label) ) {
return employeeSize;
}
if ( customerJohn001.getLabel().equals(_label) ) {
return customerJohn001;
}
if ( name.getLabel().equals(_label) ) {
return name;
}
return null;
}
static public BankRuntimePropertyEnum fromQualifiedName(String qualifiedName) {
if ( testoclmodel.getQualifiedName().equals(qualifiedName) ) {
return testoclmodel;
}
if ( employee.getQualifiedName().equals(qualifiedName) ) {
return employee;
}
if ( employeeNames.getQualifiedName().equals(qualifiedName) ) {
return employeeNames;
}
if ( customer.getQualifiedName().equals(qualifiedName) ) {
return customer;
}
if ( employeeSize.getQualifiedName().equals(qualifiedName) ) {
return employeeSize;
}
if ( customerJohn001.getQualifiedName().equals(qualifiedName) ) {
return customerJohn001;
}
if ( name.getQualifiedName().equals(qualifiedName) ) {
return name;
}
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