Skip to content

Instantly share code, notes, and snippets.

@JeromeGuyon
Created June 29, 2017 11:52
Show Gist options
  • Select an option

  • Save JeromeGuyon/b14346b67c5dcffa3a3204d6c50ed9d1 to your computer and use it in GitHub Desktop.

Select an option

Save JeromeGuyon/b14346b67c5dcffa3a3204d6c50ed9d1 to your computer and use it in GitHub Desktop.
@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