code: @Override
     protected int addReference(PropertyData data) throws SQLException, IOException
     {
        if (insertReference == null)
        {
           insertReference = dbConnection.prepareStatement(INSERT_REF);
        }
        else
        {
           insertReference.clearParameters();
        }
  
        List<ValueData> values = data.getValues();
        int added = 0;
        for (int i = 0; i < values.size(); i++)
        {
           ValueData vdata = values.get(i);
  
           String refNodeIdentifier;
           try
           {
              refNodeIdentifier = ValueDataUtil.getString(vdata);
           }
           catch (RepositoryException e)
           {
              throw new IOException(e.getMessage(), e);
           }
  
           insertReference.setString(1, getInternalId(refNodeIdentifier));
           insertReference.setString(2, getInternalId(data.getIdentifier()));
           insertReference.setInt(3, i);
           added += insertReference.executeUpdate();
        }
        return added;
     }
docs: {@inheritDoc}