|
|
@ -31,6 +31,7 @@ import org.wso2.siddhi.core.executor.function.FunctionExecutor;
|
|
|
|
import org.wso2.siddhi.query.api.definition.Attribute;
|
|
|
|
import org.wso2.siddhi.query.api.definition.Attribute;
|
|
|
|
import org.wso2.siddhi.query.api.exception.ExecutionPlanValidationException;
|
|
|
|
import org.wso2.siddhi.query.api.exception.ExecutionPlanValidationException;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* isDeviceInGroup(deviceId , groupId)
|
|
|
|
* isDeviceInGroup(deviceId , groupId)
|
|
|
|
* Returns true if device belongs to group, otherwise false.
|
|
|
|
* Returns true if device belongs to group, otherwise false.
|
|
|
@ -53,7 +54,7 @@ public class IsDeviceInGroupFunctionExecutor extends FunctionExecutor {
|
|
|
|
if (attributeExpressionExecutors[0].getReturnType()!= Attribute.Type.INT) {
|
|
|
|
if (attributeExpressionExecutors[0].getReturnType()!= Attribute.Type.INT) {
|
|
|
|
throw new ExecutionPlanValidationException(
|
|
|
|
throw new ExecutionPlanValidationException(
|
|
|
|
"Invalid parameter type found for the first argument (group id) of group:isDeviceInGroup() " +
|
|
|
|
"Invalid parameter type found for the first argument (group id) of group:isDeviceInGroup() " +
|
|
|
|
"function, required " + Attribute.Type.INT + ", but found " +
|
|
|
|
"function, required " + org.wso2.siddhi.query.api.definition.Attribute.Type.INT + ", but found " +
|
|
|
|
attributeExpressionExecutors[0].getReturnType().toString());
|
|
|
|
attributeExpressionExecutors[0].getReturnType().toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (attributeExpressionExecutors[1].getReturnType() != Attribute.Type.STRING) {
|
|
|
|
if (attributeExpressionExecutors[1].getReturnType() != Attribute.Type.STRING) {
|
|
|
|