Examples of includeInFetchStatement()


Examples of org.datanucleus.store.mapped.mapping.JavaTypeMapping.includeInFetchStatement()

        }

        // Set table-group name for any related object we join to (naming based on member name)
        String tableGroupName = sourceSqlTbl.getGroupName() + "." + mmd.getName();
        JavaTypeMapping m = sourceSqlTbl.getTable().getMemberMapping(mmd);
        if (m != null && m.includeInFetchStatement())
        {
            int relationType = mmd.getRelationType(clr);
            RDBMSStoreManager storeMgr = stmt.getRDBMSManager();
            RDBMSAdapter dba = (RDBMSAdapter) storeMgr.getDatastoreAdapter();
            if (!dba.validToSelectMappingInStatement(stmt, m))
View Full Code Here

Examples of org.datanucleus.store.mapped.mapping.JavaTypeMapping.includeInFetchStatement()

                {
                    // Fall back to generating a mapping for this type - does this ever happen?
                    m = storeMgr.getMappingManager().getMappingWithDatastoreMapping(
                        fieldType, false, false, clr);
                }
                if (m.includeInFetchStatement())
                {
                    // Set mapping for this field since it can potentially be returned from a fetch
                    String columnName = null;
                    if (fmd.getColumnMetaData() != null && fmd.getColumnMetaData().length > 0)
                    {
View Full Code Here

Examples of org.datanucleus.store.mapped.mapping.JavaTypeMapping.includeInFetchStatement()

            // Get the mapping (in this table, or super-table)
            AbstractMemberMetaData mmd = mmds[i];
            JavaTypeMapping mapping = table.getMemberMapping(mmd);
            if (mapping != null)
            {
                if (!mmd.isPrimaryKey() && mapping.includeInFetchStatement())
                {
                    // The depth is the number of levels down to load in this statement.
                    // 0 is to load just this objects fields (as with JPOX, and DataNucleus up to 1.1.3)
                    int depth = 0;
                    if (mapping instanceof PersistableMapping)
View Full Code Here

Examples of org.jpox.store.mapped.mapping.JavaTypeMapping.includeInFetchStatement()

        for (int i=0; i<fieldCount; ++i)
        {
            JavaTypeMapping m = view.getFieldMapping(cmd.getMetaDataForManagedMemberAtAbsolutePosition(i));
            if (m != null)
            {
                if (!m.includeInFetchStatement() || m instanceof AbstractContainerMapping)
                {
                    throw new JPOXException(LOCALISER_RDBMS.msg("053001",
                        m, candidateClass.getName())).setFatal();
                }
               
View Full Code Here

Examples of org.jpox.store.mapped.mapping.JavaTypeMapping.includeInFetchStatement()

                    // TODO This only selects one field of the application identity ... as APP_ID.
                    // If multiple we should have APP_ID1, APP_ID2, etc. It also only looks at the first table
                    JavaTypeMapping m = tables[0].getFieldMapping(cmd.getMetaDataForManagedMemberAtAbsolutePosition(prefetchFieldNumbers[i]));
                    if (m != null) // field is not stored in the table, e.g List, Set, etc or is transactional
                    {
                        if (m.includeInFetchStatement() && !(m instanceof AbstractContainerMapping))
                        {
                            statementExpressionIndex[prefetchFieldNumbers[i]] = new StatementExpressionIndex();
                            statementExpressionIndex[prefetchFieldNumbers[i]].setMapping(m);
                            statementExpressionIndex[prefetchFieldNumbers[i]].setExpressionIndex(stmt.selectField(fieldName, "APP_ID", true));
                        }
View Full Code Here

Examples of org.jpox.store.mapped.mapping.JavaTypeMapping.includeInFetchStatement()

                {
                    JavaTypeMapping m = tables[0].getFieldMapping(cmd.getMetaDataForManagedMemberAtAbsolutePosition(fieldNumbers[i]));
                    if (m != null)
                    {
                        // omit fields not stored in the table, e.g. List, Set, etc or transactional
                        if (m.includeInFetchStatement() && !(m instanceof AbstractContainerMapping))
                        {
                            statementExpressionIndex[fieldNumbers[i]] = new StatementExpressionIndex();
                            statementExpressionIndex[fieldNumbers[i]].setMapping(m);
                            fn[prefetchFieldCount++] = fieldNumbers[i];
                        }
View Full Code Here

Examples of org.jpox.store.mapped.mapping.JavaTypeMapping.includeInFetchStatement()

                    {
                        prefetchFieldNumbers[i] = cmd.getPKMemberPositions()[i];
                        JavaTypeMapping m = tables[0].getFieldMapping(cmd.getMetaDataForManagedMemberAtAbsolutePosition(prefetchFieldNumbers[i]));
                        if (m != null) // field is not stored in the table, e.g List, Set, etc or is transactional
                        {
                            if (m.includeInFetchStatement() && !(m instanceof AbstractContainerMapping))
                            {
                                statementExpressionIndex[prefetchFieldNumbers[i]] = new StatementExpressionIndex();
                                statementExpressionIndex[prefetchFieldNumbers[i]].setMapping(m);
                            }
                        }
View Full Code Here

Examples of org.jpox.store.mapped.mapping.JavaTypeMapping.includeInFetchStatement()

                    if (fmd.getPersistenceModifier() == FieldPersistenceModifier.PERSISTENT)
                    {
                        JavaTypeMapping m = elementInfo[0].getDatastoreClass().getFieldMapping(fmd);
                        if (m != null) // Field is not a Collection, List, Map, etc so has a datastore mapping
                        {
                            if (m.includeInFetchStatement() && !(m instanceof AbstractContainerMapping))
                            {
                                statementExpressionIndex[fieldNumbers[i]] = new StatementExpressionIndex();
                                statementExpressionIndex[fieldNumbers[i]].setMapping(m);
                                fn[prefetchFieldCount++] = fieldNumbers[i];
                            }
View Full Code Here

Examples of org.jpox.store.mapped.mapping.JavaTypeMapping.includeInFetchStatement()

                        if (fmd.getPersistenceModifier() == FieldPersistenceModifier.PERSISTENT)
                        {
                            JavaTypeMapping m = elementInfo[0].getDatastoreClass().getFieldMapping(fmd);
                            if (m != null) // Field is not a Collection, List, Map, etc so has a datastore mapping
                            {
                                if (m.includeInFetchStatement() && !(m instanceof AbstractContainerMapping))
                                {
                                    statementExpressionIndex[prefetchFieldNumbers[i]] = new StatementExpressionIndex();
                                    statementExpressionIndex[prefetchFieldNumbers[i]].setMapping(m);
                                }
                            }
View Full Code Here

Examples of org.jpox.store.mapped.mapping.JavaTypeMapping.includeInFetchStatement()

                prefetchFieldNumbers[j] = cmd.getPKMemberPositions()[j];
                JavaTypeMapping m = storeMgr.getDatastoreClass(candidateClass.getName(), clr).getFieldMapping(
                    cmd.getMetaDataForManagedMemberAtAbsolutePosition(prefetchFieldNumbers[j]));
                if (m != null) // field is not stored in the table, e.g List, Set, etc or is transactional
                {
                    if (m.includeInFetchStatement() && !(m instanceof AbstractContainerMapping))
                    {
                        stmt.select(m, true);
                    }
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.