CommandHandlingEntityClass

public abstract class CommandHandlingEntityClass<E extends Entity> extends EntityClass<E> implements CommandHandlingClass<R, H>

Abstract base for entity classes that handle commands.

Inheritors

Constructors

Link copied to clipboard
protected void CommandHandlingEntityClass(Class<E> cls)

Functions

Link copied to clipboard
public ImmutableSet<EventClass> commandOutput()
Obtains classes of all messages produced as a result of command handling.
Link copied to clipboard
public ImmutableSet<CommandClass> commands()
Obtains classes of commands handled by the class.
Link copied to clipboard
Obtains the handler method for the passed command class.
Link copied to clipboard
public boolean handlesCommand(CommandClass commandClass)
Link copied to clipboard
public ImmutableSet<EventClass> rejections()
Obtains classes of rejections that command handling methods of this class throw, or empty set if no rejections are thrown.

Inherited functions

Link copied to clipboard
public static EntityClass<E> asEntityClass<E extends Entity>(Class<E> cls)
Obtains an entity class for the passed raw class.
Link copied to clipboard
public final Columns columns()
Obtains the entity columns of this class.
Link copied to clipboard
public final Constructor<E> constructor()
Obtains constructor for the entities of this class.
Link copied to clipboard
public E create(Object constructionArgument)
Creates new entity.
Link copied to clipboard
Creates a new instance of the factory for creating entities.
Link copied to clipboard
public final EntityState defaultState()
Obtains the default state for this class of entities.
Link copied to clipboard
public boolean equals(Object o)
Link copied to clipboard
public final EntityFactory<E> factory()
Obtains the factory for creating entities.
Link copied to clipboard
protected static ModelClass<T> get<T, M extends ModelClass<T>>(Class<T> rawClass, Class<M> requestedModelClass, Supplier<ModelClass<T>> supplier)
Obtains the model class for the passed raw class.
Link copied to clipboard
public int hashCode()
Link copied to clipboard
public final Class<? extends Object> idClass()
Obtains the class of IDs used by the entities of this class.
public static Class<I> idClass<I>(Class<? extends Entity> cls)
Obtains the class of identifiers from the passed entity class.
Link copied to clipboard
public final Class<? extends EntityState> stateClass()
Obtains the class of the state of entities of this class.
Link copied to clipboard
public static Class<S> stateClassOf<S extends EntityState>(Class<? extends Entity> entityClass)
Retrieves the state class of the passed entity class.
Link copied to clipboard
public final MessageType stateType()
Obtains the entity state type.
Link copied to clipboard
public final TypeUrl stateTypeUrl()
Obtains type URL of the state of entities of this class.
Link copied to clipboard
public final EntityTypeName typeName()
Obtains the name of this class as an EntityTypeName.
Link copied to clipboard
public Class<E> value()
Obtains the raw class of the entities.
Link copied to clipboard
Obtains the visibility of this entity type as declared in the Protobuf definition.