1 /* 2 * Copyright (C) 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except 5 * in compliance with the License. You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software distributed under the License 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 11 * or implied. See the License for the specific language governing permissions and limitations under 12 * the License. 13 */ 14 package com.example.android.tv.channelsprograms.model; 15 16 import java.io.Serializable; 17 18 /** Represents a video entity with title, description, image thumbs and video url. */ 19 public class Movie implements Serializable { 20 21 private static final String TAG = "Movie"; 22 23 static final long serialVersionUID = 727566175075960653L; 24 private long id; 25 private String title; 26 private String description; 27 private String bgImageUrl; 28 private String cardImageUrl; 29 private String videoUrl; 30 private String studio; 31 private String category; 32 // Program id / Watch Next id returned from the TV Provider. 33 private long programId; 34 private long watchNextId; 35 Movie()36 public Movie() {} 37 getProgramId()38 public long getProgramId() { 39 return programId; 40 } 41 setProgramId(long programId)42 public void setProgramId(long programId) { 43 this.programId = programId; 44 } 45 getWatchNextId()46 public long getWatchNextId() { 47 return watchNextId; 48 } 49 setWatchNextId(long watchNextId)50 public void setWatchNextId(long watchNextId) { 51 this.watchNextId = watchNextId; 52 } 53 getId()54 public long getId() { 55 return id; 56 } 57 setId(long id)58 public void setId(long id) { 59 this.id = id; 60 } 61 getTitle()62 public String getTitle() { 63 return title; 64 } 65 setTitle(String title)66 public void setTitle(String title) { 67 this.title = title; 68 } 69 getDescription()70 public String getDescription() { 71 return description; 72 } 73 setDescription(String description)74 public void setDescription(String description) { 75 this.description = description; 76 } 77 getStudio()78 public String getStudio() { 79 return studio; 80 } 81 setStudio(String studio)82 public void setStudio(String studio) { 83 this.studio = studio; 84 } 85 getVideoUrl()86 public String getVideoUrl() { 87 return videoUrl; 88 } 89 setVideoUrl(String videoUrl)90 public void setVideoUrl(String videoUrl) { 91 this.videoUrl = videoUrl; 92 } 93 getBackgroundImageUrl()94 public String getBackgroundImageUrl() { 95 return bgImageUrl; 96 } 97 setBackgroundImageUrl(String bgImageUrl)98 public void setBackgroundImageUrl(String bgImageUrl) { 99 this.bgImageUrl = bgImageUrl; 100 } 101 getCardImageUrl()102 public String getCardImageUrl() { 103 return cardImageUrl; 104 } 105 setCardImageUrl(String cardImageUrl)106 public void setCardImageUrl(String cardImageUrl) { 107 this.cardImageUrl = cardImageUrl; 108 } 109 getCategory()110 public String getCategory() { 111 return category; 112 } 113 setCategory(String category)114 public void setCategory(String category) { 115 this.category = category; 116 } 117 118 @Override toString()119 public String toString() { 120 return "Movie{" 121 + "id=" 122 + id 123 + ", programId='" 124 + programId 125 + '\'' 126 + ", watchNextId='" 127 + watchNextId 128 + '\'' 129 + ", title='" 130 + title 131 + '\'' 132 + ", videoUrl='" 133 + videoUrl 134 + '\'' 135 + ", backgroundImageUrl='" 136 + bgImageUrl 137 + '\'' 138 + ", cardImageUrl='" 139 + cardImageUrl 140 + '\'' 141 + '}'; 142 } 143 } 144