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

org.solovyev.common.VersionedEntity Maven / Gradle / Ivy

package org.solovyev.common;

import org.jetbrains.annotations.NotNull;

import java.io.Serializable;

/**
 * User: serso
 * Date: 4/29/12
 * Time: 9:45 PM
 */
public interface VersionedEntity extends Serializable, JCloneable> {

    @NotNull
    I getId();

    @NotNull
    Integer getVersion();

    // check if two entities are the same == this.id equals to that.id
    boolean equals(Object that);

    // check if two entities are the same version == this.id equals to that.id && this.version equals to that.version
    boolean equalsVersion(Object that);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy