(no commit message)
[utils] / wicket / joe / src / main / java / org / wamblee / wicket / model / DetachableEntity.java
index 11fe3abfd315ac5237f1a7d6d556e1185d0d89fa..5bde6cb6969bd2430ea0dea62490a1a8232853d8 100644 (file)
@@ -19,35 +19,38 @@ import org.apache.wicket.model.LoadableDetachableModel;
 import org.wamblee.persistence.Detachable;
 
 /**
- * A detachable model that wraps a domain object. 
- *
+ * A detachable model that wraps a domain object.
+ * 
  */
 public class DetachableEntity<T> extends LoadableDetachableModel<T> {
-       
-       private Detachable<T> object;
-       
-       /**
-        * Constructs the model. 
-        * @param aObject Object to construct the model with. 
-        */
-       public DetachableEntity(Detachable<T> aObject) { 
-           super(aObject.get());
+
+    private Detachable<T> object;
+
+    /**
+     * Constructs the model.
+     * 
+     * @param aObject
+     *            Object to construct the model with.
+     */
+    public DetachableEntity(Detachable<T> aObject) {
+        super(aObject.get());
         object = aObject;
-       }
-       
-       @Override
-       protected void onDetach() {
-           object.detach();
-       }
-       
-       @Override
-       protected T load() {
-           return object.get();
-       }
-       
-       @Override
-       public void setObject(T object) {
-           throw new UnsupportedOperationException("setObject is not supported on this class");
-       }
+    }
+
+    @Override
+    protected void onDetach() {
+        object.detach();
+    }
+
+    @Override
+    protected T load() {
+        return object.get();
+    }
+
+    @Override
+    public void setObject(T aObject) {
+        throw new UnsupportedOperationException(
+            "setObject is not supported on this class");
+    }
 
 }