mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-24 21:07:26 +08:00
47 lines
728 B
Java
47 lines
728 B
Java
/*
|
|
* Copyright (c) 2010 Mysema Ltd.
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
package com.mysema.query.sql;
|
|
|
|
import java.util.List;
|
|
|
|
import com.mysema.commons.lang.CloseableIterator;
|
|
import com.mysema.query.types.OrderSpecifier;
|
|
|
|
/**
|
|
* Union defines an interface for Union queries
|
|
*
|
|
* @author tiwe
|
|
*
|
|
* @param <RT>
|
|
*/
|
|
public interface Union<RT>{
|
|
|
|
|
|
/**
|
|
* Get the projection as a typed List
|
|
*
|
|
* @return
|
|
*/
|
|
List<RT> list();
|
|
|
|
|
|
/**
|
|
* Get the projection as a typed Iterator
|
|
*
|
|
* @return
|
|
*/
|
|
CloseableIterator<RT> iterate();
|
|
|
|
/**
|
|
* Define the ordering of the query results
|
|
*
|
|
* @param o
|
|
* @return
|
|
*/
|
|
Union<RT> orderBy(OrderSpecifier<?>... o);
|
|
|
|
}
|