kodo.jdbc.sql
Class TrueUnion
java.lang.Object
org.apache.openjpa.jdbc.sql.LogicalUnion
kodo.jdbc.sql.TrueUnion
- All Implemented Interfaces:
- org.apache.openjpa.jdbc.sql.SelectExecutor, org.apache.openjpa.jdbc.sql.Union
public class TrueUnion
- extends org.apache.openjpa.jdbc.sql.LogicalUnion
True SQL UNION. The following limitations apply:
- Zero or one mapping per select.
- If non-column ordering critieria is added or incompatible ordering
columns are selected, the UNION will fallback to a logical union.
| Nested classes/interfaces inherited from class org.apache.openjpa.jdbc.sql.LogicalUnion |
org.apache.openjpa.jdbc.sql.LogicalUnion.Selector, org.apache.openjpa.jdbc.sql.LogicalUnion.UnionSelect |
| Fields inherited from class org.apache.openjpa.jdbc.sql.LogicalUnion |
desc, dict, mappings, sels |
|
Constructor Summary |
TrueUnion(org.apache.openjpa.jdbc.conf.JDBCConfiguration conf,
int selects)
Constructor. |
TrueUnion(org.apache.openjpa.jdbc.conf.JDBCConfiguration conf,
org.apache.openjpa.jdbc.sql.Select[] seeds)
Constructor used to seed the internal selects. |
|
Method Summary |
void |
abortUnion()
|
org.apache.openjpa.jdbc.sql.Result |
execute(org.apache.openjpa.jdbc.kernel.JDBCStore store,
org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration fetch,
int lockLevel)
|
int |
getCount(org.apache.openjpa.jdbc.kernel.JDBCStore store)
|
String |
getOrdering()
|
boolean |
isUnion()
|
protected org.apache.openjpa.jdbc.sql.LogicalUnion.UnionSelect |
newUnionSelect(org.apache.openjpa.jdbc.sql.SelectImpl seed,
int pos)
|
void |
select(org.apache.openjpa.jdbc.sql.Union.Selector selector)
|
boolean |
supportsLocking()
|
boolean |
supportsRandomAccess(boolean forUpdate)
|
org.apache.openjpa.jdbc.sql.SQLBuffer |
toSelect(boolean forUpdate,
org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration fetch)
|
org.apache.openjpa.jdbc.sql.SQLBuffer |
toSelectCount()
|
| Methods inherited from class org.apache.openjpa.jdbc.sql.LogicalUnion |
execute, getAutoDistinct, getConfiguration, getJoinSyntax, getSelects, isDistinct, isLRS, isSingleResult, setAutoDistinct, setDistinct, setJoinSyntax, setLRS, setSingleResult, toString |
TrueUnion
public TrueUnion(org.apache.openjpa.jdbc.conf.JDBCConfiguration conf,
int selects)
- Constructor.
- Parameters:
conf - system configurationselects - the number of SQL selects to union together
TrueUnion
public TrueUnion(org.apache.openjpa.jdbc.conf.JDBCConfiguration conf,
org.apache.openjpa.jdbc.sql.Select[] seeds)
- Constructor used to seed the internal selects.
newUnionSelect
protected org.apache.openjpa.jdbc.sql.LogicalUnion.UnionSelect newUnionSelect(org.apache.openjpa.jdbc.sql.SelectImpl seed,
int pos)
- Overrides:
newUnionSelect in class org.apache.openjpa.jdbc.sql.LogicalUnion
isUnion
public boolean isUnion()
- Specified by:
isUnion in interface org.apache.openjpa.jdbc.sql.Union- Overrides:
isUnion in class org.apache.openjpa.jdbc.sql.LogicalUnion
abortUnion
public void abortUnion()
- Specified by:
abortUnion in interface org.apache.openjpa.jdbc.sql.Union- Overrides:
abortUnion in class org.apache.openjpa.jdbc.sql.LogicalUnion
getOrdering
public String getOrdering()
- Specified by:
getOrdering in interface org.apache.openjpa.jdbc.sql.Union- Overrides:
getOrdering in class org.apache.openjpa.jdbc.sql.LogicalUnion
toSelect
public org.apache.openjpa.jdbc.sql.SQLBuffer toSelect(boolean forUpdate,
org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration fetch)
- Specified by:
toSelect in interface org.apache.openjpa.jdbc.sql.SelectExecutor- Overrides:
toSelect in class org.apache.openjpa.jdbc.sql.LogicalUnion
toSelectCount
public org.apache.openjpa.jdbc.sql.SQLBuffer toSelectCount()
- Specified by:
toSelectCount in interface org.apache.openjpa.jdbc.sql.SelectExecutor- Overrides:
toSelectCount in class org.apache.openjpa.jdbc.sql.LogicalUnion
supportsRandomAccess
public boolean supportsRandomAccess(boolean forUpdate)
- Specified by:
supportsRandomAccess in interface org.apache.openjpa.jdbc.sql.SelectExecutor- Overrides:
supportsRandomAccess in class org.apache.openjpa.jdbc.sql.LogicalUnion
supportsLocking
public boolean supportsLocking()
- Specified by:
supportsLocking in interface org.apache.openjpa.jdbc.sql.SelectExecutor- Overrides:
supportsLocking in class org.apache.openjpa.jdbc.sql.LogicalUnion
getCount
public int getCount(org.apache.openjpa.jdbc.kernel.JDBCStore store)
throws SQLException
- Specified by:
getCount in interface org.apache.openjpa.jdbc.sql.SelectExecutor- Overrides:
getCount in class org.apache.openjpa.jdbc.sql.LogicalUnion
- Throws:
SQLException
execute
public org.apache.openjpa.jdbc.sql.Result execute(org.apache.openjpa.jdbc.kernel.JDBCStore store,
org.apache.openjpa.jdbc.kernel.JDBCFetchConfiguration fetch,
int lockLevel)
throws SQLException
- Specified by:
execute in interface org.apache.openjpa.jdbc.sql.SelectExecutor- Overrides:
execute in class org.apache.openjpa.jdbc.sql.LogicalUnion
- Throws:
SQLException
select
public void select(org.apache.openjpa.jdbc.sql.Union.Selector selector)
- Specified by:
select in interface org.apache.openjpa.jdbc.sql.Union- Overrides:
select in class org.apache.openjpa.jdbc.sql.LogicalUnion
Copyright 2001-2006 BEA Systems, Inc. All Rights Reserved.