use of io.realm.internal.core.NativeRealmAny in project realm-java by realm.
the class OsMap method getKeyRealmAnyPair.
public <K> Pair<K, NativeRealmAny> getKeyRealmAnyPair(int position) {
// entry from OsMap is an array: entry[0] is key and entry[1] is a RealmAny value
Object[] entry = nativeGetEntryForRealmAny(nativePtr, position);
String key = (String) entry[0];
NativeRealmAny nativeRealmAny = new NativeRealmAny((long) entry[1]);
// noinspection unchecked
return new Pair<>((K) key, nativeRealmAny);
}
use of io.realm.internal.core.NativeRealmAny in project realm-java by realm.
the class some_test_AllTypesRealmProxy method realmGet$columnRealmAny.
@Override
public RealmAny realmGet$columnRealmAny() {
proxyState.getRealm$realm().checkIfValid();
NativeRealmAny nativeRealmAny = proxyState.getRow$realm().getNativeRealmAny(columnInfo.columnRealmAnyColKey);
return new RealmAny(RealmAnyOperator.fromNativeRealmAny(proxyState.getRealm$realm(), nativeRealmAny));
}
use of io.realm.internal.core.NativeRealmAny in project realm-java by realm.
the class RealmModelValueOperator method get.
@Nullable
@Override
RealmAny get(Object key) {
long realmAnyPtr = osMap.getRealmAnyPtr(key);
if (realmAnyPtr == OsMap.NOT_FOUND) {
return null;
}
NativeRealmAny nativeRealmAny = new NativeRealmAny(realmAnyPtr);
return new RealmAny(RealmAnyOperator.fromNativeRealmAny(baseRealm, nativeRealmAny));
}
use of io.realm.internal.core.NativeRealmAny in project realm-java by realm.
the class RealmAnyListOperator method get.
@Override
public RealmAny get(int index) {
NativeRealmAny nativeRealmAny = (NativeRealmAny) osList.getValue(index);
nativeRealmAny = (nativeRealmAny == null) ? new NativeRealmAny() : nativeRealmAny;
return new RealmAny(RealmAnyOperator.fromNativeRealmAny(realm, nativeRealmAny));
}
Aggregations