aboutsummaryrefslogtreecommitdiffstats
path: root/Domains/github-graph/src-gen/queries/Committer.java
diff options
context:
space:
mode:
Diffstat (limited to 'Domains/github-graph/src-gen/queries/Committer.java')
-rw-r--r--Domains/github-graph/src-gen/queries/Committer.java725
1 files changed, 725 insertions, 0 deletions
diff --git a/Domains/github-graph/src-gen/queries/Committer.java b/Domains/github-graph/src-gen/queries/Committer.java
new file mode 100644
index 00000000..1c6b588c
--- /dev/null
+++ b/Domains/github-graph/src-gen/queries/Committer.java
@@ -0,0 +1,725 @@
1/**
2 * Generated from platform:/resource/github-graph/queries/queries/github.vql
3 */
4package queries;
5
6import github.Commit;
7import github.User;
8import java.util.Arrays;
9import java.util.Collection;
10import java.util.LinkedHashSet;
11import java.util.List;
12import java.util.Objects;
13import java.util.Optional;
14import java.util.Set;
15import java.util.function.Consumer;
16import java.util.stream.Collectors;
17import java.util.stream.Stream;
18import org.apache.log4j.Logger;
19import org.eclipse.emf.ecore.EClass;
20import org.eclipse.viatra.query.runtime.api.IPatternMatch;
21import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
22import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
23import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
24import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
25import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
26import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
27import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
28import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
29import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
30import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
31import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
32import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
34import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
35import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
37import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
38import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
39import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
40import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
41
42/**
43 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
44 *
45 * <p>Original source:
46 * <code><pre>
47 * //pattern actionWithIssue(i: IssueEvent, a: Action) {
48 * // IssueEvent.action(i, a);
49 * //}
50 * //
51 * //{@literal @}Constraint(key={i}, severity="error", message="error")
52 * //pattern issueEventNoAction(i: IssueEvent) {
53 * // neg find actionWithIssue(i, _);
54 * //}
55 *
56 *
57 * pattern committer(c: Commit, u:User) {
58 * Commit.committer(c, u);
59 * }
60 * </pre></code>
61 *
62 * @see Matcher
63 * @see Match
64 *
65 */
66@SuppressWarnings("all")
67public final class Committer extends BaseGeneratedEMFQuerySpecification<Committer.Matcher> {
68 /**
69 * Pattern-specific match representation of the queries.committer pattern,
70 * to be used in conjunction with {@link Matcher}.
71 *
72 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
73 * Each instance is a (possibly partial) substitution of pattern parameters,
74 * usable to represent a match of the pattern in the result of a query,
75 * or to specify the bound (fixed) input parameters when issuing a query.
76 *
77 * @see Matcher
78 *
79 */
80 public static abstract class Match extends BasePatternMatch {
81 private Commit fC;
82
83 private User fU;
84
85 private static List<String> parameterNames = makeImmutableList("c", "u");
86
87 private Match(final Commit pC, final User pU) {
88 this.fC = pC;
89 this.fU = pU;
90 }
91
92 @Override
93 public Object get(final String parameterName) {
94 switch(parameterName) {
95 case "c": return this.fC;
96 case "u": return this.fU;
97 default: return null;
98 }
99 }
100
101 @Override
102 public Object get(final int index) {
103 switch(index) {
104 case 0: return this.fC;
105 case 1: return this.fU;
106 default: return null;
107 }
108 }
109
110 public Commit getC() {
111 return this.fC;
112 }
113
114 public User getU() {
115 return this.fU;
116 }
117
118 @Override
119 public boolean set(final String parameterName, final Object newValue) {
120 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
121 if ("c".equals(parameterName) ) {
122 this.fC = (Commit) newValue;
123 return true;
124 }
125 if ("u".equals(parameterName) ) {
126 this.fU = (User) newValue;
127 return true;
128 }
129 return false;
130 }
131
132 public void setC(final Commit pC) {
133 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
134 this.fC = pC;
135 }
136
137 public void setU(final User pU) {
138 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
139 this.fU = pU;
140 }
141
142 @Override
143 public String patternName() {
144 return "queries.committer";
145 }
146
147 @Override
148 public List<String> parameterNames() {
149 return Committer.Match.parameterNames;
150 }
151
152 @Override
153 public Object[] toArray() {
154 return new Object[]{fC, fU};
155 }
156
157 @Override
158 public Committer.Match toImmutable() {
159 return isMutable() ? newMatch(fC, fU) : this;
160 }
161
162 @Override
163 public String prettyPrint() {
164 StringBuilder result = new StringBuilder();
165 result.append("\"c\"=" + prettyPrintValue(fC) + ", ");
166 result.append("\"u\"=" + prettyPrintValue(fU));
167 return result.toString();
168 }
169
170 @Override
171 public int hashCode() {
172 return Objects.hash(fC, fU);
173 }
174
175 @Override
176 public boolean equals(final Object obj) {
177 if (this == obj)
178 return true;
179 if (obj == null) {
180 return false;
181 }
182 if ((obj instanceof Committer.Match)) {
183 Committer.Match other = (Committer.Match) obj;
184 return Objects.equals(fC, other.fC) && Objects.equals(fU, other.fU);
185 } else {
186 // this should be infrequent
187 if (!(obj instanceof IPatternMatch)) {
188 return false;
189 }
190 IPatternMatch otherSig = (IPatternMatch) obj;
191 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
192 }
193 }
194
195 @Override
196 public Committer specification() {
197 return Committer.instance();
198 }
199
200 /**
201 * Returns an empty, mutable match.
202 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
203 *
204 * @return the empty match.
205 *
206 */
207 public static Committer.Match newEmptyMatch() {
208 return new Mutable(null, null);
209 }
210
211 /**
212 * Returns a mutable (partial) match.
213 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
214 *
215 * @param pC the fixed value of pattern parameter c, or null if not bound.
216 * @param pU the fixed value of pattern parameter u, or null if not bound.
217 * @return the new, mutable (partial) match object.
218 *
219 */
220 public static Committer.Match newMutableMatch(final Commit pC, final User pU) {
221 return new Mutable(pC, pU);
222 }
223
224 /**
225 * Returns a new (partial) match.
226 * This can be used e.g. to call the matcher with a partial match.
227 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
228 * @param pC the fixed value of pattern parameter c, or null if not bound.
229 * @param pU the fixed value of pattern parameter u, or null if not bound.
230 * @return the (partial) match object.
231 *
232 */
233 public static Committer.Match newMatch(final Commit pC, final User pU) {
234 return new Immutable(pC, pU);
235 }
236
237 private static final class Mutable extends Committer.Match {
238 Mutable(final Commit pC, final User pU) {
239 super(pC, pU);
240 }
241
242 @Override
243 public boolean isMutable() {
244 return true;
245 }
246 }
247
248 private static final class Immutable extends Committer.Match {
249 Immutable(final Commit pC, final User pU) {
250 super(pC, pU);
251 }
252
253 @Override
254 public boolean isMutable() {
255 return false;
256 }
257 }
258 }
259
260 /**
261 * Generated pattern matcher API of the queries.committer pattern,
262 * providing pattern-specific query methods.
263 *
264 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
265 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
266 *
267 * <p>Matches of the pattern will be represented as {@link Match}.
268 *
269 * <p>Original source:
270 * <code><pre>
271 * //pattern actionWithIssue(i: IssueEvent, a: Action) {
272 * // IssueEvent.action(i, a);
273 * //}
274 * //
275 * //{@literal @}Constraint(key={i}, severity="error", message="error")
276 * //pattern issueEventNoAction(i: IssueEvent) {
277 * // neg find actionWithIssue(i, _);
278 * //}
279 *
280 *
281 * pattern committer(c: Commit, u:User) {
282 * Commit.committer(c, u);
283 * }
284 * </pre></code>
285 *
286 * @see Match
287 * @see Committer
288 *
289 */
290 public static class Matcher extends BaseMatcher<Committer.Match> {
291 /**
292 * Initializes the pattern matcher within an existing VIATRA Query engine.
293 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
294 *
295 * @param engine the existing VIATRA Query engine in which this matcher will be created.
296 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
297 *
298 */
299 public static Committer.Matcher on(final ViatraQueryEngine engine) {
300 // check if matcher already exists
301 Matcher matcher = engine.getExistingMatcher(querySpecification());
302 if (matcher == null) {
303 matcher = (Matcher)engine.getMatcher(querySpecification());
304 }
305 return matcher;
306 }
307
308 /**
309 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
310 * @return an initialized matcher
311 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
312 *
313 */
314 public static Committer.Matcher create() {
315 return new Matcher();
316 }
317
318 private static final int POSITION_C = 0;
319
320 private static final int POSITION_U = 1;
321
322 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(Committer.Matcher.class);
323
324 /**
325 * Initializes the pattern matcher within an existing VIATRA Query engine.
326 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
327 *
328 * @param engine the existing VIATRA Query engine in which this matcher will be created.
329 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
330 *
331 */
332 private Matcher() {
333 super(querySpecification());
334 }
335
336 /**
337 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
338 * @param pC the fixed value of pattern parameter c, or null if not bound.
339 * @param pU the fixed value of pattern parameter u, or null if not bound.
340 * @return matches represented as a Match object.
341 *
342 */
343 public Collection<Committer.Match> getAllMatches(final Commit pC, final User pU) {
344 return rawStreamAllMatches(new Object[]{pC, pU}).collect(Collectors.toSet());
345 }
346
347 /**
348 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
349 * </p>
350 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
351 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
352 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
353 * @param pC the fixed value of pattern parameter c, or null if not bound.
354 * @param pU the fixed value of pattern parameter u, or null if not bound.
355 * @return a stream of matches represented as a Match object.
356 *
357 */
358 public Stream<Committer.Match> streamAllMatches(final Commit pC, final User pU) {
359 return rawStreamAllMatches(new Object[]{pC, pU});
360 }
361
362 /**
363 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
364 * Neither determinism nor randomness of selection is guaranteed.
365 * @param pC the fixed value of pattern parameter c, or null if not bound.
366 * @param pU the fixed value of pattern parameter u, or null if not bound.
367 * @return a match represented as a Match object, or null if no match is found.
368 *
369 */
370 public Optional<Committer.Match> getOneArbitraryMatch(final Commit pC, final User pU) {
371 return rawGetOneArbitraryMatch(new Object[]{pC, pU});
372 }
373
374 /**
375 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
376 * under any possible substitution of the unspecified parameters (if any).
377 * @param pC the fixed value of pattern parameter c, or null if not bound.
378 * @param pU the fixed value of pattern parameter u, or null if not bound.
379 * @return true if the input is a valid (partial) match of the pattern.
380 *
381 */
382 public boolean hasMatch(final Commit pC, final User pU) {
383 return rawHasMatch(new Object[]{pC, pU});
384 }
385
386 /**
387 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
388 * @param pC the fixed value of pattern parameter c, or null if not bound.
389 * @param pU the fixed value of pattern parameter u, or null if not bound.
390 * @return the number of pattern matches found.
391 *
392 */
393 public int countMatches(final Commit pC, final User pU) {
394 return rawCountMatches(new Object[]{pC, pU});
395 }
396
397 /**
398 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
399 * Neither determinism nor randomness of selection is guaranteed.
400 * @param pC the fixed value of pattern parameter c, or null if not bound.
401 * @param pU the fixed value of pattern parameter u, or null if not bound.
402 * @param processor the action that will process the selected match.
403 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
404 *
405 */
406 public boolean forOneArbitraryMatch(final Commit pC, final User pU, final Consumer<? super Committer.Match> processor) {
407 return rawForOneArbitraryMatch(new Object[]{pC, pU}, processor);
408 }
409
410 /**
411 * Returns a new (partial) match.
412 * This can be used e.g. to call the matcher with a partial match.
413 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
414 * @param pC the fixed value of pattern parameter c, or null if not bound.
415 * @param pU the fixed value of pattern parameter u, or null if not bound.
416 * @return the (partial) match object.
417 *
418 */
419 public Committer.Match newMatch(final Commit pC, final User pU) {
420 return Committer.Match.newMatch(pC, pU);
421 }
422
423 /**
424 * Retrieve the set of values that occur in matches for c.
425 * @return the Set of all values or empty set if there are no matches
426 *
427 */
428 protected Stream<Commit> rawStreamAllValuesOfc(final Object[] parameters) {
429 return rawStreamAllValues(POSITION_C, parameters).map(Commit.class::cast);
430 }
431
432 /**
433 * Retrieve the set of values that occur in matches for c.
434 * @return the Set of all values or empty set if there are no matches
435 *
436 */
437 public Set<Commit> getAllValuesOfc() {
438 return rawStreamAllValuesOfc(emptyArray()).collect(Collectors.toSet());
439 }
440
441 /**
442 * Retrieve the set of values that occur in matches for c.
443 * @return the Set of all values or empty set if there are no matches
444 *
445 */
446 public Stream<Commit> streamAllValuesOfc() {
447 return rawStreamAllValuesOfc(emptyArray());
448 }
449
450 /**
451 * Retrieve the set of values that occur in matches for c.
452 * </p>
453 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
454 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
455 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
456 *
457 * @return the Stream of all values or empty set if there are no matches
458 *
459 */
460 public Stream<Commit> streamAllValuesOfc(final Committer.Match partialMatch) {
461 return rawStreamAllValuesOfc(partialMatch.toArray());
462 }
463
464 /**
465 * Retrieve the set of values that occur in matches for c.
466 * </p>
467 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
468 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
469 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
470 *
471 * @return the Stream of all values or empty set if there are no matches
472 *
473 */
474 public Stream<Commit> streamAllValuesOfc(final User pU) {
475 return rawStreamAllValuesOfc(new Object[]{null, pU});
476 }
477
478 /**
479 * Retrieve the set of values that occur in matches for c.
480 * @return the Set of all values or empty set if there are no matches
481 *
482 */
483 public Set<Commit> getAllValuesOfc(final Committer.Match partialMatch) {
484 return rawStreamAllValuesOfc(partialMatch.toArray()).collect(Collectors.toSet());
485 }
486
487 /**
488 * Retrieve the set of values that occur in matches for c.
489 * @return the Set of all values or empty set if there are no matches
490 *
491 */
492 public Set<Commit> getAllValuesOfc(final User pU) {
493 return rawStreamAllValuesOfc(new Object[]{null, pU}).collect(Collectors.toSet());
494 }
495
496 /**
497 * Retrieve the set of values that occur in matches for u.
498 * @return the Set of all values or empty set if there are no matches
499 *
500 */
501 protected Stream<User> rawStreamAllValuesOfu(final Object[] parameters) {
502 return rawStreamAllValues(POSITION_U, parameters).map(User.class::cast);
503 }
504
505 /**
506 * Retrieve the set of values that occur in matches for u.
507 * @return the Set of all values or empty set if there are no matches
508 *
509 */
510 public Set<User> getAllValuesOfu() {
511 return rawStreamAllValuesOfu(emptyArray()).collect(Collectors.toSet());
512 }
513
514 /**
515 * Retrieve the set of values that occur in matches for u.
516 * @return the Set of all values or empty set if there are no matches
517 *
518 */
519 public Stream<User> streamAllValuesOfu() {
520 return rawStreamAllValuesOfu(emptyArray());
521 }
522
523 /**
524 * Retrieve the set of values that occur in matches for u.
525 * </p>
526 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
527 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
528 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
529 *
530 * @return the Stream of all values or empty set if there are no matches
531 *
532 */
533 public Stream<User> streamAllValuesOfu(final Committer.Match partialMatch) {
534 return rawStreamAllValuesOfu(partialMatch.toArray());
535 }
536
537 /**
538 * Retrieve the set of values that occur in matches for u.
539 * </p>
540 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
541 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
542 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
543 *
544 * @return the Stream of all values or empty set if there are no matches
545 *
546 */
547 public Stream<User> streamAllValuesOfu(final Commit pC) {
548 return rawStreamAllValuesOfu(new Object[]{pC, null});
549 }
550
551 /**
552 * Retrieve the set of values that occur in matches for u.
553 * @return the Set of all values or empty set if there are no matches
554 *
555 */
556 public Set<User> getAllValuesOfu(final Committer.Match partialMatch) {
557 return rawStreamAllValuesOfu(partialMatch.toArray()).collect(Collectors.toSet());
558 }
559
560 /**
561 * Retrieve the set of values that occur in matches for u.
562 * @return the Set of all values or empty set if there are no matches
563 *
564 */
565 public Set<User> getAllValuesOfu(final Commit pC) {
566 return rawStreamAllValuesOfu(new Object[]{pC, null}).collect(Collectors.toSet());
567 }
568
569 @Override
570 protected Committer.Match tupleToMatch(final Tuple t) {
571 try {
572 return Committer.Match.newMatch((Commit) t.get(POSITION_C), (User) t.get(POSITION_U));
573 } catch(ClassCastException e) {
574 LOGGER.error("Element(s) in tuple not properly typed!",e);
575 return null;
576 }
577 }
578
579 @Override
580 protected Committer.Match arrayToMatch(final Object[] match) {
581 try {
582 return Committer.Match.newMatch((Commit) match[POSITION_C], (User) match[POSITION_U]);
583 } catch(ClassCastException e) {
584 LOGGER.error("Element(s) in array not properly typed!",e);
585 return null;
586 }
587 }
588
589 @Override
590 protected Committer.Match arrayToMatchMutable(final Object[] match) {
591 try {
592 return Committer.Match.newMutableMatch((Commit) match[POSITION_C], (User) match[POSITION_U]);
593 } catch(ClassCastException e) {
594 LOGGER.error("Element(s) in array not properly typed!",e);
595 return null;
596 }
597 }
598
599 /**
600 * @return the singleton instance of the query specification of this pattern
601 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
602 *
603 */
604 public static IQuerySpecification<Committer.Matcher> querySpecification() {
605 return Committer.instance();
606 }
607 }
608
609 private Committer() {
610 super(GeneratedPQuery.INSTANCE);
611 }
612
613 /**
614 * @return the singleton instance of the query specification
615 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
616 *
617 */
618 public static Committer instance() {
619 try{
620 return LazyHolder.INSTANCE;
621 } catch (ExceptionInInitializerError err) {
622 throw processInitializerError(err);
623 }
624 }
625
626 @Override
627 protected Committer.Matcher instantiate(final ViatraQueryEngine engine) {
628 return Committer.Matcher.on(engine);
629 }
630
631 @Override
632 public Committer.Matcher instantiate() {
633 return Committer.Matcher.create();
634 }
635
636 @Override
637 public Committer.Match newEmptyMatch() {
638 return Committer.Match.newEmptyMatch();
639 }
640
641 @Override
642 public Committer.Match newMatch(final Object... parameters) {
643 return Committer.Match.newMatch((github.Commit) parameters[0], (github.User) parameters[1]);
644 }
645
646 /**
647 * Inner class allowing the singleton instance of {@link Committer} to be created
648 * <b>not</b> at the class load time of the outer class,
649 * but rather at the first call to {@link Committer#instance()}.
650 *
651 * <p> This workaround is required e.g. to support recursion.
652 *
653 */
654 private static class LazyHolder {
655 private static final Committer INSTANCE = new Committer();
656
657 /**
658 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
659 * This initialization order is required to support indirect recursion.
660 *
661 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
662 *
663 */
664 private static final Object STATIC_INITIALIZER = ensureInitialized();
665
666 public static Object ensureInitialized() {
667 INSTANCE.ensureInitializedInternal();
668 return null;
669 }
670 }
671
672 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
673 private static final Committer.GeneratedPQuery INSTANCE = new GeneratedPQuery();
674
675 private final PParameter parameter_c = new PParameter("c", "github.Commit", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("sure.ghtorrent.github", "Commit")), PParameterDirection.INOUT);
676
677 private final PParameter parameter_u = new PParameter("u", "github.User", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("sure.ghtorrent.github", "User")), PParameterDirection.INOUT);
678
679 private final List<PParameter> parameters = Arrays.asList(parameter_c, parameter_u);
680
681 private GeneratedPQuery() {
682 super(PVisibility.PUBLIC);
683 }
684
685 @Override
686 public String getFullyQualifiedName() {
687 return "queries.committer";
688 }
689
690 @Override
691 public List<String> getParameterNames() {
692 return Arrays.asList("c","u");
693 }
694
695 @Override
696 public List<PParameter> getParameters() {
697 return parameters;
698 }
699
700 @Override
701 public Set<PBody> doGetContainedBodies() {
702 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
703 Set<PBody> bodies = new LinkedHashSet<>();
704 {
705 PBody body = new PBody(this);
706 PVariable var_c = body.getOrCreateVariableByName("c");
707 PVariable var_u = body.getOrCreateVariableByName("u");
708 new TypeConstraint(body, Tuples.flatTupleOf(var_c), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("sure.ghtorrent.github", "Commit")));
709 new TypeConstraint(body, Tuples.flatTupleOf(var_u), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("sure.ghtorrent.github", "User")));
710 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
711 new ExportedParameter(body, var_c, parameter_c),
712 new ExportedParameter(body, var_u, parameter_u)
713 ));
714 // Commit.committer(c, u)
715 new TypeConstraint(body, Tuples.flatTupleOf(var_c), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("sure.ghtorrent.github", "Commit")));
716 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
717 new TypeConstraint(body, Tuples.flatTupleOf(var_c, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("sure.ghtorrent.github", "Commit", "committer")));
718 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("sure.ghtorrent.github", "User")));
719 new Equality(body, var__virtual_0_, var_u);
720 bodies.add(body);
721 }
722 return bodies;
723 }
724 }
725}