Package org.datanucleus.metadata

Examples of org.datanucleus.metadata.PropertyMetaData


                // Try as property
                try
                {
                    overrideMember = type.getDeclaredMethod(ClassUtils.getJavaBeanGetterName(overriddenName, false));
                    overriddenMember = new Member((Method)overrideMember);
                    ammd = new PropertyMetaData(embmd, overriddenName);
                }
                catch (Exception e)
                {
                }
            }
View Full Code Here


        // Create the field
        AbstractMemberMetaData fmd;
        if (field.isProperty())
        {
            fmd = new PropertyMetaData(cmd, field.getName());
        }
        else
        {
            fmd = new FieldMetaData(cmd, field.getName());
        }
View Full Code Here

        }
        else
        {
            if (propertyAccess)
            {
                mmd = new PropertyMetaData(acmd, getAttr(attrs,"name"));
            }
            else
            {
                mmd = new FieldMetaData(acmd, getAttr(attrs,"name"));
            }
View Full Code Here

        else
        {
            // Create new property/field
            if (propertyAccess)
            {
                mmd = new PropertyMetaData(acmd, getAttr(attrs, "name"));
            }
            else
            {
                mmd = new FieldMetaData(acmd, getAttr(attrs, "name"));
            }
View Full Code Here

    protected AbstractMemberMetaData newTransientFieldObject(MetaData md, String name)
    {
        AbstractMemberMetaData mmd = null;
        if (propertyAccess)
        {
            mmd = new PropertyMetaData(md, name);
        }
        else
        {
            mmd = new FieldMetaData(md, name);
        }
View Full Code Here

    protected AbstractMemberMetaData newEmbeddedFieldObject(MetaData md, String name)
    {
        AbstractMemberMetaData mmd = null;
        if (propertyAccess)
        {
            mmd = new PropertyMetaData(md, name);
        }
        else
        {
            mmd = new FieldMetaData(md, name);
        }
View Full Code Here

    protected AbstractMemberMetaData newOverriddenFieldObject(MetaData md, Attributes attrs)
    {
        AbstractMemberMetaData mmd = null;
        if (propertyAccess)
        {
            mmd = new PropertyMetaData(md, "#UNKNOWN." + getAttr(attrs, "name"));
        }
        else
        {
            mmd = new FieldMetaData(md, "#UNKNOWN." + getAttr(attrs, "name"));
        }
View Full Code Here

            String nestedMemberName = memberName.substring(position+1);

            AbstractMemberMetaData mmd = null;
            if (propertyAccess)
            {
                mmd = new PropertyMetaData(embmd, baseMemberName);
            }
            else
            {
                mmd = new FieldMetaData(embmd, baseMemberName);
            }

            EmbeddedMetaData nestedEmbmd = new EmbeddedMetaData();
            nestedEmbmd.setParent(mmd);
            mmd.setEmbeddedMetaData(nestedEmbmd);

            AbstractMemberMetaData nestedEmbMmd = newOverriddenEmbeddedFieldObject(nestedEmbmd, nestedMemberName, columnName);
            nestedEmbmd.addMember(nestedEmbMmd);
            overrideMmd = nestedEmbMmd;
            return mmd;
        }
        else
        {
            AbstractMemberMetaData mmd = null;
            if (propertyAccess)
            {
                mmd = new PropertyMetaData(embmd, memberName);
            }
            else
            {
                mmd = new FieldMetaData(embmd, memberName);
            }
View Full Code Here

                        MemberAnnotationHandler handler = annMgr.getHandlerForMemberAnnotation(annName);
                        if (handler != null)
                        {
                            if (mmd == null)
                            {
                                mmd = new PropertyMetaData(cmd, method.getMember().getName());
                                cmd.addMember(mmd);
                            }
                            handler.processMemberAnnotation(annotations[i], mmd, clr);
                        }
                    }
View Full Code Here

     * @param attrs The attributes
     * @return The PropertyMetaData
     */
    protected PropertyMetaData newPropertyObject(MetaData md, Attributes attrs)
    {
        PropertyMetaData pmd = new PropertyMetaData(md, getAttr(attrs,"name"));
        pmd.setPersistenceModifier(getAttr(attrs,"persistence-modifier"));
        pmd.setDeleteAction(getAttr(attrs,"delete-action"));
        pmd.setPrimaryKey(getAttr(attrs,"primary-key"));
        pmd.setDefaultFetchGroup(getAttr(attrs,"default-fetch-group"));
        pmd.setEmbedded(getAttr(attrs,"embedded"));
        pmd.setSerialised(getAttr(attrs,"serialized"));
        pmd.setDependent(getAttr(attrs,"dependent"));
        pmd.setNullValue(NullValue.getNullValue(getAttr(attrs,"null-value")));
        pmd.setMappedBy(getAttr(attrs,"mapped-by"));
        pmd.setColumn(getAttr(attrs,"column"));
        pmd.setIndexed(IndexedValue.getIndexedValue(getAttr(attrs,"indexed")));
        pmd.setUnique(getAttr(attrs,"unique"));
        pmd.setTable(getAttr(attrs, "table"));
        pmd.setLoadFetchGroup(getAttr(attrs,"load-fetch-group"));
        pmd.setRecursionDepth(getAttr(attrs,"recursion-depth"));
        pmd.setValueStrategy(getAttr(attrs,"value-strategy"));
        pmd.setSequence(getAttr(attrs,"sequence"));
        pmd.setFieldTypes(getAttr(attrs,"field-type"));
        pmd.setFieldName(getAttr(attrs,"field-name"));
        String cacheableAttr = getAttr(attrs, "cacheable");
        if (cacheableAttr != null)
        {
            pmd.setCacheable(cacheableAttr.equalsIgnoreCase("false") ? false : true);
        }
        return pmd;
    }   
View Full Code Here

TOP

Related Classes of org.datanucleus.metadata.PropertyMetaData

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.