public void removeFieldValues ( String fieldName , Collection < String > values ) { Utils . require ( ! Utils . isEmpty ( fieldName ) , "fieldName" ) ; if ( values != null && values . size ( ) > 0 ) { List < String > valueSet = m_valueRemoveMap . get ( fieldName ) ; if ( valueSet == null ) { valueSet = new ArrayList < String > ( ) ; m_valueRemoveMap . put ( fieldName , valueSet ) ; } valueSet . addAll ( values ) ; } }
Add remove values for the given field . This method should only be called for MV scalar and link fields . When the updates in this DBObject are applied to the database the given set of values are removed for the object . An exception is thrown if the field is not MV . If the given set of values is null or empty this method is a no - op .