diff --git a/src/main/java/com/avaje/ebean/bean/BeanCollection.java b/src/main/java/com/avaje/ebean/bean/BeanCollection.java
index 59470843e..aec02a5d3 100644
--- a/src/main/java/com/avaje/ebean/bean/BeanCollection.java
+++ b/src/main/java/com/avaje/ebean/bean/BeanCollection.java
@@ -1,11 +1,11 @@
package com.avaje.ebean.bean;
+import com.avaje.ebean.ExpressionList;
+
import java.io.Serializable;
import java.util.Collection;
import java.util.Set;
-import com.avaje.ebean.ExpressionList;
-
/**
* Lazy loading capable Maps, Lists and Sets.
*
@@ -23,11 +23,17 @@ import com.avaje.ebean.ExpressionList;
public interface BeanCollection extends Serializable {
enum ModifyListenMode {
- /** The common mode */
+ /**
+ * The common mode
+ */
NONE,
- /** Mode used for PrivateOwned */
+ /**
+ * Mode used for PrivateOwned
+ */
REMOVALS,
- /** Mode used for ManyToMany relationships */
+ /**
+ * Mode used for ManyToMany relationships
+ */
ALL
}
diff --git a/src/main/java/com/avaje/ebean/bean/CallStack.java b/src/main/java/com/avaje/ebean/bean/CallStack.java
index bc93b7206..54f625e83 100644
--- a/src/main/java/com/avaje/ebean/bean/CallStack.java
+++ b/src/main/java/com/avaje/ebean/bean/CallStack.java
@@ -95,7 +95,7 @@ public final class CallStack implements Serializable {
}
public String getOriginKey(int queryHash) {
- return enc(queryHash)+ "." + zeroHash + "." + pathHash;
+ return enc(queryHash) + "." + zeroHash + "." + pathHash;
}
private static final int radix = 1 << 6;
@@ -116,10 +116,10 @@ public final class CallStack implements Serializable {
}
private static final char intToBase64[] = {
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
- 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
- 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_'
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',
+ 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+ 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
+ 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
+ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '-', '_'
};
}
diff --git a/src/main/java/com/avaje/ebean/bean/EntityBean.java b/src/main/java/com/avaje/ebean/bean/EntityBean.java
index f4b0c12d1..4fd4f226a 100644
--- a/src/main/java/com/avaje/ebean/bean/EntityBean.java
+++ b/src/main/java/com/avaje/ebean/bean/EntityBean.java
@@ -15,9 +15,9 @@ import java.io.Serializable;
public interface EntityBean extends Serializable {
String[] _ebean_getPropertyNames();
-
+
String _ebean_getPropertyName(int pos);
-
+
/**
* Return the enhancement marker value.
*
diff --git a/src/main/java/com/avaje/ebean/bean/EntityBeanIntercept.java b/src/main/java/com/avaje/ebean/bean/EntityBeanIntercept.java
index 0025abfb1..2ff325daa 100644
--- a/src/main/java/com/avaje/ebean/bean/EntityBeanIntercept.java
+++ b/src/main/java/com/avaje/ebean/bean/EntityBeanIntercept.java
@@ -311,7 +311,7 @@ public final class EntityBeanIntercept implements Serializable {
if (idPos > -1) {
// For cases where properties are set on constructor
// set every non Id property to unloaded (for lazy loading)
- for (int i=0; i< loadedProps.length; i++) {
+ for (int i = 0; i < loadedProps.length; i++) {
if (i != idPos) {
loadedProps[i] = false;
}
@@ -486,7 +486,7 @@ public final class EntityBeanIntercept implements Serializable {
public void setPropertyLoaded(String propertyName, boolean loaded) {
int position = findProperty(propertyName);
if (position == -1) {
- throw new IllegalArgumentException("Property "+propertyName+" not found");
+ throw new IllegalArgumentException("Property " + propertyName + " not found");
}
loadedProps[position] = loaded;
}
@@ -526,7 +526,7 @@ public final class EntityBeanIntercept implements Serializable {
*/
public boolean isDirtyProperty(int propertyIndex) {
return (changedProps != null && changedProps[propertyIndex]
- || embeddedDirty != null && embeddedDirty[propertyIndex]);
+ || embeddedDirty != null && embeddedDirty[propertyIndex]);
}
/**
@@ -572,7 +572,7 @@ public final class EntityBeanIntercept implements Serializable {
changedProps = new boolean[owner._ebean_getPropertyNames().length];
}
- for (int i=0; i< loadedProps.length; i++) {
+ for (int i = 0; i < loadedProps.length; i++) {
if (loadedProps[i]) {
changedProps[i] = true;
}
@@ -588,7 +588,7 @@ public final class EntityBeanIntercept implements Serializable {
return null;
}
Set props = new LinkedHashSet<>();
- for (int i=0; i getDirtyValues() {
- Map dirtyValues = new LinkedHashMap<>();
+ public Map getDirtyValues() {
+ Map dirtyValues = new LinkedHashMap<>();
addDirtyPropertyValues(dirtyValues, null);
return dirtyValues;
}
@@ -674,7 +674,7 @@ public final class EntityBeanIntercept implements Serializable {
/**
* Recursively add dirty properties.
*/
- public void addDirtyPropertyValues(Map dirtyValues, String prefix) {
+ public void addDirtyPropertyValues(Map dirtyValues, String prefix) {
int len = getPropertyLength();
for (int i = 0; i < len; i++) {
if (changedProps != null && changedProps[i]) {
@@ -687,7 +687,7 @@ public final class EntityBeanIntercept implements Serializable {
} else if (embeddedDirty != null && embeddedDirty[i]) {
// an embedded property has been changed - recurse
- EntityBean embeddedBean = (EntityBean)owner._ebean_getField(i);
+ EntityBean embeddedBean = (EntityBean) owner._ebean_getField(i);
embeddedBean._ebean_getIntercept().addDirtyPropertyValues(dirtyValues, getProperty(i) + ".");
}
}
@@ -708,10 +708,10 @@ public final class EntityBeanIntercept implements Serializable {
for (int i = 0; i < len; i++) {
if (changedProps != null && changedProps[i]) {
// the property has been changed on this bean
- hash = hash * 31 + (i+1);
+ hash = hash * 31 + (i + 1);
} else if (embeddedDirty != null && embeddedDirty[i]) {
// an embedded property has been changed - recurse
- EntityBean embeddedBean = (EntityBean)owner._ebean_getField(i);
+ EntityBean embeddedBean = (EntityBean) owner._ebean_getField(i);
hash = hash * 31 + embeddedBean._ebean_getIntercept().addDirtyPropertyHash(hash);
}
}
@@ -726,7 +726,7 @@ public final class EntityBeanIntercept implements Serializable {
int len = getPropertyLength();
for (int i = 0; i < len; i++) {
if (isLoadedProperty(i)) {
- hash = hash * 31 + (i+1);
+ hash = hash * 31 + (i + 1);
}
}
return hash;
@@ -821,7 +821,7 @@ public final class EntityBeanIntercept implements Serializable {
/**
* Helper method to check if two objects are equal.
*/
- @SuppressWarnings({ "unchecked", "rawtypes" })
+ @SuppressWarnings({"unchecked", "rawtypes"})
protected boolean areEqual(Object obj1, Object obj2) {
if (obj1 == null) {
return (obj2 == null);
@@ -1044,7 +1044,7 @@ public final class EntityBeanIntercept implements Serializable {
} else {
return null;
}
- return (pcs == null) ? null : new PropertyChangeEvent(owner, getProperty(propertyIndex), oldValue, newValue);
+ return (pcs == null) ? null : new PropertyChangeEvent(owner, getProperty(propertyIndex), oldValue, newValue);
}
/**
@@ -1104,7 +1104,7 @@ public final class EntityBeanIntercept implements Serializable {
} else {
return null;
}
- return (pcs == null) ? null: new PropertyChangeEvent(owner, getProperty(propertyIndex), oldValue, newValue);
+ return (pcs == null) ? null : new PropertyChangeEvent(owner, getProperty(propertyIndex), oldValue, newValue);
}
/**
diff --git a/src/main/java/com/avaje/ebean/bean/ObjectGraphNode.java b/src/main/java/com/avaje/ebean/bean/ObjectGraphNode.java
index ef75d3c3c..54344e3ee 100644
--- a/src/main/java/com/avaje/ebean/bean/ObjectGraphNode.java
+++ b/src/main/java/com/avaje/ebean/bean/ObjectGraphNode.java
@@ -64,15 +64,15 @@ public final class ObjectGraphNode implements Serializable {
}
public String toString() {
- return "origin:" + originQueryPoint + " path[" + path+"]";
+ return "origin:" + originQueryPoint + " path[" + path + "]";
}
-
+
public int hashCode() {
int hc = 31 * originQueryPoint.hashCode();
hc = 31 * hc + (path == null ? 0 : path.hashCode());
return hc;
}
-
+
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -80,10 +80,10 @@ public final class ObjectGraphNode implements Serializable {
if (!(obj instanceof ObjectGraphNode)) {
return false;
}
-
+
ObjectGraphNode e = (ObjectGraphNode) obj;
//noinspection StringEquality
- return ((e.path == path) || (e.path != null && e.path.equals(path)))
- && e.originQueryPoint.equals(originQueryPoint);
+ return ((e.path == path) || (e.path != null && e.path.equals(path)))
+ && e.originQueryPoint.equals(originQueryPoint);
}
}
diff --git a/src/main/java/com/avaje/ebean/bean/ObjectGraphOrigin.java b/src/main/java/com/avaje/ebean/bean/ObjectGraphOrigin.java
index 1ed7710fb..2b6dd8882 100644
--- a/src/main/java/com/avaje/ebean/bean/ObjectGraphOrigin.java
+++ b/src/main/java/com/avaje/ebean/bean/ObjectGraphOrigin.java
@@ -58,7 +58,7 @@ public final class ObjectGraphOrigin implements Serializable {
}
public String toString() {
- return "key["+ key + "] type[" + beanType + "] " + callStack.getFirstStackTraceElement()+" ";
+ return "key[" + key + "] type[" + beanType + "] " + callStack.getFirstStackTraceElement() + " ";
}
public int hashCode() {
@@ -67,7 +67,7 @@ public final class ObjectGraphOrigin implements Serializable {
hc = 31 * hc + queryHash;
return hc;
}
-
+
public boolean equals(Object obj) {
if (obj == this) {
return true;
@@ -75,10 +75,10 @@ public final class ObjectGraphOrigin implements Serializable {
if (!(obj instanceof ObjectGraphOrigin)) {
return false;
}
-
+
ObjectGraphOrigin e = (ObjectGraphOrigin) obj;
- return e.queryHash == queryHash
- && e.beanType.equals(beanType)
- && e.callStack.equals(callStack);
+ return e.queryHash == queryHash
+ && e.beanType.equals(beanType)
+ && e.callStack.equals(callStack);
}
}
diff --git a/src/main/java/com/avaje/ebean/bean/package.html b/src/main/java/com/avaje/ebean/bean/package.html
index 6abde55f5..93554710f 100644
--- a/src/main/java/com/avaje/ebean/bean/package.html
+++ b/src/main/java/com/avaje/ebean/bean/package.html
@@ -1,12 +1,11 @@
-
- Enhanced beans API and Support objects
+
+ Enhanced beans API and Support objects
Enhanced beans API and Support objects
-
-
\ No newline at end of file
+