Package org.jpox

Examples of org.jpox.TypeManager$JPOXType


            // If we have a current value, use the actual type to define the wrapper type
            typeName = value.getClass().getName();
        }

        // Find the SCO wrapper type most suitable
        TypeManager typeMgr = fmd.getMetaDataManager().getOMFContext().getTypeManager();
        boolean fullWrapper = ownerSM.getStoreManager().getSupportedOptions().contains("ContainerQueueing");
        Class wrapperType = null;
        if (fullWrapper)
        {
            wrapperType = typeMgr.getSecondClassWrapper(typeName);
        }
        else
        {
            wrapperType = typeMgr.getSecondClassWrapperSimple(typeName);
        }

        if (wrapperType == null)
        {
            if (value != null && typeMgr.isSecondClassWrapper(typeName))
            {
                // The passed in value is a wrapper type already, so just return it!
                SCO sco = (SCO)value;
                if (replaceField)
                {
                    // Replace the field with this value
                    ownerSM.replaceField(fmd.getAbsoluteFieldNumber(), sco, false);
                }
                return sco;
            }
            else
            {
                // typeName not supported directly (no SCO wrapper for the precise type)
                if (instantiatedType != null)
                {
                    // Try the instantiated type
                    if (fullWrapper)
                    {
                        wrapperType = typeMgr.getSecondClassWrapper(instantiatedType.getName());
                    }
                    else
                    {
                        wrapperType = typeMgr.getSecondClassWrapperSimple(instantiatedType.getName());
                    }
                }
                if (wrapperType == null)
                {
                    // Try the declared type
                    if (fullWrapper)
                    {
                        wrapperType = typeMgr.getSecondClassWrapper(declaredType.getName());
                    }
                    else
                    {
                        wrapperType = typeMgr.getSecondClassWrapperSimple(declaredType.getName());
                    }
                }
            }
        }
        if (wrapperType == null)
View Full Code Here


            else
            {
                acmd = datastoreContainer.getStoreManager().getOMFContext().getMetaDataManager().getMetaDataForClass(fmd.getType(), clr);
            }
            MappedStoreManager storeMgr = datastoreContainer.getStoreManager();
            TypeManager typeMgr = storeMgr.getOMFContext().getTypeManager();

            if (fmd.isSerialized())
            {
                // Field is marked as serialised then we have no other option - serialise it
                mc = getMappingClass(fmd.getType(), true, false, fmd.getFullFieldName(),
View Full Code Here

        else if (fmd.hasArray())
        {
            embedded = fmd.getArray().isEmbeddedElement();
        }

        TypeManager typeMgr = fmd.getMetaDataManager().getOMFContext().getTypeManager();
        Class elementCls = null;
        if (fmd.hasCollection())
        {
            elementCls = clr.classForName(fmd.getCollection().getElementType());
        }
        else if (fmd.hasArray())
        {
            elementCls = clr.classForName(fmd.getArray().getElementType());
        }
        boolean elementReference = typeMgr.isReferenceType(elementCls);

        Class mc = null;
        if (serialised)
        {
            if (elementPC)
View Full Code Here

        boolean serialised = (fmd.hasMap() && fmd.getMap().isSerializedKey());
        boolean embedded = (fmd.hasMap() && fmd.getMap().isEmbeddedKey());
        boolean embeddedPC = (fmd.getKeyMetaData() != null && fmd.getKeyMetaData().getEmbeddedMetaData() != null);
        boolean keyPC = (fmd.hasMap() && fmd.getMap().getKeyClassMetaData() != null);
        TypeManager typeMgr = fmd.getMetaDataManager().getOMFContext().getTypeManager();
        Class keyCls = clr.classForName(fmd.getMap().getKeyType());
        boolean keyReference = typeMgr.isReferenceType(keyCls);

        Class mc = null;
        if (serialised)
        {
            if (keyPC)
View Full Code Here

        boolean serialised = (fmd.hasMap() && fmd.getMap().isSerializedValue());
        boolean embedded = (fmd.hasMap() && fmd.getMap().isEmbeddedValue());
        boolean embeddedPC = (fmd.getValueMetaData() != null && fmd.getValueMetaData().getEmbeddedMetaData() != null);
        boolean valuePC = (fmd.hasMap() && fmd.getMap().getValueClassMetaData() != null);
        TypeManager typeMgr = fmd.getMetaDataManager().getOMFContext().getTypeManager();
        Class valueCls = clr.classForName(fmd.getMap().getValueType());
        boolean valueReference = typeMgr.isReferenceType(valueCls);

        Class mc = null;
        if (serialised)
        {
            if (valuePC)
View Full Code Here

TOP

Related Classes of org.jpox.TypeManager$JPOXType

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.