Package com.mysema.query.sql.domain

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


    }

    @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

    }
   
    @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

        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

    @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

TOP

Related Classes of com.mysema.query.sql.domain.QEmployee

Copyright © 2018 www.massapicom. 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.