com.codeslap.apps.bean.Feedback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codeslap-api Show documentation
Show all versions of codeslap-api Show documentation
Java library to use the apps.codeslap.com API
package com.codeslap.apps.bean;
import org.simpleframework.xml.Default;
import org.simpleframework.xml.DefaultType;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;
/**
* Xml example:
*
* {@code
*
*
* cuerpazo
* [email protected]
* 4f022dfe8cfe351df4000003
* cristo
* thesubject
*
* }
*
*
* @author cristian
*/
@Root(name = "feedback")
@Default(DefaultType.FIELD)
public class Feedback {
@Element(name = "id")
private String id;
@Element(name = "name")
private String name;
@Element(name = "email")
private String email;
@Element(name = "subject")
private String subject;
@Element(name = "body")
private String body;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof Feedback)) return false;
Feedback feedback = (Feedback) o;
if (body != null ? !body.equals(feedback.body) : feedback.body != null) return false;
if (email != null ? !email.equals(feedback.email) : feedback.email != null) return false;
if (id != null ? !id.equals(feedback.id) : feedback.id != null) return false;
if (name != null ? !name.equals(feedback.name) : feedback.name != null) return false;
if (subject != null ? !subject.equals(feedback.subject) : feedback.subject != null) return false;
return true;
}
@Override
public int hashCode() {
int result = id != null ? id.hashCode() : 0;
result = 31 * result + (name != null ? name.hashCode() : 0);
result = 31 * result + (email != null ? email.hashCode() : 0);
result = 31 * result + (subject != null ? subject.hashCode() : 0);
result = 31 * result + (body != null ? body.hashCode() : 0);
return result;
}
@Override
public String toString() {
return "Feedback{" +
"id='" + id + '\'' +
", name='" + name + '\'' +
", email='" + email + '\'' +
", subject='" + subject + '\'' +
", body='" + body + '\'' +
'}';
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy