mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Add an auto update time field to the Cursor entity
Also adjusts the nomulus list_cursors command to output the value of this field. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=206646117
This commit is contained in:
parent
3941249dfe
commit
f614044681
6 changed files with 62 additions and 14 deletions
|
@ -25,6 +25,7 @@ import com.googlecode.objectify.annotation.Entity;
|
|||
import com.googlecode.objectify.annotation.Id;
|
||||
import com.googlecode.objectify.annotation.Parent;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.UpdateAutoTimestamp;
|
||||
import google.registry.model.registry.Registry;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
|
@ -108,6 +109,13 @@ public class Cursor extends ImmutableObject {
|
|||
|
||||
DateTime cursorTime = START_OF_TIME;
|
||||
|
||||
/** An automatically managed timestamp of when this object was last written to Datastore. */
|
||||
UpdateAutoTimestamp lastUpdateTime = UpdateAutoTimestamp.create(null);
|
||||
|
||||
public DateTime getLastUpdateTime() {
|
||||
return lastUpdateTime.getTimestamp();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the type of the scoped object (or null) matches the required type for the specified
|
||||
* cursor (or null, if the cursor is a global cursor).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue