View Javadoc
1   /******************************************************************************
2    * Video_Actor.java - domain object
3    * $Id: Video_Actor.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_Actor.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:42:06  dick
13   * Map Actors 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 Actors to Videos.
23   * @author dick
24   * @since 2015-04-01
25   */
26  public class Video_Actor implements Serializable {
27  	private static final long serialVersionUID = 1L;
28  	int	videoId;
29  	int	actorId;
30  	
31  	
32  	/* (non-Javadoc)
33  	 * @see java.lang.Object#equals(java.lang.Object)
34  	 */
35  	@Override
36  	public boolean equals(Object obj) {
37  		return(videoId == ((Video_Actor)obj).videoId && actorId == ((Video_Actor)obj).actorId);
38  	}
39  
40  	/* (non-Javadoc)
41  	 * @see java.lang.Object#hashCode()
42  	 */
43  	@Override
44  	public int hashCode() {
45  		int result = HashCodeUtil.SEED;
46  		result = HashCodeUtil.hash(result, videoId);
47  		result = HashCodeUtil.hash(result, actorId);
48  		return(result);
49  	}
50  
51  	/**
52  	 * @return the videoId
53  	 */
54  	public int getVideoId() {
55  		return videoId;
56  	}
57  	/**
58  	 * @param videoId the videoId to set
59  	 */
60  	public void setVideoId(int videoId) {
61  		this.videoId = videoId;
62  	}
63  	/**
64  	 * @return the directorId
65  	 */
66  	public int getActorId() {
67  		return actorId;
68  	}
69  	/**
70  	 * @param actorId the actorId to set
71  	 */
72  	public void setActorId(int actorId) {
73  		this.actorId = actorId;
74  	}
75  
76  	
77  }