开发者

Easiest way of getting third party database information into java objects [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 7 years ago.

开发者_StackOverflow社区 Improve this question

I am making some small "business intelligence" applications/tools that need to talk to other systems. Primarily accounting systems that believe that databases are an integration layer (or are too lazy to provide an api).

What's the easiest way of getting specific data out of a third party database and into my Java objects?

Notes:

(I am now bolding the points below that have not been directly answered)

  1. This is absolutely a read only situation. I would prefer a solution that cannot write.
    • Depending on speed and/or aggregation requirements, I may want/need to store these records at a future point. (This may or may not impact on solutions like hibernate which would have difficulty reading from one db and writing to another)
    • The first cut would be a very select partial object population (I have generated my objects from an xml schema, and the database will only need to supply 30% of the possible fields etc)
    • The first db integration target is (Visual?)FoxPro - hence point 2.
    • I am currently developing primarily in Java, but expect that to change to scala soonish (can LINQ help here?)


The standard of mapping db schema to objects (and vice versa) is the Java Persistence API. There are several implementation like Hibernate and EclipseLink (and others). I can't tell for all of them, but hibernate an eclipse plugin called hibernate tools, which can generate Java classes from the schema. You can find instructions here

JPA has its own query language called JPQL, Hibernate supports an extended version of it called HQL. Both looks like SQL, applied to objects.


I suggest you take a look at ScalaQuery, if you are doing Scala code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜