@Checked("ResultPredicates.createPredicate") private void setOnCreateAtributes() { if (AccessControl.getUserView() != null) { super.setModifiedBy(AccessControl.getPerson().getName()); setCreator(AccessControl.getPerson()); } super.setLastModificationDate(new DateTime()); }
/** Removes all references to result. */ private void removeAssociations() { super.setCountry(null); removeCreator(); for (; !getAllResultDocumentFiles().isEmpty(); getAllResultDocumentFiles().get(0).delete()) {} for (; !getPrizes().isEmpty(); getPrizes().get(0).delete()) {} for (; !getResultUnitAssociations().isEmpty(); getResultUnitAssociations().get(0).delete()) {} for (; !getResultTeachers().isEmpty(); getResultTeachers().get(0).delete()) {} // These should be the last to remove, because of access control // verifications. for (; !getResultParticipations().isEmpty(); getResultParticipations().get(0).delete()) {} }
private void updateModifiedByAndDate() { if (AccessControl.getUserView() != null) { super.setModifiedBy(AccessControl.getPerson().getName()); } super.setLastModificationDate(new DateTime()); }