docs: composite entity

This commit is contained in:
Ilkka Seppälä
2024-03-30 21:51:17 +02:00
parent e00e67c9a6
commit fd109955dc
3 changed files with 94 additions and 53 deletions
@@ -24,21 +24,18 @@
*/
package com.iluwatar.compositeentity;
import lombok.Getter;
import lombok.Setter;
/**
* It is an object, which can contain other dependent objects (there may be a tree of objects within
* the composite entity), that depends on the coarse-grained object and has its life cycle managed
* by the coarse-grained object.
*/
@Setter
@Getter
public abstract class DependentObject<T> {
T data;
public void setData(T message) {
this.data = message;
}
public T getData() {
return data;
}
}