UnionServiceAdapter.java 685 Bytes
/**
 * 
 */
package com.yoho.unions.adapter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.yoho.unions.common.enums.UnionTypeEnum;

/**
 * 描述:
 * 对联盟类型进行适配
 * @author ping.huang
 * 2016年3月10日
 */
public class UnionServiceAdapter {
	
	static Logger log = LoggerFactory.getLogger(UnionServiceAdapter.class);

	/**
	 * 根据联盟传入的类型,查找具体的实现枚举
	 * @param unionType
	 * @return
	 * @throws Exception
	 */
	public static UnionTypeEnum getUnionService(int unionType) {
		UnionTypeEnum union = UnionTypeEnum.getSourceEnumByValue(unionType);
		if (union == null) {
			return null;
		}
		return union;
	}
}