/** * Creates a new Database using the configured information. */ public Database create() throws IOException { Database db = DatabaseImpl.create(_fileFormat, _mdbFile, _channel, _autoSync, _charset, _timeZone); if(_dbProps != null) { PropertyMap props = db.getDatabaseProperties(); props.putAll(_dbProps.values()); props.save(); } if(_summaryProps != null) { PropertyMap props = db.getSummaryProperties(); props.putAll(_summaryProps.values()); props.save(); } if(_userProps != null) { PropertyMap props = db.getUserDefinedProperties(); props.putAll(_userProps.values()); props.save(); } return db; }
private void saveColumnsDefaults(String[] defaults, Boolean[] required, Column cl, int j) throws IOException { PropertyMap map = cl.getProperties(); if (defaults != null && j < defaults.length && defaults[j] != null) { map.put(PropertyMap.DEFAULT_VALUE_PROP, DataType.TEXT, defaults[j]); } if (required != null && j < required.length && required[j] != null && !cl.isAutoNumber()) { map.put(PropertyMap.REQUIRED_PROP, DataType.BOOLEAN, required[j]); } map.save(); }
if(colProps != null) { newCol.getProperties().putAll(colProps.values()); getProperties().save();
newTable.getProperties().save();