}
@Override
protected StatementGeneratorResult generateStatement(Project project) {
StatementGeneratorResult result = new StatementGeneratorResult();
try {
String statement = object.extractDDL();
if (StringUtil.isEmptyOrSpaces(statement)) {
String message =
"Could not extract DDL statement for " + object.getQualifiedNameWithType() + ".\n" +
"You may not have enough rights to perform this action. Please contact your database administrator for more details.";
result.getMessages().addErrorMessage(message);
}
result.setStatement(statement);
} catch (SQLException e) {
result.getMessages().addErrorMessage(
"Could not extract DDL statement for " + object.getQualifiedNameWithType() + ".\n" +
"Cause: " + e.getMessage());
}
return result;
}