/** * @param val lastmod info */ @Override public void setLastmod(final BwCollectionLastmod val) { // Can come from constructor if (entity != null) { entity.setLastmod(val); } }
public void setLastmod(BwCollectionLastmod val) { entity.setLastmod(val); }
@Override public boolean save(final Element el, final Object theObject, final Object theValue) throws Throwable { if ("col-lastmod".equals(el.getTagName())) { ((BwCalendar)theObject).setLastmod( (BwCollectionLastmod)theValue); return true; } return false; } };
/** Constructor */ public BwCalendar() { super(); /* Set the lastmod and created */ final Date dt = new Date(); setLastmod(new BwCollectionLastmod(this, dt)); setCreated(DateTimeUtil.isoDateTimeUTC(dt)); }
/** * @return a copy for tombstoning. */ public BwCalendar makeTombstoneCopy() { final BwCalendar col = new BwCalendar(); super.copyTo(col); col.setName(getName()); col.setPath(getPath()); col.setCalType(getCalType()); col.setCreated(getCreated()); col.setLastmod((BwCollectionLastmod)getLastmod().clone()); col.setAliasUri(getAliasUri()); return col; }
public BwCalendar shallowClone() { final BwCalendar cal = new BwCalendar(); super.copyTo(cal); cal.setName(getName()); cal.setPath(getPath()); cal.setSummary(getSummary()); cal.setDescription(getDescription()); cal.setMailListId(getMailListId()); cal.setCalType(getCalType()); cal.setCreated(getCreated()); final BwCollectionLastmod lm = (BwCollectionLastmod)getLastmod().clone(); lm.setDbEntity(cal); cal.setLastmod(lm); cal.setAliasUri(getAliasUri()); cal.setDisplay(getDisplay()); cal.setAffectsFreeBusy(getAffectsFreeBusy()); cal.setIgnoreTransparency(getIgnoreTransparency()); cal.setUnremoveable(getUnremoveable()); cal.setRefreshRate(getRefreshRate()); cal.setLastRefresh(getLastRefresh()); cal.setLastEtag(getLastEtag()); cal.setFilterExpr(getFilterExpr()); if (!Util.isEmpty(getCategoryHrefs())) { final Set<String> uids = new TreeSet<>(getCategoryHrefs()); cal.setCategoryHrefs(uids); } return cal; }