typeFound = true;
break;
}
}
if (!typeFound) {
throw new DataServiceFault("Invalid query param sqlType: '" +
this.getSqlType() + "'.");
}
/* validate type, i.e. IN, INOUT, OUT */
if (!(QueryTypes.IN.equals(this.getType()) ||
QueryTypes.OUT.equals(this.getType()) ||
QueryTypes.INOUT.equals(this.getType()))) {
throw new DataServiceFault("Invalid query param type: '" + this.getType() + "'.");
}
/* validate paramType, i.e. SCALAR, ARRAY .. */
if (!(QueryParamTypes.SCALAR.equals(this.getParamType()) ||
QueryParamTypes.ARRAY.equals(this.getParamType()))) {
throw new DataServiceFault("Invalid query param type: '" +
this.getParamType() + "'.");
}
} catch (Exception e) {
throw new DataServiceFault(e);
}
}