Type.java :  » Media » m2engine » com » integrationpath » mengine » model » Java Open Source

Java Open Source » Media » m2engine 
m2engine » com » integrationpath » mengine » model » Type.java
package com.integrationpath.mengine.model;

// Generated Apr 2, 2009 11:32:43 AM by Hibernate Tools 3.2.2.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Type generated by hbm2java
 * 
 * @author <a href="mailto:colaru@gmail.com">Cristian Olaru</a>
 */
@Entity
@Table(name = "type")
public class Type implements java.io.Serializable {

  private int id;
  private String name;
  private String urlmin;
  private String urlmax;
  private Set<Article> articles = new HashSet<Article>(0);

  public Type() {
  }

  public Type(int id) {
    this.id = id;
  }

  public Type(int id, String name, String urlmin, String urlmax,
      Set<Article> articles) {
    this.id = id;
    this.name = name;
    this.urlmin = urlmin;
    this.urlmax = urlmax;
    this.articles = articles;
  }

  @Id
  @Column(name = "id", unique = true, nullable = false)
  public int getId() {
    return this.id;
  }

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

  @Column(name = "name", length = 50)
  public String getName() {
    return this.name;
  }

  public void setName(String name) {
    this.name = name;
  }

  @Column(name = "urlmin", length = 200)
  public String getUrlmin() {
    return this.urlmin;
  }

  public void setUrlmin(String urlmin) {
    this.urlmin = urlmin;
  }

  @Column(name = "urlmax", length = 200)
  public String getUrlmax() {
    return this.urlmax;
  }

  public void setUrlmax(String urlmax) {
    this.urlmax = urlmax;
  }

  @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "type")
  public Set<Article> getArticles() {
    return this.articles;
  }

  public void setArticles(Set<Article> articles) {
    this.articles = articles;
  }

}
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.