-
Notifications
You must be signed in to change notification settings - Fork 0
/
Covenant.java
39 lines (30 loc) · 990 Bytes
/
Covenant.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.covenant;
import android.app.Activity;
import android.os.Bundle;
import com.covenant.models.Person;
public class Covenant extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
EntityManager.init(new DbManager(getBaseContext()));
EntityManager em = EntityManager.getInstance();
Person scott = new Person();
scott.setFirstName("Scott");
scott.setLastName("Hillman");
em.save(scott);
Person esther = new Person();
esther.setFirstName("Esther");
esther.setLastName("Hillman");
em.save(esther);
Person darcy = new Person();
darcy.setFirstName("Darcy");
darcy.setLastName("Hillman");
em.save(darcy);
Person adrie = new Person();
adrie.setFirstName("Adrie");
adrie.setLastName("Hillman");
em.save(adrie);
}
}