use of jakarta.persistence.Transient in project mycore by MyCoRe-Org.
the class MCRCategoryImpl method getRightSiblingOrParent.
@Transient
MCRCategoryImpl getRightSiblingOrParent() {
int index = getPositionInParent();
MCRCategoryImpl parent = (MCRCategoryImpl) getParent();
if (index + 1 == parent.getChildren().size()) {
return parent;
}
// get Element at index that would be at index+1 after insert
return (MCRCategoryImpl) parent.getChildren().get(index + 1);
}
use of jakarta.persistence.Transient in project eclipselink by eclipse-ee4j.
the class Door method getSaleDate.
@Transient
public Date getSaleDate() {
Calendar cal = Calendar.getInstance();
cal.setTime(getWarrantyDate());
int day = cal.get(Calendar.DAY_OF_MONTH);
int month = cal.get(Calendar.MONTH);
int year = cal.get(Calendar.YEAR) - 1;
return Helper.dateFromYearMonthDate(year, month, day);
}
Aggregations