You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create something like Yawp.builder().after(AfterAction).before(BeforeAction).execute();
Why do I need it?
I have several logics in my Hook and I don't need to validate all then in some places, but I need to do some validations before and/or after I save it.
class SaveBuilder<T> {
public void after();
public void before();
public void execute(Object object) {
before()
Yawp.save(object)
after()
}
}
abstract class BuilderAction<T> {
public abstract void action(T object);
}
class AfterAction extends BuilderAction<MyClass> {
@Override
public void action(MyClass Object) {}
}
class BeforeAction extends BuilderAction<MyClass> {
@Override
public void action(MyClass Object) {}
}
The text was updated successfully, but these errors were encountered:
Create something like Yawp.builder().after(AfterAction).before(BeforeAction).execute();
Why do I need it?
I have several logics in my Hook and I don't need to validate all then in some places, but I need to do some validations before and/or after I save it.
The text was updated successfully, but these errors were encountered: