01: package org.andromda.metafacades.uml14;
02:
03: import org.andromda.core.common.ExceptionUtils;
04: import org.andromda.translation.ocl.ExpressionKinds;
05:
06: /**
07: * Metaclass facade implementation.
08: */
09: public class EntityQueryOperationLogicImpl extends
10: EntityQueryOperationLogic {
11: public EntityQueryOperationLogicImpl(java.lang.Object metaObject,
12: String context) {
13: super (metaObject, context);
14: }
15:
16: /**
17: * @see org.andromda.metafacades.uml.EntityQueryOperation#getQuery(java.lang.String)
18: */
19: protected java.lang.String handleGetQuery(String translation) {
20: ExceptionUtils.checkEmpty("translation", translation);
21: final String[] translatedExpressions = this
22: .translateConstraints(ExpressionKinds.BODY, translation);
23: String query = null;
24:
25: // we just get the first body constraint found
26: if (translatedExpressions != null
27: && translatedExpressions.length > 0) {
28: query = translatedExpressions[0];
29: }
30: return query;
31: }
32: }
|