package org.tnc.rbsf.jpa;

import java.io.Serializable;
import java.util.Date;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

@Entity
public class Project implements Serializable {
	@Id
	private String id;

	@Column(name="created_on")
	private Date createdOn;

	@Column(name="last_mod_on")
	private Date lastModOn;

	private String name;

	private String description;

	@ManyToOne
	private Basin basin;

	@ManyToOne
	private User user;

	@OneToMany(mappedBy="projectId")
	private Set<Report> reportCollection;

	@ManyToMany(mappedBy="projectCollection")
	private Set<Asset> assetCollection;

	private static final long serialVersionUID = 1L;

	public Project() {
		super();
	}

	public String getId() {
		return this.id;
	}

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

	public Date getCreatedOn() {
		return this.createdOn;
	}

	public void setCreatedOn(Date createdOn) {
		this.createdOn = createdOn;
	}

	public Date getLastModOn() {
		return this.lastModOn;
	}

	public void setLastModOn(Date lastModOn) {
		this.lastModOn = lastModOn;
	}

	public String getName() {
		return this.name;
	}

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

	public String getDescription() {
		return this.description;
	}

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

	public Basin getBasin() {
		return this.basin;
	}

	public void setBasin(Basin basin) {
		this.basin = basin;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Set<Report> getReportCollection() {
		return this.reportCollection;
	}

	public void setReportCollection(Set<Report> reportCollection) {
		this.reportCollection = reportCollection;
	}

	public Set<Asset> getAssetCollection() {
		return this.assetCollection;
	}

	public void setAssetCollection(Set<Asset> assetCollection) {
		this.assetCollection = assetCollection;
	}

}
