| /** |
| * <copyright> |
| * |
| * Copyright (c) 2015, 2018 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 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 codegen.company.Employee#getName <em>Name</em>}</li> |
| * <li>{@link codegen.company.Employee#getManager <em>Manager</em>}</li> |
| * <li>{@link codegen.company.Employee#getCompany <em>Company</em>}</li> |
| * <li>{@link codegen.company.Employee#getDirectReports <em>Direct Reports</em>}</li> |
| * <li>{@link codegen.company.Employee#getAllReports <em>All Reports</em>}</li> |
| * <li>{@link codegen.company.Employee#getReportingChain <em>Reporting Chain</em>}</li> |
| * <li>{@link codegen.company.Employee#isHasNameAsAttribute <em>Has Name As Attribute</em>}</li> |
| * </ul> |
| * |
| * @see 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 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 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 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 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 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 codegen.company.CodegencompanyPackage#getEmployee_Company() |
| * @see 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 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 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 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.internal.utilities.PivotUtilInternal%>.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/ 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<<%codegen.company.Employee%>> employees = company.getEmployees();\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_employees = idResolver.createOrderedSetOfAll(<%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(<%codegen.company.CodegencompanyTables%>.ORD_CLSSid_Employee);\n@<%org.eclipse.jdt.annotation.NonNull%> <%java.util.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/ codegen.company.@<%org.eclipse.jdt.annotation.NonNull%> Employee _1 = (<%codegen.company.Employee%>)ITERATOR__1.next();\n\t/**\n\t * manager = self\n\t \052/\n\tfinal /*@NonInvalid\052/ 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<<%codegen.company.Employee%>> ECORE_select = ((<%org.eclipse.ocl.pivot.ids.IdResolver%>.IdResolverExtension)idResolver).ecoreValueOfAll(<%codegen.company.Employee%>.class, select);\nreturn (<%org.eclipse.emf.common.util.EList%><<%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 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 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.internal.utilities.PivotUtilInternal%>.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(<%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, <%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(<%codegen.company.CodegencompanyTables%>.SET_CLSSid_Employee);\n@<%org.eclipse.jdt.annotation.NonNull%> <%java.util.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/ codegen.company.@<%org.eclipse.jdt.annotation.NonNull%> Employee _1 = (<%codegen.company.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<<%codegen.company.Employee%>> ECORE_select = ((<%org.eclipse.ocl.pivot.ids.IdResolver%>.IdResolverExtension)idResolver).ecoreValueOfAll(<%codegen.company.Employee%>.class, select);\nreturn (<%org.eclipse.emf.common.util.EList%><<%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 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 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.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.ids.@<%org.eclipse.jdt.annotation.NonNull%> IdResolver idResolver = executor.getIdResolver();\nfinal /*@NonInvalid\052/ 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 = <%codegen.company.CodegencompanyTables%>.OrderedSet;\n}\nelse {\n\tfinal /*@NonInvalid\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.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<<%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(<%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.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<<%codegen.company.Employee%>> ECORE_symbol_6 = ((<%org.eclipse.ocl.pivot.ids.IdResolver%>.IdResolverExtension)idResolver).ecoreValueOfAll(<%codegen.company.Employee%>.class, symbol_6);\nreturn (<%org.eclipse.emf.common.util.EList%><<%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 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/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.internal.utilities.PivotUtilInternal%>.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<<%codegen.company.Employee%>> reportingChain = this.getReportingChain();\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_reportingChain = idResolver.createOrderedSetOfAll(<%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/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/GenModel body='/**\n *\n * inv noManagerImpliesDirectReports:\n * let\n * severity : Integer[1] = \'Employee::noManagerImpliesDirectReports\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let\n * result : Boolean[?] = manager.oclIsUndefined() implies\n * directReports->size() > 0\n * in\n * \'Employee::noManagerImpliesDirectReports\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.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.values.@<%org.eclipse.jdt.annotation.NonNull%> IntegerValue severity_0 = <%org.eclipse.ocl.pivot.library.string.CGStringGetSeverityOperation%>.INSTANCE.evaluate(executor, <%codegen.company.CodegencompanyTables%>.STR_Employee_c_c_noManagerImpliesDirectReports);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ boolean symbol_0;\nif (le) {\n\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n\tfinal /*@NonInvalid\052/ codegen.company.@<%org.eclipse.jdt.annotation.Nullable%> Employee manager = this.getManager();\n\tfinal /*@NonInvalid\052/ boolean oclIsUndefined = manager == null;\n\t/*@NonInvalid\052/ boolean result;\n\tif (oclIsUndefined) {\n\t\t@SuppressWarnings(\"null\")\n\t\tfinal /*@NonInvalid\052/ java.util.@<%org.eclipse.jdt.annotation.NonNull%> List<<%codegen.company.Employee%>> directReports = this.getDirectReports();\n\t\tfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.values.@<%org.eclipse.jdt.annotation.NonNull%> OrderedSetValue BOXED_directReports = idResolver.createOrderedSetOfAll(<%codegen.company.CodegencompanyTables%>.ORD_CLSSid_Employee, directReports);\n\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\tfinal /*@NonInvalid\052/ boolean gt = <%org.eclipse.ocl.pivot.library.oclany.OclComparableGreaterThanOperation%>.INSTANCE.evaluate(executor, size, <%codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\t\tresult = gt;\n\t}\n\telse {\n\t\tresult = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t}\n\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%codegen.company.CodegencompanyTables%>.STR_Employee_c_c_noManagerImpliesDirectReports, this, (Object)null, diagnostics, context, (Object)null, severity_0, result, <%codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\tsymbol_0 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_0;'" |
| * @generated |
| */ |
| boolean noManagerImpliesDirectReports(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n *\n * inv mustHaveName:\n * let severity : Integer[1] = \'Employee::mustHaveName\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let\n * result : OclAny[1] = let\n * status : Boolean[?] = not name.oclIsUndefined() and hasNameAsAttribute and\n * hasNameAsOperation()\n * in\n * if status = true\n * then true\n * else Tuple{message = \'Employee must have a name\', status = status}\n * endif\n * in\n * \'Employee::mustHaveName\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@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, <%codegen.company.CodegencompanyTables%>.STR_Employee_c_c_mustHaveName);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.NonNull%> Object symbol_2;\nif (le) {\n\tsymbol_2 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.Object%> CAUGHT_symbol_1;\n\ttry {\n\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.Nullable%> <%java.lang.Object%> CAUGHT_and;\n\t\ttry {\n\t\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name = this.getName();\n\t\t\tfinal /*@NonInvalid\052/ boolean oclIsUndefined = name == null;\n\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\tfinal /*@NonInvalid\052/ boolean hasNameAsAttribute = this.isHasNameAsAttribute();\n\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\tCAUGHT_and = and;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_and = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t}\n\t\tfinal /*@NonInvalid\052/ boolean hasNameAsOperation = this.hasNameAsOperation();\n\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\tfinal /*@Thrown\052/ boolean eq = status == Boolean.TRUE;\n\t\t/*@Thrown\052/ java.lang.@<%org.eclipse.jdt.annotation.NonNull%> Object symbol_1;\n\t\tif (eq) {\n\t\t\tsymbol_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n\t\t}\n\t\telse {\n\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(<%codegen.company.CodegencompanyTables%>.TUPLid__0, <%codegen.company.CodegencompanyTables%>.STR_Employee_32_must_32_have_32_a_32_name, status);\n\t\t\tsymbol_1 = symbol_0;\n\t\t}\n\t\tCAUGHT_symbol_1 = symbol_1;\n\t}\n\tcatch (<%java.lang.Exception%> e) {\n\t\tCAUGHT_symbol_1 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t}\n\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%codegen.company.CodegencompanyTables%>.STR_Employee_c_c_mustHaveName, this, (Object)null, diagnostics, context, (Object)null, severity_0, CAUGHT_symbol_1, <%codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\tsymbol_2 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_2;'" |
| * @generated |
| */ |
| boolean mustHaveName(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @model annotation="http://www.eclipse.org/emf/2002/GenModel body='/**\n *\n * inv mustHaveNonEmptyName:\n * let severity : Integer[1] = \'Employee::mustHaveNonEmptyName\'.getSeverity()\n * in\n * if severity <= 0\n * then true\n * else\n * let result : Boolean[?] = name->notEmpty() implies name.size() > 0\n * in\n * \'Employee::mustHaveNonEmptyName\'.logDiagnostic(self, null, diagnostics, context, null, severity, result, 0)\n * endif\n \052/\nfinal /*@NonInvalid\052/ org.eclipse.ocl.pivot.evaluation.@<%org.eclipse.jdt.annotation.NonNull%> Executor executor = <%org.eclipse.ocl.pivot.internal.utilities.PivotUtilInternal%>.getExecutor(this);\nfinal /*@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, <%codegen.company.CodegencompanyTables%>.STR_Employee_c_c_mustHaveNonEmptyName);\nfinal /*@NonInvalid\052/ boolean le = <%org.eclipse.ocl.pivot.library.oclany.OclComparableLessThanEqualOperation%>.INSTANCE.evaluate(executor, severity_0, <%codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n/*@NonInvalid\052/ boolean symbol_0;\nif (le) {\n\tsymbol_0 = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.TRUE_VALUE;\n}\nelse {\n\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.Nullable%> <%java.lang.Object%> CAUGHT_result;\n\ttry {\n\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.Object%> CAUGHT_notEmpty;\n\t\ttry {\n\t\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name = this.getName();\n\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, <%codegen.company.CodegencompanyTables%>.SET_PRIMid_String, name);\n\t\t\tfinal /*@Thrown\052/ boolean notEmpty = <%org.eclipse.ocl.pivot.library.collection.CollectionNotEmptyOperation%>.INSTANCE.evaluate(oclAsSet).booleanValue();\n\t\t\tCAUGHT_notEmpty = notEmpty;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_notEmpty = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t}\n\t\t/*@Caught\052/ @<%org.eclipse.jdt.annotation.NonNull%> <%java.lang.Object%> CAUGHT_gt;\n\t\ttry {\n\t\t\tfinal /*@NonInvalid\052/ java.lang.@<%org.eclipse.jdt.annotation.Nullable%> String name_0 = this.getName();\n\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\tfinal /*@Thrown\052/ boolean gt = <%org.eclipse.ocl.pivot.library.oclany.OclComparableGreaterThanOperation%>.INSTANCE.evaluate(executor, size, <%codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\t\t\tCAUGHT_gt = gt;\n\t\t}\n\t\tcatch (<%java.lang.Exception%> e) {\n\t\t\tCAUGHT_gt = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t\t}\n\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\tCAUGHT_result = result;\n\t}\n\tcatch (<%java.lang.Exception%> e) {\n\t\tCAUGHT_result = <%org.eclipse.ocl.pivot.utilities.ValueUtil%>.createInvalidValue(e);\n\t}\n\tfinal /*@NonInvalid\052/ boolean logDiagnostic = <%org.eclipse.ocl.pivot.library.string.CGStringLogDiagnosticOperation%>.INSTANCE.evaluate(executor, <%org.eclipse.ocl.pivot.ids.TypeId%>.BOOLEAN, <%codegen.company.CodegencompanyTables%>.STR_Employee_c_c_mustHaveNonEmptyName, this, (Object)null, diagnostics, context, (Object)null, severity_0, CAUGHT_result, <%codegen.company.CodegencompanyTables%>.INT_0).booleanValue();\n\tsymbol_0 = logDiagnostic;\n}\nreturn Boolean.TRUE == symbol_0;'" |
| * @generated |
| */ |
| boolean mustHaveNonEmptyName(DiagnosticChain diagnostics, Map<Object, Object> context); |
| |
| } // Employee |