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

com.github.azbh111.utils.java.model.IDAccessor Maven / Gradle / Ivy

package com.github.azbh111.utils.java.model;

/**
 *
 * @author pyz
 * @date 2019/3/28 10:07 PM
 */
public interface IDAccessor {
    T getId();

    default public boolean isNew() {
        if (getId() == null) {
            return true;
        }
        if (getId() instanceof Number) {
            return !(((Number) getId()).doubleValue() > 0);
        }
        return false;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy