Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #31617

Re: Good example of EJB interface for CRUD operations

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Good example of EJB interface for CRUD operations
Date Mon, 27 Apr 2015 21:19:29 +0200
Lines 28
Message-ID <cq7ge2Fc0f0U1@mid.individual.net> (permalink)
References <99e89a59-7115-4862-8679-42d670cb89dc@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net aatGzkt3ajhUnxm2goQ7owhd8zfSrLLM+s2LsNfjaqFMJi3QQ=
Cancel-Lock sha1:fY0inry+v33DqGaRH7DDGq++8V4=
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0
In-Reply-To <99e89a59-7115-4862-8679-42d670cb89dc@googlegroups.com>
Xref csiph.com comp.lang.java.programmer:31617

Show key headers only | View raw


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/

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

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

csiph-web