18 package org.turro.erp.entity;
20 import java.util.HashSet;
22 import javax.persistence.*;
23 import org.turro.financials.db.FinancialsPU;
24 import org.turro.financials.entity.Contract;
31 public class Resource implements java.io.Serializable {
34 @GeneratedValue(strategy=GenerationType.IDENTITY)
35 @Column(name=
"IDENTIFIER")
38 @Column(name=
"RESOURCE_NAME", unique =
true, nullable =
false)
41 private long idContract;
43 private double costHour, priceHour, marketPrice;
45 private boolean active;
47 @ManyToMany(fetch = FetchType.EAGER)
48 private Set<AptitudeDegree> aptitudeDegrees =
new HashSet<AptitudeDegree>();
63 this.costHour = costHour;
79 this.idContract = idContract;
87 this.marketPrice = marketPrice;
99 return aptitudeDegrees;
103 this.aptitudeDegrees = aptitudeDegrees;
111 this.priceHour = priceHour;
121 idContract = contract !=
null ? contract.
getId() : 0L;
127 name = (s ==
null || name.endsWith(s)) ? name : name +
" - " + s;
131 return idContract == 0;
void setName(String name)
void setContract(Contract contract)
void setMarketPrice(double marketPrice)
void setActive(boolean active)
void setCostHour(double costHour)
void setIdContract(long idContract)
Set< AptitudeDegree > getAptitudeDegrees()
void setPriceHour(double priceHour)
void setAptitudeDegrees(Set< AptitudeDegree > aptitudeDegrees)
IContact getIContractor()