net.sourceforge.ccxjc.it.model.pkg.indexed.valueclass.persistence.orm
Class EntityMappings

java.lang.Object
  extended by net.sourceforge.ccxjc.it.model.pkg.indexed.valueclass.persistence.orm.EntityMappings
All Implemented Interfaces:
Serializable, Cloneable

public class EntityMappings
extends Object
implements Serializable, Cloneable

The entity-mappings element is the root element of an mapping file. It contains the following four types of elements: 1. The persistence-unit-metadata element contains metadata for the entire persistence unit. It is undefined if this element occurs in multiple mapping files within the same persistence unit. 2. The package, schema, catalog and access elements apply to all of the entity, mapped-superclass and embeddable elements defined in the same file in which they occur. 3. The sequence-generator, table-generator, named-query, named-native-query and sql-result-set-mapping elements are global to the persistence unit. It is undefined to have more than one sequence-generator or table-generator of the same name in the same or different mapping files in a persistence unit. It is also undefined to have more than one named-query or named-native-query of the same name in the same or different mapping files in a persistence unit. 4. The entity, mapped-superclass and embeddable elements each define the mapping information for a managed persistent class. The mapping information contained in these elements may be complete or it may be partial.

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="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="persistence-unit-metadata" type="{http://java.sun.com/xml/ns/persistence/orm}persistence-unit-metadata" minOccurs="0"/>
         <element name="package" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="schema" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="catalog" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
         <element name="access" type="{http://java.sun.com/xml/ns/persistence/orm}access-type" minOccurs="0"/>
         <element name="sequence-generator" type="{http://java.sun.com/xml/ns/persistence/orm}sequence-generator" maxOccurs="unbounded" minOccurs="0"/>
         <element name="table-generator" type="{http://java.sun.com/xml/ns/persistence/orm}table-generator" maxOccurs="unbounded" minOccurs="0"/>
         <element name="named-query" type="{http://java.sun.com/xml/ns/persistence/orm}named-query" maxOccurs="unbounded" minOccurs="0"/>
         <element name="named-native-query" type="{http://java.sun.com/xml/ns/persistence/orm}named-native-query" maxOccurs="unbounded" minOccurs="0"/>
         <element name="sql-result-set-mapping" type="{http://java.sun.com/xml/ns/persistence/orm}sql-result-set-mapping" maxOccurs="unbounded" minOccurs="0"/>
         <element name="mapped-superclass" type="{http://java.sun.com/xml/ns/persistence/orm}mapped-superclass" maxOccurs="unbounded" minOccurs="0"/>
         <element name="entity" type="{http://java.sun.com/xml/ns/persistence/orm}entity" maxOccurs="unbounded" minOccurs="0"/>
         <element name="embeddable" type="{http://java.sun.com/xml/ns/persistence/orm}embeddable" maxOccurs="unbounded" minOccurs="0"/>
       </sequence>
       <attribute name="version" use="required" type="{http://java.sun.com/xml/ns/persistence/orm}versionType" fixed="1.0" />
     </restriction>
   </complexContent>
 </complexType>
 

See Also:
Serialized Form

Field Summary
protected  String _package
           
protected  AccessType access
           
protected  String catalog
           
protected  String description
           
protected  Embeddable[] embeddable
           
protected  Entity[] entity
           
protected  MappedSuperclass[] mappedSuperclass
           
protected  NamedNativeQuery[] namedNativeQuery
           
protected  NamedQuery[] namedQuery
           
protected  PersistenceUnitMetadata persistenceUnitMetadata
           
protected  String schema
           
protected  SequenceGenerator[] sequenceGenerator
           
protected  SqlResultSetMapping[] sqlResultSetMapping
           
protected  TableGenerator[] tableGenerator
           
protected  String version
           
 
Constructor Summary
EntityMappings()
          Creates a new net.sourceforge.ccxjc.it.model.pkg.indexed.valueclass.persistence.orm.EntityMappings instance.
EntityMappings(EntityMappings o)
          Creates a new net.sourceforge.ccxjc.it.model.pkg.indexed.valueclass.persistence.orm.EntityMappings instance by copying a given instance.
 
Method Summary
 EntityMappings clone()
          Creates and returns a copy of this object.
 AccessType getAccess()
          Gets the value of the access property.
 String getCatalog()
          Gets the value of the catalog property.
 String getDescription()
          Gets the value of the description property.
 Embeddable[] getEmbeddable()
           
 Embeddable getEmbeddable(int idx)
           
 int getEmbeddableLength()
           
 Entity[] getEntity()
           
 Entity getEntity(int idx)
           
 int getEntityLength()
           
 MappedSuperclass[] getMappedSuperclass()
           
 MappedSuperclass getMappedSuperclass(int idx)
           
 int getMappedSuperclassLength()
           
 NamedNativeQuery[] getNamedNativeQuery()
           
 NamedNativeQuery getNamedNativeQuery(int idx)
           
 int getNamedNativeQueryLength()
           
 NamedQuery[] getNamedQuery()
           
 NamedQuery getNamedQuery(int idx)
           
 int getNamedQueryLength()
           
 String getPackage()
          Gets the value of the package property.
 PersistenceUnitMetadata getPersistenceUnitMetadata()
          Gets the value of the persistenceUnitMetadata property.
 String getSchema()
          Gets the value of the schema property.
 SequenceGenerator[] getSequenceGenerator()
           
 SequenceGenerator getSequenceGenerator(int idx)
           
 int getSequenceGeneratorLength()
           
 SqlResultSetMapping[] getSqlResultSetMapping()
           
 SqlResultSetMapping getSqlResultSetMapping(int idx)
           
 int getSqlResultSetMappingLength()
           
 TableGenerator[] getTableGenerator()
           
 TableGenerator getTableGenerator(int idx)
           
 int getTableGeneratorLength()
           
 String getVersion()
          Gets the value of the version property.
 void setAccess(AccessType value)
          Sets the value of the access property.
 void setCatalog(String value)
          Sets the value of the catalog property.
 void setDescription(String value)
          Sets the value of the description property.
 void setEmbeddable(Embeddable[] values)
           
 Embeddable setEmbeddable(int idx, Embeddable value)
           
 void setEntity(Entity[] values)
           
 Entity setEntity(int idx, Entity value)
           
 MappedSuperclass setMappedSuperclass(int idx, MappedSuperclass value)
           
 void setMappedSuperclass(MappedSuperclass[] values)
           
 NamedNativeQuery setNamedNativeQuery(int idx, NamedNativeQuery value)
           
 void setNamedNativeQuery(NamedNativeQuery[] values)
           
 NamedQuery setNamedQuery(int idx, NamedQuery value)
           
 void setNamedQuery(NamedQuery[] values)
           
 void setPackage(String value)
          Sets the value of the package property.
 void setPersistenceUnitMetadata(PersistenceUnitMetadata value)
          Sets the value of the persistenceUnitMetadata property.
 void setSchema(String value)
          Sets the value of the schema property.
 SequenceGenerator setSequenceGenerator(int idx, SequenceGenerator value)
           
 void setSequenceGenerator(SequenceGenerator[] values)
           
 SqlResultSetMapping setSqlResultSetMapping(int idx, SqlResultSetMapping value)
           
 void setSqlResultSetMapping(SqlResultSetMapping[] values)
           
 TableGenerator setTableGenerator(int idx, TableGenerator value)
           
 void setTableGenerator(TableGenerator[] values)
           
 void setVersion(String value)
          Sets the value of the version property.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

description

protected String description

persistenceUnitMetadata

protected PersistenceUnitMetadata persistenceUnitMetadata

_package

protected String _package

schema

protected String schema

catalog

protected String catalog

access

protected AccessType access

sequenceGenerator

protected SequenceGenerator[] sequenceGenerator

tableGenerator

protected TableGenerator[] tableGenerator

namedQuery

protected NamedQuery[] namedQuery

namedNativeQuery

protected NamedNativeQuery[] namedNativeQuery

sqlResultSetMapping

protected SqlResultSetMapping[] sqlResultSetMapping

mappedSuperclass

protected MappedSuperclass[] mappedSuperclass

entity

protected Entity[] entity

embeddable

protected Embeddable[] embeddable

version

protected String version
Constructor Detail

EntityMappings

public EntityMappings()
Creates a new net.sourceforge.ccxjc.it.model.pkg.indexed.valueclass.persistence.orm.EntityMappings instance.


EntityMappings

public EntityMappings(EntityMappings o)
Creates a new net.sourceforge.ccxjc.it.model.pkg.indexed.valueclass.persistence.orm.EntityMappings instance by copying a given instance.

Parameters:
o - The instance to copy or null.
Method Detail

getDescription

public String getDescription()
Gets the value of the description property.

Returns:
possible object is String

setDescription

public void setDescription(String value)
Sets the value of the description property.

Parameters:
value - allowed object is String

getPersistenceUnitMetadata

public PersistenceUnitMetadata getPersistenceUnitMetadata()
Gets the value of the persistenceUnitMetadata property.

Returns:
possible object is PersistenceUnitMetadata

setPersistenceUnitMetadata

public void setPersistenceUnitMetadata(PersistenceUnitMetadata value)
Sets the value of the persistenceUnitMetadata property.

Parameters:
value - allowed object is PersistenceUnitMetadata

getPackage

public String getPackage()
Gets the value of the package property.

Returns:
possible object is String

setPackage

public void setPackage(String value)
Sets the value of the package property.

Parameters:
value - allowed object is String

getSchema

public String getSchema()
Gets the value of the schema property.

Returns:
possible object is String

setSchema

public void setSchema(String value)
Sets the value of the schema property.

Parameters:
value - allowed object is String

getCatalog

public String getCatalog()
Gets the value of the catalog property.

Returns:
possible object is String

setCatalog

public void setCatalog(String value)
Sets the value of the catalog property.

Parameters:
value - allowed object is String

getAccess

public AccessType getAccess()
Gets the value of the access property.

Returns:
possible object is AccessType

setAccess

public void setAccess(AccessType value)
Sets the value of the access property.

Parameters:
value - allowed object is AccessType

getSequenceGenerator

public SequenceGenerator[] getSequenceGenerator()
Returns:
array of SequenceGenerator

getSequenceGenerator

public SequenceGenerator getSequenceGenerator(int idx)
Returns:
one of SequenceGenerator

getSequenceGeneratorLength

public int getSequenceGeneratorLength()

setSequenceGenerator

public void setSequenceGenerator(SequenceGenerator[] values)
Parameters:
values - allowed objects are SequenceGenerator

setSequenceGenerator

public SequenceGenerator setSequenceGenerator(int idx,
                                              SequenceGenerator value)
Parameters:
value - allowed object is SequenceGenerator

getTableGenerator

public TableGenerator[] getTableGenerator()
Returns:
array of TableGenerator

getTableGenerator

public TableGenerator getTableGenerator(int idx)
Returns:
one of TableGenerator

getTableGeneratorLength

public int getTableGeneratorLength()

setTableGenerator

public void setTableGenerator(TableGenerator[] values)
Parameters:
values - allowed objects are TableGenerator

setTableGenerator

public TableGenerator setTableGenerator(int idx,
                                        TableGenerator value)
Parameters:
value - allowed object is TableGenerator

getNamedQuery

public NamedQuery[] getNamedQuery()
Returns:
array of NamedQuery

getNamedQuery

public NamedQuery getNamedQuery(int idx)
Returns:
one of NamedQuery

getNamedQueryLength

public int getNamedQueryLength()

setNamedQuery

public void setNamedQuery(NamedQuery[] values)
Parameters:
values - allowed objects are NamedQuery

setNamedQuery

public NamedQuery setNamedQuery(int idx,
                                NamedQuery value)
Parameters:
value - allowed object is NamedQuery

getNamedNativeQuery

public NamedNativeQuery[] getNamedNativeQuery()
Returns:
array of NamedNativeQuery

getNamedNativeQuery

public NamedNativeQuery getNamedNativeQuery(int idx)
Returns:
one of NamedNativeQuery

getNamedNativeQueryLength

public int getNamedNativeQueryLength()

setNamedNativeQuery

public void setNamedNativeQuery(NamedNativeQuery[] values)
Parameters:
values - allowed objects are NamedNativeQuery

setNamedNativeQuery

public NamedNativeQuery setNamedNativeQuery(int idx,
                                            NamedNativeQuery value)
Parameters:
value - allowed object is NamedNativeQuery

getSqlResultSetMapping

public SqlResultSetMapping[] getSqlResultSetMapping()
Returns:
array of SqlResultSetMapping

getSqlResultSetMapping

public SqlResultSetMapping getSqlResultSetMapping(int idx)
Returns:
one of SqlResultSetMapping

getSqlResultSetMappingLength

public int getSqlResultSetMappingLength()

setSqlResultSetMapping

public void setSqlResultSetMapping(SqlResultSetMapping[] values)
Parameters:
values - allowed objects are SqlResultSetMapping

setSqlResultSetMapping

public SqlResultSetMapping setSqlResultSetMapping(int idx,
                                                  SqlResultSetMapping value)
Parameters:
value - allowed object is SqlResultSetMapping

getMappedSuperclass

public MappedSuperclass[] getMappedSuperclass()
Returns:
array of MappedSuperclass

getMappedSuperclass

public MappedSuperclass getMappedSuperclass(int idx)
Returns:
one of MappedSuperclass

getMappedSuperclassLength

public int getMappedSuperclassLength()

setMappedSuperclass

public void setMappedSuperclass(MappedSuperclass[] values)
Parameters:
values - allowed objects are MappedSuperclass

setMappedSuperclass

public MappedSuperclass setMappedSuperclass(int idx,
                                            MappedSuperclass value)
Parameters:
value - allowed object is MappedSuperclass

getEntity

public Entity[] getEntity()
Returns:
array of Entity

getEntity

public Entity getEntity(int idx)
Returns:
one of Entity

getEntityLength

public int getEntityLength()

setEntity

public void setEntity(Entity[] values)
Parameters:
values - allowed objects are Entity

setEntity

public Entity setEntity(int idx,
                        Entity value)
Parameters:
value - allowed object is Entity

getEmbeddable

public Embeddable[] getEmbeddable()
Returns:
array of Embeddable

getEmbeddable

public Embeddable getEmbeddable(int idx)
Returns:
one of Embeddable

getEmbeddableLength

public int getEmbeddableLength()

setEmbeddable

public void setEmbeddable(Embeddable[] values)
Parameters:
values - allowed objects are Embeddable

setEmbeddable

public Embeddable setEmbeddable(int idx,
                                Embeddable value)
Parameters:
value - allowed object is Embeddable

getVersion

public String getVersion()
Gets the value of the version property.

Returns:
possible object is String

setVersion

public void setVersion(String value)
Sets the value of the version property.

Parameters:
value - allowed object is String

clone

public EntityMappings clone()
Creates and returns a copy of this object.

Overrides:
clone in class Object
Returns:
A clone of this instance.


Copyright © 2009 The CC-XJC Community. All Rights Reserved.