[ http://jira.codehaus.org/browse/XDP-209?page=all ]

Alan She updated XDP-209:
-------------------------

    Attachment: XDP-209_patch.txt

Finally, I have a patch for this improvement.
Just get all the filter related getTagsByName find the super class.

For example:

org/xdoclet/plugins/hibernate/Filter.jelly

so:
 ${filterEntity.getTagsByName('hibernate.filter')}
becomes:
${filterEntity.getTagsByName('hibernate.filter',true)}

Thanks for Konstantin's help.

> Class level filter generation should also scan the parent class tag
> -------------------------------------------------------------------
>
>                 Key: XDP-209
>                 URL: http://jira.codehaus.org/browse/XDP-209
>             Project: XDoclet 2 Plugins
>          Issue Type: Improvement
>          Components: hibernate
>         Environment: XDoclet2 , xdoclet-plugins
>            Reporter: Alan She
>            Priority: Minor
>         Attachments: XDP-209_patch.txt
>
>
> Class level filter tag generation should scan the parent class 
> @hibernate.filter and apply the filter.
> No matter the parent class is declared as a hibernate persistence object or 
> not.
> Besides filter tag, filter-def and filter-param tag should also apply this 
> rule.
> This is provide the ability to declare the filters in a base class and all 
> the classes applies it.
> That is,  two classes like this,
> /**
> * @hibernate.filter-def name="effectiveDate"
> * @hibernate.filter-param name="asOfDate" type="date" 
> filterdef-name="effectiveDate"
> * @hibernate.filter name="effectiveDate" condition=":asOfDate BETWEEN 
> eff_start_dt and eff_end_dt"
>  */
>  public class BaseObject {
>  ...
>  }
>  /**
>   * @hibernate.class table="user"
>   */
>  public class User extends BaseObject {
>  ...
> }
> Should have a result like this in User.hbm.xml,
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 
> 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>
> <hibernate-mapping>
>     <class name="User">
>         ....
>         <filter name="effectiveDate" condition=":asOfDate BETWEEN 
> eff_start_dt and eff_end_dt" />
>     </class>
>     <filter-def name="effectiveDate" >
>         <filter-param name="asOfDate"  type="date" />
>     </filter-def>
> </hibernate-mapping>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
xdoclet-plugins-interest mailing list
xdoclet-plugins-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest

Reply via email to