/** * Creates a new {@link AbstractEntityInformation} from the given domain class. * * @param domainClass must not be {@literal null}. */ protected MybatisMetamodelEntityInformation(PersistentEntity<T, ?> persistentEntity, AuditorAware<?> auditorAware, AuditDateAware<?> auditDateAware, Class<T> domainClass) { super(persistentEntity, auditorAware, auditDateAware, domainClass); createdDateProperty = persistentEntity.getPersistentProperty(CreatedDate.class); lastModifiedDateProperty = persistentEntity.getPersistentProperty(LastModifiedDate.class); createdByProperty = persistentEntity.getPersistentProperty(CreatedBy.class); lastModifiedByProperty = persistentEntity.getPersistentProperty(LastModifiedBy.class); }
@Override public void setLastModifiedDate(T entity) { if (null == lastModifiedDateProperty) { return; } setAuditDate(lastModifiedDateProperty, entity, LastModifiedDate.class); }
@LastModifiedDate public void setLastModifiedAt(final Long lastModifiedAt) { if (isController()) { return; } this.lastModifiedAt = lastModifiedAt; }
@Type(type = "org.jadira.usertype.dateandtime.threeten.PersistentLocalDateTime") @LastModifiedDate public ZonedDateTime getPostModified() { return postModified; }
@LastModifiedDate public void atualizaData() { statusDate = new Date(); }
@Override @Column(name = "date_modified") @LastModifiedDate public Date getDateModified() { return dateModified != null ? (Date)dateModified.clone() : null; }
/** * Gets the modifyon. * * @return the modifyon */ @LastModifiedDate @Temporal(TemporalType.TIMESTAMP) public Date getModifyon() { return modifyon; }
@LastModifiedDate @Temporal(TemporalType.TIMESTAMP) @Column(name = "UPDATED", nullable = true) public Date getUpdated() { return updated; }