wisdom-framework / wisdom-orientdb

Wisdom OrientDB integration
Apache License 2.0
2 stars 3 forks source link

Export org.wisdom.orientdb.* to allow special access #8

Closed nicolas-rempulski closed 10 years ago

nicolas-rempulski commented 10 years ago

For instance to retrieve functions :

OFunction near = ((OrientDbRepository) messageCrud.getRepository()).get().acquire().getMetadata().getFunctionLibrary().getFunction("SearchNearbyMessages");

OrientDbRepository is not exported by wisdom-orientdb-object.

Another solution would be to expose the OObjectDatabaseTx in the CRUD

barjo commented 10 years ago

Hi Nicolas. I will extract an interface for OrientdbRepository :) and put it in the org.wisdom.orientdb.object package.

nicolas-rempulski commented 10 years ago

Tested this morning : it works great ! :)

List<Message> result = messageCrud.getRepository().get().acquire().query(getGeolocQuery(longitude, latitude, DFL_DISTANCE));

Thank you !

nicolas-rempulski commented 10 years ago

I just realised my comment is out of scope from what your made as you already exposed a "query" method in the CRUD.

I switched from function to query, and didn't think to check if you had already exposed a query interface.

It will still be useful for future uses :)

barjo commented 10 years ago

No problem, I should really write a little documentation :worried: and anyway :beer: it's a better design to have the OrientdbRepository as an interface.