code: @Override
     protected int addNodeRecord(NodeData data) throws SQLException
     {
        // check if parent exists
        if (data.getParentIdentifier() != null)
        {
           ResultSet item = findItemByIdentifier(data.getParentIdentifier());
           try
           {
              if (!item.next())
              {
                 throw new SQLException("Parent is not found. Behaviour of " + JCR_FK_ITEM_PARENT);
              }
           }
           finally
           {
              try
              {
                 item.close();
              }
              catch (SQLException e)
              {
                 LOG.error("Can't close the ResultSet: " + e);
              }
           }
        }
        return super.addNodeRecord(data);
     }
docs: {@inheritDoc}