提交 6241e834 编写于 作者: S serge-rider

Oracle schema reading check


Former-commit-id: 92a10393
上级 76e796c1
......@@ -68,8 +68,7 @@ public class OracleSchemaManager extends SQLObjectEditor<OracleSchema, OracleDat
if (dialog.open() != IDialogConstants.OK_ID) {
return null;
}
OracleSchema newSchema = new OracleSchema(parent, null);
newSchema.setName(dialog.getUser().getName());
OracleSchema newSchema = new OracleSchema(parent, -1, dialog.getUser().getName());
newSchema.setUser(dialog.getUser());
return newSchema;
......
......@@ -74,25 +74,23 @@ public class OracleSchema extends OracleGlobalObject implements DBSSchema, DBPRe
private Date createTime;
private transient OracleUser user;
OracleSchema(OracleDataSource dataSource, long id, String name)
public OracleSchema(OracleDataSource dataSource, long id, String name)
{
super(dataSource, true);
super(dataSource, id > 0);
this.id = id;
this.name = name;
}
public OracleSchema(OracleDataSource dataSource, ResultSet dbResult)
public OracleSchema(@NotNull OracleDataSource dataSource, @NotNull ResultSet dbResult)
{
super(dataSource, dbResult != null);
if (dbResult != null) {
this.id = JDBCUtils.safeGetLong(dbResult, "USER_ID");
this.name = JDBCUtils.safeGetString(dbResult, "USERNAME");
if (this.name == null) {
log.warn("Empty schema name fetched");
this.name = "? " + super.hashCode();
}
this.createTime = JDBCUtils.safeGetTimestamp(dbResult, "CREATED");
super(dataSource, true);
this.id = JDBCUtils.safeGetLong(dbResult, "USER_ID");
this.name = JDBCUtils.safeGetString(dbResult, "USERNAME");
if (CommonUtils.isEmpty(this.name)) {
log.warn("Empty schema name fetched");
this.name = "? " + super.hashCode();
}
this.createTime = JDBCUtils.safeGetTimestamp(dbResult, "CREATED");
}
public boolean isPublic()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册