package Ġio . github . blue ground l td . app . persistence . relational . address Ċ Ċ import Ġjava . util .* Ċ import Ġjavax . persistence .* Ċ Ċ @ Entity Ċ @ Table ( name Ġ= Ġ" address ") Ċ class ĠAddress RE ( ĊĠ Ġ@ Id ĊĠ Ġ@ GeneratedValue ĊĠ Ġval Ġid : ĠUUID ? Ġ= Ġnull , ĊĊĠ Ġ@ Column ( name Ġ= Ġ" city ") ĊĠ Ġval Ġcity : ĠString , ĊĊĠ Ġ@ Column ( name Ġ= Ġ" state ") ĊĠ Ġval Ġstate : ĠString , ĊĊĠ Ġ@ Column ( name Ġ= Ġ" country ") ĊĠ Ġval Ġcountry : ĠString Ċ ) Ġ{ ĊĠ Ġoverride Ġfun ĠtoString (): ĠString Ġ= Ġ" Address RE ( id =$ id , Ġcity ='$ city ', Ġstate ='$ state ', Ġcountry ='$ country ')" Ċ } Ċ Ċ fun ĠAddress RE . is Same Address ( address : ĠString ): ĠBoolean Ġ{ ĊĠ Ġval Ġparts Ġ= Ġaddress . split ("- ") ĊĊĠ Ġif Ġ( parts . size Ġ< Ġ 3 ) Ġreturn Ġfalse ĊĊĠ Ġreturn Ġparts [ 0 ] Ġ== Ġcity Ġ&& Ġparts [ 1 ] Ġ== Ġstate Ġ&& Ġparts [ 2 ] Ġ== Ġcountry Ċ } Ċ