org.andromda.metafacades.uml14.EntityQueryOperationLogicImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of andromda-metafacades-uml14 Show documentation
Show all versions of andromda-metafacades-uml14 Show documentation
The UML 1.4 metafacades. This is the set of UML 1.4 metafacades
implementations. These implement the common UML metafacades.
The newest version!
package org.andromda.metafacades.uml14;
import org.andromda.core.common.ExceptionUtils;
import org.andromda.translation.ocl.ExpressionKinds;
/**
* Metaclass facade implementation.
* @author Bob Fields
*/
public class EntityQueryOperationLogicImpl
extends EntityQueryOperationLogic
{
private static final long serialVersionUID = 34L;
/**
* @param metaObject
* @param context
*/
public EntityQueryOperationLogicImpl(
Object metaObject,
String context)
{
super(metaObject, context);
}
/**
* @see org.andromda.metafacades.uml.EntityQueryOperation#getQuery(String)
*/
@Override
protected String handleGetQuery(String translation)
{
ExceptionUtils.checkEmpty("translation", translation);
final String[] translatedExpressions = this.translateConstraints(ExpressionKinds.BODY, translation);
String query = null;
// we just get the first body constraint found
if (translatedExpressions != null && translatedExpressions.length > 0)
{
query = translatedExpressions[0];
}
return query;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy