zoukankan      html  css  js  c++  java
  • ibatis map标签记录

    Table Binary conditional attributes

    ElementDescription
    <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

    ElementDescription
    <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>
    ElementDescription
    <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

    ElementDescription
    <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.
  • 相关阅读:
    BZOJ.1468.Tree(点分治)
    BZOJ.1935.[SHOI2007]Tree园丁的烦恼(CDQ分治 三维偏序)
    BZOJ.4319.[cerc2008]Suffix reconstruction(后缀数组 构造 贪心)
    BZOJ.3262.陌上花开([模板]CDQ分治 三维偏序)
    洛谷.3374.[模板]树状数组1(CDQ分治)
    BZOJ.4566.[HAOI2016]找相同字符(后缀数组 单调栈)
    POJ.3145.Common Substrings(后缀数组 倍增 单调栈)
    POJ.2774.Long Long Message/SPOJ.1811.LCS(后缀数组 倍增)
    POJ.1743.Musical Theme(后缀数组 倍增 二分 / 后缀自动机)
    UOJ.35.[模板]后缀排序(后缀数组 倍增)
  • 原文地址:https://www.cnblogs.com/jifsu/p/1675342.html
Copyright © 2011-2022 走看看