use of javax.jdo.annotations.NotPersistent in project estatio by estatio.
the class Paperclip method getDocumentDate.
/**
* Either the {@link Document#getCreatedAt()} or {@link Document#getRenderedAt()}, depending upon the
* {@link Document#getState()} of the {@link Document}. Returns <tt>null</tt> for {@link DocumentTemplate}s.
*/
@NotPersistent
@Property(domainEvent = DocumentDateDomainEvent.class, editing = Editing.DISABLED)
public DateTime getDocumentDate() {
final DocumentAbstract documentAbstract = getDocument();
if (documentAbstract instanceof Document) {
final Document document = (Document) documentAbstract;
DocumentState state = document.getState();
return state.dateOf(document);
}
return null;
}
use of javax.jdo.annotations.NotPersistent in project motech by motech.
the class Entity method advancedSettingsDto.
@NotPersistent
public AdvancedSettingsDto advancedSettingsDto() {
AdvancedSettingsDto advancedSettingsDto = new AdvancedSettingsDto();
RestOptionsDto restDto;
if (null == restOptions) {
restDto = new RestOptions(this).toDto();
} else {
restDto = restOptions.toDto();
}
List<LookupDto> indexes = new ArrayList<>();
for (Lookup lookup : getLookups()) {
indexes.add(lookup.toDto());
}
Tracking trackingMapping = getTracking();
TrackingDto trackingDto = (trackingMapping == null) ? new TrackingDto() : trackingMapping.toDto();
advancedSettingsDto.setIndexes(indexes);
advancedSettingsDto.setEntityId(getId());
advancedSettingsDto.setBrowsing(getBrowsingSettings().toDto());
advancedSettingsDto.setRestOptions(restDto);
advancedSettingsDto.setTracking(trackingDto);
return advancedSettingsDto;
}
Aggregations