diff options
author | 2020-04-26 18:23:13 -0400 | |
---|---|---|
committer | 2020-04-26 18:23:13 -0400 | |
commit | c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e (patch) | |
tree | 0c2e212e4e95c1d2311629128641d5cd561210f3 /Tests/MODELS2020-CaseStudies/case.study.pledge.queries/src-gen/queries/X_inv08_notEI.java | |
parent | Merge branch 'Attribute-Solver' (diff) | |
download | VIATRA-Generator-c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e.tar.gz VIATRA-Generator-c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e.tar.zst VIATRA-Generator-c0a758eedd457a5d8eb9f1a6c17fc24143aabb3e.zip |
Add PLEDGE case study files
Diffstat (limited to 'Tests/MODELS2020-CaseStudies/case.study.pledge.queries/src-gen/queries/X_inv08_notEI.java')
-rw-r--r-- | Tests/MODELS2020-CaseStudies/case.study.pledge.queries/src-gen/queries/X_inv08_notEI.java | 544 |
1 files changed, 544 insertions, 0 deletions
diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.queries/src-gen/queries/X_inv08_notEI.java b/Tests/MODELS2020-CaseStudies/case.study.pledge.queries/src-gen/queries/X_inv08_notEI.java new file mode 100644 index 00000000..4b4029a8 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.pledge.queries/src-gen/queries/X_inv08_notEI.java | |||
@@ -0,0 +1,544 @@ | |||
1 | /** | ||
2 | * Generated from platform:/resource/case.study.a.queries/src/queries/case_study_A.vql | ||
3 | */ | ||
4 | package queries; | ||
5 | |||
6 | import Taxation.Employment_Income; | ||
7 | import java.util.Arrays; | ||
8 | import java.util.Collection; | ||
9 | import java.util.LinkedHashSet; | ||
10 | import java.util.List; | ||
11 | import java.util.Objects; | ||
12 | import java.util.Optional; | ||
13 | import java.util.Set; | ||
14 | import java.util.function.Consumer; | ||
15 | import java.util.stream.Collectors; | ||
16 | import java.util.stream.Stream; | ||
17 | import org.apache.log4j.Logger; | ||
18 | import org.eclipse.emf.ecore.EClass; | ||
19 | import org.eclipse.viatra.query.runtime.api.IPatternMatch; | ||
20 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification; | ||
21 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; | ||
22 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; | ||
23 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; | ||
24 | import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; | ||
25 | import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; | ||
26 | import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; | ||
27 | import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; | ||
28 | import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; | ||
29 | import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; | ||
30 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; | ||
31 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; | ||
32 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; | ||
33 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; | ||
34 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | ||
35 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; | ||
36 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | ||
37 | import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; | ||
38 | |||
39 | /** | ||
40 | * A pattern-specific query specification that can instantiate Matcher in a type-safe way. | ||
41 | * | ||
42 | * <p>Original source: | ||
43 | * <code><pre> | ||
44 | * pattern x_inv08_notEI(type : Employment_Income) { | ||
45 | * Employment_Income(type); | ||
46 | * } | ||
47 | * </pre></code> | ||
48 | * | ||
49 | * @see Matcher | ||
50 | * @see Match | ||
51 | * | ||
52 | */ | ||
53 | @SuppressWarnings("all") | ||
54 | public final class X_inv08_notEI extends BaseGeneratedEMFQuerySpecification<X_inv08_notEI.Matcher> { | ||
55 | /** | ||
56 | * Pattern-specific match representation of the queries.x_inv08_notEI pattern, | ||
57 | * to be used in conjunction with {@link Matcher}. | ||
58 | * | ||
59 | * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. | ||
60 | * Each instance is a (possibly partial) substitution of pattern parameters, | ||
61 | * usable to represent a match of the pattern in the result of a query, | ||
62 | * or to specify the bound (fixed) input parameters when issuing a query. | ||
63 | * | ||
64 | * @see Matcher | ||
65 | * | ||
66 | */ | ||
67 | public static abstract class Match extends BasePatternMatch { | ||
68 | private Employment_Income fType; | ||
69 | |||
70 | private static List<String> parameterNames = makeImmutableList("type"); | ||
71 | |||
72 | private Match(final Employment_Income pType) { | ||
73 | this.fType = pType; | ||
74 | } | ||
75 | |||
76 | @Override | ||
77 | public Object get(final String parameterName) { | ||
78 | switch(parameterName) { | ||
79 | case "type": return this.fType; | ||
80 | default: return null; | ||
81 | } | ||
82 | } | ||
83 | |||
84 | @Override | ||
85 | public Object get(final int index) { | ||
86 | switch(index) { | ||
87 | case 0: return this.fType; | ||
88 | default: return null; | ||
89 | } | ||
90 | } | ||
91 | |||
92 | public Employment_Income getType() { | ||
93 | return this.fType; | ||
94 | } | ||
95 | |||
96 | @Override | ||
97 | public boolean set(final String parameterName, final Object newValue) { | ||
98 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); | ||
99 | if ("type".equals(parameterName) ) { | ||
100 | this.fType = (Employment_Income) newValue; | ||
101 | return true; | ||
102 | } | ||
103 | return false; | ||
104 | } | ||
105 | |||
106 | public void setType(final Employment_Income pType) { | ||
107 | if (!isMutable()) throw new java.lang.UnsupportedOperationException(); | ||
108 | this.fType = pType; | ||
109 | } | ||
110 | |||
111 | @Override | ||
112 | public String patternName() { | ||
113 | return "queries.x_inv08_notEI"; | ||
114 | } | ||
115 | |||
116 | @Override | ||
117 | public List<String> parameterNames() { | ||
118 | return X_inv08_notEI.Match.parameterNames; | ||
119 | } | ||
120 | |||
121 | @Override | ||
122 | public Object[] toArray() { | ||
123 | return new Object[]{fType}; | ||
124 | } | ||
125 | |||
126 | @Override | ||
127 | public X_inv08_notEI.Match toImmutable() { | ||
128 | return isMutable() ? newMatch(fType) : this; | ||
129 | } | ||
130 | |||
131 | @Override | ||
132 | public String prettyPrint() { | ||
133 | StringBuilder result = new StringBuilder(); | ||
134 | result.append("\"type\"=" + prettyPrintValue(fType)); | ||
135 | return result.toString(); | ||
136 | } | ||
137 | |||
138 | @Override | ||
139 | public int hashCode() { | ||
140 | return Objects.hash(fType); | ||
141 | } | ||
142 | |||
143 | @Override | ||
144 | public boolean equals(final Object obj) { | ||
145 | if (this == obj) | ||
146 | return true; | ||
147 | if (obj == null) { | ||
148 | return false; | ||
149 | } | ||
150 | if ((obj instanceof X_inv08_notEI.Match)) { | ||
151 | X_inv08_notEI.Match other = (X_inv08_notEI.Match) obj; | ||
152 | return Objects.equals(fType, other.fType); | ||
153 | } else { | ||
154 | // this should be infrequent | ||
155 | if (!(obj instanceof IPatternMatch)) { | ||
156 | return false; | ||
157 | } | ||
158 | IPatternMatch otherSig = (IPatternMatch) obj; | ||
159 | return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); | ||
160 | } | ||
161 | } | ||
162 | |||
163 | @Override | ||
164 | public X_inv08_notEI specification() { | ||
165 | return X_inv08_notEI.instance(); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * Returns an empty, mutable match. | ||
170 | * Fields of the mutable match can be filled to create a partial match, usable as matcher input. | ||
171 | * | ||
172 | * @return the empty match. | ||
173 | * | ||
174 | */ | ||
175 | public static X_inv08_notEI.Match newEmptyMatch() { | ||
176 | return new Mutable(null); | ||
177 | } | ||
178 | |||
179 | /** | ||
180 | * Returns a mutable (partial) match. | ||
181 | * Fields of the mutable match can be filled to create a partial match, usable as matcher input. | ||
182 | * | ||
183 | * @param pType the fixed value of pattern parameter type, or null if not bound. | ||
184 | * @return the new, mutable (partial) match object. | ||
185 | * | ||
186 | */ | ||
187 | public static X_inv08_notEI.Match newMutableMatch(final Employment_Income pType) { | ||
188 | return new Mutable(pType); | ||
189 | } | ||
190 | |||
191 | /** | ||
192 | * Returns a new (partial) match. | ||
193 | * This can be used e.g. to call the matcher with a partial match. | ||
194 | * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. | ||
195 | * @param pType the fixed value of pattern parameter type, or null if not bound. | ||
196 | * @return the (partial) match object. | ||
197 | * | ||
198 | */ | ||
199 | public static X_inv08_notEI.Match newMatch(final Employment_Income pType) { | ||
200 | return new Immutable(pType); | ||
201 | } | ||
202 | |||
203 | private static final class Mutable extends X_inv08_notEI.Match { | ||
204 | Mutable(final Employment_Income pType) { | ||
205 | super(pType); | ||
206 | } | ||
207 | |||
208 | @Override | ||
209 | public boolean isMutable() { | ||
210 | return true; | ||
211 | } | ||
212 | } | ||
213 | |||
214 | private static final class Immutable extends X_inv08_notEI.Match { | ||
215 | Immutable(final Employment_Income pType) { | ||
216 | super(pType); | ||
217 | } | ||
218 | |||
219 | @Override | ||
220 | public boolean isMutable() { | ||
221 | return false; | ||
222 | } | ||
223 | } | ||
224 | } | ||
225 | |||
226 | /** | ||
227 | * Generated pattern matcher API of the queries.x_inv08_notEI pattern, | ||
228 | * providing pattern-specific query methods. | ||
229 | * | ||
230 | * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, | ||
231 | * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. | ||
232 | * | ||
233 | * <p>Matches of the pattern will be represented as {@link Match}. | ||
234 | * | ||
235 | * <p>Original source: | ||
236 | * <code><pre> | ||
237 | * pattern x_inv08_notEI(type : Employment_Income) { | ||
238 | * Employment_Income(type); | ||
239 | * } | ||
240 | * </pre></code> | ||
241 | * | ||
242 | * @see Match | ||
243 | * @see X_inv08_notEI | ||
244 | * | ||
245 | */ | ||
246 | public static class Matcher extends BaseMatcher<X_inv08_notEI.Match> { | ||
247 | /** | ||
248 | * Initializes the pattern matcher within an existing VIATRA Query engine. | ||
249 | * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. | ||
250 | * | ||
251 | * @param engine the existing VIATRA Query engine in which this matcher will be created. | ||
252 | * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation | ||
253 | * | ||
254 | */ | ||
255 | public static X_inv08_notEI.Matcher on(final ViatraQueryEngine engine) { | ||
256 | // check if matcher already exists | ||
257 | Matcher matcher = engine.getExistingMatcher(querySpecification()); | ||
258 | if (matcher == null) { | ||
259 | matcher = (Matcher)engine.getMatcher(querySpecification()); | ||
260 | } | ||
261 | return matcher; | ||
262 | } | ||
263 | |||
264 | /** | ||
265 | * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation | ||
266 | * @return an initialized matcher | ||
267 | * @noreference This method is for internal matcher initialization by the framework, do not call it manually. | ||
268 | * | ||
269 | */ | ||
270 | public static X_inv08_notEI.Matcher create() { | ||
271 | return new Matcher(); | ||
272 | } | ||
273 | |||
274 | private static final int POSITION_TYPE = 0; | ||
275 | |||
276 | private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(X_inv08_notEI.Matcher.class); | ||
277 | |||
278 | /** | ||
279 | * Initializes the pattern matcher within an existing VIATRA Query engine. | ||
280 | * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. | ||
281 | * | ||
282 | * @param engine the existing VIATRA Query engine in which this matcher will be created. | ||
283 | * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation | ||
284 | * | ||
285 | */ | ||
286 | private Matcher() { | ||
287 | super(querySpecification()); | ||
288 | } | ||
289 | |||
290 | /** | ||
291 | * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. | ||
292 | * @param pType the fixed value of pattern parameter type, or null if not bound. | ||
293 | * @return matches represented as a Match object. | ||
294 | * | ||
295 | */ | ||
296 | public Collection<X_inv08_notEI.Match> getAllMatches(final Employment_Income pType) { | ||
297 | return rawStreamAllMatches(new Object[]{pType}).collect(Collectors.toSet()); | ||
298 | } | ||
299 | |||
300 | /** | ||
301 | * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. | ||
302 | * </p> | ||
303 | * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed. | ||
304 | * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>. | ||
305 | * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. | ||
306 | * @param pType the fixed value of pattern parameter type, or null if not bound. | ||
307 | * @return a stream of matches represented as a Match object. | ||
308 | * | ||
309 | */ | ||
310 | public Stream<X_inv08_notEI.Match> streamAllMatches(final Employment_Income pType) { | ||
311 | return rawStreamAllMatches(new Object[]{pType}); | ||
312 | } | ||
313 | |||
314 | /** | ||
315 | * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. | ||
316 | * Neither determinism nor randomness of selection is guaranteed. | ||
317 | * @param pType the fixed value of pattern parameter type, or null if not bound. | ||
318 | * @return a match represented as a Match object, or null if no match is found. | ||
319 | * | ||
320 | */ | ||
321 | public Optional<X_inv08_notEI.Match> getOneArbitraryMatch(final Employment_Income pType) { | ||
322 | return rawGetOneArbitraryMatch(new Object[]{pType}); | ||
323 | } | ||
324 | |||
325 | /** | ||
326 | * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, | ||
327 | * under any possible substitution of the unspecified parameters (if any). | ||
328 | * @param pType the fixed value of pattern parameter type, or null if not bound. | ||
329 | * @return true if the input is a valid (partial) match of the pattern. | ||
330 | * | ||
331 | */ | ||
332 | public boolean hasMatch(final Employment_Income pType) { | ||
333 | return rawHasMatch(new Object[]{pType}); | ||
334 | } | ||
335 | |||
336 | /** | ||
337 | * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. | ||
338 | * @param pType the fixed value of pattern parameter type, or null if not bound. | ||
339 | * @return the number of pattern matches found. | ||
340 | * | ||
341 | */ | ||
342 | public int countMatches(final Employment_Income pType) { | ||
343 | return rawCountMatches(new Object[]{pType}); | ||
344 | } | ||
345 | |||
346 | /** | ||
347 | * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. | ||
348 | * Neither determinism nor randomness of selection is guaranteed. | ||
349 | * @param pType the fixed value of pattern parameter type, or null if not bound. | ||
350 | * @param processor the action that will process the selected match. | ||
351 | * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked | ||
352 | * | ||
353 | */ | ||
354 | public boolean forOneArbitraryMatch(final Employment_Income pType, final Consumer<? super X_inv08_notEI.Match> processor) { | ||
355 | return rawForOneArbitraryMatch(new Object[]{pType}, processor); | ||
356 | } | ||
357 | |||
358 | /** | ||
359 | * Returns a new (partial) match. | ||
360 | * This can be used e.g. to call the matcher with a partial match. | ||
361 | * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. | ||
362 | * @param pType the fixed value of pattern parameter type, or null if not bound. | ||
363 | * @return the (partial) match object. | ||
364 | * | ||
365 | */ | ||
366 | public X_inv08_notEI.Match newMatch(final Employment_Income pType) { | ||
367 | return X_inv08_notEI.Match.newMatch(pType); | ||
368 | } | ||
369 | |||
370 | /** | ||
371 | * Retrieve the set of values that occur in matches for type. | ||
372 | * @return the Set of all values or empty set if there are no matches | ||
373 | * | ||
374 | */ | ||
375 | protected Stream<Employment_Income> rawStreamAllValuesOftype(final Object[] parameters) { | ||
376 | return rawStreamAllValues(POSITION_TYPE, parameters).map(Employment_Income.class::cast); | ||
377 | } | ||
378 | |||
379 | /** | ||
380 | * Retrieve the set of values that occur in matches for type. | ||
381 | * @return the Set of all values or empty set if there are no matches | ||
382 | * | ||
383 | */ | ||
384 | public Set<Employment_Income> getAllValuesOftype() { | ||
385 | return rawStreamAllValuesOftype(emptyArray()).collect(Collectors.toSet()); | ||
386 | } | ||
387 | |||
388 | /** | ||
389 | * Retrieve the set of values that occur in matches for type. | ||
390 | * @return the Set of all values or empty set if there are no matches | ||
391 | * | ||
392 | */ | ||
393 | public Stream<Employment_Income> streamAllValuesOftype() { | ||
394 | return rawStreamAllValuesOftype(emptyArray()); | ||
395 | } | ||
396 | |||
397 | @Override | ||
398 | protected X_inv08_notEI.Match tupleToMatch(final Tuple t) { | ||
399 | try { | ||
400 | return X_inv08_notEI.Match.newMatch((Employment_Income) t.get(POSITION_TYPE)); | ||
401 | } catch(ClassCastException e) { | ||
402 | LOGGER.error("Element(s) in tuple not properly typed!",e); | ||
403 | return null; | ||
404 | } | ||
405 | } | ||
406 | |||
407 | @Override | ||
408 | protected X_inv08_notEI.Match arrayToMatch(final Object[] match) { | ||
409 | try { | ||
410 | return X_inv08_notEI.Match.newMatch((Employment_Income) match[POSITION_TYPE]); | ||
411 | } catch(ClassCastException e) { | ||
412 | LOGGER.error("Element(s) in array not properly typed!",e); | ||
413 | return null; | ||
414 | } | ||
415 | } | ||
416 | |||
417 | @Override | ||
418 | protected X_inv08_notEI.Match arrayToMatchMutable(final Object[] match) { | ||
419 | try { | ||
420 | return X_inv08_notEI.Match.newMutableMatch((Employment_Income) match[POSITION_TYPE]); | ||
421 | } catch(ClassCastException e) { | ||
422 | LOGGER.error("Element(s) in array not properly typed!",e); | ||
423 | return null; | ||
424 | } | ||
425 | } | ||
426 | |||
427 | /** | ||
428 | * @return the singleton instance of the query specification of this pattern | ||
429 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded | ||
430 | * | ||
431 | */ | ||
432 | public static IQuerySpecification<X_inv08_notEI.Matcher> querySpecification() { | ||
433 | return X_inv08_notEI.instance(); | ||
434 | } | ||
435 | } | ||
436 | |||
437 | private X_inv08_notEI() { | ||
438 | super(GeneratedPQuery.INSTANCE); | ||
439 | } | ||
440 | |||
441 | /** | ||
442 | * @return the singleton instance of the query specification | ||
443 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded | ||
444 | * | ||
445 | */ | ||
446 | public static X_inv08_notEI instance() { | ||
447 | try{ | ||
448 | return LazyHolder.INSTANCE; | ||
449 | } catch (ExceptionInInitializerError err) { | ||
450 | throw processInitializerError(err); | ||
451 | } | ||
452 | } | ||
453 | |||
454 | @Override | ||
455 | protected X_inv08_notEI.Matcher instantiate(final ViatraQueryEngine engine) { | ||
456 | return X_inv08_notEI.Matcher.on(engine); | ||
457 | } | ||
458 | |||
459 | @Override | ||
460 | public X_inv08_notEI.Matcher instantiate() { | ||
461 | return X_inv08_notEI.Matcher.create(); | ||
462 | } | ||
463 | |||
464 | @Override | ||
465 | public X_inv08_notEI.Match newEmptyMatch() { | ||
466 | return X_inv08_notEI.Match.newEmptyMatch(); | ||
467 | } | ||
468 | |||
469 | @Override | ||
470 | public X_inv08_notEI.Match newMatch(final Object... parameters) { | ||
471 | return X_inv08_notEI.Match.newMatch((Taxation.Employment_Income) parameters[0]); | ||
472 | } | ||
473 | |||
474 | /** | ||
475 | * Inner class allowing the singleton instance of {@link X_inv08_notEI} to be created | ||
476 | * <b>not</b> at the class load time of the outer class, | ||
477 | * but rather at the first call to {@link X_inv08_notEI#instance()}. | ||
478 | * | ||
479 | * <p> This workaround is required e.g. to support recursion. | ||
480 | * | ||
481 | */ | ||
482 | private static class LazyHolder { | ||
483 | private static final X_inv08_notEI INSTANCE = new X_inv08_notEI(); | ||
484 | |||
485 | /** | ||
486 | * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. | ||
487 | * This initialization order is required to support indirect recursion. | ||
488 | * | ||
489 | * <p> The static initializer is defined using a helper field to work around limitations of the code generator. | ||
490 | * | ||
491 | */ | ||
492 | private static final Object STATIC_INITIALIZER = ensureInitialized(); | ||
493 | |||
494 | public static Object ensureInitialized() { | ||
495 | INSTANCE.ensureInitializedInternal(); | ||
496 | return null; | ||
497 | } | ||
498 | } | ||
499 | |||
500 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | ||
501 | private static final X_inv08_notEI.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | ||
502 | |||
503 | private final PParameter parameter_type = new PParameter("type", "Taxation.Employment_Income", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http:///TaxCard.ecore", "Employment_Income")), PParameterDirection.INOUT); | ||
504 | |||
505 | private final List<PParameter> parameters = Arrays.asList(parameter_type); | ||
506 | |||
507 | private GeneratedPQuery() { | ||
508 | super(PVisibility.PUBLIC); | ||
509 | } | ||
510 | |||
511 | @Override | ||
512 | public String getFullyQualifiedName() { | ||
513 | return "queries.x_inv08_notEI"; | ||
514 | } | ||
515 | |||
516 | @Override | ||
517 | public List<String> getParameterNames() { | ||
518 | return Arrays.asList("type"); | ||
519 | } | ||
520 | |||
521 | @Override | ||
522 | public List<PParameter> getParameters() { | ||
523 | return parameters; | ||
524 | } | ||
525 | |||
526 | @Override | ||
527 | public Set<PBody> doGetContainedBodies() { | ||
528 | setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); | ||
529 | Set<PBody> bodies = new LinkedHashSet<>(); | ||
530 | { | ||
531 | PBody body = new PBody(this); | ||
532 | PVariable var_type = body.getOrCreateVariableByName("type"); | ||
533 | new TypeConstraint(body, Tuples.flatTupleOf(var_type), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http:///TaxCard.ecore", "Employment_Income"))); | ||
534 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
535 | new ExportedParameter(body, var_type, parameter_type) | ||
536 | )); | ||
537 | // Employment_Income(type) | ||
538 | new TypeConstraint(body, Tuples.flatTupleOf(var_type), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http:///TaxCard.ecore", "Employment_Income"))); | ||
539 | bodies.add(body); | ||
540 | } | ||
541 | return bodies; | ||
542 | } | ||
543 | } | ||
544 | } | ||