|
|
@@ -1,13 +1,20 @@
|
|
|
package com.sheep.gamegroup.model.entity;
|
|
|
|
|
|
-import com.sheep.gamegroup.model.api.IDownload;
|
|
|
+import android.text.TextUtils;
|
|
|
+
|
|
|
+import com.sheep.gamegroup.helper.DownloadHelper;
|
|
|
import com.sheep.gamegroup.helper.FindAppHelper;
|
|
|
+import com.sheep.gamegroup.model.api.IDownload;
|
|
|
+import com.sheep.gamegroup.util.ListUtil;
|
|
|
+
|
|
|
+import java.io.Serializable;
|
|
|
+import java.util.ArrayList;
|
|
|
|
|
|
/**
|
|
|
* Created by realicing on 2018/6/28.
|
|
|
* realicing@sina.com
|
|
|
*/
|
|
|
-public class FindApp implements IDownload {
|
|
|
+public class GameApp implements IDownload, Serializable {
|
|
|
private int updated_at;
|
|
|
|
|
|
private float score;//评分
|
|
|
@@ -69,6 +76,7 @@ public class FindApp implements IDownload {
|
|
|
private int IsPlay;
|
|
|
|
|
|
private int IsHot;
|
|
|
+
|
|
|
public int getAvailable_receive() {
|
|
|
return available_receive;
|
|
|
}
|
|
|
@@ -85,118 +93,155 @@ public class FindApp implements IDownload {
|
|
|
this.receive_account = receive_account;
|
|
|
}
|
|
|
|
|
|
- public void setUpdated_at(int updated_at){
|
|
|
+ public void setUpdated_at(int updated_at) {
|
|
|
this.updated_at = updated_at;
|
|
|
}
|
|
|
- public int getUpdated_at(){
|
|
|
+
|
|
|
+ public int getUpdated_at() {
|
|
|
return this.updated_at;
|
|
|
}
|
|
|
- public void setScore(float score){
|
|
|
+
|
|
|
+ public void setScore(float score) {
|
|
|
this.score = score;
|
|
|
}
|
|
|
- public float getScore(){
|
|
|
+
|
|
|
+ public float getScore() {
|
|
|
return this.score;
|
|
|
}
|
|
|
- public void setDownload_url(String download_url){
|
|
|
+
|
|
|
+ public void setDownload_url(String download_url) {
|
|
|
this.download_url = download_url;
|
|
|
}
|
|
|
- public String getDownload_url(){
|
|
|
+
|
|
|
+ public String getDownload_url() {
|
|
|
return this.download_url;
|
|
|
}
|
|
|
- public void setPackage_size(String package_size){
|
|
|
+
|
|
|
+ public void setPackage_size(String package_size) {
|
|
|
this.package_size = package_size;
|
|
|
}
|
|
|
- public String getPackage_size(){
|
|
|
+
|
|
|
+ public String getPackage_size() {
|
|
|
return this.package_size;
|
|
|
}
|
|
|
- public void setId(int Id){
|
|
|
+
|
|
|
+ public void setId(int Id) {
|
|
|
this.Id = Id;
|
|
|
}
|
|
|
- public int getId(){
|
|
|
+
|
|
|
+ public int getId() {
|
|
|
return this.Id;
|
|
|
}
|
|
|
- public void setVersions(String versions){
|
|
|
+
|
|
|
+ public void setVersions(String versions) {
|
|
|
this.versions = versions;
|
|
|
}
|
|
|
- public String getVersions(){
|
|
|
+
|
|
|
+ public String getVersions() {
|
|
|
return this.versions;
|
|
|
}
|
|
|
- public void setPictures(String pictures){
|
|
|
+
|
|
|
+ public void setPictures(String pictures) {
|
|
|
this.pictures = pictures;
|
|
|
}
|
|
|
- public String getPictures(){
|
|
|
+
|
|
|
+ public String getPictures() {
|
|
|
return this.pictures;
|
|
|
}
|
|
|
- public void setPackage_name(String package_name){
|
|
|
+
|
|
|
+ public void setPackage_name(String package_name) {
|
|
|
this.package_name = package_name;
|
|
|
}
|
|
|
- public String getPackage_name(){
|
|
|
+
|
|
|
+ public String getPackage_name() {
|
|
|
return this.package_name;
|
|
|
}
|
|
|
- public void setPlatform(int platform){
|
|
|
+
|
|
|
+ public void setPlatform(int platform) {
|
|
|
this.platform = platform;
|
|
|
}
|
|
|
- public int getPlatform(){
|
|
|
+
|
|
|
+ public int getPlatform() {
|
|
|
return this.platform;
|
|
|
}
|
|
|
- public void setStatus(int status){
|
|
|
+
|
|
|
+ public void setStatus(int status) {
|
|
|
this.status = status;
|
|
|
}
|
|
|
- public int getStatus(){
|
|
|
+
|
|
|
+ public int getStatus() {
|
|
|
return this.status;
|
|
|
}
|
|
|
- public void setIcon(String icon){
|
|
|
+
|
|
|
+ public void setIcon(String icon) {
|
|
|
this.icon = icon;
|
|
|
}
|
|
|
- public String getIcon(){
|
|
|
+
|
|
|
+ public String getIcon() {
|
|
|
return this.icon;
|
|
|
}
|
|
|
- public void setName(String name){
|
|
|
+
|
|
|
+ public void setName(String name) {
|
|
|
this.name = name;
|
|
|
}
|
|
|
- public String getName(){
|
|
|
+
|
|
|
+ public String getName() {
|
|
|
return this.name;
|
|
|
}
|
|
|
- public void setCreated_at(int created_at){
|
|
|
+
|
|
|
+ public void setCreated_at(int created_at) {
|
|
|
this.created_at = created_at;
|
|
|
}
|
|
|
- public int getCreated_at(){
|
|
|
+
|
|
|
+ public int getCreated_at() {
|
|
|
return this.created_at;
|
|
|
}
|
|
|
- public void setIntro(String intro){
|
|
|
+
|
|
|
+ public void setIntro(String intro) {
|
|
|
this.intro = intro;
|
|
|
}
|
|
|
- public String getIntro(){
|
|
|
+
|
|
|
+ public String getIntro() {
|
|
|
return this.intro;
|
|
|
}
|
|
|
- public void setDownload_at(int download_at){
|
|
|
+
|
|
|
+ public void setDownload_at(int download_at) {
|
|
|
this.download_at = download_at;
|
|
|
}
|
|
|
- public int getDownload_at(){
|
|
|
+
|
|
|
+ public int getDownload_at() {
|
|
|
return this.download_at;
|
|
|
}
|
|
|
- public void setManufacturer(String manufacturer){
|
|
|
+
|
|
|
+ public void setManufacturer(String manufacturer) {
|
|
|
this.manufacturer = manufacturer;
|
|
|
}
|
|
|
- public String getManufacturer(){
|
|
|
+
|
|
|
+ public String getManufacturer() {
|
|
|
return this.manufacturer;
|
|
|
}
|
|
|
- public void setScore_count(int score_count){
|
|
|
+
|
|
|
+ public void setScore_count(int score_count) {
|
|
|
this.score_count = score_count;
|
|
|
}
|
|
|
- public int getScore_count(){
|
|
|
+
|
|
|
+ public int getScore_count() {
|
|
|
return this.score_count;
|
|
|
}
|
|
|
- public void setDownload_type(int download_type){
|
|
|
+
|
|
|
+ public void setDownload_type(int download_type) {
|
|
|
this.download_type = download_type;
|
|
|
}
|
|
|
- public int getDownload_type(){
|
|
|
+
|
|
|
+ public int getDownload_type() {
|
|
|
return this.download_type;
|
|
|
}
|
|
|
- public void setDownload_count(int download_count){
|
|
|
+
|
|
|
+ public void setDownload_count(int download_count) {
|
|
|
this.download_count = download_count;
|
|
|
}
|
|
|
- public int getDownload_count(){
|
|
|
+
|
|
|
+ public int getDownload_count() {
|
|
|
return this.download_count;
|
|
|
}
|
|
|
|
|
|
@@ -216,71 +261,79 @@ public class FindApp implements IDownload {
|
|
|
this.record = record;
|
|
|
}
|
|
|
|
|
|
- public void setType(String type){
|
|
|
+ public void setType(String type) {
|
|
|
this.type = type;
|
|
|
}
|
|
|
- public String getType(){
|
|
|
+
|
|
|
+ public String getType() {
|
|
|
return this.type;
|
|
|
}
|
|
|
- public void setPackage_id(String package_id){
|
|
|
+
|
|
|
+ public void setPackage_id(String package_id) {
|
|
|
this.package_id = package_id;
|
|
|
}
|
|
|
- public String getPackage_id(){
|
|
|
+
|
|
|
+ public String getPackage_id() {
|
|
|
return this.package_id;
|
|
|
}
|
|
|
- public void setPackage_type(int package_type){
|
|
|
+
|
|
|
+ public void setPackage_type(int package_type) {
|
|
|
this.package_type = package_type;
|
|
|
}
|
|
|
- public int getPackage_type(){
|
|
|
+
|
|
|
+ public int getPackage_type() {
|
|
|
return this.package_type;
|
|
|
}
|
|
|
- public void setDownload_count_increment(int download_count_increment){
|
|
|
+
|
|
|
+ public void setDownload_count_increment(int download_count_increment) {
|
|
|
this.download_count_increment = download_count_increment;
|
|
|
}
|
|
|
- public int getDownload_count_increment(){
|
|
|
+
|
|
|
+ public int getDownload_count_increment() {
|
|
|
return this.download_count_increment;
|
|
|
}
|
|
|
- public void setIs_recommend(int is_recommend){
|
|
|
+
|
|
|
+ public void setIs_recommend(int is_recommend) {
|
|
|
this.is_recommend = is_recommend;
|
|
|
}
|
|
|
- public int getIs_recommend(){
|
|
|
+
|
|
|
+ public int getIs_recommend() {
|
|
|
return this.is_recommend;
|
|
|
}
|
|
|
- public void setGame_tag(String game_tag){
|
|
|
+
|
|
|
+ public void setGame_tag(String game_tag) {
|
|
|
this.game_tag = game_tag;
|
|
|
}
|
|
|
- public String getGame_tag(){
|
|
|
+
|
|
|
+ public String getGame_tag() {
|
|
|
return this.game_tag;
|
|
|
}
|
|
|
- public void setSort(int sort){
|
|
|
+
|
|
|
+ public void setSort(int sort) {
|
|
|
this.sort = sort;
|
|
|
}
|
|
|
- public int getSort(){
|
|
|
+
|
|
|
+ public int getSort() {
|
|
|
return this.sort;
|
|
|
}
|
|
|
- public void setIsPlay(int IsPlay){
|
|
|
+
|
|
|
+ public void setIsPlay(int IsPlay) {
|
|
|
this.IsPlay = IsPlay;
|
|
|
}
|
|
|
- public int getIsPlay(){
|
|
|
+
|
|
|
+ public int getIsPlay() {
|
|
|
return this.IsPlay;
|
|
|
}
|
|
|
- public void setIsHot(int IsHot){
|
|
|
+
|
|
|
+ public void setIsHot(int IsHot) {
|
|
|
this.IsHot = IsHot;
|
|
|
}
|
|
|
- public int getIsHot(){
|
|
|
+
|
|
|
+ public int getIsHot() {
|
|
|
return this.IsHot;
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
@Override
|
|
|
public String getPackage_names() {
|
|
|
return package_name;
|
|
|
@@ -307,23 +360,18 @@ public class FindApp implements IDownload {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* 是否可以下载
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
- public boolean isCanDownload(){
|
|
|
+ public boolean isCanDownload() {
|
|
|
return download == 1;//可以下载
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 是否可以记录
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
public boolean isCanRecord() {
|
|
|
@@ -338,9 +386,28 @@ public class FindApp implements IDownload {
|
|
|
|
|
|
/**
|
|
|
* 更新下载状态
|
|
|
+ *
|
|
|
* @param status
|
|
|
*/
|
|
|
public void updateState(int status) {
|
|
|
findAppHelper.updateState(status);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ public DownloadHelper getDownloadHelper() {
|
|
|
+ return findAppHelper.getDownloadHelper();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public void updateStateRelease(int status) {
|
|
|
+ findAppHelper.getDownloadHelper().updateState(status);
|
|
|
+ }
|
|
|
+
|
|
|
+ //从game_tag中获取tagList
|
|
|
+ public ArrayList<String> getTagList() {
|
|
|
+ if (!TextUtils.isEmpty(game_tag)) {
|
|
|
+ return ListUtil.asList(game_tag.split(","));
|
|
|
+ }
|
|
|
+ return ListUtil.emptyList();
|
|
|
+ }
|
|
|
}
|