Skip to content

Instantly share code, notes, and snippets.

@luizkowalski
Created March 25, 2013 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luizkowalski/5238631 to your computer and use it in GitHub Desktop.
Save luizkowalski/5238631 to your computer and use it in GitHub Desktop.
Combustivel
package br.com.germantech.ecf.dominio.modelo.produto;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import br.com.germantech.ecf.dominio.modelo.localizacao.Estado;
@Embeddable
public class Combustivel implements Serializable {
private static final long serialVersionUID = -4711367336652495918L;
@Column(length=9)
@NotNull(message="Preencha o código ANP")
private String codigoAnp;
@Column(length=21)
private String codigoCodif;
@Column(precision=16, scale=4)
private BigDecimal quantidadeCombustivel;
@ManyToOne
@NotNull(message="Informe o estado de consumo")
private Estado estadoConsumo;
@ManyToOne
private Produto produto;
public String getCodigoAnp() {
return codigoAnp;
}
public void setCodigoAnp(String codigoAnp) {
this.codigoAnp = codigoAnp;
}
public String getCodigoCodif() {
return codigoCodif;
}
public void setCodigoCodif(String codigoCodif) {
this.codigoCodif = codigoCodif;
}
public BigDecimal getQuantidadeCombustivel() {
return quantidadeCombustivel;
}
public void setQuantidadeCombustivel(BigDecimal quantidadeCombustivel) {
this.quantidadeCombustivel = quantidadeCombustivel;
}
public Estado getEstadoConsumo() {
return estadoConsumo;
}
public void setEstadoConsumo(Estado estadoConsumo) {
this.estadoConsumo = estadoConsumo;
}
public Produto getProduto() {
return produto;
}
public void setProduto(Produto produto) {
this.produto = produto;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment