|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metamatrix.common.object.PropertiedObjectEditorImpl
com.metamatrix.common.object.PropertiedObjectsEditorImpl
public class PropertiedObjectsEditorImpl
Field Summary |
---|
Fields inherited from interface com.metamatrix.common.object.PropertiedObjectsEditor |
---|
DIFFERENT_VALUES |
Fields inherited from interface com.metamatrix.common.object.PropertiedObjectEditor |
---|
NO_VALUE |
Fields inherited from interface com.metamatrix.common.object.PropertyAccessPolicy |
---|
DEFAULT_READ_ONLY_PRIVILEGE |
Constructor Summary | |
---|---|
PropertiedObjectsEditorImpl()
|
|
PropertiedObjectsEditorImpl(PropertyAccessPolicy policy)
|
|
PropertiedObjectsEditorImpl(PropertyAccessPolicy policy,
UserTransactionFactory txnFactory)
|
|
PropertiedObjectsEditorImpl(UserTransactionFactory txnFactory)
|
Method Summary | |
---|---|
java.util.List |
getObjects()
Return the ordered list of PropertiedObject instances that this editor is set to use. |
java.util.List |
getSharedPropertyDefinitions()
Obtain the list of PropertyDefinitions that are defined by all of the propertied objects this editor is set to use. |
java.lang.Object |
getValue(int index,
PropertyDefinition def)
Obtain from the PropertiedObject at the specified index the property value that corresponds to the specified PropertyDefinition. |
java.lang.Object |
getValue(PropertyDefinition def)
Determine whether all of PropertiedObjects this editor is using have the same value for the specified PropertyDefinition. |
java.util.List |
getValues(PropertyDefinition def)
Return the ordered list of property values for the specified property definition, ordered by the list of PropertiedObjects that this editor is currently set to use. |
boolean |
hasObjects()
Return whether this editor currently is set to use any PropertiedObjects. |
boolean |
isValidValue(int index,
PropertyDefinition def,
java.lang.Object value)
Return whether the specified value is considered valid. |
void |
setObjects(java.util.List objs)
Set the ordered list of PropertiedObject instances that this editor is to use. |
void |
setValue(int index,
PropertyDefinition def,
java.lang.Object value)
Set the value of the property defined by the PropertyDefinition on the Propertied PropertiedObject at the specified index in this editor's list of objects. |
void |
setValue(PropertyDefinition def,
java.lang.Object value)
Set the specified value for the PropertyDefinition on all of PropertiedObjects this editor is using. |
void |
setValues(PropertyDefinition def,
java.util.List values)
Set the value for the specified PropertyDefinition on each of the PropertiedObject instances that this editor is set to use. |
Methods inherited from class com.metamatrix.common.object.PropertiedObjectEditorImpl |
---|
assertPropertiedObject, createReadTransaction, createWriteTransaction, createWriteTransaction, getAllowedValues, getPolicy, getPropertyDefinitions, getValue, isReadOnly, isReadOnly, isValidValue, reset, setPolicy, setReadOnly, setReadOnly, setValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.metamatrix.common.object.PropertiedObjectEditor |
---|
getAllowedValues, getPolicy, getPropertyDefinitions, getValue, isReadOnly, isValidValue, setPolicy, setValue |
Methods inherited from interface com.metamatrix.common.object.PropertyAccessPolicy |
---|
isReadOnly, reset, setReadOnly, setReadOnly |
Methods inherited from interface com.metamatrix.common.transaction.UserTransactionFactory |
---|
createReadTransaction, createWriteTransaction, createWriteTransaction |
Constructor Detail |
---|
public PropertiedObjectsEditorImpl(PropertyAccessPolicy policy, UserTransactionFactory txnFactory)
public PropertiedObjectsEditorImpl()
public PropertiedObjectsEditorImpl(PropertyAccessPolicy policy)
public PropertiedObjectsEditorImpl(UserTransactionFactory txnFactory)
Method Detail |
---|
public java.util.List getObjects()
PropertiedObjectsEditor
getObjects
in interface PropertiedObjectsEditor
public void setObjects(java.util.List objs)
PropertiedObjectsEditor
setObjects
in interface PropertiedObjectsEditor
objs
- the instances of PropertiedObject that are to be used
this this editor; may be null or a zero-length collection.public boolean hasObjects()
hasObjects
in interface PropertiedObjectsEditor
public java.util.List getSharedPropertyDefinitions()
getSharedPropertyDefinitions
in interface PropertiedObjectsEditor
public java.util.List getValues(PropertyDefinition def)
The type of objects in the list and whether the list may contain null references depend upon the type and cardinality defined by the PropertyDefinition.
getValues
in interface PropertiedObjectsEditor
def
- the reference to the PropertyDefinition describing the
property value is to be returned; may not be null
java.lang.AssertionError
- if def
is nullpublic void setValues(PropertyDefinition def, java.util.List values)
(this.hasObjects() && ( values.size() == this.getObjects().size() )
If a PropertiedObject instance in the list of objects this editor is using that does not have the specified PropertyDefinition, the value is not set on that object.
setValues
in interface PropertiedObjectsEditor
def
- the reference to the PropertyDefinition describing the
property whose values are to be changed; may not be nullvalues
- the new values for the property organized in the same
order as the list of PropertiedObjects that this editor is currently using;
may not be null although it may contain null values if the PropertyDefinition
has a multiplicity that includes "0")
java.lang.IllegalArgumentException
- if any of the values are considered invalid
for the PropertyDefinition.
java.lang.AssertionError
- if either of def
or values
is nullpublic java.lang.Object getValue(int index, PropertyDefinition def)
getValue
in interface PropertiedObjectsEditor
obj
- the propertied object whose property value is to be obtained;
may not be nullindex
- the index of the PropertiedObject whose property value is to be returned;
must be within the range of the list of PropertiedObjectsdef
- the reference to the PropertyDefinition describing the
property whose value is to be returned; may not be null
java.lang.IndexOutOfBoundsException
- if index
is out of range (index < 0 || index >= this.getObjects().size()).
java.lang.AssertionError
- if def
is nullpublic boolean isValidValue(int index, PropertyDefinition def, java.lang.Object value)
isValidValue
in interface PropertiedObjectsEditor
index
- the index of the PropertiedObject whose property value is to be returned;
must be within the range of the list of PropertiedObjectsdef
- the reference to the PropertyDefinition describing the
property whose value is to be validated; may not be nullvalue
- the proposed value for the property, which may be a collection if
the property is multi-valued, or may be null if the multiplicity
includes "0"
java.lang.IndexOutOfBoundsException
- if index
is out of range (index < 0 || index >= this.getObjects().size()).
java.lang.AssertionError
- if def
is nullpublic void setValue(int index, PropertyDefinition def, java.lang.Object value)
setValue
in interface PropertiedObjectsEditor
index
- the index of the PropertiedObject whose property value is to be returned;
must be within the range of the list of PropertiedObjectsdef
- the reference to the PropertyDefinition describing the
property whose value is to be changed; may not be nullvalue
- the new value for the property; the cardinality and type
must conform PropertyDefinition
java.lang.IllegalArgumentException
- if the value does not correspond
to the PropertyDefinition requirements.
java.lang.IndexOutOfBoundsException
- if index
is out of range (index < 0 || index >= this.getObjects().size()).
java.lang.AssertionError
- if def
is null, or if the object is read onlypublic java.lang.Object getValue(PropertyDefinition def)
getValue
in interface PropertiedObjectsEditor
def
- the reference to the PropertyDefinition describing the
property whose values are to be evaluated for equivalency; may not be null
public void setValue(PropertyDefinition def, java.lang.Object value)
setValue
in interface PropertiedObjectsEditor
def
- the reference to the PropertyDefinition describing the
property whose value is to be set on all referenced PropertiedObjects; may not be nullvalue
- the new value for the property; the cardinality and type
must conform PropertyDefinition
java.lang.IllegalArgumentException
- if the value is considered invalid
for the PropertyDefinition.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |