/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package org.javaee7.movieplex7.entities;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;
/**
* @author ArunGupta
*/
@Entity
@Table(name = "SHOW_TIMING")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "ShowTiming.findAll", query = "SELECT s FROM ShowTiming s"),
@NamedQuery(name = "ShowTiming.findById", query = "SELECT s FROM ShowTiming s WHERE s.id = :id"),
@NamedQuery(name = "ShowTiming.findByMovieAndTimingId", query = "SELECT s FROM ShowTiming s WHERE s.movieId.id = :movieId AND s.timingId.id = :timingId"),
@NamedQuery(name = "ShowTiming.findByDay", query = "SELECT s FROM ShowTiming s WHERE s.day = :day")})
public class ShowTiming implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@NotNull
private Integer id;
@NotNull
private int day;
@JoinColumn(name = "TIMING_ID", referencedColumnName = "ID")
@ManyToOne(optional = false)
private Timeslot timingId;
@JoinColumn(name = "THEATER_ID", referencedColumnName = "ID")
@ManyToOne(optional = false)
private Theater theaterId;
@JoinColumn(name = "MOVIE_ID", referencedColumnName = "ID")
@ManyToOne(optional = false)
private Movie movieId;
public ShowTiming() {
}
public ShowTiming(Integer id) {
this.id = id;
}
public ShowTiming(Integer id, int day) {
this.id = id;
this.day = day;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public int getDay() {
return day;
}
public void setDay(int day) {
this.day = day;
}
public Timeslot getTimingId() {
return timingId;
}
public void setTimingId(Timeslot timingId) {
this.timingId = timingId;
}
public Theater getTheaterId() {
return theaterId;
}
public void setTheaterId(Theater theaterId) {
this.theaterId = theaterId;
}
public Movie getMovieId() {
return movieId;
}
public void setMovieId(Movie movieId) {
this.movieId = movieId;
}
@Override
public int hashCode() {
int hash = 0;
hash += (id != null ? id.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof ShowTiming)) {
return false;
}
ShowTiming other = (ShowTiming) object;
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
return false;
}
return true;
}
@Override
public String toString() {
return movieId.getName() + ", " + timingId.getStartTime();
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
Java EE 7 Hands-on Lab,MySQL版
共135个文件
class:50个
java:24个
xhtml:24个
需积分: 9 9 下载量 66 浏览量
2015-02-06
17:04:19
上传
评论
收藏 233KB ZIP 举报
温馨提示
Java EE 7官司方例子 也是《Java EE 7 Essentials》(中文翻译《Java EE 7精粹》 2015年2月刚上市)最后一章的讲解例子 最新版 学习Java EE 7新手必看 很有帮助 本人运行环境: NetBeans8 0 2+GlassFish4 1 或者WildFly 8 0 2 +MySQL5 6 23 也可以稳步到这里一坐:http: tryrefine iteye com blog 2184106">Java EE 7官司方例子 也是《Java EE 7 Essentials》(中文翻译《Java EE 7精粹》 2015年2月刚上市)最后一章的讲解例子 最新版 学习Java EE 7新手必看 很有帮助 本人运行环境: NetBeans8 0 2+GlassFish4 1 或者WildFly 8 0 2 +MySQL5 6 23 也可 [更多]
资源推荐
资源详情
资源评论
收起资源包目录
Java EE 7 Hands-on Lab,MySQL版 (135个子文件)
MovieWriter.class 4KB
MovieWriter.class 4KB
MovieReader.class 4KB
MovieReader.class 4KB
ShowTiming.class 4KB
ShowTiming.class 4KB
MovieClientBean.class 4KB
MovieClientBean.class 4KB
Timeslot.class 3KB
Timeslot.class 3KB
Movie.class 3KB
Movie.class 3KB
AbstractFacade.class 3KB
AbstractFacade.class 3KB
Theater.class 3KB
Theater.class 3KB
Booking.class 3KB
Booking.class 3KB
ShowTimingFacadeREST.class 3KB
ShowTimingFacadeREST.class 3KB
TimeslotFacadeREST.class 3KB
TimeslotFacadeREST.class 3KB
ReceivePointsBean.class 3KB
ReceivePointsBean.class 3KB
TheaterFacadeREST.class 3KB
TheaterFacadeREST.class 3KB
SalesFacadeREST.class 3KB
MovieFacadeREST.class 3KB
MovieFacadeREST.class 3KB
SalesFacadeREST.class 3KB
Sales.class 2KB
Sales.class 2KB
SalesReader.class 2KB
SalesReader.class 2KB
SalesBean.class 2KB
SalesBean.class 2KB
ChatServer.class 2KB
ChatServer.class 2KB
SendPointsBean.class 2KB
SendPointsBean.class 2KB
SalesWriter.class 2KB
SalesWriter.class 2KB
ApplicationConfig.class 1KB
ApplicationConfig.class 1KB
SalesProcessor.class 1KB
SalesProcessor.class 1KB
MovieBackingBean.class 1KB
MovieBackingBean.class 1KB
MovieReader$1.class 800B
MovieReader$1.class 800B
cssLayout.css 940B
cssLayout.css 940B
default.css 651B
default.css 651B
sales.csv 194B
sales.csv 194B
sales.csv 194B
ShowTiming.java 5KB
Timeslot.java 5KB
MovieClientBean.java 5KB
Movie.java 5KB
Theater.java 4KB
Sales.java 4KB
MovieReader.java 4KB
ShowTimingFacadeREST.java 4KB
SalesFacadeREST.java 4KB
TimeslotFacadeREST.java 4KB
TheaterFacadeREST.java 4KB
MovieFacadeREST.java 4KB
AbstractFacade.java 4KB
MovieWriter.java 4KB
ReceivePointsBean.java 4KB
ApplicationConfig.java 3KB
SalesReader.java 3KB
SendPointsBean.java 3KB
SalesBean.java 3KB
ChatServer.java 3KB
MovieBackingBean.java 3KB
SalesWriter.java 3KB
SalesProcessor.java 3KB
Booking.java 2KB
websocket.js 3KB
websocket.js 3KB
.netbeans_automatic_build 0B
.netbeans_automatic_build 0B
pom.properties 112B
load.sql 8KB
load.sql 8KB
load.sql 8KB
create.sql 1KB
create.sql 1KB
create.sql 1KB
drop.sql 179B
drop.sql 179B
drop.sql 179B
movieplex7-V4.0.war 62KB
chatroom.xhtml 4KB
chatroom.xhtml 4KB
confirm.xhtml 4KB
confirm.xhtml 4KB
共 135 条
- 1
- 2
资源评论
uncleAndyChen
- 粉丝: 30
- 资源: 34
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功