code: @Override
     protected int addValueData(String cid, int orderNumber, InputStream stream, int streamLength, String storageDesc)
        throws SQLException
     {
  
        if (insertValue == null)
        {
           insertValue = dbConnection.prepareStatement(INSERT_VALUE);
        }
        else
        {
           insertValue.clearParameters();
        }
  
        if (stream == null)
        {
           // [PN] store vd reference to external storage etc.
           insertValue.setNull(1, Types.BINARY);
           insertValue.setString(4, storageDesc);
        }
        else
        {
           insertValue.setBinaryStream(1, stream, streamLength);
           insertValue.setNull(4, Types.VARCHAR);
        }
  
        insertValue.setInt(2, orderNumber);
        insertValue.setString(3, cid);
        return insertValue.executeUpdate();
     }
docs: {@inheritDoc}