@Override protected Change computeNext() { try { if (rs.next()) { final String featureId = rs.getString("fid"); // final long auditTimestamp = rs.getLong("audit_timestamp"); // System.err.println(new Timestamp(auditTimestamp)); final int auditOp = rs.getInt("audit_op"); final ChangeType changeType = toChangeType(auditOp); RevFeature revFeature = null; if (ChangeType.REMOVED.equals(changeType)) { report.removed.incrementAndGet(); } else { revFeature = recordToFeature.apply(rs); if (ChangeType.ADDED.equals(changeType)) { report.added.incrementAndGet(); } else { report.changed.incrementAndGet(); } } Change change = new Change(featureId, changeType, revFeature); return change; } } catch (SQLException e) { throw new RuntimeException(e); } return endOfData(); }
@Override public boolean apply(@Nullable DiffEntry input) { return input.changeType().equals(ChangeType.ADDED); } });
final boolean isDelete = ChangeType.REMOVED.equals(diff.changeType()); final TYPE type = ref.getType(); if (isDelete && deletedTrees.contains(parentPath)) {
final ObjectId theirs = theirsDiff.newObjectId(); if (!oursDiff.changeType().equals(theirsDiff.changeType())) { consumer.conflicted(new Conflict(path, ancestorVersionId, ours, theirs)); report.addConflict(path);
private boolean hasConflicts(DiffEntry diff1, DiffEntry diff2) { if (!diff1.changeType().equals(diff2.changeType())) { return true;
/** * @return {@code true} if the objects in this entry represent an added feature */ public boolean isAdd() { return ChangeType.ADDED.equals(changeType()); }
/** * @return {@code true} if the objects in this entry represent a changed feature */ public boolean isChange() { return ChangeType.MODIFIED.equals(changeType()); }
/** * @return {@code true} if the objects in this entry represent a deleted feature */ public boolean isDelete() { return ChangeType.REMOVED.equals(changeType()); }