/**
* Revenue Settlement and Sharing System GE
* Copyright (C) 2011-2014, Javier Lucio - lucio@tid.es
* Telefonica Investigacion y Desarrollo, S.A.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package es.upm.fiware.rss.model;
// Generated 20-feb-2012 9:51:24 by Hibernate Tools 3.4.0.CR1
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
/**
* BmServiceDeployment generated by hbm2java.
*/
@Entity
@Table(name = "bm_service_deployment",
uniqueConstraints = @UniqueConstraint(
columnNames = {
"NU_SERVICE_ID", "NU_OB_ID", "NU_COUNTRY_ID"
}))
@Cacheable
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public class BmServiceDeployment implements java.io.Serializable {
private long nuDeploymentId;
private BmService bmService;
private BmObCountry bmObCountry;
private Date dtDeploymentDate;
private String tcStatus;
private Set<BmServdeployMop> bmServdeployMops = new HashSet<BmServdeployMop>(0);
/**
* Constructor.
*/
public BmServiceDeployment() {
}
/**
* Constructor.
*
* @param nuDeploymentId
* @param bmService
* @param bmObCountry
* @param tcStatus
*/
public BmServiceDeployment(long nuDeploymentId, BmService bmService, BmObCountry bmObCountry, String tcStatus) {
this.nuDeploymentId = nuDeploymentId;
this.bmService = bmService;
this.bmObCountry = bmObCountry;
this.tcStatus = tcStatus;
}
/**
* Constructor.
*
* @param nuDeploymentId
* @param bmService
* @param bmObCountry
* @param dtDeploymentDate
* @param tcStatus
* @param bmServdeployMops
*/
public BmServiceDeployment(long nuDeploymentId, BmService bmService, BmObCountry bmObCountry,
Date dtDeploymentDate, String tcStatus, Set<BmServdeployMop> bmServdeployMops) {
this.nuDeploymentId = nuDeploymentId;
this.bmService = bmService;
this.bmObCountry = bmObCountry;
this.dtDeploymentDate = dtDeploymentDate;
this.tcStatus = tcStatus;
this.bmServdeployMops = bmServdeployMops;
}
@Id
@Column(name = "NU_DEPLOYMENT_ID", unique = true, nullable = false, precision = 22, scale = 0)
public long getNuDeploymentId() {
return this.nuDeploymentId;
}
public void setNuDeploymentId(long nuDeploymentId) {
this.nuDeploymentId = nuDeploymentId;
}
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "NU_SERVICE_ID", nullable = false)
public BmService getBmService() {
return this.bmService;
}
public void setBmService(BmService bmService) {
this.bmService = bmService;
}
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumns({
@JoinColumn(name = "NU_OB_ID", referencedColumnName = "NU_OB_ID", nullable = false),
@JoinColumn(name = "NU_COUNTRY_ID", referencedColumnName = "NU_COUNTRY_ID", nullable = false)
})
public BmObCountry getBmObCountry() {
return this.bmObCountry;
}
public void setBmObCountry(BmObCountry bmObCountry) {
this.bmObCountry = bmObCountry;
}
@Temporal(TemporalType.DATE)
@Column(name = "DT_DEPLOYMENT_DATE", length = 7)
public Date getDtDeploymentDate() {
return this.dtDeploymentDate;
}
public void setDtDeploymentDate(Date dtDeploymentDate) {
this.dtDeploymentDate = dtDeploymentDate;
}
@Column(name = "TC_STATUS", nullable = false, length = 1)
public String getTcStatus() {
return this.tcStatus;
}
public void setTcStatus(String tcStatus) {
this.tcStatus = tcStatus;
}
@OneToMany(fetch = FetchType.LAZY, mappedBy = "bmServiceDeployment")
public Set<BmServdeployMop> getBmServdeployMops() {
return this.bmServdeployMops;
}
public void setBmServdeployMops(Set<BmServdeployMop> bmServdeployMops) {
this.bmServdeployMops = bmServdeployMops;
}
}