|
EclipseLink 2.0.0, build 'v20091127-r5931' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.sequencing.Sequence
org.eclipse.persistence.sequencing.StandardSequence
org.eclipse.persistence.sequencing.QuerySequence
public class QuerySequence
Purpose: An generic query sequence mechanism.
Description This sequence allows the sequence operations to be customized through user defined queries. A select and update query can be set which can use custom SQL or stored procedures to define the sequencing mechanism. If a single stored procedure is used that does the update and select only the select query needs to be set.
Field Summary | |
---|---|
protected ValueReadQuery |
selectQuery
|
protected boolean |
shouldAcquireValueAfterInsert
|
protected boolean |
shouldSelectBeforeUpdate
|
protected boolean |
shouldSkipUpdate
|
protected boolean |
shouldUseTransaction
|
protected DataModifyQuery |
updateQuery
|
protected boolean |
wasSelectQueryCreated
|
protected boolean |
wasUpdateQueryCreated
|
Fields inherited from class org.eclipse.persistence.sequencing.Sequence |
---|
depth, initialValue, isCustomQualifier, name, platform, qualifier, size |
Constructor Summary | |
---|---|
QuerySequence()
|
|
QuerySequence(boolean shouldAcquireValueAfterInsert,
boolean shouldUseTransaction)
|
|
QuerySequence(java.lang.String name)
Create a new sequence with the name. |
|
QuerySequence(java.lang.String name,
boolean shouldAcquireValueAfterInsert,
boolean shouldUseTransaction)
|
|
QuerySequence(java.lang.String name,
int size)
Create a new sequence with the name and sequence pre-allocation size. |
|
QuerySequence(java.lang.String name,
int size,
boolean shouldAcquireValueAfterInsert,
boolean shouldUseTransaction)
|
|
QuerySequence(java.lang.String name,
int size,
int initialValue)
|
|
QuerySequence(java.lang.String name,
int size,
int initialValue,
boolean shouldAcquireValueAfterInsert,
boolean shouldUseTransaction)
|
Method Summary | |
---|---|
protected ValueReadQuery |
buildSelectQuery()
INTERNAL: |
protected ValueReadQuery |
buildSelectQuery(java.lang.String seqName,
java.lang.Integer size)
INTERNAL: |
protected DataModifyQuery |
buildUpdateQuery()
INTERNAL: |
protected DataModifyQuery |
buildUpdateQuery(java.lang.String seqName,
java.lang.Number sizeOrNewValue)
INTERNAL: |
protected java.util.Vector |
createArguments(DatabaseQuery query,
java.lang.String seqName,
java.lang.Number sizeOrNewValue)
INTERNAL: |
boolean |
equals(java.lang.Object obj)
|
ValueReadQuery |
getSelectQuery()
PUBLIC: |
DataModifyQuery |
getUpdateQuery()
PUBLIC: |
void |
onConnect()
INTERNAL: |
void |
onDisconnect()
INTERNAL: |
protected java.lang.Object |
select(org.eclipse.persistence.internal.databaseaccess.Accessor accessor,
org.eclipse.persistence.internal.sessions.AbstractSession writeSession,
java.lang.String seqName,
java.lang.Integer size)
INTERNAL: |
void |
setSelectQuery(ValueReadQuery query)
PUBLIC: |
void |
setShouldAcquireValueAfterInsert(boolean shouldAcquireValueAfterInsert)
PUBLIC: |
void |
setShouldSelectBeforeUpdate(boolean shouldSelectBeforeUpdate)
PUBLIC: |
void |
setShouldSkipUpdate(boolean shouldSkipUpdate)
PUBLIC: |
void |
setShouldUseTransaction(boolean shouldUseTransaction)
PUBLIC: |
void |
setUpdateQuery(DataModifyQuery query)
PUBLIC: |
boolean |
shouldAcquireValueAfterInsert()
PUBLIC: |
boolean |
shouldSelectBeforeUpdate()
PUBLIC: |
boolean |
shouldSkipUpdate()
PUBLIC: |
boolean |
shouldUseTransaction()
PUBLIC: |
protected void |
update(org.eclipse.persistence.internal.databaseaccess.Accessor accessor,
org.eclipse.persistence.internal.sessions.AbstractSession writeSession,
java.lang.String seqName,
java.lang.Number sizeOrNewValue)
INTERNAL: |
protected java.lang.Number |
updateAndSelectSequence(org.eclipse.persistence.internal.databaseaccess.Accessor accessor,
org.eclipse.persistence.internal.sessions.AbstractSession writeSession,
java.lang.String seqName,
int size)
INTERNAL: |
Methods inherited from class org.eclipse.persistence.sequencing.StandardSequence |
---|
createVector, getGeneratedValue, getGeneratedVector, setInitialValue |
Methods inherited from class org.eclipse.persistence.sequencing.Sequence |
---|
clone, equalNameAndSize, getDatasourcePlatform, getGeneratedValue, getGeneratedVector, getInitialValue, getName, getPreallocationSize, getQualified, getQualifier, isConnected, isCustomQualifier, isNative, isTable, isUnaryTable, onConnect, onDisconnect, setDatasourcePlatform, setName, setPreallocationSize, setQualifier, shouldUsePreallocation, verifyPlatform |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ValueReadQuery selectQuery
protected DataModifyQuery updateQuery
protected boolean shouldAcquireValueAfterInsert
protected boolean shouldUseTransaction
protected boolean shouldSkipUpdate
protected boolean shouldSelectBeforeUpdate
protected boolean wasSelectQueryCreated
protected boolean wasUpdateQueryCreated
Constructor Detail |
---|
public QuerySequence()
public QuerySequence(java.lang.String name)
public QuerySequence(java.lang.String name, int size)
public QuerySequence(java.lang.String name, int size, int initialValue)
public QuerySequence(boolean shouldAcquireValueAfterInsert, boolean shouldUseTransaction)
public QuerySequence(java.lang.String name, boolean shouldAcquireValueAfterInsert, boolean shouldUseTransaction)
public QuerySequence(java.lang.String name, int size, boolean shouldAcquireValueAfterInsert, boolean shouldUseTransaction)
public QuerySequence(java.lang.String name, int size, int initialValue, boolean shouldAcquireValueAfterInsert, boolean shouldUseTransaction)
Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class Sequence
public boolean shouldAcquireValueAfterInsert()
shouldAcquireValueAfterInsert
in class StandardSequence
public void setShouldAcquireValueAfterInsert(boolean shouldAcquireValueAfterInsert)
public boolean shouldUseTransaction()
shouldUseTransaction
in class StandardSequence
public void setShouldUseTransaction(boolean shouldUseTransaction)
public void setSelectQuery(ValueReadQuery query)
public ValueReadQuery getSelectQuery()
public void setUpdateQuery(DataModifyQuery query)
public DataModifyQuery getUpdateQuery()
public void setShouldSkipUpdate(boolean shouldSkipUpdate)
public boolean shouldSkipUpdate()
public void setShouldSelectBeforeUpdate(boolean shouldSelectBeforeUpdate)
public boolean shouldSelectBeforeUpdate()
protected ValueReadQuery buildSelectQuery()
protected DataModifyQuery buildUpdateQuery()
protected ValueReadQuery buildSelectQuery(java.lang.String seqName, java.lang.Integer size)
protected DataModifyQuery buildUpdateQuery(java.lang.String seqName, java.lang.Number sizeOrNewValue)
public void onConnect()
onConnect
in class StandardSequence
public void onDisconnect()
onDisconnect
in class StandardSequence
protected java.lang.Number updateAndSelectSequence(org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession writeSession, java.lang.String seqName, int size)
updateAndSelectSequence
in class StandardSequence
protected java.lang.Object select(org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession writeSession, java.lang.String seqName, java.lang.Integer size)
protected void update(org.eclipse.persistence.internal.databaseaccess.Accessor accessor, org.eclipse.persistence.internal.sessions.AbstractSession writeSession, java.lang.String seqName, java.lang.Number sizeOrNewValue)
protected java.util.Vector createArguments(DatabaseQuery query, java.lang.String seqName, java.lang.Number sizeOrNewValue)
|
EclipseLink 2.0.0, build 'v20091127-r5931' API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |