Kenmegne
6 days ago 8cbaa370347e6fc997381cf35d6c295685b90f98
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.megatim.dynamicjsonparser.pojo;
 
import java.util.ArrayList;
import java.util.List;
 
/**
 *
 * @author ASUS
 */
public class JsonField {
 
    private Class clazz;
 
    private final String name;
 
    private final String className;
 
    private int lengthh;
 
    private List<JsonField> dynamicFields = new ArrayList<>();
 
    private final boolean collection;
 
    private boolean required;
 
    private String formatDate;
 
    private String separateurDate;
 
    public JsonField(Class clazz, String name, String className, boolean collection) {
        this.clazz = clazz;
        this.name = name;
        this.className = className;
        this.collection = collection;
    }
 
    public JsonField(String name, List<JsonField> dynamicFields, String className, boolean collection) {
        this.name = name;
        this.dynamicFields = dynamicFields;
        this.className = className;
        this.collection = collection;
    }
 
    public JsonField(Class clazz, String name, String className, int lengthh, boolean required, boolean collection) {
        this.clazz = clazz;
        this.name = name;
        this.className = className;
        this.lengthh = lengthh;
        this.required = required;
        this.collection = collection;
    }
 
    public JsonField(String name, List<JsonField> dynamicFields, String className, int lengthh, boolean required, boolean collection) {
        this.name = name;
        this.dynamicFields = dynamicFields;
        this.className = className;
        this.lengthh = lengthh;
        this.required = required;
        this.collection = collection;
    }
 
    @Override
    public String toString() {
        return "DynamicField{" + "clazz=" + clazz + ", name=" + name + ", className=" + className + ", dynamicFields=" + dynamicFields + ", collection=" + collection + ", required=" + required + ", formatDate=" + formatDate + ", separateurDate=" + separateurDate + '}';
    }
 
    public Class getClazz() {
        return clazz;
    }
 
    public void setClazz(Class clazz) {
        this.clazz = clazz;
    }
 
    public String getName() {
        return name;
    }
 
    public String getClassName() {
        return className;
    }
 
    public List<JsonField> getDynamicFields() {
        return dynamicFields;
    }
 
    public void setDynamicFields(List<JsonField> dynamicFields) {
        this.dynamicFields = dynamicFields;
    }
 
    public boolean isCollection() {
        return collection;
    }
 
    public String getFormatDate() {
        return formatDate;
    }
 
    public void setFormatDate(String formatDate) {
        this.formatDate = formatDate;
    }
 
    public String getSeparateurDate() {
        return separateurDate;
    }
 
    public void setSeparateurDate(String separateurDate) {
        this.separateurDate = separateurDate;
    }
 
    public boolean isRequired() {
        return required;
    }
 
    public void setRequired(boolean required) {
        this.required = required;
    }
 
    public int getLengthh() {
        return lengthh;
    }
 
    public void setLengthh(int lengthh) {
        this.lengthh = lengthh;
    }
}