You could just use the direct repository factory for that.
directGraphRepositoryFactory.createGraphRepository(clazz).findAll()
normally you would have a
interface PersonRepository extends GraphRepository<Person> {}
and get this injected.
@Autowired PersonRepository personRepository;
personRepository.findAll();
Cheers
Michael
Today I discussed some nice derived-method for cypher queries.
See:
https://github.com/SpringSource/spring-data-graph/wiki/Repository-query-methods
Am 16.06.2011 um 14:30 schrieb Alfredas Chmieliauskas:
> Dear Michael,
>
> sounds great! Especially the annotated repository methods. That was
> something *really* desirable and now its there. Fantastischt!
>
> One question though. Before the upgrade i used to have a handy method
> to find all things of a type (Class) by using a method like
>
> public <T extends NodeBacked> Iterable<T> findAll(Class<T> clazz) {
> finderFactory.createNodeEntityFinder(clazz).findAll();
> }
>
> is there a good way to replicate such functionality in the current release?
>
> Alfredas
>
> P.S. we're delayed with publishing our energy simulations (bureaucracy
> problems more than technical or conceptual). but i'm still determined
> to make it happen (publish the thing online) before summer end.
>
> On Wed, Jun 15, 2011 at 10:17 AM, Michael Hunger
> <[email protected]> wrote:
>> Dear Graphistas,
>>
>> After some quiet time that I spend on other important issues, we're back on
>> our regular release cycle/rhythm.
>>
>> We discussed the future SDG roadmap with our CEO Emil and decided to work
>> first on the issues that were
>> reported by our users here on the mailing list, on the spring forums and on
>> twitter.
>>
>> So primarily we updated the dependencies to Neo4j 1.4.M04 and AspectJ
>> (1.6.12.M1), the latter fixing some issues.
>>
>> With the new Neo4j release we are also able to start working some important
>> new features.
>>
>> The most interesting one is the adoption of the query language "cypher"
>> which is now accessible from NodeEntities (dynamic annotated fields,
>> introduced methods) and repositories (annotated repository interface
>> methods).
>> (https://jira.springsource.org/browse/DATAGRAPH-91)
>>
>> Example, NodeEntity-field:
>>
>> @GraphQuery("start me=(%d) match
>> (me)-[:works_at]->(company)<-[:works_at]-(colleague) return colleague")
>> Iterable<Person> colleagues;
>>
>> Example, Repository:
>>
>> interface PersonRepository extends GraphRepository<Person> {
>> @GraphQuery("start person=(%d) match (person)-[:boss]->(boss) return boss")
>> Person findBoss(Person developer);
>> }
>>
>> We also accommodate for the change of allowing self-relationships.
>>
>> Another annoyance for SDG users - the need to specify an elementClass on
>> @RelatedTo annotations has also been removed this change will also be added
>> to the other annotations that we use.
>>
>> We would like to get your feedback on those changes and also on Spring Data
>> Graph in general, so please check it out and get back to us.
>>
>> And please spread the word:
>> http://twitter.com/#!/neo4j/statuses/80503228319547392
>>
>> Cheers
>>
>> Michael
>>
>> Announcement: http://www.springsource.org/node/3152
>> JIRA: https://jira.springsource.org/browse/DATAGRAPH
>> Project Page: http://www.springsource.org/spring-data/neo4j
>> Forum: forum.springsource.org/forumdisplay.php?f=80
>>
>> Github: http://github.com/springsource/spring-data-graph
>> Download:
>> http://www.springsource.com/download/community?project=Spring%20Data%20Neo4j
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> Neo4j mailing list
>> [email protected]
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user