// get the settings set as a container
XNameContainer xSettingsContainer =
(XNameContainer) UnoRuntime.queryInterface( XNameContainer.class, xSettingsSet);
// and get a factory interface for creating the entries
XSingleServiceFactory xSettingsFactory =
(XSingleServiceFactory) UnoRuntime.queryInterface(XSingleServiceFactory.class, xSettingsSet);
// now insert the individual settings
for (int i = 0; i < aSettings.length; ++i) {
// create a DataSourceSetting object
XPropertySet xSetting = (XPropertySet)
UnoRuntime.queryInterface( XPropertySet.class, xSettingsFactory.createInstance() );
// can set the value before inserting
xSetting.setPropertyValue( "Value", aSettings[i].Value );
// and now insert or replace as appropriate