/**
 * 
 */
package gov.va.med.esr.common.model.comms;

import gov.va.med.esr.common.model.lookup.EnrollmentPriorityGroup;
import gov.va.med.esr.common.model.lookup.EnrollmentPrioritySubGroup;
import gov.va.med.fw.model.AbstractKeyedEntity;


/**
 * @author DNS   THOMAS
 *
 */
public class BatchRequestPriortyGroup extends AbstractKeyedEntity implements Comparable<BatchRequestPriortyGroup> {

	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -5349759681771187651L;
	
	 private EnrollmentPriorityGroup priorityGroup = null;
     private EnrollmentPrioritySubGroup prioritySubGroup = null;
     private HandBookBatchRequest handBookBatchRequest = null;

	
	/*Column Name	ID	Pk	Null?	Data Type	Default	Histogram

			BATCH_REQUEST_PRIORITY_GRP_ID	1	1	N	NUMBER (20)		Yes
			STD_ENROLLMENTPRIORGRP_ID	2		N	NUMBER (20)		Yes
			STD_ENROLLMENTPRIORSGRP_ID	3		Y	NUMBER (20)		Yes
			HANDBOOK_BATCH_REQUEST_ID	4		N	NUMBER (20)		Yes
*/

  	 	public EnrollmentPriorityGroup getPriorityGroup() {
	        return this.priorityGroup;
	    }

	    public void setPriorityGroup(EnrollmentPriorityGroup priorityGroup) {
	        this.priorityGroup = priorityGroup;
	    }

	    public EnrollmentPrioritySubGroup getPrioritySubGroup() {
	        return this.prioritySubGroup;
	    }

	    public void setPrioritySubGroup(EnrollmentPrioritySubGroup prioritySubGroup) {
	        this.prioritySubGroup = prioritySubGroup;
	    }

		public HandBookBatchRequest getHandBookBatchRequest() {
			return handBookBatchRequest;
		}

		public void setHandBookBatchRequest(HandBookBatchRequest handBookBatchRequest) {
			this.handBookBatchRequest = handBookBatchRequest;
		}
		
		//Orders the objects in the order
		public int compareTo(BatchRequestPriortyGroup other)
		{
			int order = 0;
			if (getPriorityGroup() != null && other.getPriorityGroup() != null)
			{
				order = getPriorityGroup().compareTo(other.getPriorityGroup());
			}
			if (order == 0) {
				if (getPrioritySubGroup() != null && other.getPrioritySubGroup() != null)
					order = getPrioritySubGroup().compareTo(other.getPrioritySubGroup());
			}
			return order;
		}
}
