@ Override public ProcessorResult handleWrite ( Object action ) throws ODataException { Operation operation ; if ( action instanceof Operation ) { operation = ( Operation ) action ; Object data = operation . doOperation ( getODataRequestContext ( ) , getDataSourceFactory ( ) ) ; if ( data == null ) { return new ProcessorResult ( ODataResponse . Status . NO_CONTENT ) ; } else { return new ProcessorResult ( ODataResponse . Status . CREATED , QueryResult . from ( data ) ) ; } } else { throw new ODataBadRequestException ( "Incorrect operation instance" ) ; } }
Handles action call and returns result in case when action returns it .