com.ibm.commerce.context.content.resources.dynacache

Class InvalidationIDPattern

  • java.lang.Object
    • com.ibm.commerce.context.content.resources.dynacache.InvalidationIDPattern


  • public class InvalidationIDPattern
    extends java.lang.Object
    The WebSphere Dynamic Cache invalidation ID pattern. An InvalidationIDPattern object may contain a text string pattern and one or more InvalidationIDComponent objects. The values of the InvalidationIDComponent objects are generated based on the resource objects and the action performed on the resources. The text string pattern and the component values are combined to form cache invalidation IDs.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      The internal copyright field.
      static java.lang.String DEFAULT_COMPONENT_VALUE_MARK
      the place holder for a component value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String generateInvalidationID(java.lang.String resource, java.util.HashMap oneRecord, java.lang.String action, java.sql.Connection connection, java.lang.String schema)
      generates a WebSphere Dynamic Cache invalidation ID.
      InvalidationIDComponent[] getComponents()
      returns the components used in the pattern.
      java.lang.String getComponentValueMark()
      returns the place holder of a component value.
      java.lang.String getPattern()
      returns the pattern text string.
      void setComponents(InvalidationIDComponent[] components)
      sets the components used in the pattern.
      void setComponentValueMark(java.lang.String mark)
      sets the place holder of a component value.
      void setPattern(java.lang.String pattern)
      sets the pattern text string.
      java.lang.String toString()
      returns a string representation of the object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        The internal copyright field.
        See Also:
        Constant Field Values
      • DEFAULT_COMPONENT_VALUE_MARK

        public static final java.lang.String DEFAULT_COMPONENT_VALUE_MARK
        the place holder for a component value.
        See Also:
        Constant Field Values
    • Constructor Detail

      • InvalidationIDPattern

        public InvalidationIDPattern()
        the default constructor.
      • InvalidationIDPattern

        public InvalidationIDPattern(java.lang.String pattern,
                                     InvalidationIDComponent[] components)
        the constructor takes a string pattern and a component array as parameters.
        Parameters:
        pattern - the string pattern.
        components - the component array.
    • Method Detail

      • getComponents

        public InvalidationIDComponent[] getComponents()
        returns the components used in the pattern.
        Returns:
        the components used in the pattern.
      • getPattern

        public java.lang.String getPattern()
        returns the pattern text string.
        Returns:
        the pattern text string.
      • setComponents

        public void setComponents(InvalidationIDComponent[] components)
        sets the components used in the pattern.
        Parameters:
        components - the components used in the pattern.
      • setPattern

        public void setPattern(java.lang.String pattern)
        sets the pattern text string.
        Parameters:
        pattern - the pattern text string.
      • getComponentValueMark

        public java.lang.String getComponentValueMark()
        returns the place holder of a component value.
        Returns:
        the place holder of a component value.
      • setComponentValueMark

        public void setComponentValueMark(java.lang.String mark)
        sets the place holder of a component value.
        Parameters:
        mark - the place holder of a component value.
      • generateInvalidationID

        public java.lang.String generateInvalidationID(java.lang.String resource,
                                                       java.util.HashMap oneRecord,
                                                       java.lang.String action,
                                                       java.sql.Connection connection,
                                                       java.lang.String schema)
        generates a WebSphere Dynamic Cache invalidation ID.
        Parameters:
        resource - the resource.
        oneRecord - a HashMap object contains the values in the resource object.
        action - the action performed against the resource object.
        connection - the database connection.
        schema - the database schema name.
        Returns:
        a WebSphere Dynamic Cache invalidation ID.
      • toString

        public java.lang.String toString()
        returns a string representation of the object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a string representation of the object.