Created
March 28, 2014 08:14
-
-
Save labra/9827738 to your computer and use it in GitHub Desktop.
Simple Country Model
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
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