Search in sources :

Example 11 with Row

use of io.realm.internal.Row in project realm-java by realm.

the class BooleansRealmProxy method realmSet$done.

public void realmSet$done(boolean value) {
    if (proxyState.isUnderConstruction()) {
        if (!proxyState.getAcceptDefaultValue$realm()) {
            return;
        }
        final Row row = proxyState.getRow$realm();
        row.getTable().setBoolean(columnInfo.doneIndex, row.getIndex(), value, true);
        return;
    }
    proxyState.getRealm$realm().checkIfValid();
    proxyState.getRow$realm().setBoolean(columnInfo.doneIndex, value);
}
Also used : Row(io.realm.internal.Row)

Example 12 with Row

use of io.realm.internal.Row in project realm-java by realm.

the class BooleansRealmProxy method realmSet$mCompleted.

public void realmSet$mCompleted(boolean value) {
    if (proxyState.isUnderConstruction()) {
        if (!proxyState.getAcceptDefaultValue$realm()) {
            return;
        }
        final Row row = proxyState.getRow$realm();
        row.getTable().setBoolean(columnInfo.mCompletedIndex, row.getIndex(), value, true);
        return;
    }
    proxyState.getRealm$realm().checkIfValid();
    proxyState.getRow$realm().setBoolean(columnInfo.mCompletedIndex, value);
}
Also used : Row(io.realm.internal.Row)

Example 13 with Row

use of io.realm.internal.Row in project realm-java by realm.

the class NullTypesRealmProxy method realmSet$fieldFloatNull.

public void realmSet$fieldFloatNull(Float value) {
    if (proxyState.isUnderConstruction()) {
        if (!proxyState.getAcceptDefaultValue$realm()) {
            return;
        }
        final Row row = proxyState.getRow$realm();
        if (value == null) {
            row.getTable().setNull(columnInfo.fieldFloatNullIndex, row.getIndex(), true);
            return;
        }
        row.getTable().setFloat(columnInfo.fieldFloatNullIndex, row.getIndex(), value, true);
        return;
    }
    proxyState.getRealm$realm().checkIfValid();
    if (value == null) {
        proxyState.getRow$realm().setNull(columnInfo.fieldFloatNullIndex);
        return;
    }
    proxyState.getRow$realm().setFloat(columnInfo.fieldFloatNullIndex, value);
}
Also used : Row(io.realm.internal.Row)

Example 14 with Row

use of io.realm.internal.Row in project realm-java by realm.

the class AllTypesRealmProxy method realmSet$columnBinary.

public void realmSet$columnBinary(byte[] 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 'columnBinary' to null.");
        }
        row.getTable().setBinaryByteArray(columnInfo.columnBinaryIndex, row.getIndex(), value, true);
        return;
    }
    proxyState.getRealm$realm().checkIfValid();
    if (value == null) {
        throw new IllegalArgumentException("Trying to set non-nullable field 'columnBinary' to null.");
    }
    proxyState.getRow$realm().setBinaryByteArray(columnInfo.columnBinaryIndex, value);
}
Also used : Row(io.realm.internal.Row)

Example 15 with Row

use of io.realm.internal.Row in project realm-java by realm.

the class NullTypesRealmProxy method realmSet$fieldShortNotNull.

public void realmSet$fieldShortNotNull(Short 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 'fieldShortNotNull' to null.");
        }
        row.getTable().setLong(columnInfo.fieldShortNotNullIndex, row.getIndex(), value, true);
        return;
    }
    proxyState.getRealm$realm().checkIfValid();
    if (value == null) {
        throw new IllegalArgumentException("Trying to set non-nullable field 'fieldShortNotNull' to null.");
    }
    proxyState.getRow$realm().setLong(columnInfo.fieldShortNotNullIndex, value);
}
Also used : Row(io.realm.internal.Row)

Aggregations

Row (io.realm.internal.Row)38 RealmObjectProxy (io.realm.internal.RealmObjectProxy)6 InvalidRow (io.realm.internal.InvalidRow)2 UiThreadTest (android.support.test.annotation.UiThreadTest)1 AllTypes (io.realm.entities.AllTypes)1 Collection (io.realm.internal.Collection)1 PendingRow (io.realm.internal.PendingRow)1 Test (org.junit.Test)1