com.karmasphere.share.persist
Class Identity
java.lang.Object
com.karmasphere.share.persist.Persistent
com.karmasphere.share.persist.Identity
- All Implemented Interfaces:
- IdentityType.Discriminated, Comparable<Identity>
public final class Identity
- extends Persistent
- implements Comparable<Identity>, IdentityType.Discriminated
A 'holder' class for identity data, used for transformation and
hashing.
|
Field Summary |
static int |
INVALID_MASK
A marker value for an invalid mask. |
INVALID_MASK
public static final int INVALID_MASK
- A marker value for an invalid mask.
- See Also:
- Constant Field Values
Identity
public Identity(IdentityType type,
byte[] data,
int mask)
Identity
public Identity(int idtype,
byte[] data,
int mask)
setIdentityType
public void setIdentityType(IdentityType type)
getIdentityType
public IdentityType getIdentityType()
- Specified by:
getIdentityType in interface IdentityType.Discriminated
setIdentityTypeId
public void setIdentityTypeId(int idtype)
getIdentityTypeId
public int getIdentityTypeId()
setData
public void setData(byte[] data)
getData
public byte[] getData()
- Returns the identity data.
The internal array is returned. Do not modify it.
getDataString
public String getDataString()
setMask
public void setMask(int mask)
getMask
public int getMask()
equals
public boolean equals(Object o)
- Overrides:
equals in class Object
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
compareTo
public int compareTo(Identity i)
- Specified by:
compareTo in interface Comparable<Identity>
toString
public String toString()
- Description copied from class:
Persistent
- Returns a simple String representation of this Persistent.
- Overrides:
toString in class Persistent
Copyright © 2004-2005 Karamsphere. All Rights Reserved.