com.arsdigita.kernel.security
Class PartyPrincipal

java.lang.Object
  extended bycom.arsdigita.kernel.security.PartyPrincipal
All Implemented Interfaces:
Principal

public class PartyPrincipal
extends Object
implements Principal

A Principal that stores a numeric ID, such as a party ID.

Author:
Sameer Ajmani

Field Summary
static String versionId
           
 
Constructor Summary
PartyPrincipal(BigDecimal id)
          Creates a new PartyPrincipal that stores the given ID.
 
Method Summary
 boolean equals(Object that)
          Returns true if the given object is a PartyPrincipal with the same ID.
 BigDecimal getID()
          Returns the stored ID.
 String getName()
          Returns the ID number as a string.
 int hashCode()
          Returns the hashCode of the stored ID number.
 String toString()
          Same as getName().
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values
Constructor Detail

PartyPrincipal

public PartyPrincipal(BigDecimal id)
Creates a new PartyPrincipal that stores the given ID.

Method Detail

getID

public BigDecimal getID()
Returns the stored ID.

Returns:
the stored ID.

getName

public String getName()
Returns the ID number as a string.

Specified by:
getName in interface Principal
Returns:
the ID number as a string.

toString

public String toString()
Same as getName().

Specified by:
toString in interface Principal
Returns:
getName().

equals

public boolean equals(Object that)
Returns true if the given object is a PartyPrincipal with the same ID.

Specified by:
equals in interface Principal
Returns:
true if the given object is a PartyPrincipal with the same ID.

hashCode

public int hashCode()
Returns the hashCode of the stored ID number.

Specified by:
hashCode in interface Principal
Returns:
the hashCode of the stored ID number.


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 20 2004:2337 UTC