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

org.umlg.indexing.Product Maven / Gradle / Ivy

The newest version!
package org.umlg.indexing;

import com.fasterxml.jackson.databind.ObjectMapper;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
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.structure.Vertex;
import org.umlg.runtime.adaptor.TransactionThreadEntityVar;
import org.umlg.runtime.adaptor.UMLG;
import org.umlg.runtime.adaptor.UmlgLabelConverterFactory;
import org.umlg.runtime.adaptor.UmlgTmpIdManager;
import org.umlg.runtime.collection.Filter;
import org.umlg.runtime.collection.Qualifier;
import org.umlg.runtime.collection.UmlgCollection;
import org.umlg.runtime.collection.UmlgRuntimeProperty;
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.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.domain.UmlgRootNode;
import org.umlg.runtime.util.ObjectMapperFactory;
import org.umlg.runtime.util.UmlgFormatter;
import org.umlg.runtime.validation.DateTimeValidation;
import org.umlg.runtime.validation.DateValidation;
import org.umlg.runtime.validation.TimeValidation;
import org.umlg.runtime.validation.UmlgConstraintViolation;
import org.umlg.runtime.validation.UmlgConstraintViolationException;
import org.umlg.runtime.validation.UmlgValidation;

public class Product extends BaseUmlgCompositionNode implements UmlgRootNode, CompositionNode {
	static final public long serialVersionUID = 1L;
	private UmlgSet created;
	private UmlgSet deleted;
	private UmlgSet time;
	private UmlgSet type;
	private String tmpId;	// tmpId is only used the umlg restlet gui. It is never persisted. Its value is generated by the gui.

	/**
	 * constructor for Product
	 * 
	 * @param id 
	 */
	public Product(Object id)  {
		super(id);
	}
	
	/**
	 * constructor for Product
	 * 
	 * @param vertex 
	 */
	public Product(Vertex vertex)  {
		super(vertex);
	}
	
	/**
	 * default constructor for Product
	 */
	public Product()  {
		this(true);
	}
	
	/**
	 * constructor for Product
	 * 
	 * @param persistent 
	 */
	public Product(Boolean persistent)  {
		super(persistent);
	}

	public void addToCreated(LocalDate created) {
		if ( !this.created.isEmpty() ) {
			throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
		}
		if ( created != null ) {
			List violations = validateCreated(created);
			if ( violations.isEmpty() ) {
				this.created.add(created);
			} else {
				throw new UmlgConstraintViolationException(violations);
			}
		}
	}
	
	public void addToCreatedIgnoreInverse(LocalDate created) {
		if ( !this.created.isEmpty() ) {
			throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
		}
		if ( created != null ) {
			List violations = validateCreated(created);
			if ( violations.isEmpty() ) {
				this.created.add(created);
			} else {
				throw new UmlgConstraintViolationException(violations);
			}
		}
	}
	
	public void addToDeleted(LocalDateTime deleted) {
		if ( !this.deleted.isEmpty() ) {
			throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
		}
		if ( deleted != null ) {
			List violations = validateDeleted(deleted);
			if ( violations.isEmpty() ) {
				this.deleted.add(deleted);
			} else {
				throw new UmlgConstraintViolationException(violations);
			}
		}
	}
	
	public void addToDeletedIgnoreInverse(LocalDateTime deleted) {
		if ( !this.deleted.isEmpty() ) {
			throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
		}
		if ( deleted != null ) {
			List violations = validateDeleted(deleted);
			if ( violations.isEmpty() ) {
				this.deleted.add(deleted);
			} else {
				throw new UmlgConstraintViolationException(violations);
			}
		}
	}
	
	public void addToTime(LocalTime time) {
		if ( !this.time.isEmpty() ) {
			throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
		}
		if ( time != null ) {
			List violations = validateTime(time);
			if ( violations.isEmpty() ) {
				this.time.add(time);
			} else {
				throw new UmlgConstraintViolationException(violations);
			}
		}
	}
	
	public void addToTimeIgnoreInverse(LocalTime time) {
		if ( !this.time.isEmpty() ) {
			throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
		}
		if ( time != null ) {
			List violations = validateTime(time);
			if ( violations.isEmpty() ) {
				this.time.add(time);
			} else {
				throw new UmlgConstraintViolationException(violations);
			}
		}
	}
	
	public void addToType(PTYPE type) {
		if ( !this.type.isEmpty() ) {
			throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
		}
		if ( type != null ) {
			List violations = validateType(type);
			if ( violations.isEmpty() ) {
				this.type.add(type);
			} else {
				throw new UmlgConstraintViolationException(violations);
			}
		}
	}
	
	public void addToTypeIgnoreInverse(PTYPE type) {
		if ( !this.type.isEmpty() ) {
			throw new RuntimeException("Property is a one and already has value, first clear it before adding!");
		}
		if ( type != null ) {
			List violations = validateType(type);
			if ( violations.isEmpty() ) {
				this.type.add(type);
			} else {
				throw new UmlgConstraintViolationException(violations);
			}
		}
	}
	
	static public UmlgSet allInstances(Filter filter) {
		UmlgSet result = new UmlgMemorySet();
		result.addAll(UMLG.get().allInstances(Product.class.getName(), filter));
		return result;
	}
	
	static public UmlgSet allInstances() {
		UmlgSet result = new UmlgMemorySet();
		result.addAll(UMLG.get().allInstances(Product.class.getName()));
		return result;
	}
	
	@Override
	public List checkClassConstraints() {
		List result = new ArrayList();
		return result;
	}
	
	public void clearCreated() {
		this.created.clear();
	}
	
	public void clearDeleted() {
		this.deleted.clear();
	}
	
	public void clearTime() {
		this.time.clear();
	}
	
	public void clearType() {
		this.type.clear();
	}
	
	@Override
	public void delete() {
		this.time.clear();
		this.created.clear();
		this.deleted.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("type") ) {
			if ( propertyMap.get("type") != null ) {
				PTYPE type = PTYPE.fromJson((String)propertyMap.get("type"));
				setType(type);
			} else {
				setType(null);
			}
		}
		if ( propertyMap.containsKey("time") ) {
			if ( propertyMap.get("time") != null ) {
				LocalTime time = UmlgFormatter.parseTime((String)propertyMap.get("time"));
				setTime(time);
			} else {
				setTime(null);
			}
		}
		if ( propertyMap.containsKey("created") ) {
			if ( propertyMap.get("created") != null ) {
				LocalDate created = UmlgFormatter.parseDate((String)propertyMap.get("created"));
				setCreated(created);
			} else {
				setCreated(null);
			}
		}
		if ( propertyMap.containsKey("deleted") ) {
			if ( propertyMap.get("deleted") != null ) {
				LocalDateTime deleted = UmlgFormatter.parseDateTime((String)propertyMap.get("deleted"));
				setDeleted(deleted);
			} else {
				setDeleted(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 LocalDate getCreated() {
		UmlgSet tmp = this.created;
		if ( !tmp.isEmpty() ) {
			return tmp.iterator().next();
		} else {
			return null;
		}
	}
	
	public LocalDateTime getDeleted() {
		UmlgSet tmp = this.deleted;
		if ( !tmp.isEmpty() ) {
			return tmp.iterator().next();
		} else {
			return null;
		}
	}
	
	@Override
	public String getMetaDataAsJson() {
		return Product.ProductRuntimePropertyEnum.asJson();
	}
	
	@Override
	public UmlgNode getOwningObject() {
		return null;
	}
	
	@Override
	public String getQualifiedName() {
		return "umlgtest::org::umlg::indexing::Product";
	}
	
	/**
	 * 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();
		ProductRuntimePropertyEnum runtimeProperty;
		if ( !inverse ) {
			runtimeProperty = ProductRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
		} else {
			runtimeProperty = ProductRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
		}
		if ( runtimeProperty != null && result.isEmpty() ) {
			switch ( runtimeProperty ) {
				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;
		ProductRuntimePropertyEnum runtimeProperty;
		if ( !inverse ) {
			runtimeProperty = ProductRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName());
		} else {
			runtimeProperty = ProductRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName());
		}
		if ( runtimeProperty != null && result == 0 ) {
			switch ( runtimeProperty ) {
				case type:
					result = type.size();
					break;
			
				case time:
					result = time.size();
					break;
			
				case created:
					result = created.size();
					break;
			
				case deleted:
					result = deleted.size();
					break;
			
				default:
					result = 0;
			}
		
		}
		return result;
	}
	
	public LocalTime getTime() {
		UmlgSet tmp = this.time;
		if ( !tmp.isEmpty() ) {
			return tmp.iterator().next();
		} else {
			return null;
		}
	}
	
	public PTYPE getType() {
		UmlgSet tmp = this.type;
		if ( !tmp.isEmpty() ) {
			return tmp.iterator().next();
		} else {
			return null;
		}
	}
	
	@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;
		return result == 1;
	}
	
	public void initDataTypeVariablesWithDefaultValues() {
	}
	
	public void initVariables() {
	}
	
	/**
	 * boolean properties' default values are initialized in the constructor via z_internalBooleanProperties
	 * 
	 * @param loaded 
	 */
	@Override
	public void initialiseProperties(boolean loaded) {
		this.type =  new UmlgSetImpl(this, PropertyTree.from(ProductRuntimePropertyEnum.type), loaded);
		this.time =  new UmlgSetImpl(this, PropertyTree.from(ProductRuntimePropertyEnum.time), loaded);
		this.created =  new UmlgSetImpl(this, PropertyTree.from(ProductRuntimePropertyEnum.created), loaded);
		this.deleted =  new UmlgSetImpl(this, PropertyTree.from(ProductRuntimePropertyEnum.deleted), loaded);
	}
	
	@Override
	public void initialiseProperty(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, boolean loaded) {
		ProductRuntimePropertyEnum runtimeProperty;
		if ( !inverse ) {
			runtimeProperty = (ProductRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
		} else {
			runtimeProperty = (ProductRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
		}
		if ( runtimeProperty != null ) {
			switch ( runtimeProperty ) {
				case type:
					this.type =  new UmlgSetImpl(this, PropertyTree.from(ProductRuntimePropertyEnum.type), loaded);
					break;
			
				case time:
					this.time =  new UmlgSetImpl(this, PropertyTree.from(ProductRuntimePropertyEnum.time), loaded);
					break;
			
				case created:
					this.created =  new UmlgSetImpl(this, PropertyTree.from(ProductRuntimePropertyEnum.created), loaded);
					break;
			
				case deleted:
					this.deleted =  new UmlgSetImpl(this, PropertyTree.from(ProductRuntimePropertyEnum.deleted), loaded);
					break;
			
			}
		
		}
	}
	
	@Override
	public UmlgRuntimeProperty inverseAdder(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, UmlgNode umlgNode) {
		ProductRuntimePropertyEnum runtimeProperty;
		if ( !inverse ) {
			runtimeProperty = (ProductRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
		} else {
			runtimeProperty = (ProductRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
		}
		if ( runtimeProperty != null ) {
			switch ( runtimeProperty ) {
			}
			
			return runtimeProperty;
		} else {
			return null;
		}
	}
	
	@Override
	public boolean isTinkerRoot() {
		return true;
	}
	
	static public List product_findByCreated(LocalDate created) {
		List result = UMLG.get().getFromIndex("Product", UmlgLabelConverterFactory.getUmlgLabelConverter().convert("created"), UmlgFormatter.format(DataTypeEnum.Date, created));
		return result;
	}
	
	static public Product product_findByDeleted(LocalDateTime deleted) {
		Product result =  UMLG.get().getFromUniqueIndex("Product", "deleted", UmlgFormatter.format(DataTypeEnum.DateTime, deleted));
		if ( result != null ) {
			return result;
		}
		return result;
	}
	
	static public Product product_findByTime(LocalTime time) {
		Product result =  UMLG.get().getFromUniqueIndex("Product", "time", UmlgFormatter.format(DataTypeEnum.Time, time));
		if ( result != null ) {
			return result;
		}
		return result;
	}
	
	static public List product_findByType(PTYPE type) {
		List result = UMLG.get().getFromIndex("Product", UmlgLabelConverterFactory.getUmlgLabelConverter().convert("type"), type.name());
		return result;
	}
	
	public void removeFromCreated(LocalDate created) {
		if ( created != null ) {
			this.created.remove(created);
		}
	}
	
	public void removeFromCreated(UmlgSet created) {
		if ( !created.isEmpty() ) {
			this.created.removeAll(created);
		}
	}
	
	public void removeFromDeleted(LocalDateTime deleted) {
		if ( deleted != null ) {
			this.deleted.remove(deleted);
		}
	}
	
	public void removeFromDeleted(UmlgSet deleted) {
		if ( !deleted.isEmpty() ) {
			this.deleted.removeAll(deleted);
		}
	}
	
	public void removeFromTime(LocalTime time) {
		if ( time != null ) {
			this.time.remove(time);
		}
	}
	
	public void removeFromTime(UmlgSet time) {
		if ( !time.isEmpty() ) {
			this.time.removeAll(time);
		}
	}
	
	public void removeFromType(PTYPE type) {
		if ( type != null ) {
			this.type.remove(type);
		}
	}
	
	public void removeFromType(UmlgSet type) {
		if ( !type.isEmpty() ) {
			this.type.removeAll(type);
		}
	}
	
	public void setCreated(LocalDate created) {
		if ( created == null ) {
			clearCreated();
		} else {
			z_internalClearCreated();
		}
		addToCreated(created);
	}
	
	public void setDeleted(LocalDateTime deleted) {
		if ( deleted == null ) {
			clearDeleted();
		} else {
			z_internalClearDeleted();
		}
		addToDeleted(deleted);
	}
	
	public void setTime(LocalTime time) {
		if ( time == null ) {
			clearTime();
		} else {
			z_internalClearTime();
		}
		addToTime(time);
	}
	
	public void setType(PTYPE type) {
		if ( type == null ) {
			clearType();
		} else {
			z_internalClearType();
		}
		addToType(type);
	}
	
	/**
	 * 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("\"type\": " + (getType() == null ? null : "\"" + getType().toJson() + "\""));
		sb.append(", ");
		sb.append("\"time\": " + (getTime() != null ? "\"" + UmlgFormatter.format(getTime()) + "\"" : null ));
		sb.append(", ");
		sb.append("\"created\": " + (getCreated() != null ? "\"" + UmlgFormatter.format(getCreated()) + "\"" : null ));
		sb.append(", ");
		sb.append("\"deleted\": " + (getDeleted() != null ? "\"" + UmlgFormatter.format(getDeleted()) + "\"" : 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("\"type\": " + (getType() == null ? null : "\"" + getType().toJson() + "\""));
		sb.append(", ");
		sb.append("\"time\": " + (getTime() != null ? "\"" + UmlgFormatter.format(getTime()) + "\"" : null ));
		sb.append(", ");
		sb.append("\"created\": " + (getCreated() != null ? "\"" + UmlgFormatter.format(getCreated()) + "\"" : null ));
		sb.append(", ");
		sb.append("\"deleted\": " + (getDeleted() != null ? "\"" + UmlgFormatter.format(getDeleted()) + "\"" : 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);
	}
	
	public List validateCreated(LocalDate created) {
		List result = new ArrayList();
		return result;
	}
	
	public List validateDeleted(LocalDateTime deleted) {
		List result = new ArrayList();
		return result;
	}
	
	@Override
	public List validateMultiplicities() {
		List result = new ArrayList();
		return result;
	}
	
	public List validateTime(LocalTime time) {
		List result = new ArrayList();
		return result;
	}
	
	public List validateType(PTYPE type) {
		List result = new ArrayList();
		return result;
	}
	
	@Override
	public void z_internalAddPersistentValueToCollection(UmlgRuntimeProperty umlgRuntimeProperty, Object umlgNode) {
		ProductRuntimePropertyEnum runtimeProperty;
		runtimeProperty = (ProductRuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
		if ( runtimeProperty != null ) {
			switch ( runtimeProperty ) {
				case type:
					this.type.z_internalAdder(PTYPE.valueOf((String)umlgNode));
					break;
			
				case time:
					this.time.z_internalAdder(UmlgFormatter.parse(ProductRuntimePropertyEnum.time.getDataTypeEnum(), umlgNode));
					break;
			
				case created:
					this.created.z_internalAdder(UmlgFormatter.parse(ProductRuntimePropertyEnum.created.getDataTypeEnum(), umlgNode));
					break;
			
				case deleted:
					this.deleted.z_internalAdder(UmlgFormatter.parse(ProductRuntimePropertyEnum.deleted.getDataTypeEnum(), umlgNode));
					break;
			
			}
		
		}
	}
	
	@Override
	public void z_internalAddToCollection(UmlgRuntimeProperty umlgRuntimeProperty, Object umlgNode) {
		ProductRuntimePropertyEnum runtimeProperty;
		runtimeProperty = (ProductRuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
		if ( runtimeProperty != null ) {
			switch ( runtimeProperty ) {
				case type:
					this.type.z_internalAdder((PTYPE)umlgNode);
					break;
			
				case time:
					this.time.z_internalAdder((LocalTime)umlgNode);
					break;
			
				case created:
					this.created.z_internalAdder((LocalDate)umlgNode);
					break;
			
				case deleted:
					this.deleted.z_internalAdder((LocalDateTime)umlgNode);
					break;
			
			}
		
		}
	}
	
	@Override
	public Set z_internalBooleanProperties() {
		Set result = new HashSet();
		return result;
	}
	
	public void z_internalClearCreated() {
		this.created.z_internalClear();
	}
	
	public void z_internalClearDeleted() {
		this.deleted.z_internalClear();
	}
	
	public void z_internalClearTime() {
		this.time.z_internalClear();
	}
	
	public void z_internalClearType() {
		this.type.z_internalClear();
	}
	
	@Override
	public Set z_internalDataTypeProperties() {
		Set result = new HashSet();
		result.add(ProductRuntimePropertyEnum.type);
		result.add(ProductRuntimePropertyEnum.time);
		result.add(ProductRuntimePropertyEnum.created);
		result.add(ProductRuntimePropertyEnum.deleted);
		return result;
	}
	
	@Override
	public Map z_internalDataTypePropertiesWithDefaultValues() {
		Map result = new HashMap();
		return result;
	}
	
	@Override
	public UmlgCollection z_internalGetCollectionFor(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse) {
		UmlgCollection result = null;
		if ( result == null ) {
			ProductRuntimePropertyEnum runtimeProperty;
			if ( !inverse ) {
				runtimeProperty = (ProductRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
			} else {
				runtimeProperty = (ProductRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
			}
			if ( runtimeProperty != null ) {
				switch ( runtimeProperty ) {
					case type:
						result = this.type;
						break;
				
					case time:
						result = this.time;
						break;
				
					case created:
						result = this.created;
						break;
				
					case deleted:
						result = this.deleted;
						break;
				
				}
			
			}
		}
		return result;
	}
	
	@Override
	public UmlgRuntimeProperty z_internalInverseAdder(UmlgRuntimeProperty tumlRuntimeProperty, boolean inverse, UmlgNode umlgNode) {
		ProductRuntimePropertyEnum runtimeProperty;
		if ( !inverse ) {
			runtimeProperty = (ProductRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getQualifiedName()));
		} else {
			runtimeProperty = (ProductRuntimePropertyEnum.fromQualifiedName(tumlRuntimeProperty.getInverseQualifiedName()));
		}
		if ( runtimeProperty != null ) {
			switch ( runtimeProperty ) {
			}
			
			return runtimeProperty;
		} else {
			return null;
		}
	}
	
	@Override
	public void z_internalMarkCollectionLoaded(UmlgRuntimeProperty umlgRuntimeProperty, boolean loaded) {
		ProductRuntimePropertyEnum runtimeProperty;
		runtimeProperty = (ProductRuntimePropertyEnum.fromQualifiedName(umlgRuntimeProperty.getQualifiedName()));
		if ( runtimeProperty != null ) {
			switch ( runtimeProperty ) {
				case type:
					this.type.setLoaded(loaded);
					break;
			
				case time:
					this.time.setLoaded(loaded);
					break;
			
				case created:
					this.created.setLoaded(loaded);
					break;
			
				case deleted:
					this.deleted.setLoaded(loaded);
					break;
			
			}
		
		}
	}

	static public enum ProductRuntimePropertyEnum implements UmlgRuntimeProperty {
		type(/* qualifiedName */ "umlgtest::org::umlg::indexing::Product::type",/* persistentName */ "type",/* inverseName */ "product",/* inverseQualifiedName */ "umlgtest::org::umlg::indexing::product_pTYPE_1::product",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ null,/* validations */ Collections.emptyList(),/* isManyPrimitive */ false,/* oneEnumeration */ true,/* manyEnumeration */ false,/* isControllingSide */ false,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("product_pTYPE_1"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ true,/* isManyToMany */ false,/* upper */ 1,/* lower */ 0,/* inverseUpper */ -1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ true,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ PTYPE.class,/* json */ "{\"name\": \"type\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest::org::umlg::indexing::Product::type\", \"persistentName\": \"type\", \"inverseName\": \"product\", \"inverseQualifiedName\": \"umlgtest::org::umlg::indexing::product_pTYPE_1::product\", \"manyPrimitive\": false, \"oneEnumeration\": true, \"manyEnumeration\": false, \"controllingSide\": false, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 0, \"inverseUpper\": -1, \"label\": \"product_pTYPE_1\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": true, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
		time(/* qualifiedName */ "umlgtest::org::umlg::indexing::Product::time",/* persistentName */ "time",/* inverseName */ "inverseOf::time",/* inverseQualifiedName */ "inverseOf::umlgtest::org::umlg::indexing::Product::time",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ DataTypeEnum.Time,/* validations */ Arrays.asList(new TimeValidation()),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("time"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ true,/* isManyToMany */ false,/* upper */ 1,/* lower */ 0,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ false,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ LocalTime.class,/* json */ "{\"name\": \"time\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": \"" + DataTypeEnum.Time.toString() + "\", \"validations\": {\"time\": {}}, \"qualifiedName\": \"umlgtest::org::umlg::indexing::Product::time\", \"persistentName\": \"time\", \"inverseName\": \"inverseOf::time\", \"inverseQualifiedName\": \"inverseOf::umlgtest::org::umlg::indexing::Product::time\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 0, \"inverseUpper\": 1, \"label\": \"time\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
		created(/* qualifiedName */ "umlgtest::org::umlg::indexing::Product::created",/* persistentName */ "created",/* inverseName */ "inverseOf::created",/* inverseQualifiedName */ "inverseOf::umlgtest::org::umlg::indexing::Product::created",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ DataTypeEnum.Date,/* validations */ Arrays.asList(new DateValidation()),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("created"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ true,/* isManyToMany */ false,/* upper */ 1,/* lower */ 0,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ false,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ LocalDate.class,/* json */ "{\"name\": \"created\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": \"" + DataTypeEnum.Date.toString() + "\", \"validations\": {\"date\": {}}, \"qualifiedName\": \"umlgtest::org::umlg::indexing::Product::created\", \"persistentName\": \"created\", \"inverseName\": \"inverseOf::created\", \"inverseQualifiedName\": \"inverseOf::umlgtest::org::umlg::indexing::Product::created\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 0, \"inverseUpper\": 1, \"label\": \"created\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
		deleted(/* qualifiedName */ "umlgtest::org::umlg::indexing::Product::deleted",/* persistentName */ "deleted",/* inverseName */ "inverseOf::deleted",/* inverseQualifiedName */ "inverseOf::umlgtest::org::umlg::indexing::Product::deleted",/* isAssociationClassOne */ false,/* isMemberEndOfAssociationClass */ false,/* associationClassPropertyNameField */ "null",/* inverseAssociationClassPropertyNameField */ "null",/* isAssociationClassProperty */ false,/* isOnePrimitivePropertyOfAssociationClass */ false,/* isOnePrimitive */ false,/* isReadOnly */ false,/* dataTypeEnum */ DataTypeEnum.DateTime,/* validations */ Arrays.asList(new DateTimeValidation()),/* isManyPrimitive */ false,/* oneEnumeration */ false,/* manyEnumeration */ false,/* isControllingSide */ true,/* isComposite */ false,/* isInverseComposite */ false,/* label */ UmlgLabelConverterFactory.getUmlgLabelConverter().convert("deleted"),/* isOneToOne */ false,/* isOneToMany */ false,/* isManyToOne */ true,/* isManyToMany */ false,/* upper */ 1,/* lower */ 0,/* inverseUpper */ 1,/* isQualified */ false,/* isInverseQualified */ false,/* isOrdered */ false,/* isInverseOrdered */ false,/* isUnique */ true,/* isInverseUnique */ false,/* isDerived */ false,/* isNavigable */ true,/* propertyType */ LocalDateTime.class,/* json */ "{\"name\": \"deleted\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": \"" + DataTypeEnum.DateTime.toString() + "\", \"validations\": {\"dateTime\": {}}, \"qualifiedName\": \"umlgtest::org::umlg::indexing::Product::deleted\", \"persistentName\": \"deleted\", \"inverseName\": \"inverseOf::deleted\", \"inverseQualifiedName\": \"inverseOf::umlgtest::org::umlg::indexing::Product::deleted\", \"manyPrimitive\": false, \"oneEnumeration\": false, \"manyEnumeration\": false, \"controllingSide\": true, \"composite\": false, \"inverseComposite\": false, \"oneToOne\": false, \"oneToMany\": false, \"manyToOne\": true, \"manyToMany\": false, \"upper\": 1, \"lower\": 0, \"inverseUpper\": 1, \"label\": \"deleted\", \"qualified\": false, \"inverseQualified\": false, \"ordered\": false, \"inverseOrdered\": false, \"unique\": true, \"inverseUnique\": false, \"derived\": false, \"navigable\": true}",/* isChangeListenerAttribute */ false),
		umlgtest(/* qualifiedName */ "umlgtest",/* persistentName */ "umlgtest",/* inverseName */ "inverseOfumlgtest",/* inverseQualifiedName */ "inverseOfumlgtest",/* 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("rootProduct"),/* 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\": \"umlgtest\", \"associationClassOne\": false, \"memberEndOfAssociationClass\": false, \"associationClassPropertyName\": null, \"inverseAssociationClassPropertyName\": null, \"associationClassProperty\": false, \"onePrimitivePropertyOfAssociationClass\": false, \"onePrimitive\": false, \"readOnly\": false, \"dataTypeEnum\": null, \"validations\": null, \"qualifiedName\": \"umlgtest\", \"persistentName\": \"umlgtest\", \"inverseName\": \"inverseOfumlgtest\", \"inverseQualifiedName\": \"inverseOfumlgtest\", \"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\": \"rootProduct\", \"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 ProductRuntimePropertyEnum
		 * 
		 * @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 ProductRuntimePropertyEnum(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\": \"Product\", ");
			sb.append("\"qualifiedName\": \"umlgtest::org::umlg::indexing::Product\", ");
			sb.append("\"uri\": \"TODO\", ");
			sb.append("\"properties\": [");
			for ( ProductRuntimePropertyEnum l : ProductRuntimePropertyEnum.values() ) {
				sb.append(l.toJson());
				if ( count < ProductRuntimePropertyEnum.values().length ) {
					count++;
					sb.append(",");
				}
			}
			sb.append("]}");
			return sb.toString();
		}
		
		static public ProductRuntimePropertyEnum fromInverseQualifiedName(String inverseQualifiedName) {
			if ( umlgtest.getInverseQualifiedName().equals(inverseQualifiedName) ) {
				return umlgtest;
			}
			if ( deleted.getInverseQualifiedName().equals(inverseQualifiedName) ) {
				return deleted;
			}
			if ( created.getInverseQualifiedName().equals(inverseQualifiedName) ) {
				return created;
			}
			if ( time.getInverseQualifiedName().equals(inverseQualifiedName) ) {
				return time;
			}
			if ( type.getInverseQualifiedName().equals(inverseQualifiedName) ) {
				return type;
			}
			return null;
		}
		
		static public ProductRuntimePropertyEnum fromLabel(String _label) {
			if ( umlgtest.getLabel().equals(_label) ) {
				return umlgtest;
			}
			if ( deleted.getLabel().equals(_label) ) {
				return deleted;
			}
			if ( created.getLabel().equals(_label) ) {
				return created;
			}
			if ( time.getLabel().equals(_label) ) {
				return time;
			}
			if ( type.getLabel().equals(_label) ) {
				return type;
			}
			return null;
		}
		
		static public ProductRuntimePropertyEnum fromQualifiedName(String qualifiedName) {
			if ( umlgtest.getQualifiedName().equals(qualifiedName) ) {
				return umlgtest;
			}
			if ( deleted.getQualifiedName().equals(qualifiedName) ) {
				return deleted;
			}
			if ( created.getQualifiedName().equals(qualifiedName) ) {
				return created;
			}
			if ( time.getQualifiedName().equals(qualifiedName) ) {
				return time;
			}
			if ( type.getQualifiedName().equals(qualifiedName) ) {
				return type;
			}
			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