@Test public void testCreateExternallUserSt() { OracleUserAttributes.Builder external = new OracleUserAttributes.Builder(); external.setUserName("user1"); external.setAuth(OracleAuthentication.EXTERNAL); assertEquals("create user \"user1\" identified externally", createDefaultBuilder() .buildCreateUserSt(external.build()).toString()); external.setPassword(new GuardedString("myPassword".toCharArray())); try { createDefaultBuilder().buildCreateUserSt(external.build()); Assert.fail("Build for external authentication must fail when password is sent"); } catch (Exception e) { } createIgnorePasswordBuilder().buildCreateUserSt(external.build()); }
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);   }