@Test public void testCreateLocalUserSt() { try { createDefaultBuilder().buildCreateUserSt(new OracleUserAttributes.Builder().build()); Assert.fail("Not enough info, create must fail"); } catch (Exception e) { } OracleUserAttributes.Builder local = new OracleUserAttributes.Builder(); local.setUserName("user1"); local.setAuth(OracleAuthentication.LOCAL); assertEquals("create user \"user1\" identified by \"user1\"", createDefaultBuilder() .buildCreateUserSt(local.build()).toString()); local.setPassword(new GuardedString("password".toCharArray())); assertEquals("create user \"user1\" identified by \"password\"", createDefaultBuilder() .buildCreateUserSt(local.build()).toString()); local.setGlobalName("myGlobalName"); try { createDefaultBuilder().buildCreateUserSt(local.build()); Assert.fail("Must fail for extra globa name"); } catch (Exception e) { } }
String buildCreateUserSt(OracleUserAttributes userAttributes) { if (userAttributes.getUserName() == null) { throw new IllegalArgumentException("User not specified"); } String ddl = generateDDL(userAttributes, CreateOp.class, null); if (ddl == null || ddl.length() == 0) { return null; } StringBuilder builder = new StringBuilder(); builder.append("create user ").append(cs.formatToken(USER, userAttributes.getUserName())); builder.append(ddl); return builder.toString(); }
OracleCreateOrAlterStBuilder { String buildCreateUserSt(OracleUserAttributes userAttributes) { if (userAttributes.getUserName() == null) { throw new IllegalArgumentException("User not specified"); } String ddl = generateDDL(userAttributes, CreateOp.class, null); if (ddl == null || ddl.length() == 0) { return null; } StringBuilder builder = new StringBuilder(); builder.append("create user ").append(cs.formatToken(USER, userAttributes.getUserName())); builder.append(ddl); return builder.toString(); } }
OracleCreateOrAlterStBuilder { String buildCreateUserSt(OracleUserAttributes userAttributes) { if (userAttributes.getUserName() == null) { throw new IllegalArgumentException("User not specified"); } String ddl = generateDDL(userAttributes, CreateOp.class, null); if (ddl == null || ddl.length() == 0) { return null; } StringBuilder builder = new StringBuilder(); builder.append("create user ").append(cs.formatToken(USER, userAttributes.getUserName())); builder.append(ddl); return builder.toString(); } OracleCreateOrAlterStBuilder(OracleCaseSensitivitySetup cs, ConnectorMessages cm,
            ExtraAttributesPolicySetup extraAttributesPolicySetup);   OracleCreateOrAlterStBuilder(OracleConfiguration cfg); }
OracleCreateOrAlterStBuilder { String buildCreateUserSt(OracleUserAttributes userAttributes) { if (userAttributes.getUserName() == null) { throw new IllegalArgumentException("User not specified"); } String ddl = generateDDL(userAttributes, CreateOp.class, null); if (ddl == null || ddl.length() == 0) { return null; } StringBuilder builder = new StringBuilder(); builder.append("create user ").append(cs.formatToken(USER, userAttributes.getUserName())); builder.append(ddl); return builder.toString(); } OracleCreateOrAlterStBuilder(OracleCaseSensitivitySetup cs, ConnectorMessages cm,
            ExtraAttributesPolicySetup extraAttributesPolicySetup);   OracleCreateOrAlterStBuilder(OracleConfiguration cfg);  }
OracleCreateOrAlterStBuilder { String buildCreateUserSt(OracleUserAttributes userAttributes) { if (userAttributes.getUserName() == null) { throw new IllegalArgumentException("User not specified"); } String ddl = generateDDL(userAttributes, CreateOp.class, null); if (ddl == null || ddl.length() == 0) { return null; } StringBuilder builder = new StringBuilder(); builder.append("create user ").append(cs.formatToken(USER, userAttributes.getUserName())); builder.append(ddl); return builder.toString(); } OracleCreateOrAlterStBuilder(OracleCaseSensitivitySetup cs, ConnectorMessages cm,
            ExtraAttributesPolicySetup extraAttributesPolicySetup);   OracleCreateOrAlterStBuilder(OracleConfiguration cfg);   }