AggregatePartClass

public final class AggregatePartClass<A extends AggregatePart> extends AggregateClass<A>

Provides type information on an aggregate part class.

Parameters

<A>

the type of aggregate parts.

Functions

Link copied to clipboard
public static AggregatePartClass<A> asAggregatePartClass<A extends AggregatePart>(Class<A> cls)
Obtains an aggregate part class for the passed raw class.
Link copied to clipboard
Creates a new instance of the factory for creating aggregate parts of this class.
Link copied to clipboard
public R createRoot<I, R extends AggregateRoot<I>>(BoundedContext bc, I aggregateId)
Creates a new AggregateRoot within the passed Bounded Context.
Link copied to clipboard
public Class<? extends AggregateRoot<? extends Object>> rootClass()
Obtains the aggregate root class of this part class.

Inherited functions

Link copied to clipboard
public final Applier applierOf(EventClass eventClass)
Obtains event applier method for the passed class of events.
Link copied to clipboard
public static AggregateClass<A> asAggregateClass<A extends Aggregate>(Class<A> cls)
Obtains an aggregate class for the passed raw class.
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 abstract ImmutableSet<R> commandOutput()
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
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
public final EntityState defaultState()
Obtains the default state for this class of entities.
Link copied to clipboard
public final ImmutableSet<EventClass> domesticEvents()
Obtains the set of domestic event classes on which this aggregate class reacts.
Link copied to clipboard
public boolean equals(Object o)
Link copied to clipboard
public final ImmutableSet<EventClass> events()
Obtains a set of event classes which this class receives.
Link copied to clipboard
public final ImmutableSet<EventClass> externalEvents()
Obtains the set of external event classes on which this aggregate class reacts.
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 abstract H handlerOf(CommandClass commandClass)
Obtains the handler method for the passed command class.
Link copied to clipboard
public boolean handlesCommand(CommandClass commandClass)
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 ImmutableSet<EventClass> importableEvents()
Obtains a set of event classes that are imported by the aggregates of this class.
Link copied to clipboard
public final boolean importsEvents()
Returns true if aggregates of this class import events of at least one class; false otherwise.
Link copied to clipboard
public ImmutableSet<EventClass> outgoingEvents()
Obtains types of events that are going to be posted to EventBus as the result of handling messages dispatched to aggregates of this class.
Link copied to clipboard
public ImmutableSet<EventClass> reactionOutput()
Obtains the classes of events produced from the event reaction.
Link copied to clipboard
public final EventReactorMethod reactorOf(EventClass eventClass, MessageClass<?> originClass)
Obtains the method that reacts on the events of the passed class.
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.
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 ImmutableSet<EventClass> stateEvents()
Obtains set of classes of events used as arguments of applier methods.
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.