[
https://jira.jboss.org/jira/browse/JBIDE-4269?page=com.atlassian.jira.plu...
]
Max Rydahl Andersen commented on JBIDE-4269:
--------------------------------------------
I dont think we should expose the artfiactcollector completely to users yet. Lets keep it
to the more highlevel operations so implemetations details is not relevant.
For the ant tasks I suggest:
What you call merge is not related to filtering, it is related to how the exporter behave
so I would put an
attribute on the exporters and possibly also on <hibernatetool> for a default that
says
overwrite="no|yes|merge|ask" and the default will be ask.
enablement of merge is a bit tricky since it applies only to .java (for now).
Should we throw an error if merge is enabled and we dont support it for that type of file
or
should we just fallback to overwriting ?
About filtering then I guess we are filtering the actual output (i.e. the filename and not
the element being used for the generation).
Thus using a simple <patternset> would match in the Ant world, would it not ?
Provide a way to filter out elements which will be generated by
exporter.
-------------------------------------------------------------------------
Key: JBIDE-4269
URL:
https://jira.jboss.org/jira/browse/JBIDE-4269
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: Hibernate
Affects Versions: 3.1.0.M1
Reporter: Dmitry Geraskov
Assignee: Dmitry Geraskov
Fix For: 3.1.0.M1
Now exporter uses Configuration object to get for example pojo's for generation.
After this it calls generation for each of them.
We need to add some filter for this.
First place for such injection is ArtifactCollector as developer can easily specify
subclass of this class and set it to exporter.
Also TemplateProducer which used for files generating always gets ArtifactCollector
object in constructor from exporter and has access to it.
I' going to add methods filter(Map context), setFilter(Filter) to ArtifactCollector
class and call it when necessary in template producer.
Method 'filter' by default will not filter out anything. Non default realizations
should use context map to get any objects which is passed to template producer.
Second variant is to add Filter field to Generic exporter and call for filtering in
GenericExporter.exportPOJO() method(or in each realization of ModelIterator.process()).
I prefer first way.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira