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

com.kasinf.framework.rest.eneity.AbstractEntity Maven / Gradle / Ivy

The newest version!
package com.kasinf.framework.rest.eneity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.data.domain.Persistable;

import java.io.Serializable;

/**
 * @author KAISER
 * 抽象实体基类
 */
public interface AbstractEntity extends Persistable {
    /**
     * Returns the id of the entity.
     *
     * @return the id. Can be {@literal null}.
     */
    @Override
    ID getId();

    /**
     * (non-Javadoc)
     * @see org.springframework.data.domain.Persistable#isNew()
     * @return boolean
     */
    @Override
    @JsonIgnore
    default boolean isNew() {
        return null == getId();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy