|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.iba.value.DefaultAttributeContainer
Default mplementation of AttributeContainer.
Any attempts to add/remove/ delete/update value to the container must
first pass validation by calling each respective validation method. All
accessor mehods return cloned value(s) rather than reference the original
value(s). This is to ensure attribute value data integrity, such that
changes to the value outside of the container does not automatically
reflected in the container without passing constraint validations.
Supported API: false
Extendable: false
AttributeContainer
,
Serialized FormField Summary | |
static int |
ALL_STATE
|
private static String |
CLASSNAME
|
private Vector |
constraintGroups
|
private Object |
constraintParameter
|
static int |
DIRTY_STATE
|
static long |
EXTERNALIZATION_VERSION_UID
|
static String |
FROM_SERVER
|
private String |
fromServer
|
static int |
NOT_DELETED_STATE
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private Vector |
values
|
Constructor Summary | |
DefaultAttributeContainer()
Supported API: false |
|
DefaultAttributeContainer(Vector constraintGrps)
Supported API: false |
Method Summary | |
void |
addAttributeValue(AbstractValueView value)
If value exists, throws IBAConstraintException. |
void |
clearContainer()
Delete all attribute values permanently from storage without constraint validations. |
Object |
clone()
Clones this container and all its components. |
protected LiteIBAReferenceable |
cloneLiteIBAReferenceable(LiteIBAReferenceable referenceable)
|
protected AbstractValueView |
cloneValueView(AbstractValueView value)
|
protected void |
copyValue(AbstractValueView from,
AbstractValueView to)
|
void |
deleteAttributeValue(AbstractValueView value)
If value does not exist, throws IBACosntraintsExceptin otherwise, deletes the value. |
void |
deleteAttributeValues(AttributeDefDefaultView attributeDefinition)
Deletes all the values associate with the given attribute definition, by setting the state of the value to DELETE. |
protected void |
deleteValuesByReference(ReferenceValueDefaultView a_value)
|
protected AttributeDefDefaultView |
getAttrDefinition(AbstractValueView value)
|
AttributeDefDefaultView[] |
getAttributeDefinitions()
Returns an array of attribute definitions associate with this container. |
AbstractValueView[] |
getAttributeValues()
Returns a cloned array of values (not including the values of DELETED state) associate with this container. |
AbstractValueView[] |
getAttributeValues(AttributeDefDefaultView attributeDefinition)
Returns a cloned array of values associate with this container. |
AbstractValueView[] |
getChangedAttributeValues()
Returns a cloned array of values associate with this container of state CHANGED. |
ConstraintDescriptor[] |
getConstraintDescriptors(AttributeDefDefaultView attributeDefinition,
Locale locale)
Supported API: false |
Vector |
getConstraintGroups()
Gets the value of the attribute: constraintGroups. |
Object |
getConstraintParameter()
Gets the value of the attribute: constraintParameter. |
AbstractValueView[] |
getDeletedAttributeValues()
Returns a cloned array of values associate with this container of state DELETED. |
AbstractValueView[] |
getDirtyAttributeValues()
Returns a cloned array of values associate with this container of state NEW, CHANGED, and DELETED. |
protected ReferenceValueDefaultView |
getEquavilentReferenceValue(ReferenceValueDefaultView a_value)
|
String |
getFromServer()
Gets the value of the attribute: fromServer. |
AbstractValueView[] |
getNewAttributeValues()
Returns a cloned array of values associate with this container of state NEW. |
protected AbstractValueView[] |
getUnclonedAttributeValues(AttributeDefDefaultView attributeDefinition)
|
protected AbstractValueView[] |
getUnclonedAttributeValues(int state)
|
protected Vector |
getValues()
Gets the value of the attribute: values. |
boolean |
isAddValid(AbstractValueView value)
Supported API: false |
boolean |
isContainerDirty()
Supported API: false |
boolean |
isContainerValid(AttributeContainer attrContainer)
Supported API: false |
protected boolean |
isDefinitionExist(Vector defs,
AttributeDefDefaultView def)
|
boolean |
isDeleteValid(AbstractValueView value)
Supported API: false |
boolean |
isUpdateValid(AbstractValueView value)
Supported API: false |
void |
purgeValue(AbstractValueView a_value)
|
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(DefaultAttributeContainer thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
protected void |
replaceValue(AbstractValueView a_value)
|
void |
setConstraintGroups(Vector a_ConstraintGroups)
Sets the value of the attribute: constraintGroups. |
void |
setConstraintParameter(Object a_ConstraintParameter)
Sets the value of the attribute: constraintParameter. |
void |
setFromServer(String a_FromServer)
Sets the value of the attribute: fromServer. |
protected void |
setValues(Vector a_Values)
Sets the value of the attribute: values. |
String |
toString()
|
void |
updateAttributeValue(AbstractValueView value)
if value.state == UINITIALIZED_STATE or value.state == NEW_STATE update the value; if value.state == UNCHANGED_STATE or value.state == DELETED_STATE set value.state == CHANGED_STATE; update the value; Supported API: false |
protected boolean |
valueExists(AbstractValueView a_value)
|
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private Vector values
private Vector constraintGroups
private Object constraintParameter
private String fromServer
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
public static final int ALL_STATE
public static final int NOT_DELETED_STATE
public static final int DIRTY_STATE
public static final String FROM_SERVER
Constructor Detail |
public DefaultAttributeContainer()
public DefaultAttributeContainer(Vector constraintGrps)
constraintGrps
- Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
input
-
IOException
ClassNotFoundException
protected boolean readVersion(DefaultAttributeContainer thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
protected Vector getValues()
protected void setValues(Vector a_Values) throws WTPropertyVetoException
a_Values
-
WTPropertyVetoException
public Vector getConstraintGroups()
public void setConstraintGroups(Vector a_ConstraintGroups) throws WTPropertyVetoException
a_ConstraintGroups
-
WTPropertyVetoException
public Object getConstraintParameter()
public void setConstraintParameter(Object a_ConstraintParameter) throws WTPropertyVetoException
a_ConstraintParameter
-
WTPropertyVetoException
public String getFromServer()
public void setFromServer(String a_FromServer)
a_FromServer
- public void addAttributeValue(AbstractValueView value) throws IBAConstraintException
value
-
IBAConstraintException
public Object clone()
clone
in interface AttributeContainer
public void clearContainer()
public void deleteAttributeValue(AbstractValueView value) throws IBAConstraintException
value
-
IBAConstraintException
public void deleteAttributeValues(AttributeDefDefaultView attributeDefinition) throws IBAConstraintException
attributeDefinition
-
IBAConstraintException
public AbstractValueView[] getAttributeValues()
public AbstractValueView[] getAttributeValues(AttributeDefDefaultView attributeDefinition)
attributeDefinition
-
public AttributeDefDefaultView[] getAttributeDefinitions()
public AbstractValueView[] getChangedAttributeValues()
public AbstractValueView[] getDeletedAttributeValues()
public AbstractValueView[] getDirtyAttributeValues()
public AbstractValueView[] getNewAttributeValues()
public boolean isContainerDirty()
isContainerDirty
in interface AttributeContainer
public boolean isAddValid(AbstractValueView value) throws IBAConstraintException
value
-
IBAConstraintException
public boolean isUpdateValid(AbstractValueView value) throws IBAConstraintException
value
-
IBAConstraintException
public boolean isDeleteValid(AbstractValueView value) throws IBAConstraintException
value
-
IBAConstraintException
public boolean isContainerValid(AttributeContainer attrContainer) throws IBAConstraintException
attrContainer
-
IBAConstraintException
public ConstraintDescriptor[] getConstraintDescriptors(AttributeDefDefaultView attributeDefinition, Locale locale)
attributeDefinition
- locale
-
public void updateAttributeValue(AbstractValueView value) throws IBAConstraintException
value
-
IBAConstraintException
public String toString()
protected AttributeDefDefaultView getAttrDefinition(AbstractValueView value)
protected AbstractValueView cloneValueView(AbstractValueView value)
protected AbstractValueView[] getUnclonedAttributeValues(AttributeDefDefaultView attributeDefinition)
protected boolean isDefinitionExist(Vector defs, AttributeDefDefaultView def)
protected AbstractValueView[] getUnclonedAttributeValues(int state)
protected boolean valueExists(AbstractValueView a_value)
protected void replaceValue(AbstractValueView a_value) throws WTPropertyVetoException
WTPropertyVetoException
protected void copyValue(AbstractValueView from, AbstractValueView to) throws WTPropertyVetoException
WTPropertyVetoException
protected void deleteValuesByReference(ReferenceValueDefaultView a_value) throws WTPropertyVetoException
WTPropertyVetoException
protected ReferenceValueDefaultView getEquavilentReferenceValue(ReferenceValueDefaultView a_value)
protected LiteIBAReferenceable cloneLiteIBAReferenceable(LiteIBAReferenceable referenceable)
public void purgeValue(AbstractValueView a_value)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |