return;
case DROP:
dropObject(((DBDatabase) dbo).getSchema(), "USER", script);
return;
default:
throw new NotImplementedException(this, "getDDLScript." + dbo.getClass().getName() + "." + type);
}
}
else if (dbo instanceof DBTable)
{ // Table
switch (type)
{
case CREATE:
createTable((DBTable) dbo, script);
return;
case DROP:
dropObject(((DBTable) dbo).getName(), "TABLE", script);
return;
default:
throw new NotImplementedException(this, "getDDLScript." + dbo.getClass().getName() + "." + type);
}
}
else if (dbo instanceof DBView)
{ // View
switch (type)
{
case CREATE:
createView((DBView) dbo, script);
return;
case DROP:
dropObject(((DBView) dbo).getName(), "VIEW", script);
return;
case ALTER:
dropObject(((DBView) dbo).getName(), "VIEW", script);
createView((DBView) dbo, script);
return;
default:
throw new NotImplementedException(this, "getDDLScript." + dbo.getClass().getName() + "." + type);
}
}
else if (dbo instanceof DBRelation)
{ // Relation
switch (type)
{
case CREATE:
createRelation((DBRelation) dbo, script);
return;
case DROP:
dropObject(((DBRelation) dbo).getName(), "CONSTRAINT", script);
return;
default:
throw new NotImplementedException(this, "getDDLScript." + dbo.getClass().getName() + "." + type);
}
}
else if (dbo instanceof DBTableColumn)
{ // Table Column
alterTable((DBTableColumn) dbo, type, script);