Examples of toSQL()


Examples of com.art.anette.datamodel.dataobjects.managed.Department.toSQL()

                final Department d = getDummyDepartment();
                final Employee e = getDummyEmployee();
                final Project project = getDummyProject();
                final WorkPackage workPackage = getRootWorkPackage();
                dbConnector.execute("SET REFERENTIAL_INTEGRITY FALSE;",
                        e.toSQL(owner), company.toSQL(owner), d.toSQL(owner), project.toSQL(owner), workPackage.toSQL(owner),
                        "SET REFERENTIAL_INTEGRITY TRUE;");
            }

            employees = new HashMap<Long, Employee>();
            rs = dbConnector.query("SELECT * FROM " + Employee.getTableName());
View Full Code Here

Examples of com.art.anette.datamodel.dataobjects.managed.Project.toSQL()

                final Department d = getDummyDepartment();
                final Employee e = getDummyEmployee();
                final Project project = getDummyProject();
                final WorkPackage workPackage = getRootWorkPackage();
                dbConnector.execute("SET REFERENTIAL_INTEGRITY FALSE;",
                        e.toSQL(owner), company.toSQL(owner), d.toSQL(owner), project.toSQL(owner), workPackage.toSQL(owner),
                        "SET REFERENTIAL_INTEGRITY TRUE;");
            }

            employees = new HashMap<Long, Employee>();
            rs = dbConnector.query("SELECT * FROM " + Employee.getTableName());
View Full Code Here

Examples of com.art.anette.datamodel.dataobjects.managed.WorkPackage.toSQL()

                final Department d = getDummyDepartment();
                final Employee e = getDummyEmployee();
                final Project project = getDummyProject();
                final WorkPackage workPackage = getRootWorkPackage();
                dbConnector.execute("SET REFERENTIAL_INTEGRITY FALSE;",
                        e.toSQL(owner), company.toSQL(owner), d.toSQL(owner), project.toSQL(owner), workPackage.toSQL(owner),
                        "SET REFERENTIAL_INTEGRITY TRUE;");
            }

            employees = new HashMap<Long, Employee>();
            rs = dbConnector.query("SELECT * FROM " + Employee.getTableName());
View Full Code Here

Examples of com.art.anette.datamodel.dataobjects.simple.Employee.toSQL()

            }
            rs.close();

            Employee e = new Employee(this, 0, 0, data);
            e.setState(Status.NEW);
            dbConnector.execute(e.toSQL(owner));
            rs = dbConnector.query("SELECT LAST_INSERT_ID() as id FROM " + Employee.getTableName());
            rs.next();

            e = new Employee(null, rs.getLong("id"), data);
            rs.close();
View Full Code Here

Examples of com.hp.hpl.jena.sdb.compiler.OpSQL.toSQL()

            OpSQL opSQL = (OpSQL)op ;
           
           
            if ( ! first )
                out.println(divider) ;
            out.print(opSQL.toSQL()) ;
            out.ensureStartOfLine() ;
            out.flush();

            first = false ;
        }
View Full Code Here

Examples of de.fuberlin.wiwiss.d2rq.algebra.ProjectionSpec.toSQL()

    if (!it.hasNext()) {
      result.append("1");
    }
    while (it.hasNext()) {
      ProjectionSpec projection = it.next();
      result.append(projection.toSQL(database, aliases));
      if (it.hasNext()) {
        result.append(", ");
      }
    }
   
View Full Code Here

Examples of net.datacrow.core.data.DataFilter.toSQL()

        try {
       
          DcModule module = DcModules.get(DcModules._CONTAINER);
         
          DataFilter df = DataFilters.getCurrent(DcModules._CONTAINER);
          sql = df.toSQL(new int[] {Container._ID, Container._A_NAME, Container._F_PARENT, Container._E_ICON}, true, false);
         
          conn = DatabaseManager.getConnection();
          stmt = conn.createStatement();
         
          logger.debug(sql);
View Full Code Here

Examples of org.apache.metamodel.create.ColumnCreationBuilder.toSql()

        dc.executeUpdate(new UpdateScript() {
            @Override
            public void run(UpdateCallback cb) {
                ColumnCreationBuilder createTableBuilder = cb.createTable(schema, "test_table").withColumn("id")
                        .ofType(ColumnType.INTEGER).withColumn("code").ofType(ColumnType.CHAR).ofSize(1);
                String sql = createTableBuilder.toSql();
                assertTrue(sql, sql.indexOf("test_table (id INTEGER,code CHAR(1))") != -1);
                Table table = createTableBuilder.execute();

                cb.insertInto(table).value("id", 1).value("code", 'P').execute();
                cb.insertInto(table).value("id", 2).value("code", 'O').execute();
View Full Code Here

Examples of org.apache.metamodel.query.CompiledQuery.toSql()

        final JdbcCompiledQuery jdbcCompiledQuery = (JdbcCompiledQuery) compiledQuery;
        assertEquals(0, jdbcCompiledQuery.getActiveLeases());
        assertEquals(0, jdbcCompiledQuery.getIdleLeases());

        String compliedQueryString = compiledQuery.toSql();

        assertEquals(
                "SELECT a._CUSTOMERNUMBER_, a._CUSTOMERNAME_, a._CONTACTLASTNAME_, a._CONTACTFIRSTNAME_, a._PHONE_, a._ADDRESSLINE1_, a._ADDRESSLINE2_, a._CITY_, "
                        + "a._STATE_, a._POSTALCODE_, a._COUNTRY_, a._SALESREPEMPLOYEENUMBER_, a._CREDITLIMIT_ FROM PUBLIC._CUSTOMERS_ a WHERE a._CUSTOMERNUMBER_ = ? "
                        + "AND a._CUSTOMERNAME_ = ?", compliedQueryString.replace('\"', '_'));
View Full Code Here

Examples of org.apache.metamodel.query.OperatorType.toSql()

        final OperatorType operator = filterItem.getOperator();
        if (operator == OperatorType.IN) {
            throw new UnsupportedOperationException("IN operator not supported: " + filterItem);
        }
        sb.append(operator.toSql());
        sb.append(' ');

        final Object operand = filterItem.getOperand();
        if (operand == null) {
            sb.append("null");
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.