World.java 497 B

123456789101112131415161718192021222324252627282930
  1. package models;
  2. import javax.persistence.Column;
  3. import javax.persistence.Entity;
  4. import javax.persistence.Id;
  5. import play.db.jpa.GenericModel;
  6. import play.db.jpa.Model;
  7. import com.google.gson.annotations.SerializedName;
  8. /**
  9. * use a generic model as we want to explicitly define the id
  10. *
  11. * @author tom
  12. *
  13. */
  14. @Entity
  15. public class World extends GenericModel {
  16. public World(long i, long number) {
  17. id = i;
  18. randomNumber = number ;
  19. }
  20. @Id
  21. public Long id;
  22. public Long randomNumber;
  23. }