Package org.eclipse.persistence.internal.dynamicpersist

Examples of org.eclipse.persistence.internal.dynamicpersist.BaseEntityAccessor


            int idx = 0;
            for (Iterator j = desc.getMappings().iterator(); j.hasNext();) {
                DatabaseMapping dm = (DatabaseMapping) j.next();
                String attributeName = dm.getAttributeName();
                DatabaseMapping xdm = xdesc.getMappingForAttributeName(attributeName);
                dm.setAttributeAccessor(new BaseEntityAccessor(attributeName, idx));
                if (xdm != null) {
                    if (dm.isForeignReferenceMapping()) {
                        ForeignReferenceMapping frm = (ForeignReferenceMapping)dm;
                        if (frm.usesIndirection() && frm.getIndirectionPolicy().getClass().
                            isAssignableFrom(BasicIndirectionPolicy.class)) {
                            xdm.setAttributeAccessor(new BaseEntityVHAccessor(attributeName, idx));
                        } else {
                            // no indirection or indirection that is transparent enough (!) to work
                            xdm.setAttributeAccessor(new BaseEntityAccessor(attributeName, idx));
                        }
                    }
                    else {
                        xdm.setAttributeAccessor(new BaseEntityAccessor(attributeName, idx));
                        if (xdm.isDirectToFieldMapping()) {
                            XMLDirectMapping xmlDM = (XMLDirectMapping)xdm;
                            XMLField xmlField = (XMLField)xmlDM.getField();
                            Class clz = SCHEMA_2_CLASS.get(xmlField.getSchemaType());
                            if (clz != null) {
View Full Code Here


            int idx = 0;
            for (Iterator j = desc.getMappings().iterator(); j.hasNext();) {
                DatabaseMapping dm = (DatabaseMapping) j.next();
                String attributeName = dm.getAttributeName();
                DatabaseMapping xdm = xdesc.getMappingForAttributeName(attributeName);
                dm.setAttributeAccessor(new BaseEntityAccessor(attributeName, idx));
                if (xdm != null) {
                    if (dm.isForeignReferenceMapping()) {
                        ForeignReferenceMapping frm = (ForeignReferenceMapping)dm;
                        if (frm.usesIndirection() && frm.getIndirectionPolicy().getClass().
                            isAssignableFrom(BasicIndirectionPolicy.class)) {
                            xdm.setAttributeAccessor(new BaseEntityVHAccessor(attributeName, idx));
                        } else {
                            // no indirection or indirection that is transparent enough (!) to work
                            xdm.setAttributeAccessor(new BaseEntityAccessor(attributeName, idx));
                        }
                    }
                    else {
                        xdm.setAttributeAccessor(new BaseEntityAccessor(attributeName, idx));
                        if (xdm.isDirectToFieldMapping()) {
                            XMLDirectMapping xmlDM = (XMLDirectMapping)xdm;
                            XMLField xmlField = (XMLField)xmlDM.getField();
                            Class clz = SCHEMA_2_CLASS.get(xmlField.getSchemaType());
                            if (clz != null) {
View Full Code Here

            int idx = 0;
            for (Iterator j = desc.getMappings().iterator(); j.hasNext();) {
                DatabaseMapping dm = (DatabaseMapping) j.next();
                String attributeName = dm.getAttributeName();
                DatabaseMapping xdm = xdesc.getMappingForAttributeName(attributeName);
                dm.setAttributeAccessor(new BaseEntityAccessor(attributeName, idx));
                if (xdm != null) {
                    if (dm.isForeignReferenceMapping()) {
                        ForeignReferenceMapping frm = (ForeignReferenceMapping)dm;
                        if (frm.usesIndirection() && frm.getIndirectionPolicy().getClass().
                            isAssignableFrom(BasicIndirectionPolicy.class)) {
                            xdm.setAttributeAccessor(new BaseEntityVHAccessor(attributeName, idx));
                        } else {
                            // no indirection or indirection that is transparent enough (!) to work
                            xdm.setAttributeAccessor(new BaseEntityAccessor(attributeName, idx));
                        }
                    }
                    else {
                        xdm.setAttributeAccessor(new BaseEntityAccessor(attributeName, idx));
                        if (xdm.isDirectToFieldMapping()) {
                            XMLDirectMapping xmlDM = (XMLDirectMapping)xdm;
                            XMLField xmlField = (XMLField)xmlDM.getField();
                            Class clz = SCHEMA_2_CLASS.get(xmlField.getSchemaType());
                            if (clz != null) {
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.dynamicpersist.BaseEntityAccessor

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.