Here are the examples of the java api org.hibernate.Interceptor.instantiate() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
3 Examples
17
Source : InterceptorChain.java
with Apache License 2.0
from robinfriedli
with Apache License 2.0
from robinfriedli
@Override
public Object instantiate(String enreplacedyName, EnreplacedyMode enreplacedyMode, Serializable id) {
if (!INTERCEPTORS_MUTED.get()) {
return first.instantiate(enreplacedyName, enreplacedyMode, id);
} else {
return super.instantiate(enreplacedyName, enreplacedyMode, id);
}
}
17
Source : ChainableInterceptor.java
with Apache License 2.0
from robinfriedli
with Apache License 2.0
from robinfriedli
@Override
public Object instantiate(String enreplacedyName, EnreplacedyMode enreplacedyMode, Serializable id) {
try {
instantiateChained(enreplacedyName, enreplacedyMode, id);
} catch (Throwable e) {
logger.error("Error in instantiate of ChainableInterceptor " + getClreplaced().getSimpleName(), e);
}
return next.instantiate(enreplacedyName, enreplacedyMode, id);
}
16
Source : ChainingInterceptor.java
with Apache License 2.0
from isstac
with Apache License 2.0
from isstac
// returns the first non-null response from all interceptors
@Override
public Object instantiate(String enreplacedyName, EnreplacedyMode enreplacedyMode, Serializable id) {
for (Interceptor i : interceptors) {
Object o = i.instantiate(enreplacedyName, enreplacedyMode, id);
if (o != null) {
return o;
}
}
return null;
}