|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.core.domain.configuration.Property
org.rhq.core.domain.configuration.PropertyList
public class PropertyList
Holds an indexed list of child properties. This can hold any number of properties, including
additional lists and maps of properties (which means you can have N-levels of hierarchical data).
This list will store the properties in the order they are added.
Caution must be used when accessing this object. This class is not thread safe and, for entity persistence, the
child properties must have their Property.getParentList() field set. This is done for you when using the
add(Property) method.
| Field Summary |
|---|
| Fields inherited from class org.rhq.core.domain.configuration.Property |
|---|
QUERY_DELETE_BY_PROPERTY_IDS |
| Constructor Summary | |
|---|---|
|
PropertyList()
|
protected |
PropertyList(PropertyList original,
boolean keepId)
|
|
PropertyList(String name)
Creates a new, empty PropertyList object that is associated with the given name. |
|
PropertyList(String name,
Property... startingList)
Creates a new PropertyList object that is associated with the given name and has the given properties as
its initial list of child properties. |
| Method Summary | |
|---|---|
void |
add(Property property)
Adds a child property to the end of this list. |
void |
afterUnmarshal(Object u,
Object parent)
This listener runs after jaxb unmarshalling and reconnects children properties to their parent list (as we don't send them avoiding cyclic references). |
protected void |
appendToStringInternals(StringBuilder str)
Subclasses can override this to add things it wants to see in the toString. |
PropertyList |
deepCopy(boolean keepId)
|
boolean |
equals(Object obj)
NOTE: An PropertyList containing a null list is considered equal to a PropertyList containing an empty list. |
List<Property> |
getList()
Returns the children of this list. |
int |
hashCode()
|
void |
setList(List<Property> list)
Sets the list of child properties directly to the given list reference. |
| Methods inherited from class org.rhq.core.domain.configuration.Property |
|---|
compareTo, getConfiguration, getErrorMessage, getId, getName, getParentList, getParentMap, setConfiguration, setErrorMessage, setId, setName, setParentList, setParentMap, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyList()
public PropertyList(@NotNull
String name)
PropertyList object that is associated with the given name.
name - the name of the list itself
protected PropertyList(PropertyList original,
boolean keepId)
public PropertyList(@NotNull
String name,
@NotNull
Property... startingList)
PropertyList object that is associated with the given name and has the given properties as
its initial list of child properties. All properties found in startingList will have their
parent list set to this newly constructed list.
name - the name of the list itselfstartingList - a list of properties to be immediately added to this list| Method Detail |
|---|
@NotNull public List<Property> getList()
Warning: Caution should be used when accessing the returned list. Please see
the javadoc for this class for more information.
public void setList(List<Property> list)
list reference. This means the actual
list object is stored internally in this object. Changes made to list will be reflected back
into this object.
Warning: Caution should be used when setting this object's internal list. Please see
the javadoc for this class for more information.
list - the new list used internally by this object
public void add(@NotNull
Property property)
parent list for the child property to make persistence work.
property - the property to add to this listpublic boolean equals(Object obj)
equals in class Propertypublic int hashCode()
hashCode in class Propertypublic PropertyList deepCopy(boolean keepId)
deepCopy in interface DeepCopyable<Property>deepCopy in class Propertyprotected void appendToStringInternals(StringBuilder str)
Property
appendToStringInternals in class Propertystr - the builder to append strings to
public void afterUnmarshal(Object u,
Object parent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||