Examples of RestResultException


Examples of org.neo4j.rest.graphdb.RestResultException

                Object resultValue = convertSingleTypeToResultType(entry.getValue(), typeInformation, typeInformation.genericArguments[1]);
                result.put(resultKey, resultValue);
            }
            return result;
        }
           throw new RestResultException("could not convert Type "+ resultObject.getClass().getName()+" to Type "+typeInformation.type.getName());

    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.RestResultException

           if (extractor.canHandle(resultObject)){
              final List<Map<String, Object>> data = extractor.extract((Map)resultObject);
               return (Iterable<?>)data;
           }
        }
         throw new RestResultException("could not convert Type "+ resultObject.getClass().getName()+" to Iterable");
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.RestResultException

    private Map<?,?> toMap (Object resultObject){
       if (Map.class.isAssignableFrom(resultObject.getClass())){
            return (Map<?,?>)resultObject;
        }
         throw new RestResultException("could not convert Type "+ resultObject.getClass().getName()+" to Map");
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.RestResultException

               ConversionInfo resultInfo = convertFromCollectionType(resultObject, singleObjectType);
               if (resultInfo.isSuccessfulConversion()){
                   return resultInfo.getConversionData();
               }
          }
         throw new RestResultException("could not convert Type "+ resultObject.getClass().getName()+" to Type "+typeInformation.type.getName());
    }
View Full Code Here

Examples of org.neo4j.rest.graphdb.RestResultException

    @SuppressWarnings("unchecked")
    protected Map<Long, Object> convertRequestResultToEntities(RestOperations operations, RequestResult response) {
        Object result = response.toEntity();
        if (RestResultException.isExceptionResult(result)) {
            throw new RestResultException(result);
        }
        Collection<Map<String, Object>> responseCollection = (Collection<Map<String, Object>>) result;
        Map<Long, Object> mappedObjects = new HashMap<Long, Object>(responseCollection.size());
        for (Map<String, Object> entry : responseCollection) {
            if (RestResultException.isExceptionResult(entry)) {
                throw new RestResultException(entry);
            }
            final Long batchId = getBatchId(entry);
            final RequestResult subResult = RequestResult.extractFrom(entry);
            RestOperations.RestOperation restOperation = operations.getOperation(batchId);
            Object entity = restOperation.getResultConverter().convertFromRepresentation(subResult);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.