Created
February 2, 2015 11:17
-
-
Save pabloDon/2cb85bf9932d468fe0e8 to your computer and use it in GitHub Desktop.
Ejemplo Hazelcast - Mensaje
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package es.pdonaire.mensajeria.pojo; | |
import java.io.Serializable; | |
import java.util.Date; | |
public class Mensaje implements Serializable{ | |
private static final long serialVersionUID = 1L; | |
private String from; | |
private String to; | |
private String asunto; | |
private String cuerpo; | |
private Date fecha; | |
public Mensaje(String from, String to, String asunto, String cuerpo) { | |
super(); | |
this.from = from; | |
this.to = to; | |
this.asunto = asunto; | |
this.cuerpo = cuerpo; | |
fecha = new Date(); | |
} | |
public String getFrom() { | |
return from; | |
} | |
public void setFrom(String from) { | |
this.from = from; | |
} | |
public String getTo() { | |
return to; | |
} | |
public void setTo(String to) { | |
this.to = to; | |
} | |
public String getAsunto() { | |
return asunto; | |
} | |
public void setAsunto(String asunto) { | |
this.asunto = asunto; | |
} | |
public String getCuerpo() { | |
return cuerpo; | |
} | |
public void setCuerpo(String cuerpo) { | |
this.cuerpo = cuerpo; | |
} | |
@Override | |
public String toString() { | |
StringBuilder str = new StringBuilder(); | |
str.append("ASUNTO: ").append(this.asunto).append("\n") | |
.append("DE: ").append(this.from).append("\n") | |
.append("A: ").append(this.to).append("\n") | |
.append("MENSAJE: ") | |
.append(this.cuerpo) | |
.append("\n") | |
.append("---- · ----"); | |
return str.toString(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment