com.ibm.commerce.registry

Class BusinessPolicyCommandEntry

  • java.lang.Object
    • com.ibm.commerce.registry.BusinessPolicyCommandEntry
  • All Implemented Interfaces:
    com.ibm.commerce.datatype.Hashable, com.ibm.commerce.datatype.Scrubbable, com.ibm.websphere.cache.Sizeable, java.io.Serializable


    public class BusinessPolicyCommandEntry
    extends java.lang.Object
    implements java.io.Serializable, com.ibm.commerce.datatype.Scrubbable, com.ibm.websphere.cache.Sizeable
    This class defines a business policy command data.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      BusinessPolicyCommandEntry()
      Constructor for BusinessPolicyCommandEntry.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object obj) 
      java.lang.Class getCommandClass()
      Gets the command class object.
      java.lang.String getCommandClassName()
      Gets the command class name.
      static java.lang.String getCommandClassNameFromInterface(java.lang.String commandInterfaceName)
      Gets the default implementation of an interface.
      java.lang.String getCommandInterfaceName()
      Gets the command interface name.
      int getMemorySizeExcludingObjectsToScrub()
      Returns the approximate size in bytes of this object, not including the sizes of the objects returned by the getObjectsToScrub.
      long getObjectSize()
      Returns the estimated footprint size in bytes of this object and the objects it contains.
      java.util.ArrayList getObjectsToScrub()
      Returns a list of objects that should be replaced with equivalent objects from the Scrubb cache, or should be placed in the Scrubb cache if no equivalent object is yet in the cache.>/p>
      TypedProperty getProperties()
      Gets the properties associated with this command.
      int hashCode() 
      void initialize(java.lang.Long anPolicyId, java.lang.String astrCommandInterfacename, java.util.List alistClassNames)
      Initialize the entry.
      void setScrubbedObjects(java.util.List alistScrubbedObjects)
      Provides a list of "scrubbed" objects that should replace the objects provided by a previous call to the getObjectsToScrub method.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BusinessPolicyCommandEntry

        public BusinessPolicyCommandEntry()
        Constructor for BusinessPolicyCommandEntry.
    • Method Detail

      • getObjectSize

        public long getObjectSize()
        Returns the estimated footprint size in bytes of this object and the objects it contains.
        Specified by:
        getObjectSize in interface com.ibm.websphere.cache.Sizeable
        Returns:
        the estimated footprint size in bytes or -1 if a size cannot be determined.
      • getMemorySizeExcludingObjectsToScrub

        public int getMemorySizeExcludingObjectsToScrub()

        Returns the approximate size in bytes of this object, not including the sizes of the objects returned by the getObjectsToScrub.

        Specified by:
        getMemorySizeExcludingObjectsToScrub in interface com.ibm.commerce.datatype.Scrubbable
        Returns:
        the approximate size in bytes of this object.
      • getObjectsToScrub

        public java.util.ArrayList getObjectsToScrub()

        Returns a list of objects that should be replaced with equivalent objects from the Scrubb cache, or should be placed in the Scrubb cache if no equivalent object is yet in the cache.>/p>

        The caller must be able to promise that this object and all its properties, recursively, will never be modified again, so that it and its properties can be shared by other objects.

        This method is intended to be called by the Scrubb class. Any other use is not supported.

        Specified by:
        getObjectsToScrub in interface com.ibm.commerce.datatype.Scrubbable
        Returns:
        null, or a list of objects to be "scrubbed". Each element must correctly implement the equals and hashCode methods so that it can be saved in a HashMap.
      • setScrubbedObjects

        public void setScrubbedObjects(java.util.List alistScrubbedObjects)

        Provides a list of "scrubbed" objects that should replace the objects provided by a previous call to the getObjectsToScrub method.

        The caller must be able to promise that this object and all its properties, recursively, will never be modified again, so that it and its properties can be shared by other objects.

        This method is intended to be called by the Scrubb class. Any other use is not supported.

        Specified by:
        setScrubbedObjects in interface com.ibm.commerce.datatype.Scrubbable
        Parameters:
        alistScrubbedObjects - a list of "scrubbed" objects. Must be equivalent to the list returned by getObjectsToScrub.
      • getCommandInterfaceName

        public final java.lang.String getCommandInterfaceName()
        Gets the command interface name.

        Returns:
        command interface name
      • getCommandClass

        public java.lang.Class getCommandClass()
        Gets the command class object.

        Returns:
        command class object
      • getCommandClassName

        public java.lang.String getCommandClassName()
        Gets the command class name.

        Returns:
        command class name
      • getProperties

        public TypedProperty getProperties()
        Gets the properties associated with this command.
        Returns:
        command properties
      • initialize

        public final void initialize(java.lang.Long anPolicyId,
                                     java.lang.String astrCommandInterfacename,
                                     java.util.List alistClassNames)
                              throws ECException
        Initialize the entry.
        Parameters:
        anPolicyId -
        astrCommandInterfacename -
        alistClassNames -
        Throws:
        ECException
      • getCommandClassNameFromInterface

        public static java.lang.String getCommandClassNameFromInterface(java.lang.String commandInterfaceName)
        Gets the default implementation of an interface. The default implementation class name is defined by the field "defaultCommandClassName".

        Parameters:
        commandInterfaceName - command interface name
        Returns:
        default implementation class name if defined
      • equals

        public boolean equals(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object