code: @Override
     protected int addReference(String cid, int i, String refNodeIdentifier) throws SQLException,
        InvalidItemStateException, RepositoryException
     {
        if (insertReference == null)
        {
           insertReference = dbConnection.prepareStatement(INSERT_REF);
        }
        else
        {
           insertReference.clearParameters();
        }
        insertReference.setString(1, refNodeIdentifier);
        insertReference.setString(2, cid);
        insertReference.setInt(3, i);
  
        return executeUpdate(insertReference, TYPE_INSERT_REFERENCE);
     }
docs: {@inheritDoc}