View Javadoc
1   /******************************************************************************
2    * Video_Director.java - domain object
3    * $Id: Video_Director.java,v 1.2 2015/04/12 21:18:44 dick Exp $
4    * 
5    * BuckoVidLib - The BuckoSoft Video Library
6    * Copyright(c) 2015 - Dick Balaska
7    * 
8    * $Log: Video_Director.java,v $
9    * Revision 1.2  2015/04/12 21:18:44  dick
10   * Need to override hashcode and equals for hibernate composites.
11   *
12   * Revision 1.1  2015/04/02 23:41:54  dick
13   * Map Directors to Videos.
14   *
15   */
16  package com.buckosoft.BuckoVidLib.domain;
17  
18  import java.io.Serializable;
19  
20  import com.buckosoft.BuckoVidLib.util.HashCodeUtil;
21  
22  /** Map Directors to Videos.
23   * @author dick
24   * @since 2015-04-01
25   */
26  public class Video_Director implements Serializable {
27  	private static final long serialVersionUID = 1L;
28  	int	videoId;
29  	int	directorId;
30  
31  	/* (non-Javadoc)
32  	 * @see java.lang.Object#equals(java.lang.Object)
33  	 */
34  	@Override
35  	public boolean equals(Object obj) {
36  		return(videoId == ((Video_Director)obj).videoId && directorId == ((Video_Director)obj).directorId);
37  	}
38  
39  	/* (non-Javadoc)
40  	 * @see java.lang.Object#hashCode()
41  	 */
42  	@Override
43  	public int hashCode() {
44  		int result = HashCodeUtil.SEED;
45  		result = HashCodeUtil.hash(result, videoId);
46  		result = HashCodeUtil.hash(result, directorId);
47  		return(result);
48  	}
49  	
50  	/**
51  	 * @return the videoId
52  	 */
53  	public int getVideoId() {
54  		return videoId;
55  	}
56  	/**
57  	 * @param videoId the videoId to set
58  	 */
59  	public void setVideoId(int videoId) {
60  		this.videoId = videoId;
61  	}
62  	/**
63  	 * @return the directorId
64  	 */
65  	public int getDirectorId() {
66  		return directorId;
67  	}
68  	/**
69  	 * @param directorId the directorId to set
70  	 */
71  	public void setDirectorId(int directorId) {
72  		this.directorId = directorId;
73  	}
74  
75  	
76  }