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