diff --git a/server/eclipse-project/src/main/java/us/freeandfair/corla/model/Elector.java b/server/eclipse-project/src/main/java/us/freeandfair/corla/model/Elector.java index 87a9dbfc9..d728c188c 100644 --- a/server/eclipse-project/src/main/java/us/freeandfair/corla/model/Elector.java +++ b/server/eclipse-project/src/main/java/us/freeandfair/corla/model/Elector.java @@ -137,4 +137,9 @@ public boolean equals(final Object the_other) { public int hashCode() { return toString().hashCode(); } + + @Override + protected Elector exampleInstance() { + return new Elector("John", "Doe", "Free and Fair Party"); + } } diff --git a/server/eclipse-project/src/main/java/us/freeandfair/corla/persistence/AbstractEntity.java b/server/eclipse-project/src/main/java/us/freeandfair/corla/persistence/AbstractEntity.java index 773fbf8ac..a90a5242e 100644 --- a/server/eclipse-project/src/main/java/us/freeandfair/corla/persistence/AbstractEntity.java +++ b/server/eclipse-project/src/main/java/us/freeandfair/corla/persistence/AbstractEntity.java @@ -43,6 +43,11 @@ protected AbstractEntity() { // default values } + /** + * An example instance of this entity. + */ + protected abstract AbstractEntity exampleInstance(); + /** * {@inheritDoc} */