Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #32077
| Path | csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Eternal Hope <laughingspam99@gmail.com> |
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: From Hibernate to straight JPA |
| Date | Sat, 18 Jul 2015 20:48:50 +0100 |
| Organization | A noiseless patient Spider |
| Lines | 50 |
| Message-ID | <moeag3$6a0$1@dont-email.me> (permalink) |
| References | <87egkfhodv.fsf@Equus.decebal.nl> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Sat, 18 Jul 2015 19:47:15 +0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="318ed0177f074561c4d3d4fc4dfe3634"; logging-data="6464"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6ADrdJj3iwaUYVFHvm/HC2QDYqlCpdWs=" |
| User-Agent | Mozilla/5.0 (Windows NT 6.3; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
| In-Reply-To | <87egkfhodv.fsf@Equus.decebal.nl> |
| Cancel-Lock | sha1:GHaL583aZ8LAkmN11ywbpOF8DKM= |
| Xref | csiph.com comp.lang.java.programmer:32077 |
Show key headers only | View raw
On 10/07/2015 19:13, Cecil Westerhof wrote: > We are asked to change some software. At the moment one of the things > that has to be replaced is Hibernate. They want to use straight JPA, > so it is easy to switch from Hibernate, to openJPA, to … > > One of the annotations that is used is: > @NotEmpty(message = "Field is not filled") > with the import: > import org.hibernate.validator.constraints.NotEmpty; > > My college wants to use: > @NotNull(message = "Field is not filled") > @Size(message = "Field is not filled", min = 1) > > I do not like this. It certainly is not DRY. (It is used hundreds of > times.) I prefer to define our own NotEmpty. But I have never worked > with annotations. How to do this? > > Also what is a good resource to learn about JPA and annotations? As I read this thread I thought it was about time I had a look at this JPA stuff. I've been writing Java for circa 15 years now, I've done everything from writing byte streams to firmware interfaces to high availability container managed business applications and Swing based UIs. In all this time I have relied on a JDBC driver in my classpath, container managed connection pools, hand coded SQL and 'in code' transaction management. I do my own OR mapping; actually we don't call it 'OR mapping' it's just relational database stuff, and quite frankly I've never found the need to use some persistance framework. I just had a look at http://openjpa.apache.org/builds/2.4.0/apidocs/index.html Good grief ... HOW many classes. WTF Seriously, how much of this stuff do people actually use. What is the learning overhead of just this one API It gives me a headache just scrolling down the class list. What is the actual payback for the time spent getting your head around even a fraction of this API This is not a trivial question AFAIAC I genuinely can't see the benefit, particularly in the short term of learning this stuff. There will always be another framework, I could spend my entire life learning frameworks all the time getting further and further away from the core language. I'd be genuinely interested in any non-confrontational opinions. Thanks
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
From Hibernate to straight JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-07-10 20:13 +0200
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-11 10:56 -0400
Re: From Hibernate to straight JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-07-11 21:06 +0200
Re: From Hibernate to straight JPA Lew <lewbloch@gmail.com> - 2015-07-16 17:15 -0700
Re: From Hibernate to straight JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-07-16 20:44 -0400
Re: From Hibernate to straight JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-07-17 10:01 +0200
Re: From Hibernate to straight JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-07-27 22:18 -0400
Re: From Hibernate to straight JPA Eternal Hope <laughingspam99@gmail.com> - 2015-07-18 20:48 +0100
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-18 16:51 -0400
Re: From Hibernate to straight JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-07-18 17:21 -0400
Re: From Hibernate to straight JPA Martin Gregorie <martin@address-in-sig.invalid> - 2015-07-18 23:24 +0000
Re: From Hibernate to straight JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-07-18 19:43 -0400
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-18 19:50 -0400
Re: From Hibernate to straight JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-07-18 20:23 -0400
Re: From Hibernate to straight JPA Eternal Hope <laughingspam99@gmail.com> - 2015-07-19 09:22 +0100
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-19 06:20 -0400
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-19 07:49 -0400
Re: From Hibernate to straight JPA Eternal Hope <laughingspam99@gmail.com> - 2015-07-19 13:28 +0100
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-19 09:20 -0400
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-19 09:50 -0400
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-20 13:16 -0400
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-20 13:42 -0400
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-20 14:07 -0400
Re: From Hibernate to straight JPA Eternal Hope <laughingspam99@gmail.com> - 2015-07-20 20:46 +0100
Re: From Hibernate to straight JPA Martin Gregorie <martin@address-in-sig.invalid> - 2015-07-20 21:01 +0000
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-20 22:19 -0400
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-20 23:52 -0400
Re: From Hibernate to straight JPA Joerg Meier <joergmmeier@arcor.de> - 2015-07-21 12:04 +0200
Re: From Hibernate to straight JPA Eternal Hope <laughingspam99@gmail.com> - 2015-07-21 12:43 +0100
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-18 20:25 -0400
Re: From Hibernate to straight JPA Jeff Higgins <jeff@invalid.invalid> - 2015-07-18 20:44 -0400
csiph-web