Skip to content

Commit c2133c5

Browse files
committed
example runs again
1 parent 0fe432b commit c2133c5

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

example/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,6 @@ dependencies {
2626
testCompile 'junit:junit:4.12'
2727
implementation "com.android.support:appcompat-v7:$support_library_version"
2828
implementation project(':query')
29+
implementation project(':annotations')
2930
annotationProcessor project(':annotationprocessor')
3031
}

example/src/main/java/com/quarkworks/android/realmtypesafequery/example/MainActivity.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ public void execute(Realm realm) {
5656
}
5757
}
5858
});
59-
//todo add .with(realm)
60-
Log.d(TAG, "Count:" + RealmTypeSafeQuery.where(TestRecord.class).count());
6159

62-
Log.d(TAG, "Equal To 1: " + RealmTypeSafeQuery.where(TestRecord.class).equalTo(TestRecordFields.STRING_FIELD, "1").findAll().toString());
63-
Log.d(TAG, "Equal To null: " + RealmTypeSafeQuery.where(TestRecord.class).equalTo(TestRecordFields.STRING_FIELD, null).findAll().toString());
64-
Log.d(TAG, "IsNull: " + RealmTypeSafeQuery.where(TestRecord.class).isNull(TestRecordFields.STRING_FIELD).findAll().toString());
65-
Log.d(TAG, "IsNotNull: " + RealmTypeSafeQuery.where(TestRecord.class).isNotNull(TestRecordFields.STRING_FIELD).findAll().toString());
60+
Log.d(TAG, "Count:" + RealmTypeSafeQuery.with(realm).where(TestRecord.class).count());
61+
62+
Log.d(TAG, "Equal To 1: " + RealmTypeSafeQuery.with(realm).where(TestRecord.class).equalTo(TestRecordFields.STRING_FIELD, "1").findAll().toString());
63+
Log.d(TAG, "Equal To null: " + RealmTypeSafeQuery.with(realm).where(TestRecord.class).equalTo(TestRecordFields.STRING_FIELD, null).findAll().toString());
64+
Log.d(TAG, "IsNull: " + RealmTypeSafeQuery.with(realm).where(TestRecord.class).isNull(TestRecordFields.STRING_FIELD).findAll().toString());
65+
Log.d(TAG, "IsNotNull: " + RealmTypeSafeQuery.with(realm).where(TestRecord.class).isNotNull(TestRecordFields.STRING_FIELD).findAll().toString());
6666
}
6767
}
6868
}

example/src/main/java/com/quarkworks/android/realmtypesafequery/example/TestRecord.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import android.support.annotation.NonNull;
55
import android.support.annotation.Nullable;
66

7-
import com.quarkworks.android.realmtypesafequery.RealmDefaultValues;
7+
import com.quarkworks.android.realmtypesafequery.constants.RealmDefaults;
88
import com.quarkworks.android.realmtypesafequery.annotations.GenerateRealmFieldNames;
99
import com.quarkworks.android.realmtypesafequery.annotations.GenerateRealmFields;
1010

@@ -77,7 +77,7 @@ public class TestRecord implements RealmModel {
7777
public String primaryKey;
7878

7979
@Required @NonNull
80-
public String requiredField = RealmDefaultValues.STRING;
80+
public String requiredField = RealmDefaults.STRING;
8181

8282
@Nullable
8383
public TestRecord parent = null;

0 commit comments

Comments
 (0)