Entity

public interface Entity<I, S extends EntityState> implements WithLifecycle

A server-side object with an identity.

A state of an entity is defined as a Protobuf message.

Lifecycle flags determine if an entity is active. An entity is considered to be active if the lifecycle flags are not set. If an entity is archived or deleted, then it’s regarded to be inactive.

Parameters

<I>

the type of the entity identifier

<S>

the type of the entity state

Inheritors

Types

Link copied to clipboard
public enum GenericParameter
Enumeration of generic type parameters of this interface.

Functions

Link copied to clipboard
public abstract I id()
Obtains the identifier of the entity.
Link copied to clipboard
public String idAsString()
Obtains string representation of the entity identifier.
Link copied to clipboard
public abstract boolean lifecycleFlagsChanged()
Tells whether lifecycle flags of the entity changed since its initialization.
Link copied to clipboard
public abstract S state()
Obtains the state of the entity.
Link copied to clipboard
public abstract Version version()
Obtains the version of the entity.

Inherited functions

Link copied to clipboard
public abstract LifecycleFlags getLifecycleFlags()
Obtains current lifecycle flags.
Link copied to clipboard
public boolean isActive()
Verifies if any of the lifecycle attributes is set.
Link copied to clipboard
public boolean isArchived()
Shows if current instance is marked as archived or not.
Link copied to clipboard
public boolean isDeleted()
Shows if current instance is marked as deleted or not.
Link copied to clipboard
public LifecycleFlags lifecycleFlags()
Obtains current lifecycle flags.