/*
* 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 下载量 40 浏览量
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 也可 [更多]
资源推荐
资源详情
资源评论
























收起资源包目录





































































































共 135 条
- 1
- 2
资源评论


uncleAndyChen
- 粉丝: 31
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- Kubernetes Ingress配置实战,附负载均衡场景详解.doc
- Spring Security整合JWT最全实战教程(附完整代码).doc
- Vue项目首屏加载优化,从10秒到2秒的全过程.doc
- 千万别复制我写的Dockerfile!除非你想被优化师骂.doc
- 搞懂这几个细节,JVM调优再也不是玄学.doc
- 深入理解JWT和Session的区别,这次终于讲明白了.doc
- Java秒杀系统架构解析:高并发、限流与防刷全解.doc
- 别再硬写SQL了!MyBatis真正优雅的使用姿势分享.doc
- 敏感词过滤设计与实现:内存+Trie树双模式优化方案.doc
- 这个中间件没人提,但我用它优化了接口QPS 5倍.doc
- 不用任何框架,我手撸了一个轻量级ORM,仅300行代码.doc
- IDEA插件推荐清单:这些工具让我开发效率翻倍.doc
- 线上服务频繁重启,最终是线程池配置出了锅.doc
- 用OpenTelemetry搭建可观测平台,性能瓶颈一目了然.doc
- 项目上线前必须检查的20个细节,我踩过的坑你别再踩.doc
- 架构优化记:单体到微服务迁移的第一步怎么走?.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
