
com.venky.swf.extensions.BeforeDestroyUser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swf-db Show documentation
Show all versions of swf-db Show documentation
Succinct Web Framework - Db
The newest version!
package com.venky.swf.extensions;
import com.venky.swf.db.extensions.BeforeModelDestroyExtension;
import com.venky.swf.db.model.User;
public class BeforeDestroyUser extends BeforeModelDestroyExtension{
static {
registerExtension(new BeforeDestroyUser());
}
@Override
public void beforeDestroy(User model) {
if (model.isAdmin()){
throw new UnsupportedOperationException("Application administrator cannot be deleted");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy