Examples of includeAsValue()


Examples of org.apache.cocoon.acting.ModularDatabaseAccess.AutoIncrementHelper.includeAsValue()

                    if ( queryData.columns[i].isKey && queryData.columns[i].isAutoIncrement ) {
                        dah = (AutoIncrementHelper) modeMapping.select( queryData.columns[i].mode );
                        if ( dah.includeInQuery() ) {
                            actualColumns++;
                            queryBuffer.append( queryData.columns[i].columnConf.getAttribute( "name" ) );
                            if ( dah.includeAsValue() ) {
                                valueBuffer.append( "?" );
                            } else {
                                valueBuffer.append(
                                                   dah.getSubquery( table, queryData.columns[i].columnConf,
                                                                    queryData.columns[i].modeConf ) );
View Full Code Here

Examples of org.apache.cocoon.acting.ModularDatabaseAccess.AutoIncrementHelper.includeAsValue()

    protected void storeKeyValue( Configuration tableConf, Column key, int rowIndex, Connection conn,
                                  Statement statement, Request request, Map results )
        throws SQLException, ConfigurationException, ComponentException {

        AutoIncrementHelper dah = (AutoIncrementHelper) modeMapping.select( key.mode );
        if (!dah.includeAsValue()) {
            String keyname = getOutputName( tableConf, key.columnConf, rowIndex );
            Object value = dah.getPostValue( tableConf, key.columnConf, key.modeConf, conn, statement, request );
            if (getLogger().isDebugEnabled())
                getLogger().debug( "Retrieving autoincrement for " + keyname + "as " + value );
            setRequestAttribute( request, keyname, value );
View Full Code Here

Examples of org.apache.cocoon.acting.ModularDatabaseAccess.AutoIncrementHelper.includeAsValue()

        int columnCount = 0;

        AutoIncrementHelper dah = (AutoIncrementHelper) modeMapping.select( column.mode );
        if ( dah.includeInQuery() ) {
            if ( dah.includeAsValue() ) {
                Object value = dah.getPreValue( table, column.columnConf, column.modeConf, conn, request );
                String keyname = this.getOutputName( table, column.columnConf, rowIndex );
                if (getLogger().isDebugEnabled())
                    getLogger().debug( "Setting key " + keyname + " to " + value );
                statement.setObject( currentIndex, value );
View Full Code Here

Examples of org.apache.cocoon.components.modules.database.AutoIncrementModule.includeAsValue()

            if (column.mode != null && autoincrSelector != null && autoincrSelector.hasComponent(column.mode)){
                autoincr = (AutoIncrementModule) autoincrSelector.select(column.mode);
            }

            if ( autoincr.includeInQuery() ) {
                if ( autoincr.includeAsValue() ) {
                    Object value = autoincr.getPreValue( table, column.columnConf, column.modeConf, conn, objectModel );
                    this.setColumn(objectModel, outputMode, results, table, column.columnConf, rowIndex, value, statement, currentIndex);
                    columnCount = 1;
                }
            } else {
View Full Code Here

Examples of org.apache.cocoon.components.modules.database.AutoIncrementModule.includeAsValue()

            autoincrSelector=(ComponentSelector) this.manager.lookup(DATABASE_MODULE_SELECTOR);
            if (key.mode != null && autoincrSelector != null && autoincrSelector.hasComponent(key.mode)){
                autoincr = (AutoIncrementModule) autoincrSelector.select(key.mode);
            }

            if (!autoincr.includeAsValue()) {
                Object value = autoincr.getPostValue( tableConf, key.columnConf, key.modeConf, conn, statement, objectModel );
                this.setOutput(objectModel, outputMode, results, tableConf, key.columnConf, rowIndex, value);
            }

        } finally {
View Full Code Here

Examples of org.apache.cocoon.components.modules.database.AutoIncrementModule.includeAsValue()

                                autoincr = (AutoIncrementModule) autoincrSelector.select(queryData.columns[i].mode);
                               
                                if ( autoincr.includeInQuery() ) {
                                    actualColumns++;
                                    queryBuffer.append( queryData.columns[i].columnConf.getAttribute( "name" ) );
                                    if ( autoincr.includeAsValue() ) {
                                        valueBuffer.append( "?" );
                                    } else {
                                        valueBuffer.append(
                                                           autoincr.getSubquery( table, queryData.columns[i].columnConf,
                                                                                 queryData.columns[i].modeConf ) );
View Full Code Here

Examples of org.apache.cocoon.components.modules.database.AutoIncrementModule.includeAsValue()

            autoincrSelector=(ComponentSelector) this.manager.lookup(DATABASE_MODULE_SELECTOR);
            if (key.mode != null && autoincrSelector != null && autoincrSelector.hasComponent(key.mode)){
                autoincr = (AutoIncrementModule) autoincrSelector.select(key.mode);
            }

            if (!autoincr.includeAsValue()) {
                String keyname = getOutputName( tableConf, key.columnConf, rowIndex );
                Object value = autoincr.getPostValue( tableConf, key.columnConf, key.modeConf, conn, statement, request );
                if (getLogger().isDebugEnabled())
                    getLogger().debug( "Retrieving autoincrement for " + keyname + "as " + value );
                setRequestAttribute( request, keyname, value );
View Full Code Here

Examples of org.apache.cocoon.components.modules.database.AutoIncrementModule.includeAsValue()

            if (column.mode != null && autoincrSelector != null && autoincrSelector.hasComponent(column.mode)){
                autoincr = (AutoIncrementModule) autoincrSelector.select(column.mode);
            }

            if ( autoincr.includeInQuery() ) {
                if ( autoincr.includeAsValue() ) {
                    Object value = autoincr.getPreValue( table, column.columnConf, column.modeConf, conn, request );
                    String keyname = this.getOutputName( table, column.columnConf, rowIndex );
                    if (getLogger().isDebugEnabled())
                        getLogger().debug( "Setting key " + keyname + " to " + value );
                    statement.setObject( currentIndex, value );
View Full Code Here

Examples of org.apache.cocoon.components.modules.database.AutoIncrementModule.includeAsValue()

                            }

                            if ( autoincr.includeInQuery() ) {
                                actualColumns++;
                                queryBuffer.append( queryData.columns[i].columnConf.getAttribute( "name" ) );
                                if ( autoincr.includeAsValue() ) {
                                    valueBuffer.append( "?" );
                                } else {
                                    valueBuffer.append(
                                                       autoincr.getSubquery( table, queryData.columns[i].columnConf,
                                                                             queryData.columns[i].modeConf ) );
View Full Code Here

Examples of org.apache.cocoon.components.modules.database.AutoIncrementModule.includeAsValue()

            if (column.mode != null && autoincrSelector != null && autoincrSelector.isSelectable(column.mode)){
                autoincr = (AutoIncrementModule) autoincrSelector.select(column.mode);
            }

            if ( autoincr.includeInQuery() ) {
                if ( autoincr.includeAsValue() ) {
                    Object value = autoincr.getPreValue( table, column.columnConf, column.modeConf, conn, objectModel );
                    this.setColumn(objectModel, outputMode, results, table, column.columnConf, rowIndex, value, statement, currentIndex);
                    columnCount = 1;
                }
            } else {
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.