/*
|
* 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;
|
}
|
}
|