public class Persistence
extends java.lang.Object
Java class for anonymous complex type.
The following schema fragment specifies the expected content contained within this class.
<complexType> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <element name="persistence-unit" maxOccurs="unbounded" minOccurs="0"> <complexType> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="provider" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="jta-data-source" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="non-jta-data-source" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> <element name="mapping-file" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> <element name="jar-file" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> <element name="class" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/> <element name="exclude-unlisted-classes" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/> <element name="properties" minOccurs="0"> <complexType> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <sequence> <element name="property" maxOccurs="unbounded" minOccurs="0"> <complexType> <complexContent> <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> </restriction> </complexContent> </complexType> </element> </sequence> </restriction> </complexContent> </complexType> </element> </sequence> <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" /> <attribute name="transaction-type" type="{http://java.sun.com/xml/ns/persistence}persistence-unit-transaction-type" /> </restriction> </complexContent> </complexType> </element> </sequence> <attribute name="version" use="required" type="{http://java.sun.com/xml/ns/persistence}versionType" fixed="1.0" /> </restriction> </complexContent> </complexType>
Modifier and Type | Field and Description |
---|---|
protected java.util.List<PersistenceUnit> |
persistenceUnit |
protected java.lang.String |
version |
Constructor and Description |
---|
Persistence() |
Persistence(PersistenceUnit... persistenceUnit) |
Modifier and Type | Method and Description |
---|---|
PersistenceUnit |
addPersistenceUnit(PersistenceUnit unit) |
PersistenceUnit |
addPersistenceUnit(java.lang.String unitName) |
java.util.List<PersistenceUnit> |
getPersistenceUnit()
Gets the value of the persistenceUnit property.
|
java.lang.String |
getVersion()
Gets the value of the version property.
|
void |
setVersion(java.lang.String value)
Sets the value of the version property.
|
protected java.util.List<PersistenceUnit> persistenceUnit
protected java.lang.String version
public Persistence()
public Persistence(PersistenceUnit... persistenceUnit)
public java.util.List<PersistenceUnit> getPersistenceUnit()
set
method for the persistenceUnit property.
For example, to add a new item, do as follows:
getPersistenceUnit().add(newItem);Objects of the following type(s) are allowed in the list
PersistenceUnit
public PersistenceUnit addPersistenceUnit(PersistenceUnit unit)
public PersistenceUnit addPersistenceUnit(java.lang.String unitName)
public java.lang.String getVersion()
String
public void setVersion(java.lang.String value)
value
- allowed object is
String