<?xml version="1.0" encoding="ISO-8859-1"?>
<persistence-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../defs/config-metier/Persistence.xsd">
    <layer name="mysql" persistence-model="xemelios-sql">
        <document
            id="edmn"
            repository-import-xslt-file=""
            collectivite-code-colname="COLLECTIVITE"
            collectivite-lib-colname="COLLECTIVITE_LIB"
            budget-code-colname="BUDGET"
            budget-lib-colname="BUDGET_LIB">
            <table type="repository" base-name="EDMN_REPOSITORY" version="2"> CREATE TABLE IF NOT EXISTS ${base-name} ( ID VARCHAR(25), LIBELLE VARCHAR(100), COLLECTIVITE VARCHAR(15) NOT NULL, REPOSITORY LONGBLOB, ENCODING VARCHAR(20) ) TYPE MYISAM <patch from-version="1">
                    <sql failonerror="false">ALTER TABLE ${base-name} ADD ID VARCHAR(25)</sql>
                    <sql failonerror="false">ALTER TABLE ${base-name} ADD LIBELLE VARCHAR(100)</sql>
                </patch>
            </table>
            <table type="list-bc" base-name="EDMN_LIST_BUDG_COLL" version="1"> CREATE TABLE IF NOT EXISTS ${base-name} ( COLLECTIVITE VARCHAR(15) NOT NULL, BUDGET VARCHAR(24) NOT NULL, BUDGET_LIB VARCHAR(200), COLLECTIVITE_LIB VARCHAR(200), INITIAL_DOC_NAME VARCHAR(100) NOT NULL, INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET) ) TYPE MYISAM </table>
            <table type="special-key" base-name="EDMN_SPECIAL_KEYS" version="1"> CREATE TABLE IF NOT EXISTS ${base-name} ( COLLECTIVITE VARCHAR(15) NOT NULL, BUDGET VARCHAR(24) NOT NULL, INITIAL_DOC_NAME VARCHAR(100) NOT NULL, KEY1 VARCHAR(100) NOT NULL, LIB1 VARCHAR(200), KEY2 VARCHAR(100), LIB2 VARCHAR(200), KEY3 VARCHAR(100), LIB3 VARCHAR(200), INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET) ) TYPE MYISAM </table>
            <etat id="etatEdmn" import-xslt-file="edmn/edmn-import-mysql.xsl">
                <key1>
                    <path>/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:NumLiasseNationale/n:Liasse/@added:generated-id</path>
                </key1>
                <table type="document" base-name="EDMN_ETATEDMN_DOCUMENTS" version="2">
                    CREATE TABLE IF NOT EXISTS ${base-name} ( 
                        COLLECTIVITE VARCHAR(15) NOT NULL, 
                        BUDGET VARCHAR(24) NOT NULL, 
                        INITIAL_DOC_NAME VARCHAR(100) NOT NULL, 
                        DOC_ID VARCHAR(100) NOT NULL, 
                        DOC LONGBLOB, 
                        ENCODING VARCHAR(20),
                        ANNEE_GESTION INTEGER,
                        INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                        INDEX IX_EDMN_DOC_ANNEE_GESTION(COLLECTIVITE,BUDGET,ANNEE_GESTION)
                    ) TYPE MYISAM
                    <patch from-version="1">
                        <sql failonerror="false">ALTER TABLE EDMN_ETATEDMN_DOCUMENTS ADD ANNEE_GESTION INTEGER, ADD INDEX IX_EDMN_DOC_ANNEE_GESTION(COLLECTIVITE,BUDGET,ANNEE_GESTION)</sql>
                    </patch>
                    
                </table>
                <table type="index" id="T1" base-name="EDMN_ETATEDMN_INDEX_EDMN" version="7" main="true">
                    CREATE TABLE IF NOT EXISTS ${base-name} ( 
                        COLLECTIVITE VARCHAR(15) NOT NULL, 
                        BUDGET VARCHAR(24) NOT NULL, 
                        DOC_ID VARCHAR(100) NOT NULL, 
                        COMPTABLE VARCHAR(6), 
                        LIB_COMPTABLE VARCHAR(250), 
                        MINISTERE VARCHAR(3), 
                        LIB_MINISTERE VARCHAR(250), 
                        ORDO VARCHAR(10), 
                        LIB_ORDO VARCHAR(250), 
                        TYPE_EVT VARCHAR(3), 
                        ANNEE_BUDG INTEGER, 
                        NUM_MANDAT VARCHAR(6), 
                        CPTE_TRESOR VARCHAR(5), 
                        OPE_INVEST VARCHAR(8), 
                        ANNEE_ENGAG INTEGER, 
                        NUM_ENGAG VARCHAR(6), 
                        CHAP_BUDG VARCHAR(4), 
                        ART_BUDG VARCHAR(2), 
                        PARAG_BUDG VARCHAR(2), 
                        MT_PJ DECIMAL(14,2), 
                        SIGNE_MT VARCHAR(1), 
                        TRIMESTRE INTEGER, 
                        MOIS INTEGER, 
                        DATE_CREA DATE, 
                        CHAP_CLASS VARCHAR(4), 
                        TYPE_PAIEMENT VARCHAR(3), 
                        ART_BUDG_PREV VARCHAR(2), 
                        ZONE24 VARCHAR(24), 
                        NUM_LIASSE_LOC VARCHAR(8),
                        NUM_LIASSE_DEB VARCHAR(4),
                        NUM_LIASSE_FIN VARCHAR(4),
                        SUIVI_ECO1 VARCHAR(2), 
                        SUIVI_ECO2 VARCHAR(2), 
                        SUIVI_ECO3 VARCHAR(2), 
                        CODE_CORR VARCHAR(4), 
                        CODE_MANIP VARCHAR(1), 
                        NUM_LIASSE VARCHAR(6), 
                        ZONE32 VARCHAR(32),
                        LIB_PROGRAMME VARCHAR(250),
                        LIB_ACTION VARCHAR(250),
                        CODE_OPER_EXC VARCHAR(32),
                        NUM_PIECE_COMPTA VARCHAR(32),
                        IMPUTATION CHAR(1),
                        DATE_PAIEMENT DATE,
                        INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                        INDEX IX_${base-name}_DC (DOC_ID), 
                        INDEX IX_LIB_COMPTA (COLLECTIVITE,BUDGET,LIB_COMPTABLE), 
                        INDEX IX_LIB_MINISTERE (COLLECTIVITE,BUDGET,LIB_MINISTERE), 
                        INDEX IX_LIB_ORDO (COLLECTIVITE,BUDGET,LIB_ORDO),
                        INDEX IX_ETATEDMN_MANDAT (NUM_MANDAT),
                        INDEX IX_ETATEDMN_ORDO (ORDO),
                        INDEX IX_ETATEDMN_MINISTERE (MINISTERE),
                        INDEX IX_ETATEDMN_COMPTA (COMPTABLE),
                        INDEX IX_ETATEDMN_TYPE_EVT (TYPE_EVT),
                        INDEX IX_ETATEDMN_ANNEE_BUDG (ANNEE_BUDG),
                        INDEX IX_ETATEDMN_CPTE_TRESOR (CPTE_TRESOR), 
                        INDEX IX_ETATEDMN_OPE_INVEST (OPE_INVEST),
                        INDEX IX_ETATEDMN_ANNEE_ENGAG (ANNEE_ENGAG), 
                        INDEX IX_ETATEDMN_NUM_ENGAG (NUM_ENGAG), 
                        INDEX IX_ETATEDMN_CHAP_BUDG (CHAP_BUDG), 
                        INDEX IX_ETATEDMN_ART_BUDG (ART_BUDG), 
                        INDEX IX_ETATEDMN_PARAG_BUDG (PARAG_BUDG), 
                        INDEX IX_ETATEDMN_MT_PJ (MT_PJ), 
                        INDEX IX_ETATEDMN_TRIM (TRIMESTRE), 
                        INDEX IX_ETATEDMN_MOIS (MOIS), 
                        INDEX IX_ETATEDMN_DATE_CREA (DATE_CREA), 
                        INDEX IX_ETATEDMN_CHAP_CLASS (CHAP_CLASS), 
                        INDEX IX_ETATEDMN_TYPE_PAY (TYPE_PAIEMENT), 
                        INDEX IX_ETATEDMN_ART_BDG_P (ART_BUDG_PREV), 
                        INDEX IX_ETATEDMN_LIASSE_LOC (NUM_LIASSE_LOC), 
                        INDEX IX_ETATEDMN_ECO1 (SUIVI_ECO1), 
                        INDEX IX_ETATEDMN_ECO2 (SUIVI_ECO2), 
                        INDEX IX_ETATEDMN_ECO3 (SUIVI_ECO3),
                        INDEX IX_ETATEDMN_LIB_PROG (LIB_PROGRAMME),
                        INDEX IX_ETATEDMN_LIB_ACTION (LIB_ACTION),
                        INDEX IX_ETATEDMN_OPER_EXC (CODE_OPER_EXC),
                        INDEX IX_ETATEDMN_PIECE_COMPTA (NUM_PIECE_COMPTA),
                        INDEX IX_ETATEDMN_LIASSE_LOC_DEB (NUM_LIASSE_DEB),
                        INDEX IX_ETATEDMN_LIASSE_LOC_FIN (NUM_LIASSE_FIN),
                        INDEX IX_IMPUTATION (IMPUTATION),
                        INDEX IX_ETATEDMN_DTE_PAY (DATE_PAIEMENT)
                    ) TYPE MYISAM
                    <patch from-version="1">
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD LIB_COMPTABLE VARCHAR(250)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD LIB_ORDO VARCHAR(250)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD LIB_MINISTERE VARCHAR(250)</sql>
                        <sql failonerror="false">CREATE INDEX IX_LIB_COMPTA ON ${base-name} (COLLECTIVITE,BUDGET,LIB_COMPTABLE)</sql>
                        <sql failonerror="false">CREATE INDEX IX_LIB_MINISTERE ON ${base-name} (COLLECTIVITE,BUDGET,LIB_MINISTERE)</sql>
                        <sql failonerror="false">CREATE INDEX IX_LIB_ORDO ON ${base-name} (COLLECTIVITE,BUDGET,LIB_ORDO)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD LIB_PROGRAMME VARCHAR(250)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD LIB_ACTION VARCHAR(250)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD CODE_OPER_EXC VARCHAR(32)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD NUM_PIECE_COMPTA VARCHAR(32)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIB_PROG ON ${base-name} (LIB_PROGRAMME)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIB_ACTION ON ${base-name} (LIB_ACTION)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_OPER_EXC ON ${base-name} (CODE_OPER_EXC)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_PIECE_COMPTA ON ${base-name} (NUM_PIECE_COMPTA)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD NUM_LIASSE_DEB VARCHAR(4)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD NUM_LIASSE_FIN VARCHAR(4)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIASSE_LOC_DEB ON ${base-name} (NUM_LIASSE_DEB)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIASSE_LOC_FIN ON ${base-name} (NUM_LIASSE_FIN)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD DATE_PAIEMENT DATE</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_DTE_PAY ON ${base-name} (DATE_PAIEMENT)</sql>
                    </patch>
                    <patch from-version="2">
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD LIB_MINISTERE VARCHAR(250)</sql>
                        <sql failonerror="false">CREATE INDEX IX_LIB_COMPTA ON ${base-name} (COLLECTIVITE,BUDGET,LIB_COMPTABLE)</sql>
                        <sql failonerror="false">CREATE INDEX IX_LIB_MINISTERE ON ${base-name} (COLLECTIVITE,BUDGET,LIB_MINISTERE)</sql>
                        <sql failonerror="false">CREATE INDEX IX_LIB_ORDO ON ${base-name} (COLLECTIVITE,BUDGET,LIB_ORDO)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD LIB_PROGRAMME VARCHAR(250)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD LIB_ACTION VARCHAR(250)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD CODE_OPER_EXC VARCHAR(32)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD NUM_PIECE_COMPTA VARCHAR(32)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIB_PROG ON ${base-name} (LIB_PROGRAMME)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIB_ACTION ON ${base-name} (LIB_ACTION)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_OPER_EXC ON ${base-name} (CODE_OPER_EXC)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_PIECE_COMPTA ON ${base-name} (NUM_PIECE_COMPTA)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD NUM_LIASSE_DEB VARCHAR(4)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD NUM_LIASSE_FIN VARCHAR(4)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIASSE_LOC_DEB ON ${base-name} (NUM_LIASSE_DEB)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIASSE_LOC_FIN ON ${base-name} (NUM_LIASSE_FIN)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD DATE_PAIEMENT DATE</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_DTE_PAY ON ${base-name} (DATE_PAIEMENT)</sql>
                    </patch>
                    <patch from-version="3">
                        <sql failonerror="false">CREATE INDEX IX_LIB_COMPTA ON ${base-name} (COLLECTIVITE,BUDGET,LIB_COMPTABLE)</sql>
                        <sql failonerror="false">CREATE INDEX IX_LIB_MINISTERE ON ${base-name} (COLLECTIVITE,BUDGET,LIB_MINISTERE)</sql>
                        <sql failonerror="false">CREATE INDEX IX_LIB_ORDO ON ${base-name} (COLLECTIVITE,BUDGET,LIB_ORDO)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD LIB_PROGRAMME VARCHAR(250)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD LIB_ACTION VARCHAR(250)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD CODE_OPER_EXC VARCHAR(32)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD NUM_PIECE_COMPTA VARCHAR(32)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIB_PROG ON ${base-name} (LIB_PROGRAMME)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIB_ACTION ON ${base-name} (LIB_ACTION)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_OPER_EXC ON ${base-name} (CODE_OPER_EXC)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_PIECE_COMPTA ON ${base-name} (NUM_PIECE_COMPTA)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD NUM_LIASSE_DEB VARCHAR(4)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD NUM_LIASSE_FIN VARCHAR(4)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIASSE_LOC_DEB ON ${base-name} (NUM_LIASSE_DEB)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIASSE_LOC_FIN ON ${base-name} (NUM_LIASSE_FIN)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD DATE_PAIEMENT DATE</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_DTE_PAY ON ${base-name} (DATE_PAIEMENT)</sql>
                    </patch>
                    <patch from-version="4">
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD LIB_PROGRAMME VARCHAR(250)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD LIB_ACTION VARCHAR(250)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD CODE_OPER_EXC VARCHAR(32)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD NUM_PIECE_COMPTA VARCHAR(32)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIB_PROG ON ${base-name} (LIB_PROGRAMME)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIB_ACTION ON ${base-name} (LIB_ACTION)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_OPER_EXC ON ${base-name} (CODE_OPER_EXC)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_PIECE_COMPTA ON ${base-name} (NUM_PIECE_COMPTA)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD NUM_LIASSE_DEB VARCHAR(4)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD NUM_LIASSE_FIN VARCHAR(4)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIASSE_LOC_DEB ON ${base-name} (NUM_LIASSE_DEB)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_LIASSE_LOC_FIN ON ${base-name} (NUM_LIASSE_FIN)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD DATE_PAIEMENT DATE</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_DTE_PAY ON ${base-name} (DATE_PAIEMENT)</sql>
                    </patch>
                    <patch from-version="5">
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD IMPUTATION CHAR(1)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD INDEX IX_IMPUTATION(IMPUTATION)</sql>
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD DATE_PAIEMENT DATE</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_DTE_PAY ON ${base-name} (DATE_PAIEMENT)</sql>
                    </patch>
                    <patch from-version="6">
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD DATE_PAIEMENT DATE</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_DTE_PAY ON ${base-name} (DATE_PAIEMENT)</sql>
                    </patch>
                    <!--patch from-version="7">
                        <sql failonerror="false">ALTER TABLE ${base-name} ADD MT_PCE DECIMAL(14,2)</sql>
                        <sql failonerror="false">CREATE INDEX IX_ETATEDMN_CHORUS_MT_PCE ON ${base-name} (MT_PCE)</sql>
                    </patch-->
                </table>
                <table id="T2" base-name="EDMN_ETATEDMN_IX_EDMN_LIASSES" type="index" version="2" based-on="key1">
                    CREATE TABLE IF NOT EXISTS ${base-name} ( 
                        COLLECTIVITE VARCHAR(15) NOT NULL, 
                        BUDGET VARCHAR(24) NOT NULL, 
                        DOC_ID VARCHAR(100) NOT NULL, 
                        NUM_LIASSE VARCHAR(6) NOT NULL,
                        ANNEE_GESTION INTEGER,
                        INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID), 
                        INDEX IX_${base-name}_DC (DOC_ID),
                        INDEX IX_EDMN_ETATEDMN_LIASSES_ANGEST(COLLECTIVITE,BUDGET,ANNEE_GESTION)
                        ) TYPE MYISAM
                        <patch from-version="1">
                            <sql failonerror="false">ALTER TABLE EDMN_ETATEDMN_IX_EDMN_LIASSES ADD ANNEE_GESTION INTEGER, ADD INDEX IX_EDMN_ETATEDMN_LIASSES_ANGEST(COLLECTIVITE,BUDGET,ANNEE_GESTION)</sql>
                        </patch>
                </table>

                <criteria id="comptable" sql-index-id="comptable">
                    <where-clause>fn:string-compare(${table}.${column},comptable)</where-clause>
                </criteria>
                <criteria id="lib-comptable" sql-index-id="lib-comptable">
                    <where-clause>fn:string-compare(${table}.${column},libComptable)</where-clause>
                </criteria>
                <criteria id="ministere" sql-index-id="ministere">
                    <where-clause>fn:string-compare(${table}.${column},ministere)</where-clause>
                </criteria>
                <criteria id="libministere" sql-index-id="lib-ministere">
                    <where-clause>fn:string-compare(${table}.${column},ministereLib)</where-clause>
                </criteria>
                <criteria id="ordo" sql-index-id="ordo">
                    <where-clause>fn:string-compare(${table}.${column},ordo)</where-clause>
                </criteria>
                <criteria id="lib-ordo" sql-index-id="lib-ordo">
                    <where-clause>fn:string-compare(${table}.${column},libOrdo)</where-clause>
                </criteria>

                <criteria id="anneeBudget" sql-index-id="anneeBudget">
                    <where-clause>${table}.${column}##OPERATEUR:annee####VALEUR:annee##</where-clause>
                </criteria>
                <criteria id="numMandat" sql-index-id="numMandat">
                    <where-clause>fn:string-compare(${table}.${column},numMandat)</where-clause>
                </criteria>
                <criteria id="numOpeInvest" sql-index-id="numOpeInvest">
                    <where-clause>fn:string-compare(${table}.${column},numOpeInvest)</where-clause>
                </criteria>
                <criteria id="mtPj" sql-index-id="mtPj">
                    <where-clause>${table}.${column}##OPERATEUR:mtPj####VALEUR:mtPj##</where-clause>
                </criteria>
                <criteria id="dateCrea" sql-index-id="dateCrea">
                    <where-clause>fn:date-compare(${table}.${column},dateCrea)</where-clause>
                </criteria>
                <criteria id="datePaie" sql-index-id="datePaiement">
                    <where-clause>fn:date-compare(${table}.${column},datePaie)</where-clause>
                </criteria>
                <criteria id="typeEvt" sql-index-id="typeEvt">
                    <where-clause>${table}.${column}=&apos;##VALEUR:typeEvt##&apos;</where-clause>
                </criteria>
                <criteria id="liasseLocale" sql-index-id="numLiasseLocale">
                    <where-clause>fn:string-compare(${table}.${column},numLiasse)</where-clause>
                </criteria>
                <criteria id="liasseLocaleDeb" sql-index-id="numLiasseLocaleDeb">
                    <where-clause>fn:string-compare(${table}.${column},numLiasse)</where-clause>
                </criteria>
                <criteria id="liasseLocaleFin" sql-index-id="numLiasseLocaleFin">
                    <where-clause>fn:string-compare(${table}.${column},numLiasse)</where-clause>
                </criteria>
                <criteria id="liasseCentrale" sql-index-id="numLiasseCentrale">
                    <where-clause>fn:string-compare(${table}.${column},numLiasse)</where-clause>
                </criteria>
                <criteria id="programme" sql-index-id="programme">
                    <where-clause>fn:string-compare(${table}.${column},programme)</where-clause>
                </criteria>
                <criteria id="action" sql-index-id="action">
                    <where-clause>fn:string-compare(${table}.${column},action)</where-clause>
                </criteria>
                <criteria id="cpce" sql-index-id="cpce">
                    <where-clause>fn:string-compare(${table}.${column},cpce)</where-clause>
                </criteria>
                <criteria id="artPrev" sql-index-id="artPrev">
                    <where-clause>fn:string-compare(${table}.${column},artPrev)</where-clause>
                </criteria>
                <criteria id="libProgramme" sql-index-id="libProgramme">
                    <where-clause>fn:string-compare(${table}.${column},libProgramme)</where-clause>
                </criteria>
                <criteria id="libAction" sql-index-id="libAction">
                    <where-clause>fn:string-compare(${table}.${column},libAction)</where-clause>
                </criteria>
                <criteria id="codeOperExc" sql-index-id="codOperExc">
                    <where-clause>fn:string-compare(${table}.${column},codeOperExc)</where-clause>
                </criteria>
                <criteria id="numPieceCompta" sql-index-id="numPieceCompta">
                    <where-clause>fn:string-compare(${table}.${column},numPieceCompta)</where-clause>
                </criteria>
                <criteria id="typePaiement" sql-index-id="typePaiement">
                    <where-clause>fn:string-compare(${table}.${column},typePaiement)</where-clause>
                </criteria>
                <criteria id="chapClassPJ" sql-index-id="chapClassPJ">
                    <where-clause>fn:string-compare(${table}.${column},chapClassPJ)</where-clause>
                </criteria>
                <criteria id="trimestre" sql-index-id="trimestre">
                    <where-clause>${table}.${column}##OPERATEUR:trimestre####VALEUR:trimestre##</where-clause>
                </criteria>
                <!--criteria id="CRI_LIGNEEDMN_MT_PCE" sql-index-id="mt-pce">
                    <where-clause>${table}.${column}##OPERATEUR:mtPce####VALEUR:mtPce##</where-clause>
                </criteria-->
                
                

                <sql-index id="comptable" table="T1" column="COMPTABLE" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:Comptable/@V" datatype="string" format="uppercase"/>
                <sql-index id="lib-comptable" table="T1" column="LIB_COMPTABLE" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:LibelleComptable/@V" datatype="string" format="uppercase"/>
                <sql-index id="ministere" table="T1" column="MINISTERE" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:Ministere/@V" datatype="string" format="uppercase"/>
                <sql-index id="lib-ministere" table="T1" column="LIB_MINISTERE" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:Ministere/@LibelleMinistere" datatype="string" format="uppercase"/>
                <sql-index id="ordo" table="T1" column="ORDO" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:Ordo/@V" datatype="string" format="uppercase"/>
                <sql-index id="lib-ordo" table="T1" column="LIB_ORDO" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:LibelleOrdonnateur/@V" datatype="string" format="uppercase"/>
                <sql-index id="anneeBudget" table="T1" column="ANNEE_BUDG" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:AnneeBudget/@V" datatype="integer"/>
                <sql-index id="trimestre" table="T1" column="TRIMESTRE" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:Trimestre/@V" datatype="integer"/>
                <sql-index id="numMandat" table="T1" column="NUM_MANDAT" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:NumMandat/@V" datatype="string" format="uppercase"/>
                <sql-index id="numOpeInvest" table="T1" column="OPE_INVEST" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:NumOpeInvest/@V" datatype="string" format="uppercase"/>
                <sql-index id="mtPj" table="T1" column="MT_PJ" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:MtPJ/@V" datatype="decimal"/>
                <sql-index id="dateCrea" table="T1" column="DATE_CREA" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:DateCreation/@V" datatype="date" format="yyyy-MM-dd"/>
                <sql-index id="typeEvt" table="T1" column="TYPE_EVT" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:TypeEvt/@V" datatype="string"/>
                <sql-index id="numLiasseLocale" table="T1" column="NUM_LIASSE_LOC" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:NumLiasse/@V" datatype="string" format="uppercase"/>
                <sql-index id="numLiasseLocaleDeb" table="T1" column="NUM_LIASSE_DEB" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:NumLiasseDeb/@V" datatype="string" format="uppercase"/>
                <sql-index id="numLiasseLocaleFin" table="T1" column="NUM_LIASSE_FIN" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:NumLiasseFin/@V" datatype="string" format="uppercase"/>
                <sql-index id="programme" table="T1" column="CHAP_BUDG" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:ChapBudg/@V" datatype="string" format="uppercase"/>
                <sql-index id="action" table="T1" column="ART_BUDG" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:ArtBudgExec/@V" datatype="string" format="uppercase"/>
                <sql-index id="cpce" table="T1" column="PARAG_BUDG" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:ParagBudgExec/@V" datatype="string" format="uppercase"/>
                <sql-index id="artPrev" table="T1" column="ART_BUDG_PREV" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:ArtBudgPrev/@V" datatype="string" format="uppercase"/>
                <sql-index id="numLiasseCentrale" table="T2" column="NUM_LIASSE" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:NumLiasseNationale/n:Liasse/@national" datatype="string" format="uppercase"/>
                <sql-index id="liasseAnneeGestion" table="T2" column="ANNEE_GESTION" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:AnneeBudget/@V" datatype="integer" use-in-criteria="false"/>
                <sql-index id="libProgramme" table="T1" column="LIB_PROGRAMME" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:LibelleProgramme/@V" datatype="string" format="uppercase"/>
                <sql-index id="libAction" table="T1" column="LIB_ACTION" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:LibelleAction/@V" datatype="string" format="uppercase"/>
                <sql-index id="codOperExc" table="T1" column="CODE_OPER_EXC" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:CodeOperExc/@V" datatype="string" format="uppercase"/>
                <sql-index id="numPieceCompta" table="T1" column="NUM_PIECE_COMPTA" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:NumPieceCompta/@V" datatype="string" format="uppercase"/>
                <sql-index id="typePaiement" table="T1" column="TYPE_PAIEMENT" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:TypePaiement/@V" datatype="string"/>
                <sql-index id="chapClassPJ" table="T1" column="CHAP_CLASS" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:ChapClassPJ/@V" datatype="string"/>
                <sql-index id="imputation" table="T1" column="IMPUTATION" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:Imputation/@V" datatype="string"/>
                <sql-index id="datePaiement" table="T1" column="DATE_PAIEMENT" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:DatePaiement/@V" datatype="date" format="yyyy-MM-dd"/>
                
                <!--sql-index id="mt-pce" table="T1" column="MT_PCE" path="/n:Edmn/n:EtatEdmn/n:LigneEdmn/n:Depense/@MtPCE" datatype="decimal"/-->
                <!-- chap class -->
            </etat>
            <etat id="budgets" import-xslt-file="edmn/edmn-import-mysql.xsl">
                <table base-name="EDMN_BUDG_DOCUMENTS" type="document" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL, 
                    BUDGET VARCHAR(24) NOT NULL, 
                    INITIAL_DOC_NAME VARCHAR(100) NOT NULL, 
                    DOC_ID VARCHAR(100) NOT NULL, 
                    DOC LONGBLOB, 
                    ENCODING VARCHAR(20), 
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID) 
                    ) TYPE MYISAM
                </table>
                <table id="B1" base-name="EDMN_BUDG_INDEX" type="index" version="3" main="true" ignoreConstraintError="true">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL, 
                    BUDGET VARCHAR(24) NOT NULL, 
                    DOC_ID VARCHAR(100) NOT NULL,
                    ANNEE INTEGER NOT NULL,
                    DATA VARCHAR(9) NOT NULL,
                    MINISTERE VARCHAR(6) NOT NULL,
                    PROGRAMME VARCHAR(6),
                    ACTION VARCHAR(6),
                    ART_REGROUP VARCHAR(6),
                    CPCE VARCHAR(6),
                    LIBELLE VARCHAR(150),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    UNIQUE INDEX IX_${base-name}_PK (COLLECTIVITE,BUDGET,ANNEE,DATA,MINISTERE,PROGRAMME,ACTION,ART_REGROUP)
                    ) TYPE MYISAM
                    <patch from-version="1">
                        <sql failonerror="false">drop table EDMN_BUDG_INDEX</sql>
                        <sql>CREATE TABLE IF NOT EXISTS ${base-name} (
                            COLLECTIVITE VARCHAR(15) NOT NULL, 
                            BUDGET VARCHAR(24) NOT NULL, 
                            DOC_ID VARCHAR(100) NOT NULL,
                            ANNEE INTEGER NOT NULL,
                            DATA VARCHAR(9) NOT NULL,
                            MINISTERE VARCHAR(6) NOT NULL,
                            PROGRAMME VARCHAR(6),
                            ACTION VARCHAR(6),
                            CPCE VARCHAR(6),
                            ART_REGROUP VARCHAR(6),
                            LIBELLE VARCHAR(150),
                            INDEX IX_EDMN_BUDG_INDEX_BC (COLLECTIVITE,BUDGET,DOC_ID),
                            UNIQUE INDEX IX_EDMN_BUDG_INDEX_PK (COLLECTIVITE,BUDGET,ANNEE,DATA,MINISTERE,PROGRAMME,ACTION,ART_REGROUP)
                            ) TYPE MYISAM
                        </sql>
                    </patch>
                    <patch from-version="2">
                        <sql failonerror="false">drop table EDMN_BUDG_INDEX</sql>
                        <sql>CREATE TABLE IF NOT EXISTS ${base-name} (
                            COLLECTIVITE VARCHAR(15) NOT NULL, 
                            BUDGET VARCHAR(24) NOT NULL, 
                            DOC_ID VARCHAR(100) NOT NULL,
                            ANNEE INTEGER NOT NULL,
                            DATA VARCHAR(9) NOT NULL,
                            MINISTERE VARCHAR(6) NOT NULL,
                            PROGRAMME VARCHAR(6),
                            ACTION VARCHAR(6),
                            CPCE VARCHAR(6),
                            ART_REGROUP VARCHAR(6),
                            LIBELLE VARCHAR(150),
                            INDEX IX_EDMN_BUDG_INDEX_BC (COLLECTIVITE,BUDGET,DOC_ID),
                            UNIQUE INDEX IX_EDMN_BUDG_INDEX_PK (COLLECTIVITE,BUDGET,ANNEE,DATA,MINISTERE,PROGRAMME,ACTION,ART_REGROUP)
                            ) TYPE MYISAM
                        </sql>
                    </patch>
                </table>
                <criteria id="typeData" sql-index-id="typeData">
                    <where-clause>${table}.${column}='##VALEUR:data##'</where-clause>
                </criteria>
                <criteria id="annee" sql-index-id="annee">
                    <where-clause>${table}.${column}##OPERATEUR:annee####VALEUR:annee##</where-clause>
                </criteria>
                <criteria id="ministere" sql-index-id="min">
                    <where-clause>fn:string-compare(${table}.${column},ministere)</where-clause>
                </criteria>
                <criteria id="programme" sql-index-id="prog">
                    <where-clause>fn:string-compare(${table}.${column},programme)</where-clause>
                </criteria>
                <criteria id="action" sql-index-id="act">
                    <where-clause>fn:string-compare(${table}.${column},action)</where-clause>
                </criteria>
                <criteria id="artRegroupt" sql-index-id="artRegroupt">
                    <where-clause>fn:string-compare(${table}.${column},artRegroupt)</where-clause>
                </criteria>
                <criteria id="cpce" sql-index-id="cpce2">
                    <where-clause>fn:string-compare(${table}.${column},cpce)</where-clause>
                </criteria>
                <criteria id="libBudget" sql-index-id="budg.lib">
                    <where-clause>fn:string-compare(${table}.${column},libBudg)</where-clause>
                </criteria>
                
                
                
                <sql-index id="typeData" table="B1" column="DATA" path="/n:Edmn/n:NomenclatureBudgets/n:Budget/n:Data/@V" datatype="string"/>
                <sql-index id="annee" table="B1" column="ANNEE" path="/n:Edmn/n:NomenclatureBudgets/n:Budget/n:Annee/@V" datatype="integer"/>
                <sql-index id="min" table="B1" column="MINISTERE" path="/n:Edmn/n:NomenclatureBudgets/n:Budget/n:Ministere/@V" datatype="string"/>
                <sql-index id="prog" table="B1" column="PROGRAMME" path="/n:Edmn/n:NomenclatureBudgets/n:Budget/n:Programme/@V" datatype="string"/>
                <sql-index id="act" table="B1" column="ACTION" path="/n:Edmn/n:NomenclatureBudgets/n:Budget/n:Action/@V" datatype="string"/>
                <sql-index id="artRegroupt" table="B1" column="ART_REGROUP" path="/n:Edmn/n:NomenclatureBudgets/n:Budget/n:ArticleRegroupt/@V" datatype="string" format="uppercase"/>
                <sql-index id="cpce2" table="B1" column="CPCE" path="/n:Edmn/n:NomenclatureBudgets/n:Budget/n:Cpce/@V" datatype="string" format="uppercase"/>
                <sql-index id="budg.lib" table="B1" column="LIBELLE" path="/n:Edmn/n:NomenclatureBudgets/n:Budget/n:Libelle/@V" datatype="string"/>
            </etat>
            <etat id="ordos" import-xslt-file="edmn/edmn-import-mysql.xsl">
                <table base-name="EDMN_ORDOS_DOCUMENTS" type="document" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL, 
                    BUDGET VARCHAR(24) NOT NULL, 
                    INITIAL_DOC_NAME VARCHAR(100) NOT NULL, 
                    DOC_ID VARCHAR(100) NOT NULL, 
                    DOC LONGBLOB, 
                    ENCODING VARCHAR(20), 
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID) 
                    ) TYPE MYISAM
                </table>
                <table id="O1" base-name="EDMN_ORDOS_INDEX" type="index" version="2" main="true" ignoreConstraintError="true">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL, 
                    BUDGET VARCHAR(24) NOT NULL, 
                    DOC_ID VARCHAR(100) NOT NULL,
                    ANNEE INTEGER NOT NULL,
                    TRIMESTRE INTEGER NOT NULL,
                    MINISTERE VARCHAR(6) NOT NULL,
                    CPTE_SPE_TRES VARCHAR(6),
                    CODE VARCHAR(6) NOT NULL,
                    LIBELLE VARCHAR(150),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID),
                    UNIQUE INDEX IX_${base-name}_PK (COLLECTIVITE,BUDGET,ANNEE,TRIMESTRE,MINISTERE,CPTE_SPE_TRES,CODE)
                    ) TYPE MYISAM
                    <patch from-version="1">
                        <sql failonerror="false">drop table EDMN_ORDOS_INDEX</sql>
                        <sql>CREATE TABLE IF NOT EXISTS EDMN_ORDOS_INDEX (
                            COLLECTIVITE VARCHAR(15) NOT NULL, 
                            BUDGET VARCHAR(24) NOT NULL, 
                            DOC_ID VARCHAR(100) NOT NULL,
                            ANNEE INTEGER NOT NULL,
                            TRIMESTRE INTEGER NOT NULL,
                            MINISTERE VARCHAR(6) NOT NULL,
                            CPTE_SPE_TRES VARCHAR(6),
                            CODE VARCHAR(6) NOT NULL,
                            LIBELLE VARCHAR(150),
                            INDEX IX_EDMN_ORDOS_INDEX_BC (COLLECTIVITE,BUDGET,DOC_ID),
                            UNIQUE INDEX IX_EDMN_ORDOS_INDEX_PK (COLLECTIVITE,BUDGET,ANNEE,TRIMESTRE,MINISTERE,CPTE_SPE_TRES,CODE)
                            ) TYPE MYISAM</sql>
                    </patch>
                    
                </table>
                <criteria id="ordo.annee" sql-index-id="ordo.annee">
                    <where-clause>${table}.${column}##OPERATEUR:annee####VALEUR:annee##</where-clause>
                </criteria>
                <criteria id="ordo.ministere" sql-index-id="ordo.min">
                    <where-clause>fn:string-compare(${table}.${column},ministere)</where-clause>
                </criteria>
                <criteria id="programme" sql-index-id="prog">
                    <where-clause>fn:string-compare(${table}.${column},programme)</where-clause>
                </criteria>
                <criteria id="action" sql-index-id="act">
                    <where-clause>fn:string-compare(${table},${column},action)</where-clause>
                </criteria>
                <criteria id="artRegroupt" sql-index-id="artRegroupt">
                    <where-clause>fn:string-compare(${table}.${column},artRegroupt)</where-clause>
                </criteria>
                <criteria id="ordo.cpte.spe.tres" sql-index-id="ordo.compte">
                    <where-clause>fn:string-compare(${table}.${column},compte)</where-clause>
                </criteria>
                <criteria id="ordo.libelle" sql-index-id="ordo.lib">
                    <where-clause>fn:string-compare(${table}.${column},lib)</where-clause>
                </criteria>
                <criteria id="ordo.code" sql-index-id="ordo.code">
                    <where-clause>fn:string-compare(${table}.${column},code)</where-clause>
                </criteria>
                
                
                
                <sql-index id="ordo.annee" table="O1" column="ANNEE" path="/n:Edmn/n:NomenclatureOrdonnateurs/n:Ordonnateur/n:Annee/@V" datatype="integer"/>
                <sql-index id="ordo.min" table="O1" column="MINISTERE" path="/n:Edmn/n:NomenclatureOrdonnateurs/n:Ordonnateur/n:CodeMinistere/@V" datatype="string"/>
                <sql-index id="ordo.code" table="O1" column="CODE" path="/n:Edmn/n:NomenclatureOrdonnateurs/n:Ordonnateur/n:CodeOrdo/@V" datatype="string"/>
                <sql-index id="ordo.compte" table="O1" column="CPTE_SPE_TRES" path="/n:Edmn/n:NomenclatureOrdonnateurs/n:Ordonnateur/n:CompteSpeTresor/@V" datatype="string"/>
                <sql-index id="ordo.lib" table="O1" column="LIBELLE" path="/n:Edmn/n:NomenclatureOrdonnateurs/n:Ordonnateur/n:Libelle/@V" datatype="string" format="uppercase"/>
            </etat>
            <etat id="comptables" import-xslt-file="edmn/edmn-import-mysql.xsl">
                <table base-name="EDMN_COMPTA_DOCUMENTS" type="document" version="1">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL, 
                    BUDGET VARCHAR(24) NOT NULL, 
                    INITIAL_DOC_NAME VARCHAR(100) NOT NULL, 
                    DOC_ID VARCHAR(100) NOT NULL, 
                    DOC LONGBLOB, 
                    ENCODING VARCHAR(20), 
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID) 
                    ) TYPE MYISAM
                </table>
                <table id="C1" base-name="EDMN_COMPTA_INDEX" type="index" version="3" main="true" ignoreConstraintError="true">
                    CREATE TABLE IF NOT EXISTS ${base-name} (
                    COLLECTIVITE VARCHAR(15) NOT NULL, 
                    BUDGET VARCHAR(24) NOT NULL, 
                    DOC_ID VARCHAR(100) NOT NULL,
                    ANNEE INTEGER NOT NULL,
                    CODE VARCHAR(6) NOT NULL,
                    LIBELLE VARCHAR(150),
                    UNIQUE INDEX IX_${base-name}_PK (COLLECTIVITE,BUDGET,CODE,ANNEE),
                    INDEX IX_${base-name}_BC (COLLECTIVITE,BUDGET,DOC_ID)
                    ) TYPE MYISAM
                    <patch from-version="1">
                        <sql failonerror="false">drop table EDMN_COMPTA_INDEX</sql>
                        <sql>CREATE TABLE IF NOT EXISTS EDMN_COMPTA_INDEX (
                            COLLECTIVITE VARCHAR(15) NOT NULL, 
                            BUDGET VARCHAR(24) NOT NULL, 
                            DOC_ID VARCHAR(100) NOT NULL,
                            ANNEE INTEGER NOT NULL,
                            CODE VARCHAR(6) NOT NULL,
                            LIBELLE VARCHAR(150),
                            UNIQUE INDEX IX_EDMN_COMPTA_INDEX_PK (COLLECTIVITE,BUDGET,CODE,ANNEE),
                            INDEX IX_EDMN_COMPTA_INDEX_BC (COLLECTIVITE,BUDGET,DOC_ID)
                            ) TYPE MYISAM</sql>
                    </patch>
                    <patch from-version="2">
                        <sql failonerror="false">drop table EDMN_COMPTA_INDEX</sql>
                        <sql>CREATE TABLE IF NOT EXISTS EDMN_COMPTA_INDEX (
                            COLLECTIVITE VARCHAR(15) NOT NULL, 
                            BUDGET VARCHAR(24) NOT NULL, 
                            DOC_ID VARCHAR(100) NOT NULL,
                            ANNEE INTEGER NOT NULL,
                            CODE VARCHAR(6) NOT NULL,
                            LIBELLE VARCHAR(150),
                            UNIQUE INDEX IX_EDMN_COMPTA_INDEX_PK (COLLECTIVITE,BUDGET,CODE,ANNEE),
                            INDEX IX_EDMN_COMPTA_INDEX_BC (COLLECTIVITE,BUDGET,DOC_ID)
                            ) TYPE MYISAM</sql>
                    </patch>
                    
                </table>
                <criteria id="compta.annee" sql-index-id="compta.annee">
                    <where-clause>${table}.${column}##OPERATEUR:compta.annee####VALEUR:compta.annee##</where-clause>
                </criteria>
                <criteria id="compta.code" sql-index-id="compta.code">
                    <where-clause>fn:string-compare(${table}.${column},code)</where-clause>
                </criteria>
                <criteria id="compta.libelle" sql-index-id="compta.lib">
                    <where-clause>fn:string-compare(${table}.${column},libelle)</where-clause>
                </criteria>
                
                <sql-index id="compta.annee" table="C1" column="ANNEE" path="/n:Edmn/n:NomenclatureComptables/n:Comptable/n:Annee/@V" datatype="integer"/>
                <sql-index id="compta.code" table="C1" column="CODE" path="/n:Edmn/n:NomenclatureComptables/n:Comptable/n:Code/@V" datatype="string" format="uppercase"/>
                <sql-index id="compta.lib" table="C1" column="LIBELLE" path="/n:Edmn/n:NomenclatureComptables/n:Comptable/n:Libelle/@V" datatype="string" format="uppercase"/>
            </etat>
            
        </document>
    </layer>
</persistence-config>
