Package com.buschmais.xo.impl.proxy

Examples of com.buschmais.xo.impl.proxy.InstanceInvocationHandler


     * @param <T>     The type.
     * @return The example.
     */
    private <T> Map<PrimitivePropertyMethodMetadata<PropertyMetadata>, Object> prepareExample(Example<T> example, Class<?> type, Class<?>... types) {
        Map<PrimitivePropertyMethodMetadata<PropertyMetadata>, Object> exampleEntity = new HashMap<>();
        InstanceInvocationHandler invocationHandler = new InstanceInvocationHandler(exampleEntity, new ExampleProxyMethodService(type, sessionContext));
        List<Class<?>> effectiveTypes = new ArrayList<>();
        effectiveTypes.add(type);
        effectiveTypes.addAll(Arrays.asList(types));
        T instance = sessionContext.getProxyFactory().createInstance(invocationHandler, effectiveTypes.toArray(new Class<?>[effectiveTypes.size()]),
                CompositeObject.class);
View Full Code Here


    private <T> T getInstance(DatastoreType datastoreType, TransactionalCache.Mode cacheMode) {
        DatastoreId id = getDatastoreId(datastoreType);
        TypeMetadataSet<?> types = getTypes(datastoreType);
        Object instance = cache.get(id, cacheMode);
        if (instance == null) {
            InstanceInvocationHandler invocationHandler = new InstanceInvocationHandler(datastoreType, getProxyMethodService());
            instance = proxyFactory.createInstance(invocationHandler, types.toClasses(), CompositeObject.class);
            cache.put(id, instance, cacheMode);
            if (TransactionalCache.Mode.READ.equals(cacheMode)) {
                instanceListenerService.postLoad(instance);
            }
View Full Code Here

TOP

Related Classes of com.buschmais.xo.impl.proxy.InstanceInvocationHandler

Copyright © 2018 www.massapicom. 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.