<commit_before>package com.servinglynk.hmis.warehouse.model.v2017;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.ColumnTransformer;
import org.hibernate.annotations.Type;
import org.hibernate.proxy.HibernateProxy;

import com.servinglynk.hmis.warehouse.enums.ClientDobDataQualityEnum;
import com.servinglynk.hmis.warehouse.enums.ClientEthnicityEnum;
import com.servinglynk.hmis.warehouse.enums.ClientGenderEnum;
import com.servinglynk.hmis.warehouse.enums.ClientNameDataQualityEnum;
import com.servinglynk.hmis.warehouse.enums.ClientRaceEnum;
import com.servinglynk.hmis.warehouse.enums.ClientSsnDataQualityEnum;
import com.servinglynk.hmis.warehouse.enums.ClientVeteranStatusEnum;


/**
 * Object mapping for hibernate-handled table: client.
 *
 *
 * @author <NAME>
 */
@Entity (name = "client")
@Table(name = "client", catalog = "hmis", schema = "v2017")
/*@Indexed
@AnalyzerDef(name="clientAnalyzer", tokenizer=@TokenizerDef(factory=LowerCaseTokenizerFactory.class))*/
public class Client extends HmisBaseModel implements Cloneable, Serializable {

	/** Serial Version UID. */
	private static final long serialVersionUID = 6304318647555713317L;

	/** Use a WeakHashMap so entries will be garbage collected once all entities
		referring to a saved hash are garbage collected themselves. */
	private static final Map<Serializable, java.util.UUID> SAVED_HASHES =
		Collections.synchronizedMap(new WeakHashMap<Serializable, java.util.UUID>());

	/** hashCode temporary storage. */
	private volatile java.util.UUID hashCode;

	/** Field mapping. */
	private LocalDateTime dob;
	/** Field mapping. */
	private ClientDobDataQualityEnum dobDataQuality;
	/** Field mapping. */
	private ClientEthnicityEnum ethnicity;
	/** Field mapping. */
	private String firstName;
	/** Field mapping. */
	private ClientGenderEnum gender;
	/** Field mapping. */
	private java.util.UUID id;
	/** Field mapping. */
	private String lastName;
	/** Field mapping. */
	private String middleName;
	/** Field mapping. */
	private ClientNameDataQualityEnum nameDataQuality;
	/** Field mapping. */
	private String nameSuffix;
	/** Field mapping. */
	private ClientRaceEnum race;
	/** Field mapping. */
	private String ssn;
	/** Field mapping. */
	private ClientSsnDataQualityEnum ssnDataQuality;

	/** Field mapping. */
	private Set<ClientVeteranInfo> veteranInfoes = new HashSet<ClientVeteranInfo>();
	/** Field mapping. */
	private Set<Enrollment> enrollments = new HashSet<Enrollment>();

	/** Field mapping. */
	private ClientVeteranStatusEnum veteranStatus;
	/**
	 * Default constructor, mainly for hibernate use.
	 */
	public Client() {
		// Default constructor
	}

	/** Constructor taking a given ID.
	 * @param id to set
	 */
	public Client(java.util.UUID id) {
		this.id = id;
	}

	

		/** Field mapping. */
		protected Export export;
		 /**
		 * Return the value associated with the column: export.
		 * @return A Export object (this.export)
		 */
		@ManyToOne( cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY )
		@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE})
		@Basic( optional = true )
		@JoinColumn(name = "export_id", nullable = true )
		public Export getExport() {
			return this.export;

		}



		 /**
		 * Set the value related to the column: export.
		 * @param export the export value you wish to set
		 */
		public void setExport(final Export export) {
			this.export = export;
		}
	/** Return the type of this class. Useful for when dealing with proxies.
	* @return Defining class.
	*/
	@Transient
	public Class<?> getClassType() {
		return Client.class;
	}


	 /**
	 * Return the value associated with the column: dob.
	 * @return A LocalDateTime object (this.dob)
	 */
	@Type(type="org.jadira.usertype.dateandtime.threeten.PersistentLocalDateTime")
	@Basic( optional = true )
	@Column
	@ColumnTransformer(
			read="convert_from(dob_decrypt(dob),'UTF-8')",
			write="dob_encrypt(?)")
	public LocalDateTime getDob() {
		return this.dob;

	}



	 /**
	 * Set the value related to the column: dob.
	 * @param dob the dob value you wish to set
	 */
	public void setDob(final LocalDateTime dob) {
		this.dob = dob;
	}

	 /**
	 * Return the value associated with the column: dobDataQuality.
	 * @return A ClientDobDataQualityEnum object (this.dobDataQuality)
	 */
	@Type(type="com.servinglynk.hmis.warehouse.enums.ClientDobDataQualityEnumType")
	@Basic( optional = true )
	@Column( name = "dob_data_quality"  )
	public ClientDobDataQualityEnum getDobDataQuality() {
		return this.dobDataQuality;

	}



	 /**
	 * Set the value related to the column: dobDataQuality.
	 * @param dobDataQuality the dobDataQuality value you wish to set
	 */
	public void setDobDataQuality(final ClientDobDataQualityEnum dobDataQuality) {
		this.dobDataQuality = dobDataQuality;
	}

	 /**
	 * Return the value associated with the column: ethnicity.
	 * @return A ClientEthnicityEnum object (this.ethnicity)<commit_msg> 2017 adding dedup id to the client table<commit_after>package com.servinglynk.hmis.warehouse.model.v2017;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.ColumnTransformer;
import org.hibernate.annotations.Type;
import org.hibernate.proxy.HibernateProxy;

import com.servinglynk.hmis.warehouse.enums.ClientDobDataQualityEnum;
import com.servinglynk.hmis.warehouse.enums.ClientEthnicityEnum;
import com.servinglynk.hmis.warehouse.enums.ClientGenderEnum;
import com.servinglynk.hmis.warehouse.enums.ClientNameDataQualityEnum;
import com.servinglynk.hmis.warehouse.enums.ClientRaceEnum;
import com.servinglynk.hmis.warehouse.enums.ClientSsnDataQualityEnum;
import com.servinglynk.hmis.warehouse.enums.ClientVeteranStatusEnum;


/**
 * Object mapping for hibernate-handled table: client.
 *
 *
 * @author <NAME>
 */
@Entity (name = "client")
@Table(name = "client", catalog = "hmis", schema = "v2017")
/*@Indexed
@AnalyzerDef(name="clientAnalyzer", tokenizer=@TokenizerDef(factory=LowerCaseTokenizerFactory.class))*/
public class Client extends HmisBaseModel implements Cloneable, Serializable {

	/** Serial Version UID. */
	private static final long serialVersionUID = 6304318647555713317L;

	/** Use a WeakHashMap so entries will be garbage collected once all entities
		referring to a saved hash are garbage collected themselves. */
	private static final Map<Serializable, java.util.UUID> SAVED_HASHES =
		Collections.synchronizedMap(new WeakHashMap<Serializable, java.util.UUID>());

	/** hashCode temporary storage. */
	private volatile java.util.UUID hashCode;

	/** Field mapping. */
	private java.util.UUID dedupClientId;
	/** Field mapping. */
	private LocalDateTime dob;
	/** Field mapping. */
	private ClientDobDataQualityEnum dobDataQuality;
	/** Field mapping. */
	private ClientEthnicityEnum ethnicity;
	/** Field mapping. */
	private String firstName;
	/** Field mapping. */
	private ClientGenderEnum gender;
	/** Field mapping. */
	private java.util.UUID id;
	/** Field mapping. */
	private String lastName;
	/** Field mapping. */
	private String middleName;
	/** Field mapping. */
	private ClientNameDataQualityEnum nameDataQuality;
	/** Field mapping. */
	private String nameSuffix;
	/** Field mapping. */
	private ClientRaceEnum race;
	/** Field mapping. */
	private String ssn;
	/** Field mapping. */
	private ClientSsnDataQualityEnum ssnDataQuality;

	/** Field mapping. */
	private Set<ClientVeteranInfo> veteranInfoes = new HashSet<ClientVeteranInfo>();
	/** Field mapping. */
	private Set<Enrollment> enrollments = new HashSet<Enrollment>();

	/** Field mapping. */
	private ClientVeteranStatusEnum veteranStatus;
	/**
	 * Default constructor, mainly for hibernate use.
	 */
	public Client() {
		// Default constructor
	}

	/** Constructor taking a given ID.
	 * @param id to set
	 */
	public Client(java.util.UUID id) {
		this.id = id;
	}

	

		/** Field mapping. */
		protected Export export;
		 /**
		 * Return the value associated with the column: export.
		 * @return A Export object (this.export)
		 */
		@ManyToOne( cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY )
		@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE})
		@Basic( optional = true )
		@JoinColumn(name = "export_id", nullable = true )
		public Export getExport() {
			return this.export;

		}



		 /**
		 * Set the value related to the column: export.
		 * @param export the export value you wish to set
		 */
		public void setExport(final Export export) {
			this.export = export;
		}
	/** Return the type of this class. Useful for when dealing with proxies.
	* @return Defining class.
	*/
	@Transient
	public Class<?> getClassType() {
		return Client.class;
	}


	 /**
	 * Return the value associated with the column: dob.
	 * @return A LocalDateTime object (this.dob)
	 */
	@Type(type="org.jadira.usertype.dateandtime.threeten.PersistentLocalDateTime")
	@Basic( optional = true )
	@Column
	@ColumnTransformer(
			read="convert_from(dob_decrypt(dob),'UTF-8')",
			write="dob_encrypt(?)")
	public LocalDateTime getDob() {
		return this.dob;

	}



	 /**
	 * Set the value related to the column: dob.
	 * @param dob the dob value you wish to set
	 */
	public void setDob(final LocalDateTime dob) {
		this.dob = dob;
	}

	 /**
	 * Return the value associated with the column: dobDataQuality.
	 * @return A ClientDobDataQualityEnum object (this.dobDataQuality)
	 */
	@Type(type="com.servinglynk.hmis.warehouse.enums.ClientDobDataQualityEnumType")
	@Basic( optional = true )
	@Column( name = "dob_data_quality"  )
	public ClientDobDataQualityEnum getDobDataQuality() {
		return this.dobDataQuality;

	}



	 /**
	 * Set the value related to the column: dobDataQuality.
	 * @param dobDataQuality the dobDataQuality value you wish to set
	 */
	public void setDobDataQuality(final ClientDobDataQualityEnum dobDataQuality) {
		this.dobDataQuality = dobDataQuality;
	}

	 /**
		 * Return the value associated with the column: dedupClientId.
		 * @return A java.util.UUID object (this.dedupClientId)
		 */
		@Basic( optional = true )
		@Column( name = "dedup_client_id"  ) @org.hibernate.annotations.Type(type="org.hibernate.type.PostgresUUIDType")
		public java.util.UUID getDedupClientId() {
			return this.dedupClientId;
			
		}
		

	 
		 /**  
		 * Set the value related to the column: dedupClientId.
		 * @param dedupClientId the dedupClientId value you wish to set
		 */
		public void setDedupClientId(final java.util.UUID dedupClientId) {
			this.dedupClientId = dedupClientId;
		}
	 

	 /**
	 * Return the value associated with the column: ethnicity.
	 * @return A ClientEthnicityEnum object (this.ethnicity)
{'fraction_non_alphanumeric': 0.11034423994546694, 'fraction_numerical': 0.005112474437627812, 'mean_word_length': 4.332576101771922, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6651598', 'n_tokens_mistral': 3958, 'n_tokens_neox': 3616, 'n_words': 929}