1 package org.andromda.metafacades.emf.uml22;
2
3 import org.andromda.core.common.ExceptionUtils;
4 import org.andromda.translation.ocl.ExpressionKinds;
5
6
7
8
9
10
11
12 public class EntityQueryOperationLogicImpl
13 extends EntityQueryOperationLogic
14 {
15 private static final long serialVersionUID = 34L;
16
17
18
19
20 public EntityQueryOperationLogicImpl(
21 final Object metaObject,
22 final String context)
23 {
24 super(metaObject, context);
25 }
26
27
28
29
30 @Override
31 protected String handleGetQuery(final String translation)
32 {
33 ExceptionUtils.checkEmpty(
34 "translation",
35 translation);
36 final String[] translatedExpressions = this.translateConstraints(
37 ExpressionKinds.BODY,
38 translation);
39 String query = null;
40
41
42 if (translatedExpressions != null && translatedExpressions.length > 0)
43 {
44 query = translatedExpressions[0];
45 }
46 return query;
47 }
48 }