@Override public boolean isVariadic(Object metadataID) { return actualMetadata.isVariadic(metadataID); }
@Override public boolean isVariadic(Object metadataID) { return actualMetadata.isVariadic(metadataID); }
@Override public boolean isVariadic(Object metadataID) { return actualMetadata.isVariadic(metadataID); }
private void checkNotNull(ElementSymbol param, Object value) throws TeiidComponentException, QueryMetadataException, QueryValidatorException { if (metadata.elementSupports(param.getMetadataID(), SupportConstants.Element.NULL)) { return; } if (metadata.isVariadic(param.getMetadataID())) { if (value instanceof ArrayImpl) { ArrayImpl av = (ArrayImpl)value; for (Object o : av.getValues()) { if (o == null) { throw new QueryValidatorException(QueryPlugin.Event.TEIID30164, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30164, param)); } } } } else if (value == null) { throw new QueryValidatorException(QueryPlugin.Event.TEIID30164, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30164, param)); } }
public static void checkNotNull(ElementSymbol param, Object value, QueryMetadataInterface metadata) throws TeiidComponentException, QueryMetadataException, QueryValidatorException { if (metadata.elementSupports(param.getMetadataID(), SupportConstants.Element.NULL)) { return; } if (metadata.isVariadic(param.getMetadataID())) { if (value instanceof ArrayImpl) { ArrayImpl av = (ArrayImpl)value; for (Object o : av.getValues()) { if (o == null) { throw new QueryValidatorException(QueryPlugin.Event.TEIID30164, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30164, param)); } } } } else if (value == null) { throw new QueryValidatorException(QueryPlugin.Event.TEIID30164, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30164, param)); } }
public static void checkNotNull(ElementSymbol param, Object value, QueryMetadataInterface metadata) throws TeiidComponentException, QueryMetadataException, QueryValidatorException { if (metadata.elementSupports(param.getMetadataID(), SupportConstants.Element.NULL)) { return; } if (metadata.isVariadic(param.getMetadataID())) { if (value instanceof ArrayImpl) { ArrayImpl av = (ArrayImpl)value; for (Object o : av.getValues()) { if (o == null) { throw new QueryValidatorException(QueryPlugin.Event.TEIID30164, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30164, param)); } } } } else if (value == null) { throw new QueryValidatorException(QueryPlugin.Event.TEIID30164, QueryPlugin.Util.gs(QueryPlugin.Event.TEIID30164, param)); } }
@Override public void visit(StoredProcedure obj) { for (SPParameter param : obj.getInputParameters()) { try { if (!getMetadata().elementSupports(param.getMetadataID(), SupportConstants.Element.NULL) && EvaluatableVisitor.isFullyEvaluatable(param.getExpression(), true)) { try { // If nextValue is an expression, evaluate it before checking for null Object evaluatedValue = Evaluator.evaluate(param.getExpression()); if(evaluatedValue == null) { handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0055", param.getParameterSymbol()), param.getParameterSymbol()); //$NON-NLS-1$ } else if (evaluatedValue instanceof ArrayImpl && getMetadata().isVariadic(param.getMetadataID())) { ArrayImpl av = (ArrayImpl)evaluatedValue; for (Object o : av.getValues()) { if (o == null) { handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0055", param.getParameterSymbol()), param.getParameterSymbol()); //$NON-NLS-1$ } } } } catch(ExpressionEvaluationException e) { //ignore for now, we don't have the context which could be the problem } } } catch (TeiidComponentException e) { handleException(e); } } }
@Override public void visit(StoredProcedure obj) { for (SPParameter param : obj.getInputParameters()) { try { if (!param.isUsingDefault() && !getMetadata().elementSupports(param.getMetadataID(), SupportConstants.Element.NULL) && EvaluatableVisitor.isFullyEvaluatable(param.getExpression(), true)) { try { // If nextValue is an expression, evaluate it before checking for null Object evaluatedValue = Evaluator.evaluate(param.getExpression()); if(evaluatedValue == null) { handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0055", param.getParameterSymbol()), param.getParameterSymbol()); //$NON-NLS-1$ } else if (evaluatedValue instanceof ArrayImpl && getMetadata().isVariadic(param.getMetadataID())) { ArrayImpl av = (ArrayImpl)evaluatedValue; for (Object o : av.getValues()) { if (o == null) { handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0055", param.getParameterSymbol()), param.getParameterSymbol()); //$NON-NLS-1$ } } } } catch(Exception e) { //ignore for now, we don't have the context which could be the problem } } } catch (TeiidComponentException e) { handleException(e); } } }
@Override public void visit(StoredProcedure obj) { for (SPParameter param : obj.getInputParameters()) { try { if (!param.isUsingDefault() && !getMetadata().elementSupports(param.getMetadataID(), SupportConstants.Element.NULL) && EvaluatableVisitor.isFullyEvaluatable(param.getExpression(), true)) { try { // If nextValue is an expression, evaluate it before checking for null Object evaluatedValue = Evaluator.evaluate(param.getExpression()); if(evaluatedValue == null) { handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0055", param.getParameterSymbol()), param.getParameterSymbol()); //$NON-NLS-1$ } else if (evaluatedValue instanceof ArrayImpl && getMetadata().isVariadic(param.getMetadataID())) { ArrayImpl av = (ArrayImpl)evaluatedValue; for (Object o : av.getValues()) { if (o == null) { handleValidationError(QueryPlugin.Util.getString("ERR.015.012.0055", param.getParameterSymbol()), param.getParameterSymbol()); //$NON-NLS-1$ } } } } catch(Exception e) { //ignore for now, we don't have the context which could be the problem } } } catch (TeiidComponentException e) { handleException(e); } } }