19 package org.turro.financials.entity;
21 import javax.persistence.Column;
22 import javax.persistence.Entity;
23 import javax.persistence.GeneratedValue;
24 import javax.persistence.GenerationType;
25 import javax.persistence.Id;
26 import javax.persistence.ManyToOne;
27 import org.turro.string.Strings;
28 import org.turro.jpa.entity.IDaoEntity;
38 @GeneratedValue(strategy=GenerationType.IDENTITY)
39 @Column(name=
"IDENTIFIER")
48 private String concept;
50 private double quantity, price;
65 this.contract = contract;
73 this.product = product;
81 this.concept = concept;
89 this.quantity = quantity;
109 return product ==
null && Strings.isBlank(concept);
115 return product !=
null ? product.getProductString() :
"";
119 return price != 0.0 ? price : (product !=
null ? product.getPrice() : 0.0);
void setConcept(String concept)
void setPrice(double price)
String getProductString()
void setProduct(Product product)
void setContract(Contract contract)
void setQuantity(double quantity)