public abstract class SchemaObjectValidator<T extends SchemaObject> extends DBObjectValidator<T>
DBObjectValidator
.DBObjectValidator.NamespaceType, DBObjectValidator.PropertyDependency, DBObjectValidator.PropertyValidator
Constructor and Description |
---|
SchemaObjectValidator(DBObjectProvider pro) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canChangeSchema()
By default an object's schema can be changed (only applies to
SchemaObjects).
|
CascadeAction |
cascadeDelete(DBObject removed,
T obj)
Cascade deletes the given removed object.
|
protected CascadeAction |
cascadePropertyChange(Difference objDiff,
java.lang.String propName,
java.lang.Object oldValue,
java.lang.Object newValue,
T obj)
Process the given difference from a dependent object that is being
updated.
|
protected boolean |
checkSchemaDelete(DBObject removed,
T obj)
Checks whether the removed object is the Schema for the given
SchemaObject.
|
protected boolean |
checkSchemaRename(Difference objDiff,
java.lang.String propName,
T obj)
Checks the given object objDiff and propertyName and if they
represent a schema rename for the Schema of the given object then
we update obj with the new schema and return true.
|
void |
validateSchema(T original,
T updated) |
canHaveEmptyName, canRename, checkInterrupt, enforceChildNameUniqueInSchema, findExistingObject, getDependencies, getNamespaceType, initializeWithDefaultName, isChildOfPendingObject, isPendingObject, listAlwaysValidProperties, logException, validateComment, validateMissingPath, validateName, validateName, validateName, validateNameInUse, validateNonNullableProperty, validateObject, validateObject, validateObjectProperty, validateObjectProperty, validateOwnedObjects, validateType, validateUniqueNames
cascadeDelete, cascadeUpdate, getCascadeProperties, getLogger, getProvider, removeReference
public SchemaObjectValidator(DBObjectProvider pro)
public void validateSchema(T original, T updated) throws ValidationException
ValidationException
protected boolean canChangeSchema()
public CascadeAction cascadeDelete(DBObject removed, T obj)
CascadeWorker
cascadeDelete
in class CascadeWorker<T extends SchemaObject>
removed
- the object that we are cascading the delete ofobj
- the object to cascade toprotected boolean checkSchemaDelete(DBObject removed, T obj)
removed
- the object being removedobj
- the SchemaObject that we're cascading toprotected CascadeAction cascadePropertyChange(Difference objDiff, java.lang.String propName, java.lang.Object oldValue, java.lang.Object newValue, T obj)
CascadeWorker
cascadePropertyChange
in class CascadeWorker<T extends SchemaObject>
objDiff
- the full difference for the updated objectpropName
- the name of the changed property we are cascadingoldValue
- the old property valuenewValue
- the new property valueobj
- the object to cascade the change toprotected boolean checkSchemaRename(Difference objDiff, java.lang.String propName, T obj)
objDiff
- the DBObject difference we're cascaddingpropName
- the property that has been changedobj
- the object to cascade the change to