You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by John Menke <jo...@eagleinfosystems.com> on 2001/05/03 03:17:05 UTC
Peers Criteria for selecting columns?
The empty Criteria returns all columns and rows
Criteria crit = new Criteria();
Vector v = CategoryPeer.doSelect (crit);
what if we want to select specific column names in the table?
Say I have a table and want just all the rows from the "name" and "address"
columns.
How do I specify the criteria?
crit.add (What goes here?)
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Peers Criteria for selecting columns?
Posted by John McNally <jm...@collab.net>.
We welcome improvements to om/peer or-mapping system. But if you do not
feel qualified or do not have time there are some alternatives that do
not require an application server. Osage (sourceforge), Castor
(exolab), I believe javacorporate.com's product includes an or-mapping
layer. And for a different angle on sql/java interaction take a look at
http://www.quiotix.com/opensource/sqlclass/
john mcnally
John Menke wrote:
>
> > > The empty Criteria returns all columns and rows
> > >
> > > Criteria crit = new Criteria();
> > > Vector v = CategoryPeer.doSelect (crit);
> > >
> > > what if we want to select specific column names in the table?
> > > Say I have a table and want just all the rows from the "name"
> > > and "address"
> > > columns.
> > > How do I specify the criteria?
> > >
> > > crit.add (What goes here?)
> >
> > All columns are selected.
> >
>
> If all I can return are all columns it seems like a big limitation.
> Given the choice of using EJB within Turbine or Peers, I think I am leaning
> towards EJB's.
>
> Anyone have any pro's / con's of each? I can see that with session beans
> I will be able to return Vectors to the context that can be parsed by
> Velocity.
> This seems like the better choice at the moment.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Peers Criteria for selecting columns?
Posted by Jon Stevens <jo...@latchkey.com>.
on 5/2/01 7:10 PM, "John Menke" <jo...@eagleinfosystems.com> wrote:
> If all I can return are all columns it seems like a big limitation.
Of course that isn't true. Where are you getting that from? Geez. The
documentation states how you can select what columns to return.
> Given the choice of using EJB within Turbine or Peers, I think I am leaning
> towards EJB's.
You clearly don't have an understanding of the difference between EJB's and
what the Peer/Torque system will do for you. So, how can you lean in either
direction?
> Anyone have any pro's / con's of each?
EJB != Peer.
> I can see that with session beans I will be able to return Vectors to the
> context that can be parsed by Velocity.
You can do the same exact thing with Torque/Peer objects.
> This seems like the better choice at the moment.
Keep learning and reading a bit more. I think you are basing your decision
on a lack of experience and it will bite you in the ass later.
Thanks,
-jon
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
RE: Peers Criteria for selecting columns?
Posted by John Menke <jo...@eagleinfosystems.com>.
> > The empty Criteria returns all columns and rows
> >
> > Criteria crit = new Criteria();
> > Vector v = CategoryPeer.doSelect (crit);
> >
> > what if we want to select specific column names in the table?
> > Say I have a table and want just all the rows from the "name"
> > and "address"
> > columns.
> > How do I specify the criteria?
> >
> > crit.add (What goes here?)
>
> All columns are selected.
>
If all I can return are all columns it seems like a big limitation.
Given the choice of using EJB within Turbine or Peers, I think I am leaning
towards EJB's.
Anyone have any pro's / con's of each? I can see that with session beans
I will be able to return Vectors to the context that can be parsed by
Velocity.
This seems like the better choice at the moment.
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Peers Criteria for selecting columns?
Posted by Daniel Rall <dl...@finemaltcoding.com>.
"John Menke" <jo...@eagleinfosystems.com> writes:
> The empty Criteria returns all columns and rows
>
> Criteria crit = new Criteria();
> Vector v = CategoryPeer.doSelect (crit);
>
> what if we want to select specific column names in the table?
> Say I have a table and want just all the rows from the "name" and "address"
> columns.
> How do I specify the criteria?
>
> crit.add (What goes here?)
All columns are selected.
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Peers Criteria for selecting columns?
Posted by Jon Stevens <jo...@latchkey.com>.
on 5/2/01 6:17 PM, "John Menke" <jo...@eagleinfosystems.com> wrote:
> crit.add (What goes here?)
This is documented:
http://jakarta.apache.org/turbine/peers.html
-jon
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org