blob: ad8f8f239a4ed288cc8701c01b77377aa0376857 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
/*******************************************************************************
* Copyright (c) 2008 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
*
* Contributors:
* Oracle - initial API and implementation
*******************************************************************************/
package org.eclipse.jpt.eclipselink.core.internal.context.customization;
import java.io.Serializable;
import org.eclipse.jpt.utility.internal.StringTools;
/**
* CustomizerProperties
*/
public class CustomizerProperties implements Cloneable, Serializable
{
private String entityName;
// ********** EclipseLink properties **********
private String className;
private static final long serialVersionUID = 1L;
// ********** constructors **********
public CustomizerProperties(String entityName) {
this.entityName = entityName;
}
// ********** behaviors **********
@Override
public boolean equals(Object o) {
if(o == null) {
return false;
}
CustomizerProperties customizer = (CustomizerProperties) o;
return (
(this.className == null ?
customizer.className == null : this.className.equals(customizer.className)));
}
@Override
public synchronized CustomizerProperties clone() {
try {
return (CustomizerProperties)super.clone();
}
catch (CloneNotSupportedException ex) {
throw new InternalError();
}
}
public boolean isEmpty() {
return this.className == null;
}
// ********** getter/setter **********
public String getEntityName() {
return this.entityName;
}
public String getClassName() {
return this.className;
}
public void setClassName(String newClassName) {
this.className = newClassName;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
StringTools.buildSimpleToStringOn(this, sb);
sb.append(" (");
this.toString(sb);
sb.append(')');
return sb.toString();
}
public void toString(StringBuilder sb) {
sb.append(" class: ");
sb.append(this.className);
sb.append(", entityName: ");
sb.append(this.entityName);
}
}
|