package com.sysmodel.xformmodel.impl; import com.sysmodel.XFormFactory; import com.sysmodel.xformmodel.able.DojoInputType; import com.sysmodel.xformmodel.able.RegExp; import com.sysmodel.xformmodel.able.Validate; public class ValidateImpl implements Validate, Cloneable{ private String dojoType = ""; private String vType = ""; private String regxValue = ""; private String maxValue = ""; private String minValue = ""; private String maxLength = ""; private String promptMessage = ""; private String invalidMessage = ""; private boolean isNeed = false; private boolean isTrim = false; public String getvType() { return vType; } public void setvType(String vType) { this.vType = vType; } public String getInvalidMessage() { return invalidMessage; } public void setInvalidMessage(String invalidMessage) { this.invalidMessage = invalidMessage; } public String getPromptMessage() { return promptMessage; } public void setPromptMessage(String promptMessage) { this.promptMessage = promptMessage; } public String getMaxLength() { return maxLength; } public void setMaxLength(String maxLength) { this.maxLength = maxLength; } public String getMaxValue() { return maxValue; } public void setMaxValue(String maxValue) { this.maxValue = maxValue; } public String getMinValue() { return minValue; } public void setMinValue(String minValue) { this.minValue = minValue; } public void setRegxValue(String regxValue) { this.regxValue = regxValue; } public String getDojoType() { return dojoType; } public String getRegxValue() { return regxValue; } public String getDojoShowType() { DojoInputType DojoInputTypeObj = XFormFactory.getXFormModel().getDojoInputTypeByCode( dojoType); if (DojoInputTypeObj == null) return ""; else return DojoInputTypeObj.getValue(); } public String getRegxShowValue() { RegExp RegExpObj = XFormFactory.getXFormModel().getRegExpByCode(regxValue); if (RegExpObj == null) return ""; else return RegExpObj.getValue(); } public void setDojoType(String dojoType) { this.dojoType = dojoType; } public boolean isNeed() { return isNeed; } public void setNeed(boolean isNeed) { this.isNeed = isNeed; } public boolean isTrim() { return isTrim; } public void setTrim(boolean isTrim) { this.isTrim = isTrim; } public Object clone() { ValidateImpl o = null; try { o = (ValidateImpl) super.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } return o; } }