Update of 
/cvsroot/xdoclet-plugins/xdoclet-plugins/plugin-hibernate/src/main/java/org/xdoclet/plugin/hibernate
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2149

Added Files:
        CompositeId.jelly Idbag.jelly 
Log Message:
Re-add files

--- NEW FILE: CompositeId.jelly ---
<j:jelly xmlns:j="jelly:core">
    <j:set var="compositeIdTag" 
value="${property.entity.getTagByName('hibernate.composite-id')}"/>
    <composite-id
        name="${property.name}"
        access="${property.access}"
        class="${property.entity.returns.value}"
        unsaved-value="${compositeIdTag.unsavedValue}"
        node="${compositeIdTag.node}">

        <j:forEach var="metaTag" 
items="${property.entity.getTagsByName('hibernate.meta')}">
            <j:import uri="org/xdoclet/plugin/hibernate/Meta.jelly" 
inherit="true"/>
        </j:forEach>

        <j:set var="props" 
value="${plugin.getClassProperties(property.type.javaClass)}"/>
        <j:forEach begin="1" end="${size(props)}" indexVar="propsI">
            <j:forEach var="keyProperty" items="${props}">
                <j:set var="keyPropertyTag" 
value="${keyProperty.entity.getTagByName('hibernate.key-property')}"/>
                <j:set var="keyManyToOne" 
value="${keyProperty.entity.getTagByName('hibernate.key-many-to-one')}"/>

                <j:if test="${size(keyPropertyTag) > 0}">
                    <j:if test="${size(keyManyToOne) > 0}">
                        <j:set var="message" value="key-property and 
key-many-to-one in class ${class.name} for property ${property.name}"/>
                ${plugin.assertTrue(message,false)}
                    </j:if>
                </j:if>

                <j:if test="${keyPropertyTag != null}">
                    <j:if test="${keyPropertyTag.position == propsI}">
                        <key-property name="${keyProperty.name}" 
access="${keyProperty.access}" type="${keyPropertyTag.type}" 
column="${keyPropertyTag.column}" length="${keyPropertyTag.length}">
                            <j:forEach var="metaTag" 
items="${keyProperty.entity.getTagsByName('hibernate.meta')}">
                                <j:import 
uri="org/xdoclet/plugin/hibernate/Meta.jelly" inherit="true"/>
                            </j:forEach>
                            <j:forEach var="columnTag" 
items="${keyProperty.entity.getTagsByName('hibernate.column')}">
                                <j:import 
uri="org/xdoclet/plugin/hibernate/Column.jelly" inherit="true"/>
                            </j:forEach>
                        </key-property>
                    </j:if>
                </j:if>

                <j:if test="${keyManyToOne != null}">
                    <j:if test="${keyManyToOne.position == propsI}">
                        <key-many-to-one name="${keyManyToOne.name}" 
access="${keyManyToOne.access}" type="${keyManyToOne.type}" 
column="${keyManyToOne.column}" length="${keyManyToOne.length}" 
class="keyManyToOne.class">
                            <j:forEach var="metaTag" 
items="${keyManyToOne.entity.getTagsByName('hibernate.meta')}">
                                <j:import 
uri="org/xdoclet/plugin/hibernate/Meta.jelly" inherit="true"/>
                            </j:forEach>
                            <j:forEach var="columnTag" 
items="${keyManyToOne.entity.getTagsByName('hibernate.column')}">
                                <j:import 
uri="org/xdoclet/plugin/hibernate/Column.jelly" inherit="true"/>
                            </j:forEach>
                        </key-many-to-one>
                    </j:if>
                </j:if>
            </j:forEach>
        </j:forEach>
    </composite-id>
</j:jelly>
--- NEW FILE: Idbag.jelly ---
<j:jelly xmlns:j="jelly:core">
    <j:set var="idBagTag" 
value="${property.entity.getTagByName('hibernate.idbag')}"/>
    <j:if test="${idBagTag != null}">
        <idbag
            name="${property.name}"
            access="${property.access}"
            table="${idBagTag.table}"
            schema="${idBagTag.schema}"
            lazy="${idBagTag.lazy}"
            catalog="${idBagTag.catalog}"
            subselect="${idBagTag.subselect}"
            cascade="${idBagTag.cascade}"
            order-by="${idBagTag.orderBy}"
            where="${idBagTag.where}"
            batch-size="${idBagTag.batchSize}"
            outer-join="${idBagTag.outerJoin}"
            fetch="${idBagTag.fetch}"
            persister="${idBagTag.persister}"
            collection-type="${idBagTag.collectionType}"
            check="${idBagTag.check}"
            optimistic-lock="${idBagTag.optimisticLock}"
            node="${idBagTag.node}"
            embed-xml="${idBagTag.embedXml}">

            <!-- process meta -->
            <j:set var="metaTag" 
value="${property.entity.getTagsByName('hibernate.meta')}"/>
            <j:forEach var="metaTag" items="${metaTag}">
                <j:import uri="org/xdoclet/plugin/hibernate/Meta.jelly" 
inherit="true"/>
            </j:forEach>

            <!-- process subselect -->
            <j:set var="subselectTag" 
value="${property.entity.getTagByName('hibernate.subselect')}"/>
            <j:if test="${subselectTag != null}">
                <j:import uri="org/xdoclet/plugin/hibernate/Subselect.jelly" 
inherit="true"/>
            </j:if>

            <!-- process cache -->
            <j:set var="cacheEntiry" value="${property.entity}"/>
            <j:import uri="org/xdoclet/plugin/hibernate/Cache.jelly" 
inherit="true"/>

            <!-- process synchronize -->
            <j:forEach var="synchronizeTag" 
items="${property.entity.getTagsByName('hibernate.synchronize')}">
                <j:import uri="org/xdoclet/plugin/hibernate/Synchronize.jelly" 
inherit="true"/>
            </j:forEach>

            <!-- process collection-id -->
            <j:import uri="org/xdoclet/plugin/hibernate/CollectionId.jelly" 
inherit="true"/>

            <!-- process key -->
            <j:set var="keyTag" 
value="${property.entity.getTagByName('hibernate.key')}"/>
            <j:import uri="org/xdoclet/plugin/hibernate/Key.jelly" 
inherit="true"/>

            <j:set var="elementTags" 
value="${plugin.getTags(property.entity,'hibernate.element|hibernate.composite-element|hibernate.many-to-many|hibernate.many-to-any')}"/>
            <!-- check that no more than one element tag is present on set -->
            <j:if test="${size(elementTags) >1}">
                <j:set var="message" value="more than one element tag deined in 
class ${class.name} for ${property.name} "/>
          ${plugin.assertTrue(message,false)}
            </j:if>
            <j:if test="${size(elementTags) == 0}">
                <j:set var="message" value="no element tag deined in class 
${class.name} for ${property.name} "/>
         ${plugin.assertTrue(message,false)}
            </j:if>
            <j:if test="${size(elementTags) ==1}">
                <j:import uri="${plugin.dispatchTag(elementTags[0].name)}" 
inherit="true"/>
            </j:if>

            <!-- process loader -->
            <j:set var="loaderTag" 
value="${property.entity.getTagByName('hibernate.loader')}"/>
            <j:if test="${loaderTag != null}">
                <j:import uri="org/xdoclet/plugin/hibernate/Loader.jelly" 
inherit="true"/>
            </j:if>

            <j:set var="sqlOperationEntity" value="${property.entity}"/>
            <j:import uri="org/xdoclet/plugin/hibernate/SqlOperations.jelly" 
inherit="true"/>

            <!-- process filter -->
            <j:import uri="org/xdoclet/plugin/hibernate/Filter.jelly" 
inherit="true"/>
        </idbag>
    </j:if>

</j:jelly>


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
xdoclet-plugins-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-commits

Reply via email to