code: @Override
      public int removeKamEdges(RelationshipType relationship)
              throws SQLException {
          if (relationship == null || relationship.getValue() == null)
              throw new InvalidArgument("relationship is null");
  
          PreparedStatement ps = getPreparedStatement(SELECT_KAM_EDGE_BY_RELATIONSHIP);
          ResultSet rset = null;
  
          try {
              // set relationships to remove
              int rvalue = relationship.getValue();
              ps.setInt(1, rvalue);
  
              // cursor all edge ids
              List<Integer> ids = new ArrayList<Integer>();
              rset = ps.executeQuery();
              while (rset.next()) {
                  int edgeId = rset.getInt(1);
                  ids.add(edgeId);
              }
  
              // convert to int[]
              int sz = ids.size();
              int[] edgeIds = new int[sz];
              for (int i = 0; i < sz; i++) edgeIds[i] = ids.get(i);
  
              // remove edges for edge id int[]
              return removeKamEdges(edgeIds);
          } finally {
              if (rset != null) {
                  try {
                      rset.close();
                  } catch (Exception e) {
                      // ignored
                  }
              }
          }
      }
docs: {@inheritDoc}