<class name="QSqlField" doc="/**
&lt;p&gt;The &lt;a href=&quot;QSqlField.html#QSqlField(com.trolltech.qt.sql.QSqlField)&quot;&gt;&lt;tt&gt;QSqlField&lt;/tt&gt;&lt;/a&gt; class manipulates the fields in SQL database tables and views.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QSqlField.html#QSqlField(com.trolltech.qt.sql.QSqlField)&quot;&gt;&lt;tt&gt;QSqlField&lt;/tt&gt;&lt;/a&gt; represents the characteristics of a single column in a database table or view, such as the data type and column name. A field also contains the value of the database column, which can be viewed or changed.&lt;/p&gt;
&lt;p&gt;Field data values are stored as QVariants. Using an incompatible type is not permitted. For example:&lt;/p&gt;
&lt;pre&gt;        QSqlField field(&amp;quot;age&amp;quot;, QVariant::Int);
        field.setValue(QPixmap());  &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; WRONG&lt;/pre&gt;
&lt;p&gt;However, the field will attempt to cast certain data types to the field data type where possible:&lt;/p&gt;
&lt;pre&gt;        QSqlField field(&amp;quot;age&amp;quot;, QVariant::Int);
        field.setValue(QString(&amp;quot;123&amp;quot;));  &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; casts QString to int&lt;/pre&gt;
&lt;p&gt;&lt;a href=&quot;QSqlField.html#QSqlField(com.trolltech.qt.sql.QSqlField)&quot;&gt;&lt;tt&gt;QSqlField&lt;/tt&gt;&lt;/a&gt; objects are rarely created explicitly in application code. They are usually accessed indirectly through &lt;a href=&quot;QSqlRecord.html&quot;&gt;&lt;tt&gt;QSqlRecord&lt;/tt&gt;&lt;/a&gt;s that already contain a list of fields. For example:&lt;/p&gt;
&lt;pre&gt;        QSqlQuery query;
        ...
        QSqlRecord record = query.record();
        QSqlField field = record.field(&amp;quot;country&amp;quot;);&lt;/pre&gt;
&lt;p&gt;A &lt;a href=&quot;QSqlField.html#QSqlField(com.trolltech.qt.sql.QSqlField)&quot;&gt;&lt;tt&gt;QSqlField&lt;/tt&gt;&lt;/a&gt; object can provide some meta-data about the field, for example, its &lt;a href=&quot;QSqlField.html#name()&quot;&gt;&lt;tt&gt;name&lt;/tt&gt;&lt;/a&gt;, variant &lt;a href=&quot;QSqlField.html#type()&quot;&gt;&lt;tt&gt;type&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlField.html#length()&quot;&gt;&lt;tt&gt;length&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlField.html#precision()&quot;&gt;&lt;tt&gt;precision&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlField.html#defaultValue()&quot;&gt;&lt;tt&gt;defaultValue&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlField.html#typeID()&quot;&gt;&lt;tt&gt;typeID&lt;/tt&gt;&lt;/a&gt;, and its &lt;a href=&quot;QSqlField.html#requiredStatus()&quot;&gt;&lt;tt&gt;requiredStatus&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QSqlField.html#isGenerated()&quot;&gt;&lt;tt&gt;isGenerated&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QSqlField.html#isReadOnly()&quot;&gt;&lt;tt&gt;isReadOnly&lt;/tt&gt;&lt;/a&gt;. The field's data can be checked to see if it &lt;a href=&quot;QSqlField.html#isNull()&quot;&gt;&lt;tt&gt;isNull&lt;/tt&gt;&lt;/a&gt;, and its &lt;a href=&quot;QSqlField.html#value()&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt; retrieved. When editing the data can be set with &lt;a href=&quot;QSqlField.html#setValue(java.lang.Object)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt; or set to NULL with &lt;a href=&quot;QSqlField.html#clear()&quot;&gt;&lt;tt&gt;clear&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlRecord.html&quot;&gt;&lt;tt&gt;QSqlRecord&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QSqlField(java.lang.String fieldName, int type)" doc="/**
&lt;p&gt;Constructs an empty field called &lt;tt&gt;fieldName&lt;/tt&gt; of variant type &lt;tt&gt;type&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setRequiredStatus(com.trolltech.qt.sql.QSqlField.RequiredStatus)&quot;&gt;&lt;tt&gt;setRequiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setLength(int)&quot;&gt;&lt;tt&gt;setLength&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setPrecision(int)&quot;&gt;&lt;tt&gt;setPrecision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setDefaultValue(java.lang.Object)&quot;&gt;&lt;tt&gt;setDefaultValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setGenerated(boolean)&quot;&gt;&lt;tt&gt;setGenerated&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setReadOnly(boolean)&quot;&gt;&lt;tt&gt;setReadOnly&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QSqlField(java.lang.String fieldName)" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlField.html#QSqlField(com.trolltech.qt.sql.QSqlField)&quot;&gt;&lt;tt&gt;QSqlField&lt;/tt&gt;&lt;/a&gt;(&lt;tt&gt;fieldName&lt;/tt&gt;, QVariant::Invalid). */"/>
    <method name="public QSqlField()" doc="/**
&lt;p&gt;Equivalent to &lt;a href=&quot;QSqlField.html#QSqlField(com.trolltech.qt.sql.QSqlField)&quot;&gt;&lt;tt&gt;QSqlField&lt;/tt&gt;&lt;/a&gt;(QString(), QVariant::Invalid). */"/>
    <method name="public QSqlField(com.trolltech.qt.sql.QSqlField other)" doc="/**
&lt;p&gt;Constructs a copy of &lt;tt&gt;other&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final void clear()" doc="/**
&lt;p&gt;Clears the value of the field and sets it to NULL. If the field is read-only, nothing happens.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setValue(java.lang.Object)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#isReadOnly()&quot;&gt;&lt;tt&gt;isReadOnly&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#requiredStatus()&quot;&gt;&lt;tt&gt;requiredStatus&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.Object defaultValue()" doc="/**
&lt;p&gt;Returns the field's default value (which may be NULL).&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setDefaultValue(java.lang.Object)&quot;&gt;&lt;tt&gt;setDefaultValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#type()&quot;&gt;&lt;tt&gt;type&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#requiredStatus()&quot;&gt;&lt;tt&gt;requiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#length()&quot;&gt;&lt;tt&gt;length&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#precision()&quot;&gt;&lt;tt&gt;precision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#isGenerated()&quot;&gt;&lt;tt&gt;isGenerated&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isAutoValue()" doc="/**
&lt;p&gt;Returns true if the value is auto-generated by the database, for example auto-increment primary key values.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setAutoValue(boolean)&quot;&gt;&lt;tt&gt;setAutoValue&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isGenerated()" doc="/**
&lt;p&gt;Returns true if the field is generated; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setGenerated(boolean)&quot;&gt;&lt;tt&gt;setGenerated&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#type()&quot;&gt;&lt;tt&gt;type&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#requiredStatus()&quot;&gt;&lt;tt&gt;requiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#length()&quot;&gt;&lt;tt&gt;length&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#precision()&quot;&gt;&lt;tt&gt;precision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#defaultValue()&quot;&gt;&lt;tt&gt;defaultValue&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isNull()" doc="/**
&lt;p&gt;Returns true if the field's value is NULL; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#value()&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isReadOnly()" doc="/**
&lt;p&gt;Returns true if the field's value is read-only; otherwise returns false.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setReadOnly(boolean)&quot;&gt;&lt;tt&gt;setReadOnly&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#type()&quot;&gt;&lt;tt&gt;type&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#requiredStatus()&quot;&gt;&lt;tt&gt;requiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#length()&quot;&gt;&lt;tt&gt;length&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#precision()&quot;&gt;&lt;tt&gt;precision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#defaultValue()&quot;&gt;&lt;tt&gt;defaultValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#isGenerated()&quot;&gt;&lt;tt&gt;isGenerated&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final boolean isValid()" doc="/**
&lt;p&gt;Returns true if the field's variant type is valid; otherwise returns false.&lt;/p&gt;
 */"/>
    <method name="public final int length()" doc="/**
&lt;p&gt;Returns the field's length.&lt;/p&gt;
&lt;p&gt;If the returned value is negative, it means that the information is not available from the database.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setLength(int)&quot;&gt;&lt;tt&gt;setLength&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#type()&quot;&gt;&lt;tt&gt;type&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#requiredStatus()&quot;&gt;&lt;tt&gt;requiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#precision()&quot;&gt;&lt;tt&gt;precision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#defaultValue()&quot;&gt;&lt;tt&gt;defaultValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#isGenerated()&quot;&gt;&lt;tt&gt;isGenerated&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String name()" doc="/**
&lt;p&gt;Returns the name of the field.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setName(java.lang.String)&quot;&gt;&lt;tt&gt;setName&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int precision()" doc="/**
&lt;p&gt;Returns the field's precision; this is only meaningful for numeric types.&lt;/p&gt;
&lt;p&gt;If the returned value is negative, it means that the information is not available from the database.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setPrecision(int)&quot;&gt;&lt;tt&gt;setPrecision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#type()&quot;&gt;&lt;tt&gt;type&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#requiredStatus()&quot;&gt;&lt;tt&gt;requiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#length()&quot;&gt;&lt;tt&gt;length&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#defaultValue()&quot;&gt;&lt;tt&gt;defaultValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#isGenerated()&quot;&gt;&lt;tt&gt;isGenerated&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.sql.QSqlField.RequiredStatus requiredStatus()" doc="/**
&lt;p&gt;Returns true if this is a required field; otherwise returns false. An &lt;tt&gt;INSERT&lt;/tt&gt; will fail if a required field does not have a value.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setRequiredStatus(com.trolltech.qt.sql.QSqlField.RequiredStatus)&quot;&gt;&lt;tt&gt;setRequiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#type()&quot;&gt;&lt;tt&gt;type&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#length()&quot;&gt;&lt;tt&gt;length&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#precision()&quot;&gt;&lt;tt&gt;precision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#defaultValue()&quot;&gt;&lt;tt&gt;defaultValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#isGenerated()&quot;&gt;&lt;tt&gt;isGenerated&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setAutoValue(boolean autoVal)" doc="/**
&lt;p&gt;Marks the field as an auto-generated value if &lt;tt&gt;autoVal&lt;/tt&gt; is true.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#isAutoValue()&quot;&gt;&lt;tt&gt;isAutoValue&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setDefaultValue(java.lang.Object value)" doc="/**
&lt;p&gt;Sets the default value used for this field to &lt;tt&gt;value&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#defaultValue()&quot;&gt;&lt;tt&gt;defaultValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#value()&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setType(int)&quot;&gt;&lt;tt&gt;setType&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setRequiredStatus(com.trolltech.qt.sql.QSqlField.RequiredStatus)&quot;&gt;&lt;tt&gt;setRequiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setLength(int)&quot;&gt;&lt;tt&gt;setLength&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setPrecision(int)&quot;&gt;&lt;tt&gt;setPrecision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setGenerated(boolean)&quot;&gt;&lt;tt&gt;setGenerated&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setReadOnly(boolean)&quot;&gt;&lt;tt&gt;setReadOnly&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setGenerated(boolean gen)" doc="/**
&lt;p&gt;Sets the generated state. If &lt;tt&gt;gen&lt;/tt&gt; is false, no SQL will be generated for this field; otherwise, Qt classes such as &lt;a href=&quot;QSqlQueryModel.html&quot;&gt;&lt;tt&gt;QSqlQueryModel&lt;/tt&gt;&lt;/a&gt; and &lt;a href=&quot;QSqlTableModel.html&quot;&gt;&lt;tt&gt;QSqlTableModel&lt;/tt&gt;&lt;/a&gt; will generate SQL for this field.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#isGenerated()&quot;&gt;&lt;tt&gt;isGenerated&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setType(int)&quot;&gt;&lt;tt&gt;setType&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setRequiredStatus(com.trolltech.qt.sql.QSqlField.RequiredStatus)&quot;&gt;&lt;tt&gt;setRequiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setLength(int)&quot;&gt;&lt;tt&gt;setLength&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setPrecision(int)&quot;&gt;&lt;tt&gt;setPrecision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setDefaultValue(java.lang.Object)&quot;&gt;&lt;tt&gt;setDefaultValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setReadOnly(boolean)&quot;&gt;&lt;tt&gt;setReadOnly&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setLength(int fieldLength)" doc="/**
&lt;p&gt;Sets the field's length to &lt;tt&gt;fieldLength&lt;/tt&gt;. For strings this is the maximum number of characters the string can hold; the meaning varies for other types.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#length()&quot;&gt;&lt;tt&gt;length&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setType(int)&quot;&gt;&lt;tt&gt;setType&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setRequiredStatus(com.trolltech.qt.sql.QSqlField.RequiredStatus)&quot;&gt;&lt;tt&gt;setRequiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setPrecision(int)&quot;&gt;&lt;tt&gt;setPrecision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setDefaultValue(java.lang.Object)&quot;&gt;&lt;tt&gt;setDefaultValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setGenerated(boolean)&quot;&gt;&lt;tt&gt;setGenerated&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setReadOnly(boolean)&quot;&gt;&lt;tt&gt;setReadOnly&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setName(java.lang.String name)" doc="/**
&lt;p&gt;Sets the name of the field to &lt;tt&gt;name&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#name()&quot;&gt;&lt;tt&gt;name&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setPrecision(int precision)" doc="/**
&lt;p&gt;Sets the field's &lt;tt&gt;precision&lt;/tt&gt;. This only affects numeric fields.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#precision()&quot;&gt;&lt;tt&gt;precision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setType(int)&quot;&gt;&lt;tt&gt;setType&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setRequiredStatus(com.trolltech.qt.sql.QSqlField.RequiredStatus)&quot;&gt;&lt;tt&gt;setRequiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setLength(int)&quot;&gt;&lt;tt&gt;setLength&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setDefaultValue(java.lang.Object)&quot;&gt;&lt;tt&gt;setDefaultValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setGenerated(boolean)&quot;&gt;&lt;tt&gt;setGenerated&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setReadOnly(boolean)&quot;&gt;&lt;tt&gt;setReadOnly&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setReadOnly(boolean readOnly)" doc="/**
&lt;p&gt;Sets the read only flag of the field's value to &lt;tt&gt;readOnly&lt;/tt&gt;. A read-only field cannot have its value set with &lt;a href=&quot;QSqlField.html#setValue(java.lang.Object)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt; and cannot be cleared to NULL with &lt;a href=&quot;QSqlField.html#clear()&quot;&gt;&lt;tt&gt;clear&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#isReadOnly()&quot;&gt;&lt;tt&gt;isReadOnly&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setRequired(boolean required)" doc="/**
&lt;p&gt;Sets the required status of this field to &lt;a href=&quot;QSqlField.html#RequiredStatus-enum&quot;&gt;Required&lt;/tt&gt;&lt;/a&gt; if &lt;tt&gt;required&lt;/tt&gt; is true; otherwise sets it to &lt;a href=&quot;QSqlField.html#RequiredStatus-enum&quot;&gt;Optional&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setRequiredStatus(com.trolltech.qt.sql.QSqlField.RequiredStatus)&quot;&gt;&lt;tt&gt;setRequiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#requiredStatus()&quot;&gt;&lt;tt&gt;requiredStatus&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setRequiredStatus(com.trolltech.qt.sql.QSqlField.RequiredStatus status)" doc="/**
&lt;p&gt;Sets the required status of this field to &lt;tt&gt;status&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#requiredStatus()&quot;&gt;&lt;tt&gt;requiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setType(int)&quot;&gt;&lt;tt&gt;setType&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setLength(int)&quot;&gt;&lt;tt&gt;setLength&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setPrecision(int)&quot;&gt;&lt;tt&gt;setPrecision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setDefaultValue(java.lang.Object)&quot;&gt;&lt;tt&gt;setDefaultValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setGenerated(boolean)&quot;&gt;&lt;tt&gt;setGenerated&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setReadOnly(boolean)&quot;&gt;&lt;tt&gt;setReadOnly&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setSqlType(int type)" doc="/**
&lt;p&gt;&lt;/p&gt;
 */"/>
    <method name="public final void setType(int type)" doc="/**
&lt;p&gt;Set's the field's variant type to &lt;tt&gt;type&lt;/tt&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#type()&quot;&gt;&lt;tt&gt;type&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setRequiredStatus(com.trolltech.qt.sql.QSqlField.RequiredStatus)&quot;&gt;&lt;tt&gt;setRequiredStatus&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setLength(int)&quot;&gt;&lt;tt&gt;setLength&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setPrecision(int)&quot;&gt;&lt;tt&gt;setPrecision&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setDefaultValue(java.lang.Object)&quot;&gt;&lt;tt&gt;setDefaultValue&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setGenerated(boolean)&quot;&gt;&lt;tt&gt;setGenerated&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#setReadOnly(boolean)&quot;&gt;&lt;tt&gt;setReadOnly&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setValue(java.lang.Object value)" doc="/**
&lt;p&gt;Sets the value of the field to &lt;tt&gt;value&lt;/tt&gt;. If the field is read-only (&lt;a href=&quot;QSqlField.html#isReadOnly()&quot;&gt;&lt;tt&gt;isReadOnly&lt;/tt&gt;&lt;/a&gt; returns true), nothing happens.&lt;/p&gt;
&lt;p&gt;If the data type of &lt;tt&gt;value&lt;/tt&gt; differs from the field's current data type, an attempt is made to cast it to the proper type. This preserves the data type of the field in the case of assignment, e.g&amp;#x2e; a &lt;a href=&quot;%2E%2E/porting4.html#qstring&quot;&gt;&lt;tt&gt;QString&lt;/tt&gt;&lt;/a&gt; to an integer data type.&lt;/p&gt;
&lt;p&gt;To set the value to NULL, use &lt;a href=&quot;QSqlField.html#clear()&quot;&gt;&lt;tt&gt;clear&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#value()&quot;&gt;&lt;tt&gt;value&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#isReadOnly()&quot;&gt;&lt;tt&gt;isReadOnly&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QSqlField.html#defaultValue()&quot;&gt;&lt;tt&gt;defaultValue&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int type()" doc="/**
&lt;p&gt;Returns the field's type as stored in the database. Note that the actual value might have a different type, Numerical values that are too large to store in a long int or double are usually stored as strings to prevent precision loss.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setType(int)&quot;&gt;&lt;tt&gt;setType&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int typeID()" doc="/**
&lt;p&gt;&lt;/p&gt;
 */"/>
    <method name="public final java.lang.Object value()" doc="/**
&lt;p&gt;Returns the value of the field as a &lt;a href=&quot;%2E%2E/porting4.html#qvariant&quot;&gt;&lt;tt&gt;QVariant&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Use &lt;a href=&quot;QSqlField.html#isNull()&quot;&gt;&lt;tt&gt;isNull&lt;/tt&gt;&lt;/a&gt; to check if the field's value is NULL.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#setValue(java.lang.Object)&quot;&gt;&lt;tt&gt;setValue&lt;/tt&gt;&lt;/a&gt; */"/>
    <enum name="RequiredStatus" doc="/**
&lt;p&gt;Specifies whether the field is required or optional.&lt;/p&gt;

@see &lt;a href=&quot;QSqlField.html#requiredStatus()&quot;&gt;&lt;tt&gt;requiredStatus&lt;/tt&gt;&lt;/a&gt; */">
        <enum-value name="Unknown" doc="/**
&lt;p&gt;The database driver couldn't determine whether the field is required or optional.&lt;/p&gt;
 */"/>
        <enum-value name="Optional" doc="/**
&lt;p&gt;The fields doesn't have to be specified when inserting records.&lt;/p&gt;
 */"/>
        <enum-value name="Required" doc="/**
&lt;p&gt;The field must be specified when inserting records.&lt;/p&gt;
 */"/>
</enum>
</class>
