----- Original Message -----
Sent: Friday, September 18, 2009 10:48
AM
Subject: RE: [eclipselink-dev] Canonical
Model Generator Properties
Had
a brief discussion with Peter and would like to propose some
amendments:
eclipselink.persistencexml
This optional property specifies the full resource name to look
for the persistence XML files in. If not specified the default
META-INF/persistence.xml will be used.
Note: For now this
property is used for the canonical model generator but it can later be used
as a system property for customizing weaving and application bootstrap
usage.
eclipselink.persistenceunits
This optional property specifies the set of persistence unit
names that will be used when generating the canonical model. By default all
persistence units available in all persistence XML files will be used. The
value of this property is a comma separated list. When specifying multiple
persistence units it is not possible to have persistence units with a comma
in their name.
Note: In the future this property can also be used to limit
the persistence units that will be processed by the static or dynamic
weaving.
eclipselink.canonicalmodel.prefix
This optional property specifies the prefix that will
be added to the start of the class name of any canonical model class
generated. By default the prefix is not used.
eclipselink.canonicalmodel.suffix
This optional property specifies the suffix
that will be added to the end of the class name of any canonical model class
generated. By default the suffix value is "_". If this property is specified
the value must be a non-empty string that contains valid characters for use
in a Java class name.
eclipselink.canonicalmodel.subpackage
This optional property specifies a sub-package name that
can be used to have the canonical model generator generate its classes in a
sub-package of the package where the corresponding entity class is located.
By default the canonical model classes are generated into the same package
as the entity classes.
I would propose
we use:
eclipselink.jpa.modelgen.qualifier
eclipselink.jpa.persistence_xml
eclipselink.jpa.modelgen.qualifier_position
eclipselink.jpa.modelgen.package_suffix
Doug
We currently have the following properties
that can be used with the canonical model
generator:
eclipselink.canonical-model.qualifier
eclipselink.canonical-model.persistence-xml
eclipselink.canonical-model.qualifier-position
eclipselink.canonical-model.package-suffix
As these properties can be specified in the persistence.xml we
have followed our regular naming convention. Unfortunately though, these
properties names do not work when used as a javac -A
option. javac does not like the dashes.
Our current thought is to use an underscore rather than a
dash for only these properties.
Any comments or opinions would be greatly appreciated.
Cheers,
Guy