Dvd.java :  » Web-Framework » vraptor » org » vraptor » spring » model » Java Open Source

Java Open Source » Web Framework » vraptor 
vraptor » org » vraptor » spring » model » Dvd.java
package org.vraptor.spring.model;

import java.util.Set;

public class Dvd {

  private Long id;

  private String title;

  private String description;

  private Set<User> users;

  private DvdType type;

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  public DvdType getType() {
    return type;
  }

  public void setType(DvdType type) {
    this.type = type;
  }

  /**
   * @return the users
   */
  public Set<User> getUsers() {
    return users;
  }

  /**
   * @param users
   *            the users to set
   */
  public void setUsers(Set<User> users) {
    this.users = users;
  }

  @Override
  public boolean equals(Object obj) {
    return obj instanceof Dvd
    && getId().equals(((Dvd) obj).getId());
  }

  @Override
  public int hashCode() {
    if (this.id == null) {
      return 0;
    }
    return this.id.hashCode() * 31;
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.