use of io.realm.internal.Row in project realm-java by realm.
the class RealmObjectTests method row_isValid.
// FIXME remove?
@Test
public void row_isValid() {
realm.beginTransaction();
RealmObjectProxy realmObject = (RealmObjectProxy) realm.createObject(AllTypes.class);
Row row = realmObject.realmGet$proxyState().getRow$realm();
realm.commitTransaction();
assertNotNull("RealmObject.realmGetRow returns zero ", row);
assertEquals(9, row.getColumnCount());
}
use of io.realm.internal.Row in project realm-java by realm.
the class NullTypesRealmProxy method realmSet$fieldStringNotNull.
public void realmSet$fieldStringNotNull(String value) {
if (proxyState.isUnderConstruction()) {
if (!proxyState.getAcceptDefaultValue$realm()) {
return;
}
final Row row = proxyState.getRow$realm();
if (value == null) {
throw new IllegalArgumentException("Trying to set non-nullable field 'fieldStringNotNull' to null.");
}
row.getTable().setString(columnInfo.fieldStringNotNullIndex, row.getIndex(), value, true);
return;
}
proxyState.getRealm$realm().checkIfValid();
if (value == null) {
throw new IllegalArgumentException("Trying to set non-nullable field 'fieldStringNotNull' to null.");
}
proxyState.getRow$realm().setString(columnInfo.fieldStringNotNullIndex, value);
}
use of io.realm.internal.Row in project realm-java by realm.
the class SimpleRealmProxy method realmSet$age.
public void realmSet$age(int value) {
if (proxyState.isUnderConstruction()) {
if (!proxyState.getAcceptDefaultValue$realm()) {
return;
}
final Row row = proxyState.getRow$realm();
row.getTable().setLong(columnInfo.ageIndex, row.getIndex(), value, true);
return;
}
proxyState.getRealm$realm().checkIfValid();
proxyState.getRow$realm().setLong(columnInfo.ageIndex, value);
}
use of io.realm.internal.Row in project realm-java by realm.
the class SimpleRealmProxy method realmSet$name.
public void realmSet$name(String value) {
if (proxyState.isUnderConstruction()) {
if (!proxyState.getAcceptDefaultValue$realm()) {
return;
}
final Row row = proxyState.getRow$realm();
if (value == null) {
row.getTable().setNull(columnInfo.nameIndex, row.getIndex(), true);
return;
}
row.getTable().setString(columnInfo.nameIndex, row.getIndex(), value, true);
return;
}
proxyState.getRealm$realm().checkIfValid();
if (value == null) {
proxyState.getRow$realm().setNull(columnInfo.nameIndex);
return;
}
proxyState.getRow$realm().setString(columnInfo.nameIndex, value);
}
use of io.realm.internal.Row in project realm-java by realm.
the class NullTypesRealmProxy method realmSet$fieldDateNotNull.
public void realmSet$fieldDateNotNull(Date value) {
if (proxyState.isUnderConstruction()) {
if (!proxyState.getAcceptDefaultValue$realm()) {
return;
}
final Row row = proxyState.getRow$realm();
if (value == null) {
throw new IllegalArgumentException("Trying to set non-nullable field 'fieldDateNotNull' to null.");
}
row.getTable().setDate(columnInfo.fieldDateNotNullIndex, row.getIndex(), value, true);
return;
}
proxyState.getRealm$realm().checkIfValid();
if (value == null) {
throw new IllegalArgumentException("Trying to set non-nullable field 'fieldDateNotNull' to null.");
}
proxyState.getRow$realm().setDate(columnInfo.fieldDateNotNullIndex, value);
}
Aggregations