com.softicar.platform.common.core.item.IBasicItem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-common Show documentation
Show all versions of platform-common Show documentation
The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.
package com.softicar.platform.common.core.item;
/**
* A basic item is an entity with a unique ID.
*
* @author Oliver Richers
*/
public interface IBasicItem extends Comparable {
/**
* Returns the ID of this item.
*
* @return the item ID or null
*/
Integer getId();
/**
* Return the ID of this item.
*
* @return the item ID or null
*/
default ItemId getItemId() {
Integer id = getId();
return id != null? new ItemId(id) : null;
}
}