X-Git-Url: http://wamblee.org/gitweb/?a=blobdiff_plain;f=mythtv%2Fmonitor%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fmythtv%2FRecordingPk.java;fp=mythtv%2Fmonitor%2Fsrc%2Fmain%2Fjava%2Forg%2Fwamblee%2Fmythtv%2FRecordingPk.java;h=0000000000000000000000000000000000000000;hb=67cf907f77812ff1ca7548395b68fe7156f2f1d5;hp=40ffd078796286a75db41eea6faa8cf6e7d290d8;hpb=0cd2d53496b3819d5f8cccb38400481e2faeda03;p=utils diff --git a/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingPk.java b/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingPk.java deleted file mode 100644 index 40ffd078..00000000 --- a/mythtv/monitor/src/main/java/org/wamblee/mythtv/RecordingPk.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright 2006 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.wamblee.mythtv; - -import java.io.Serializable; -import java.util.Date; - -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; - -/** - * - * - * @author Erik Brakkee - */ -@Embeddable -public class RecordingPk implements Serializable { - public Channel _channel; - public Date _starttime; - - public RecordingPk() { - // Empty - } - - /** - * @return the channel - */ - @ManyToOne - @JoinColumn(name="chanid") - public Channel getChannel() { - return _channel; - } - - /** - * @param aChannel the channel to set - */ - public void setChannel(Channel aChannel) { - _channel = aChannel; - } - - /** - * @return the starttime - */ - @Column(name="starttime") - @Temporal(TemporalType.TIMESTAMP) - public Date getStartTime() { - return _starttime; - } - - /** - * @param aStarttime the starttime to set - */ - public void setStartTime(Date aStarttime) { - _starttime = aStarttime; - } - - /* (non-Javadoc) - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object aObj) { - if ( aObj == null ) { - return false; - } - if ( !(aObj instanceof RecordingPk)) { - return false; - } - RecordingPk pk = (RecordingPk) aObj; - return _channel.equals(pk._channel) && _starttime.equals(pk._starttime); - } - - /* (non-Javadoc) - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - return _channel.hashCode() + _starttime.hashCode(); - } - - /* (non-Javadoc) - * @see java.lang.Object#toString() - */ - @Override - public String toString() { - return "pk(" + _channel + ", " + _starttime + ")"; - } -}