Examples of Select


Examples of org.h2.command.dml.Select

        return columnResolver.optimize(this, column);
    }

    public void updateAggregate(Session session) {
        Value now = columnResolver.getValue(column);
        Select select = columnResolver.getSelect();
        if (select == null) {
            throw DbException.get(ErrorCode.MUST_GROUP_BY_COLUMN_1, getSQL());
        }
        HashMap<Expression, Object> values = select.getCurrentGroup();
        if (values == null) {
            // this is a different level (the enclosing query)
            return;
        }
        Value v = (Value) values.get(this);
View Full Code Here

Examples of org.hibernate.sql.Select

  }

  protected abstract Queryable[] getAffectedQueryables();

  protected String generateIdInsertSelect(Queryable persister, String tableAlias, AST whereClause) {
    Select select = new Select( getFactory().getDialect() );
    SelectFragment selectFragment = new SelectFragment()
        .addColumns( tableAlias, persister.getIdentifierColumnNames(), persister.getIdentifierColumnNames() );
    select.setSelectClause( selectFragment.toFragmentString().substring( 2 ) );

    String rootTableName = persister.getTableName();
    String fromJoinFragment = persister.fromJoinFragment( tableAlias, true, false );
    String whereJoinFragment = persister.whereJoinFragment( tableAlias, true, false );

    select.setFromClause( rootTableName + ' ' + tableAlias + fromJoinFragment );

    if ( whereJoinFragment == null ) {
      whereJoinFragment = "";
    }
    else {
      whereJoinFragment = whereJoinFragment.trim();
      if ( whereJoinFragment.startsWith( "and" ) ) {
        whereJoinFragment = whereJoinFragment.substring( 4 );
      }
    }

    String userWhereClause = "";
    if ( whereClause.getNumberOfChildren() != 0 ) {
      // If a where clause was specified in the update/delete query, use it to limit the
      // returned ids here...
      try {
        SqlGenerator sqlGenerator = new SqlGenerator( getFactory() );
        sqlGenerator.whereClause( whereClause );
        userWhereClause = sqlGenerator.getSQL().substring( 7 )// strip the " where "
        idSelectParameterSpecifications = sqlGenerator.getCollectedParameters();
      }
      catch ( RecognitionException e ) {
        throw new HibernateException( "Unable to generate id select for DML operation", e );
      }
      if ( whereJoinFragment.length() > 0 ) {
        whereJoinFragment += " and ";
      }
    }

    select.setWhereClause( whereJoinFragment + userWhereClause );

    InsertSelect insert = new InsertSelect( getFactory().getDialect() );
    if ( getFactory().getSettings().isCommentsEnabled() ) {
      insert.setComment( "insert-select for " + persister.getEntityName() + " ids" );
    }
View Full Code Here

Examples of org.jboss.mbui.model.structure.Select

                                    QName.valueOf(namespace + ":remove"),
                                    QName.valueOf("org.jboss.as:resource-operation#remove"),
                                    "Remove"))
                        .end()

                        .add(new Select(namespace, "list", "Master"))
                            .mappedBy(tableMapping)

                        .start(new Container(namespace, "details", "Details", Choice))
                            .mappedBy(singleSecurityDomain)
                            .add(new Container(namespace, "details#attributes", "Attributes", Form))
                                .mappedBy(attributesMapping)
                        .end()
                    .end()

                    // The actual pages

                    .start(new Container(namespace, "domainConfiguration", "Domain Configuration", Concurrency))

                        .add(new Select(namespace, "domainSelection", "Select Domain", PullDown))
                            .mappedBy(tableMapping)

                        .start(new Container(namespace, "securityModules", "Security Modules", Choice, Pages))

                            // Authentication
                           .start(new Container(namespace + ".authentication", "authentication", "Authentication"))
                                .start(new Container(namespace + ".authentication", "tools", "Tools", Toolstrip))
                                    .add(new Trigger(
                                            QName.valueOf(namespace + ".authentication:add"),
                                            QName.valueOf("org.jboss.as:resource-operation#add"),
                                            "Add"))
                                    .add(new Trigger(
                                            QName.valueOf(namespace + ".authentication:remove"),
                                            QName.valueOf("org.jboss.as:resource-operation#remove"),
                                            "Remove"))
                                .end()
                                .add(new Select(namespace + ".authentication", "loginModules", "Login Modules"))
                                    .mappedBy(new DMRMapping()
                                            .setAddress("/{selected.profile}/subsystem=security/security-domain={selected.entity}/authentication=classic/login-module=*")
                                            .addAttributes("code", "flag"))

                                .start(new Container(namespace + ".authentication", "details", "Details", Choice))
                                    .add(new Container(namespace + ".authentication", "details#basicAttributers", "Attributes", Form))
                                       .mappedBy(new DMRMapping()
                                        .setAddress("/{selected.profile}/subsystem=security/security-domain={selected.entity}/authentication=classic/login-module={selected.entity}")
                                        .addAttributes("code", "flag", "module"))

                                    .add(new Select(namespace + ".authentication", "moduleOptions", "Module Options"))
                                .end()
                            .end()

                            // Authorization
                            .start(new Container(namespace + ".authorization", "authorization", "Authorization"))

                                .start(new Container<StereoTypes>(namespace + ".authorization", "tools", "Tools", Toolstrip))
                                    .add(new Trigger(
                                            QName.valueOf(namespace + ".authorization:add"),
                                            QName.valueOf("org.jboss.as:resource-operation#add"),
                                            "Add"))
                                    .add(new Trigger(
                                            QName.valueOf(namespace + ".authorization:remove"),
                                            QName.valueOf("org.jboss.as:resource-operation#remove"),
                                            "Remove"))
                                .end()
                                .add(new Select(namespace + ".authorization", "policies", "Policies"))
                                    .mappedBy(new DMRMapping()
                                            .setAddress("/{selected.profile}/subsystem=security/security-domain={selected.entity}/authorization=classic/policy-module=*")
                                            .addAttributes("code", "flag"))

                                .start(new Container(namespace + ".authorization", "details", "Details", Choice))

                                    .add(new Container(namespace + ".authorization", "details#basicAttributers", "Attributes", Form))
                                        .mappedBy(new DMRMapping()
                                                .setAddress("/{selected.profile}/subsystem=security/security-domain={selected.entity}/authorization=classic/policy-module={selected.entity}")
                                                .addAttributes("code", "flag", "module"))
                                    .add(new Select(namespace + ".authorization", "moduleOptions", "Module Options"))
                                .end()
                            .end()

                            // Mapping
                            /* .start(new Container(namespace + ".mapping", "mapping", "Mapping"))
View Full Code Here

Examples of org.jmanage.util.display.html.Select

            size = Integer.parseInt(properties.get(SIZE));
    }
   
    public void drawInternal(DashboardContext context, StringBuffer output) {
        Map<String, String> data = getData(context.getWebContext());
        Select select = new Select("dummy", size, true);
        //select.onChange("alert(''test'');");
        final String dashboardId = context.getDashboardConfig().getDashboardId();
        select.onChange("handleEvent(''" + dashboardId + "'', ''" + getId() + "'', ''onChange'', this.options[this.selectedIndex].value);");
        for(String id:data.keySet()){
            select.addOption(id, data.get(id));
        }
        output.append(select.draw());
    }
View Full Code Here

Examples of org.jooq.Select

            try {
                connection.setAutoCommit(false);

                final SparqlToSQLMapper mapper = new SparqlToSQLMapper(connection,dialect,expr, castType);

                final Select query =  mapper.getQuery();

                if(log.isDebugEnabled() || configurationService.getBooleanConfiguration("sparql.native.logsql",true)) {
                    log.info("SQL query from SPARQL transformation:\n{}", query.getSQL());
                }


                final EntityManager em = persistenceService.getEntityManager();

                return new CloseableIteration<BindingSet, QueryEvaluationException>() {

                    private Cursor cursor = query.fetchLazy(50);

                    private UrlValidator urlValidator = new UrlValidator(UrlValidator.ALLOW_ALL_SCHEMES | UrlValidator.ALLOW_LOCAL_URLS);

                    // in case we need to split one SQL query row into several SPARQL query rows, we do it by creating
                    // a temporary iterator
View Full Code Here

Examples of org.jrest4guice.persistence.ibatis.annotations.Select

  private static void processStatement(Class<?> clazz,
      StringBuffer statementSb) {
    Method[] methods = clazz.getDeclaredMethods();
    Statement statement;
    Procedure procedure;
    Select select;
    Update update;
    Insert insert;
    Delete delete;
    for (Method method : methods) {
      if (method.isAnnotationPresent(Statement.class)) {
        statement = method.getAnnotation(Statement.class);
        generateMethodSqlMapping(statementSb, "statement", method,
            statement.id(), statement.parameterMap(), statement
                .parameterClass(), statement.resltMap(),
            statement.resltClass(), statement.sql(), statement
                .cacheModel(), statement.xmlResultName());
      } else if (method.isAnnotationPresent(Procedure.class)) {
        procedure = method.getAnnotation(Procedure.class);
        generateMethodSqlMapping(statementSb, "procedure", method,
            procedure.id(), procedure.parameterMap(), procedure
                .parameterClass(), procedure.resltMap(),
            procedure.resltClass(), procedure.sql(), null,
            procedure.xmlResultName());
      } else if (method.isAnnotationPresent(Select.class)) {
        select = method.getAnnotation(Select.class);
        generateMethodSqlMapping(statementSb, "select", method, select
            .id(), select.parameterMap(), select.parameterClass(),
            select.resltMap(), select.resltClass(), select.sql(),
            select.cacheModel(), null);
      } else if (method.isAnnotationPresent(Update.class)) {
        update = method.getAnnotation(Update.class);
        generateMethodSqlMapping(statementSb, "update", method, update
            .id(), null, update.parameterClass(), null, Null.class,
            update.sql(), null, null);
View Full Code Here

Examples of org.lealone.command.dml.Select

        if (!select.isGroupQuery() && select.getSortOrder() != null)
            return new HBaseSortedResult(maxRows, session, select, results);

        String newSQL = select.getPlanSQL(true);
        Select newSelect = (Select) session.prepare(newSQL, true);
        newSelect.setExecuteDirec(true);

        return new HBaseMergedResult(results, newSelect, select);
    }
View Full Code Here

Examples of org.openqa.jetty.html.Select

            page.add(Break.para);
            page.add(new Heading(1, "Form to generate POST content"));
            tf= new TableForm(response.encodeURL(getURI(request)));
            tf.method("POST");
            tf.addTextField("TextField", "TextField", 20, "value");
            Select select= tf.addSelect("Select", "Select", true, 3);
            select.add("ValueA");
            select.add("ValueB1,ValueB2");
            select.add("ValueC");
            tf.addButton("Action", "Submit");
            page.add(tf);

            page.add(new Heading(1, "Form to upload content"));
            tf= new TableForm(response.encodeURL(getURI(request)));
View Full Code Here

Examples of org.openqa.selenium.support.ui.Select

        select.selectByValue(NOTIFIER_HOURLY);
    }

    public void setNotifierDaily()
    {
        Select select = new Select(this.notifier);
        select.selectByValue(NOTIFIER_DAILY);
    }
View Full Code Here

Examples of org.springmodules.xt.ajax.component.Select

        String rowId = Long.toString(new Date().getTime());
        row.addAttribute("id", rowId);

        // Create the employee selection box (binding to employees) and add it to a column:
        BindStatusHelper helper = new BindStatusHelper("command.employees");
        Select selectionList = new Select(helper.getStatusExpression());
        for (IEmployee emp : employees) {
            Option o = new Option(emp, "matriculationCode", "surname");
            selectionList.addOption(o);
        }
        TableData td1 = new TableData(selectionList);

        // Create the remove button and add it to another column:
        InputField removeButton = new InputField("toRemove", "Remove", InputField.InputType.BUTTON);
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.