private EntityInvocationHandler( final Object entityKey, final ClientEntity entity, final URI entitySetURI, final Class<?> typeRef, final AbstractService<?> service) { super(typeRef, entity, service); final Object key = entityKey == null ? CoreUtils.getKey(getClient(), this, typeRef, entity) : entityKey; if (entity.getEditLink() != null) { this.baseURI = entity.getEditLink(); this.uri = getClient().newURIBuilder(baseURI.toASCIIString()); } else if (key != null) { final URIBuilder uriBuilder = CoreUtils.buildEditLink(getClient(), entitySetURI.toASCIIString(), key); this.uri = uriBuilder; this.baseURI = this.uri.build(); entity.setEditLink(this.baseURI); } else { this.baseURI = null; this.uri = null; } this.internal = entity; getEntity().setMediaEntity(typeRef.getAnnotation(EntityType.class).hasStream()); this.uuid = new EntityUUID(entitySetURI, typeRef, key); }
private EntityInvocationHandler( final Object entityKey, final ClientEntity entity, final URI entitySetURI, final Class<?> typeRef, final AbstractService<?> service) { super(typeRef, entity, service); final Object key = entityKey == null ? CoreUtils.getKey(getClient(), this, typeRef, entity) : entityKey; if (entity.getEditLink() != null) { this.baseURI = entity.getEditLink(); this.uri = getClient().newURIBuilder(baseURI.toASCIIString()); } else if (key != null) { final URIBuilder uriBuilder = CoreUtils.buildEditLink(getClient(), entitySetURI.toASCIIString(), key); this.uri = uriBuilder; this.baseURI = this.uri.build(); entity.setEditLink(this.baseURI); } else { this.baseURI = null; this.uri = null; } this.internal = entity; getEntity().setMediaEntity(typeRef.getAnnotation(EntityType.class).hasStream()); this.uuid = new EntityUUID(entitySetURI, typeRef, key); }
template.setEditLink(entityURI); } else { entityURI = handler.getEntityURI();
template.setEditLink(entityURI); } else { entityURI = handler.getEntityURI();
entity.setEditLink(URIUtils.getURI(base, resource.getPayload().getEditLink().getHref()));
entity.setEditLink(URIUtils.getURI(base, resource.getPayload().getEditLink().getHref()));