2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Copyright (c) 2005 Sun Microsystems Inc. All Rights Reserved
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * The contents of this file are subject to the terms
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * of the Common Development and Distribution License
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * (the License). You may not use this file except in
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * compliance with the License.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * You can obtain a copy of the License at
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * See the License for the specific language governing
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * permission and limitations under the License.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * When distributing Covered Code, include this CDDL
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Header Notice in each file and include the License file
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * If applicable, add the following below the CDDL Header,
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * with the fields enclosed by brackets [] replaced by
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * your own identifying information:
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * $Id: JDBCPrincipal.java,v 1.2 2008/06/25 05:41:57 qcheng Exp $
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Portions Copyrighted [2011] [ForgeRock AS]
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Fosterpackage com.sun.identity.authentication.modules.jdbc;
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Fosterpublic class JDBCPrincipal implements Principal, java.io.Serializable {
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster throw new NullPointerException("illegal null input");
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Returns the JDBC username for this <code>JDBCPrincipal</code>.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * @return the JDBC username for this <code>JDBCPrincipal</code>
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Returns a string representation of this <code>JDBCPrincipal</code>.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * @return a string representation of this <code>JDBCPrincipal</code>.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Compares the specified Object with this <code>JDBCPrincipal</code>
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * for equality. Returns <code>true</code> if the given object is also a
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * <code>JDBCPrincipal</code> and the two JDBCPrincipals have the same
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * user name.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * @param o Object to be compared for equality with this
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * <code>JDBCPrincipal</code>.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * @return <code>true</code> if the specified Object is equal equal to this
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * <code>JDBCPrincipal</code>.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster return false;
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster if (this == o) {
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster return true;
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster if (!(o instanceof JDBCPrincipal)) {
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster return false;
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Returns a hash code for this <code>JDBCPrincipal</code>.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * @return a hash code for this <code>JDBCPrincipal</code>.