Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package model;
- import java.io.Serializable;
- import java.util.Date;
- import java.util.List;
- import javax.persistence.Entity;
- import javax.persistence.Id;
- import javax.persistence.OneToMany;
- import javax.persistence.Temporal;
- import javax.persistence.TemporalType;
- /**
- *
- * @author Alex
- */
- @Entity
- public class Marca implements Serializable {
- @Id
- private Long CodMarca;
- private String NomeMarca;
- @Temporal(TemporalType.DATE)
- private Date dtfundacao;
- public Date getDtfundacao() {
- return dtfundacao;
- }
- @OneToMany(mappedBy = "marca")
- private List<Modelo> modelos;
- public List<Modelo> getModelos() {
- return modelos;
- }
- public void setDtfundacao(Date dtfundacao) {
- this.dtfundacao = dtfundacao;
- }
- public Long getCodMarca() {
- return CodMarca;
- }
- public void setCodMarca(Long CodMarca) {
- this.CodMarca = CodMarca;
- }
- public String getNomeMarca() {
- return NomeMarca;
- }
- public void setNomeMarca(String NomeMarca) {
- this.NomeMarca = NomeMarca;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement