|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ptc.core.meta.container.common.impl.BasicAttributeContainer
public class BasicAttributeContainer
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
| Method Summary | |
|---|---|
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. |
AttributeContainer |
clone(boolean compact)
Supported API: true |
Object |
get(AttributeIdentifier the_attribute_identifier)
Returns the content associated with the given AttributeIdentifier in this container. |
Object |
get(AttributeTypeIdentifier the_attribute_type_identifier)
Returns the content associated with the given AttributeTypeIdentifier in this container. |
AssociationIdentifier[] |
getAssociationIdentifiers(TypeIdentifier the_type_identifier)
Returns all current AssociationIdentifiers in this container for which the corresponding AssociationTypeIdentifier is equivalent to the given TypeIdentifier. |
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. |
AssociationIdentifier[] |
getAssociationIdentifiers(TypeInstanceIdentifier the_type_instance_identifier)
Returns all current AssociationIdentifiers in this container that are equivalent to the given TypeInstanceIdentifier. |
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. |
AttributeIdentifier[] |
getAttributeIdentifiers()
Returns all current AttributeIdentifiers in this container. |
AttributeIdentifier[] |
getAttributeIdentifiers(AssociationIdentifier the_association_identifier)
Returns all current AttributeIdentifiers in this container defined in the context of the given AssociationIdentifier. |
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. |
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. |
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. |
AttributeIdentifier[] |
getAttributeIdentifiers(AttributeTypeIdentifier the_attribute_type_identifier)
Returns all current AttributeIdentifiers in this container associated with the given AttributeTypeIdentifier. |
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. |
AttributeIdentifier[] |
getAttributeIdentifiers(State the_state)
Returns all AttributeIdentifiers in this container that match the given state. |
AttributeIdentifier[] |
getAttributeIdentifiers(String logical_form)
Returns all current AttributeIdentifiers in this container associated with an AttributeTypeIdentifier which matches the given logical form. |
AttributeIdentifier[] |
getAttributeIdentifiers(TypeInstanceIdentifier the_type_instance_identifier)
Returns all current AttributeIdentifiers in this container defined directly in the context of the given TypeInstanceIdentifier. |
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. |
AttributeTypeIdentifier[] |
getAttributeTypeIdentifiers()
Returns all current AttributeTypeIdentifiers in this container. |
AttributeTypeIdentifier[] |
getAttributeTypeIdentifiers(String logical_form)
Returns all current AttributeTypeIdentifiers in this container that match the given logical form. |
AttributeTypeSummary |
getAttributeTypeSummary(AssociationIdentifier the_association_identifier,
AttributeTypeIdentifier the_attribute_type_identifier,
boolean is_absolute)
Returns an AttributeTypeSummary for the AttributeTypeIdentifier. |
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. |
AttributeTypeSummary |
getAttributeTypeSummary(AttributeTypeIdentifier the_attribute_type_identifier)
Returns an AttributeTypeSummary for the AttributeTypeIdentifier. |
AttributeTypeSummary |
getAttributeTypeSummary(AttributeTypeIdentifier the_attribute_type_identifier,
ConstraintContainer the_constraint_container,
DescriptorContainer the_descriptor_container)
Returns an AttributeTypeSummary for the AttributeTypeIdentifier. |
ConstraintContainer |
getConstraintContainer()
Gets the object for the association that plays role: theConstraintContainer. |
com.ptc.core.meta.descriptor.common.DefinitionDescriptor |
getDescriptor(DefinitionIdentifier the_definition_identifier)
Returns the DefinitionDescriptor corresponding to the given DefinitionIdentifier from the associated DescriptorContainer. |
DescriptorContainer |
getDescriptorContainer()
Gets the object for the association that plays role: theDescriptorContainer. |
Object |
getSingle(AttributeTypeIdentifier the_attribute_type_identifier)
Returns the content associated with the given AttributeTypeIdentifier in this container. |
Object |
getSingle(String logical_form)
Returns the content associated with all AttributeTypeIdentifiers matching the given logical form in this container. |
State |
getState(AttributeIdentifier the_attribute_identifier)
Returns the state associated with the given AttributeIdentifier in this container. |
boolean |
isContentOfState(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. |
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. |
AttributeIdentifier |
put(AttributeIdentifier the_attribute_identifier,
Object the_content)
Stores the given content in this container, in assocation with the given AttributeIdentifier. |
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. |
void |
remove(AttributeIdentifier the_attribute_identifier)
Deletes the content associated with the given AttributeIdentifier from this container. |
void |
remove(AttributeIdentifier the_attribute_identifier,
ConstraintContainer the_constraint_container)
Deletes the content associated with the given AttributeIdentifier from this container. |
void |
remove(AttributeTypeIdentifier the_attribute_type_identifier)
Deletes the content associated with all AttributeIdentifiers associated with the given AttributeTypeIdentifier from this container. |
void |
remove(AttributeTypeIdentifier the_attribute_type_identifier,
ConstraintContainer the_constraint_container)
Deletes the content associated with all AttributeIdentifiers associated with the given AttributeTypeIdentifier from this container. |
void |
setConstraintContainer(ConstraintContainer a_ConstraintContainer)
Sets the object for the association that plays role: theConstraintContainer. |
void |
setDescriptorContainer(DescriptorContainer a_DescriptorContainer)
Sets the object for the association that plays role: theDescriptorContainer. |
void |
setState(AttributeIdentifier the_attribute_identifier,
State the_state)
Sets the state associated with the given AttributeIdentifier in this container. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public AttributeTypeIdentifier[] getAttributeTypeIdentifiers()
getAttributeTypeIdentifiers in interface AttributeContainerpublic AttributeTypeIdentifier[] getAttributeTypeIdentifiers(String logical_form)
getAttributeTypeIdentifiers in interface AttributeContainerlogical_form -
public AttributeIdentifier[] getAttributeIdentifiers()
getAttributeIdentifiers in interface AttributeContainerpublic AttributeIdentifier[] getAttributeIdentifiers(State the_state)
getAttributeIdentifiers in interface AttributeContainerthe_state -
public AttributeIdentifier[] getAttributeIdentifiers(AttributeTypeIdentifier the_attribute_type_identifier)
getAttributeIdentifiers in interface AttributeContainerthe_attribute_type_identifier - The attribute type identifier which identifies the type for the attribute identifier.
public AttributeIdentifier[] getAttributeIdentifiers(AttributeTypeIdentifier the_attribute_type_identifier,
State the_state)
getAttributeIdentifiers in interface AttributeContainerthe_attribute_type_identifier - the_state -
public AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier the_association_identifier)
getAttributeIdentifiers in interface AttributeContainerthe_association_identifier -
public AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier the_association_identifier,
State the_state)
getAttributeIdentifiers in interface AttributeContainerthe_association_identifier - the_state -
public AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier the_association_identifier,
AttributeTypeIdentifier the_attribute_type_identifier,
boolean is_absolute)
getAttributeIdentifiers in interface AttributeContainerthe_association_identifier - the_attribute_type_identifier - is_absolute -
public AttributeIdentifier[] getAttributeIdentifiers(AssociationIdentifier the_association_identifier,
AttributeTypeIdentifier the_attribute_type_identifier,
boolean is_absolute,
State the_state)
getAttributeIdentifiers in interface AttributeContainerthe_association_identifier - the_attribute_type_identifier - is_absolute - the_state -
public AttributeIdentifier[] getAttributeIdentifiers(String logical_form)
getAttributeIdentifiers in interface AttributeContainerlogical_form -
public AttributeIdentifier[] getAttributeIdentifiers(TypeInstanceIdentifier the_type_instance_identifier)
getAttributeIdentifiers in interface AttributeContainerthe_type_instance_identifier -
public AttributeIdentifier[] getAttributeIdentifiers(TypeInstanceIdentifier the_type_instance_identifier,
State the_state)
getAttributeIdentifiers in interface AttributeContainerthe_type_instance_identifier - the_state -
public AssociationIdentifier[] getAssociationIdentifiers(TypeInstanceIdentifier the_type_instance_identifier)
getAssociationIdentifiers in interface AttributeContainerthe_type_instance_identifier -
public AssociationIdentifier[] getAssociationIdentifiers(TypeInstanceIdentifier the_type_instance_identifier,
State the_state)
getAssociationIdentifiers in interface AttributeContainerthe_type_instance_identifier - the_state -
public AssociationIdentifier[] getAssociationIdentifiers(TypeIdentifier the_type_identifier)
getAssociationIdentifiers in interface AttributeContainerthe_type_identifier -
public AssociationIdentifier[] getAssociationIdentifiers(TypeIdentifier the_type_identifier,
State the_state)
getAssociationIdentifiers in interface AttributeContainerthe_type_identifier - the_state -
public Object get(AttributeIdentifier the_attribute_identifier)
get in interface AttributeContainerthe_attribute_identifier -
public Object get(AttributeTypeIdentifier the_attribute_type_identifier)
get in interface AttributeContainerthe_attribute_type_identifier -
public Object getSingle(AttributeTypeIdentifier the_attribute_type_identifier)
getSingle in interface AttributeContainerthe_attribute_type_identifier -
public Object getSingle(String logical_form)
getSingle in interface AttributeContainerlogical_form -
public AttributeIdentifier put(AttributeIdentifier the_attribute_identifier,
Object the_content)
throws IllegalContentException,
ConstraintException
put in interface AttributeContainerthe_attribute_identifier - the_content -
IllegalContentException
ConstraintException
public AttributeIdentifier put(AttributeIdentifier the_attribute_identifier,
Object the_content,
ConstraintContainer the_constraint_container)
throws IllegalContentException,
ConstraintException
put in interface AttributeContainerthe_attribute_identifier - the_content - the_constraint_container -
IllegalContentException
ConstraintException
public void remove(AttributeIdentifier the_attribute_identifier)
throws ConstraintException
remove in interface AttributeContainerthe_attribute_identifier -
ConstraintException
public void remove(AttributeTypeIdentifier the_attribute_type_identifier)
throws ConstraintException
remove in interface AttributeContainerthe_attribute_type_identifier -
ConstraintException
public void remove(AttributeIdentifier the_attribute_identifier,
ConstraintContainer the_constraint_container)
throws ConstraintException
remove in interface AttributeContainerthe_attribute_identifier - the_constraint_container -
ConstraintException
public void remove(AttributeTypeIdentifier the_attribute_type_identifier,
ConstraintContainer the_constraint_container)
throws ConstraintException
remove in interface AttributeContainerthe_attribute_type_identifier - the_constraint_container -
ConstraintExceptionpublic com.ptc.core.meta.descriptor.common.DefinitionDescriptor getDescriptor(DefinitionIdentifier the_definition_identifier)
getDescriptor in interface AttributeContainerthe_definition_identifier -
public AttributeTypeSummary getAttributeTypeSummary(AttributeTypeIdentifier the_attribute_type_identifier)
getAttributeTypeSummary in interface AttributeContainerthe_attribute_type_identifier -
public AttributeTypeSummary getAttributeTypeSummary(AttributeTypeIdentifier the_attribute_type_identifier,
ConstraintContainer the_constraint_container,
DescriptorContainer the_descriptor_container)
getAttributeTypeSummary in interface AttributeContainerthe_attribute_type_identifier - the_constraint_container - the_descriptor_container -
public AttributeTypeSummary getAttributeTypeSummary(AssociationIdentifier the_association_identifier,
AttributeTypeIdentifier the_attribute_type_identifier,
boolean is_absolute)
getAttributeTypeSummary in interface AttributeContainerthe_association_identifier - the_attribute_type_identifier - is_absolute -
public AttributeTypeSummary getAttributeTypeSummary(AssociationIdentifier the_association_identifier,
AttributeTypeIdentifier the_attribute_type_identifier,
boolean is_absolute,
ConstraintContainer the_constraint_container,
DescriptorContainer the_descriptor_container)
getAttributeTypeSummary in interface AttributeContainerthe_association_identifier - the_attribute_type_identifier - is_absolute - the_constraint_container - the_descriptor_container -
public boolean isDirty()
isDirty in interface AttributeContainer
public boolean isContentOfState(AttributeIdentifier the_attribute_identifier,
State the_state)
isContentOfState in interface AttributeContainerthe_attribute_identifier - the_state -
public State getState(AttributeIdentifier the_attribute_identifier)
getState in interface AttributeContainerthe_attribute_identifier -
public void setState(AttributeIdentifier the_attribute_identifier,
State the_state)
setState in interface AttributeContainerthe_attribute_identifier - the_state - public void acceptDefaultContent()
acceptDefaultContent in interface AttributeContainerpublic AttributeContainer clone(boolean compact)
clone in interface AttributeContainercompact -
public ConstraintContainer getConstraintContainer()
getConstraintContainer in interface AttributeContainerpublic void setConstraintContainer(ConstraintContainer a_ConstraintContainer)
setConstraintContainer in interface AttributeContainera_ConstraintContainer - public DescriptorContainer getDescriptorContainer()
getDescriptorContainer in interface AttributeContainerpublic void setDescriptorContainer(DescriptorContainer a_DescriptorContainer)
setDescriptorContainer in interface AttributeContainera_DescriptorContainer -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||