Ignore:
Timestamp:
Feb 10, 2015, 5:11:17 PM (9 years ago)
Author:
casties
Branch:
default
Message:

added last update field for annotations in database.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/de/mpiwg/itgroup/annotations/restlet/AnnotatorResourceImpl.java

    r91 r95  
    611611         */
    612612        if (annot.getCreated() == null) {
    613             // set creation date
     613            // new - set creation date
    614614            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
    615615            String ct = format.format(Calendar.getInstance().getTime());
    616616            annot.setCreated(ct);
     617        } else {
     618                /*
     619                 * update date
     620                 */
     621                // not new - set last update date
     622                SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
     623                String ct = format.format(Calendar.getInstance().getTime());
     624                annot.setUpdated(ct);
    617625        }
    618626
Note: See TracChangeset for help on using the changeset viewer.