protected void validateParameters(final RowValue parameters) throws SQLException {
  final RowDescriptor parameterDescriptor=getParameterDescriptor();
  final int expectedSize=parameterDescriptor != null ? parameterDescriptor.getCount() : 0;
  final int actualSize=parameters.getCount();
  if (actualSize != expectedSize) {
    throw new SQLNonTransientException(String.format("Invalid number of parameters, expected %d, got %d",expectedSize,actualSize),"07008");
  }
  for (int fieldIndex=0; fieldIndex < actualSize; fieldIndex++) {
    FieldValue fieldValue=parameters.getFieldValue(fieldIndex);
    if (fieldValue == null || !fieldValue.isInitialized()) {
      throw new SQLTransientException(String.format("Parameter with index %d was not set",fieldIndex + 1),"0700C");
    }
  }
}

protected void validateParameters ( final RowValue parameters ) throws SQLException { final RowDescriptor parameterDescriptor = getParameterDescriptor ( ) ; final int expectedSize = parameterDescriptor != null ? parameterDescriptor . getCount ( ) : 0 ; final int actualSize = parameters . getCount ( ) ; if ( actualSize != expectedSize ) { throw new SQLNonTransientException ( String . format ( "Invalid number of parameters, expected %d, got %d" , expectedSize , actualSize ) , "07008" ) ; } for ( int fieldIndex = 0 ; fieldIndex < actualSize ; fieldIndex ++ ) { FieldValue fieldValue = parameters . getFieldValue ( fieldIndex ) ; if ( fieldValue == null || ! fieldValue . isInitialized ( ) ) { throw new SQLTransientException ( String . format ( "Parameter with index %d was not set" , fieldIndex + 1 ) , "0700C" ) ; } } }
validates if the number of parameters matches the expected number and types , and if all values have been set .
