org.jboss.shrinkwrap.descriptor.api.orm21.OrmDescriptor Maven / Gradle / Ivy
Show all versions of shrinkwrap-descriptors-api-javaee Show documentation
package org.jboss.shrinkwrap.descriptor.api.orm21;
import java.util.ArrayList;
import java.util.List;
import org.jboss.shrinkwrap.descriptor.api.Child;
import org.jboss.shrinkwrap.descriptor.api.orm21.PersistenceUnitMetadata;
import org.jboss.shrinkwrap.descriptor.api.orm21.AccessType;
import org.jboss.shrinkwrap.descriptor.api.orm21.SequenceGenerator;
import org.jboss.shrinkwrap.descriptor.api.orm21.TableGenerator;
import org.jboss.shrinkwrap.descriptor.api.orm21.NamedQuery;
import org.jboss.shrinkwrap.descriptor.api.orm21.NamedNativeQuery;
import org.jboss.shrinkwrap.descriptor.api.orm21.NamedStoredProcedureQuery;
import org.jboss.shrinkwrap.descriptor.api.orm21.SqlResultSetMapping;
import org.jboss.shrinkwrap.descriptor.api.orm21.MappedSuperclass;
import org.jboss.shrinkwrap.descriptor.api.orm21.Entity;
import org.jboss.shrinkwrap.descriptor.api.orm21.Embeddable;
import org.jboss.shrinkwrap.descriptor.api.orm21.Converter;
import org.jboss.shrinkwrap.descriptor.api.Descriptor;
import org.jboss.shrinkwrap.descriptor.api.DescriptorNamespace;
import org.jboss.shrinkwrap.descriptor.api.orm.*;
/**
*
* This deployment descriptor provides the functionalities as described in the specification
*
* Example:
*
*
* OrmDescriptor descriptor = Descriptors.create(OrmDescriptor.class);
*
*
*
* @author Ralf Battenfeld
* @author Andrew Lee Rubinger
*/
public interface OrmDescriptor extends Descriptor, DescriptorNamespace,
OrmCommonDescriptor,
SequenceGenerator,
TableGenerator,
TableGenerator,
NamedQuery,
NamedQuery,
NamedNativeQuery,
SqlResultSetMapping,
Embeddable> {
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: xsd:string ElementType : description
// MaxOccurs: - isGeneric: false isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the description
element
* @param description the value for the element description
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor description(String description);
/**
* Returns the description
element
* @return the node defined for the element description
*/
public String getDescription();
/**
* Removes the description
element
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor removeDescription();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: orm:persistence-unit-metadata ElementType : persistence-unit-metadata
// MaxOccurs: - isGeneric: false isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new persistence-unit-metadata
element with the given value will be created.
* Otherwise, the existing persistence-unit-metadata
element will be returned.
* @return a new or existing instance of PersistenceUnitMetadata
*/
public PersistenceUnitMetadata getOrCreatePersistenceUnitMetadata();
/**
* Removes the persistence-unit-metadata
element
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor removePersistenceUnitMetadata();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: xsd:string ElementType : package
// MaxOccurs: - isGeneric: false isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the package
element
* @param _package the value for the element package
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor _package(String _package);
/**
* Returns the package
element
* @return the node defined for the element package
*/
public String getPackage();
/**
* Removes the package
element
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor removePackage();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: xsd:string ElementType : schema
// MaxOccurs: - isGeneric: false isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the schema
element
* @param schema the value for the element schema
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor schema(String schema);
/**
* Returns the schema
element
* @return the node defined for the element schema
*/
public String getSchema();
/**
* Removes the schema
element
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor removeSchema();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: xsd:string ElementType : catalog
// MaxOccurs: - isGeneric: false isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the catalog
element
* @param catalog the value for the element catalog
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor catalog(String catalog);
/**
* Returns the catalog
element
* @return the node defined for the element catalog
*/
public String getCatalog();
/**
* Removes the catalog
element
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor removeCatalog();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: orm:access-type ElementType : access
// MaxOccurs: - isGeneric: false isAttribute: false isEnum: true isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the access
element
* @param access the value for the element access
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor access(AccessType access);
/**
* Sets the access
element
* @param access the value for the element access
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor access(String access);
/**
* Returns the access
element
* @return the value found for the element access
*/
public AccessType getAccess();
/**
* Returns the access
element
* @return the value found for the element access
*/
public String getAccessAsString();
/**
* Removes the access
attribute
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor removeAccess();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: orm:sequence-generator ElementType : sequence-generator
// MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new sequence-generator
element will be created and returned.
* Otherwise, the first existing sequence-generator
element will be returned.
* @return the instance defined for the element sequence-generator
*/
public SequenceGenerator getOrCreateSequenceGenerator();
/**
* Creates a new sequence-generator
element
* @return the new created instance of SequenceGenerator
*/
public SequenceGenerator createSequenceGenerator();
/**
* Returns all sequence-generator
elements
* @return list of sequence-generator
*/
public List> getAllSequenceGenerator();
/**
* Removes all sequence-generator
elements
* @return the current instance of SequenceGenerator
*/
public OrmDescriptor removeAllSequenceGenerator();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: orm:table-generator ElementType : table-generator
// MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new table-generator
element will be created and returned.
* Otherwise, the first existing table-generator
element will be returned.
* @return the instance defined for the element table-generator
*/
public TableGenerator getOrCreateTableGenerator();
/**
* Creates a new table-generator
element
* @return the new created instance of TableGenerator
*/
public TableGenerator createTableGenerator();
/**
* Returns all table-generator
elements
* @return list of table-generator
*/
public List> getAllTableGenerator();
/**
* Removes all table-generator
elements
* @return the current instance of TableGenerator
*/
public OrmDescriptor removeAllTableGenerator();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: orm:named-query ElementType : named-query
// MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new named-query
element will be created and returned.
* Otherwise, the first existing named-query
element will be returned.
* @return the instance defined for the element named-query
*/
public NamedQuery getOrCreateNamedQuery();
/**
* Creates a new named-query
element
* @return the new created instance of NamedQuery
*/
public NamedQuery createNamedQuery();
/**
* Returns all named-query
elements
* @return list of named-query
*/
public List> getAllNamedQuery();
/**
* Removes all named-query
elements
* @return the current instance of NamedQuery
*/
public OrmDescriptor removeAllNamedQuery();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: orm:named-native-query ElementType : named-native-query
// MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new named-native-query
element will be created and returned.
* Otherwise, the first existing named-native-query
element will be returned.
* @return the instance defined for the element named-native-query
*/
public NamedNativeQuery getOrCreateNamedNativeQuery();
/**
* Creates a new named-native-query
element
* @return the new created instance of NamedNativeQuery
*/
public NamedNativeQuery createNamedNativeQuery();
/**
* Returns all named-native-query
elements
* @return list of named-native-query
*/
public List> getAllNamedNativeQuery();
/**
* Removes all named-native-query
elements
* @return the current instance of NamedNativeQuery
*/
public OrmDescriptor removeAllNamedNativeQuery();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: orm:named-stored-procedure-query ElementType : named-stored-procedure-query
// MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new named-stored-procedure-query
element will be created and returned.
* Otherwise, the first existing named-stored-procedure-query
element will be returned.
* @return the instance defined for the element named-stored-procedure-query
*/
public NamedStoredProcedureQuery getOrCreateNamedStoredProcedureQuery();
/**
* Creates a new named-stored-procedure-query
element
* @return the new created instance of NamedStoredProcedureQuery
*/
public NamedStoredProcedureQuery createNamedStoredProcedureQuery();
/**
* Returns all named-stored-procedure-query
elements
* @return list of named-stored-procedure-query
*/
public List> getAllNamedStoredProcedureQuery();
/**
* Removes all named-stored-procedure-query
elements
* @return the current instance of NamedStoredProcedureQuery
*/
public OrmDescriptor removeAllNamedStoredProcedureQuery();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: orm:sql-result-set-mapping ElementType : sql-result-set-mapping
// MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new sql-result-set-mapping
element will be created and returned.
* Otherwise, the first existing sql-result-set-mapping
element will be returned.
* @return the instance defined for the element sql-result-set-mapping
*/
public SqlResultSetMapping getOrCreateSqlResultSetMapping();
/**
* Creates a new sql-result-set-mapping
element
* @return the new created instance of SqlResultSetMapping
*/
public SqlResultSetMapping createSqlResultSetMapping();
/**
* Returns all sql-result-set-mapping
elements
* @return list of sql-result-set-mapping
*/
public List> getAllSqlResultSetMapping();
/**
* Removes all sql-result-set-mapping
elements
* @return the current instance of SqlResultSetMapping
*/
public OrmDescriptor removeAllSqlResultSetMapping();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: orm:mapped-superclass ElementType : mapped-superclass
// MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new mapped-superclass
element will be created and returned.
* Otherwise, the first existing mapped-superclass
element will be returned.
* @return the instance defined for the element mapped-superclass
*/
public MappedSuperclass getOrCreateMappedSuperclass();
/**
* Creates a new mapped-superclass
element
* @return the new created instance of MappedSuperclass
*/
public MappedSuperclass createMappedSuperclass();
/**
* Returns all mapped-superclass
elements
* @return list of mapped-superclass
*/
public List> getAllMappedSuperclass();
/**
* Removes all mapped-superclass
elements
* @return the current instance of MappedSuperclass
*/
public OrmDescriptor removeAllMappedSuperclass();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: orm:entity ElementType : entity
// MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new entity
element will be created and returned.
* Otherwise, the first existing entity
element will be returned.
* @return the instance defined for the element entity
*/
public Entity getOrCreateEntity();
/**
* Creates a new entity
element
* @return the new created instance of Entity
*/
public Entity createEntity();
/**
* Returns all entity
elements
* @return list of entity
*/
public List> getAllEntity();
/**
* Removes all entity
elements
* @return the current instance of Entity
*/
public OrmDescriptor removeAllEntity();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: orm:embeddable ElementType : embeddable
// MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new embeddable
element will be created and returned.
* Otherwise, the first existing embeddable
element will be returned.
* @return the instance defined for the element embeddable
*/
public Embeddable getOrCreateEmbeddable();
/**
* Creates a new embeddable
element
* @return the new created instance of Embeddable
*/
public Embeddable createEmbeddable();
/**
* Returns all embeddable
elements
* @return list of embeddable
*/
public List> getAllEmbeddable();
/**
* Removes all embeddable
elements
* @return the current instance of Embeddable
*/
public OrmDescriptor removeAllEmbeddable();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: orm:converter ElementType : converter
// MaxOccurs: -unbounded isGeneric: false isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new converter
element will be created and returned.
* Otherwise, the first existing converter
element will be returned.
* @return the instance defined for the element converter
*/
public Converter getOrCreateConverter();
/**
* Creates a new converter
element
* @return the new created instance of Converter
*/
public Converter createConverter();
/**
* Returns all converter
elements
* @return list of converter
*/
public List> getAllConverter();
/**
* Removes all converter
elements
* @return the current instance of Converter
*/
public OrmDescriptor removeAllConverter();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OrmDescriptor ElementName: xsd:token ElementType : version
// MaxOccurs: - isGeneric: false isAttribute: true isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
public static final String VERSION = "2.1";
/**
* Sets the version
attribute
* @param version the value for the attribute version
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor version(String version);
/**
* Returns the version
attribute
* @return the value defined for the attribute version
*/
public String getVersion();
/**
* Removes the version
attribute
* @return the current instance of OrmDescriptor
*/
public OrmDescriptor removeVersion();
}