Migrate FolderWithFeedCount and ItemWithFeed to kotlin

This commit is contained in:
Shinokuni 2021-09-01 22:13:03 +02:00
parent bb24daff64
commit 96be5af06e
4 changed files with 28 additions and 133 deletions

View File

@ -1,34 +0,0 @@
package com.readrops.db.pojo;
import androidx.room.ColumnInfo;
import androidx.room.Embedded;
import com.readrops.db.entities.Folder;
public class FolderWithFeedCount {
@Embedded
private Folder folder;
@ColumnInfo(name = "feed_count")
private int feedCount;
public FolderWithFeedCount() {
}
public Folder getFolder() {
return folder;
}
public void setFolder(Folder folder) {
this.folder = folder;
}
public int getFeedCount() {
return feedCount;
}
public void setFeedCount(int feedCount) {
this.feedCount = feedCount;
}
}

View File

@ -0,0 +1,10 @@
package com.readrops.db.pojo
import androidx.room.ColumnInfo
import androidx.room.Embedded
import com.readrops.db.entities.Folder
data class FolderWithFeedCount(
@Embedded val folder: Folder,
@ColumnInfo(name = "feed_count") val feedCount: Int,
)

View File

@ -1,99 +0,0 @@
package com.readrops.db.pojo;
import androidx.room.ColumnInfo;
import androidx.room.Embedded;
import androidx.annotation.ColorInt;
import com.readrops.db.entities.Folder;
import com.readrops.db.entities.Item;
public class ItemWithFeed {
@Embedded
private Item item;
@ColumnInfo(name = "name")
private String feedName;
@ColumnInfo(name = "feedId")
private int feedId;
@ColumnInfo(name = "text_color")
private @ColorInt int color;
@ColumnInfo(name = "background_color")
private @ColorInt int bgColor;
@ColumnInfo(name = "icon_url")
private String feedIconUrl;
@ColumnInfo(name = "siteUrl")
private String websiteUrl;
@Embedded(prefix = "folder_")
private Folder folder;
public Item getItem() {
return item;
}
public void setItem(Item item) {
this.item = item;
}
public String getFeedName() {
return feedName;
}
public void setFeedName(String feedName) {
this.feedName = feedName;
}
public int getFeedId() {
return feedId;
}
public void setFeedId(int feedId) {
this.feedId = feedId;
}
public @ColorInt int getColor() {
return color;
}
public void setColor(@ColorInt int color) {
this.color = color;
}
public String getFeedIconUrl() {
return feedIconUrl;
}
public void setFeedIconUrl(String feedIconUrl) {
this.feedIconUrl = feedIconUrl;
}
public @ColorInt int getBgColor() {
return bgColor;
}
public void setBgColor(@ColorInt int bgColor) {
this.bgColor = bgColor;
}
public Folder getFolder() {
return folder;
}
public void setFolder(Folder folder) {
this.folder = folder;
}
public String getWebsiteUrl() {
return websiteUrl;
}
public void setWebsiteUrl(String websiteUrl) {
this.websiteUrl = websiteUrl;
}
}

View File

@ -0,0 +1,18 @@
package com.readrops.db.pojo
import androidx.annotation.ColorInt
import androidx.room.ColumnInfo
import androidx.room.Embedded
import com.readrops.db.entities.Folder
import com.readrops.db.entities.Item
data class ItemWithFeed(
@Embedded val item: Item,
@ColumnInfo(name = "name") val feedName: String,
@ColumnInfo(name = "feedId") val feedId: Int,
@ColumnInfo(name = "text_color") @ColorInt val color: Int,
@ColumnInfo(name = "background_color") @ColorInt val bgColor: Int,
@ColumnInfo(name = "icon_url") val feedIconUrl: String?,
@ColumnInfo(name = "siteUrl") val websiteUrl: String?,
@Embedded(prefix = "folder_") val folder: Folder,
)