Created
June 29, 2017 11:52
-
-
Save JeromeGuyon/b14346b67c5dcffa3a3204d6c50ed9d1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Document(collection = "project") | |
| public class ProjectDocument extends AbstractVersionnedDocument<ProjectEntity> { | |
| @Override | |
| protected ProjectEntity createNewInstance() { | |
| return new ProjectEntity(); | |
| } | |
| } | |
| public class ProjectEntity extends AbstractVersionnedEntity { | |
| @Field("name") | |
| private String name; | |
| public ProjectDocument(String name) { | |
| this.name = name; | |
| } | |
| public String getName() { | |
| return name; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment