Files
assistant-android/app/src/main/java/com/gh/gamecenter/entity/GameEntity.java

220 lines
3.9 KiB
Java

package com.gh.gamecenter.entity;
import android.support.v4.util.ArrayMap;
import com.gh.download.DownloadEntity;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
public class GameEntity {
@SerializedName("_id")
private String id;
private String icon;
private String name;
private String brief;
private ArrayList<String> tag;
private ArrayList<ApkEntity> apk;
private ArrayList<GameCollectionEntity> collection;
private String slide;
private TestEntity test;
@SerializedName("d_button_add_word")
private String downloadAddWord;
private ArrayMap<String, DownloadEntity> entryMap;
private String image;
private String type;
private boolean isPluggable;
private String link;
@SerializedName("concern_article_exists")
private boolean newsExists = true;
@SerializedName("download_off_text")
private String downloadOffText;
public void setDownloadOffText(String downloadOffText) {
this.downloadOffText = downloadOffText;
}
public String getDownloadOffText() {
return downloadOffText;
}
public boolean isNewsExists() {
return newsExists;
}
public void setNewsExists(boolean newsExists) {
this.newsExists = newsExists;
}
public String getLink() {
return link;
}
public void setLink(String link) {
this.link = link;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getBrief() {
return brief;
}
public void setBrief(String brief) {
this.brief = brief;
}
public ArrayList<String> getTag() {
return tag;
}
public void setTag(ArrayList<String> tag) {
this.tag = tag;
}
public ArrayList<ApkEntity> getApk() {
if (apk == null) {
apk = new ArrayList<>();
}
return apk;
}
public void setApk(ArrayList<ApkEntity> apk) {
this.apk = apk;
}
public ArrayList<GameCollectionEntity> getCollection() {
return collection;
}
public void setCollection(ArrayList<GameCollectionEntity> collection) {
this.collection = collection;
}
public String getSlide() {
return slide;
}
public void setSlide(String slide) {
this.slide = slide;
}
public TestEntity getTest() {
return test;
}
public void setTest(TestEntity test) {
this.test = test;
}
public ArrayMap<String, DownloadEntity> getEntryMap() {
return entryMap;
}
public void setEntryMap(ArrayMap<String, DownloadEntity> entryMap) {
this.entryMap = entryMap;
}
public String getDownloadAddWord() {
return downloadAddWord;
}
public void setDownloadAddWord(String downloadAddWord) {
this.downloadAddWord = downloadAddWord;
}
public String getImage() {
return image;
}
public void setImage(String image) {
this.image = image;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public boolean isPluggable() {
return isPluggable;
}
public void setPluggable(boolean pluggable) {
isPluggable = pluggable;
}
public GameEntity clone() {
GameEntity gameEntity = new GameEntity();
gameEntity.setId(id);
gameEntity.setIcon(icon);
gameEntity.setName(name);
gameEntity.setBrief(brief);
if (tag != null) {
gameEntity.setTag(new ArrayList<>(tag));
}
if (apk != null) {
gameEntity.setApk(new ArrayList<>(apk));
}
if (collection != null) {
gameEntity.setCollection(new ArrayList<>(collection));
}
gameEntity.setSlide(slide);
gameEntity.setTest(test);
gameEntity.setDownloadAddWord(downloadAddWord);
if (entryMap != null) {
gameEntity.setEntryMap(new ArrayMap<String, DownloadEntity>(entryMap));
}
gameEntity.setImage(image);
gameEntity.setType(type);
gameEntity.setPluggable(isPluggable);
gameEntity.setLink(link);
gameEntity.setNewsExists(newsExists);
gameEntity.setDownloadOffText(downloadOffText);
return gameEntity;
}
}