From 45c6176cf072abe150e4d8fa9440232f09cc02c4 Mon Sep 17 00:00:00 2001 From: fabricio Date: Tue, 4 Oct 2016 17:29:32 -0300 Subject: [PATCH] nova classe contato --- src/br/com/model/entity/Contato.java | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+), 0 deletions(-) create mode 100644 src/br/com/model/entity/Contato.java diff --git a/src/br/com/model/entity/Contato.java b/src/br/com/model/entity/Contato.java new file mode 100644 index 0000000..7550391 --- /dev/null +++ b/src/br/com/model/entity/Contato.java @@ -0,0 +1,93 @@ +package br.com.model.entity; + +public class Contato { + + private String nome; + private String email; + private String assunto; + private String mensagem; + + public Contato() { + // TODO Auto-generated constructor stub + } + + public Contato(String nome, String email, String assunto, String mensagem) { + this.nome = nome; + this.email = email; + this.assunto = assunto; + this.mensagem = mensagem; + } + + + public String getNome() { + return nome; + } + public void setNome(String nome) { + this.nome = nome; + } + public String getEmail() { + return email; + } + public void setEmail(String email) { + this.email = email; + } + public String getAssunto() { + return assunto; + } + public void setAssunto(String assunto) { + this.assunto = assunto; + } + public String getMensagem() { + return mensagem; + } + public void setMensagem(String mensagem) { + this.mensagem = mensagem; + } + + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((assunto == null) ? 0 : assunto.hashCode()); + result = prime * result + ((email == null) ? 0 : email.hashCode()); + result = prime * result + + ((mensagem == null) ? 0 : mensagem.hashCode()); + result = prime * result + ((nome == null) ? 0 : nome.hashCode()); + return result; + } + + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Contato other = (Contato) obj; + if (assunto == null) { + if (other.assunto != null) + return false; + } else if (!assunto.equals(other.assunto)) + return false; + if (email == null) { + if (other.email != null) + return false; + } else if (!email.equals(other.email)) + return false; + if (mensagem == null) { + if (other.mensagem != null) + return false; + } else if (!mensagem.equals(other.mensagem)) + return false; + if (nome == null) { + if (other.nome != null) + return false; + } else if (!nome.equals(other.nome)) + return false; + return true; + } + +} -- libgit2 0.21.2