Search in sources :

Example 6 with Transient

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);
}
Also used : UniqueConstraint(jakarta.persistence.UniqueConstraint) Transient(jakarta.persistence.Transient)

Example 7 with Transient

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);
}
Also used : Calendar(java.util.Calendar) Transient(jakarta.persistence.Transient)

Aggregations

Transient (jakarta.persistence.Transient)7 UniqueConstraint (jakarta.persistence.UniqueConstraint)5 Access (jakarta.persistence.Access)1 Annotation (java.lang.annotation.Annotation)1 ArrayList (java.util.ArrayList)1 Calendar (java.util.Calendar)1 HashMap (java.util.HashMap)1 List (java.util.List)1 JaxbEntityListener (org.hibernate.boot.jaxb.mapping.spi.JaxbEntityListener)1 JaxbTransient (org.hibernate.boot.jaxb.mapping.spi.JaxbTransient)1 ManagedType (org.hibernate.boot.jaxb.mapping.spi.ManagedType)1 ClassLoaderAccess (org.hibernate.boot.spi.ClassLoaderAccess)1 MCRCategory (org.mycore.datamodel.classifications2.MCRCategory)1