public class Aggregate extends Entity implements Iterable<Entity>
A special type of Entity that helps to propagate changes from any entity in the aggregate to the aggregate root. This can be handy if there is a primary entity that contains some aggregated "sub-entities". The sub-entities cannot exist outside the context of their aggregate root, and changes to any of the sub-entities will imply that the root is dirty.
Modifier and Type | Method and Description |
---|---|
void |
add(Entity entity) |
protected void |
clearChanged() |
Entity |
getRoot() |
boolean |
hasChanged() |
Iterator<Entity> |
iterator() |
void |
notifyObservers(Object arg) |
void |
remove(Entity entity) |
add, addPropertyChangeListener, addPropertyChangeListener, addVetoablePropertyChangeListener, addVetoablePropertyChangeListener, createImageToFile, createImageToFile, createImageToFile, createImageToFile, createImageToFile, createImageToFile, createImageToFile, createImageToFile, createImageToStorage, createImageToStorage, createImageToStorage, createImageToStorage, createImageToStorage, createImageToStorage, createImageToStorage, createImageToStorage, entityTypeBuilder, findProperty, firePropertyChangeEvent, fireVetoablePropertyChangeEvent, get, get, get, getAggregate, getBoolean, getBoolean, getDate, getDate, getDouble, getDouble, getEntity, getEntity, getEntityList, getEntityList, getEntityListNonNull, getEntityNonNull, getEntityType, getInt, getInt, getLong, getLong, getText, getText, hasPropertyChangeListeners, hasVetoablePropertyChangeListeners, isEmpty, isEmpty, isEntity, isEntity, isFalsey, isFalsey, removePropertyChangeListener, removePropertyChangeListener, removeVetoablePropertyChangeListener, removeVetoablePropertyChangeListener, set, set, set, set, setBoolean, setBoolean, setBoolean, setChanged, setDate, setDate, setDate, setDouble, setDouble, setDouble, setEntity, setEntity, setEntity, setEntityType, setFloat, setFloat, setFloat, setInt, setInt, setInt, setLong, setLong, setLong, setText, setText, setText, toMap
addObserver, countObservers, deleteObserver, deleteObservers, notifyObservers, setChanged
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public Aggregate(Entity root)
public Entity getRoot()
public void add(Entity entity)
public void remove(Entity entity)
public boolean hasChanged()
hasChanged
in class Observable
protected void clearChanged()
Entity
clearChanged
in class Entity
public void notifyObservers(Object arg)
notifyObservers
in class Observable
Copyright © 2021. All Rights Reserved.