Package org.eclipse.persistence.internal.jpa.metamodel.proxy

Examples of org.eclipse.persistence.internal.jpa.metamodel.proxy.AttributeProxyImpl


                        if (PrivilegedAccessHelper.shouldUsePrivilegedAccess()){
                            assignedAttribute = AccessController.doPrivileged(new PrivilegedGetValueFromField(attribute, null));
                        } else {
                            assignedAttribute =PrivilegedAccessHelper.getValueFromField(attribute, null);
                        }
                        AttributeProxyImpl proxy = null;
                        if (assignedAttribute == null){
                            if (SingularAttribute.class.isAssignableFrom(attribute.getType())){
                                proxy = new SingularAttributeProxyImpl();
                            } else if (MapAttribute.class.isAssignableFrom(attribute.getType())){
                                proxy = new MapAttributeProxyImpl();
                            } else if (SetAttribute.class.isAssignableFrom(attribute.getType())){
                                proxy = new SetAttributeProxyImpl();
                            } else if (ListAttribute.class.isAssignableFrom(attribute.getType())){
                                proxy = new ListAttributeProxyImpl();
                            } else if (CollectionAttribute.class.isAssignableFrom(attribute.getType())){
                                proxy = new CollectionAttributeProxyImpl();
                            }
                            if (proxy != null){
                                attribute.setAccessible(true);
                                attribute.set(null, proxy);
                            }
                        } else if (assignedAttribute instanceof AttributeProxyImpl){
                            proxy = (AttributeProxyImpl)assignedAttribute;
                        }
                        if (proxy != null){
                            proxy.addFactory(factory);
                        }
                    }
                }
            } catch (PrivilegedActionException pae){
                getSession().logThrowable(SessionLog.FINEST,  SessionLog.METAMODEL, pae);
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.jpa.metamodel.proxy.AttributeProxyImpl

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.