public class PromotionKey extends java.lang.Object implements XMLizable, NumericKey, com.ibm.websphere.cache.Sizeable
<!-- this identifies the promotion. --> <PromotionKey> <!-- Name of the promotion --> <PromotionName>DollarsOffPromotionOne</PromotionName> <!-- The store which owns this promotion. Store key is defined as the combination of the DN of the organization that owns this store and a store name --> <StoreKey> <DN>o=Root Organization</DN> <Identifier>BlueStore 201</Identifier> </StoreKey> <!-- Versions of a promotion. Statistics are associated with the version number,promotions with the same promotion key and version number but different revision are considered different revisions of the same promotion. Promotions with the same key but different version numbers are considered distinct promotions. --> <Version>0</Version> <Revision>0</Revision> </PromotionKey>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright
|
static java.lang.String |
TAG_PROMOTION_KEY
Promotion key tag.
|
static java.lang.String |
TAG_PROMOTION_NAME
Promotion name tag.
|
static java.lang.String |
TAG_REVISION
Revision tag name
|
static java.lang.String |
TAG_VERSION
Version tag name
|
Constructor and Description |
---|
PromotionKey()
Default constructor
|
PromotionKey(org.w3c.dom.Node promotionKeyNode)
Constructor based on one XML node, which represents a promotion key.
|
PromotionKey(StoreKey aKey,
java.lang.String newPromotionName,
java.lang.Integer aVersion,
java.lang.Integer aRevision)
Constructor of PromotionKey
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object aObject)
This method checks for equality.
|
void |
fromXML(org.w3c.dom.Node node)
Transforms the XML node into its corresponding real Object.
|
java.lang.Number |
getNumericKey()
Returns the numeric value of the promotion key.
|
long |
getObjectSize()
Returns the estimated footprint size in bytes
of this object and the objects it contains.
|
java.lang.String |
getPromotionName()
Returns the promotion name.
|
java.lang.Integer |
getRevision()
Returns the revision.
|
StoreKey |
getStoreKey()
Returns the store key associated with the promotion by its key.
|
java.lang.Integer |
getVersion()
Returns the version number.
|
int |
hashCode()
This method returns the hash code.
|
boolean |
isNumericKeySet()
Returns true if the numeric key of this promotion key is set
|
void |
setNumericKey(java.lang.Number aNumericKey)
Sets the numeric value of the promotion key.
|
void |
setRevision(java.lang.Integer aRevision)
Sets the revision.
|
void |
setStoreKey(StoreKey aStoreKey)
Sets the store key associated with the promotion by its key.
|
void |
setVersion(java.lang.Integer aVersion)
Sets the version.
|
java.lang.String |
toString()
Returns the String representation of this key.
|
java.lang.String |
toXML()
Converts the object into its corresponding XML format representation.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String TAG_PROMOTION_KEY
public static final java.lang.String TAG_PROMOTION_NAME
public static final java.lang.String TAG_VERSION
public static final java.lang.String TAG_REVISION
public PromotionKey()
public PromotionKey(StoreKey aKey, java.lang.String newPromotionName, java.lang.Integer aVersion, java.lang.Integer aRevision)
aKey
- store key identifies the store to which this promotion belongs to.newPromotionName
- the name of the promotionaVersion
- the version number of the promotionaRevision
- the revision number of the promotionpublic PromotionKey(org.w3c.dom.Node promotionKeyNode)
promotionKeyNode
- promotionKeyNode XML nodepublic long getObjectSize()
getObjectSize
in interface com.ibm.websphere.cache.Sizeable
public java.lang.String getPromotionName()
public boolean equals(java.lang.Object aObject)
equals
in class java.lang.Object
Object.equals(Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.String toString()
toString
in class java.lang.Object
public void fromXML(org.w3c.dom.Node node) throws DeXMLizationException
XMLizable
fromXML
in interface XMLizable
node
- The node that represents an XMLizable objectDeXMLizationException
- when this process failsXMLizable.fromXML(Node)
public java.lang.String toXML() throws XMLizationException
XMLizable
toXML
in interface XMLizable
XMLizationException
- when this process failsXMLizable.toXML()
public java.lang.Number getNumericKey()
getNumericKey
in interface NumericKey
public void setNumericKey(java.lang.Number aNumericKey)
aNumericKey
- sets the numeric value of the promotion key.public boolean isNumericKeySet()
isNumericKeySet
in interface NumericKey
public StoreKey getStoreKey()
public void setStoreKey(StoreKey aStoreKey)
aStoreKey
- The store key associated with the promotion by its key to set.public java.lang.Integer getRevision()
public java.lang.Integer getVersion()
public void setRevision(java.lang.Integer aRevision)
aRevision
- The revision to set.public void setVersion(java.lang.Integer aVersion)
aVersion
- The version to set.