<commit_before>package org.helianto.order.domain;

import java.util.Date;

import javax.persistence.DiscriminatorValue;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.helianto.core.domain.Entity;
import org.helianto.document.domain.ProcessDocument;
import org.helianto.partner.domain.PrivateEntity;

import com.fasterxml.jackson.annotation.JsonBackReference;

/**
 * Contract.
 * 
 * @author mauriciofernandesdecastro
 */

@javax.persistence.Entity
@DiscriminatorValue("C")

public class Contract 
	extends Part 
{

	private static final long serialVersionUID = 1L;
	
	@JsonBackReference 
	@ManyToOne
	@JoinColumn(name="privateEntityId")
	private PrivateEntity privateEntity;
	
	@JsonBackReference 
	@ManyToOne
	@JoinColumn(name="processDocumentId")
	private ProcessDocument processDocument;
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date nextCheckDate;
	
	private Double currencyRate;
	
	private Double discountRate;
	
	private int createOrder;
	
	private int createOrderDay;
	
	public String getDiscriminator() {
		return "C";
	}

	/**
	 * Default constructor.
	 */
	public Contract() {
		super();
	}
	
	/**
	 * Key constructor.
	 * 
	 * @param entity
	 * @param docCode
	 */
	public Contract(Entity entity, String docCode) {
		this();
		setEntity(entity);
		setDocCode(docCode);
	}
	
	public PrivateEntity getPrivateEntity() {
		return privateEntity;
	}
	public void setPrivateEntity(PrivateEntity privateEntity) {
		this.privateEntity = privateEntity;
	}
	
	/**
	 * Date of contract expiration.
	 */
	public Date getNextCheckDate() {
		return nextCheckDate;
	}
	public void setNextCheckDate(Date nextCheckDate) {
		this.nextCheckDate = nextCheckDate;
	}
	
	/**
	 * Currency rate.
	 */
	public Double getCurrencyRate() {
		return currencyRate;<commit_msg>Contract.<commit_after>package org.helianto.order.domain;

import java.util.Date;

import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

import org.helianto.core.domain.Entity;
import org.helianto.core.domain.PublicEntity;
import org.helianto.document.domain.ProcessDocument;
import org.helianto.document.internal.AbstractVersionableContent;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * Contract.
 * 
 * @author mauriciofernandesdecastro
 */

@javax.persistence.Entity
@Table(name = "ord_contract", 
	uniqueConstraints = { @UniqueConstraint(columnNames = {"entityId", "docCode"})}
)
public class Contract 
	extends AbstractVersionableContent 
{

	private static final long serialVersionUID = 1L;
	
	@JsonIgnore 
	@ManyToOne
	@JoinColumn(name="privateEntityId")
	private PublicEntity publicEntity;
	
	@JsonIgnore
	@ManyToOne
	@JoinColumn(name="processDocumentId")
	private ProcessDocument processDocument;
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date nextCheckDate;
	
	private Double currencyRate;
	
	private Double discountRate;
	
	private int createOrder;
	
	private int createOrderDay;
	
	public String getDiscriminator() {
		return "C";
	}

	/**
	 * Default constructor.
	 */
	public Contract() {
		super();
	}
	
	/**
	 * Key constructor.
	 * 
	 * @param entity
	 * @param docCode
	 */
	public Contract(Entity entity, String docCode) {
		this();
		setEntity(entity);
		setDocCode(docCode);
	}
	
	public PublicEntity getPublicEntity() {
		return publicEntity;
	}
	public void setPublicEntity(PublicEntity publicEntity) {
		this.publicEntity = publicEntity;
	}
	
	/**
	 * Date of contract expiration.
	 */
	public Date getNextCheckDate() {
		return nextCheckDate;
	}
	public void setNextCheckDate(Date nextCheckDate) {
		this.nextCheckDate = nextCheckDate;
	}
	
	/**
	 * Currency rate.
	 */
	public Double getCurrencyRate() {
		return currencyRate;
{'fraction_non_alphanumeric': 0.099386816555953, 'fraction_numerical': 0.000510986203372509, 'mean_word_length': 4.706997084548105, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4436781', 'n_tokens_mistral': 1284, 'n_tokens_neox': 1177, 'n_words': 254}