質問編集履歴
1
SampleModel.javaのソースコードを追加。
test
CHANGED
File without changes
|
test
CHANGED
@@ -98,6 +98,60 @@
|
|
98
98
|
|
99
99
|
|
100
100
|
|
101
|
+
・SampleModel.javaのソースコードです。
|
102
|
+
|
103
|
+
package com.example.dbrealmj;
|
104
|
+
|
105
|
+
import io.realm.RealmObject;
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
public class SampleModel extends RealmObject {
|
110
|
+
|
111
|
+
private String name;
|
112
|
+
|
113
|
+
private int age;
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
public String getName() {
|
118
|
+
|
119
|
+
return this.name;
|
120
|
+
|
121
|
+
}
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
public void setName(String name) {
|
126
|
+
|
127
|
+
this.name = name;
|
128
|
+
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
public int getAge() {
|
134
|
+
|
135
|
+
return this.age;
|
136
|
+
|
137
|
+
}
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
public void setAge(int age) {
|
142
|
+
|
143
|
+
this.age = age;
|
144
|
+
|
145
|
+
}
|
146
|
+
|
147
|
+
}
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
101
155
|
### 試したこと
|
102
156
|
|
103
157
|
|