Implementing type update

This commit is contained in:
Luca Frosini 2020-12-14 12:36:53 +01:00
parent 679c0a7910
commit 648abc52c3
1 changed files with 4 additions and 7 deletions

View File

@ -377,7 +377,7 @@ public class SchemaManagementImpl implements SchemaManagement {
// TODO
protected void updateTypeSchema(Type type, AccessType baseElementAccessType)
throws SchemaAlreadyPresentException, SchemaException {
throws SchemaNotFoundException, SchemaException {
ODatabaseDocument oDatabaseDocument = null;
try {
@ -505,15 +505,12 @@ public class SchemaManagementImpl implements SchemaManagement {
oSchema.dropClass(type.getName());
throw e;
}
} catch(OSchemaException ex) {
if(ex.getMessage().contains("already exists")) {
throw new SchemaAlreadyPresentException(ex);
}
throw new SchemaException(ex);
} catch(SchemaNotFoundException e) {
throw e;
} catch(SchemaException e) {
throw e;
} catch(Exception ex) {
throw new SchemaCreationException(ex);
throw new SchemaException(ex);
} finally {
oDatabaseDocument.close();
}