Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package entity;
- import java.io.Serializable;
- import javax.persistence.Column;
- import javax.persistence.Entity;
- import javax.persistence.GeneratedValue;
- import javax.persistence.GenerationType;
- import javax.persistence.Id;
- /**
- *
- * @author Vlad Petcu
- */
- @Entity
- public class Chart implements Serializable {
- private static final long serialVersionUID = 1L;
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- private Long id;
- @Column(name = "CHART_ID")
- private Long chartID;
- @Column (name = "ARTIST_ID")
- private Long artistID;
- @Column (name = "ALBUM_ID")
- private Long albumID;
- @Column (name = "POSITION")
- private Long position;
- public Chart(Long chartID, Long artistID, Long albumID, Long position)
- {
- this.chartID = chartID;
- this.artistID = artistID;
- this.albumID = albumID;
- this.position = position;
- }
- public Chart()
- {
- }
- public Long getChartID() {
- return chartID;
- }
- public void setChartID(Long chartID) {
- this.chartID = chartID;
- }
- public void setArtistID(Long artistID) {
- this.artistID = artistID;
- }
- public void setAlbumID(Long albumID) {
- this.albumID = albumID;
- }
- public void setPosition(Long position) {
- this.position = position;
- }
- public Long getArtistID() {
- return artistID;
- }
- public Long getAlbumID() {
- return albumID;
- }
- public Long getPosition() {
- return position;
- }
- public Long getId() {
- return id;
- }
- public void setId(Long id) {
- this.id = id;
- }
- @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 Chart)) {
- return false;
- }
- Chart other = (Chart) 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 "entity.Chart[ id=" + id + " ]";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement