package com.futureprocessing.documentjuggler.versioning;

import com.futureprocessing.documentjuggler.annotation.DbField;
import com.futureprocessing.documentjuggler.annotation.ObjectId;

import java.util.Date;

public interface VersionedDocument<MODEL extends VersionedDocument> {

    static final String DOC_ID = "_docId";
    static final String VERSION = "_v";
    static final String DATE = "_date";
    static final String PENDING_ARCHIVE = "_pending_archive";

    @ObjectId
    @DbField(DOC_ID)
    String getId();

    @ObjectId
    @DbField(DOC_ID)
    MODEL withId(String id);

    @DbField(VERSION)
    int getVersion();

    @DbField(VERSION)
    MODEL withVersion(int version);

    @DbField(DATE)
    Date getDate();
}

@@ -106,22 +106,25 @@
 otation.
-DbFiel
+AsObjectI
 d;%0Aimpor
@@ -173,23 +173,22 @@
 otation.
-ObjectI
+DbFiel
 d;%0A%0Aimpo
@@ -278,37 +278,24 @@
 ent%3E %7B%0A%0A    
-static final 
 String DOC_I
@@ -308,37 +308,24 @@
 docId%22;%0A    
-static final 
 String VERSI
@@ -335,37 +335,24 @@
 = %22_v%22;%0A    
-static final 
 String DATE 
@@ -370,21 +370,8 @@
     
-static final 
 Stri
@@ -409,32 +409,34 @@
 archive%22;%0A%0A    @
+As
 ObjectId%0A    @Db
@@ -475,16 +475,18 @@
 ;%0A%0A    @
+As
 ObjectId

Update to follow Document-Juggler