@ Override public boolean addOrUpdate ( T object ) { if ( object == null ) { return false ; } X primaryID = getPrimaryID ( object ) ; if ( primaryID == null ) { this . mongoTemplate . save ( object ) ; return true ; } if ( ! allowEmptyOrZeroID ( ) && AssertUtils . isEmpty ( primaryID ) ) { return false ; } this . mongoTemplate . save ( object ) ; return true ; }
Add or update an existing object in the data store .