@Override public void setParentId(Trackable parentObject) { parent = parentObject.getTrackingId(); if (source == null) { source = parentObject.getSource(); } }
/** * Adds the specified linked item to the list of items referenced in this Activity. This method does NOT check for * duplicates. * * @param item * linked item referenced in Activity * @throws NullPointerException * if item is {@code null} * @see #containsId(String) */ public void add(Trackable item) { if (item == null) { throw new NullPointerException("trackable item must be non-null"); } String tid = item.getTrackingId(); if (tid != null) { idset.add(tid); } Set<String> cid = item.getCorrelator(); if (cid != null) { idset.addAll(cid); } if (item instanceof Snapshot) { addSnapshot((Snapshot) item); } item.setTTL(getTTL()); item.setParentId(this); }
/** * {@inheritDoc} */ @Override public void setParentId(Trackable parentObject) { this.parentId = parentObject != null ? parentObject.getTrackingId() : parentId; }
@Override public void setParentId(Trackable parentObject) { parent_id = parentObject != null ? parentObject.getTrackingId() : parent_id; }