Hi Joe, i think you need to dig deep into Spring Data Neo4j. A starting point would be the spring configuration <neo4j:repositories ...> there for you have to digg into *Neo4jNamespaceHandler* where you have to set up the same infrastruction objects like SDN does.
Why not just create an ApplicationContext provide the SDN config and the afterwards call context.getBean(...) to get your magic repository? I think that would be a simple way which also makes your app maintainable. You should be aware, that there will be SDN4 in a few weeks which will have breaking changes. Best, Patrick On Thu, Jun 4, 2015 at 1:25 AM, Josef Karthauser <[email protected]> wrote: > Hi folks, > > Can someone familiar with Spring-Data-Neo4j please tell me how to > instantiate a GraphRepository instance without using Spring? > > I know I can *neo4jTemplate.repositoryFor(DomainClass)* to get one, but > how do I instantiate an instance of an interface? > > i.e.: > > * interface MyFooGraph implements GraphRepository(Foo) {* > * @Query("SOME CYPHER QUERY WHERE a.property={0} RETURN count(a) > <> 0")* > * boolean exists(Long id)* > > * }* > > How do I, in code, get an instance of a *MyFooGraph*? > > I don't have the luxury of Spring in the current project, but I do want > SDN magic. > > Many thanks, > Joe > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
