Created
September 2, 2017 14:13
-
-
Save PierceZ/2b681f1091809958a69800d5ff45ca47 to your computer and use it in GitHub Desktop.
An example data model to be used for ObjectBox.
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
| @Entity | |
| public class Animal { | |
| @Id(assignable = true) | |
| private long id; | |
| private String name; | |
| private boolean flying; | |
| private boolean swimming; | |
| private boolean walking; | |
| public long getId() { | |
| return id; | |
| } | |
| public void setId(long id) { | |
| this.id = id; | |
| } | |
| public String getName() { | |
| return name; | |
| } | |
| public void setName(String name) { | |
| this.name = name; | |
| } | |
| public boolean isFlying() { | |
| return flying; | |
| } | |
| public void setFlying(boolean flying) { | |
| this.flying = flying; | |
| } | |
| public boolean isSwimming() { | |
| return swimming; | |
| } | |
| public void setSwimming(boolean swimming) { | |
| this.swimming = swimming; | |
| } | |
| public boolean isWalking() { | |
| return walking; | |
| } | |
| public void setWalking(boolean walking) { | |
| this.walking = walking; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment