// Path: WoundManagement/src/main/java/com/fau/amos/team2/WoundManagement/converter/BooleanToStringConverter.java
// public class BooleanToStringConverter {
// 
// 		private static final String trueString = "j";
// 		private static final String falseString = "n";
// 
// 		private BooleanToStringConverter() {
// 			
// 		}
// 		
// 		public static String convert(boolean inputBoolean) {
// 			return inputBoolean ? trueString : falseString;
// 		}
// 		
// 		public static boolean convertBack(String inputString) {
// 			return inputString.equals(trueString);
// 		}
// 	
// }
// 
// Path: WoundManagement/src/main/java/com/fau/amos/team2/WoundManagement/provider/CoreDataWoundDescriptionProvider.java
// public class CoreDataWoundDescriptionProvider {
// 
// 	private static CoreDataWoundDescriptionProvider instance;
// 	
// 	private JPAContainer<CoreDataWoundDescription> cdWoundDescriptions;
// 	
// 	/**
// 	 * Constructs an empty <code>JPAContainer<CoreDataWoundDescription></code>
// 	 * and in this context an empty Database with the
// 	 * credentials of <code>Constants.PERSISTANCE_UNIT</code>
// 	 * 
// 	 * @see com.fau.amos.team2.WoundManagement.model.Constants
// 	 * @see persistence.xml
// 	 */
// 	private CoreDataWoundDescriptionProvider() {
// 		cdWoundDescriptions = JPAContainerFactory.make(CoreDataWoundDescription.class, Constants.PERSISTANCE_UNIT);
// 	}
// 	
// 	/**
// 	 * @return The instance of <code>CoreDataWoundDescriptionProvider</code> 
// 	 * */
// 	public static CoreDataWoundDescriptionProvider getInstance() {
// 		if(instance == null) {
// 			instance = new CoreDataWoundDescriptionProvider();
// 		}
// 		return instance;
// 	}
// 	
// 	/**
// 	 * Adds a CoreDataWoundDescription to the database
// 	 * 
// 	 * @param CoreDataWoundDescription
// 	 * @return the Id of the inserted CoreDataWoundDescription
// 	 */
// 	public Object add(CoreDataWoundDescription coreDataWoundDescription) {
// 		return cdWoundDescriptions.addEntity(coreDataWoundDescription);
// 	}
// 	
// 	/**
// 	 * Get all CoreDataWoundDescription from the database
// 	 * 
// 	 * @return JPAContainer containing all CoreDataWoundDescription
// 	 */
// 	public JPAContainer<CoreDataWoundDescription> getAll() {
// 		return cdWoundDescriptions;
// 	}
// 	/**
// 	 * Get the CoreDataWoundDescription with id from the database 
// 	 * 
// 	 * @param id - The unique id of a CoreDataWoundDescription
// 	 * @return instance of the according CoreDataWoundDescription, or null
// 	 */
// 	public CoreDataWoundDescription getByID(Object id) { 
// 		return cdWoundDescriptions.getItem(id).getEntity();
// 	}
// 	
// }


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.fau.amos.team2.WoundManagement.converter.BooleanToStringConverter;
import com.fau.amos.team2.WoundManagement.provider.CoreDataWoundDescriptionProvider;

	public CoreDataWoundDescriptionType getType() {
		return CoreDataWoundDescriptionType.enumOf(this.type);
	}

	public void setType(CoreDataWoundDescriptionType type) {
		this.type = type.toString();
	}

	public String getCharacterisation() {
		return characterisation;
	}

	public void setCharacterisation(String characterisation) {
		this.characterisation = characterisation;
	}

	public CoreDataWoundDescription getCoreDataWoundDescription() {
		return CoreDataWoundDescriptionProvider.getInstance().getByID(this.coreDataWoundDescriptionId);
	}

	public void setCoreDataWoundDescription(CoreDataWoundDescription coreDataWoundDescription) {
		this.coreDataWoundDescriptionId = coreDataWoundDescription.getId();
	}

	public boolean isFreeText() {
		return BooleanToStringConverter.convertBack(isFreeText);
	}

	public void setFreeText(boolean isFreeText) {
// Path: WoundManagement/src/main/java/com/fau/amos/team2/WoundManagement/converter/BooleanToStringConverter.java
// public class BooleanToStringConverter {
// 
// 		private static final String trueString = "j";
// 		private static final String falseString = "n";
// 
// 		private BooleanToStringConverter() {
// 			
// 		}
// 		
// 		public static String convert(boolean inputBoolean) {
// 			return inputBoolean ? trueString : falseString;
// 		}
// 		
// 		public static boolean convertBack(String inputString) {
// 			return inputString.equals(trueString);
// 		}
// 	
// }
// 
// Path: WoundManagement/src/main/java/com/fau/amos/team2/WoundManagement/provider/CoreDataWoundDescriptionProvider.java
// public class CoreDataWoundDescriptionProvider {
// 
// 	private static CoreDataWoundDescriptionProvider instance;
// 	
// 	private JPAContainer<CoreDataWoundDescription> cdWoundDescriptions;
// 	
// 	/**
// 	 * Constructs an empty <code>JPAContainer<CoreDataWoundDescription></code>
// 	 * and in this context an empty Database with the
// 	 * credentials of <code>Constants.PERSISTANCE_UNIT</code>
// 	 * 
// 	 * @see com.fau.amos.team2.WoundManagement.model.Constants
// 	 * @see persistence.xml
// 	 */
// 	private CoreDataWoundDescriptionProvider() {
// 		cdWoundDescriptions = JPAContainerFactory.make(CoreDataWoundDescription.class, Constants.PERSISTANCE_UNIT);
// 	}
// 	
// 	/**
// 	 * @return The instance of <code>CoreDataWoundDescriptionProvider</code> 
// 	 * */
// 	public static CoreDataWoundDescriptionProvider getInstance() {
// 		if(instance == null) {
// 			instance = new CoreDataWoundDescriptionProvider();
// 		}
// 		return instance;
// 	}
// 	
// 	/**
// 	 * Adds a CoreDataWoundDescription to the database
// 	 * 
// 	 * @param CoreDataWoundDescription
// 	 * @return the Id of the inserted CoreDataWoundDescription
// 	 */
// 	public Object add(CoreDataWoundDescription coreDataWoundDescription) {
// 		return cdWoundDescriptions.addEntity(coreDataWoundDescription);
// 	}
// 	
// 	/**
// 	 * Get all CoreDataWoundDescription from the database
// 	 * 
// 	 * @return JPAContainer containing all CoreDataWoundDescription
// 	 */
// 	public JPAContainer<CoreDataWoundDescription> getAll() {
// 		return cdWoundDescriptions;
// 	}
// 	/**
// 	 * Get the CoreDataWoundDescription with id from the database 
// 	 * 
// 	 * @param id - The unique id of a CoreDataWoundDescription
// 	 * @return instance of the according CoreDataWoundDescription, or null
// 	 */
// 	public CoreDataWoundDescription getByID(Object id) { 
// 		return cdWoundDescriptions.getItem(id).getEntity();
// 	}
// 	
// }


// Path: WoundManagement/src/main/java/com/fau/amos/team2/WoundManagement/model/CoreDataWoundDescription.java
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.fau.amos.team2.WoundManagement.converter.BooleanToStringConverter;
import com.fau.amos.team2.WoundManagement.provider.CoreDataWoundDescriptionProvider;


	public CoreDataWoundDescriptionType getType() {
		return CoreDataWoundDescriptionType.enumOf(this.type);
	}

	public void setType(CoreDataWoundDescriptionType type) {
		this.type = type.toString();
	}

	public String getCharacterisation() {
		return characterisation;
	}

	public void setCharacterisation(String characterisation) {
		this.characterisation = characterisation;
	}

	public CoreDataWoundDescription getCoreDataWoundDescription() {
		return CoreDataWoundDescriptionProvider.getInstance().getByID(this.coreDataWoundDescriptionId);
	}

	public void setCoreDataWoundDescription(CoreDataWoundDescription coreDataWoundDescription) {
		this.coreDataWoundDescriptionId = coreDataWoundDescription.getId();
	}

	public boolean isFreeText() {
		return BooleanToStringConverter.convertBack(isFreeText);
	}

	public void setFreeText(boolean isFreeText) {
		this.isFreeText = BooleanToStringConverter.convert(isFreeText);