Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #31615 > unrolled thread
| Started by | pavelkastornii@gmail.com |
|---|---|
| First post | 2015-04-27 10:00 -0700 |
| Last post | 2015-05-02 00:32 -0700 |
| Articles | 4 — 2 participants |
Back to article view | Back to comp.lang.java.programmer
Good example of EJB interface for CRUD operations pavelkastornii@gmail.com - 2015-04-27 10:00 -0700
Re: Good example of EJB interface for CRUD operations Robert Klemme <shortcutter@googlemail.com> - 2015-04-27 21:19 +0200
Re: Good example of EJB interface for CRUD operations pavelkastornii@gmail.com - 2015-04-27 12:49 -0700
Re: Good example of EJB interface for CRUD operations pavelkastornii@gmail.com - 2015-05-02 00:32 -0700
| From | pavelkastornii@gmail.com |
|---|---|
| Date | 2015-04-27 10:00 -0700 |
| Subject | Good example of EJB interface for CRUD operations |
| Message-ID | <99e89a59-7115-4862-8679-42d670cb89dc@googlegroups.com> |
Can anyone provide a good example of EJB interface for not trivial CRUD operations, assuming the following:
There are two or more tables (for example persons,personContacts) with which this EJB work.
There are dynamic operations (like select(List<String> columnAliases,List<String> columnValues)) and static operations (like select(int id)).
There full (updatePerson(Person person,int id)) and particial operation (updatePersonName(String name,int id)).
Any help (references, links) is much appreciated.
[toc] | [next] | [standalone]
| From | Robert Klemme <shortcutter@googlemail.com> |
|---|---|
| Date | 2015-04-27 21:19 +0200 |
| Message-ID | <cq7ge2Fc0f0U1@mid.individual.net> |
| In reply to | #31615 |
On 27.04.2015 19:00, pavelkastornii@gmail.com wrote: > Can anyone provide a good example of EJB interface for not trivial > CRUD operations, assuming the following: > > There are two or more tables (for example persons,personContacts) > with which this EJB work. There are dynamic operations (like > select(List<String> columnAliases,List<String> columnValues)) and > static operations (like select(int id)). What do you mean by "dynamic operations"? Are you talking about queries whose conditions need to be compiled at runtime? I also find the interface odd: apparently you match column names and values by index in two lists. Why are you not using a Map for that? > There full > (updatePerson(Person person,int id)) and particial operation > (updatePersonName(String name,int id)). Wouldn't you just set property "name" of Pojo Person and commit? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/
[toc] | [prev] | [next] | [standalone]
| From | pavelkastornii@gmail.com |
|---|---|
| Date | 2015-04-27 12:49 -0700 |
| Message-ID | <a21dc18b-9ab7-4911-9dd7-c2c5d06d22d4@googlegroups.com> |
| In reply to | #31617 |
понедельник, 27 апреля 2015 г., 23:19:41 UTC+4 пользователь Robert Klemme написал: > On 27.04.2015 19:00, p@gmail.com wrote: > > Can anyone provide a good example of EJB interface for not trivial > > CRUD operations, assuming the following: > > > > There are two or more tables (for example persons,personContacts) > > with which this EJB work. There are dynamic operations (like > > select(List<String> columnAliases,List<String> columnValues)) and > > static operations (like select(int id)). > > What do you mean by "dynamic operations"? Are you talking about queries > whose conditions need to be compiled at runtime? > > I also find the interface odd: apparently you match column names and > values by index in two lists. Why are you not using a Map for that? > > > There full > > (updatePerson(Person person,int id)) and particial operation > > (updatePersonName(String name,int id)). > > Wouldn't you just set property "name" of Pojo Person and commit? > > Kind regards > > robert > > -- > remember.guy do |as, often| as.you_can - without end > http://blog.rubybestpractices.com/ By dynamic I mean those, which conditions may vary - one we use some columns another time we use different columns. In comparison with those methods which have fixed conditions (select (int id)). I unserstand that that example seems to be strange as I wanted to show the idea.
[toc] | [prev] | [next] | [standalone]
| From | pavelkastornii@gmail.com |
|---|---|
| Date | 2015-05-02 00:32 -0700 |
| Message-ID | <86d14899-98a9-4da9-8164-560bea62bfa5@googlegroups.com> |
| In reply to | #31618 |
No one knows?
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.programmer
csiph-web