public ColumnMetadata setAllowsNull(boolean flag) { getInternal().setAllowsNull(flag); return this; }
/** * Convenience method to get the column metadata for annotation values of a @Column. * @param annotationValues The values for the annotation * @return The MetaData for the column */ public static ColumnMetaData getColumnMetaDataForAnnotations(Map<String, Object> annotationValues) { ColumnMetaData colmd = new ColumnMetaData(); colmd.setName((String)annotationValues.get("name")); colmd.setTarget((String)annotationValues.get("target")); colmd.setTargetMember((String)annotationValues.get("targetField")); colmd.setJdbcType((String)annotationValues.get("jdbcType")); colmd.setSqlType((String)annotationValues.get("sqlType")); colmd.setLength((Integer)annotationValues.get("length")); colmd.setScale((Integer)annotationValues.get("scale")); colmd.setAllowsNull((String)annotationValues.get("allowsNull")); colmd.setDefaultValue((String)annotationValues.get("defaultValue")); colmd.setInsertValue((String)annotationValues.get("insertValue")); if (annotationValues.containsKey("position")) { colmd.setPosition((Integer)annotationValues.get("position")); } addExtensionsToMetaData(colmd, (Extension[])annotationValues.get("extensions")); return colmd; }
colmd.setAllowsNull(new Boolean(apmd.isPrimaryKey() ? false : colmd.isAllowsNull()));
colmd.setAllowsNull(Boolean.valueOf(false)); colmd.setAllowsNull(Boolean.valueOf(true)); colmd.setAllowsNull(Boolean.valueOf(false));
colmd.setLength(length); colmd.setScale(scale); colmd.setAllowsNull(allowsNull); colmd.setDefaultValue(defaultValue); colmd.setInsertValue(insertValue); colmd.setAllowsNull(new Boolean(apmd.isPrimaryKey() ? false : colmd.isAllowsNull())); colmd.setAllowsNull(colmd.isAllowsNull());
colmd.setLength(length); colmd.setScale(scale); colmd.setAllowsNull(allowsNull); colmd.setDefaultValue(defaultValue); colmd.setInsertValue(insertValue);
columnMetaData[j].setName(cols[j].name()); columnMetaData[j].setTarget(cols[j].referencedColumnName()); columnMetaData[j].setAllowsNull(cols[j].nullable()); columnMetaData[j].setInsertable(cols[j].insertable()); columnMetaData[j].setUpdateable(cols[j].updatable()); columnMetaData[0].setName((String)annotationValues.get("name")); columnMetaData[0].setTarget((String)annotationValues.get("referencedColumnName")); columnMetaData[0].setAllowsNull(colNullable); columnMetaData[0].setInsertable(colInsertable); columnMetaData[0].setUpdateable(colUpdateable); colmd.setName(joinColumns.get(j).name()); colmd.setTarget(joinColumns.get(j).referencedColumnName()); colmd.setAllowsNull(joinColumns.get(j).nullable()); joinmd.addColumn(colmd); colmd.setName(elementColumns.get(j).name()); colmd.setTarget(elementColumns.get(j).referencedColumnName()); colmd.setAllowsNull(elementColumns.get(j).nullable()); aemd.addColumn(colmd); colmd.setName(joinColumns.get(j).name()); colmd.setTarget(joinColumns.get(j).referencedColumnName()); colmd.setAllowsNull(joinColumns.get(j).nullable()); joinmd.addColumn(colmd); colmd.setAllowsNull(colNullable); colmd.setInsertable(colInsertable);
colmd.setLength(col.length()); colmd.setScale(col.scale()); colmd.setAllowsNull(col.nullable()); colmd.setInsertable(col.insertable()); colmd.setUpdateable(col.updatable()); colmd.setLength(col.length()); colmd.setScale(col.scale()); colmd.setAllowsNull(col.nullable()); colmd.setInsertable(col.insertable()); colmd.setUpdateable(col.updatable()); colmd.setName(cols[k].name()); colmd.setTarget(cols[k].referencedColumnName()); colmd.setAllowsNull(cols[k].nullable()); colmd.setInsertable(cols[k].insertable()); colmd.setUpdateable(cols[k].updatable()); colmd.setName(cols[k].name()); colmd.setTarget(cols[k].referencedColumnName()); colmd.setAllowsNull(cols[k].nullable()); colmd.setInsertable(cols[k].insertable()); colmd.setUpdateable(cols[k].updatable());
colmd.setLength(length); colmd.setScale(scale); colmd.setAllowsNull(col.allowsNull()); colmd.setDefaultValue(col.defaultValue()); colmd.setInsertValue(col.insertValue());
colmd.setAllowsNull(Boolean.TRUE); // Allow for elements not in any discriminated collection fkDiscrimMapping = storeMgr.getMappingManager().getMapping(String.class); // Only support String discriminators currently fkDiscrimMapping.setTable(this); colmd.setAllowsNull(Boolean.TRUE); // Allow for elements not in any discriminated collection fkDiscrimMapping = storeMgr.getMappingManager().getMapping(String.class); // Only support String discriminators currently fkDiscrimMapping.setTable(this);
columnMetaData.setAllowsNull(Boolean.valueOf(colmd.isAllowsNull()));
colmd.setAllowsNull(getAttr(attrs, "nullable")); colmd.setInsertable(getAttr(attrs, "insertable")); colmd.setUpdateable(getAttr(attrs, "updatable")); colmd.setLength(getAttr(attrs, "length")); colmd.setScale(getAttr(attrs, "scale")); colmd.setAllowsNull(getAttr(attrs, "nullable")); colmd.setInsertable(getAttr(attrs, "insertable")); colmd.setUpdateable(getAttr(attrs, "updatable")); colmd.setAllowsNull(getAttr(attrs, "nullable")); colmd.setInsertable(getAttr(attrs, "insertable")); colmd.setUpdateable(getAttr(attrs, "updatable")); colmd.setName(getAttr(attrs, "name")); colmd.setTarget(getAttr(attrs, "referenced-column-name")); colmd.setAllowsNull(getAttr(attrs, "nullable")); colmd.setInsertable(getAttr(attrs, "insertable")); colmd.setUpdateable(getAttr(attrs, "updatable")); colmd.setName(getAttr(attrs, "name")); colmd.setTarget(getAttr(attrs, "referenced-column-name")); colmd.setAllowsNull(getAttr(attrs, "nullable")); colmd.setInsertable(getAttr(attrs, "insertable")); colmd.setUpdateable(getAttr(attrs, "updatable")); colmd.setName(getAttr(attrs, "name")); colmd.setTarget(getAttr(attrs, "referenced-column-name")); colmd.setAllowsNull(getAttr(attrs, "nullable"));
colmd.setAllowsNull(Boolean.TRUE); // Allow for elements not in any discriminated collection (when not PK)
colmd.setLength(getAttr(attrs, "length")); colmd.setScale(getAttr(attrs, "scale")); colmd.setAllowsNull(getAttr(attrs, "allows-null")); colmd.setDefaultValue(getAttr(attrs, "default-value")); colmd.setInsertValue(getAttr(attrs, "insert-value"));
disColmd.setAllowsNull(Boolean.TRUE);