Examples of QEmployee


Examples of com.mysema.query.sql.domain.QEmployee

               SQLExpressions.sum(employee.salary).over().partitionBy(employee.superiorId).orderBy(employee.lastname, employee.salary),
               SQLExpressions.sum(employee.salary).over().orderBy(employee.superiorId, employee.salary),
               SQLExpressions.sum(employee.salary).over());

        // shorter version
        QEmployee e = employee;
        oracleQuery().from(e)
            .orderBy(e.salary.asc(), e.superiorId.asc())
            .list(e.lastname, e.salary,
               SQLExpressions.sum(e.salary).over().partitionBy(e.superiorId).orderBy(e.lastname, e.salary),
               SQLExpressions.sum(e.salary).over().orderBy(e.superiorId, e.salary),
View Full Code Here

Examples of com.mysema.query.sql.domain.QEmployee

    }

    @Test
    public void Delete_with_SubQuery_exists() {
        QSurvey survey1 = new QSurvey("s1");
        QEmployee employee = new QEmployee("e");
        SQLDeleteClause delete = delete(survey1);
        delete.where(survey1.name.eq("XXX"),
                sq().from(employee).where(survey1.id.eq(employee.id)).exists());
        delete.execute();
    }
View Full Code Here

Examples of com.mysema.query.sql.domain.QEmployee

    }

    @Test
    public void Delete_with_SubQuery_exists_Params() {
        QSurvey survey1 = new QSurvey("s1");
        QEmployee employee = new QEmployee("e");

        Param<Integer> param = new Param<Integer>(Integer.class, "param");
        SQLSubQuery sq = sq().from(employee).where(employee.id.eq(param));
        sq.set(param, -12478923);
View Full Code Here

Examples of com.mysema.query.sql.domain.QEmployee

    }

    @Test
    public void Delete_with_SubQuery_exists2() {
        QSurvey survey1 = new QSurvey("s1");
        QEmployee employee = new QEmployee("e");
        SQLDeleteClause delete = delete(survey1);
        delete.where(survey1.name.eq("XXX"),
                sq().from(employee).where(survey1.name.eq(employee.lastname)).exists());
        delete.execute();
    }
View Full Code Here

Examples of com.mysema.query.sql.domain.QEmployee

    }
   
    @Test
    public void HashCode2() {
        QSurvey survey = new QSurvey("entity");
        QEmployee employee = new QEmployee("entity");
        ListSubQuery<Integer> query1 = new SQLSubQuery().from(survey).list(survey.id);
        ListSubQuery<Integer> query2 = new SQLSubQuery().from(employee).list(employee.id);

        Set<ListSubQuery<Integer>> queries = new HashSet<ListSubQuery<Integer>>();
        queries.add(query1);
View Full Code Here

Examples of com.mysema.query.sql.domain.QEmployee

        assertEquals(employee.firstname, exprs.get(2));
    }

    @Test
    public void List_Entity() {
        QEmployee employee2 = new QEmployee("employee2");
        SQLSubQuery query = new SQLSubQuery();
        Expression<?> expr = query.from(employee)
             .innerJoin(employee.superiorIdKey, employee2)
             .list(employee, employee2.id);
View Full Code Here

Examples of com.mysema.query.sql.domain.QEmployee

    @Test
    public void Complex() {
        // related to #584795
        QSurvey survey = new QSurvey("survey");
        QEmployee emp1 = new QEmployee("emp1");
        QEmployee emp2 = new QEmployee("emp2");
        SubQueryExpression<?> subQuery = new SQLSubQuery().from(survey)
          .innerJoin(emp1)
           .on(survey.id.eq(emp1.id))
          .innerJoin(emp2)
           .on(emp1.superiorId.eq(emp2.superiorId), emp1.firstname.eq(emp2.firstname))
View Full Code Here

Examples of org.hibernate.examples.mapping.QEmployee

        Employee emp = new Employee();
        emp.setName("Sunghyouk Bae");
        emp.setEmpNo("21011");
        emp = employeeRepository.save(emp);

        QEmployee $ = QEmployee.employee;
        JPAQuery query = new JPAQuery(em);

        Employee loaded = query.from($)
                               .where($.empNo.eq("21011"))
                               .uniqueResult($);
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.