定义和使用EL函数
Tapestry入门

ibatis 动态sql定义

marz posted @ Aug 11, 2010 06:32:35 AM in java with tags java framework iBatis , 2497 readers

 

ibatis map标签记录

Table Binary conditional attributes

Element

Description

<isEqual>

Checks the equality of a property and a value, or another property. Example Usage:

<isEqual prepend="AND"
             property="status"
             compareValue="Y">
MARRIED = ‘TRUE'
</isEqual>              

<isNotEqual>

Checks the inequality of a property and a value, or another property. Example Usage:

<isNotEqual prepend="AND"
             property="status"
             compareValue="N">
MARRIED = ‘FALSE'
</isNotEqual>  

<isGreaterThan>

Checks if a property is greater than a value or another property. Example Usage:

<isGreaterThan prepend="AND"
             property="age"
             compareValue="18">
ADOLESCENT = ‘FALSE'
</isGreaterThan>  

<isGreaterEqual>

Checks if a property is greater than or equal to a value or another property. Example Usage:

<isGreaterEqual prepend="AND"
             property="shoeSize"
             compareValue="12">
BIGFOOT = ‘TRUE'
</isGreaterEqual>

<isLessEqual>

Checks if a property is less than or equal to a value or another property. Example Usage:

<isLessEqual prepend="AND"
             property="age"
             compareValue="18">
ADOLESCENT = ‘TRUE'
</isLessEqual>

Table?.8.Bnary conditional attributes

Element

Description

<isPropertyAvailable>

Checks if a property is available (i.e is a property of the parameter object). Example Usage:

<isPropertyAvailable property="id" >
  ACCOUNT_ID=#id#
</isPropertyAvailable>

<isNotPropertyAvailable>

Checks if a property is unavailable (i.e not a property of the parameter object). Example Usage:

<isNotPropertyAvailable property="age" >
  STATUS='New'
</isNotEmpty>

<isNull>

Checks if a property is null. Example Usage:

<isNull prepend="AND" property="order.id" >
  ACCOUNT.ACCOUNT_ID = ORDER.ACCOUNT_ID(+)
</isNotEmpty>

<isNotNull>

Checks if a property is not null. Example Usage:

<isNotNull prepend="AND" property="order.id" >
  ORDER.ORDER_ID = #order.id#
</isNotEmpty>

<isEmpty>

Checks to see if the value of a Collection, String property is null or empty ("" or size() < 1). Example Usage:

<isEmpty property="firstName" >
  LIMIT 0, 20
</isNotEmpty>

<isNotEmpty>

Checks to see if the value of a Collection, String property is not null and not empty ("" or size() < 1). Example Usage:

<isNotEmpty prepend="AND" property="firstName" >
  FIRST_NAME LIKE '%$FirstName$%'
</isNotEmpty>

Element

Description

<isParameterPresent>

Checks to see if the parameter object is present (not null).

<isParameterPresent prepend="AND">
  EMPLOYEE_TYPE = #empType#
</isParameterPresent>

<isNotParameterPresent>

Checks to see if the parameter object is not present (null). Example Usage:

<isNotParameterPresent prepend="AND">
  EMPLOYEE_TYPE = ‘DEFAULT'
</isNotParameterPresent>

Table?.10.Creating a list of conditional clauses

Element

Description

<iterate>

Iterates over a property that is of type IList Example Usage:

<iterate prepend="AND" property="UserNameList"
  open="(" close=")" conjunction="OR">
  username=#UserNameList[]#
</iterate>

Note: It is very important to include the square brackets[] at the end of the List property name when using the Iterate element. These brackets distinguish this object as an List to keep the parser from simply outputting the List as a string.

Tag标签: ibatis

 

从 <http://www.cnblogs.com/jifsu/archive/2010/03/01/1675342.html> 插入

Harold said:
Dec 28, 2020 09:23:44 PM

This article is very good for students. sleepgoodcbd.com Here the author detailed the classification of binary conditional attributes. I'm glad that I found this section which contains both coding and description. It helped me to have an idea about binary conditional attributes. 

Clay Lowe said:
Jul 15, 2024 02:23:09 AM

Gives you the best website address       I know there alone you'll find how easy it is. Kissimmee Pest Control

Clay Lowe said:
Jul 15, 2024 02:23:19 AM

I invite you to the page where you can read       with interesting information on similar topics. Orlando Pest Control

Clay Lowe said:
Jul 15, 2024 02:23:45 AM

Find the best essays on     is my friend's profile page. Oviedo Pest Control

Clay Lowe said:
Jul 23, 2024 01:58:30 AM

You ought to basically fantastic not to mention solid advice, which means notice: Tampa Pest Control

Clay Lowe said:
Aug 20, 2024 03:51:18 PM

I personally use them exclusively high-quality elements : you will notice these folks during: فني تكييف

Clay Lowe said:
Aug 20, 2024 03:51:33 PM

I read this article. I think You put a great deal of exertion to make this article. I like your work.  تركيب كاميرات مراقبة الكويت

Clay Lowe said:
Aug 20, 2024 03:51:50 PM

Thanks for writing such a good article, I stumbled onto your blog and read a few post. I like your style of writing... كراج متنقل

Clay Lowe said:
Oct 07, 2024 12:53:14 PM

Initial You got a awesome blog .I determination be involved in plus uniform minutes. i view you got truly very functional matters , i determination be always checking your blog blesss. top accounting firms on long island

Clay Lowe said:
Oct 09, 2024 01:40:36 PM

The most interesting text on this interesting topic that can be found on the net ...  Virtual CPA Services


Login *


loading captcha image...
(type the code from the image)
or Ctrl+Enter