/* Copyright 2004, 2005 Acegi Technology Pty Limited
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package net.sf.acegisecurity.domain.impl;

import java.io.Serializable;

/**
 * A persistable entity that uses a <code>Long</code> based identity.
 *
 * @author Ben Alex
 * @version $Id$
 */
public abstract class PersistableEntityLong extends AbstractPersistableEntity {
    //~ Instance fields ========================================================

    protected Long id;

    //~ Methods ================================================================

    /**
     * Obtains the persistence identity of this instance.
     */
    public Long getId() {
    	return this.id;
    }

    /**
     * DO NOT USE DIRECTLY.
     * 
     * <p>
     * Use {@link #getId()} instead, as it provides the correct return type.
     * This method is only provided for use by the persistence layer and to
     * satisfy the {@link net.sf.acegisecurity.domain.PersistableEntity}
     * interface contract.
     * </p>
     * 
     * <p>
     * Internally delegates to {@link #getId()}.
     * </p>
     *
     * @return the instance's identity
     */
    public Serializable getInternalId() {
        return this.getId();
    }
}

@@ -1064,24 +1064,338 @@
 ==========%0A%0A
+%0A    /**%0A     * DO NOT USE DIRECTLY.%0A     * %0A     * %3Cp%3E%0A     * Typically only used by the persistence layer, but provided with public%0A     * visibility to not limit flexibility.%0A     * %3C/p%3E%0A     *%0A     * @param id the new instance identity%0A     */%0A    public void setId(Long id) %7B%0A        this.id = id;%0A    %7D%0A    %0A
     /**%0A    

Add setId(Long) back into class, as Hibernate 3.0.5 gives Lazy Initialization Exception if using field="access" when trying to do a getId() on a lazily loaded association.