Skip to content

Commit

Permalink
remove @JvmField annotations in Realm model
Browse files Browse the repository at this point in the history
  • Loading branch information
Okuro3499 committed Nov 12, 2024
1 parent fa9981d commit 866b2fa
Show file tree
Hide file tree
Showing 40 changed files with 13 additions and 421 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package org.ole.planet.myplanet.model
class DocumentResponse {
private var totalRows: String? = null
private var offset: String? = null
@JvmField
var rows: List<Rows>? = null
override fun toString(): String {
return "ClassPojo [total_rows = $totalRows, offset = $offset, rows = $rows]"
Expand Down
8 changes: 0 additions & 8 deletions app/src/main/java/org/ole/planet/myplanet/model/Download.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,13 @@ import android.os.Parcel
import android.os.Parcelable

class Download() : Parcelable {
@JvmField
var fileName: String? = null
@JvmField
var progress: Int = 0
@JvmField
var currentFileSize: Int = 0
@JvmField
var totalFileSize: Int = 0
@JvmField
var completeAll: Boolean = false
@JvmField
var failed: Boolean = false
@JvmField
var message: String? = null
@JvmField
var fileUrl: String? = null

constructor(parcel: Parcel) : this() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package org.ole.planet.myplanet.model

class FeedbackReply(@JvmField var message: String, @JvmField var user: String, @JvmField var date: String)
class FeedbackReply(var message: String, var user: String, var date: String)
8 changes: 0 additions & 8 deletions app/src/main/java/org/ole/planet/myplanet/model/MyPlanet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,13 @@ import java.util.Calendar
import java.util.Date

class MyPlanet : Serializable {
@JvmField
var planetVersion: String? = null
// @JvmField
// var latestapk: String? = null
// @JvmField
// var minapk: String? = null
@JvmField
var minapkcode = 0
@JvmField
var latestapkcode = 0
@JvmField
var apkpath: String? = null
@JvmField
var appname: String? = null
@JvmField
var localapkpath: String? = null
override fun toString(): String {
return appname!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,19 @@ import java.io.FileWriter
import java.io.IOException

open class RealmAchievement : RealmObject() {
@JvmField
var achievements: RealmList<String>? = null
@JvmField
var references: RealmList<String>? = null
@JvmField
var purpose: String? = null
@JvmField
var achievementsHeader: String? = null
@JvmField
var sendToNation: String? = null
@JvmField
var _rev: String? = null
@PrimaryKey
@JvmField
var _id: String? = null
@JvmField
var goals: String? = null

fun getReferences(): RealmList<String>? {
return references
}
// fun getReferences(): RealmList<String>? {
// return references
// }

val achievementsArray: JsonArray
get() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,13 @@ import io.realm.annotations.PrimaryKey
open class RealmAnswer : RealmObject() {
@PrimaryKey
var id: String? = null
@JvmField
var value: String? = null
@JvmField
var valueChoices: RealmList<String>? = null
@JvmField
var mistakes = 0
@JvmField
var isPassed = false
@JvmField
var grade = 0
@JvmField
var examId: String? = null
@JvmField
var questionId: String? = null
@JvmField
var submissionId: String? = null
val valueChoicesArray: JsonArray
get() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,14 @@ import org.ole.planet.myplanet.utilities.NetworkUtils
open class RealmApkLog : RealmObject() {
@PrimaryKey
var id: String? = null
@JvmField
var userId: String? = null
@JvmField
var type: String? = null
@JvmField
var _rev: String? = null
@JvmField
var error: String? = null
@JvmField
var page: String? = null
@JvmField
var parentCode: String? = null
@JvmField
var version: String? = null
@JvmField
var createdOn: String? = null
@JvmField
var time: String? = null

fun setError(e: Throwable) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ import java.io.IOException

open class RealmCertification : RealmObject() {
@PrimaryKey
@JvmField
var _id: String? = null
@JvmField
var _rev: String? = null
var name: String? = null
private var courseIds: String? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,15 @@ import java.util.UUID

open class RealmCourseActivity : RealmObject() {
@PrimaryKey
@JvmField
var id: String? = null
@JvmField
var _id: String? = null
@JvmField
var createdOn: String? = null
@JvmField
var _rev: String? = null
@JvmField
var time: Long = 0
@JvmField
var title: String? = null
@JvmField
var courseId: String? = null
@JvmField
var parentCode: String? = null
@JvmField
var type: String? = null
@JvmField
var user: String? = null

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,15 @@ import java.io.IOException
open class RealmCourseProgress : RealmObject() {
@PrimaryKey
var id: String? = null
@JvmField
var _id: String? = null
@JvmField
var createdOn: String? = null
@JvmField
var createdDate: Long = 0
@JvmField
var updatedDate: Long = 0
@JvmField
var _rev: String? = null
@JvmField
var stepNum = 0
@JvmField
var passed = false
@JvmField
var userId: String? = null
@JvmField
var courseId: String? = null
@JvmField
var parentCode: String? = null

companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@ import io.realm.RealmObject
import io.realm.annotations.PrimaryKey

open class RealmCourseStep : RealmObject() {
@JvmField
@PrimaryKey
var id: String? = null
@JvmField
var courseId: String? = null
@JvmField
var stepTitle: String? = null
@JvmField
var description: String? = null
@JvmField
var noOfResources: Int? = null
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,14 @@ import org.ole.planet.myplanet.utilities.JsonUtils
import java.util.Locale

open class RealmExamQuestion : RealmObject() {
@JvmField
@PrimaryKey
var id: String? = null
@JvmField
var header: String? = null
@JvmField
var body: String? = null
@JvmField
var type: String? = null
@JvmField
var examId: String? = null
private var correctChoice: RealmList<String>? = null
@JvmField
var marks: String? = null
@JvmField
var choices: String? = null
private fun setCorrectChoiceArray(array: JsonArray, question: RealmExamQuestion?) {
for (i in 0 until array.size()) {
Expand Down
15 changes: 0 additions & 15 deletions app/src/main/java/org/ole/planet/myplanet/model/RealmFeedback.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,23 @@ import java.io.IOException
import java.io.StringReader

open class RealmFeedback : RealmObject() {
@JvmField
@PrimaryKey
var id: String? = null
@JvmField
var _id: String? = null
@JvmField
var title: String? = null
@JvmField
var source: String? = null
@JvmField
var status: String? = null
@JvmField
var priority: String? = null
@JvmField
var owner: String? = null
@JvmField
var openTime: Long = 0
@JvmField
var type: String? = null
@JvmField
var url: String? = null
@JvmField
var isUploaded = false
@JvmField
var _rev: String? = null
var messages: String? = null
private set
@JvmField
var item: String? = null
@JvmField
var parentCode: String? = null
@JvmField
var state: String? = null
fun setMessages(messages: JsonArray?) {
this.messages = Gson().toJson(messages)
Expand Down
16 changes: 0 additions & 16 deletions app/src/main/java/org/ole/planet/myplanet/model/RealmMeetup.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,21 @@ import java.io.IOException
open class RealmMeetup : RealmObject() {
@PrimaryKey
var id: String? = null
@JvmField
var userId: String? = null
@JvmField
var meetupId: String? = null
@JvmField
var meetupIdRev: String? = null
@JvmField
var title: String? = null
@JvmField
var description: String? = null
@JvmField
var startDate: Long = 0
@JvmField
var endDate: Long = 0
@JvmField
var recurring: String? = null
@JvmField
var day: String? = null
@JvmField
var startTime: String? = null
@JvmField
var endTime: String? = null
@JvmField
var category: String? = null
@JvmField
var meetupLocation: String? = null
@JvmField
var creator: String? = null
@JvmField
var links: String? = null
@JvmField
var teamId: String? = null

companion object {
Expand Down
11 changes: 0 additions & 11 deletions app/src/main/java/org/ole/planet/myplanet/model/RealmMyCourse.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,30 +26,19 @@ import java.io.FileWriter
import java.io.IOException

open class RealmMyCourse : RealmObject() {
@JvmField
@PrimaryKey
var id: String? = null
var userId: RealmList<String>? = null
private set
@JvmField
var courseId: String? = null
@JvmField
var courseRev: String? = null
@JvmField
var languageOfInstruction: String? = null
@JvmField
var courseTitle: String? = null
@JvmField
var memberLimit: Int? = null
@JvmField
var description: String? = null
@JvmField
var method: String? = null
@JvmField
var gradeLevel: String? = null
@JvmField
var subjectLevel: String? = null
@JvmField
var createdDate: Long = 0
private var numberOfSteps: Int? = null
var courseSteps: RealmList<RealmCourseStep>? = null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
package org.ole.planet.myplanet.model

class RealmMyHealth {
@JvmField
var profile: RealmMyHealthProfile? = null
@JvmField
var userKey: String? = null
@JvmField
var lastExamination: Long = 0

class RealmMyHealthProfile {
@JvmField
var emergencyContactName = ""
@JvmField
var emergencyContactType = ""
@JvmField
var emergencyContact = ""
@JvmField
var specialNeeds = ""
@JvmField
var notes = ""
}
}
Loading

0 comments on commit 866b2fa

Please sign in to comment.