d8c7539ad6f019d524daacd8cf4b1d62096807d5.svn-base 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. package com.sysmodel.xformmodel.impl;
  2. import com.sysmodel.XFormFactory;
  3. import com.sysmodel.xformmodel.able.DojoInputType;
  4. import com.sysmodel.xformmodel.able.RegExp;
  5. import com.sysmodel.xformmodel.able.Validate;
  6. public class ValidateImpl implements Validate, Cloneable{
  7. private String dojoType = "";
  8. private String vType = "";
  9. private String regxValue = "";
  10. private String maxValue = "";
  11. private String minValue = "";
  12. private String maxLength = "";
  13. private String promptMessage = "";
  14. private String invalidMessage = "";
  15. private boolean isNeed = false;
  16. private boolean isTrim = false;
  17. public String getvType() {
  18. return vType;
  19. }
  20. public void setvType(String vType) {
  21. this.vType = vType;
  22. }
  23. public String getInvalidMessage() {
  24. return invalidMessage;
  25. }
  26. public void setInvalidMessage(String invalidMessage) {
  27. this.invalidMessage = invalidMessage;
  28. }
  29. public String getPromptMessage() {
  30. return promptMessage;
  31. }
  32. public void setPromptMessage(String promptMessage) {
  33. this.promptMessage = promptMessage;
  34. }
  35. public String getMaxLength() {
  36. return maxLength;
  37. }
  38. public void setMaxLength(String maxLength) {
  39. this.maxLength = maxLength;
  40. }
  41. public String getMaxValue() {
  42. return maxValue;
  43. }
  44. public void setMaxValue(String maxValue) {
  45. this.maxValue = maxValue;
  46. }
  47. public String getMinValue() {
  48. return minValue;
  49. }
  50. public void setMinValue(String minValue) {
  51. this.minValue = minValue;
  52. }
  53. public void setRegxValue(String regxValue) {
  54. this.regxValue = regxValue;
  55. }
  56. public String getDojoType() {
  57. return dojoType;
  58. }
  59. public String getRegxValue() {
  60. return regxValue;
  61. }
  62. public String getDojoShowType() {
  63. DojoInputType DojoInputTypeObj = XFormFactory.getXFormModel().getDojoInputTypeByCode(
  64. dojoType);
  65. if (DojoInputTypeObj == null)
  66. return "";
  67. else
  68. return DojoInputTypeObj.getValue();
  69. }
  70. public String getRegxShowValue() {
  71. RegExp RegExpObj = XFormFactory.getXFormModel().getRegExpByCode(regxValue);
  72. if (RegExpObj == null)
  73. return "";
  74. else
  75. return RegExpObj.getValue();
  76. }
  77. public void setDojoType(String dojoType) {
  78. this.dojoType = dojoType;
  79. }
  80. public boolean isNeed() {
  81. return isNeed;
  82. }
  83. public void setNeed(boolean isNeed) {
  84. this.isNeed = isNeed;
  85. }
  86. public boolean isTrim() {
  87. return isTrim;
  88. }
  89. public void setTrim(boolean isTrim) {
  90. this.isTrim = isTrim;
  91. }
  92. public Object clone() {
  93. ValidateImpl o = null;
  94. try {
  95. o = (ValidateImpl) super.clone();
  96. } catch (CloneNotSupportedException e) {
  97. e.printStackTrace();
  98. }
  99. return o;
  100. }
  101. }