Skip to content

Instantly share code, notes, and snippets.

@labra
Created March 28, 2014 08:14
Show Gist options
  • Save labra/9827738 to your computer and use it in GitHub Desktop.
Save labra/9827738 to your computer and use it in GitHub Desktop.
Simple Country Model
package models;
import javax.persistence.Entity;
import javax.persistence.Id;
import com.avaje.ebean.Ebean;
import play.db.ebean.Model;
@Entity
public class Country extends Model {
@Id
public String code;
public String name;
public Country(String code, String name) {
this.code = code;
this.name = name;
}
public static Finder<String,Country> find = new Finder(String.class,Country.class);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment