Search in sources :

Example 1 with QueryMutability

use of com.querydsl.core.QueryMutability in project querydsl by querydsl.

the class QueryMutabilityTest method queryMutability.

@Test
public void queryMutability() throws IOException, SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
    QProduct product = QProduct.product;
    JDOQuery<?> query = query().from(product);
    new QueryMutability(query).test(product.name, product.description);
}
Also used : QueryMutability(com.querydsl.core.QueryMutability) QProduct(com.querydsl.jdo.test.domain.QProduct) Test(org.junit.Test)

Example 2 with QueryMutability

use of com.querydsl.core.QueryMutability in project querydsl by querydsl.

the class HibernateQueryMutabilityTest method test.

@Test
public void test() throws SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, IOException {
    QCat cat = QCat.cat;
    HibernateQuery<?> query = query().from(cat);
    new QueryMutability(query).test(cat, cat.name);
}
Also used : QCat(com.querydsl.jpa.domain.QCat) QueryMutability(com.querydsl.core.QueryMutability) Test(org.junit.Test)

Example 3 with QueryMutability

use of com.querydsl.core.QueryMutability in project querydsl by querydsl.

the class QueryMutabilityTest method queryMutability.

@Test
@Ignore
public void queryMutability() throws SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, IOException {
    SAnimal cat = new SAnimal("cat");
    HibernateSQLQuery<?> query = query().from(cat);
    new QueryMutability(query).test(cat.id, cat.name);
}
Also used : SAnimal(com.querydsl.jpa.domain.sql.SAnimal) QueryMutability(com.querydsl.core.QueryMutability) Ignore(org.junit.Ignore) Test(org.junit.Test)

Example 4 with QueryMutability

use of com.querydsl.core.QueryMutability in project querydsl by querydsl.

the class QueryMutabilityTest method test.

@Test
public void test() throws IOException, SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException {
    SQLQuery<?> query = new SQLQuery<Void>(connection, DerbyTemplates.DEFAULT);
    query.from(survey);
    query.addListener(new TestLoggingListener());
    new QueryMutability(query).test(survey.id, survey.name);
}
Also used : QueryMutability(com.querydsl.core.QueryMutability) Test(org.junit.Test)

Example 5 with QueryMutability

use of com.querydsl.core.QueryMutability in project querydsl by querydsl.

the class QueryMutabilityTest method test.

@Test
public void test() throws SecurityException, IllegalArgumentException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, IOException {
    QCat cat = QCat.cat;
    CollQuery<?> query = new CollQuery<Void>();
    query.from(cat, Collections.<Cat>emptyList());
    new QueryMutability(query).test(cat.id, cat.name);
}
Also used : QueryMutability(com.querydsl.core.QueryMutability) Test(org.junit.Test)

Aggregations

QueryMutability (com.querydsl.core.QueryMutability)6 Test (org.junit.Test)6 SAnimal (com.querydsl.jpa.domain.sql.SAnimal)2 QProduct (com.querydsl.jdo.test.domain.QProduct)1 Cat (com.querydsl.jpa.domain.Cat)1 QCat (com.querydsl.jpa.domain.QCat)1 Ignore (org.junit.Ignore)1