Package org.datanucleus.metadata

Examples of org.datanucleus.metadata.CollectionMetaData


            {
                elementType = ClassUtils.getCollectionElementType(field.getType(),field.getGenericType());
            }
            // No annotation for collections so cant specify the element type, dependent, embedded, serialized

            contmd = new CollectionMetaData();
            ((CollectionMetaData)contmd).setElementType(elementType);
        }
        else if (field.getType().isArray())
        {
            contmd = new ArrayMetaData();
View Full Code Here


                                elementTypeStr.append(collectionElementType.getName());
                            }
                        }
                    }

                    contmd = new CollectionMetaData();
                    CollectionMetaData collmd = (CollectionMetaData)contmd;
                    collmd.setElementType(elementTypeStr.toString());
                    collmd.setEmbeddedElement(embeddedElement);
                    collmd.setSerializedElement(serializedElement);
                    collmd.setDependentElement(dependentElement);

                    // Add any embedded element mappings
                    if (embeddedElementMembers != null)
                    {
                        EmbeddedMetaData embmd = elemmd.getEmbeddedMetaData();
View Full Code Here

        return getInternal().isCacheable();
    }

    public CollectionMetadata getCollectionMetadata()
    {
        CollectionMetaData internalCollmd = getInternal().getCollection();
        if (internalCollmd == null)
        {
            return null;
        }
        CollectionMetadataImpl collmd = new CollectionMetadataImpl(internalCollmd);
View Full Code Here

        return arrmd;
    }

    public CollectionMetadata newCollectionMetadata()
    {
        CollectionMetaData internalCollmd = getInternal().newCollectionMetaData();
        CollectionMetadataImpl collmd = new CollectionMetadataImpl(internalCollmd);
        collmd.parent = this;
        return collmd;
    }
View Full Code Here

    }
  }

  private String getExpectedChildType(AbstractMemberMetaData dependent) {
    if (dependent.getCollection() != null) {
      CollectionMetaData cmd = dependent.getCollection();
      return cmd.getElementType();
    } else if (dependent.getArray() != null) {
      ArrayMetaData amd = dependent.getArray();
      return amd.getElementType();
    }
    return dependent.getTypeName();
View Full Code Here

            FKListStoreSpecialization specialization)
    {
        super(storeMgr, clr, specialization);

        setOwner(fmd, clr);
        CollectionMetaData colmd = fmd.getCollection();
        if (colmd == null)
        {
            throw new NucleusUserException(LOCALISER.msg("056001", fmd.getFullFieldName()));
        }

        // Load the element class
        elementType = colmd.getElementType();
        Class element_class = clr.classForName(elementType);

        if (ClassUtils.isReferenceType(element_class))
        {
            // Take the metadata for the first implementation of the reference type
View Full Code Here

TOP

Related Classes of org.datanucleus.metadata.CollectionMetaData

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.