CCM NG: Some cleanup work
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@3431 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
3cccfdc215
commit
b082a7037b
|
|
@ -202,7 +202,7 @@ public class Component extends CcmObject implements Serializable {
|
|||
+ "attributeString = \"%s\", "
|
||||
+ "active = %b, "
|
||||
+ "parentComponent = %s, "
|
||||
+ "componentOrder, "
|
||||
+ "componentOrder = %d, "
|
||||
+ "selected = %b%s",
|
||||
adminName,
|
||||
Objects.toString(description),
|
||||
|
|
|
|||
|
|
@ -81,13 +81,13 @@ public class ConfirmEmailListener
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!Objects.equals(this.fromEmail, other.fromEmail)) {
|
||||
if (!Objects.equals(this.fromEmail, other.getFromEmail())) {
|
||||
return false;
|
||||
}
|
||||
if (!Objects.equals(this.subject, other.subject)) {
|
||||
if (!Objects.equals(this.subject, other.getSubject())) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(this.body, other.body);
|
||||
return Objects.equals(this.body, other.getBody());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -98,7 +98,7 @@ public class ConfirmEmailListener
|
|||
@Override
|
||||
public String toString(final String data) {
|
||||
return super.toString(String.format(", fromEmail = \"%s\","
|
||||
+ "subject = \"%s\", ",
|
||||
+ "subject = \"%s\"%s",
|
||||
fromEmail,
|
||||
subject,
|
||||
data));
|
||||
|
|
|
|||
|
|
@ -6,12 +6,15 @@
|
|||
package org.libreccm.formbuilder.actions;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
import org.hibernate.annotations.CollectionId;
|
||||
|
||||
import org.libreccm.formbuilder.ProcessListener;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
|
|
@ -19,8 +22,10 @@ import org.libreccm.formbuilder.ProcessListener;
|
|||
@Entity
|
||||
@Table(name = "formbuilder_simple_email_listeners")
|
||||
public class SimpleEmailListener
|
||||
extends ProcessListener
|
||||
implements Serializable {
|
||||
extends ProcessListener
|
||||
implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -5004346250775992079L;
|
||||
|
||||
@Column(name = "recipient")
|
||||
private String recipient;
|
||||
|
|
@ -44,6 +49,45 @@ public class SimpleEmailListener
|
|||
this.subject = subject;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = super.hashCode();
|
||||
hash = 67 * hash + Objects.hashCode(recipient);
|
||||
hash = 67 * hash + Objects.hashCode(subject);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (!super.equals(obj)) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
final SimpleEmailListener other = (SimpleEmailListener) obj;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!Objects.equals(recipient, other.getRecipient())) {
|
||||
return false;
|
||||
}
|
||||
return Objects.equals(subject, other.getSubject());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEqual(final Object obj) {
|
||||
return obj instanceof SimpleEmailListener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(final String data) {
|
||||
return super.toString(String.format(", recipient = \"%s\", "
|
||||
+ "subject = \"%s\"%s",
|
||||
recipient,
|
||||
subject,
|
||||
data));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
/*
|
||||
* 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 org.libreccm.formbuilder.actions;
|
||||
|
||||
import java.io.Serializable;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
import org.libreccm.formbuilder.ProcessListener;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "formbuilder_xml_listeners")
|
||||
public class XmlListener extends ProcessListener implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8674849210363260180L;
|
||||
|
||||
@Override
|
||||
public boolean canEqual(final Object obj) {
|
||||
return obj instanceof XmlListener;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -110,6 +110,7 @@ public class Host implements Serializable {
|
|||
+ "serverName = \"%s\", "
|
||||
+ "serverPort =\"%s\""
|
||||
+ " }",
|
||||
super.toString(),
|
||||
hostId,
|
||||
serverName,
|
||||
serverPort);
|
||||
|
|
|
|||
|
|
@ -29,4 +29,10 @@ public class EntitiesTestCore {
|
|||
.withRedefinedSuperclass()
|
||||
.verify();
|
||||
}
|
||||
//
|
||||
// @Test
|
||||
// public void verifyToString() {
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue