package itn.com.cmm.util;


/**
 * 프로그램 파일명 : Order.java
 * 
 * 프로그램 설명 : 쿼리에서 정렬방법을 정의하는 클래스
 * 
 * 작 성 자 : jeong hoon hee
 * 
 * 작 성 일 : 2013. 6. 7.
 * 
 * Copyright(c) 2013 DAEYOON Co. Ltd. All rights reserved.
 */
public class Order {

	private String columnName;
	private String orderType;

	public Order() {
		super();
		// TODO Auto-generated constructor stub
	}

	public Order(String columnName, String orderType) {
		super();
		this.columnName = columnName;
		this.orderType = orderType;
	}

	public static Order asc(String columnName) {
		Order order = new Order();
		order.setColumnName(columnName);
		order.setOrderType("ASC");
		return order;
	}

	public static Order desc(String columnName) {
		Order order = new Order();
		order.setColumnName(columnName);
		order.setOrderType("DESC");
		return order;
	}

	public String getColumnName() {
		return columnName;
	}

	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}

	public String getOrderType() {
		return orderType;
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}
}
