package br.com.caelum.stella.usertype;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import org.hibernate.annotations.Type;
import br.com.caelum.stella.tinytype.CPF;
@Entity
public class PessoaFisica {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@Type(type = "br.com.caelum.stella.usertype.CpfUserType")
private CPF cpf;
public CPF getCpf() {
return cpf;
}
public void setCpf(CPF cpf) {
this.cpf = cpf;
}
}