You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Sal Bass <sa...@hotmail.com> on 2009/05/23 16:37:17 UTC

Fluent Ibatis?

What do you guys think about some sort of DSL for Ibatis configuration? The result maps would be feasible, but what would we do with the sql statements? Something like Fluent Nhibernate, only different ;-)



_________________________________________________________________
Hotmail® goes with you. 
http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009

Re: Fluent Ibatis?

Posted by Vincent Apesa <vi...@gmail.com>.
I'd be willing to contribute if I could get some others. This is a very good
mapper. We need to keep it alive.

On Sat, May 23, 2009 at 12:54 PM, Clinton Begin <cl...@gmail.com>wrote:

> Yes, that would be the best place to start.
>
> Cheers,
> Clinton
>
> On 2009-05-23, Sal Bass <sa...@hotmail.com> wrote:
> >
> > How do we round-up people who would be willing to carry the torch? Start
> a
> > post here to get some names?
> >
> > I don't know where to start. I'm curious to see what kind of interest we
> > would get.
> >
> >
> > Date: Sat, 23 May 2009 08:50:55 -0600
> > Subject: Re: Fluent Ibatis?
> > From: clinton.begin@gmail.com
> > To: user-cs@ibatis.apache.org
> >
> > It's only as dead or alive as the community makes it.
> >
> > What's probably true is that we need new leadership and contributors on
> the
> > project, as Gilles has become too busy and hasn't been able to keep up
> with
> > it.
> >
> >
> > Otherwise, iBATIS.NET has a good chance of doing even better in the .NET
> > space as its Java counterpart did in the Java space.
> >
> > You guys should vote in a new team.  Nominate some people, make some
> > pitches, vote them in and we'll give them commit access.
> >
> >
> > I certainly believe in it, and wish I had the time to do both the Java
> and
> > .NET versions...
> >
> > Cheers,
> > Clinton
> >
> >
> >
> > On Sat, May 23, 2009 at 8:45 AM, Sal Bass <sa...@hotmail.com>
> wrote:
> >
> >
> >
> >
> >
> >
> > I really hope that's not the case.
> >
> >
> >> Date: Sat, 23 May 2009 07:40:05 -0700
> >> Subject: Re: Fluent Ibatis?
> >> From: luke.bakken@gmail.com
> >
> >> To: user-cs@ibatis.apache.org
> >>
> >> Considering ibatis.net is a pseudo-dead project .....
> >
> >>
> >> On Sat, May 23, 2009 at 7:37 AM, Sal Bass <sa...@hotmail.com>
> wrote:
> >> > What do you guys think about some sort of DSL for Ibatis
> configuration?
> >> > The
> >
> >> > result maps would be feasible, but what would we do with the sql
> >> > statements?
> >> > Something like Fluent Nhibernate, only different ;-)
> >> >
> >> >
> >> >
> >> > ________________________________
> >
> >> > Hotmail® goes with you. Get it on your BlackBerry or iPhone.
> >
> > Windows Live™: Keep your life in sync. Check it out.
> >
> >
> >
> > _________________________________________________________________
> > Insert movie times and more without leaving Hotmail®.
> >
> http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009
>
> --
> Sent from my mobile device
>

Re: Fluent Ibatis?

Posted by Clinton Begin <cl...@gmail.com>.
Yes, that would be the best place to start.

Cheers,
Clinton

On 2009-05-23, Sal Bass <sa...@hotmail.com> wrote:
>
> How do we round-up people who would be willing to carry the torch? Start a
> post here to get some names?
>
> I don't know where to start. I'm curious to see what kind of interest we
> would get.
>
>
> Date: Sat, 23 May 2009 08:50:55 -0600
> Subject: Re: Fluent Ibatis?
> From: clinton.begin@gmail.com
> To: user-cs@ibatis.apache.org
>
> It's only as dead or alive as the community makes it.
>
> What's probably true is that we need new leadership and contributors on the
> project, as Gilles has become too busy and hasn't been able to keep up with
> it.
>
>
> Otherwise, iBATIS.NET has a good chance of doing even better in the .NET
> space as its Java counterpart did in the Java space.
>
> You guys should vote in a new team.  Nominate some people, make some
> pitches, vote them in and we'll give them commit access.
>
>
> I certainly believe in it, and wish I had the time to do both the Java and
> .NET versions...
>
> Cheers,
> Clinton
>
>
>
> On Sat, May 23, 2009 at 8:45 AM, Sal Bass <sa...@hotmail.com> wrote:
>
>
>
>
>
>
> I really hope that's not the case.
>
>
>> Date: Sat, 23 May 2009 07:40:05 -0700
>> Subject: Re: Fluent Ibatis?
>> From: luke.bakken@gmail.com
>
>> To: user-cs@ibatis.apache.org
>>
>> Considering ibatis.net is a pseudo-dead project .....
>
>>
>> On Sat, May 23, 2009 at 7:37 AM, Sal Bass <sa...@hotmail.com> wrote:
>> > What do you guys think about some sort of DSL for Ibatis configuration?
>> > The
>
>> > result maps would be feasible, but what would we do with the sql
>> > statements?
>> > Something like Fluent Nhibernate, only different ;-)
>> >
>> >
>> >
>> > ________________________________
>
>> > Hotmail® goes with you. Get it on your BlackBerry or iPhone.
>
> Windows Live™: Keep your life in sync. Check it out.
>
>
>
> _________________________________________________________________
> Insert movie times and more without leaving Hotmail®.
> http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009

-- 
Sent from my mobile device

RE: Fluent Ibatis?

Posted by Sal Bass <sa...@hotmail.com>.
How do we round-up people who would be willing to carry the torch? Start a post here to get some names?

I don't know where to start. I'm curious to see what kind of interest we would get.


Date: Sat, 23 May 2009 08:50:55 -0600
Subject: Re: Fluent Ibatis?
From: clinton.begin@gmail.com
To: user-cs@ibatis.apache.org

It's only as dead or alive as the community makes it.  

What's probably true is that we need new leadership and contributors on the project, as Gilles has become too busy and hasn't been able to keep up with it. 


Otherwise, iBATIS.NET has a good chance of doing even better in the .NET space as its Java counterpart did in the Java space. 

You guys should vote in a new team.  Nominate some people, make some pitches, vote them in and we'll give them commit access.


I certainly believe in it, and wish I had the time to do both the Java and .NET versions...

Cheers,
Clinton



On Sat, May 23, 2009 at 8:45 AM, Sal Bass <sa...@hotmail.com> wrote:






I really hope that's not the case.


> Date: Sat, 23 May 2009 07:40:05 -0700
> Subject: Re: Fluent Ibatis?
> From: luke.bakken@gmail.com

> To: user-cs@ibatis.apache.org
> 
> Considering ibatis.net is a pseudo-dead project .....

> 
> On Sat, May 23, 2009 at 7:37 AM, Sal Bass <sa...@hotmail.com> wrote:
> > What do you guys think about some sort of DSL for Ibatis configuration? The

> > result maps would be feasible, but what would we do with the sql statements?
> > Something like Fluent Nhibernate, only different ;-)
> >
> >
> >
> > ________________________________

> > Hotmail® goes with you. Get it on your BlackBerry or iPhone.

Windows Live™: Keep your life in sync. Check it out.



_________________________________________________________________
Insert movie times and more without leaving Hotmail®.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009

Re: Fluent Ibatis?

Posted by Clinton Begin <cl...@gmail.com>.
It's only as dead or alive as the community makes it.

What's probably true is that we need new leadership and contributors on the
project, as Gilles has become too busy and hasn't been able to keep up with
it.

Otherwise, iBATIS.NET has a good chance of doing even better in the .NET
space as its Java counterpart did in the Java space.

You guys should vote in a new team.  Nominate some people, make some
pitches, vote them in and we'll give them commit access.

I certainly believe in it, and wish I had the time to do both the Java and
.NET versions...

Cheers,
Clinton



On Sat, May 23, 2009 at 8:45 AM, Sal Bass <sa...@hotmail.com> wrote:

>  I really hope that's not the case.
>
>
> > Date: Sat, 23 May 2009 07:40:05 -0700
> > Subject: Re: Fluent Ibatis?
> > From: luke.bakken@gmail.com
> > To: user-cs@ibatis.apache.org
>
> >
> > Considering ibatis.net is a pseudo-dead project .....
> >
> > On Sat, May 23, 2009 at 7:37 AM, Sal Bass <sa...@hotmail.com>
> wrote:
> > > What do you guys think about some sort of DSL for Ibatis configuration?
> The
> > > result maps would be feasible, but what would we do with the sql
> statements?
> > > Something like Fluent Nhibernate, only different ;-)
> > >
> > >
> > >
> > > ________________________________
> > > Hotmail® goes with you. Get it on your BlackBerry or iPhone.
>
> ------------------------------
> Windows Live™: Keep your life in sync. Check it out.<http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009>
>

RE: Fluent Ibatis?

Posted by Sal Bass <sa...@hotmail.com>.
I really hope that's not the case.


> Date: Sat, 23 May 2009 07:40:05 -0700
> Subject: Re: Fluent Ibatis?
> From: luke.bakken@gmail.com
> To: user-cs@ibatis.apache.org
> 
> Considering ibatis.net is a pseudo-dead project .....
> 
> On Sat, May 23, 2009 at 7:37 AM, Sal Bass <sa...@hotmail.com> wrote:
> > What do you guys think about some sort of DSL for Ibatis configuration? The
> > result maps would be feasible, but what would we do with the sql statements?
> > Something like Fluent Nhibernate, only different ;-)
> >
> >
> >
> > ________________________________
> > Hotmail® goes with you. Get it on your BlackBerry or iPhone.

_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009

Re: Fluent Ibatis?

Posted by Luke Bakken <lu...@gmail.com>.
Considering ibatis.net is a pseudo-dead project .....

On Sat, May 23, 2009 at 7:37 AM, Sal Bass <sa...@hotmail.com> wrote:
> What do you guys think about some sort of DSL for Ibatis configuration? The
> result maps would be feasible, but what would we do with the sql statements?
> Something like Fluent Nhibernate, only different ;-)
>
>
>
> ________________________________
> Hotmail® goes with you. Get it on your BlackBerry or iPhone.

Re: Fluent Ibatis?

Posted by Juan Pablo Araya <ju...@gmail.com>.
Here is a patch for the fluent iBatis. It's a very basic hack that uses (and
abuse) the AutoResultMap class.

Here is a sample of use:

<select id="FindAreaById" parameterClass="HashTable"
resultFluent="ConsoleApplication1.ClaseTest"
resultClass="ConsoleApplication1.Class1">
      select * from areas
    </select>

If the select statement has a "resultFluent" property, then must have a
"resultClass" property. Without this the resultmapping will throw an
exception.

The ClaseTest MUST have a method named GetFluent(), in which you seet
through a Hash the Type of class to map, and the columns-properties
mappings:

namespace ConsoleApplication1
{
    public class ClaseTest
    {
        public Hashtable GetFluent()
        {
            Hashtable hashResult = new Hashtable();
            hashResult.Add("Type",typeof(Class1));
            hashResult.Add("id", "Id");
            hashResult.Add("nombre", "jp");
            hashResult.Add("descripcion", "desc");
            hashResult.Add("centrocosto_id", "ccosto");
            hashResult.Add("area_id", "areaid");
            hashResult.Add("tipo_area", "tipoArea");
            return hashResult;
        }
    }
}

Class1 is:

namespace ConsoleApplication1
{
    public class Class1
    {
        public int Id { get; set; }
        public string jp { get; set; }
        public string desc { get; set; }
        public int ccosto { get; set; }
        public int areaid { get; set; }
        public int tipoArea { get; set; }
    }
}

In the hash, the key is the column result of the query, and the value is the
property (string) of Class1.

As you can see, the resultClass property in the xml has to be repeated in
the "Type" of the hash, but it's for now. Sorry.

It works with QueryforObject<T> and List<T>. The problem is: it just maps to
primitive data type (it fails if I want to map area_id to Area.Id for now)

Works for the last DataMapper from svn  (I downloaded it yesterday)

Greetings and sorry for my poor english!!

Index: Configuration/ResultMapping/AutoResultMap.cs
===================================================================
--- Configuration/ResultMapping/AutoResultMap.cs    (revision 778216)
+++ Configuration/ResultMapping/AutoResultMap.cs    (working copy)
@@ -43,13 +43,18 @@
     /// </summary>
     public class AutoResultMap : IResultMap
     {
+        public bool isFluent { get; set; }
         [NonSerialized]
         private bool _isInitalized = false;
         [NonSerialized]
         private Type _resultClass = null;
         [NonSerialized]
+        private Type _fluentClass = null;
+        [NonSerialized]
         private IFactory _resultClassFactory = null;
         [NonSerialized]
+        private IFactory _fluentClassFactory = null;
+        [NonSerialized]
         private ResultPropertyCollection _properties = new
ResultPropertyCollection();

         [NonSerialized]
@@ -63,10 +68,20 @@
         /// <param name="dataExchange">The data exchange.</param>
         public AutoResultMap(Type resultClass, IFactory resultClassFactory,
IDataExchange dataExchange)
         {
+            isFluent = false;
             _resultClass = resultClass;
             _resultClassFactory = resultClassFactory;
             _dataExchange = dataExchange;
         }
+        public AutoResultMap(Type resultClass, Type fluentClass, IFactory
resultClassFactory,IFactory fluentClassFactory, IDataExchange dataExchange)
+        {
+            isFluent = true;
+            _fluentClass = fluentClass;
+            _resultClass = resultClass;
+            _resultClassFactory = resultClassFactory;
+            _fluentClassFactory = fluentClassFactory;
+            _dataExchange = dataExchange;
+        }

         #region IResultMap Members

@@ -241,5 +256,51 @@
             }
         }

+
+        internal object CreateInstanceOfFluentClass()
+        {
+            if (_fluentClass.IsPrimitive || _fluentClass == typeof(string))
+            {
+                TypeCode typeCode = Type.GetTypeCode(_fluentClass);
+                return TypeUtils.InstantiatePrimitiveType(typeCode);
+            }
+            else
+            {
+                if (_fluentClass.IsValueType)
+                {
+                    if (_fluentClass == typeof(DateTime))
+                    {
+                        return new DateTime();
+                    }
+                    else if (_fluentClass == typeof(Decimal))
+                    {
+                        return new Decimal();
+                    }
+                    else if (_fluentClass == typeof(Guid))
+                    {
+                        return Guid.Empty;
+                    }
+                    else if (_fluentClass == typeof(TimeSpan))
+                    {
+                        return new TimeSpan(0);
+                    }
+#if dotnet2
+                    else if (_fluentClass.IsGenericType &&
typeof(Nullable<>).IsAssignableFrom(_fluentClass.GetGenericTypeDefinition()))
+                    {
+                        return
TypeUtils.InstantiateNullableType(_fluentClass);
+                    }
+#endif
+                    else
+                    {
+                        throw new NotImplementedException("Unable to
instanciate value type");
+                    }
+
+                }
+                else
+                {
+                    return _fluentClassFactory.CreateInstance(null);
+                }
+            }
+        }
     }
 }
Index: Configuration/Serializers/SelectDeSerializer.cs
===================================================================
--- Configuration/Serializers/SelectDeSerializer.cs    (revision 778216)
+++ Configuration/Serializers/SelectDeSerializer.cs    (working copy)
@@ -59,7 +59,8 @@
             select.ParameterMapName = NodeUtils.GetStringAttribute(prop,
"parameterMap");
             select.ResultClassName = NodeUtils.GetStringAttribute(prop,
"resultClass");
             select.ResultMapName = NodeUtils.GetStringAttribute(prop,
"resultMap");
-            select.AllowRemapping = NodeUtils.GetBooleanAttribute(prop,
"remapResults", false);
+            select.AllowRemapping = NodeUtils.GetBooleanAttribute(prop,
"remapResults", false);
+            select.ResultHDLName = NodeUtils.GetStringAttribute(prop,
"resultFluent");

             int count = node.ChildNodes.Count;
             for(int i=0;i<count;i++)
Index: Configuration/Statements/Statement.cs
===================================================================
--- Configuration/Statements/Statement.cs    (revision 778216)
+++ Configuration/Statements/Statement.cs    (working copy)
@@ -60,6 +60,10 @@
         private bool _allowRemapping = false;
         [NonSerialized]
         private string _id = string.Empty;
+        [NonSerialized]
+        private string _resultDHLName = string.Empty;
+        [NonSerialized]
+        private Type _resultDHL = null;
         // ResultMap
         [NonSerialized]
         private string _resultMapName = string.Empty;
@@ -101,6 +105,12 @@

         #region Properties

+        [XmlAttribute("resultDHL")]
+        public string ResultHDLName
+        {
+            get { return _resultDHLName; }
+            set { _resultDHLName = value; }
+        }
         /// <summary>
         /// Allow remapping of dynamic SQL
         /// </summary>
@@ -307,14 +317,14 @@
                 for (int i = 0; i < names.Length; i++)
                 {
                     string name =
configurationScope.ApplyNamespace(names[i].Trim());
-                    _resultsMap.Add(
configurationScope.SqlMapper.GetResultMap(name) );
+
_resultsMap.Add(configurationScope.SqlMapper.GetResultMap(name));
                 }
             }
             if (_parameterMapName.Length > 0)
             {
                 _parameterMap =
configurationScope.SqlMapper.GetParameterMap(_parameterMapName);
             }
-            if (_resultClassName.Length > 0)
+            if (_resultClassName.Length > 0 && _resultDHLName.Length == 0)
             {
                 string[] classNames = _resultClassName.Split(',');
                 for (int i = 0; i < classNames.Length; i++)
@@ -330,8 +340,29 @@
                     IResultMap autoMap = new AutoResultMap(_resultClass,
resultClassFactory, dataExchange);
                     _resultsMap.Add(autoMap);
                 }
+            }
+            if (_resultDHLName.Length > 0)
+            {
+                string[] dhlNames = _resultDHLName.Split(',');
+                string[] classNames = _resultClassName.Split(',');

+                for (int i = 0; i < dhlNames.Length; i++)
+                {
+                    _resultDHL =
configurationScope.SqlMapper.TypeHandlerFactory.GetType(dhlNames[i].Trim());
+                    _resultClass =
configurationScope.SqlMapper.TypeHandlerFactory.GetType(classNames[i].Trim());

+                    IFactory resultClassFactory = null;
+                    IFactory fluentClassFactory = null;
+                    if (Type.GetTypeCode(_resultClass) == TypeCode.Object
&&
+                        (_resultClass.IsValueType == false))
+                    {
+                        resultClassFactory =
configurationScope.SqlMapper.ObjectFactory.CreateFactory(_resultClass,
Type.EmptyTypes);
+                        fluentClassFactory =
configurationScope.SqlMapper.ObjectFactory.CreateFactory(_resultDHL,
Type.EmptyTypes);
+                    }
+                    IDataExchange dataExchange =
configurationScope.DataExchangeFactory.GetDataExchangeForClass(_resultClass);
+                    IResultMap autoMap = new AutoResultMap(_resultClass,
_resultDHL, resultClassFactory, fluentClassFactory, dataExchange);
+                    _resultsMap.Add(autoMap);
+                }
             }
             if (_parameterClassName.Length > 0)
             {
@@ -351,7 +382,7 @@
         /// <returns>An object which implment IList.</returns>
         public IList CreateInstanceOfListClass()
         {
-            return (IList)_listClassFactory.CreateInstance(null);
+            return (IList)_listClassFactory.CreateInstance(null);
         }
 #if dotnet2
         /// <summary>
@@ -360,7 +391,7 @@
         /// <returns>An object which implment IList.</returns>
         public IList<T> CreateInstanceOfGenericListClass<T>()
         {
-            return (IList<T>)_listClassFactory.CreateInstance(null);
+            return (IList<T>)_listClassFactory.CreateInstance(null);
         }
 #endif
         #endregion
Index: IBatisNet.DataMapper.20005.csproj
===================================================================
--- IBatisNet.DataMapper.20005.csproj    (revision 778216)
+++ IBatisNet.DataMapper.20005.csproj    (working copy)
@@ -1,7 +1,7 @@
-<Project DefaultTargets="Build" xmlns="
http://schemas.microsoft.com/developer/msbuild/2003">
+<Project DefaultTargets="Build" xmlns="
http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
   <PropertyGroup>
     <ProjectType>Local</ProjectType>
-    <ProductVersion>8.0.50727</ProductVersion>
+    <ProductVersion>9.0.21022</ProductVersion>
     <SchemaVersion>2.0</SchemaVersion>
     <ProjectGuid>{F3E45F39-3224-4EAD-B138-EB5CC0E32824}</ProjectGuid>
     <Configuration Condition=" '$(Configuration)' == ''
">Debug</Configuration>
@@ -26,6 +26,22 @@
     </FileUpgradeFlags>
     <UpgradeBackupLocation>
     </UpgradeBackupLocation>
+    <OldToolsVersion>2.0</OldToolsVersion>
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' ==
'Debug|AnyCPU' ">
     <OutputPath>bin\Debug\</OutputPath>
@@ -674,10 +690,12 @@
     <None Include="IBatisNet.DataMapper.build" />
     <None Include="MappedStatements\ResultStrategy\ClassDiagram.cd" />
     <EmbeddedResource Include="SqlMap.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </EmbeddedResource>
     <EmbeddedResource Include="SqlMapConfig.xsd">
-      <SubType>Designer</SubType>
+      <SubType>
+      </SubType>
     </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
@@ -686,6 +704,23 @@
       <Name>IBatisNet.Common.2005</Name>
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <PropertyGroup>
     <PreBuildEvent>
Index: MappedStatements/ReaderAutoMapper.cs
===================================================================
--- MappedStatements/ReaderAutoMapper.cs    (revision 778216)
+++ MappedStatements/ReaderAutoMapper.cs    (working copy)
@@ -45,99 +45,190 @@
     /// <summary>
     /// Build a dynamic instance of a <see
cref="ResultPropertyCollection"/>
     /// </summary>
-    public sealed class ReaderAutoMapper
-    {
+    public sealed class ReaderAutoMapper
+    {
         private static readonly ILog _logger =
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
+
         /// <summary>
         /// Builds a <see cref="ResultPropertyCollection"/> for an <see
cref="AutoResultMap"/>.
         /// </summary>
         /// <param name="dataExchangeFactory">The data exchange
factory.</param>
         /// <param name="reader">The reader.</param>
         /// <param name="resultObject">The result object.</param>
-        public static ResultPropertyCollection Build(DataExchangeFactory
dataExchangeFactory,
-                                IDataReader reader,
-                                ref object resultObject)
-        {
-            Type targetType = resultObject.GetType();
+        public static ResultPropertyCollection Build(DataExchangeFactory
dataExchangeFactory,
+                                IDataReader reader,
+                                ref object resultObject)
+        {
+            Type targetType = resultObject.GetType();
             ResultPropertyCollection properties = new
ResultPropertyCollection();
-
-            try
-            {
-                // Get all PropertyInfo from the resultObject properties
-                ReflectionInfo reflectionInfo =
ReflectionInfo.GetInstance(targetType);
-                string[] membersName =
reflectionInfo.GetWriteableMemberNames();

-                Hashtable propertyMap = new Hashtable();
-                int length = membersName.Length;
-                for (int i = 0; i < length; i++)
-                {
-                    ISetAccessorFactory setAccessorFactory =
dataExchangeFactory.AccessorFactory.SetAccessorFactory;
-                    ISetAccessor setAccessor =
setAccessorFactory.CreateSetAccessor(targetType, membersName[i]);
-                    propertyMap.Add(membersName[i], setAccessor);
-                }
+            try
+            {
+                /* Codigo jp */
+                // Check if the class is fluent type.
+                System.Reflection.MethodInfo method =
targetType.GetMethod("GetFluent");
+                //method.Invoke(outObject,
+                /*Fin codigo jp*/
+                if (method != null)
+                {
+                    Hashtable mapeos =
(Hashtable)method.Invoke(resultObject, null);
+                    Hashtable propertyMap = new
Hashtable();
+

-                // Get all column Name from the reader
-                // and build a resultMap from with the help of the
PropertyInfo[].
-                DataTable dataColumn = reader.GetSchemaTable();
-                int count = dataColumn.Rows.Count;
-                for (int i = 0; i < count; i++)
-                {
-                    string columnName = dataColumn.Rows[i][0].ToString();
-                    ISetAccessor matchedSetAccessor =
propertyMap[columnName] as ISetAccessor;
+                    foreach (DictionaryEntry entry in mapeos)
+                    {
+                        if (entry.Key != "Type")
+                        {
+                            ISetAccessorFactory setAccessorFactory =
dataExchangeFactory.AccessorFactory.SetAccessorFactory;
+                            ISetAccessor setAccessor =
setAccessorFactory.CreateSetAccessor((Type)mapeos["Type"],
(string)entry.Value);
+                            propertyMap.Add((string)entry.Value,
setAccessor);
+                        }
+                    }

-                    ResultProperty property = new ResultProperty();
-                    property.ColumnName = columnName;
-                    property.ColumnIndex = i;
+                    // Get all column Name from the reader
+                    // and build a resultMap from with the help of the
PropertyInfo[].
+                    DataTable dataColumn = reader.GetSchemaTable();
+                    int count = dataColumn.Rows.Count;
+                    for (int i = 0; i < count; i++)
+                    {
+                        string columnName =
(string)mapeos[dataColumn.Rows[i][0].ToString().ToLower()];

-                    if (resultObject is Hashtable)
-                    {
-                        property.PropertyName = columnName;
-                        properties.Add(property);
-                    }
+                        if (columnName!=null)
+                        {
+                            ISetAccessor matchedSetAccessor =
propertyMap[columnName] as ISetAccessor;

-                    Type propertyType = null;
+                            ResultProperty property = new ResultProperty();
+                            property.ColumnName = columnName;
+                            property.ColumnIndex = i;

-                    if (matchedSetAccessor == null)
-                    {
-                        try
-                        {
-                            propertyType =
ObjectProbe.GetMemberTypeForSetter(resultObject, columnName);
-                        }
-                        catch
-                        {
-                            _logger.Error("The column [" + columnName + "]
could not be auto mapped to a property on [" + resultObject.ToString() +
"]");
-                        }
-                    }
-                    else
-                    {
-                        propertyType = matchedSetAccessor.MemberType;
-                    }
+                            if (resultObject is Hashtable)
+                            {
+                                property.PropertyName = columnName;
+                                properties.Add(property);
+                            }

-                    if (propertyType != null || matchedSetAccessor != null)

-                    {
-                        property.PropertyName = (matchedSetAccessor != null
? matchedSetAccessor.Name : columnName);
-                        if (matchedSetAccessor != null)
-                        {
-
property.Initialize(dataExchangeFactory.TypeHandlerFactory,
matchedSetAccessor);
-                        }
-                        else
-                        {
-                            property.TypeHandler =
dataExchangeFactory.TypeHandlerFactory.GetTypeHandler(propertyType);
-                        }
+                            Type propertyType = null;

-                        property.PropertyStrategy =
PropertyStrategyFactory.Get(property);
-                        properties.Add(property);
-                    }
-                }
-            }
-            catch (Exception e)
-            {
-                throw new DataMapperException("Error automapping columns.
Cause: " + e.Message, e);
-            }
-
+                            if (matchedSetAccessor == null)
+                            {
+                                try
+                                {
+                                    propertyType =
ObjectProbe.GetMemberTypeForSetter(resultObject, columnName);
+                                }
+                                catch
+                                {
+                                    _logger.Error("The column [" +
columnName + "] could not be auto mapped to a property on [" +
resultObject.ToString() + "]");
+                                }
+                            }
+                            else
+                            {
+                                propertyType =
matchedSetAccessor.MemberType;
+                            }
+
+                            if (propertyType != null || matchedSetAccessor
!= null)
+                            {
+                                property.PropertyName = (matchedSetAccessor
!= null ? matchedSetAccessor.Name : columnName);
+                                if (matchedSetAccessor != null)
+                                {
+
property.Initialize(dataExchangeFactory.TypeHandlerFactory,
matchedSetAccessor);
+                                }
+                                else
+                                {
+                                    property.TypeHandler =
dataExchangeFactory.TypeHandlerFactory.GetTypeHandler(propertyType);
+                                }
+
+                                property.PropertyStrategy =
PropertyStrategyFactory.Get(property);
+                                properties.Add(property);
+                            }
+                        }
+                    }
+
+
+
+
+
+
+
+
+
+                }
+                else
+                {
+                    // Get all PropertyInfo from the resultObject
properties
+                    ReflectionInfo reflectionInfo =
ReflectionInfo.GetInstance(targetType);
+                    string[] membersName =
reflectionInfo.GetWriteableMemberNames();
+
+                    Hashtable propertyMap = new Hashtable();
+                    int length = membersName.Length;
+                    for (int i = 0; i < length; i++)
+                    {
+                        ISetAccessorFactory setAccessorFactory =
dataExchangeFactory.AccessorFactory.SetAccessorFactory;
+                        ISetAccessor setAccessor =
setAccessorFactory.CreateSetAccessor(targetType, membersName[i]);
+                        propertyMap.Add(membersName[i], setAccessor);
+                    }
+
+                    // Get all column Name from the reader
+                    // and build a resultMap from with the help of the
PropertyInfo[].
+                    DataTable dataColumn = reader.GetSchemaTable();
+                    int count = dataColumn.Rows.Count;
+                    for (int i = 0; i < count; i++)
+                    {
+                        string columnName =
dataColumn.Rows[i][0].ToString();
+                        ISetAccessor matchedSetAccessor =
propertyMap[columnName] as ISetAccessor;
+
+                        ResultProperty property = new ResultProperty();
+                        property.ColumnName = columnName;
+                        property.ColumnIndex = i;
+
+                        if (resultObject is Hashtable)
+                        {
+                            property.PropertyName = columnName;
+                            properties.Add(property);
+                        }
+
+                        Type propertyType = null;
+
+                        if (matchedSetAccessor == null)
+                        {
+                            try
+                            {
+                                propertyType =
ObjectProbe.GetMemberTypeForSetter(resultObject, columnName);
+                            }
+                            catch
+                            {
+                                _logger.Error("The column [" + columnName +
"] could not be auto mapped to a property on [" + resultObject.ToString() +
"]");
+                            }
+                        }
+                        else
+                        {
+                            propertyType = matchedSetAccessor.MemberType;
+                        }
+
+                        if (propertyType != null || matchedSetAccessor !=
null)
+                        {
+                            property.PropertyName = (matchedSetAccessor !=
null ? matchedSetAccessor.Name : columnName);
+                            if (matchedSetAccessor != null)
+                            {
+
property.Initialize(dataExchangeFactory.TypeHandlerFactory,
matchedSetAccessor);
+                            }
+                            else
+                            {
+                                property.TypeHandler =
dataExchangeFactory.TypeHandlerFactory.GetTypeHandler(propertyType);
+                            }
+
+                            property.PropertyStrategy =
PropertyStrategyFactory.Get(property);
+                            properties.Add(property);
+                        }
+                    }
+                }
+            }
+            catch (Exception e)
+            {
+                throw new DataMapperException("Error automapping columns.
Cause: " + e.Message, e);
+            }
+
             return properties;
-        }
+        }

-    }
+    }
 }
Index: MappedStatements/ResultStrategy/AutoMapStrategy.cs
===================================================================
--- MappedStatements/ResultStrategy/AutoMapStrategy.cs    (revision 778216)
+++ MappedStatements/ResultStrategy/AutoMapStrategy.cs    (working copy)
@@ -29,41 +29,41 @@

 namespace IBatisNet.DataMapper.MappedStatements.ResultStrategy
 {
-    /// <summary>
-    /// <see cref="IResultStrategy"/> implementation used when implicit
'ResultMap'.
-    /// </summary>
+    /// <summary>
+    /// <see cref="IResultStrategy"/> implementation used when implicit
'ResultMap'.
+    /// </summary>
     public sealed class AutoMapStrategy : IResultStrategy
     {
-        /// <summary>
-        /// Auto-map the reader to the result object.
-        /// </summary>
-        /// <param name="request">The request.</param>
-        /// <param name="reader">The reader.</param>
-        /// <param name="resultObject">The result object.</param>
+        /// <summary>
+        /// Auto-map the reader to the result object.
+        /// </summary>
+        /// <param name="request">The request.</param>
+        /// <param name="reader">The reader.</param>
+        /// <param name="resultObject">The result object.</param>
         /// <returns>The AutoResultMap use to map the resultset.</returns>
-        private AutoResultMap InitializeAutoResultMap(RequestScope request,
ref IDataReader reader, ref object resultObject)
-        {
-            AutoResultMap resultMap  = request.CurrentResultMap as
AutoResultMap;
-
-            if (request.Statement.AllowRemapping)
-            {
+        private AutoResultMap InitializeAutoResultMap(RequestScope request,
ref IDataReader reader, ref object resultObject)
+        {
+            AutoResultMap resultMap = request.CurrentResultMap as
AutoResultMap;
+
+            if (request.Statement.AllowRemapping)
+            {
                 resultMap = resultMap.Clone();
-
+
                 ResultPropertyCollection properties =
ReaderAutoMapper.Build(
                     request.DataExchangeFactory,
                     reader,
                     ref resultObject);

                 resultMap.Properties.AddRange(properties);
-            }
-            else
-            {
+            }
+            else
+            {
                 if (!resultMap.IsInitalized)
-                {
-                    lock (resultMap)
-                    {
+                {
+                    lock (resultMap)
+                    {
                         if (!resultMap.IsInitalized)
-                        {
+                        {
                             ResultPropertyCollection properties =
ReaderAutoMapper.Build(
                                request.DataExchangeFactory,
                                reader,
@@ -71,16 +71,16 @@

                             resultMap.Properties.AddRange(properties);
                             resultMap.IsInitalized = true;
-                        }
-                    }
-                }
+                        }
+                    }
+                }

-            }
-
-            return resultMap;
-        }
+            }

+            return resultMap;
+        }

+
         #region IResultStrategy Members

         /// <summary>
@@ -92,29 +92,34 @@
         /// <param name="resultObject">The result object.</param>
         public object Process(RequestScope request, ref IDataReader reader,
object resultObject)
         {
-            object outObject = resultObject;
+            object outObject = resultObject;

-            if (outObject == null)
-            {
-                outObject = (request.CurrentResultMap as
AutoResultMap).CreateInstanceOfResultClass();
-            }
+            if (outObject == null)
+            {
+                if ((request.CurrentResultMap as AutoResultMap).isFluent)
+                    outObject = (request.CurrentResultMap as
AutoResultMap).CreateInstanceOfFluentClass();
+                else
+                    outObject = (request.CurrentResultMap as
AutoResultMap).CreateInstanceOfResultClass();
+            }

             AutoResultMap resultMap = InitializeAutoResultMap(request, ref
reader, ref outObject);

             // En configuration initialiser des AutoResultMap (IResultMap)
avec uniquement leur class name et class et les mettres
-            // ds Statement.ResultsMap puis ds AutoMapStrategy faire comme
AutoResultMap ds Java
-            // tester si la request.CurrentResultMap [AutoResultMap
(IResultMap)] est initialisée
-            // [if (allowRemapping || getResultMappings() == null)
{initialize(rs);] java
-            // si ( request.Statement.AllowRemapping ||
(request.CurrentResultMap as AutoResultMap).IsInitalized) ....
-
+            // ds Statement.ResultsMap puis ds AutoMapStrategy faire comme
AutoResultMap ds Java
+            // tester si la request.CurrentResultMap [AutoResultMap
(IResultMap)] est initialisée
+            // [if (allowRemapping || getResultMappings() == null)
{initialize(rs);] java
+            // si ( request.Statement.AllowRemapping ||
(request.CurrentResultMap as AutoResultMap).IsInitalized) ....
+            if(resultMap.isFluent)
+                outObject = (request.CurrentResultMap as
AutoResultMap).CreateInstanceOfResultClass();
+
             for (int index = 0; index < resultMap.Properties.Count;
index++)
             {
                 ResultProperty property = resultMap.Properties[index];
                 resultMap.SetValueOfProperty(ref outObject, property,

property.GetDataBaseValue(reader));
             }
-
-            return outObject;
+
+            return outObject;
         }

         #endregion
Index: SqlMap.xsd
===================================================================
--- SqlMap.xsd    (revision 778216)
+++ SqlMap.xsd    (working copy)
@@ -1,853 +1,850 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<xs:schema
-targetNamespace="http://ibatis.apache.org/mapping"
-elementFormDefault="qualified"
-xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
-xmlns:xs="http://www.w3.org/2001/XMLSchema"
+<xs:schema
+targetNamespace="http://ibatis.apache.org/mapping"
+elementFormDefault="qualified"
+xmlns:mstns="http://tempuri.org/XMLSchema.xsd"
+xmlns:xs="http://www.w3.org/2001/XMLSchema"
 xmlns="http://ibatis.apache.org/mapping"
-xmlns:vs="http://schemas.microsoft.com/Visual-Studio-Intellisense"
-vs:friendlyname="iBATIS.NET mapping file Configuration Schema"
-vs:ishtmlschema="false"
-vs:iscasesensitive="true"
-vs:requireattributequotes="true"
-vs:defaultnamespacequalifier=""
+xmlns:vs="http://schemas.microsoft.com/Visual-Studio-Intellisense"
+vs:friendlyname="iBATIS.NET mapping file Configuration Schema"
+vs:ishtmlschema="false"
+vs:iscasesensitive="true"
+vs:requireattributequotes="true"
+vs:defaultnamespacequalifier=""
 vs:defaultnsprefix="" >

-    <xs:annotation>
-        <xs:documentation>
-        Mapping XML Schema Definition
-    </xs:documentation>
-    </xs:annotation>
-
-    <xs:element name="alias">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element ref="typeAlias" maxOccurs="unbounded"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="discriminator">
-        <xs:complexType>
-            <xs:attribute name="column" type="xs:string"/>
-            <xs:attribute name="type" type="xs:string"/>
-            <xs:attribute name="typeHandler" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="subMap">
-        <xs:complexType>
-            <xs:attribute name="value" use="required" type="xs:string"/>
-            <xs:attribute name="resultMapping" use="required"
type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-
-    <xs:element name="cacheModel">
-        <xs:complexType>
-            <xs:sequence maxOccurs="unbounded">
-                <xs:element ref="flushInterval" minOccurs="0"/>
-                <xs:element ref="flushOnExecute" minOccurs="0"
maxOccurs="unbounded"/>
-                <xs:element ref="property" minOccurs="0"
maxOccurs="unbounded"/>
-            </xs:sequence>
-            <xs:attribute name="id" type="xs:string" use="required"/>
-            <xs:attribute name="serialize" type="xs:string"
default="false"/>
-            <xs:attribute name="readOnly" type="xs:string"
default="true"/>
-            <xs:attribute name="implementation" use="required">
-                <xs:simpleType>
-                    <xs:restriction base="xs:NMTOKEN">
-                        <xs:enumeration value="LRU"/>
-                        <xs:enumeration value="MEMORY"/>
-                        <xs:enumeration value="FIFO"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="cacheModels">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element ref="cacheModel" maxOccurs="unbounded"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="procedure">
-        <xs:complexType mixed="true">
-            <xs:attribute name="id" type="xs:string" use="required"/>
-            <xs:attribute name="parameterMap" type="xs:string" />
-            <xs:attribute name="resultMap" type="xs:string"/>
-            <xs:attribute name="resultClass" type="xs:string"/>
-            <xs:attribute name="cacheModel" type="xs:string"/>
-            <xs:attribute name="listClass" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="delete">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="include"/>
-                <xs:element ref="generate"/>
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="id" use="required"/>
-            <xs:attribute name="parameterMap" type="xs:string"/>
-            <xs:attribute name="parameterClass" type="xs:string"/>
-            <xs:attribute name="extends" type="xs:string"/>
-            <xs:attribute name="remapResults">
-                <xs:simpleType>
-                    <xs:restriction base="xs:NMTOKEN">
-                        <xs:enumeration value="false"/>
-                        <xs:enumeration value="true"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="include">
-        <xs:complexType mixed="true">
-            <xs:attribute name="refid" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="dynamic">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="flushInterval">
-        <xs:complexType>
-            <xs:attribute name="milliseconds" type="xs:byte"/>
-            <xs:attribute name="seconds" type="xs:byte"/>
-            <xs:attribute name="minutes" type="xs:byte"/>
-            <xs:attribute name="hours" type="xs:byte"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="flushOnExecute">
-        <xs:complexType>
-            <xs:attribute name="statement" type="xs:string"
use="required"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="generate">
-        <xs:complexType>
-            <xs:attribute name="table" type="xs:string" use="required"/>
-            <xs:attribute name="by" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="insert">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="include"/>
-                <xs:element ref="selectKey"/>
-                <xs:element ref="generate"/>
-                <xs:element ref="dynamic"/>
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="id" type="xs:string" use="required"/>
-            <xs:attribute name="parameterClass" type="xs:string"/>
-            <xs:attribute name="parameterMap" type="xs:string"/>
-            <xs:attribute name="resultClass" type="xs:string"/>
-            <xs:attribute name="remapResults">
-                <xs:simpleType>
-                    <xs:restriction base="xs:NMTOKEN">
-                        <xs:enumeration value="false"/>
-                        <xs:enumeration value="true"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isNotParameterPresent">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isNotPropertyAvailable">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-            <xs:attribute name="property" type="xs:string" use="required"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isEmpty">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-            <xs:attribute name="property" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isEqual">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-            <xs:attribute name="property" type="xs:string"/>
-            <xs:attribute name="compareProperty" type="xs:string"/>
-            <xs:attribute name="compareValue" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isNull">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-            <xs:attribute name="property" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isGreaterEqual">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-            <xs:attribute name="property" type="xs:string"/>
-            <xs:attribute name="compareProperty" type="xs:string"/>
-            <xs:attribute name="compareValue" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isGreaterThan">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-            <xs:attribute name="property" type="xs:string"/>
-            <xs:attribute name="compareProperty" type="xs:string"/>
-            <xs:attribute name="compareValue" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isLessEqual">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-            <xs:attribute name="property" type="xs:string"/>
-            <xs:attribute name="compareProperty" type="xs:string"/>
-            <xs:attribute name="compareValue" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isLessThan">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-            <xs:attribute name="property" type="xs:string"/>
-            <xs:attribute name="compareProperty" type="xs:string"/>
-            <xs:attribute name="compareValue" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isNotEmpty">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-            <xs:attribute name="property" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isNotEqual">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-            <xs:attribute name="property" type="xs:string"/>
-            <xs:attribute name="compareProperty" type="xs:string"/>
-            <xs:attribute name="compareValue" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isNotNull">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-            <xs:attribute name="property" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isParameterPresent">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="isPropertyAvailable">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="prepend" type="xs:string"/>
-            <xs:attribute name="property" type="xs:string" use="required"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="iterate">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="open" type="xs:string" use="required"/>
-            <xs:attribute name="close" type="xs:string" use="required"/>
-            <xs:attribute name="conjunction" type="xs:string"
use="required"/>
-            <xs:attribute name="property" type="xs:string"/>
-            <xs:attribute name="prepend" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="parameter">
-        <xs:complexType>
-            <xs:attribute name="property" type="xs:string" use="required"/>
-            <xs:attribute name="column" type="xs:string"/>
-            <xs:attribute name="nullValue" type="xs:string"/>
-            <xs:attribute name="type" type="xs:string"/>
-            <xs:attribute name="dbType" type="xs:string"/>
-            <xs:attribute name="size" type="xs:string"/>
-            <xs:attribute name="scale" type="xs:string"/>
-            <xs:attribute name="precision" type="xs:string"/>
-            <xs:attribute name="typeHandler" type="xs:string"/>
-            <xs:attribute name="direction">
-                <xs:simpleType>
-                    <xs:restriction base="xs:NMTOKEN">
-                        <xs:enumeration value="Input"/>
-                        <xs:enumeration value="Output"/>
-                        <xs:enumeration value="InputOutput"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="parameterMap">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element ref="parameter" minOccurs="0"
maxOccurs="unbounded"/>
-            </xs:sequence>
-            <xs:attribute name="id" type="xs:string" use="required"/>
-            <xs:attribute name="class" type="xs:string" />
-            <xs:attribute name="extends" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="parameterMaps">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element ref="parameterMap" maxOccurs="unbounded"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="property">
-        <xs:complexType>
-            <xs:attribute name="name" type="xs:string" use="required"/>
-            <xs:attribute name="value" type="xs:string" use="required"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="result">
-        <xs:complexType>
-            <xs:attribute name="property" type="xs:string" use="required"/>
-            <xs:attribute name="column" type="xs:string"/>
-            <xs:attribute name="lazyLoad">
-                <xs:simpleType>
-                    <xs:restriction base="xs:NMTOKEN">
-                        <xs:enumeration value="false"/>
-                        <xs:enumeration value="true"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-            <xs:attribute name="select" type="xs:string"/>
-            <xs:attribute name="nullValue" type="xs:string"/>
-            <xs:attribute name="type" type="xs:string"/>
-            <xs:attribute name="dbType" type="xs:string"/>
-            <xs:attribute name="columnIndex" type="xs:string"/>
-            <xs:attribute name="resultMapping" type="xs:string"/>
-            <xs:attribute name="typeHandler" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="argument">
-        <xs:complexType>
-            <xs:attribute name="argumentName" type="xs:string"
use="required"/>
-            <xs:attribute name="column" type="xs:string"/>
-            <xs:attribute name="select" type="xs:string"/>
-            <xs:attribute name="nullValue" type="xs:string"/>
-            <xs:attribute name="type" type="xs:string"/>
-            <xs:attribute name="dbType" type="xs:string"/>
-            <xs:attribute name="columnIndex" type="xs:string"/>
-            <xs:attribute name="resultMapping" type="xs:string"/>
-            <xs:attribute name="typeHandler" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="constructor">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element ref="argument" maxOccurs="unbounded"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="resultMap">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element ref="constructor" minOccurs="0" maxOccurs="1"/>
-                <xs:element ref="result" minOccurs="0"
maxOccurs="unbounded"/>
-                <xs:element ref="discriminator" minOccurs="0"
maxOccurs="1"/>
-                <xs:element ref="subMap" minOccurs="0"
maxOccurs="unbounded"/>
-            </xs:sequence>
-            <xs:attribute name="id" type="xs:string" use="required"/>
-            <xs:attribute name="class" type="xs:string" use="required"/>
-            <xs:attribute name="extends" type="xs:string"/>
-            <xs:attribute name="groupBy" type="xs:string"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="resultMaps">
-        <xs:complexType>
-            <xs:sequence>
-                <xs:element ref="resultMap" minOccurs="0"
maxOccurs="unbounded"/>
-            </xs:sequence>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="select">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="include"/>
-                <xs:element ref="dynamic"/>
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-                <xs:element ref="generate"/>
-            </xs:choice>
-            <xs:attribute name="id" type="xs:string" use="required"/>
-            <xs:attribute name="parameterClass" type="xs:string"/>
-            <xs:attribute name="resultMap" type="xs:string"/>
-            <xs:attribute name="resultClass" type="xs:string"/>
-            <xs:attribute name="parameterMap" type="xs:string"/>
-            <xs:attribute name="cacheModel" type="xs:string"/>
-            <xs:attribute name="listClass" type="xs:string"/>
-            <xs:attribute name="extends" type="xs:string"/>
-            <xs:attribute name="remapResults">
-                <xs:simpleType>
-                    <xs:restriction base="xs:NMTOKEN">
-                        <xs:enumeration value="false"/>
-                        <xs:enumeration value="true"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="selectKey">
-        <xs:complexType>
-            <xs:simpleContent>
-                <xs:extension base="xs:string">
-                    <xs:attribute name="property" type="xs:string"
use="required"/>
-                    <xs:attribute name="type" use="required">
-                        <xs:simpleType>
-                            <xs:restriction base="xs:NMTOKEN">
-                                <xs:enumeration value="post"/>
-                                <xs:enumeration value="pre"/>
-                            </xs:restriction>
-                        </xs:simpleType>
-                    </xs:attribute>
-                    <xs:attribute name="resultClass" type="xs:string"
use="required"/>
-                </xs:extension>
-            </xs:simpleContent>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="sqlMap">
-        <xs:complexType>
-            <xs:all>
-                <xs:element ref="alias" minOccurs="0"/>
-                <xs:element ref="cacheModels" minOccurs="0"/>
-                <xs:element ref="resultMaps" minOccurs="0"/>
-                <xs:element ref="statements" minOccurs="0" />
-                <xs:element ref="parameterMaps" minOccurs="0"/>
-            </xs:all>
-            <xs:attribute name="namespace" type="xs:string"
use="required"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="sql">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="include"/>
-                <xs:element ref="dynamic"/>
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="id" type="xs:string" use="required"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="statement">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="include"/>
-                <xs:element ref="dynamic"/>
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="id" type="xs:string" use="required"/>
-            <xs:attribute name="parameterClass" type="xs:string"/>
-            <xs:attribute name="resultMap" type="xs:string"/>
-            <xs:attribute name="resultClass" type="xs:string"/>
-            <xs:attribute name="parameterMap" type="xs:string"/>
-            <xs:attribute name="listClass" type="xs:string"/>
-            <xs:attribute name="cacheModel" type="xs:string"/>
-            <xs:attribute name="remapResults">
-                <xs:simpleType>
-                    <xs:restriction base="xs:NMTOKEN">
-                        <xs:enumeration value="false"/>
-                        <xs:enumeration value="true"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="statements">
-        <xs:complexType>
-            <xs:choice maxOccurs="unbounded">
-                <xs:element ref="sql"/>
-                <xs:element ref="statement"/>
-                <xs:element ref="insert"/>
-                <xs:element ref="update"/>
-                <xs:element ref="delete"/>
-                <xs:element ref="select"/>
-                <xs:element ref="procedure"/>
-            </xs:choice>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="typeAlias">
-        <xs:complexType>
-            <xs:attribute name="alias" type="xs:string" use="required"/>
-            <xs:attribute name="type" type="xs:string" use="required"/>
-        </xs:complexType>
-    </xs:element>
-    <xs:element name="update">
-        <xs:complexType mixed="true">
-            <xs:choice minOccurs="0" maxOccurs="unbounded">
-                <xs:element ref="include"/>
-                <xs:element ref="generate"/>
-                <xs:element ref="dynamic"/>
-                <xs:element ref="isEmpty"/>
-                <xs:element ref="isEqual"/>
-                <xs:element ref="isGreaterEqual"/>
-                <xs:element ref="isGreaterThan"/>
-                <xs:element ref="isLessThan"/>
-                <xs:element ref="isLessEqual"/>
-                <xs:element ref="isNotEmpty"/>
-                <xs:element ref="isNotEqual"/>
-                <xs:element ref="isNotNull"/>
-                <xs:element ref="isNotParameterPresent"/>
-                <xs:element ref="isNotPropertyAvailable"/>
-                <xs:element ref="isNull"/>
-                <xs:element ref="isParameterPresent"/>
-                <xs:element ref="isPropertyAvailable"/>
-                <xs:element ref="iterate"/>
-            </xs:choice>
-            <xs:attribute name="id" type="xs:string" use="required"/>
-            <xs:attribute name="parameterMap" type="xs:string"/>
-            <xs:attribute name="parameterClass" type="xs:string"/>
-            <xs:attribute name="extends" type="xs:string"/>
-            <xs:attribute name="remapResults">
-                <xs:simpleType>
-                    <xs:restriction base="xs:NMTOKEN">
-                        <xs:enumeration value="false"/>
-                        <xs:enumeration value="true"/>
-                    </xs:restriction>
-                </xs:simpleType>
-            </xs:attribute>
-        </xs:complexType>
-    </xs:element>
+  <xs:annotation>
+    <xs:documentation>
+      Mapping XML Schema Definition
+    </xs:documentation>
+  </xs:annotation>
+  <xs:element name="alias">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref="typeAlias" maxOccurs="unbounded"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="discriminator">
+    <xs:complexType>
+      <xs:attribute name="column" type="xs:string"/>
+      <xs:attribute name="type" type="xs:string"/>
+      <xs:attribute name="typeHandler" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="subMap">
+    <xs:complexType>
+      <xs:attribute name="value" use="required" type="xs:string"/>
+      <xs:attribute name="resultMapping" use="required" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="cacheModel">
+    <xs:complexType>
+      <xs:sequence maxOccurs="unbounded">
+        <xs:element ref="flushInterval" minOccurs="0"/>
+        <xs:element ref="flushOnExecute" minOccurs="0"
maxOccurs="unbounded"/>
+        <xs:element ref="property" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+      <xs:attribute name="id" type="xs:string" use="required"/>
+      <xs:attribute name="serialize" type="xs:string"  default="false"/>
+      <xs:attribute name="readOnly" type="xs:string"  default="true"/>
+      <xs:attribute name="implementation" use="required">
+        <xs:simpleType>
+          <xs:restriction base="xs:NMTOKEN">
+            <xs:enumeration value="LRU"/>
+            <xs:enumeration value="MEMORY"/>
+            <xs:enumeration value="FIFO"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="cacheModels">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref="cacheModel" maxOccurs="unbounded"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="procedure">
+    <xs:complexType mixed="true">
+      <xs:attribute name="id" type="xs:string" use="required"/>
+      <xs:attribute name="parameterMap" type="xs:string" />
+      <xs:attribute name="resultMap" type="xs:string"/>
+      <xs:attribute name="resultClass" type="xs:string"/>
+      <xs:attribute name="cacheModel" type="xs:string"/>
+      <xs:attribute name="listClass" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="delete">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="include"/>
+        <xs:element ref="generate"/>
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="id" use="required"/>
+      <xs:attribute name="parameterMap" type="xs:string"/>
+      <xs:attribute name="parameterClass" type="xs:string"/>
+      <xs:attribute name="extends" type="xs:string"/>
+      <xs:attribute name="remapResults">
+        <xs:simpleType>
+          <xs:restriction base="xs:NMTOKEN">
+            <xs:enumeration value="false"/>
+            <xs:enumeration value="true"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="include">
+    <xs:complexType mixed="true">
+      <xs:attribute name="refid" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="dynamic">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="flushInterval">
+    <xs:complexType>
+      <xs:attribute name="milliseconds" type="xs:byte"/>
+      <xs:attribute name="seconds" type="xs:byte"/>
+      <xs:attribute name="minutes" type="xs:byte"/>
+      <xs:attribute name="hours" type="xs:byte"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="flushOnExecute">
+    <xs:complexType>
+      <xs:attribute name="statement" type="xs:string" use="required"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="generate">
+    <xs:complexType>
+      <xs:attribute name="table" type="xs:string" use="required"/>
+      <xs:attribute name="by" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="insert">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="include"/>
+        <xs:element ref="selectKey"/>
+        <xs:element ref="generate"/>
+        <xs:element ref="dynamic"/>
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="id" type="xs:string" use="required"/>
+      <xs:attribute name="parameterClass" type="xs:string"/>
+      <xs:attribute name="parameterMap" type="xs:string"/>
+      <xs:attribute name="resultClass" type="xs:string"/>
+      <xs:attribute name="remapResults">
+        <xs:simpleType>
+          <xs:restriction base="xs:NMTOKEN">
+            <xs:enumeration value="false"/>
+            <xs:enumeration value="true"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isNotParameterPresent">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isNotPropertyAvailable">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+      <xs:attribute name="property" type="xs:string" use="required"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isEmpty">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+      <xs:attribute name="property" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isEqual">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+      <xs:attribute name="property" type="xs:string"/>
+      <xs:attribute name="compareProperty" type="xs:string"/>
+      <xs:attribute name="compareValue" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isNull">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+      <xs:attribute name="property" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isGreaterEqual">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+      <xs:attribute name="property" type="xs:string"/>
+      <xs:attribute name="compareProperty" type="xs:string"/>
+      <xs:attribute name="compareValue" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isGreaterThan">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+      <xs:attribute name="property" type="xs:string"/>
+      <xs:attribute name="compareProperty" type="xs:string"/>
+      <xs:attribute name="compareValue" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isLessEqual">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+      <xs:attribute name="property" type="xs:string"/>
+      <xs:attribute name="compareProperty" type="xs:string"/>
+      <xs:attribute name="compareValue" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isLessThan">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+      <xs:attribute name="property" type="xs:string"/>
+      <xs:attribute name="compareProperty" type="xs:string"/>
+      <xs:attribute name="compareValue" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isNotEmpty">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+      <xs:attribute name="property" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isNotEqual">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+      <xs:attribute name="property" type="xs:string"/>
+      <xs:attribute name="compareProperty" type="xs:string"/>
+      <xs:attribute name="compareValue" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isNotNull">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+      <xs:attribute name="property" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isParameterPresent">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="isPropertyAvailable">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="prepend" type="xs:string"/>
+      <xs:attribute name="property" type="xs:string" use="required"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="iterate">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="open" type="xs:string" use="required"/>
+      <xs:attribute name="close" type="xs:string" use="required"/>
+      <xs:attribute name="conjunction" type="xs:string" use="required"/>
+      <xs:attribute name="property" type="xs:string"/>
+      <xs:attribute name="prepend" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="parameter">
+    <xs:complexType>
+      <xs:attribute name="property" type="xs:string" use="required"/>
+      <xs:attribute name="column" type="xs:string"/>
+      <xs:attribute name="nullValue" type="xs:string"/>
+      <xs:attribute name="type" type="xs:string"/>
+      <xs:attribute name="dbType" type="xs:string"/>
+      <xs:attribute name="size" type="xs:string"/>
+      <xs:attribute name="scale" type="xs:string"/>
+      <xs:attribute name="precision" type="xs:string"/>
+      <xs:attribute name="typeHandler" type="xs:string"/>
+      <xs:attribute name="direction">
+        <xs:simpleType>
+          <xs:restriction base="xs:NMTOKEN">
+            <xs:enumeration value="Input"/>
+            <xs:enumeration value="Output"/>
+            <xs:enumeration value="InputOutput"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="parameterMap">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref="parameter" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+      <xs:attribute name="id" type="xs:string" use="required"/>
+      <xs:attribute name="class" type="xs:string" />
+      <xs:attribute name="extends" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="parameterMaps">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref="parameterMap" maxOccurs="unbounded"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="property">
+    <xs:complexType>
+      <xs:attribute name="name" type="xs:string" use="required"/>
+      <xs:attribute name="value" type="xs:string" use="required"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="result">
+    <xs:complexType>
+      <xs:attribute name="property" type="xs:string" use="required"/>
+      <xs:attribute name="column" type="xs:string"/>
+      <xs:attribute name="lazyLoad">
+        <xs:simpleType>
+          <xs:restriction base="xs:NMTOKEN">
+            <xs:enumeration value="false"/>
+            <xs:enumeration value="true"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+      <xs:attribute name="select" type="xs:string"/>
+      <xs:attribute name="nullValue" type="xs:string"/>
+      <xs:attribute name="type" type="xs:string"/>
+      <xs:attribute name="dbType" type="xs:string"/>
+      <xs:attribute name="columnIndex" type="xs:string"/>
+      <xs:attribute name="resultMapping" type="xs:string"/>
+      <xs:attribute name="typeHandler" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="argument">
+    <xs:complexType>
+      <xs:attribute name="argumentName" type="xs:string" use="required"/>
+      <xs:attribute name="column" type="xs:string"/>
+      <xs:attribute name="select" type="xs:string"/>
+      <xs:attribute name="nullValue" type="xs:string"/>
+      <xs:attribute name="type" type="xs:string"/>
+      <xs:attribute name="dbType" type="xs:string"/>
+      <xs:attribute name="columnIndex" type="xs:string"/>
+      <xs:attribute name="resultMapping" type="xs:string"/>
+      <xs:attribute name="typeHandler" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="constructor">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref="argument" maxOccurs="unbounded"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="resultMap">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref="constructor" minOccurs="0" maxOccurs="1"/>
+        <xs:element ref="result" minOccurs="0" maxOccurs="unbounded"/>
+        <xs:element ref="discriminator" minOccurs="0" maxOccurs="1"/>
+        <xs:element ref="subMap" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+      <xs:attribute name="id" type="xs:string" use="required"/>
+      <xs:attribute name="class" type="xs:string" use="required"/>
+      <xs:attribute name="extends" type="xs:string"/>
+      <xs:attribute name="groupBy" type="xs:string"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="resultMaps">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref="resultMap" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="select">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="include"/>
+        <xs:element ref="dynamic"/>
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+        <xs:element ref="generate"/>
+      </xs:choice>
+      <xs:attribute name="id" type="xs:string" use="required"/>
+      <xs:attribute name="parameterClass" type="xs:string"/>
+      <xs:attribute name="resultMap" type="xs:string"/>
+      <xs:attribute name="resultFluent" type="xs:string"/>
+      <xs:attribute name="resultClass" type="xs:string"/>
+      <xs:attribute name="parameterMap" type="xs:string"/>
+      <xs:attribute name="cacheModel" type="xs:string"/>
+      <xs:attribute name="listClass" type="xs:string"/>
+      <xs:attribute name="extends" type="xs:string"/>
+      <xs:attribute name="remapResults">
+        <xs:simpleType>
+          <xs:restriction base="xs:NMTOKEN">
+            <xs:enumeration value="false"/>
+            <xs:enumeration value="true"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="selectKey">
+    <xs:complexType>
+      <xs:simpleContent>
+        <xs:extension base="xs:string">
+          <xs:attribute name="property" type="xs:string" use="required"/>
+          <xs:attribute name="type" use="required">
+            <xs:simpleType>
+              <xs:restriction base="xs:NMTOKEN">
+                <xs:enumeration value="post"/>
+                <xs:enumeration value="pre"/>
+              </xs:restriction>
+            </xs:simpleType>
+          </xs:attribute>
+          <xs:attribute name="resultClass" type="xs:string"
use="required"/>
+        </xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="sqlMap">
+    <xs:complexType>
+      <xs:all>
+        <xs:element ref="alias" minOccurs="0"/>
+        <xs:element ref="cacheModels" minOccurs="0"/>
+        <xs:element ref="resultMaps" minOccurs="0"/>
+        <xs:element ref="statements" minOccurs="0" />
+        <xs:element ref="parameterMaps" minOccurs="0"/>
+      </xs:all>
+      <xs:attribute name="namespace" type="xs:string" use="required"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="sql">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="include"/>
+        <xs:element ref="dynamic"/>
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="id" type="xs:string" use="required"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="statement">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="include"/>
+        <xs:element ref="dynamic"/>
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="id" type="xs:string" use="required"/>
+      <xs:attribute name="parameterClass" type="xs:string"/>
+      <xs:attribute name="resultMap" type="xs:string"/>
+      <xs:attribute name="resultClass" type="xs:string"/>
+      <xs:attribute name="parameterMap" type="xs:string"/>
+      <xs:attribute name="listClass" type="xs:string"/>
+      <xs:attribute name="cacheModel" type="xs:string"/>
+      <xs:attribute name="remapResults">
+        <xs:simpleType>
+          <xs:restriction base="xs:NMTOKEN">
+            <xs:enumeration value="false"/>
+            <xs:enumeration value="true"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="statements">
+    <xs:complexType>
+      <xs:choice maxOccurs="unbounded">
+        <xs:element ref="sql"/>
+        <xs:element ref="statement"/>
+        <xs:element ref="insert"/>
+        <xs:element ref="update"/>
+        <xs:element ref="delete"/>
+        <xs:element ref="select"/>
+        <xs:element ref="procedure"/>
+      </xs:choice>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="typeAlias">
+    <xs:complexType>
+      <xs:attribute name="alias" type="xs:string" use="required"/>
+      <xs:attribute name="type" type="xs:string" use="required"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="update">
+    <xs:complexType mixed="true">
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="include"/>
+        <xs:element ref="generate"/>
+        <xs:element ref="dynamic"/>
+        <xs:element ref="isEmpty"/>
+        <xs:element ref="isEqual"/>
+        <xs:element ref="isGreaterEqual"/>
+        <xs:element ref="isGreaterThan"/>
+        <xs:element ref="isLessThan"/>
+        <xs:element ref="isLessEqual"/>
+        <xs:element ref="isNotEmpty"/>
+        <xs:element ref="isNotEqual"/>
+        <xs:element ref="isNotNull"/>
+        <xs:element ref="isNotParameterPresent"/>
+        <xs:element ref="isNotPropertyAvailable"/>
+        <xs:element ref="isNull"/>
+        <xs:element ref="isParameterPresent"/>
+        <xs:element ref="isPropertyAvailable"/>
+        <xs:element ref="iterate"/>
+      </xs:choice>
+      <xs:attribute name="id" type="xs:string" use="required"/>
+      <xs:attribute name="parameterMap" type="xs:string"/>
+      <xs:attribute name="parameterClass" type="xs:string"/>
+      <xs:attribute name="extends" type="xs:string"/>
+      <xs:attribute name="remapResults">
+        <xs:simpleType>
+          <xs:restriction base="xs:NMTOKEN">
+            <xs:enumeration value="false"/>
+            <xs:enumeration value="true"/>
+          </xs:restriction>
+        </xs:simpleType>
+      </xs:attribute>
+    </xs:complexType>
+  </xs:element>
 </xs:schema>









On Sat, May 23, 2009 at 10:37 AM, Sal Bass <sa...@hotmail.com> wrote:

>  What do you guys think about some sort of DSL for Ibatis configuration?
> The result maps would be feasible, but what would we do with the sql
> statements? Something like Fluent Nhibernate, only different ;-)
>
>
>
> ------------------------------
> Hotmail® goes with you. Get it on your BlackBerry or iPhone.<http://windowslive.com/Tutorial/Hotmail/Mobile?ocid=TXT_TAGLM_WL_HM_Tutorial_Mobile1_052009>
>