@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return interceptor.invoke (proxy, method, null, args); }
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return interceptor.invoke (proxy, method, null, args); }
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return interceptor.invoke (proxy, method, null, args); }
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { return interceptor.invoke (proxy, method, null, args); }
return methodHandlers.get(currentHandlerIndex.get()).invoke(self, thisMethod, proceed, args);
@Override public Object invoke( Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable { if (thisMethod.getName().equals("getHibernateLazyInitializer")) { return this; } else if (thisMethod.equals(this.getIdentifierMethod)) { //Very important!!! //Hibernate invoke thisMethod.invoke(target, args) here if the proxy is loaded. //But babyfish do the same operation in this.getIdentifier(), //Becasue the behaviors of getIdentfier() and setIdentifier(Serializable) //must be same. (see the comment of next else if) return this.getIdentifier(); } else if (thisMethod.equals(this.setIdentifierMethod)) { //Very important!!! //Hibernate invoke thisMethod.invoke(target, args) here. //But babyfish do the same operation in this.setIdentifier(Serializable), //this is very important, because the "ctx.resumeFreezing()" in this.setIdentifier() //need the id of the target if the proxy is loaded. this.setIdentifier((Serializable)args[0]); } return ((MethodHandler)this.lazyInitializer).invoke( self, thisMethod, proceed, args); }