Operation execution for operations such as load, load with includes, loadStartingWith, moreLikeThis and queries can be deferred till needed using lazy session operations. Those operations ca be accessed using lazily in advanced() session operations.
Dedicated article about lazy queries can be found here.
net.ravendb.abstractions.basic.Lazy<Employee> employeeLazy =
Employee employee = employeeLazy.getValue(); // load operation will be executed here
Executing all pending lazy operations
To execute all pending lazy operations use executeAllPendingLazyOperations method from eager session operations found under eagerly in advanced() session operations.
net.ravendb.abstractions.basic.Lazy<List<Employee>> emplyeesLazy =
session.advanced().eagerly().executeAllPendingLazyOperations(); // query will be executed here
List<Employee> employees = emplyeesLazy.getValue();