Settings settings = new Settings(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
/** * @param settings could be null * @return a new instance of settings or null if settings was null. */ public static Settings copySettings( Settings settings ) { if ( settings == null ) { return null; } Settings clone = new Settings(); clone.setActiveProfiles( settings.getActiveProfiles() ); clone.setInteractiveMode( settings.isInteractiveMode() ); clone.setLocalRepository( settings.getLocalRepository() ); clone.setMirrors( settings.getMirrors() ); clone.setModelEncoding( settings.getModelEncoding() ); clone.setOffline( settings.isOffline() ); clone.setPluginGroups( settings.getPluginGroups() ); clone.setProfiles( settings.getProfiles() ); clone.setProxies( settings.getProxies() ); clone.setServers( settings.getServers() ); clone.setSourceLevel( settings.getSourceLevel() ); clone.setUsePluginRegistry( settings.isUsePluginRegistry() ); return clone; } }
/** * Gets the Maven {@link Settings} * * @return the {@link Settings} */ protected Settings getMavenSettings() { if (settings == null) { settings = new Settings(); } return settings; }
if (rebuildAtlas) { Settings settings = new Settings(); settings.maxWidth = 1024; settings.maxHeight = 1024; settings.duplicatePadding = false; settings.atlasExtension=""; ... }
private String generateSQLWithWhereInInline(String... businessGroupProcesses) { Settings settings = new Settings() .withStatementType(StatementType.STATIC_STATEMENT); return DSL.using(SQLDialect.ORACLE, settings); .selectDistinct( field(name("Business Group")).as("Business_Group")) .from(table(name("SOME_TABLE"))) .where(field(name("Business Group Process")) .in(businessGroupProcesses)) .getSQL(); }
// your class name function Settings() { this.initialized = false; } Settings.prototype.initialize = function() { this.initialized = true; } var settings = new Settings(); settings.initialize();
static private TheOnlySettings = null; static public getSettings() { if(TheOnlySettings == null) TheOnlySettings = new Settings(); //Legal, since it's inside the Settings class return TheOnlySettings; }
public static void main(String args[]){ System.out.println("Main Started"); settings = new Settings("config.properties"); String test = settings.getProperty("test"); String hello = settings.getProperty("hello"); // say you have another properties named config2.properties to read Settings another_settings = new Settings("config2.properties"); String xxx = settings.getProperty("xxx"); String yyy = settings.getProperty("yyy"); }
for (Query query : DSL.using(SQLDialect.H2, new Settings().withRenderFormatted()) .ddl(T_BOOK) .queries()) { System.out.println(query + ";\n"); }
@RequestMapping(method = RequestMethod.GET) public void loadSettings(Model model) { model.addAttribute("settings", new Settings()); model.addAttribute("settingsList", settingsService.getAllSettings(); }
Settings settings = new Settings(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
@Service public class MyDaoOrService { @Autowired private void DataSource dataSource; @Transactional public void doSomeJooq(){ Settings s = new Settings(); //You could instead put this jooq configuration xml s.getExecuteListeners().add("com.snaphop.jooq.SpringExceptionTranslationExecuteListener"); MyGeneratedFactory f = new MyGeneratedFactory(dataSource, s); f.select(); //etc } }
public class MyClass extends Context { public myMethod(){ new Settings(){ // the keyword this references to the Settings object instance, not MyClass object instance // to reference Context use MyClass.this // like Henry says below, make sure you use the new keyword to initialize objects AmbilWarnaDialog dialog = new AmbilWarnaDialog(MyClass.this, initialColor, new OnAmbilWarnaListener() {...} } }
Settings settings = new Settings(); settings.setStatementType(StatementType.STATIC_STATEMENT); DSLContext create = DSL.using(connection, dialect, settings); // [...]
Configuration config = new DefaultConfiguration(); config.set(new Settings().withRenderSchema(true)); DSL.using(config) .selectFrom(MYTABLE) .getSQL(true);
@Override public void onStart(final Intent intent, final int startId) { // final Settings settings = new Settings(this); final File parentDir = new File(settings.getDownloadsLocation() + "/", title); // }
public void actionPerformed(ActionEvent e) { JComboBox comboBox = (JComboBox)e.getSource(); String selectedRoute = (String)comboBox.getSelectedItem(); RootSelection r1=new RootSelection(); //Settings object Settings mySettings = new Settings(); mySettings.setRootName(selectedRoute); }
Settings settings = new Settings(); settings.setRenderSchema(false); // Omit schema rendering settings.setRenderNameStyle(RenderNameStyle.AS_IS); // Omit escaping names Factory factory = new Factory(SQLDialect.MYSQL, settings); String sql = factory.render(USER.ID);
public static FluentSettingsBuilder newSettings() { Settings settings = new Settings(); settings.setLocalRepository(getDefaultLocalRepository()); return new FluentSettingsBuilder(settings); }