public Map < String , Object > getProperties ( ) { Map < String , Object > properties = ( ( PropertiesField ) this . getField ( CalendarEntry . PROPERTIES ) ) . getProperties ( ) ; if ( ! this . getField ( Anniversary . ANNIV_MASTER_ID ) . isNull ( ) ) if ( this . getField ( Anniversary . ANNIV_MASTER_ID ) instanceof ReferenceField ) { Record recAnnivMaster = ( ( ReferenceField ) this . getField ( Anniversary . ANNIV_MASTER_ID ) ) . getReference ( ) ; if ( ( recAnnivMaster != null ) && ( ( recAnnivMaster . getEditMode ( ) == DBConstants . EDIT_CURRENT ) || ( recAnnivMaster . getEditMode ( ) == DBConstants . EDIT_IN_PROGRESS ) ) ) { Map < String , Object > propMaster = ( ( PropertiesField ) recAnnivMaster . getField ( AnnivMaster . PROPERTIES ) ) . getProperties ( ) ; if ( propMaster != null ) { if ( properties != null ) propMaster . putAll ( properties ) ; // Merge them properties = propMaster ; } } } return properties ; }
Get the properties from the Properties field and merge with the properties from the Master field if it exists .