/** | |
* <copyright> | |
* | |
* Copyright (c) 2015, 2019 Willink Transformations and others. | |
* All rights reserved. This program and the accompanying materials | |
* are made available under the terms of the Eclipse Public License v2.0 | |
* which accompanies this distribution, and is available at | |
* http://www.eclipse.org/legal/epl-v20.html | |
* | |
* Contributors: | |
* E.D.Willink - Initial API and implementation | |
* | |
* </copyright> | |
*/ | |
package org.eclipse.ocl.examples.xtext.tests.codegen.company; | |
import java.util.Map; | |
import org.eclipse.emf.common.util.DiagnosticChain; | |
import org.eclipse.emf.common.util.EList; | |
import org.eclipse.emf.ecore.EObject; | |
/** | |
* <!-- begin-user-doc --> | |
* A representation of the model object '<em><b>Employee</b></em>'. | |
* <!-- end-user-doc --> | |
* | |
* <p> | |
* The following features are supported: | |
* </p> | |
* <ul> | |
* <li>{@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee#getName <em>Name</em>}</li> | |
* <li>{@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee#getManager <em>Manager</em>}</li> | |
* <li>{@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee#getCompany <em>Company</em>}</li> | |
* <li>{@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee#getDirectReports <em>Direct Reports</em>}</li> | |
* <li>{@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee#getAllReports <em>All Reports</em>}</li> | |
* <li>{@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee#getReportingChain <em>Reporting Chain</em>}</li> | |
* <li>{@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee#isHasNameAsAttribute <em>Has Name As Attribute</em>}</li> | |
* </ul> | |
* | |
* @see org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyPackage#getEmployee() | |
* @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='mustHaveNonEmptyName'" | |
* @generated | |
*/ | |
public interface Employee extends EObject { | |
/** | |
* Returns the value of the '<em><b>Name</b></em>' attribute. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of the '<em>Name</em>' attribute isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @return the value of the '<em>Name</em>' attribute. | |
* @see #setName(String) | |
* @see org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyPackage#getEmployee_Name() | |
* @model annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/ocl/test/Pivot/Company.ecore!Employee!name'" | |
* @generated | |
*/ | |
String getName(); | |
/** | |
* Sets the value of the '{@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee#getName <em>Name</em>}' attribute. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @param value the new value of the '<em>Name</em>' attribute. | |
* @see #getName() | |
* @generated | |
*/ | |
void setName(String value); | |
/** | |
* Returns the value of the '<em><b>Manager</b></em>' reference. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of the '<em>Manager</em>' reference isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @return the value of the '<em>Manager</em>' reference. | |
* @see #setManager(Employee) | |
* @see org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyPackage#getEmployee_Manager() | |
* @model annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/ocl/test/Pivot/Company.ecore!Employee!manager'" | |
* @generated | |
*/ | |
Employee getManager(); | |
/** | |
* Sets the value of the '{@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee#getManager <em>Manager</em>}' reference. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @param value the new value of the '<em>Manager</em>' reference. | |
* @see #getManager() | |
* @generated | |
*/ | |
void setManager(Employee value); | |
/** | |
* Returns the value of the '<em><b>Company</b></em>' container reference. | |
* It is bidirectional and its opposite is '{@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Company#getEmployees <em>Employees</em>}'. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of the '<em>Company</em>' container reference isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @return the value of the '<em>Company</em>' container reference. | |
* @see #setCompany(Company) | |
* @see org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyPackage#getEmployee_Company() | |
* @see org.eclipse.ocl.examples.xtext.tests.codegen.company.Company#getEmployees | |
* @model opposite="employees" required="true" transient="false" | |
* annotation="http://www.eclipse.org/emf/2002/GenModel get='throw new UnsupportedOperationException(); // FIXME Unimplemented http://www.eclipse.org/ocl/test/Pivot/Company.ecore!Employee!company'" | |
* @generated | |
*/ | |
Company getCompany(); | |
/** | |
* Sets the value of the '{@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee#getCompany <em>Company</em>}' container reference. | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @param value the new value of the '<em>Company</em>' container reference. | |
* @see #getCompany() | |
* @generated | |
*/ | |
void setCompany(Company value); | |
/** | |
* Returns the value of the '<em><b>Direct Reports</b></em>' reference list. | |
* The list contents are of type {@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee}. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of the '<em>Direct Reports</em>' reference list isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @return the value of the '<em>Direct Reports</em>' reference list. | |
* @see org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyPackage#getEmployee_DirectReports() | |
* @model transient="true" changeable="false" volatile="true" derived="true" | |
* annotation="http://www.eclipse.org/emf/2002/GenModel get='/**\n * company.employees->select(manager = self)\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\n@SuppressWarnings(\"null\")\nfinal /*@NonInvalid\052/ org.eclipse.ocl.examples.xtext.tests.codegen.company.@<%org.eclipse.jdt.annotation.NonNull%> Company company = this.getCompany();\n@SuppressWarnings(\"null\")\nfinal /*@NonInvalid\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>> employees = company.getEmployees();\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_employees = idResolver.createOrderedSetOfAll(<%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.ORD_CLSSid_Employee, employees);\n/*@Thrown\052/ org.eclipse.ocl.pivot.values.OrderedSetValue.@<%org.eclipse.jdt.annotation.NonNull%> Accumulator accumulator = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createOrderedSetAccumulatorValue(<%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.ORD_CLSSid_Employee);\njava.util.@<%org.eclipse.jdt.annotation.NonNull%> Iterator<<%java.lang.Object%>> ITERATOR__1 = BOXED_employees.iterator();\n/*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue select;\nwhile (true) {\n\tif (!ITERATOR__1.hasNext()) {\n\t\tselect = accumulator;\n\t\tbreak;\n\t}\n\t@SuppressWarnings(\"null\")\n\t/*@NonInvalid\052/ org.eclipse.ocl.examples.xtext.tests.codegen.company.@<%org.eclipse.jdt.annotation.NonNull%> Employee _1 = (org.eclipse.ocl.examples.xtext.tests.codegen.company.@<%org.eclipse.jdt.annotation.NonNull%> Employee)ITERATOR__1.next();\n\t/**\n\t * manager = self\n\t \052/\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.examples.xtext.tests.codegen.company.@<%org.eclipse.jdt.annotation.Nullable%> Employee manager_0 = _1.getManager();\n\tfinal /*@NonInvalid\052/ boolean eq = this.equals(manager_0);\n\t//\n\tif (eq == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\n\t\taccumulator.add(_1);\n\t}\n}\nfinal /*@NonInvalid\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>> ECORE_select = ((<%org.eclipse.ocl.pivot.ids.IdResolver.IdResolverExtension%>)idResolver).ecoreValueOfAll(<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>.class, select);\nreturn (<%org.eclipse.emf.common.util.EList%><<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>>)ECORE_select;'" | |
* @generated | |
*/ | |
EList<Employee> getDirectReports(); | |
/** | |
* Returns the value of the '<em><b>All Reports</b></em>' reference list. | |
* The list contents are of type {@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee}. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of the '<em>All Reports</em>' reference list isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @return the value of the '<em>All Reports</em>' reference list. | |
* @see org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyPackage#getEmployee_AllReports() | |
* @model transient="true" changeable="false" volatile="true" derived="true" ordered="false" | |
* annotation="http://www.eclipse.org/emf/2002/GenModel get='/**\n * Employee.allInstances()->select(reportsTo(self))\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.@<%org.eclipse.jdt.annotation.NonNull%> Class TYP_company_c_c_Employee_0 = idResolver.getClass(<%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.CLSSid_Employee, null);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> SetValue allInstances = <%org.eclipse.ocl.pivot.library.classifier.ClassifierAllInstancesOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.SET_CLSSid_Employee, TYP_company_c_c_Employee_0);\n/*@Thrown\052/ org.eclipse.ocl.pivot.values.SetValue.@<%org.eclipse.jdt.annotation.NonNull%> Accumulator accumulator = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createSetAccumulatorValue(<%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.SET_CLSSid_Employee);\njava.util.@<%org.eclipse.jdt.annotation.NonNull%> Iterator<<%java.lang.Object%>> ITERATOR__1 = allInstances.iterator();\n/*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> SetValue select;\nwhile (true) {\n\tif (!ITERATOR__1.hasNext()) {\n\t\tselect = accumulator;\n\t\tbreak;\n\t}\n\t@SuppressWarnings(\"null\")\n\t/*@NonInvalid\052/ org.eclipse.ocl.examples.xtext.tests.codegen.company.@<%org.eclipse.jdt.annotation.NonNull%> Employee _1 = (org.eclipse.ocl.examples.xtext.tests.codegen.company.@<%org.eclipse.jdt.annotation.NonNull%> Employee)ITERATOR__1.next();\n\t/**\n\t * reportsTo(self)\n\t \052/\n\tfinal /*@NonInvalid\052/ boolean reportsTo = _1.reportsTo(this);\n\t//\n\tif (reportsTo == <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE) {\n\t\taccumulator.add(_1);\n\t}\n}\nfinal /*@NonInvalid\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>> ECORE_select = ((<%org.eclipse.ocl.pivot.ids.IdResolver.IdResolverExtension%>)idResolver).ecoreValueOfAll(<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>.class, select);\nreturn (<%org.eclipse.emf.common.util.EList%><<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>>)ECORE_select;'" | |
* @generated | |
*/ | |
EList<Employee> getAllReports(); | |
/** | |
* Returns the value of the '<em><b>Reporting Chain</b></em>' reference list. | |
* The list contents are of type {@link org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee}. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of the '<em>Reporting Chain</em>' reference list isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @return the value of the '<em>Reporting Chain</em>' reference list. | |
* @see org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyPackage#getEmployee_ReportingChain() | |
* @model transient="true" changeable="false" volatile="true" derived="true" | |
* annotation="http://www.eclipse.org/emf/2002/GenModel get='/**\n *\n * if manager.oclIsUndefined()\n * then OrderedSet{}\n * else manager?.reportingChain->prepend(manager)\n * endif\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ org.eclipse.ocl.examples.xtext.tests.codegen.company.@<%org.eclipse.jdt.annotation.Nullable%> Employee manager_2 = this.getManager();\nfinal /*@NonInvalid\052/ boolean oclIsUndefined = manager_2 == null;\n/*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue symbol_6;\nif (oclIsUndefined) {\n\tsymbol_6 = <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.OrderedSet;\n}\nelse {\n\tfinal /*@NonInvalid\052/ @<%org.eclipse.jdt.annotation.NonNull%> Object reportingChain = manager_2 == null;\n\t/*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.Nullable%> OrderedSetValue safe_reportingChain_source;\n\tif (reportingChain == Boolean.TRUE) {\n\t\tsafe_reportingChain_source = null;\n\t}\n\telse {\n\t\tassert manager_2 != null;\n\t\t@SuppressWarnings(\"null\")\n\t\tfinal /*@Thrown\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>> reportingChain_0 = manager_2.getReportingChain();\n\t\tfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_reportingChain_0 = idResolver.createOrderedSetOfAll(<%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.ORD_CLSSid_Employee, reportingChain_0);\n\t\tsafe_reportingChain_source = BOXED_reportingChain_0;\n\t}\n\tfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue prepend = (org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.Nullable%> OrderedSetValue)<%org.eclipse.ocl.pivot.library.collection.OrderedCollectionPrependOperation%>.INSTANCE.evaluate(safe_reportingChain_source, manager_2);\n\tsymbol_6 = prepend;\n}\nfinal /*@Thrown\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>> ECORE_symbol_6 = ((<%org.eclipse.ocl.pivot.ids.IdResolver.IdResolverExtension%>)idResolver).ecoreValueOfAll(<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>.class, symbol_6);\nreturn (<%org.eclipse.emf.common.util.EList%><<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>>)ECORE_symbol_6;'" | |
* @generated | |
*/ | |
EList<Employee> getReportingChain(); | |
/** | |
* Returns the value of the '<em><b>Has Name As Attribute</b></em>' attribute. | |
* <!-- begin-user-doc --> | |
* <p> | |
* If the meaning of the '<em>Has Name As Attribute</em>' attribute isn't clear, | |
* there really should be more of a description here... | |
* </p> | |
* <!-- end-user-doc --> | |
* @return the value of the '<em>Has Name As Attribute</em>' attribute. | |
* @see org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyPackage#getEmployee_HasNameAsAttribute() | |
* @model required="true" transient="true" changeable="false" volatile="true" derived="true" | |
* annotation="http://www.eclipse.org/emf/2002/GenModel get='/**\n * name <> null\n \052/\nfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name = this.getName();\nfinal /*@NonInvalid\052/ boolean ne = name != null;\nreturn ne;'" | |
* @generated | |
*/ | |
boolean isHasNameAsAttribute(); | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @model required="true" | |
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='self.reportingChain->includes(manager)'" | |
* annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n * self.reportingChain->includes(manager)\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\n@SuppressWarnings(\"null\")\nfinal /*@NonInvalid\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>> reportingChain = this.getReportingChain();\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_reportingChain = idResolver.createOrderedSetOfAll(<%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.ORD_CLSSid_Employee, reportingChain);\nfinal /*@Thrown\052/ boolean includes = <%org.eclipse.ocl.pivot.library.collection.CollectionIncludesOperation%>.INSTANCE.evaluate(BOXED_reportingChain, manager).booleanValue();\nreturn includes;'" | |
* @generated | |
*/ | |
boolean reportsTo(Employee manager); | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @model required="true" | |
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='name <> null'" | |
* annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n * name <> null\n \052/\nfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name = this.getName();\nfinal /*@NonInvalid\052/ boolean ne = name != null;\nreturn ne;'" | |
* @generated | |
*/ | |
boolean hasNameAsOperation(); | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @model annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='manager.oclIsUndefined() implies directReports->size() > 0'" | |
* annotation="http://www.eclipse.org/emf/2002/GenModel body='try {\n\t/**\n\t *\n\t * inv noManagerImpliesDirectReports:\n\t * let\n\t * severity : Integer[1] = \'Employee::noManagerImpliesDirectReports\'.getSeverity()\n\t * in\n\t * if severity <= 0\n\t * then true\n\t * else\n\t * let\n\t * result : Boolean[?] = manager.oclIsUndefined() implies\n\t * directReports->size() > 0\n\t * in\n\t * \'Employee::noManagerImpliesDirectReports\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n\t * endif\n\t \052/\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this, context);\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> IntegerValue severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.STR_Employee_c_c_noManagerImpliesDirectReports);\n\tfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\t/*@NonInvalid\052/ boolean symbol_0;\n\tif (le) {\n\t\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.examples.xtext.tests.codegen.company.@<%org.eclipse.jdt.annotation.Nullable%> Employee manager = this.getManager();\n\t\tfinal /*@NonInvalid\052/ boolean oclIsUndefined = manager == null;\n\t\t/*@NonInvalid\052/ boolean result;\n\t\tif (oclIsUndefined) {\n\t\t\t@SuppressWarnings(\"null\")\n\t\t\tfinal /*@NonInvalid\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%org.eclipse.ocl.examples.xtext.tests.codegen.company.Employee%>> directReports = this.getDirectReports();\n\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_directReports = idResolver.createOrderedSetOfAll(<%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.ORD_CLSSid_Employee, directReports);\n\t\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> IntegerValue size = <%org.eclipse.ocl.pivot.library.collection.CollectionSizeOperation%>.INSTANCE.evaluate(BOXED_directReports);\n\t\t\tfinal /*@NonInvalid\052/ boolean gt = <%org.eclipse.ocl.pivot.library.oclany.OclComparableGreaterThanOperation%>.INSTANCE.evaluate(executor, size, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\t\t\tresult = gt;\n\t\t}\n\t\telse {\n\t\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t}\n\t\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.STR_Employee_c_c_noManagerImpliesDirectReports, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\t\tsymbol_0 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_0;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(\"Employee::noManagerImpliesDirectReports\", this, diagnostics, context, e);\n}'" | |
* @generated | |
*/ | |
boolean noManagerImpliesDirectReports(DiagnosticChain diagnostics, Map<Object, Object> context); | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @model annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='Tuple {\n\tmessage : String = \'Employee must have a name\',\n\tstatus : Boolean = not name.oclIsUndefined() and hasNameAsAttribute and hasNameAsOperation()\n}.status'" | |
* annotation="http://www.eclipse.org/emf/2002/GenModel body='try {\n\t/**\n\t *\n\t * inv mustHaveName:\n\t * let severity : Integer[1] = \'Employee::mustHaveName\'.getSeverity()\n\t * in\n\t * if severity <= 0\n\t * then true\n\t * else\n\t * let\n\t * result : OclAny[1] = let\n\t * status : Boolean[?] = not name.oclIsUndefined() and hasNameAsAttribute and\n\t * hasNameAsOperation()\n\t * in\n\t * if status = true\n\t * then true\n\t * else Tuple{message = \'Employee must have a name\', status = status}\n\t * endif\n\t * in\n\t * \'Employee::mustHaveName\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n\t * endif\n\t \052/\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this, context);\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> IntegerValue severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.STR_Employee_c_c_mustHaveName);\n\tfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\t/*@NonInvalid\052/ @<%org.eclipse.jdt.annotation.NonNull%> Object symbol_2;\n\tif (le) {\n\t\tsymbol_2 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> Object CAUGHT_symbol_1;\n\t\ttry {\n\t\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.Nullable%> Object CAUGHT_and;\n\t\t\ttry {\n\t\t\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name = this.getName();\n\t\t\t\tfinal /*@NonInvalid\052/ boolean oclIsUndefined = name == null;\n\t\t\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> Boolean not = <%org.eclipse.ocl.pivot.library.logical.BooleanNotOperation%>.INSTANCE.evaluate(oclIsUndefined);\n\t\t\t\tfinal /*@NonInvalid\052/ boolean hasNameAsAttribute = this.isHasNameAsAttribute();\n\t\t\t\tfinal /*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> Boolean and = <%org.eclipse.ocl.pivot.library.logical.BooleanAndOperation%>.INSTANCE.evaluate(not, hasNameAsAttribute);\n\t\t\t\tCAUGHT_and = and;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_and = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t}\n\t\t\tfinal /*@NonInvalid\052/ boolean hasNameAsOperation = this.hasNameAsOperation();\n\t\t\tfinal /*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> Boolean status = <%org.eclipse.ocl.pivot.library.logical.BooleanAndOperation%>.INSTANCE.evaluate(CAUGHT_and, hasNameAsOperation);\n\t\t\tfinal /*@Thrown\052/ boolean eq = status == Boolean.TRUE;\n\t\t\t/*@Thrown\052/ @<%org.eclipse.jdt.annotation.NonNull%> Object symbol_1;\n\t\t\tif (eq) {\n\t\t\t\tsymbol_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> TupleValue symbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createTupleOfEach(<%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.TUPLid__0, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.STR_Employee_32_must_32_have_32_a_32_name, status);\n\t\t\t\tsymbol_1 = symbol_0;\n\t\t\t}\n\t\t\tCAUGHT_symbol_1 = symbol_1;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_symbol_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t}\n\t\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.STR_Employee_c_c_mustHaveName, this, (Object)null, diagnostics, context, (Object)null, severity_0, CAUGHT_symbol_1, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\t\tsymbol_2 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_2;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(\"Employee::mustHaveName\", this, diagnostics, context, e);\n}'" | |
* @generated | |
*/ | |
boolean mustHaveName(DiagnosticChain diagnostics, Map<Object, Object> context); | |
/** | |
* <!-- begin-user-doc --> | |
* <!-- end-user-doc --> | |
* @model annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot body='name->notEmpty() implies name.size() > 0'" | |
* annotation="http://www.eclipse.org/emf/2002/GenModel body='try {\n\t/**\n\t *\n\t * inv mustHaveNonEmptyName:\n\t * let severity : Integer[1] = \'Employee::mustHaveNonEmptyName\'.getSeverity()\n\t * in\n\t * if severity <= 0\n\t * then true\n\t * else\n\t * let result : Boolean[?] = name->notEmpty() implies name.size() > 0\n\t * in\n\t * \'Employee::mustHaveNonEmptyName\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n\t * endif\n\t \052/\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.utilities.PivotUtil%>.getExecutor(this, context);\n\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> IntegerValue severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.STR_Employee_c_c_mustHaveNonEmptyName);\n\tfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\t/*@NonInvalid\052/ boolean symbol_0;\n\tif (le) {\n\t\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\telse {\n\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.Nullable%> Object CAUGHT_result;\n\t\ttry {\n\t\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> Object CAUGHT_notEmpty;\n\t\t\ttry {\n\t\t\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name = this.getName();\n\t\t\t\tfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> SetValue oclAsSet = <%org.eclipse.ocl.pivot.library.oclany.OclAnyOclAsSetOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.SET_PRIMid_String, name);\n\t\t\t\tfinal /*@Thrown\052/ boolean notEmpty = <%org.eclipse.ocl.pivot.library.collection.CollectionNotEmptyOperation%>.INSTANCE.evaluate(oclAsSet).booleanValue();\n\t\t\t\tCAUGHT_notEmpty = notEmpty;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_notEmpty = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t}\n\t\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> Object CAUGHT_gt;\n\t\t\ttry {\n\t\t\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name_0 = this.getName();\n\t\t\t\tfinal /*@Thrown\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> IntegerValue size = <%org.eclipse.ocl.pivot.library.string.StringSizeOperation%>.INSTANCE.evaluate(name_0);\n\t\t\t\tfinal /*@Thrown\052/ boolean gt = <%org.eclipse.ocl.pivot.library.oclany.OclComparableGreaterThanOperation%>.INSTANCE.evaluate(executor, size, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\t\t\t\tCAUGHT_gt = gt;\n\t\t\t}\n\t\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\t\tCAUGHT_gt = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t\t}\n\t\t\tfinal /*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> Boolean result = <%org.eclipse.ocl.pivot.library.logical.BooleanImpliesOperation%>.INSTANCE.evaluate(CAUGHT_notEmpty, CAUGHT_gt);\n\t\t\tCAUGHT_result = result;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_result = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t}\n\t\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.STR_Employee_c_c_mustHaveNonEmptyName, this, (Object)null, diagnostics, context, (Object)null, severity_0, CAUGHT_result, <%org.eclipse.ocl.examples.xtext.tests.codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\t\tsymbol_0 = logDiagnostic;\n\t}\n\treturn Boolean.TRUE == symbol_0;\n}\ncatch (<%java.lang.Throwable%> e) {\n\treturn <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.validationFailedDiagnostic(\"Employee::mustHaveNonEmptyName\", this, diagnostics, context, e);\n}'" | |
* @generated | |
*/ | |
boolean mustHaveNonEmptyName(DiagnosticChain diagnostics, Map<Object, Object> context); | |
} // Employee |