oracle.xdb.servlet

## Class XDBPrincipal

- java.lang.Object
- - oracle.xdb.servlet.XDBPrincipal

All Implemented Interfaces:
  java.security.Principal

    public class XDBPrincipal
    extends java.lang.Object
    implements java.security.Principal

Implementation of java.security.principal for database user.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `equals(java.lang.Object o)` Compares the given object with this object.
`java.lang.String` `getName()` Return the user name.
`int` `hashCode()` Return the hash value of the user name.
`java.lang.String` `toString()` Return the string representation.

### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.security.Principal

`implies`

### Method Detail

#### equals

    public final boolean equals(java.lang.Object o)

Compares the given object with this object.

Specified by:
  `equals` in interface `java.security.Principal`
Overrides:
  `equals` in class `java.lang.Object`
Parameters:
  `o` - the given object
Returns:
  true if the given object is an instance of XDBPrincipal and has the same user id as this object.

#### getName

    public final java.lang.String getName()

Return the user name.

Specified by:
  `getName` in interface `java.security.Principal`
Returns:
  the user name.

#### toString

    public final java.lang.String toString()

Return the string representation.

Specified by:
  `toString` in interface `java.security.Principal`
Overrides:
  `toString` in class `java.lang.Object`
Returns:
  the user name.

#### hashCode

    public final int hashCode()

Return the hash value of the user name.

Specified by:
  `hashCode` in interface `java.security.Principal`
Overrides:
  `hashCode` in class `java.lang.Object`
Returns:
  the hash value of the user name.

Copyright © 2003, 2017, Oracle and/or its affiliates. All rights reserved.