package Ġio . github . deb op . spring data . jpa . entities Ċ Ċ import Ġorg . hibernate . annotations . Lazy Collection Ċ import Ġorg . hibernate . annotations . Lazy Collection Option Ċ import Ġjavax . persistence . Cascade Type Ċ import Ġjavax . persistence . Fetch Type Ċ import Ġjavax . persistence . JoinColumn Ċ import Ġjavax . persistence . ManyToOne Ċ import Ġjavax . persistence . Mapped Super class Ċ import Ġjavax . persistence . OneToMany Ċ Ċ /** Ċ Ġ* ĠTree Ġêµ¬ ì¡° ë¥¼ Ġê°Ģì§Ģ ëĬĶ ĠìĹ Ķ íĭ° íĭ° ìĿĺ Ġê¸°ë³¸ ĠClass Ċ Ġ* Ċ Ġ* Ġ@ author Ġdeb op Ġ( Sun gh you k ĠB ae ) Ċ Ġ*/ Ċ @ Mapped Super class Ċ abstract Ġclass ĠAbstract Jpa Tree Entity < T Ġ: ĠJ pa Tree Entity < T >> Ġ: ĠJ pa Tree Entity < T > Ġ{ ĊĊĠĠĠ Ġ@ ManyToOne ( fetch Ġ= ĠFetch Type . LA ZY ) ĊĠĠĠ Ġ@ JoinColumn ( name Ġ= Ġ" parent _ id ") ĊĠĠĠ Ġoverride Ġvar Ġparent : ĠT ? Ġ= Ġnull ĊĊĠĠĠ Ġ@ OneToMany ( mapped By Ġ= Ġ" parent ", Ġcascade Ġ= Ġ[ Cascade Type . ALL ], Ġfetch Ġ= ĠFetch Type . LA ZY ) ĊĠĠĠ Ġ@ Lazy Collection ( Lazy Collection Option . EXTRA ) ĊĠĠĠ Ġoverride Ġval Ġchildren : ĠMutable Set < T > Ġ= Ġhash Set Of () Ċ }