All Downloads are FREE. Search and download functionalities are using the official Maven repository.

sqlconf.books.celerio-maven-plugin.xml Maven / Gradle / Ivy

Go to download

The Bootstrap Maven plugin is responsible for bootstrapping a project out of template packs

There is a newer version: 4.0.23
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<celerio xmlns="http://www.jaxio.com/schema/celerio" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.jaxio.com/schema/celerio ./celerio.xsd">
    <configuration rootPackage="${groupId}" applicationName="${artifactId}">
        <!-- Which tables are used for generation -->
        <tables>
            <!-- <table include="false" pattern="*_AUDIT"/> -->
            <table include="true" pattern="*"/>
        </tables>

        <!-- global number mapping (optional) -->
        <numberMappings>
            <numberMapping mappedType="M_BOOLEAN" columnSizeMin="1" columnSizeMax="2" columnDecimalDigitsMin="0"
                           columnDecimalDigitsMax="0"/>
            <!-- <numberMapping mappedType="M_BIGDECIMAL" columnSizeMin="10" columnDecimalDigitsMin="4"/> -->
        </numberMappings>

        <!-- global date mapping (optional) -->
        <dateMappings>
            <!-- <dateMapping columnNameRegExp="VERSION" mappedType="M_UTILDATE"/> -->
            <!-- <dateMapping columnJdbcType="TIMESTAMP" mappedType="M_LOCALDATETIME"/> -->
            <!-- <dateMapping columnJdbcType="DATE" mappedType="M_LOCALDATE"/> -->
        </dateMappings>

        <!-- default configuration for fetch type / cascades / 2d level cache -->
        <defaultEntityCacheConfig usage="NONE"/>

        <defaultManyToOneConfig fetch="LAZY">
            <cascades>
                <cascade type="PERSIST"/>
                <cascade type="MERGE"/>
            </cascades>
            <cacheConfig usage="NONE"/>
            <associationAction create="true" edit="true" view="true" select="true" autoComplete="true" remove="false"/>
        </defaultManyToOneConfig>

        <defaultOneToManyConfig orphanRemoval="true">
            <cascades>
                <cascade type="ALL"/>
            </cascades>
            <cacheConfig usage="NONE"/>
            <associationAction create="true" edit="true" view="true" select="true" autoComplete="true" remove="true"/>
        </defaultOneToManyConfig>

        <defaultOneToOneConfig fetch="LAZY">
            <cascades>
                <cascade type="NONE"/>
            </cascades>
            <cacheConfig usage="NONE"/>
            <associationAction create="true" edit="true" view="true" select="false" autoComplete="true" remove="false"/>
        </defaultOneToOneConfig>

        <defaultInverseOneToOneConfig fetch="LAZY">
            <cascades>
                <cascade type="ALL"/>
            </cascades>
            <cacheConfig usage="NONE"/>
            <associationAction create="false" edit="false" view="true" select="false" autoComplete="false"
                               remove="false"/>
        </defaultInverseOneToOneConfig>

        <defaultManyToManyConfig>
            <cascades>
                <cascade type="PERSIST"/>
                <cascade type="MERGE"/>
            </cascades>
            <cacheConfig usage="NONE"/>
            <associationAction create="true" edit="true" view="true" select="true" autoComplete="false" remove="true"/>
        </defaultManyToManyConfig>

        <defaultInverseManyToManyConfig>
            <cascades>
                <cascade type="ALL"/>
            </cascades>
            <cacheConfig usage="NONE"/>
            <associationAction create="false" edit="true" view="true" select="false" autoComplete="false"
                               remove="false"/>
        </defaultInverseManyToManyConfig>

        <conventions identifiableProperty="id">
            <!-- <columnRenamers>
                <columnRenamer regexp="^.{3}_" replace="" />
            </columnRenamers> -->
        </conventions>
    </configuration>

    <entityConfigs>
        <!-- Account demonstrates misc column configurations -->
        <entityConfig tableName="ACCOUNT">
            <labels>
                <label value="User Account"/>
                <label value="Compte Utilisateur" lang="fr"/>
            </labels>
            <columnConfigs>
                <columnConfig columnName="login" min="4" fieldName="username" searchResult="true">
                    <labels>
                        <label value="Identifiant" lang="fr"/>
                    </labels>
                    <indexedField/>
                </columnConfig>
                <columnConfig columnName="password">
                    <labels>
                        <label value="Mot de passe" lang="fr"/>
                    </labels>
                </columnConfig>
                <columnConfig columnName="email" searchResult="true">
                    <indexedField/>
                </columnConfig>
                <columnConfig columnName="first_name">
                    <labels>
                        <label value="Prénom" lang="fr"/>
                    </labels>
                    <indexedField/>
                </columnConfig>
                <columnConfig columnName="last_name">
                    <labels>
                        <label value="Nom" lang="fr"/>
                    </labels>
                    <indexedField/>
                </columnConfig>
                <columnConfig columnName="birth_date">
                    <labels>
                        <label value="Date de naissance" lang="fr"/>
                    </labels>
                </columnConfig>
                <columnConfig columnName="is_enabled" searchResult="true">
                    <labels>
                        <label value="Compte activé" lang="fr"/>
                    </labels>
                </columnConfig>
                <columnConfig columnName="civility" sharedEnumName="Civility">
                    <labels>
                        <label value="Civilité" lang="fr"/>
                    </labels>
                </columnConfig>
                <columnConfig columnName="address_id" searchResult="true">
                    <manyToOneConfig var="homeAddress">
                        <labels>
                            <label value="Adresse domicile" lang="fr"/>
                        </labels>
                    </manyToOneConfig>
                </columnConfig>
            </columnConfigs>
        </entityConfig>

        <!-- Book demonstrates one-to-many relation -->
        <entityConfig tableName="BOOK">
            <labels>
                <label value="Livre" lang="fr"/>
            </labels>
            <columnConfigs>
                <columnConfig columnName="title" fieldName="bookTitle">
                    <labels>
                        <label value="Titre" lang="fr"/>
                    </labels>
                    <indexedField/>
                </columnConfig>
                <columnConfig columnName="number_of_pages">
                    <labels>
                        <label value="Nombre de pages" lang="fr"/>
                    </labels>
                    <indexedField/>
                </columnConfig>
                <columnConfig columnName="account_id">
                    <manyToOneConfig var="owner">
                        <labels>
                            <label value="Propriétaire" lang="fr"/>
                        </labels>
                    </manyToOneConfig>
                    <oneToManyConfig var="coolBooks"
                                     elementVar="book"><!-- orderBy="bookTitle" does not work on jboss EAS 7.1 -->
                        <labels>
                            <label value="Livres intéressants" lang="fr"/>
                        </labels>
                    </oneToManyConfig>
                </columnConfig>
            </columnConfigs>
        </entityConfig>

        <!-- Document demonstrates one-to-many relation and upload/download -->
        <entityConfig tableName="DOCUMENT">
            <columnConfigs>
                <columnConfig columnName="account_id">
                    <manyToOneConfig var="owner">
                        <labels>
                            <label value="Propriétaire" lang="fr"/>
                        </labels>
                    </manyToOneConfig>
                    <oneToManyConfig var="edocs" elementVar="edoc">
                        <labels>
                            <label value="Attached docs"/>
                            <label value="Documents attachés" lang="fr"/>
                        </labels>
                    </oneToManyConfig>
                </columnConfig>
                <columnConfig columnName="document_binary">
                    <labels>
                        <label value="File"/>
                        <label value="Fichier" lang="fr"/>
                    </labels>
                    <!--<indexedField /> NOT SUPPORTED FOR THE MOMENT -->
                </columnConfig>
                <columnConfig columnName="document_file_name">
                    <labels>
                        <label value="Nom du fichier" lang="fr"/>
                    </labels>
                    <indexedField/>
                </columnConfig>
            </columnConfigs>
        </entityConfig>

        <!-- Role demonstrates many-to-many relation and spring-security integration -->
        <entityConfig tableName="ROLE">
            <labels>
                <label value="Droit" lang="fr"/>
            </labels>
            <columnConfigs>
                <columnConfig columnName="role_name" messageKey="true">
                    <labels>
                        <label value="Role"/>
                        <label value="Droit" lang="fr"/>
                    </labels>
                    <indexedField/>
                </columnConfig>
            </columnConfigs>
        </entityConfig>

        <entityConfig tableName="ADDRESS">
            <labels>
                <label value="Adresse" lang="fr"/>
            </labels>
            <columnConfigs>
                <columnConfig columnName="street_name">
                    <labels>
                        <label value="Nom de la rue" lang="fr"/>
                    </labels>
                </columnConfig>
                <columnConfig columnName="city">
                    <labels>
                        <label value="Ville" lang="fr"/>
                    </labels>
                    <indexedField/>
                </columnConfig>
            </columnConfigs>
        </entityConfig>

        <entityConfig tableName="ACCOUNT_ROLE" associationDirection="UNIDIRECTIONAL">
            <columnConfigs>
                <columnConfig columnName="account_id">
                    <!-- <manyToManyConfig var="accounts" elementVar="account" /> -->
                </columnConfig>
                <columnConfig columnName="role_id" inverse="true">
                    <manyToManyConfig var="securityRoles" elementVar="securityRole">
                        <labels>
                            <label value="Droits attribués" lang="fr"/>
                        </labels>
                    </manyToManyConfig>
                </columnConfig>
            </columnConfigs>
        </entityConfig>

        <!-- MoreTypesDemo demonstrates sub-packages and various types support such as joda time, BigDecimal etc. -->
        <entityConfig tableName="MORE_TYPES_DEMO" subPackage="more">
            <labels>
                <label value="Démo de Types variés" lang="fr"/>
            </labels>
            <columnConfigs>
                <columnConfig columnName="date_joda" mappedType="M_LOCALDATE"/>
                <columnConfig columnName="date_time_joda" mappedType="M_LOCALDATETIME"/>
            </columnConfigs>
        </entityConfig>
    </entityConfigs>

    <!-- Generate enums used by the entities above -->
    <sharedEnumConfigs>
        <sharedEnumConfig name="Civility" type="STRING">
            <enumValues>
                <enumValue value="MR">
                    <labels>
                        <label value="Mister"/>
                        <label value="Monsieur" lang="fr"/>
                    </labels>
                </enumValue>
                <enumValue value="MS">
                    <labels>
                        <label value="Miss"/>
                        <label value="Madame" lang="fr"/>
                    </labels>
                </enumValue>
            </enumValues>
        </sharedEnumConfig>
    </sharedEnumConfigs>
</celerio>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy