Andy Marks
2002-10-01 04:30:01 UTC
Hi All,
I'm using middlegen 1.0 to generate bean implementation files for all tables
in a database. I have _some_ custom
finder methods that I want to include in _some_ of the generated
<tableName>Bean.java files.
After looking at: http://boss.bekk.no/boss/middlegen/plugins/simple.html
I added the following line to my entity-cmp-20.vm:
#parse( "finders-${table.beanName}.vm" )
which, if I understand it, will include the contents of the file called
finders-<tableName>.vm into this position in the entity-cmp-20.vm template.
This seems to be attempting to do what I want because when I run middlegen,
I get the following error:
file:C:/andy/rev/dev/etc/build.xml:139: middlegen.MiddlegenException: Unable
to find resource 'finders-RevRmsConsign.vm'
which is 100% correct because there is no file called
finders-RevRmsConsign.vm.
HOWEVER, I only want to define these custom finder methods for a small
number of the tables in my database, so I've intentionally not created a
finders-RevRmsConsign.vm file because it's default finders are all I need.
So my question is: how do I enable the #parse functionality for a small
subset (i.e, 9 out of 32 tables) of my generated bean files.
I guess another way of asking the question is: is there anyway to ignore the
above errors when they are generated against files for which I have no need
for extra finders?
Thanks in advance
Regards,
Andy Marks
========================================================
Toll Transitions
Phone: (03) 8696 6076
Fax: (03) 8696 6001
Email: ***@toll.com.au
========================================================
www.tolltransitions.com.au <http://www.tolltransitions.com.au/> - Relocation
Redefined
I'm using middlegen 1.0 to generate bean implementation files for all tables
in a database. I have _some_ custom
finder methods that I want to include in _some_ of the generated
<tableName>Bean.java files.
After looking at: http://boss.bekk.no/boss/middlegen/plugins/simple.html
I added the following line to my entity-cmp-20.vm:
#parse( "finders-${table.beanName}.vm" )
which, if I understand it, will include the contents of the file called
finders-<tableName>.vm into this position in the entity-cmp-20.vm template.
This seems to be attempting to do what I want because when I run middlegen,
I get the following error:
file:C:/andy/rev/dev/etc/build.xml:139: middlegen.MiddlegenException: Unable
to find resource 'finders-RevRmsConsign.vm'
which is 100% correct because there is no file called
finders-RevRmsConsign.vm.
HOWEVER, I only want to define these custom finder methods for a small
number of the tables in my database, so I've intentionally not created a
finders-RevRmsConsign.vm file because it's default finders are all I need.
So my question is: how do I enable the #parse functionality for a small
subset (i.e, 9 out of 32 tables) of my generated bean files.
I guess another way of asking the question is: is there anyway to ignore the
above errors when they are generated against files for which I have no need
for extra finders?
Thanks in advance
Regards,
Andy Marks
========================================================
Toll Transitions
Phone: (03) 8696 6076
Fax: (03) 8696 6001
Email: ***@toll.com.au
========================================================
www.tolltransitions.com.au <http://www.tolltransitions.com.au/> - Relocation
Redefined