added static constructor for directly creating an entity from a request

@tanghus @butonic