Entity
- public abstract class BaseAggregateRoot<Entity> extends Object implements IAggregateRoot
IAggregateRoot
.限定符和类型 | 字段和说明 |
---|---|
protected Exchange |
exchange |
protected DirtyMemento |
memento |
构造器和说明 |
---|
BaseAggregateRoot() |
限定符和类型 | 方法和说明 |
---|---|
void |
assureSatisfied(ISpecification<Entity> specification)
业务归约要满足.
|
protected void |
dirty(IDirtyHint hint) |
<T extends IDirtyHint> |
firstHintOf(Class<T> hintClass) |
protected void |
mergeDirtyWith(IMergeAwareDirtyHint hint) |
protected abstract void |
whenNotSatisfied(Notification notification)
业务规约没有满足时如何处理.
|
<T> T |
xGet(String key,
Class<T> valueType)
从临时交换区里取值.
|
boolean |
xIs(String key)
临时交换区方便的布尔类型取值.
|
void |
xSet(String key,
Object value)
临时交换区赋值.
|
protected DirtyMemento memento
protected Exchange exchange
protected final void dirty(IDirtyHint hint)
protected final void mergeDirtyWith(IMergeAwareDirtyHint hint)
public <T extends IDirtyHint> T firstHintOf(Class<T> hintClass)
public void assureSatisfied(ISpecification<Entity> specification)
specification
- 业务归约protected abstract void whenNotSatisfied(Notification notification)
notification
- 未满足原因public <T> T xGet(String key, Class<T> valueType) throws ClassCastException
public boolean xIs(String key) throws ClassCastException
Copyright © 2020–2023. All rights reserved.