This page (revision-5) was last changed on 27-Oct-2010 13:40 by Dieter Käppel

This page was created on 27-Oct-2010 13:14 by Dieter Käppel

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
5 27-Oct-2010 13:40 3 KB Dieter Käppel to previous
4 27-Oct-2010 13:40 3 KB Dieter Käppel to previous | to last
3 27-Oct-2010 13:20 2 KB Dieter Käppel to previous | to last
2 27-Oct-2010 13:14 2 KB Dieter Käppel to previous | to last
1 27-Oct-2010 13:14 2 KB Dieter Käppel to last

Page References

Incoming links Outgoing links
Ibatis ...nobody

Version management

Difference between version and

At line 20 changed one line
<typeHandler javaType="java.net.URI" callback="com.intersult.UriTypeHandler"/>
<typeHandler javaType="java.net.URI" callback="com.bayer.pixpt_interface.db.UriTypeHandler"/>
At line 51 removed 32 lines
!Result-Map
Durch Result-Maps kann ein Mapping global definiert werden, die SQL-Ausdrücke vereinfachen sich dadurch:
{{{
<resultMap id="user" class="com.intersult.User">
<result column="username" property="username"/>
<result column="firstname" property="firstname"/>
<result column="name" property="lastname"/>
</resultMap>
}}}
!Nested Iterations
Ibatis ermöglicht das iterieren von Java-Properties List und Array zum Erzeugen dynamischer SQL-Ausdrücke. Die Syntax zum verschachteln von Iterationen ist nicht ganz offensichtlich, aber funktioniert:
{{{
<iterate property="filters" conjunction="AND">
<iterate property="filters[]" conjunction="OR" open="(" close=")">
$filters[].[].dimension.column$ $filters[].[].operator.operator$ #filters[].[].value#
</iterate>
</iterate>
}}}
Die unterliegende Class sieht dabei wie folgt aus:
{{{
public class Filters<D extends Dimension> {
public List<List<Filter<D>>> getFilters() {
return ...;
}
}
}}}