com.kasinf.framework.rest.eneity.AbstractEntity Maven / Gradle / Ivy
package com.kasinf.framework.rest.eneity;
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
default boolean isNew() {
return null == getId();
}
}