2 * Copyright 2006 the original author or authors.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.wamblee.mythtv;
19 import java.io.Serializable;
20 import java.util.Date;
25 public class Recording implements Serializable {
27 private Channel _channel;
28 private Date _starttime;
31 private String _basename;
33 private Date _progstart;
35 private String _title;
37 private String _subtitle;
39 private long _filesize;
41 protected Recording() {
48 public Channel getChannel() {
53 * @return the basename
55 public String getBasename() {
60 * @return the progstart
62 public Date getStartTime() {
67 * @return the progstart
69 public Date getProgstart() {
76 public String getTitle() {
81 * @return the subtitle
83 public String getSubtitle() {
88 * @return the filesize
90 public long getFilesize() {
94 public void setFilesize(long aFilesize) {
95 _filesize = aFilesize;
99 * @see java.lang.Object#toString()
102 public String toString() {
103 return "Recording(" + _channel + "," + _basename + "," + _progstart + "," + _title + "," + _subtitle + ")";
107 * @see java.lang.Object#equals(java.lang.Object)
110 public boolean equals(Object aObj) {
111 if ( !(aObj instanceof Recording)) {
114 Recording recording = (Recording)aObj;
115 return _channel.equals(recording._channel) && _starttime.equals(recording._starttime);
119 * @see java.lang.Object#hashCode()
122 public int hashCode() {
123 return _channel.hashCode()*10 + ((int)_starttime.getTime() %10);