Class ParentChildNode<PCN extends ParentChildNode<?>>
- java.lang.Object
-
- com.activeviam.risk.ref.parentchild.nodes.ParentChildNode<PCN>
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
BookParentChildNode
,CounterpartyParentChildNode
,LegalEntityParentChildNode
public class ParentChildNode<PCN extends ParentChildNode<?>> extends Object implements Serializable
This class is being both used the model for the data map for out datastore and also the model for mapping our data to JSON. Some may view this as a code stink because it couples purpose of a DTO class with that of a generic data modal into one object. The ParentChildNode encapsulates the most important data about nodes, its parent and child data. With the child array and parent string we can chain chain nodes together to create a tree/hierarchy of the data.- Author:
- ActiveViam
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ParentChildNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChild(PCN childNode)
boolean
equals(Object obj)
LocalDate
getAsOfDate()
Set<PCN>
getChildren()
String
getName()
String
getParent()
int
hashCode()
void
setAsOfDate(LocalDate asOfDate)
void
setChildren(Set<ParentChildNode<?>> children)
void
setName(String name)
void
setParent(String parent)
-
-
-
Method Detail
-
addChild
public void addChild(PCN childNode)
-
setChildren
public void setChildren(Set<ParentChildNode<?>> children)
-
getName
public String getName()
-
getParent
public String getParent()
-
getAsOfDate
public LocalDate getAsOfDate()
-
setName
public void setName(String name)
-
setParent
public void setParent(String parent)
-
setAsOfDate
public void setAsOfDate(LocalDate asOfDate)
-
-