git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/branches/mutateops@987
f203690c-595d-4dc9-a70b-
905162fa7fd2
/**
* Sets this index to be a primary key index (additionally sets the index as
- * unique).
+ * unique and required).
*/
public IndexBuilder setPrimaryKey() {
_type = IndexImpl.PRIMARY_KEY_INDEX_TYPE;
+ setRequired();
return setUnique();
}
return this;
}
+ /**
+ * Sets this index to encforce required.
+ */
+ public IndexBuilder setRequired() {
+ _flags |= IndexData.REQUIRED_INDEX_FLAG;
+ return this;
+ }
+
/**
* Sets this index to ignore null values.
*/