LotInfoConstants.java
package com.mycim.valueobject.consts;
import com.mycim.framework.utils.lang.StringUtils;
/**
* LotInfo Constants
*
* @author can.yang
*/
public class LotInfoConstants {
public static final String LOT_CATEGORY_C = "C";
public static final String LOT_CATEGORY_PM = "PM";
public static final String LOT_CATEGORY_D = "D";
private LotInfoConstants() {
}
public static boolean isCategoryC(String category) {
return StringUtils.isEqual(LOT_CATEGORY_C, category);
}
public static boolean isCategoryPM(String category) {
return StringUtils.isEqual(LOT_CATEGORY_PM, category);
}
public static boolean isCategoryD(String category) {
return StringUtils.isEqual(LOT_CATEGORY_D, category);
}
public enum SysType {
NORMAL, RUNCARD, AUTOMONITOR;
public static Boolean isRunCardLot(String sysType) {
return StringUtils.equals(RUNCARD.toString(), sysType);
}
public static Boolean isAutoMonitorLot(String sysType) {
return StringUtils.equals(AUTOMONITOR.toString(), sysType);
}
public static Boolean isNormalLot(String sysType) {
return StringUtils.equals(NORMAL.toString(), sysType) || StringUtils.isEmpty(sysType);
}
}
}