private void cacheLinkedObject ( String owningObjID , String linkFieldName , DBObject linkedObject ) { // Find or create map for the owning object. Map < String , Map < String , DBObject > > objMap = m_linkedObjectMap . get ( owningObjID ) ; if ( objMap == null ) { objMap = new HashMap < String , Map < String , DBObject > > ( ) ; m_linkedObjectMap . put ( owningObjID , objMap ) ; } // Find or create map for the link field. Map < String , DBObject > linkMap = objMap . get ( linkFieldName ) ; if ( linkMap == null ) { linkMap = new HashMap < String , DBObject > ( ) ; objMap . put ( linkFieldName , linkMap ) ; } // Add the object to the link map. linkMap . put ( linkedObject . getObjectID ( ) , linkedObject ) ; }
link field name .