1

During an import procedure, I read tabular data from excel sheets. I want to perform some operation on this data: I want to sort, search by key, filter etc. Is it possible to reliably perform this kind of operations via JQL? thanks

AgostinoX
  • 7,477
  • 20
  • 77
  • 137

4 Answers4

5

I would use Space4J and simple Collections for something like this.

Personally I think all these ORM abstractions and layers are a distraction at the small scale problem domains, and are inflexible and added complexity at the other extreme.

  • Very intresting, but is just a 0.9 release! – AgostinoX Jul 02 '11 at 16:04
  • that means very little, it is how long it has been around which is more important than version numbers –  Jul 02 '11 at 16:48
  • @Jarrod Roberson: From what I've read in the home page of Space4J, I got the impression that Space4J lets you handle a persistent database as Java collections. But then don't you lose the ability to perform queries over this database, which is precisely what AgostinoX wants to do? – JB Nizet Jul 02 '11 at 16:57
  • yes, it is quite exactly what I'm searching for. The problem is that was an "implicit" requisite: use something "consolidated", or better "consolid" something (like jpa) that would benefit of another case study. Obviously, not over stretching its purpose. – AgostinoX Jul 02 '11 at 17:07
  • 2
    @JB Nizet:Space4j offers indexation so you can effectively query huge amounts of data. Take a look: http://forum.space4j.org/posts/list/5.page – TraderJoeChicago Sep 08 '11 at 16:46
1

You could use an in-memory database like HSQLDB, fill it, then use JPA to query the data. But wouldn't using some Maps and Lists be sufficient?

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255
  • I started thinking of Collections, so Maps or Lists of "MyRecord". Then I asked myself whether instead of maintaining myself the set of MyRecord instances, i let the JPA runtime do the job, I get some advantage. – AgostinoX Jul 02 '11 at 15:05
  • Have a look at http://stackoverflow.com/questions/93417/how-do-you-query-object-collections-in-java-criteria-sql-like because I also think that a solution with JPA and an underlying db may be a bit heavy-handed... – fvu Jul 02 '11 at 15:56
1

DataNucleus has its own in-memory query evaluator for JDOQL and JPQL syntaxis. I've never used it outside of a full JDO / JPA persistence environment but there's no real reason why it couldn't be made to work with a little coding

Pranav Shah
  • 3,233
  • 3
  • 30
  • 47
DataNucleus
  • 15,497
  • 3
  • 32
  • 37
0

If you are using EclipseLink, you can execute most queries in memory against the cache.

You just need to read everything into the cache they execute a JPQL or Criteria query with the "CheckCacheOnly" option.

See, http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Caching/Query_Options

James
  • 17,965
  • 11
  • 91
  • 146