I am trying to use gcp datastore sample but I would like initialize repository manually. Something like SimpleJpaRepository in another SO. Is it possible to initialize DatastoreRepository ?
Example with JPA repository one can simply do :
EmployeeRepository employeeRepository = new JpaRepositoryFactory(entityManager) .getRepository(EmployeeRepository.class);
entityManager can be injected via hibernate session factory. All entity classes can be registered to the registry of session factory.
Now , in order to initialize/register EmployeeRepository : public interface EmployeeRepository extends DatastoreRepository
Note: The environment where the code will run does not have auto-wiring/annotations support.