You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by Jeff Butler <je...@gmail.com> on 2006/08/21 01:42:24 UTC
Abator Version 1.0.0 Now Available!
Abator version 1.0.0 is now available. This is a significant upgrade from
version 0.6.5 and includes many new features. Noteworthy new features
include:
- Ability to generate code for Java 5 including the use of parameterized
types
- Ability to generate different types of domain models, including a flat
model if you dislike separate classes for primary keys and BLOBs
- VASTLY improved "by example" methods. The new methods can generate
virtually any where clause, including INs and BETWEENs, and the generated
DOAs and SqlMaps are MUCH smaller. The new example class can get large,
but most functions for the dynamic where clause are encapsulated into that
class (this support requires that you use iBATIS 2.2.0 or higher for the
nested <iterate> support)
- VASTLY improved documentation for Abator, including a complete list of new
features, is now available online here:
http://ibatis.apache.org/docs/tools/abator/
Please read the "What's New?" section of the online docs before upgrading
- some of the default options have changed, and this could cause code to be
generated that is not completely the same as prior versions of Abator.
There are options available to generate code exactly as in prior versions if
you so desire.
See this page for download links and other information:
http://ibatis.apache.org/abator.html
Thanks for all the comments and feedback about Abator. I've Incorporated
everything I thought was reasonable into the new release.
Jeff Butler
Re: Using new Abator generated criteria and example
Posted by Jeff Butler <je...@gmail.com>.
Sure - I'll add it for the next release. I don't know when that will be.
Jeff Butler
On 8/28/06, Rashmi Dixit <ra...@gmail.com> wrote:
>
> Thanks, Jeff. Will you consider adding this clear method to Abator
> generated example itself? If not, any reasons why?
>
>
>
> Regards
>
> ~Rashmi
>
>
> ------------------------------
>
> *From:* Jeff Butler [mailto:jeffgbutler@gmail.com]
> *Sent:* Saturday, August 26, 2006 8:07 PM
> *To:* user-java@ibatis.apache.org
> *Subject:* Re: Using new Abator generated criteria and example
>
>
>
> Yes - I expected that you would create a new example class for each query
> in this situation. This is pretty small overhead as nothing else is being
> cached. But that's easily changed - you could add a method to the example
> class that simply clears the list of criteria objects.
>
>
>
> Jeff Butler
>
>
>
> On 8/25/06, *Rashmi Dixit* <ra...@gmail.com> wrote:
>
> Hi Jeff,
>
>
>
> We have just upgraded to use the latest abator and iBATIS. We have a
> scenario as:
>
> - Get all users from a table - USERS
>
> - For each user, find some information from another table
>
>
>
> What we did with the old Abator was:
>
> - Create a UserProfileExample object.
>
> - Set the user_id indicator in the example object
>
> - For each user in the given list do the following
>
> o Set the user_id field in the UserProfileExample with the required
> value for which information needs to be retrieved.
>
> o Fire the select using the required DAO
>
> o Obtain required information and do something
>
>
>
> The new Abator introduces the criteria object for the example class. We
> tried to fit this into the loop written earlier. Below is what we have
> needed to do:
>
> - UserProfileExample userProfileExample=new UserProfileExample();
>
> - Criteria criteria=userProfileExample.createCriteria();
>
> - For each user in the given list do the following
>
> o è if(criteria.getCriteriaWithSingleValue().size()>0)
> criteria.getCriteriaWithSingleValue().remove(0);
>
> o criteria.andUserIdEqualTo(userID);
>
> o Fire the select using the required DAO
>
> o Obtain required information and do something
>
>
>
> There is only a way to add a criterion to an example object, no way to
> remove/change it. Perhaps the design means us to create a new example for
> each new query fired?
>
>
>
> However, my query is something like a parameterized query where I simply
> need to change the value of the parameter and fire the query again. I do not
> like the fact that I need to reach into the internals of the criteria object
> and remove elements from the list that it maintains ( è ).
>
>
>
> Can you suggest a better way to do the same?
>
>
>
> Regards
>
> ~Rashmi
>
>
>
RE: Using new Abator generated criteria and example
Posted by Rashmi Dixit <ra...@gmail.com>.
Thanks, Jeff. Will you consider adding this clear method to Abator
generated example itself? If not, any reasons why?
Regards
~Rashmi
_____
From: Jeff Butler [mailto:jeffgbutler@gmail.com]
Sent: Saturday, August 26, 2006 8:07 PM
To: user-java@ibatis.apache.org
Subject: Re: Using new Abator generated criteria and example
Yes - I expected that you would create a new example class for each
query in this situation. This is pretty small overhead as nothing else
is being cached. But that's easily changed - you could add a method to
the example class that simply clears the list of criteria objects.
Jeff Butler
On 8/25/06, Rashmi Dixit <ra...@gmail.com> wrote:
Hi Jeff,
We have just upgraded to use the latest abator and iBATIS. We have a
scenario as:
- Get all users from a table - USERS
- For each user, find some information from another table
What we did with the old Abator was:
- Create a UserProfileExample object.
- Set the user_id indicator in the example object
- For each user in the given list do the following
o Set the user_id field in the UserProfileExample with the
required value for which information needs to be retrieved.
o Fire the select using the required DAO
o Obtain required information and do something
The new Abator introduces the criteria object for the example class. We
tried to fit this into the loop written earlier. Below is what we have
needed to do:
- UserProfileExample userProfileExample=new
UserProfileExample();
- Criteria criteria=userProfileExample.createCriteria();
- For each user in the given list do the following
o ==> if(criteria.getCriteriaWithSingleValue().size()>0)
criteria.getCriteriaWithSingleValue().remove(0);
o criteria.andUserIdEqualTo(userID);
o Fire the select using the required DAO
o Obtain required information and do something
There is only a way to add a criterion to an example object, no way to
remove/change it. Perhaps the design means us to create a new example
for each new query fired?
However, my query is something like a parameterized query where I simply
need to change the value of the parameter and fire the query again. I do
not like the fact that I need to reach into the internals of the
criteria object and remove elements from the list that it maintains (
==> ).
Can you suggest a better way to do the same?
Regards
~Rashmi
Re: Using new Abator generated criteria and example
Posted by Jeff Butler <je...@gmail.com>.
Yes - I expected that you would create a new example class for each query in
this situation. This is pretty small overhead as nothing else is being
cached. But that's easily changed - you could add a method to the example
class that simply clears the list of criteria objects.
Jeff Butler
On 8/25/06, Rashmi Dixit <ra...@gmail.com> wrote:
>
> Hi Jeff,
>
>
>
> We have just upgraded to use the latest abator and iBATIS. We have a
> scenario as:
>
> - Get all users from a table - USERS
>
> - For each user, find some information from another table
>
>
>
> What we did with the old Abator was:
>
> - Create a UserProfileExample object.
>
> - Set the user_id indicator in the example object
>
> - For each user in the given list do the following
>
> o Set the user_id field in the UserProfileExample with the required
> value for which information needs to be retrieved.
>
> o Fire the select using the required DAO
>
> o Obtain required information and do something
>
>
>
> The new Abator introduces the criteria object for the example class. We
> tried to fit this into the loop written earlier. Below is what we have
> needed to do:
>
> - UserProfileExample userProfileExample=new UserProfileExample();
>
> - Criteria criteria=userProfileExample.createCriteria();
>
> - For each user in the given list do the following
>
> o èif(criteria.getCriteriaWithSingleValue().size()>0)
> criteria.getCriteriaWithSingleValue().remove(0);
>
> o criteria.andUserIdEqualTo(userID);
>
> o Fire the select using the required DAO
>
> o Obtain required information and do something
>
>
>
> There is only a way to add a criterion to an example object, no way to
> remove/change it. Perhaps the design means us to create a new example for
> each new query fired?
>
>
>
> However, my query is something like a parameterized query where I simply
> need to change the value of the parameter and fire the query again. I do not
> like the fact that I need to reach into the internals of the criteria object
> and remove elements from the list that it maintains (è).
>
>
>
> Can you suggest a better way to do the same?
>
>
>
> Regards
>
> ~Rashmi
>
Using new Abator generated criteria and example
Posted by Rashmi Dixit <ra...@gmail.com>.
Hi Jeff,
We have just upgraded to use the latest abator and iBATIS. We have a
scenario as:
- Get all users from a table - USERS
- For each user, find some information from another table
What we did with the old Abator was:
- Create a UserProfileExample object.
- Set the user_id indicator in the example object
- For each user in the given list do the following
o Set the user_id field in the UserProfileExample with the
required value for which information needs to be retrieved.
o Fire the select using the required DAO
o Obtain required information and do something
The new Abator introduces the criteria object for the example class. We
tried to fit this into the loop written earlier. Below is what we have
needed to do:
- UserProfileExample userProfileExample=new
UserProfileExample();
- Criteria criteria=userProfileExample.createCriteria();
- For each user in the given list do the following
o ==>if(criteria.getCriteriaWithSingleValue().size()>0)
criteria.getCriteriaWithSingleValue().remove(0);
o criteria.andUserIdEqualTo(userID);
o Fire the select using the required DAO
o Obtain required information and do something
There is only a way to add a criterion to an example object, no way to
remove/change it. Perhaps the design means us to create a new example
for each new query fired?
However, my query is something like a parameterized query where I simply
need to change the value of the parameter and fire the query again. I do
not like the fact that I need to reach into the internals of the
criteria object and remove elements from the list that it maintains
(==>).
Can you suggest a better way to do the same?
Regards
~Rashmi
Re: Abator Version 1.0.0 Now Available!
Posted by Jeff Butler <je...@gmail.com>.
I'm glad you like iBATIS and Abator!
Unfortunately, adding the methods to the DaoManager interface is not that
easy. The DAO transaction classes are implemented by other transaction
managers besides iBATIS - and the correspoding methods do not exist in some
of the other implementations.
I think that the best solution is to create a seperate DAO
interface/implementation that has the batch methods you need. Methods in
that DAO could start transactions, start batches, execute batches, and
interact with any other DAO (like Abator generated DAOs).
Jeff Butler
On 8/23/06, Tony Qian <da...@aol.com> wrote:
>
> Jeff,
>
> I have used Abator and iBATIS for more than half year for several
> projects. I love it! Really appreciate you guy's hard work. When I use
> Abator to generate all codes, i got one problem for batch. I need to go
> through the source code to figure out how to execute batch (When using
> sqlMapClient, it is so easy). I think others have same experience. Here is
> my question. Is it possible to put startBatch(), executeBatch() and
> executeBatchDetailed() in DaoManager class, just like
> daoManager.startTransaction()?
>
> Thanks,
> Tony
>
>
> Jeff Butler wrote on 8/20/2006, 7:42 PM:
>
> Abator version 1.0.0 is now available. This is a significant upgrade
> from version 0.6.5 and includes many new features. Noteworthy new
> features include:
>
> - Ability to generate code for Java 5 including the use of parameterized
> types
> - Ability to generate different types of domain models, including a flat
> model if you dislike separate classes for primary keys and BLOBs
> - VASTLY improved "by example" methods. The new methods can generate
> virtually any where clause, including INs and BETWEENs, and the generated
> DOAs and SqlMaps are MUCH smaller. The new example class can get large,
> but most functions for the dynamic where clause are encapsulated into that
> class (this support requires that you use iBATIS 2.2.0 or higher for the
> nested <iterate> support)
> - VASTLY improved documentation for Abator, including a complete list of
> new features, is now available online here:
>
> http://ibatis.apache.org/docs/tools/abator/
>
> Please read the "What's New?" section of the online docs before upgrading
> - some of the default options have changed, and this could cause code to be
> generated that is not completely the same as prior versions of Abator.
> There are options available to generate code exactly as in prior versions if
> you so desire.
>
> See this page for download links and other information:
>
> http://ibatis.apache.org/abator.html
>
> Thanks for all the comments and feedback about Abator. I've Incorporated
> everything I thought was reasonable into the new release.
>
> Jeff Butler
>
>
>
>
Re: Abator Version 1.0.0 Now Available!
Posted by Clinton Begin <cl...@gmail.com>.
PS: "guy's" << sorry, I didn't mean to draw attention to the apostrophe
use here, but my wife the grammar phreak is always watching. ;-)
On 8/23/06, Clinton Begin <cl...@gmail.com> wrote:
>
>
> For the time being, there's really no "guy's", it's really all Jeff and
> users like you. And yes, Jeff has done a fantastic job, not only on Abator,
> but also on iBATIS. He's been the most active committer for the last couple
> months if I'm not mistaken.
>
> Jeff will also be presenting an iBATIS Tutorial at ApacheCon US 2006, so
> if you want to meet him in person, that's your opportunity.
>
> Cheers,
> Clinton
>
>
>
>
> On 8/23/06, Tony Qian <da...@aol.com> wrote:
> >
> > Jeff,
> >
> > I have used Abator and iBATIS for more than half year for several
> > projects. I love it! Really appreciate you guy's hard work. When I use
> > Abator to generate all codes, i got one problem for batch. I need to go
> > through the source code to figure out how to execute batch (When using
> > sqlMapClient, it is so easy). I think others have same experience. Here is
> > my question. Is it possible to put startBatch(), executeBatch() and
> > executeBatchDetailed() in DaoManager class, just like
> > daoManager.startTransaction()?
> >
> > Thanks,
> > Tony
> >
> >
> > Jeff Butler wrote on 8/20/2006, 7:42 PM:
> >
> > Abator version 1.0.0 is now available. This is a significant upgrade
> > from version 0.6.5 and includes many new features. Noteworthy new
> > features include:
> >
> > - Ability to generate code for Java 5 including the use of
> > parameterized types
> > - Ability to generate different types of domain models, including a
> > flat model if you dislike separate classes for primary keys and BLOBs
> > - VASTLY improved "by example" methods. The new methods can generate
> > virtually any where clause, including INs and BETWEENs, and the generated
> > DOAs and SqlMaps are MUCH smaller. The new example class can get large,
> > but most functions for the dynamic where clause are encapsulated into that
> > class (this support requires that you use iBATIS 2.2.0 or higher for the
> > nested <iterate> support)
> > - VASTLY improved documentation for Abator, including a complete list
> > of new features, is now available online here:
> >
> > http://ibatis.apache.org/docs/tools/abator/
> >
> > Please read the "What's New?" section of the online docs before
> > upgrading - some of the default options have changed, and this could cause
> > code to be generated that is not completely the same as prior versions of
> > Abator. There are options available to generate code exactly as in prior
> > versions if you so desire.
> >
> > See this page for download links and other information:
> >
> > http://ibatis.apache.org/abator.html
> >
> > Thanks for all the comments and feedback about Abator. I've
> > Incorporated everything I thought was reasonable into the new release.
> >
> > Jeff Butler
> >
> >
> >
> >
>
Re: Abator Version 1.0.0 Now Available!
Posted by Clinton Begin <cl...@gmail.com>.
For the time being, there's really no "guy's", it's really all Jeff and
users like you. And yes, Jeff has done a fantastic job, not only on Abator,
but also on iBATIS. He's been the most active committer for the last couple
months if I'm not mistaken.
Jeff will also be presenting an iBATIS Tutorial at ApacheCon US 2006, so if
you want to meet him in person, that's your opportunity.
Cheers,
Clinton
On 8/23/06, Tony Qian <da...@aol.com> wrote:
>
> Jeff,
>
> I have used Abator and iBATIS for more than half year for several
> projects. I love it! Really appreciate you guy's hard work. When I use
> Abator to generate all codes, i got one problem for batch. I need to go
> through the source code to figure out how to execute batch (When using
> sqlMapClient, it is so easy). I think others have same experience. Here is
> my question. Is it possible to put startBatch(), executeBatch() and
> executeBatchDetailed() in DaoManager class, just like
> daoManager.startTransaction()?
>
> Thanks,
> Tony
>
>
> Jeff Butler wrote on 8/20/2006, 7:42 PM:
>
> Abator version 1.0.0 is now available. This is a significant upgrade
> from version 0.6.5 and includes many new features. Noteworthy new
> features include:
>
> - Ability to generate code for Java 5 including the use of parameterized
> types
> - Ability to generate different types of domain models, including a flat
> model if you dislike separate classes for primary keys and BLOBs
> - VASTLY improved "by example" methods. The new methods can generate
> virtually any where clause, including INs and BETWEENs, and the generated
> DOAs and SqlMaps are MUCH smaller. The new example class can get large,
> but most functions for the dynamic where clause are encapsulated into that
> class (this support requires that you use iBATIS 2.2.0 or higher for the
> nested <iterate> support)
> - VASTLY improved documentation for Abator, including a complete list of
> new features, is now available online here:
>
> http://ibatis.apache.org/docs/tools/abator/
>
> Please read the "What's New?" section of the online docs before upgrading
> - some of the default options have changed, and this could cause code to be
> generated that is not completely the same as prior versions of Abator.
> There are options available to generate code exactly as in prior versions if
> you so desire.
>
> See this page for download links and other information:
>
> http://ibatis.apache.org/abator.html
>
> Thanks for all the comments and feedback about Abator. I've Incorporated
> everything I thought was reasonable into the new release.
>
> Jeff Butler
>
>
>
>