Search in sources :

Example 1 with LifeCycleHook

use of com.yahoo.elide.core.lifecycle.LifeCycleHook in project elide by yahoo.

the class EntityBinding method bindTrigger.

private void bindTrigger(LifeCycleHookBinding binding, String fieldOrMethodName) {
    LifeCycleHook hook = injector.instantiate(binding.hook());
    injector.inject(hook);
    bindTrigger(binding.operation(), binding.phase(), fieldOrMethodName, hook);
}
Also used : LifeCycleHook(com.yahoo.elide.core.lifecycle.LifeCycleHook)

Example 2 with LifeCycleHook

use of com.yahoo.elide.core.lifecycle.LifeCycleHook in project elide by yahoo.

the class EntityBinding method bindTrigger.

private void bindTrigger(LifeCycleHookBinding binding) {
    if (binding.oncePerRequest()) {
        bindTrigger(binding, PersistentResource.CLASS_NO_FIELD);
        return;
    }
    LifeCycleHook hook = injector.instantiate(binding.hook());
    injector.inject(hook);
    bindTrigger(binding.operation(), binding.phase(), hook);
}
Also used : LifeCycleHook(com.yahoo.elide.core.lifecycle.LifeCycleHook)

Aggregations

LifeCycleHook (com.yahoo.elide.core.lifecycle.LifeCycleHook)2