Session: How to get entity url?
getDocumentUrl is a method in
advanced() session operations that returns full url for a given entity.
public String getDocumentUrl(Object entity);
|entity||Object||Instance of an entity for which url will be returned.|
|String||Full url for a given
Employee employee = session.load(Employee.class, "employees/1"); // http://localhost:8080/databases/Northwind/docs/employees/1 String url = session.advanced().getDocumentUrl(employee);
If the entity is transient (not attached) this method will throw