Examples of LifecycleCallbacks


Examples of com.discursive.dao.generic.LifecycleCallbacks

        if (methodName.startsWith("makePersistent")) {
            Object object = arguments[0];
            log.debug( "Intercepting call to make persistent for " + object.toString() );
           
            if( object instanceof LifecycleCallbacks ) {
                LifecycleCallbacks lifecycle = (LifecycleCallbacks) object;
                if( lifecycle.getId() != null ) {
                    lifecycle.beforeUpdate();
                } else {
                    lifecycle.beforeCreate();
                }
                lifecycle.beforeSave();
               
            } else {
                log.debug( "Object doesn't implement lifecycle callbacks, not running before.." );
            }
           
            returnObject = methodInvocation.proceed();

            if( object instanceof LifecycleCallbacks ) {
                LifecycleCallbacks lifecycle = (LifecycleCallbacks) object;
                if( lifecycle.getId() != null ) {
                    lifecycle.afterUpdate();
                } else {
                    lifecycle.afterCreate();
                }
                lifecycle.afterSave();
            } else {
                log.debug( "Object doesn't implement lifecycle callbacks, not running after.." );
            }
           
        } else if( methodName.startsWith( "makeTransient" ) ) {
View Full Code Here

Examples of org.apache.openjpa.event.LifecycleCallbacks

                new Collection[LifecycleEvent.ALL_EVENTS.length];
            if (!system)
                _highs = new int[LifecycleEvent.ALL_EVENTS.length];
        }

        LifecycleCallbacks adapter;
        if (_listener != null)
            adapter = new BeanLifecycleCallbacks(_listener,
                attrs.getValue("method-name"), false, type);
        else
            adapter = new MethodLifecycleCallbacks(_cls,
View Full Code Here

Examples of org.apache.openjpa.event.LifecycleCallbacks

            if (!system)
                _highs = new int[LifecycleEvent.ALL_EVENTS.length];
        }

        MetaDataDefaults def = _repos.getMetaDataFactory().getDefaults();
        LifecycleCallbacks adapter;
        if (_listener != null)
            adapter = new BeanLifecycleCallbacks(_listener,
                attrs.getValue("method-name"), false, type);
        else
            adapter = new MethodLifecycleCallbacks(_cls,
View Full Code Here

Examples of org.apache.openjpa.event.LifecycleCallbacks

                new Collection[LifecycleEvent.ALL_EVENTS.length];
            if (!system)
                _highs = new int[LifecycleEvent.ALL_EVENTS.length];
        }

        LifecycleCallbacks adapter;
        if (_listener != null)
            adapter = new BeanLifecycleCallbacks(_listener,
                attrs.getValue("method-name"), false, type);
        else
            adapter = new MethodLifecycleCallbacks(_cls,
View Full Code Here

Examples of org.apache.openjpa.event.LifecycleCallbacks

                new Collection[LifecycleEvent.ALL_EVENTS.length];
            if (!system)
                _highs = new int[LifecycleEvent.ALL_EVENTS.length];
        }

        LifecycleCallbacks adapter;
        if (_listener != null)
            adapter = new BeanLifecycleCallbacks(_listener,
                attrs.getValue("method-name"), false, type);
        else
            adapter = new MethodLifecycleCallbacks(_cls,
View Full Code Here

Examples of org.apache.openjpa.event.LifecycleCallbacks

                new Collection[LifecycleEvent.ALL_EVENTS.length];
            if (!system)
                _highs = new int[LifecycleEvent.ALL_EVENTS.length];
        }

        LifecycleCallbacks adapter;
        if (_listener != null)
            adapter = new BeanLifecycleCallbacks(_listener,
                attrs.getValue("method-name"), false, type);
        else
            adapter = new MethodLifecycleCallbacks(_cls,
View Full Code Here

Examples of org.apache.openjpa.event.LifecycleCallbacks

                new Collection[LifecycleEvent.ALL_EVENTS.length];
            if (!system)
                _highs = new int[LifecycleEvent.ALL_EVENTS.length];
        }

        LifecycleCallbacks adapter;
        if (_listener != null)
            adapter = new BeanLifecycleCallbacks(_listener,
                attrs.getValue("method-name"), false, type);
        else
            adapter = new MethodLifecycleCallbacks(_cls,
View Full Code Here

Examples of org.apache.openjpa.event.LifecycleCallbacks

                new Collection[LifecycleEvent.ALL_EVENTS.length];
            if (!system)
                _highs = new int[LifecycleEvent.ALL_EVENTS.length];
        }

        LifecycleCallbacks adapter;
        if (_listener != null)
            adapter = new BeanLifecycleCallbacks(_listener,
                attrs.getValue("method-name"), false, type);
        else
            adapter = new MethodLifecycleCallbacks(_cls,
View Full Code Here

Examples of org.apache.openjpa.event.LifecycleCallbacks

            if (!system)
                _highs = new int[LifecycleEvent.ALL_EVENTS.length];
        }

        MetaDataDefaults def = _repos.getMetaDataFactory().getDefaults();
        LifecycleCallbacks adapter;
        if (_listener != null)
            adapter = new BeanLifecycleCallbacks(_listener,
                attrs.getValue("method-name"), false, type);
        else
            adapter = new MethodLifecycleCallbacks(_cls,
View Full Code Here

Examples of org.apache.openjpa.event.LifecycleCallbacks

            if (!system)
                _highs = new int[LifecycleEvent.ALL_EVENTS.length];
        }

        MetaDataDefaults def = _repos.getMetaDataFactory().getDefaults();
        LifecycleCallbacks adapter;
        if (_listener != null)
            adapter = new BeanLifecycleCallbacks(_listener,
                attrs.getValue("method-name"), false, type);
        else
            adapter = new MethodLifecycleCallbacks(_cls,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.