public Boolean getAllowsNull() { return getInternal().getAllowsNull(); }
public DatastoreProperty(DatastoreTable table, String javaType, DatastoreIdentifier identifier, ColumnMetaData colmd) { this.table = table; this.storedJavaType = javaType; this.storeMgr = table.getStoreManager(); setIdentifier(identifier); if (colmd == null) { // Create a default ColumnMetaData since none provided columnMetaData = new ColumnMetaData(); } else { columnMetaData = colmd; } // if not specified by the user the getAllowsNull is null isNullable = !Boolean.FALSE.equals(columnMetaData.getAllowsNull()); // Uniqueness if (columnMetaData.getUnique()) { // MetaData requires it to be unique throw new UnsupportedOperationException("No support for uniqueness constraints"); } }
if (colmd != null && colmd.getAllowsNull() == null) else if (colmd != null && colmd.getAllowsNull() != null)
private void checkSettingToNullValue(AbstractMemberMetaData mmd, Object value) { if (value == null) { if (mmd.getNullValue() == NullValue.EXCEPTION) { // JDO spec 18.15, throw XXXUserException when trying to store null and have handler set to EXCEPTION throw new NucleusUserException("Field/Property " + mmd.getFullFieldName() + " is null, but is mandatory as it's described in the jdo metadata"); } ColumnMetaData[] colmds = mmd.getColumnMetaData(); if (colmds != null && colmds.length > 0) { if (colmds[0].getAllowsNull() == Boolean.FALSE) { // Column specifically marked as not-nullable throw new NucleusDataStoreException("Field/Property " + mmd.getFullFieldName() + " is null, but the column is specified as not-nullable"); } } } }
if (columnMetaData.getAllowsNull() != null && columnMetaData.isAllowsNull())
if (colmd.getAllowsNull() != null) if (colmd.getAllowsNull() != null && colmd.isAllowsNull())
column = addDatastoreField(indexType.getName(), indexColumnName, indexMapping, colmd); if (colmd == null || (colmd.getAllowsNull() == null) || (colmd.getAllowsNull() != null && colmd.isAllowsNull())) {
length = colmd.getLength(); allowNulls = colmd.getAllowsNull(); if (!allowNulls) {
refDatastoreMapping.getColumn().copyConfigurationTo(refColumn); if ((colmd.getAllowsNull() == null) || (colmd.getAllowsNull() != null && colmd.isAllowsNull()))
if (colmd == null || (colmd.getAllowsNull() == null) || (colmd.getAllowsNull() != null && colmd.isAllowsNull()))
length = colmd.getLength(); allowNulls = colmd.getAllowsNull(); if (!allowNulls) {
refDatastoreMapping.getDatastoreField().copyConfigurationTo(refColumn); if ((colmd.getAllowsNull() == null) || (colmd.getAllowsNull() != null && colmd.isAllowsNull())) {