Ibatis map tag record

Source: Internet
Author: User

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>
checks to see if the value of a collection, string property is not null and not empty ("" or size () <1 ). example usage:

 
     
       first_name like '% $ firstname $ %' 
      
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 clags

element description
iterates over a property that is of Type ilist example usage:

 
     
       username = 
       # usernamelist [] #  
      

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.