@Test public void testCreateTableSpace() { OracleUserAttributes.Builder attributes = new OracleUserAttributes.Builder(); attributes.setUserName("user1"); attributes.setDefaultTableSpace("users"); attributes.setTempTableSpace("temp"); attributes.setAuth(OracleAuthentication.LOCAL); attributes.setPassword(new GuardedString("password".toCharArray())); assertEquals( "create user \"user1\" identified by \"password\" default tablespace \"users\" temporary tablespace \"temp\"", createDefaultBuilder().buildCreateUserSt(attributes.build()).toString()); attributes.setProfile("MyProfile"); assertEquals( "create user \"user1\" identified by \"password\" default tablespace \"users\" temporary tablespace \"temp\" profile \"MyProfile\"", createDefaultBuilder().buildCreateUserSt(attributes.build()).toString()); }
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);   }