public Object getObjectReference ( String field , String schemaName ) { List < String > instanceIds = references . get ( field ) ; if ( instanceIds == null || instanceIds . size ( ) == 0 ) { return null ; } String instanceId = instanceIds . get ( 0 ) ; if ( instanceId == null ) { return null ; } BeanId id = BeanId . create ( instanceId , schemaName ) ; Object instance = instances . get ( id ) ; if ( instance != null ) { return instance ; } instance = cache . get ( id ) ; instances . put ( id , instance ) ; return instance ; }
Called by a proxy to lookup single object reference . The proxy knows the schema name so the hold does not need to bother storing it .