JoinPair.java 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /**
  2. *
  3. */
  4. package com.primeton.dsp.datarelease.api.model;
  5. import org.apache.commons.lang.builder.ToStringBuilder;
  6. /**
  7. * @author zhaopx
  8. *
  9. */
  10. public class JoinPair {
  11. /**
  12. * left table
  13. */
  14. String left;
  15. /**
  16. * 左边表关联的字段
  17. */
  18. String leftField;
  19. /**
  20. * join type: inner_join,left_join,right_join, full_out_join;
  21. */
  22. String joinType;
  23. /**
  24. * 运算逻辑: =(等于),正常的JOIN都是等于。其他奇葩的 >(大于),<(小于),>=(大于或等于),<=(小于或等于),<> or !=(不等于)也理论支持。
  25. */
  26. String opera = "=";
  27. /**
  28. * right table
  29. */
  30. String right;
  31. /**
  32. * 右边表关联的字段
  33. */
  34. String rightField;
  35. /**
  36. *
  37. */
  38. public JoinPair() {
  39. }
  40. public JoinPair(String left, String joinType, String right) {
  41. super();
  42. this.left = left;
  43. this.joinType = joinType;
  44. this.right = right;
  45. }
  46. public JoinPair(String left, String leftField, String joinType, String right, String rightField) {
  47. this.left = left;
  48. this.leftField = leftField;
  49. this.joinType = joinType;
  50. this.right = right;
  51. this.rightField = rightField;
  52. }
  53. public String getLeft() {
  54. return left;
  55. }
  56. public String getRight() {
  57. return right;
  58. }
  59. public String getJoinType() {
  60. return joinType;
  61. }
  62. public void setJoinType(String joinType) {
  63. this.joinType = joinType;
  64. }
  65. public String getOpera() {
  66. return opera;
  67. }
  68. public void setOpera(String opera) {
  69. this.opera = opera;
  70. }
  71. public void setLeft(String left) {
  72. this.left = left;
  73. }
  74. public void setRight(String right) {
  75. this.right = right;
  76. }
  77. public String getLeftField() {
  78. return leftField;
  79. }
  80. public void setLeftField(String leftField) {
  81. this.leftField = leftField;
  82. }
  83. public String getRightField() {
  84. return rightField;
  85. }
  86. public void setRightField(String rightField) {
  87. this.rightField = rightField;
  88. }
  89. @Override
  90. public String toString(){
  91. return ToStringBuilder.reflectionToString(this);
  92. }
  93. }