OPENJPA-1005 - Set persistence.xml schema version for PersistenceUnitInfo interface.

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@760047 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Albert Lee 2009-03-30 17:06:32 +00:00
parent 7f5471bae7
commit d3b1a2e368
2 changed files with 8 additions and 3 deletions

View File

@ -675,6 +675,7 @@ public class PersistenceProductDerivation
throws SAXException { throws SAXException {
_info = new PersistenceUnitInfoImpl(); _info = new PersistenceUnitInfoImpl();
_info.setPersistenceUnitName(attrs.getValue("name")); _info.setPersistenceUnitName(attrs.getValue("name"));
_info.setPersistenceXMLSchemaVersion(_persistenceVersion);
// we only parse this ourselves outside a container, so default // we only parse this ourselves outside a container, so default
// transaction type to local // transaction type to local

View File

@ -79,6 +79,7 @@ public class PersistenceUnitInfoImpl
private DataSource _nonJtaDataSource; private DataSource _nonJtaDataSource;
private boolean _excludeUnlisted; private boolean _excludeUnlisted;
private URL _persistenceXmlFile; private URL _persistenceXmlFile;
private String _schemaVersion = "1.0";
// A persistence unit is defined by a persistence.xml file. The jar // A persistence unit is defined by a persistence.xml file. The jar
// file or directory whose META-INF directory contains the // file or directory whose META-INF directory contains the
@ -505,8 +506,11 @@ public class PersistenceUnitInfoImpl
} }
public String PersistenceXMLSchemaVersion() { public String PersistenceXMLSchemaVersion() {
throw new UnsupportedOperationException( return _schemaVersion;
"JPA 2.0 - Method not yet implemented"); }
public void setPersistenceXMLSchemaVersion(String version) {
_schemaVersion = version;
} }
public Caching getCaching() { public Caching getCaching() {