mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
QQQ-21: Added isRequired as a field metaData property
This commit is contained in:
@ -35,6 +35,7 @@ public class QFieldMetaData
|
|||||||
private String label;
|
private String label;
|
||||||
private String backendName;
|
private String backendName;
|
||||||
private QFieldType type;
|
private QFieldType type;
|
||||||
|
private boolean isRequired;
|
||||||
|
|
||||||
private Serializable defaultValue;
|
private Serializable defaultValue;
|
||||||
private String possibleValueSourceName;
|
private String possibleValueSourceName;
|
||||||
@ -220,6 +221,8 @@ public class QFieldMetaData
|
|||||||
return (this);
|
return (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
** Getter for defaultValue
|
** Getter for defaultValue
|
||||||
**
|
**
|
||||||
@ -253,4 +256,35 @@ public class QFieldMetaData
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Getter for isRequired
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public boolean getIsRequired()
|
||||||
|
{
|
||||||
|
return isRequired;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Setter for isRequired
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public void setIsRequired(boolean isRequired)
|
||||||
|
{
|
||||||
|
this.isRequired = isRequired;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public QFieldMetaData withIsRequired(boolean isRequired)
|
||||||
|
{
|
||||||
|
this.isRequired = isRequired;
|
||||||
|
return (this);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,7 @@ public class QFrontendFieldMetaData
|
|||||||
private String name;
|
private String name;
|
||||||
private String label;
|
private String label;
|
||||||
private QFieldType type;
|
private QFieldType type;
|
||||||
|
private boolean isRequired;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
// do not add setters. take values from the source-object in the constructor!! //
|
// do not add setters. take values from the source-object in the constructor!! //
|
||||||
@ -54,6 +55,7 @@ public class QFrontendFieldMetaData
|
|||||||
this.name = fieldMetaData.getName();
|
this.name = fieldMetaData.getName();
|
||||||
this.label = fieldMetaData.getLabel();
|
this.label = fieldMetaData.getLabel();
|
||||||
this.type = fieldMetaData.getType();
|
this.type = fieldMetaData.getType();
|
||||||
|
this.isRequired = fieldMetaData.getIsRequired();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -88,4 +90,15 @@ public class QFrontendFieldMetaData
|
|||||||
{
|
{
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Getter for isRequired
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public boolean getIsRequired()
|
||||||
|
{
|
||||||
|
return isRequired;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user