All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.blazebit.persistence.testsuite.entity.LongSequenceEntity Maven / Gradle / Ivy

The newest version!
package com.blazebit.persistence.testsuite.entity;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;

/**
 *
 * @author Christian Beikov
 * @since 1.2.0
 */
@MappedSuperclass
public class LongSequenceEntity implements Serializable {

    private Long id;

    @Id
    @GeneratedValue
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof LongSequenceEntity)) return false;
        LongSequenceEntity that = (LongSequenceEntity) o;
        return id != null ? id.equals(that.id) : that.id == null;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy