@SuppressWarnings("unchecked") @Override public Optional<?> deserialize( final VPackSlice parent, final VPackSlice vpack, final VPackDeserializationContext context, final ParameterizedType type) throws VPackException { return Optional.ofNullable(context.deserialize(vpack, Class.class.cast(type.getActualTypeArguments()[0]))); } };
@SuppressWarnings("rawtypes") @Override public BaseEdgeDocument deserialize( final VPackSlice parent, final VPackSlice vpack, final VPackDeserializationContext context) throws VPackException { return new BaseEdgeDocument((Map) context.deserialize(vpack, Map.class)); } };
@SuppressWarnings("rawtypes") @Override public BaseDocument deserialize( final VPackSlice parent, final VPackSlice vpack, final VPackDeserializationContext context) throws VPackException { return new BaseDocument((Map) context.deserialize(vpack, Map.class)); } };
@Override public ArangoSearchPropertiesEntity deserialize( final VPackSlice parent, final VPackSlice vpack, final VPackDeserializationContext context) throws VPackException { final ViewEntity entity = context.deserialize(vpack, ViewEntity.class); final ArangoSearchProperties properties = context.deserialize(vpack, ArangoSearchProperties.class); final ArangoSearchPropertiesEntity result = new ArangoSearchPropertiesEntity(entity.getId(), entity.getName(), entity.getType(), properties); return result; } };
if (consolidationPolicy.isObject()) { properties.setConsolidationPolicy( (ConsolidationPolicy) context.deserialize(consolidationPolicy, ConsolidationPolicy.class));
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override public Response deserialize( final VPackSlice parent, final VPackSlice vpack, final VPackDeserializationContext context) throws VPackException { final Response response = new Response(); response.setVersion(vpack.get(0).getAsInt()); response.setType(vpack.get(1).getAsInt()); response.setResponseCode(vpack.get(2).getAsInt()); if (vpack.size() > 3) { response.setMeta((Map) context.deserialize(vpack.get(3), Map.class)); } return response; } };