PageRenderTime 44ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/jira-project/jira-components/jira-core/src/main/java/com/atlassian/jira/model/querydsl/FieldConfigSchemeIssueTypeDTO.java

https://bitbucket.org/ahmed_bilal_360factors/jira7-core
Java | 128 lines | 85 code | 17 blank | 26 comment | 0 complexity | b517e3b0241673baa316a4f0180b284c MD5 | raw file
Possible License(s): Apache-2.0
  1. package com.atlassian.jira.model.querydsl;
  2. import com.atlassian.jira.ofbiz.FieldMap;
  3. import com.atlassian.jira.ofbiz.OfBizDelegator;
  4. import org.ofbiz.core.entity.GenericValue;
  5. import javax.annotation.Generated;
  6. /**
  7. * Data Transfer Object for the FieldConfigSchemeIssueType entity.
  8. * <p>
  9. * Generated by the JIRA Querydsl code generation tool - https://bitbucket.org/atlassian/jira-querydsl-codegen/
  10. * </p>
  11. *
  12. * @see QFieldConfigSchemeIssueType
  13. */
  14. @Generated("com.atlassian.jira.tool.querydsl.CodeGenerator")
  15. public class FieldConfigSchemeIssueTypeDTO implements DTO {
  16. private final Long id;
  17. private final String issuetype;
  18. private final Long fieldconfigscheme;
  19. private final Long fieldconfiguration;
  20. public Long getId() {
  21. return id;
  22. }
  23. public String getIssuetype() {
  24. return issuetype;
  25. }
  26. public Long getFieldconfigscheme() {
  27. return fieldconfigscheme;
  28. }
  29. public Long getFieldconfiguration() {
  30. return fieldconfiguration;
  31. }
  32. public FieldConfigSchemeIssueTypeDTO(Long id, String issuetype, Long fieldconfigscheme, Long fieldconfiguration) {
  33. this.id = id;
  34. this.issuetype = issuetype;
  35. this.fieldconfigscheme = fieldconfigscheme;
  36. this.fieldconfiguration = fieldconfiguration;
  37. }
  38. /**
  39. * Creates a GenericValue object from the values in this Data Transfer Object.
  40. * <p>
  41. * This can be useful when QueryDsl code needs to interact with legacy OfBiz code.
  42. * </p>
  43. *
  44. * @param ofBizDelegator OfBizDelegator will have makeValue() called on it.
  45. * @return a GenericValue object constructed from the values in this Data Transfer Object.
  46. */
  47. public GenericValue toGenericValue(final OfBizDelegator ofBizDelegator) {
  48. return ofBizDelegator.makeValue("FieldConfigSchemeIssueType", new FieldMap()
  49. .add("id", id)
  50. .add("issuetype", issuetype)
  51. .add("fieldconfigscheme", fieldconfigscheme)
  52. .add("fieldconfiguration", fieldconfiguration)
  53. );
  54. }
  55. /**
  56. * Constructs a new instance of this Data Transfer object from the values in the given GenericValue.
  57. * <p>
  58. * This can be useful when QueryDsl code needs to interact with legacy OfBiz code.
  59. * </p>
  60. *
  61. * @param gv the GenericValue
  62. * @return a new instance of this Data Transfer object with the values in the given GenericValue.
  63. */
  64. public static FieldConfigSchemeIssueTypeDTO fromGenericValue(GenericValue gv) {
  65. return new FieldConfigSchemeIssueTypeDTO(
  66. gv.getLong("id"),
  67. gv.getString("issuetype"),
  68. gv.getLong("fieldconfigscheme"),
  69. gv.getLong("fieldconfiguration")
  70. );
  71. }
  72. public static Builder builder() {
  73. return new Builder();
  74. }
  75. public static Builder builder(FieldConfigSchemeIssueTypeDTO fieldConfigSchemeIssueTypeDTO) {
  76. return new Builder(fieldConfigSchemeIssueTypeDTO);
  77. }
  78. public static class Builder {
  79. private Long id;
  80. private String issuetype;
  81. private Long fieldconfigscheme;
  82. private Long fieldconfiguration;
  83. public Builder() {
  84. }
  85. public Builder(FieldConfigSchemeIssueTypeDTO fieldConfigSchemeIssueTypeDTO) {
  86. this.id = fieldConfigSchemeIssueTypeDTO.id;
  87. this.issuetype = fieldConfigSchemeIssueTypeDTO.issuetype;
  88. this.fieldconfigscheme = fieldConfigSchemeIssueTypeDTO.fieldconfigscheme;
  89. this.fieldconfiguration = fieldConfigSchemeIssueTypeDTO.fieldconfiguration;
  90. }
  91. public FieldConfigSchemeIssueTypeDTO build() {
  92. return new FieldConfigSchemeIssueTypeDTO(id, issuetype, fieldconfigscheme, fieldconfiguration);
  93. }
  94. public Builder id(Long id) {
  95. this.id = id;
  96. return this;
  97. }
  98. public Builder issuetype(String issuetype) {
  99. this.issuetype = issuetype;
  100. return this;
  101. }
  102. public Builder fieldconfigscheme(Long fieldconfigscheme) {
  103. this.fieldconfigscheme = fieldconfigscheme;
  104. return this;
  105. }
  106. public Builder fieldconfiguration(Long fieldconfiguration) {
  107. this.fieldconfiguration = fieldconfiguration;
  108. return this;
  109. }
  110. }
  111. }