org.jboss.shrinkwrap.descriptor.api.persistence10.PersistenceUnit Maven / Gradle / Ivy
package org.jboss.shrinkwrap.descriptor.api.persistence10;
import java.util.ArrayList;
import java.util.List;
import org.jboss.shrinkwrap.descriptor.api.Child;
import org.jboss.shrinkwrap.descriptor.api.persistence10.Properties;
import org.jboss.shrinkwrap.descriptor.api.persistence10.PersistenceUnitTransactionType;
import org.jboss.shrinkwrap.descriptor.api.persistence.*;
import org.jboss.shrinkwrap.descriptor.api.persistence.PersistencePersistenceUnitCommType;
import org.jboss.shrinkwrap.descriptor.api.persistence10.Properties;/**
* This interface defines the contract for the persistence-unit
xsd type
* @author Ralf Battenfeld
* @author Andrew Lee Rubinger
* @author George Gastaldi
*/
public interface PersistenceUnit extends Child,
PersistencePersistenceUnitCommType,
Properties>> {
// --------------------------------------------------------------------------------------------------------||
// ClassName: PersistenceUnit ElementName: xsd:string ElementType : description
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the description
element
* @param description the value for the element description
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit 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 PersistenceUnit
*/
public PersistenceUnit removeDescription();
// --------------------------------------------------------------------------------------------------------||
// ClassName: PersistenceUnit ElementName: xsd:string ElementType : provider
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the provider
element
* @param provider the value for the element provider
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit provider(String provider);
/**
* Returns the provider
element
* @return the node defined for the element provider
*/
public String getProvider();
/**
* Removes the provider
element
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit removeProvider();
// --------------------------------------------------------------------------------------------------------||
// ClassName: PersistenceUnit ElementName: xsd:string ElementType : jta-data-source
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the jta-data-source
element
* @param jtaDataSource the value for the element jta-data-source
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit jtaDataSource(String jtaDataSource);
/**
* Returns the jta-data-source
element
* @return the node defined for the element jta-data-source
*/
public String getJtaDataSource();
/**
* Removes the jta-data-source
element
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit removeJtaDataSource();
// --------------------------------------------------------------------------------------------------------||
// ClassName: PersistenceUnit ElementName: xsd:string ElementType : non-jta-data-source
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the non-jta-data-source
element
* @param nonJtaDataSource the value for the element non-jta-data-source
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit nonJtaDataSource(String nonJtaDataSource);
/**
* Returns the non-jta-data-source
element
* @return the node defined for the element non-jta-data-source
*/
public String getNonJtaDataSource();
/**
* Removes the non-jta-data-source
element
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit removeNonJtaDataSource();
// --------------------------------------------------------------------------------------------------------||
// ClassName: PersistenceUnit ElementName: xsd:string ElementType : mapping-file
// MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Creates for all String objects representing mapping-file
elements,
* a new mapping-file
element
* @param values list of mapping-file
objects
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit mappingFile(String ... values);
/**
* Returns all mapping-file
elements
* @return list of mapping-file
*/
public List getAllMappingFile();
/**
* Removes the mapping-file
element
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit removeAllMappingFile();
// --------------------------------------------------------------------------------------------------------||
// ClassName: PersistenceUnit ElementName: xsd:string ElementType : jar-file
// MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Creates for all String objects representing jar-file
elements,
* a new jar-file
element
* @param values list of jar-file
objects
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit jarFile(String ... values);
/**
* Returns all jar-file
elements
* @return list of jar-file
*/
public List getAllJarFile();
/**
* Removes the jar-file
element
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit removeAllJarFile();
// --------------------------------------------------------------------------------------------------------||
// ClassName: PersistenceUnit ElementName: xsd:string ElementType : class
// MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Creates for all String objects representing class
elements,
* a new class
element
* @param values list of class
objects
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit clazz(String ... values);
/**
* Returns all class
elements
* @return list of class
*/
public List getAllClazz();
/**
* Removes the class
element
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit removeAllClazz();
// --------------------------------------------------------------------------------------------------------||
// ClassName: PersistenceUnit ElementName: xsd:boolean ElementType : exclude-unlisted-classes
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the exclude-unlisted-classes
element
* @param excludeUnlistedClasses the value for the element exclude-unlisted-classes
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit excludeUnlistedClasses(Boolean excludeUnlistedClasses);
/**
* Returns the exclude-unlisted-classes
element
* @return the node defined for the element exclude-unlisted-classes
*/
public Boolean isExcludeUnlistedClasses();
/**
* Removes the exclude-unlisted-classes
element
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit removeExcludeUnlistedClasses();
// --------------------------------------------------------------------------------------------------------||
// ClassName: PersistenceUnit ElementName: persistence:properties ElementType : properties
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new properties
element with the given value will be created.
* Otherwise, the existing properties
element will be returned.
* @return a new or existing instance of Properties>
*/
public Properties> getOrCreateProperties();
/**
* Removes the properties
element
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit removeProperties();
// --------------------------------------------------------------------------------------------------------||
// ClassName: PersistenceUnit ElementName: xsd:string ElementType : name
// MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the name
attribute
* @param name the value for the attribute name
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit name(String name);
/**
* Returns the name
attribute
* @return the value defined for the attribute name
*/
public String getName();
/**
* Removes the name
attribute
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit removeName();
// --------------------------------------------------------------------------------------------------------||
// ClassName: PersistenceUnit ElementName: persistence:persistence-unit-transaction-type ElementType : transaction-type
// MaxOccurs: - isGeneric: true isAttribute: true isEnum: true isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the transaction-type
attribute
* @param transactionType the value for the attribute transaction-type
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit transactionType(PersistenceUnitTransactionType transactionType);
/**
* Sets the transaction-type
attribute
* @param transactionType the value for the attribute transaction-type
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit transactionType(String transactionType);
/**
* Returns the transaction-type
attribute
* @return the value defined for the attribute transaction-type
*/
public PersistenceUnitTransactionType getTransactionType();
/**
* Returns the transaction-type
attribute
* @return the value found for the element transaction-type
*/
public String getTransactionTypeAsString();
/**
* Removes the transaction-type
attribute
* @return the current instance of PersistenceUnit
*/
public PersistenceUnit removeTransactionType();
}