Class ParentChildNode<PCN extends ParentChildNode<?>>

  • 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 Detail

      • ParentChildNode

        public ParentChildNode()
    • Method Detail

      • addChild

        public void addChild​(PCN childNode)
      • getChildren

        public Set<PCN> getChildren()
      • 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)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object