org.jboss.shrinkwrap.descriptor.api.orm21.OneToOne Maven / Gradle / Ivy
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.PrimaryKeyJoinColumn;
import org.jboss.shrinkwrap.descriptor.api.orm21.ForeignKey;
import org.jboss.shrinkwrap.descriptor.api.orm21.JoinColumn;
import org.jboss.shrinkwrap.descriptor.api.orm21.ForeignKey;
import org.jboss.shrinkwrap.descriptor.api.orm21.JoinTable;
import org.jboss.shrinkwrap.descriptor.api.orm21.CascadeType;
import org.jboss.shrinkwrap.descriptor.api.orm21.FetchType;
import org.jboss.shrinkwrap.descriptor.api.orm21.AccessType;
import org.jboss.shrinkwrap.descriptor.api.orm.*;
import org.jboss.shrinkwrap.descriptor.api.orm.OrmOneToOneCommType;
import org.jboss.shrinkwrap.descriptor.api.orm21.PrimaryKeyJoinColumn;
import org.jboss.shrinkwrap.descriptor.api.orm21.JoinColumn;
import org.jboss.shrinkwrap.descriptor.api.orm21.JoinTable;
import org.jboss.shrinkwrap.descriptor.api.orm21.CascadeType;/**
* This interface defines the contract for the one-to-one
xsd type
* @author Ralf Battenfeld
* @author Andrew Lee Rubinger
*/
public interface OneToOne extends Child,
OrmOneToOneCommType,
PrimaryKeyJoinColumn>,
JoinColumn>,
JoinTable>,
CascadeType>> {
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: orm:primary-key-join-column ElementType : primary-key-join-column
// MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new primary-key-join-column
element will be created and returned.
* Otherwise, the first existing primary-key-join-column
element will be returned.
* @return the instance defined for the element primary-key-join-column
*/
public PrimaryKeyJoinColumn> getOrCreatePrimaryKeyJoinColumn();
/**
* Creates a new primary-key-join-column
element
* @return the new created instance of PrimaryKeyJoinColumn>
*/
public PrimaryKeyJoinColumn> createPrimaryKeyJoinColumn();
/**
* Returns all primary-key-join-column
elements
* @return list of primary-key-join-column
*/
public List>> getAllPrimaryKeyJoinColumn();
/**
* Removes all primary-key-join-column
elements
* @return the current instance of PrimaryKeyJoinColumn>
*/
public OneToOne removeAllPrimaryKeyJoinColumn();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: orm:foreign-key ElementType : primary-key-foreign-key
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new primary-key-foreign-key
element with the given value will be created.
* Otherwise, the existing primary-key-foreign-key
element will be returned.
* @return a new or existing instance of ForeignKey>
*/
public ForeignKey> getOrCreatePrimaryKeyForeignKey();
/**
* Removes the primary-key-foreign-key
element
* @return the current instance of OneToOne
*/
public OneToOne removePrimaryKeyForeignKey();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: orm:join-column ElementType : join-column
// MaxOccurs: -unbounded isGeneric: true isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new join-column
element will be created and returned.
* Otherwise, the first existing join-column
element will be returned.
* @return the instance defined for the element join-column
*/
public JoinColumn> getOrCreateJoinColumn();
/**
* Creates a new join-column
element
* @return the new created instance of JoinColumn>
*/
public JoinColumn> createJoinColumn();
/**
* Returns all join-column
elements
* @return list of join-column
*/
public List>> getAllJoinColumn();
/**
* Removes all join-column
elements
* @return the current instance of JoinColumn>
*/
public OneToOne removeAllJoinColumn();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: orm:foreign-key ElementType : foreign-key
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new foreign-key
element with the given value will be created.
* Otherwise, the existing foreign-key
element will be returned.
* @return a new or existing instance of ForeignKey>
*/
public ForeignKey> getOrCreateForeignKey();
/**
* Removes the foreign-key
element
* @return the current instance of OneToOne
*/
public OneToOne removeForeignKey();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: orm:join-table ElementType : join-table
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new join-table
element with the given value will be created.
* Otherwise, the existing join-table
element will be returned.
* @return a new or existing instance of JoinTable>
*/
public JoinTable> getOrCreateJoinTable();
/**
* Removes the join-table
element
* @return the current instance of OneToOne
*/
public OneToOne removeJoinTable();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: orm:cascade-type ElementType : cascade
// MaxOccurs: - isGeneric: true isAttribute: false isEnum: false isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* If not already created, a new cascade
element with the given value will be created.
* Otherwise, the existing cascade
element will be returned.
* @return a new or existing instance of CascadeType>
*/
public CascadeType> getOrCreateCascade();
/**
* Removes the cascade
element
* @return the current instance of OneToOne
*/
public OneToOne removeCascade();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne 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 OneToOne
*/
public OneToOne 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 OneToOne
*/
public OneToOne removeName();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: xsd:string ElementType : target-entity
// MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the target-entity
attribute
* @param targetEntity the value for the attribute target-entity
* @return the current instance of OneToOne
*/
public OneToOne targetEntity(String targetEntity);
/**
* Returns the target-entity
attribute
* @return the value defined for the attribute target-entity
*/
public String getTargetEntity();
/**
* Removes the target-entity
attribute
* @return the current instance of OneToOne
*/
public OneToOne removeTargetEntity();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: orm:fetch-type ElementType : fetch
// MaxOccurs: - isGeneric: true isAttribute: true isEnum: true isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the fetch
attribute
* @param fetch the value for the attribute fetch
* @return the current instance of OneToOne
*/
public OneToOne fetch(FetchType fetch);
/**
* Sets the fetch
attribute
* @param fetch the value for the attribute fetch
* @return the current instance of OneToOne
*/
public OneToOne fetch(String fetch);
/**
* Returns the fetch
attribute
* @return the value defined for the attribute fetch
*/
public FetchType getFetch();
/**
* Returns the fetch
attribute
* @return the value found for the element fetch
*/
public String getFetchAsString();
/**
* Removes the fetch
attribute
* @return the current instance of OneToOne
*/
public OneToOne removeFetch();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: xsd:boolean ElementType : optional
// MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the optional
attribute
* @param optional the value for the attribute optional
* @return the current instance of OneToOne
*/
public OneToOne optional(Boolean optional);
/**
* Returns the optional
attribute
* @return the value defined for the attribute optional
*/
public Boolean isOptional();
/**
* Removes the optional
attribute
* @return the current instance of OneToOne
*/
public OneToOne removeOptional();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: orm:access-type ElementType : access
// MaxOccurs: - isGeneric: true isAttribute: true isEnum: true isDataType: false
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the access
attribute
* @param access the value for the attribute access
* @return the current instance of OneToOne
*/
public OneToOne access(AccessType access);
/**
* Sets the access
attribute
* @param access the value for the attribute access
* @return the current instance of OneToOne
*/
public OneToOne access(String access);
/**
* Returns the access
attribute
* @return the value defined for the attribute access
*/
public AccessType getAccess();
/**
* Returns the access
attribute
* @return the value found for the element access
*/
public String getAccessAsString();
/**
* Removes the access
attribute
* @return the current instance of OneToOne
*/
public OneToOne removeAccess();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: xsd:string ElementType : mapped-by
// MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the mapped-by
attribute
* @param mappedBy the value for the attribute mapped-by
* @return the current instance of OneToOne
*/
public OneToOne mappedBy(String mappedBy);
/**
* Returns the mapped-by
attribute
* @return the value defined for the attribute mapped-by
*/
public String getMappedBy();
/**
* Removes the mapped-by
attribute
* @return the current instance of OneToOne
*/
public OneToOne removeMappedBy();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: xsd:boolean ElementType : orphan-removal
// MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the orphan-removal
attribute
* @param orphanRemoval the value for the attribute orphan-removal
* @return the current instance of OneToOne
*/
public OneToOne orphanRemoval(Boolean orphanRemoval);
/**
* Returns the orphan-removal
attribute
* @return the value defined for the attribute orphan-removal
*/
public Boolean isOrphanRemoval();
/**
* Removes the orphan-removal
attribute
* @return the current instance of OneToOne
*/
public OneToOne removeOrphanRemoval();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: xsd:string ElementType : maps-id
// MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the maps-id
attribute
* @param mapsId the value for the attribute maps-id
* @return the current instance of OneToOne
*/
public OneToOne mapsId(String mapsId);
/**
* Returns the maps-id
attribute
* @return the value defined for the attribute maps-id
*/
public String getMapsId();
/**
* Removes the maps-id
attribute
* @return the current instance of OneToOne
*/
public OneToOne removeMapsId();
// --------------------------------------------------------------------------------------------------------||
// ClassName: OneToOne ElementName: xsd:boolean ElementType : id
// MaxOccurs: - isGeneric: true isAttribute: true isEnum: false isDataType: true
// --------------------------------------------------------------------------------------------------------||
/**
* Sets the id
attribute
* @param id the value for the attribute id
* @return the current instance of OneToOne
*/
public OneToOne id(Boolean id);
/**
* Returns the id
attribute
* @return the value defined for the attribute id
*/
public Boolean isId();
/**
* Removes the id
attribute
* @return the current instance of OneToOne
*/
public OneToOne removeId();
}