<commit_before>/* 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 <NAME>
 * @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();
    }
}
<commit_msg>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.<commit_after>/* 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 <NAME>
 * @version $Id$
 */
public abstract class PersistableEntityLong extends AbstractPersistableEntity {
    //~ Instance fields ========================================================

    protected Long id;

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


    /**
     * DO NOT USE DIRECTLY.
     * 
     * <p>
     * Typically only used by the persistence layer, but provided with public
     * visibility to not limit flexibility.
     * </p>
     *
     * @param id the new instance identity
     */
    public void setId(Long id) {
        this.id = id;
    }
    
    /**
     * 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();
    }
}

{'fraction_non_alphanumeric': 0.14922383575363043, 'fraction_numerical': 0.006760140210315473, 'mean_word_length': 2.8861867704280155, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6963664', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1049, 'n_words': 417}