Class ReadCatalogEntryAttributesMediator

  • All Implemented Interfaces:
    BusinessObjectMediator, ReadBusinessObjectPartMediator

    public class ReadCatalogEntryAttributesMediator
    extends AbstractReadBusinessObjectPartMediatorImpl
    This mediator is used to convert the resultset data for the legacy ATTRIBUTE and ATTRVALUE tables and new ATTR, ATTRVAL, ATTRDESC, ATTRVALDESC, CATENTRYATTR tables into their logical manifestations in the logical CatalogEntry noun. This mediator handles the /CatalogEntry/CatalogEntryAttributes portion of the noun, although this part of the noun is also populated with simple name value pairs (from the base ReadCatalogEntryMediator) in addition to the structured attribute content.
    • Field Detail


        public static final java.lang.String ATTRIBUTE_FACETABLE_PROPERTY_NO_MAX_VALUE
        A constant representing a flag that will tell a facet to display all values or not.
        See Also:
        Constant Field Values

        public static final java.lang.String ATTRIBUTE_FACETABLE_PROPERTY_NO_MAX_VALUE_TRUE
        A constant representing a flag that will tell a facet to display all values or not. This value is true.
        See Also:
        Constant Field Values

        public static final java.lang.String ATTRIBUTE_FACETABLE_PROPERTY_NO_MAX_VALUE_FALSE
        A constant representing a flag that will tell a facet to display all values or not. This value is false.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ReadCatalogEntryAttributesMediator

        public ReadCatalogEntryAttributesMediator()
    • Method Detail

      • buildNounPart

        public void buildNounPart(java.lang.Object aNoun,
                                  java.lang.Object aPhysicalEntity)
                           throws BusinessObjectMediatorException
        Build the /CatalogEntry/CatalogEntryAttributes portion of the CatalogEntry noun, based on data contained in the result graph. If no attribute data is found in the physical graph, then the logical noun is unchanged by this operation. This method is the main method of this mediator. It performs the following steps:
        • Call buildCatalogEntryAttributes method to populate CatalogEntryAttributes portion of the CatalogEntry noun. This is the method which contains the main logic.
        • Call populateNameValuePairTypeAttribute to add the column values of CATENTRY table defined in attribute mapping (like buyable and state column) as an attribute under CatalogEntryAttributes portion of the noun.
        • Set the hasAttributeDictionaryDefiningAttributes=true flag to the user data of the CatalogEntry noun if there is at least one defining attribute dictionary attribute.
        aNoun - an Object for holding the Logical entity which is of type CatalogEntry, to be populated by copying data from physical entity
        aPhysicalEntity - an Object to hold the physical entity of type CatalogEntry which contains the data that has to be populated in Logical Entity.
        throws - an exception of type BusinessObjectMediatorException
        See Also:
        ReadBusinessObjectPartMediator.buildNounPart(java.lang.Object, java.lang.Object)
      • setAttributeType

        public static void setAttributeType(AttributePropertyType attribute,
                                            java.lang.Integer aAttrTypeId)
        Set the attribute type in the attribute. For example, attribute with allowed values and attribute with assigned values.

        attribute - The logical attribute
        aAttrTypeId - An internal attribute type id, 1 means AllowedValues, 2 or null means AssignedValues.