Author: julien(a)jboss.com
Date: 2007-12-26 08:44:52 -0500 (Wed, 26 Dec 2007)
New Revision: 9385
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java
Log:
- move parent/children load methods to more convenient place
Modified:
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java
===================================================================
---
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java 2007-12-26
13:40:26 UTC (rev 9384)
+++
branches/presentation/presentation/src/main/org/jboss/portal/presentation/impl/model/container/UIObjectContainer.java 2007-12-26
13:44:52 UTC (rev 9385)
@@ -145,35 +145,6 @@
}
}
- UIContainerObject getParent(StructuralObject structuralObject)
- {
- StructuralObject parentStructuralState =
structuralStateContext.loadParent(structuralObject);
-
- //
- if (parentStructuralState == null)
- {
- return null;
- }
-
- //
- return update(parentStructuralState);
- }
-
- List<UIContainerObject> getChildren(StructuralObject structuralObject)
- {
- ArrayList<UIContainerObject> children = new
ArrayList<UIContainerObject>();
-
- //
- for (StructuralObject structuralChild :
structuralStateContext.loadChildren(structuralObject))
- {
- UIContainerObject child = update(structuralChild);
- children.add(child);
- }
-
- //
- return children;
- }
-
/**
* Get an object from the universe. If the parameter
<code>loadIfAbsent</code> has the value <code>false</code>
* and the object is not in the universe it will throw an
<code>AssertionError</code> otherwise it will return
@@ -407,6 +378,20 @@
related = null;
loaded = false;
}
+
+ private UIContainerObject getParent(StructuralObject structuralObject)
+ {
+ StructuralObject parentStructuralState =
structuralStateContext.loadParent(structuralObject);
+
+ //
+ if (parentStructuralState == null)
+ {
+ return null;
+ }
+
+ //
+ return update(parentStructuralState);
+ }
}
public OneToMany createOneToMany(UIObjectContext context)
@@ -443,6 +428,21 @@
relateds = null;
}
+ private List<UIContainerObject> getChildren(StructuralObject
structuralObject)
+ {
+ ArrayList<UIContainerObject> children = new
ArrayList<UIContainerObject>();
+
+ //
+ for (StructuralObject structuralChild :
structuralStateContext.loadChildren(structuralObject))
+ {
+ UIContainerObject child = update(structuralChild);
+ children.add(child);
+ }
+
+ //
+ return children;
+ }
+
private class ProxyList extends AbstractList<UIContainerObject>
{
public UIContainerObject get(int i)
Show replies by date