|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectPropertyImpl
AttributeImpl
ComplexAttributeImpl
public class ComplexAttributeImpl
Field Summary |
---|
Fields inherited from class AttributeImpl |
---|
id |
Fields inherited from class PropertyImpl |
---|
descriptor, userData, value |
Constructor Summary | |
---|---|
ComplexAttributeImpl(Collection<Property> properties,
AttributeDescriptor descriptor,
Identifier id)
|
|
ComplexAttributeImpl(Collection<Property> properties,
ComplexType type,
Identifier id)
|
Method Summary | |
---|---|
Collection<Property> |
getProperties()
Complete collection of properties. |
Collection<Property> |
getProperties(Name name)
Returns a subset of the properties of the complex attribute which match the specified name. |
Collection<Property> |
getProperties(String name)
Returns a subset of the properties of the complex attribute which match the specified name. |
Property |
getProperty(Name name)
Returns single property of the complex attribute which matches the specified name. |
Property |
getProperty(String name)
Returns single property of the complex attribute which matches the specified name. |
ComplexType |
getType()
The type of the property. |
Collection<? extends Property> |
getValue()
The value or content of the property. |
protected Collection |
properties()
Internal helper method for getting at the properties without wrapping in unmodifiable collection. |
void |
setValue(Collection<Property> newValue)
Sets the contained properties of the complex attribute. |
void |
setValue(Object newValue)
Override of setValue to convert the newValue to specified type if need be. |
Methods inherited from class AttributeImpl |
---|
equals, getDescriptor, getIdentifier, hashCode, parse, toString, validate |
Methods inherited from class PropertyImpl |
---|
getName, getUserData, isNillable |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ComplexAttribute |
---|
validate |
Methods inherited from interface Attribute |
---|
getDescriptor, getIdentifier |
Methods inherited from interface Property |
---|
getName, getUserData, isNillable |
Constructor Detail |
---|
public ComplexAttributeImpl(Collection<Property> properties, AttributeDescriptor descriptor, Identifier id)
public ComplexAttributeImpl(Collection<Property> properties, ComplexType type, Identifier id)
Method Detail |
---|
public ComplexType getType()
Property
The type contains information about the value or content of the property such as its java class.
This value is also available via getDescriptor().getType()
.
getType
in interface Attribute
getType
in interface ComplexAttribute
getType
in interface Property
getType
in class AttributeImpl
Property.getType()
public Collection<? extends Property> getValue()
Property
The class of this object is defined by
getType().getBinding()
.
This value may be null
. In this case
getDescriptor().isNillable()
would be true
.
getValue
in interface ComplexAttribute
getValue
in interface Property
getValue
in class PropertyImpl
public Collection<Property> getProperties()
ComplexAttribute
This method is a convenience method for calling (Collection
getProperties
in interface ComplexAttribute
protected Collection properties()
public Collection<Property> getProperties(Name name)
ComplexAttribute
The name parameter is matched against each contained
Property.getName()
, those that are equal are returned.
getProperties
in interface ComplexAttribute
name
- The name of the properties to return.
public Collection<Property> getProperties(String name)
ComplexAttribute
This method is a convenience for ComplexAttribute.getProperties(Name)
in which
Name.getNamespaceURI()
is null
.
Note: Special care should be taken when using this method in the case
that two properties with the same local name but different namespace uri
exist. For this reason using ComplexAttribute.getProperties(Name)
is safer.
getProperties
in interface ComplexAttribute
name
- The local name of the properties to return.
ComplexAttribute.getProperties(Name)
public Property getProperty(Name name)
ComplexAttribute
Note: This method is a convenience and care should be taken when calling
it if more then a single property matches name. In such a
case the first encountered property in which Property.getName()
is equal to name is returned, and no order is guaranteed.
This method is a safe convenience for:
getProperties(name).iterator().next()
.
In the event that no property matches the specified name
null
is returned.
getProperty
in interface ComplexAttribute
name
- The name of the property to return.
null
.public Property getProperty(String name)
ComplexAttribute
This method is a convenience for ComplexAttribute.getProperty(Name)
in which
Name.getNamespaceURI()
is null
.
Note: This method is a convenience and care should be taken when calling
it if more then a single property matches name. In such a
case the first encountered property in which Property.getName()
is matches name is returned, and no order is guaranteed.
Note: Special care should be taken when using this method in the case
that two properties with the same local name but different namespace uri
exist. For this reason using ComplexAttribute.getProperties(Name)
is safer.
getProperty
in interface ComplexAttribute
name
- The local name of the property to return.
null
.public void setValue(Object newValue) throws IllegalArgumentException, IllegalStateException
AttributeImpl
setValue
in interface Property
setValue
in class AttributeImpl
newValue
- The new value of the property.
IllegalArgumentException
IllegalStateException
public void setValue(Collection<Property> newValue)
ComplexAttribute
The values should match the structure defined by
getDescriptor()
.
setValue
in interface ComplexAttribute
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |