package org.eclipse.modisco.kdm.code;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OrderColumn;
import org.eclipse.emf.texo.test.TexoTestObjectConverter;
import org.eclipse.emf.texo.test.TexoTestQNameConverter;
import org.eclipse.persistence.annotations.Converter;
import org.eclipse.persistence.annotations.Converters;
/**
* A representation of the model object '<em><b>ControlElement</b></em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Entity(name = "code_ControlElement")
@Converters({ @Converter(converterClass = TexoTestObjectConverter.class, name = "TexoTestObjectConverter"),
@Converter(converterClass = TexoTestQNameConverter.class, name = "TexoTestQNameConverter") })
public class ControlElement extends ComputationalObject {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@ManyToOne(cascade = { CascadeType.MERGE, CascadeType.PERSIST, CascadeType.REFRESH }, optional = true)
private Datatype type = null;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@OneToMany(cascade = { CascadeType.ALL })
@OrderColumn()
private List<AbstractCodeElement> codeElement = new ArrayList<AbstractCodeElement>();
/**
* Returns the value of '<em><b>type</b></em>' feature.
*
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the value of '<em><b>type</b></em>' feature
* @generated
*/
public Datatype getType() {
return type;
}
/**
* Sets the '{@link ControlElement#getType() <em>type</em>}' feature.
*
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @param newType
* the new value of the '{@link ControlElement#getType() type}' feature.
* @generated
*/
public void setType(Datatype newType) {
type = newType;
}
/**
* Returns the value of '<em><b>codeElement</b></em>' feature.
*
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @return the value of '<em><b>codeElement</b></em>' feature
* @generated
*/
public List<AbstractCodeElement> getCodeElement() {
return codeElement;
}
/**
* Sets the '{@link ControlElement#getCodeElement() <em>codeElement</em>}' feature.
*
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @param newCodeElement
* the new value of the '{@link ControlElement#getCodeElement() codeElement}' feature.
* @generated
*/
public void setCodeElement(List<AbstractCodeElement> newCodeElement) {
codeElement = newCodeElement;
}
/**
* A toString method which prints the values of all EAttributes of this instance. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @generated
*/
@Override
public String toString() {
return "ControlElement " + "{extends: " + super.toString() + "} ";
}
}