Class BasicAttributeContainer
java.lang.Object
com.ptc.core.meta.container.common.impl.BasicAttributeContainer
- All Implemented Interfaces:
AttributeContainer,Externalizable,Serializable
BasicAttributeContainer implements the AttributeContainer interface and is used to storte/retreive contents and
contexts of attribute values. Hashtables are used for storing/retreiving of content, context, or state. ContentMap
has AttributeIdentifier as key and data content wrapper as value. Note that data content wrapper should be immutable
after creation. StateMap has AttributeIdentifier as key and State object as value. Only five instances of State
objects will be existed and shared. TypeIdentifierMap has AttributeTypeIdentifier as key and Vector of
AttributeIdentifiers as value. Although this will make the put/remove methods more expensive because of maintaining
the relationships between AttributeIdentifier and AttributeTypeIdentifier, this vector is worth for various get
operations performed.
Supported API: true
Extendable: false
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidChanges the assocaited state of all AttributeIdentifiers in this container that are associated with the state State.DEFAULT to the state State.NEW.clone(boolean compact)
Supported API: trueget(AttributeIdentifier the_attribute_identifier) Returns the content associated with the given AttributeIdentifier in this container.get(AttributeTypeIdentifier the_attribute_type_identifier) Returns the content associated with the given AttributeTypeIdentifier in this container.getAssociationIdentifiers(TypeIdentifier the_type_identifier) Returns all current AssociationIdentifiers in this container for which the corresponding AssociationTypeIdentifier is equivalent to the given TypeIdentifier.getAssociationIdentifiers(TypeIdentifier the_type_identifier, State the_state) Returns all AssociationIdentifiers in this container for which the corresponding AssociationTypeIdentifier is equivalent to the given TypeIdentifier and that match the given state.getAssociationIdentifiers(TypeInstanceIdentifier the_type_instance_identifier) Returns all current AssociationIdentifiers in this container that are equivalent to the given TypeInstanceIdentifier.getAssociationIdentifiers(TypeInstanceIdentifier the_type_instance_identifier, State the_state) Returns all AssociationIdentifiers in this container that are equivalent to the given TypeInstanceIdentifier and that match the given state.Returns all current AttributeIdentifiers in this container.getAttributeIdentifiers(AssociationIdentifier the_association_identifier) Returns all current AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier.getAttributeIdentifiers(AssociationIdentifier the_association_identifier, AttributeTypeIdentifier the_attribute_type_identifier, boolean is_absolute) Returns all current AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier and associated with the given AttributeTypeIdentifier.getAttributeIdentifiers(AssociationIdentifier the_association_identifier, AttributeTypeIdentifier the_attribute_type_identifier, boolean is_absolute, State the_state) Returns all AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier and associated with the given AttributeTypeIdentifier and that match the given state.getAttributeIdentifiers(AssociationIdentifier the_association_identifier, State the_state) Returns all AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier that match the given state.getAttributeIdentifiers(AttributeTypeIdentifier the_attribute_type_identifier) Returns all current AttributeIdentifiers in this container associated with the given AttributeTypeIdentifier.getAttributeIdentifiers(AttributeTypeIdentifier the_attribute_type_identifier, State the_state) Returns all AttributeIdentifiers in this container associated with the given AttributeTypeIdentifier that match the given state.getAttributeIdentifiers(TypeInstanceIdentifier the_type_instance_identifier) Returns all current AttributeIdentifiers in this container defined directly in the context of the given TypeInstanceIdentifier.getAttributeIdentifiers(TypeInstanceIdentifier the_type_instance_identifier, State the_state) Returns all AttributeIdentifiers in this container defined directly in the context of the given TypeInstanceIdentifier that match the given state.getAttributeIdentifiers(State the_state) Returns all AttributeIdentifiers in this container that match the given state.getAttributeIdentifiers(String logical_form) Returns all current AttributeIdentifiers in this container associated with an AttributeTypeIdentifier which matches the given logical form.Returns all current AttributeTypeIdentifiers in this container.getAttributeTypeIdentifiers(String logical_form) Returns all current AttributeTypeIdentifiers in this container that match the given logical form.getAttributeTypeSummary(AssociationIdentifier the_association_identifier, AttributeTypeIdentifier the_attribute_type_identifier, boolean is_absolute) Returns an AttributeTypeSummary for the AttributeTypeIdentifier.getAttributeTypeSummary(AssociationIdentifier the_association_identifier, AttributeTypeIdentifier the_attribute_type_identifier, boolean is_absolute, ConstraintContainer the_constraint_container, DescriptorContainer the_descriptor_container) Returns an AttributeTypeSummary for the AttributeTypeIdentifier.getAttributeTypeSummary(AttributeTypeIdentifier the_attribute_type_identifier) Returns an AttributeTypeSummary for the AttributeTypeIdentifier.getAttributeTypeSummary(AttributeTypeIdentifier the_attribute_type_identifier, ConstraintContainer the_constraint_container, DescriptorContainer the_descriptor_container) Returns an AttributeTypeSummary for the AttributeTypeIdentifier.Gets the object for the association that plays role: theConstraintContainer.getDescriptor(DefinitionIdentifier the_definition_identifier) Returns the DefinitionDescriptor corresponding to the given DefinitionIdentifier from the associated DescriptorContainer.Gets the object for the association that plays role: theDescriptorContainer.getSingle(AttributeTypeIdentifier the_attribute_type_identifier) Returns the content associated with the given AttributeTypeIdentifier in this container.Returns the content associated with all AttributeTypeIdentifiers matching the given logical form in this container.getState(AttributeIdentifier the_attribute_identifier) Returns the state associated with the given AttributeIdentifier in this container.booleanisContentOfState(AttributeIdentifier the_attribute_identifier, State the_state) Returns true if the state associated with the given AttributeIdentifier is equal to the given state; otherwise, it returns false.booleanisDirty()Returns true if the state associated with any AttributeIdentifier in this container is State.NEW, State.CHANGED, or State.DELETED; otherwise, it returns false.put(AttributeIdentifier the_attribute_identifier, Object the_content) Stores the given content in this container, in assocation with the given AttributeIdentifier.put(AttributeIdentifier the_attribute_identifier, Object the_content, ConstraintContainer the_constraint_container) Stores the given content in this container, in assocation with the given AttributeIdentifier.voidremove(AttributeIdentifier the_attribute_identifier) Deletes the content associated with the given AttributeIdentifier from this container.voidremove(AttributeIdentifier the_attribute_identifier, ConstraintContainer the_constraint_container) Deletes the content associated with the given AttributeIdentifier from this container.voidremove(AttributeTypeIdentifier the_attribute_type_identifier) Deletes the content associated with all AttributeIdentifiers associated with the given AttributeTypeIdentifier from this container.voidremove(AttributeTypeIdentifier the_attribute_type_identifier, ConstraintContainer the_constraint_container) Deletes the content associated with all AttributeIdentifiers associated with the given AttributeTypeIdentifier from this container.voidsetConstraintContainer(ConstraintContainer a_ConstraintContainer) Sets the object for the association that plays role: theConstraintContainer.voidsetDescriptorContainer(DescriptorContainer a_DescriptorContainer) Sets the object for the association that plays role: theDescriptorContainer.voidsetState(AttributeIdentifier the_attribute_identifier, State the_state) Sets the state associated with the given AttributeIdentifier in this container.
-
Method Details
-
getAttributeTypeIdentifiers
Returns all current AttributeTypeIdentifiers in this container. (Does not include AttributeTypeIdentifiers for which the state of every corresponding AttributeIdentifier is State.DELETED.) Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeTypeIdentifiersin interfaceAttributeContainer- Returns:
- AttributeTypeIdentifier[]
-
getAttributeTypeIdentifiers
Returns all current AttributeTypeIdentifiers in this container that match the given logical form. (Does not include AttributeTypeIdentifiers for which the state of every corresponding AttributeIdentifier is State.DELETED.) Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeTypeIdentifiersin interfaceAttributeContainer- Parameters:
logical_form-- Returns:
- AttributeTypeIdentifier[]
-
getAttributeIdentifiers
Returns all current AttributeIdentifiers in this container. (Does not include AttributeIdentifiers for which the state is State.DELETED.) (Does not include AttributeIdentifiers for which the state is State.DEFAULT, unless there are no other AttributeIdentifiers with matching AttributeTypeIdentifiers in the container for which the state is not State.DEFAULT or State.DELETED.) Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeIdentifiersin interfaceAttributeContainer- Returns:
- AttributeIdentifier[]
-
getAttributeIdentifiers
Returns all AttributeIdentifiers in this container that match the given state. If the given state is null, returns all AttributeIdentifiers in this container. Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeIdentifiersin interfaceAttributeContainer- Parameters:
the_state-- Returns:
- AttributeIdentifier[]
-
getAttributeIdentifiers
public AttributeIdentifier[] getAttributeIdentifiers(AttributeTypeIdentifier the_attribute_type_identifier) Returns all current AttributeIdentifiers in this container associated with the given AttributeTypeIdentifier. (Does not include AttributeIdentifiers for which the state is State.DELETED.) (Does not include AttributeIdentifiers for which the state is State.DEFAULT, unless there are no other AttributeIdentifiers with matching AttributeTypeIdentifiers in the container for which the state is not State.DEFAULT or State.DELETED.) Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeIdentifiersin interfaceAttributeContainer- Parameters:
the_attribute_type_identifier- The attribute type identifier which identifies the type for the attribute identifier.- Returns:
- AttributeIdentifier[]
-
getAttributeIdentifiers
public AttributeIdentifier[] getAttributeIdentifiers(AttributeTypeIdentifier the_attribute_type_identifier, State the_state) Returns all AttributeIdentifiers in this container associated with the given AttributeTypeIdentifier that match the given state. If the given state is null, returns all AttributeIdentifiers in this container associated with the given AttributeTypeIdentifier. Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeIdentifiersin interfaceAttributeContainer- Parameters:
the_attribute_type_identifier-the_state-- Returns:
- AttributeIdentifier[]
-
getAttributeIdentifiers
public AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier the_association_identifier) Returns all current AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier. (Does not include AttributeIdentifiers for which the state is State.DELETED.) (Does not include AttributeIdentifiers for which the state is State.DEFAULT, unless there are no other AttributeIdentifiers in the container defined in the context of the given AssociationIdentifier with matching AttributeTypeIdentifiersfor which the state is not State.DEFAULT or State.DELETED.) Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeIdentifiersin interfaceAttributeContainer- Parameters:
the_association_identifier-- Returns:
- AttributeIdentifier[]
-
getAttributeIdentifiers
public AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier the_association_identifier, State the_state) Returns all AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier that match the given state. If the given state is null, returns all AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier. Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeIdentifiersin interfaceAttributeContainer- Parameters:
the_association_identifier-the_state-- Returns:
- AttributeIdentifier[]
-
getAttributeIdentifiers
public AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier the_association_identifier, AttributeTypeIdentifier the_attribute_type_identifier, boolean is_absolute) Returns all current AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier and associated with the given AttributeTypeIdentifier. If 'is_absolute' is true, then the given AttributeTypeIdentifier is assumed to be defined in the context of the AssociationTypeIdentifier corresponding to the given AssociationIdentifier. Otherwise, a new AttributeTypeIdentifier is constructed by merging the given AttributeTypeIdentifier onto the context of the AssociationTypeIdentifier corresponding to the given AssociationIdentifier. (Does not include AttributeIdentifiers for which the state is State.DELETED.) (Does not include AttributeIdentifiers for which the state is State.DEFAULT, unless there are no other AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier with matching AttributeTypeIdentifiers for which the state is not State.DEFAULT or State.DELETED.) Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeIdentifiersin interfaceAttributeContainer- Parameters:
the_association_identifier-the_attribute_type_identifier-is_absolute-- Returns:
- AttributeIdentifier[]
-
getAttributeIdentifiers
public AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier the_association_identifier, AttributeTypeIdentifier the_attribute_type_identifier, boolean is_absolute, State the_state) Returns all AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier and associated with the given AttributeTypeIdentifier and that match the given state. If 'is_absolute' is true, then the given AttributeTypeIdentifier is assumed to be defined in the context of the AssociationTypeIdentifier corresponding to the given AssociationIdentifier. Otherwise, a new AttributeTypeIdentifier is constructed by merging the given AttributeTypeIdentifier onto the context of the AssociationTypeIdentifier corresponding to the given AssociationIdentifier. If the given state is null, returns all AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier and associated with the given AttributeTypeIdentifier. Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeIdentifiersin interfaceAttributeContainer- Parameters:
the_association_identifier-the_attribute_type_identifier-is_absolute-the_state-- Returns:
- AttributeIdentifier[]
-
getAttributeIdentifiers
Returns all current AttributeIdentifiers in this container associated with an AttributeTypeIdentifier which matches the given logical form. (Does not include AttributeIdentifiers for which the state is State.DELETED.) (Does not include AttributeIdentifiers for which the state is State.DEFAULT, unless there are no other AttributeIdentifiers with matching AttributeTypeIdentifiers in the container for which the state is not State.DEFAULT or State.DELETED.) Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeIdentifiersin interfaceAttributeContainer- Parameters:
logical_form-- Returns:
- AttributeIdentifier[]
-
getAttributeIdentifiers
public AttributeIdentifier[] getAttributeIdentifiers(TypeInstanceIdentifier the_type_instance_identifier) Returns all current AttributeIdentifiers in this container defined directly in the context of the given TypeInstanceIdentifier. (Does not include AttributeIdentifiers for which the state is State.DELETED.) (Does not include AttributeIdentifiers for which the state is State.DEFAULT, unless there are no other AttributeIdentifiers in the container defined directly in the context of the given TypeInstanceIdentifier with matching AttributeTypeIdentifiersfor which the state is not State.DEFAULT or State.DELETED.) Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeIdentifiersin interfaceAttributeContainer- Parameters:
the_type_instance_identifier-- Returns:
- AttributeIdentifier[]
-
getAttributeIdentifiers
public AttributeIdentifier[] getAttributeIdentifiers(TypeInstanceIdentifier the_type_instance_identifier, State the_state) Returns all AttributeIdentifiers in this container defined directly in the context of the given TypeInstanceIdentifier that match the given state. If the given state is null, returns all AttributeIdentifiers in this container defined directly in the context of the given TypeInstanceIdentifier. Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAttributeIdentifiersin interfaceAttributeContainer- Parameters:
the_type_instance_identifier-the_state-- Returns:
- AttributeIdentifier[]
-
getAssociationIdentifiers
public AssociationIdentifier[] getAssociationIdentifiers(TypeInstanceIdentifier the_type_instance_identifier) Returns all current AssociationIdentifiers in this container that are equivalent to the given TypeInstanceIdentifier. (Does not include AssociationIdentifiers for which the state is State.DELETED.) (Does not include AssociationIdentifiers for which the state is State.DEFAULT, unless there are no other AssociationIdentifiers with matching AssociationTypeIdentifiers in the container for which the state is not State.DEFAULT or State.DELETED.) Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAssociationIdentifiersin interfaceAttributeContainer- Parameters:
the_type_instance_identifier-- Returns:
- AssociationIdentifier[]
-
getAssociationIdentifiers
public AssociationIdentifier[] getAssociationIdentifiers(TypeInstanceIdentifier the_type_instance_identifier, State the_state) Returns all AssociationIdentifiers in this container that are equivalent to the given TypeInstanceIdentifier and that match the given state. If the given state is null, returns all AssociationIdentifiers in this container that are equivalent to the given TypeInstanceIdentifier. Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAssociationIdentifiersin interfaceAttributeContainer- Parameters:
the_type_instance_identifier-the_state-- Returns:
- AssociationIdentifier[]
-
getAssociationIdentifiers
Returns all current AssociationIdentifiers in this container for which the corresponding AssociationTypeIdentifier is equivalent to the given TypeIdentifier. (Does not include AssociationIdentifiers for which the state is State.DELETED.) (Does not include AssociationIdentifiers for which the state is State.DEFAULT, unless there are no other AssociationIdentifiers with matching AssociationTypeIdentifiers in the container for which the state is not State.DEFAULT or State.DELETED.) Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAssociationIdentifiersin interfaceAttributeContainer- Parameters:
the_type_identifier-- Returns:
- AssociationIdentifier[]
-
getAssociationIdentifiers
public AssociationIdentifier[] getAssociationIdentifiers(TypeIdentifier the_type_identifier, State the_state) Returns all AssociationIdentifiers in this container for which the corresponding AssociationTypeIdentifier is equivalent to the given TypeIdentifier and that match the given state. If the given state is null, returns all AssociationIdentifiers in this container for which the corresponding AssociationTypeIdentifier is equivalent to the given TypeIdentifier. Returns an empty array if no matches are found.
Supported API: true- Specified by:
getAssociationIdentifiersin interfaceAttributeContainer- Parameters:
the_type_identifier-the_state-- Returns:
- AssociationIdentifier[]
-
get
Returns the content associated with the given AttributeIdentifier in this container. Returns null if the AttributeIdentifier is not found in the container. If the content is an AttributeContainerFunction, returns the result of calculate(this) called on the function.
Supported API: true- Specified by:
getin interfaceAttributeContainer- Parameters:
the_attribute_identifier-- Returns:
- Object
-
get
Returns the content associated with the given AttributeTypeIdentifier in this container. If there is exactly one AttributeIdentifier associated with the given AttributeTypeIdentifier in the container, the return value will be a single Object. If there is more than one AttributeIdentifier associated with the given AttributeTypeIdentifier in the container, the return value will be an array of Objects. If there are no current AttributeIdentifiers associated with the given AttributeTypeIdentifier in the container, the return value will be null. (Does not include content for AttributeIdentifiers for which the state is State.DELETED.) (Does not include content for AttributeIdentifiers for which the state is State.DEFAULT, unless there are no other AttributeIdentifiers in this container with matching AttributeTypeIdentifiers for which the state is not State.DEFAULT or State.DELETED.) If any of the individual content Objects are AttributeContainerFunctions, returns instead the result of calculate(this) called on the function.
Supported API: true- Specified by:
getin interfaceAttributeContainer- Parameters:
the_attribute_type_identifier-- Returns:
- Object
-
getSingle
Returns the content associated with the given AttributeTypeIdentifier in this container. If there is exactly one AttributeIdentifier associated with the given AttributeTypeIdentifier in the container, the return value will be a single Object. If there is more than one AttributeIdentifier associated with the given AttributeTypeIdentifier in the container, the return value will be a single Object, selected randomly from the content associated with those AttributeIdentifiers. If there are no current AttributeIdentifiers associated with the given AttributeTypeIdentifier in the container, the return value will be null. (Does not include content for AttributeIdentifiers for which the state is State.DELETED.) (Does not include content for AttributeIdentifiers for which the state is State.DEFAULT, unless there are no other AttributeIdentifiers in this container with matching AttributeTypeIdentifiers for which the state is not State.DEFAULT or State.DELETED.) If the content is an AttributeContainerFunction, returns the result of calculate(this) called on the function.
Supported API: true- Specified by:
getSinglein interfaceAttributeContainer- Parameters:
the_attribute_type_identifier-- Returns:
- Object
-
getSingle
Returns the content associated with all AttributeTypeIdentifiers matching the given logical form in this container. If there is exactly one AttributeIdentifier associated with the matching AttributeTypeIdentifiers in the container, the return value will be a single Object. If there is more than one AttributeIdentifier associated with the matching AttributeTypeIdentifiers in the container, the return value will be a single Object, selected randomly from the content associated with those AttributeIdentifiers. If there are no current AttributeIdentifiers associated with the matching AttributeTypeIdentifier in the container or there is no matching AttributeTypeIdentifier in the container, the return value will be null. (Does not include content for AttributeIdentifiers for which the state is State.DELETED.) (Does not include content for AttributeIdentifiers for which the state is State.DEFAULT, unless there are no other AttributeIdentifiers in this container with matching AttributeTypeIdentifiers for which the state is not State.DEFAULT or State.DELETED.) If the content is an AttributeContainerFunction, returns the result of calculate(this) called on the function.
Supported API: true- Specified by:
getSinglein interfaceAttributeContainer- Parameters:
logical_form-- Returns:
- Object
-
put
public AttributeIdentifier put(AttributeIdentifier the_attribute_identifier, Object the_content) throws IllegalContentException, ConstraintException Stores the given content in this container, in assocation with the given AttributeIdentifier. If the given AttributeIdentifier does not already exist in the container, and the given content is null, then the state associated with the given AttributeIdentifier is set to State.UNINTIALIZED. If the given AttributeIdentifier does not already exist in the container, and the given content is not null, then the state associated with the given AttributeIdentifier is set to State.New. If the given AttributeIdentifier already exists in the container and the previous state associated with the given AttributeIdentifier was State.UNINTIALIZED, the associated state becomes State.NEW. If the given AttributeIdentifier already exists in the container and the previous state associated with the given AttributeIdentifier was State.UNCHANGED, the associated state becomes State.CHANGED. If the given AttributeIdentifier already exists in the container and the previous state associated with the given AttributeIdentifier was State.DELETED, the associated state becomes State.CHANGED. If the given AttributeIdentifier already exists in the container and the previous state associated with the given AttributeIdentifier was State.DEFAULT, the associated state becomes State.NEW. Returns the actual Attributeidentifier used to store the content. This will be different from the given AttributeIdentifier in the case where the previous state associated with the given AttributeIdentifier was State.DEFAULT and in the case where equivalent AttributeIdentifier(s) may already be present in the AttributeContainer. In all cases, the returned AttributeIdentifier represents the most accurate and efficient AttributeIdentifier to be used for future access to the stored content. Throws IllegalContentException if the content is an AttributeContainerFunction and the function is recursive. (The function has the given AttributeIdentifier or the AttributeTypeIdentifier corresponding to the given AttributeIdentifier as one of its arguments.) Throws ConstraintException if adding/changing the given content violates one or more of the constraints in the associated ConstraintContainer.
Supported API: true- Specified by:
putin interfaceAttributeContainer- Parameters:
the_attribute_identifier- Must not be null.the_content-- Returns:
- AttributeIdentifier
- Throws:
IllegalContentExceptionConstraintExceptionNullPointerException- Thrown if the attribute identifier is null.
-
put
public AttributeIdentifier put(AttributeIdentifier the_attribute_identifier, Object the_content, ConstraintContainer the_constraint_container) throws IllegalContentException, ConstraintException Stores the given content in this container, in assocation with the given AttributeIdentifier. If the given AttributeIdentifier does not already exist in the container, and the given content is null, then the state associated with the given AttributeIdentifier is set to State.UNINTIALIZED. If the given AttributeIdentifier does not already exist in the container, and the given content is not null, then the state associated with the given AttributeIdentifier is set to State.New. If the given AttributeIdentifier already exists in the container and the previous state associated with the given AttributeIdentifier was State.UNINTIALIZED, the associated state becomes State.NEW. If the given AttributeIdentifier already exists in the container and the previous state associated with the given AttributeIdentifier was State.UNCHANGED, the associated state becomes State.CHANGED. If the given AttributeIdentifier already exists in the container and the previous state associated with the given AttributeIdentifier was State.DELETED, the associated state becomes State.CHANGED. If the given AttributeIdentifier already exists in the container and the previous state associated with the given AttributeIdentifier was State.DEFAULT, the associated state becomes State.NEW. Returns the actual Attributeidentifier used to store the content. This will be different from the given AttributeIdentifier in the case where the previous state associated with the given AttributeIdentifier was State.DEFAULT and in the case where equivalent AttributeIdentifier(s) may already be present in the AttributeContainer. In all cases, the returned AttributeIdentifier represents the most accurate and efficient AttributeIdentifier to be used for future access to the stored content. Throws IllegalContentException if the content is an AttributeContainerFunction and the function is recursive. (The function has the given AttributeIdentifier or the AttributeTypeIdentifier corresponding to the given AttributeIdentifier as one of its arguments.) Throws ConstraintException if adding/changing the given content violates one or more of the constraints in the associated ConstraintContainer.
Supported API: true- Specified by:
putin interfaceAttributeContainer- Parameters:
the_attribute_identifier- Must not be null.the_content-the_constraint_container-- Returns:
- AttributeIdentifier
- Throws:
IllegalContentExceptionConstraintExceptionNullPointerException- Thrown if the attribute identifier is null.
-
remove
Deletes the content associated with the given AttributeIdentifier from this container. If the previous state associated with the given AttributeIdentifier was State.UNINTIALIZED or State.NEW, the given AttributeIdentifier and associated content are removed from the container. If the previous state associated with the given AttributeIdentifier was State.UNCHANGED or State.CHANGED, the associated state becomes State.DELETED. Throws ConstraintException if deleting the associated content violates one or more of the constraints in the associated ConstraintContainer.
Supported API: true- Specified by:
removein interfaceAttributeContainer- Parameters:
the_attribute_identifier-- Throws:
ConstraintException
-
remove
public void remove(AttributeTypeIdentifier the_attribute_type_identifier) throws ConstraintException Deletes the content associated with all AttributeIdentifiers associated with the given AttributeTypeIdentifier from this container. If the previous state associated with one of the AttributeIdentifiers was State.UNINTIALIZED or State.NEW, the AttributeIdentifier and associated content are removed from the container. If the previous state associated with one of the AttributeIdentifiers was State.UNCHANGED or State.CHANGED, the associated state becomes State.DELETED. Throws ConstraintException if deleting any of the associaited content violates one or more of the constraints in the associated ConstraintContainer.
Supported API: true- Specified by:
removein interfaceAttributeContainer- Parameters:
the_attribute_type_identifier-- Throws:
ConstraintException
-
remove
public void remove(AttributeIdentifier the_attribute_identifier, ConstraintContainer the_constraint_container) throws ConstraintException Deletes the content associated with the given AttributeIdentifier from this container. If the previous state associated with the given AttributeIdentifier was State.UNINTIALIZED or State.NEW, the given AttributeIdentifier and associated content are removed from the container. If the previous state associated with the given AttributeIdentifier was State.UNCHANGED or State.CHANGED, the associated state becomes State.DELETED. Throws ConstraintException if deleting the associated content violates one or more of the constraints in the associated ConstraintContainer.
Supported API: true- Specified by:
removein interfaceAttributeContainer- Parameters:
the_attribute_identifier-the_constraint_container-- Throws:
ConstraintException
-
remove
public void remove(AttributeTypeIdentifier the_attribute_type_identifier, ConstraintContainer the_constraint_container) throws ConstraintException Deletes the content associated with all AttributeIdentifiers associated with the given AttributeTypeIdentifier from this container. If the previous state associated with one of the AttributeIdentifiers was State.UNINTIALIZED or State.NEW, the AttributeIdentifier and associated content are removed from the container. If the previous state associated with one of the AttributeIdentifiers was State.UNCHANGED or State.CHANGED, the associated state becomes State.DELETED. Throws ConstraintException if deleting any of the associaited content violates one or more of the constraints in the associated ConstraintContainer.
Supported API: true- Specified by:
removein interfaceAttributeContainer- Parameters:
the_attribute_type_identifier-the_constraint_container-- Throws:
ConstraintException
-
getDescriptor
Returns the DefinitionDescriptor corresponding to the given DefinitionIdentifier from the associated DescriptorContainer. Returns null if there is no associated DescriptorContainer, or if there is no corresponding DefinitionDescriptor in the descriptor container.
Supported API: true- Specified by:
getDescriptorin interfaceAttributeContainer- Parameters:
the_definition_identifier-- Returns:
- DefinitionDescriptor
-
getAttributeTypeSummary
public AttributeTypeSummary getAttributeTypeSummary(AttributeTypeIdentifier the_attribute_type_identifier) Returns an AttributeTypeSummary for the AttributeTypeIdentifier.
Supported API: true- Specified by:
getAttributeTypeSummaryin interfaceAttributeContainer- Parameters:
the_attribute_type_identifier-- Returns:
- AttributeTypeSummary
-
getAttributeTypeSummary
public AttributeTypeSummary getAttributeTypeSummary(AttributeTypeIdentifier the_attribute_type_identifier, ConstraintContainer the_constraint_container, DescriptorContainer the_descriptor_container) Returns an AttributeTypeSummary for the AttributeTypeIdentifier.
Supported API: true- Specified by:
getAttributeTypeSummaryin interfaceAttributeContainer- Parameters:
the_attribute_type_identifier-the_constraint_container-the_descriptor_container-- Returns:
- AttributeTypeSummary
-
getAttributeTypeSummary
public AttributeTypeSummary getAttributeTypeSummary(AssociationIdentifier the_association_identifier, AttributeTypeIdentifier the_attribute_type_identifier, boolean is_absolute) Returns an AttributeTypeSummary for the AttributeTypeIdentifier.
Supported API: true- Specified by:
getAttributeTypeSummaryin interfaceAttributeContainer- Parameters:
the_association_identifier-the_attribute_type_identifier-is_absolute-- Returns:
- AttributeTypeSummary
-
getAttributeTypeSummary
public AttributeTypeSummary getAttributeTypeSummary(AssociationIdentifier the_association_identifier, AttributeTypeIdentifier the_attribute_type_identifier, boolean is_absolute, ConstraintContainer the_constraint_container, DescriptorContainer the_descriptor_container) Returns an AttributeTypeSummary for the AttributeTypeIdentifier.
Supported API: true- Specified by:
getAttributeTypeSummaryin interfaceAttributeContainer- Parameters:
the_association_identifier-the_attribute_type_identifier-is_absolute-the_constraint_container-the_descriptor_container-- Returns:
- AttributeTypeSummary
-
isDirty
public boolean isDirty()Returns true if the state associated with any AttributeIdentifier in this container is State.NEW, State.CHANGED, or State.DELETED; otherwise, it returns false.
Supported API: true- Specified by:
isDirtyin interfaceAttributeContainer- Returns:
- boolean
-
isContentOfState
Returns true if the state associated with the given AttributeIdentifier is equal to the given state; otherwise, it returns false.
Supported API: true- Specified by:
isContentOfStatein interfaceAttributeContainer- Parameters:
the_attribute_identifier-the_state-- Returns:
- boolean
-
getState
Returns the state associated with the given AttributeIdentifier in this container. Returns null if the AttributeIdentifier is not in the container.
Supported API: true- Specified by:
getStatein interfaceAttributeContainer- Parameters:
the_attribute_identifier-- Returns:
- State
-
setState
Sets the state associated with the given AttributeIdentifier in this container. Has no effect if the AttributeIdentifier is not in the container.
Supported API: true- Specified by:
setStatein interfaceAttributeContainer- Parameters:
the_attribute_identifier-the_state-
-
acceptDefaultContent
public void acceptDefaultContent()Changes the assocaited state of all AttributeIdentifiers in this container that are associated with the state State.DEFAULT to the state State.NEW.
Supported API: true- Specified by:
acceptDefaultContentin interfaceAttributeContainer
-
clone
Supported API: true- Specified by:
clonein interfaceAttributeContainer- Parameters:
compact-- Returns:
- AttributeContainer
-
getConstraintContainer
Gets the object for the association that plays role: theConstraintContainer.
Supported API: true- Specified by:
getConstraintContainerin interfaceAttributeContainer- Returns:
- ConstraintContainer
-
setConstraintContainer
Sets the object for the association that plays role: theConstraintContainer.
Supported API: true- Specified by:
setConstraintContainerin interfaceAttributeContainer- Parameters:
a_ConstraintContainer-
-
getDescriptorContainer
Gets the object for the association that plays role: theDescriptorContainer.
Supported API: true- Specified by:
getDescriptorContainerin interfaceAttributeContainer- Returns:
- DescriptorContainer
-
setDescriptorContainer
Sets the object for the association that plays role: theDescriptorContainer.
Supported API: true- Specified by:
setDescriptorContainerin interfaceAttributeContainer- Parameters:
a_DescriptorContainer-
-