public class StatementBatchV9 extends java.lang.Object implements StatementBatch
SINGLE_STATEMENTS, STATEMENTS_WRITTEN| Constructor and Description |
|---|
StatementBatchV9(VirtualDB vDB,
long transNr) |
| Modifier and Type | Method and Description |
|---|---|
void |
addInsert(java.lang.String statement) |
void |
addPreStatements(java.lang.String statement) |
void |
addRowTrans(RowTrans rt)
add a row transaction
|
void |
addSystemTransaction(java.lang.String systemCode) |
void |
addUpdate(java.lang.String statement) |
void |
beginTransaction() |
void |
copyFieldToTrans(DBClass dbClass,
java.lang.Long rowKey,
DBField field)
copy the field into the transaction table.
|
void |
copyFieldToTrans(DBClass dbClass,
java.lang.Long rowKey,
java.lang.String fieldID)
copy the field into the transaction table.
|
void |
correctJournal(long rowUID,
DBClass rootClass)
we know the journal is wrong for this row.
|
void |
deleteCriteria(java.lang.String table,
java.lang.String criteria)
delete a criteria from a table.
|
void |
deleteCriteriaPost(java.lang.String table,
java.lang.String criteria)
delete a criteria from a table.
|
void |
deleteField(java.lang.String table,
long row,
GlobalId fieldId) |
void |
deleteRow(java.lang.String table,
long row) |
void |
execute()
If the transaction is not handled externally then I'll handle it.
|
int |
generateFieldSegment(DBObject obj,
DBField field,
java.lang.Object current,
java.lang.Object previous,
int startSeq,
java.util.ArrayList segmentList,
int pos)
create a list of segments
|
java.lang.String |
getRecentLink(DBField field) |
long |
getTransMS()
the transaction milliseconds
|
long |
getTransNr()
the transaction number
|
boolean |
hasSQLEscape() |
void |
postSave()
post save
|
void |
preparedInsert(java.lang.String statement,
java.lang.Object[] args)
prepared statement
|
void |
setRecentLink(DBField field,
java.lang.String txt) |
void |
setTransHeader(TransGroup tg,
Login realLogin,
java.lang.String reason)
set the transaction header
|
boolean |
supportPreparedInsert()
do we support prepared insert
|
boolean |
supportWildCardCopyToJournal()
do we support wild card copy
|
int |
writeFieldSQL(DBObject obj,
DBField field,
java.lang.Object current,
java.lang.Object previous,
int startSeq,
int pos)
create a list of segments
|
public StatementBatchV9(@Nonnull
VirtualDB vDB,
long transNr)
throws java.lang.Exception
vDB - the layertransNr - the transaction numberjava.lang.Exception - Exception A serious problempublic void setTransHeader(@Nullable
TransGroup tg,
Login realLogin,
java.lang.String reason)
setTransHeader in interface StatementBatchtg - the transaction grouprealLogin - the real loginreason - the reason@Nonnegative @CheckReturnValue public long getTransNr()
getTransNr in interface StatementBatch@Nonnegative @CheckReturnValue public long getTransMS()
getTransMS in interface StatementBatch@CheckReturnValue
public java.lang.String getRecentLink(@Nonnull
DBField field)
getRecentLink in interface StatementBatchfield - The fieldpublic void setRecentLink(@Nonnull
DBField field,
@Nonnull
java.lang.String txt)
setRecentLink in interface StatementBatchfield - The fieldtxt - the textpublic void deleteField(@Nonnull
java.lang.String table,
long row,
@Nonnull
GlobalId fieldId)
deleteField in interface StatementBatchtable - the tablerow - the row to usefieldId - the fieldpublic void deleteCriteria(@Nonnull
java.lang.String table,
@Nonnull
java.lang.String criteria)
deleteCriteria in interface StatementBatchtable - the table.criteria - the criteriapublic void deleteCriteriaPost(@Nonnull
java.lang.String table,
@Nonnull
java.lang.String criteria)
deleteCriteriaPost in interface StatementBatchtable - the table.criteria - the criteriapublic void deleteRow(@Nonnull
java.lang.String table,
long row)
deleteRow in interface StatementBatchtable - the tablerow - the row to usepublic void addSystemTransaction(@Nonnull
java.lang.String systemCode)
addSystemTransaction in interface StatementBatchsystemCode - the codepublic void addInsert(@Nonnull
java.lang.String statement)
addInsert in interface StatementBatchstatement - the statementpublic void addRowTrans(@Nonnull
RowTrans rt)
addRowTrans in interface StatementBatchrt - the row transaction@CheckReturnValue public boolean hasSQLEscape()
hasSQLEscape in interface StatementBatchpublic int writeFieldSQL(@Nonnull
DBObject obj,
@Nonnull
DBField field,
@Nullable
java.lang.Object current,
@Nullable
java.lang.Object previous,
@Nonnegative
int startSeq,
@Nonnegative
int pos)
throws java.lang.Exception
writeFieldSQL in interface StatementBatchobj - The base objectfield - the field to generate segments forcurrent - The current valueprevious - The previous valuestartSeq - The starting sequence numberpos - the positionjava.lang.Exception - A serious problempublic int generateFieldSegment(@Nonnull
DBObject obj,
@Nonnull
DBField field,
@Nullable
java.lang.Object current,
@Nullable
java.lang.Object previous,
@Nonnegative
int startSeq,
@Nonnull
java.util.ArrayList segmentList,
@Nonnegative
int pos)
throws java.lang.Exception
generateFieldSegment in interface StatementBatchobj - The base objectfield - the field to generate segments forcurrent - The current valueprevious - The previous valuestartSeq - The starting sequence numbersegmentList - The list of Segmentspos - the positionjava.lang.Exception - A serious problempublic void copyFieldToTrans(@Nonnull
DBClass dbClass,
@Nonnull
java.lang.Long rowKey,
@Nonnull
DBField field)
copyFieldToTrans in interface StatementBatchdbClass - the classrowKey - the rowfield - The fieldpublic void copyFieldToTrans(@Nonnull
DBClass dbClass,
@Nonnull
java.lang.Long rowKey,
@Nonnull
java.lang.String fieldID)
copyFieldToTrans in interface StatementBatchdbClass - the classrowKey - the rowfieldID - The field IDpublic void addUpdate(@Nonnull
java.lang.String statement)
addUpdate in interface StatementBatchstatement - the statementpublic void addPreStatements(@Nonnull
java.lang.String statement)
addPreStatements in interface StatementBatchstatement - the statementpublic void beginTransaction()
throws java.lang.Exception
beginTransaction in interface StatementBatchjava.lang.Exception - Exception A serious problempublic void execute()
throws java.lang.Exception
execute in interface StatementBatchjava.lang.Exception - Exception A serious problempublic void postSave()
postSave in interface StatementBatchpublic void correctJournal(@Nonnegative
long rowUID,
@Nonnull
DBClass rootClass)
correctJournal in interface StatementBatchrowUID - the row to checkrootClass - root class@CheckReturnValue public boolean supportWildCardCopyToJournal()
supportWildCardCopyToJournal in interface StatementBatch@CheckReturnValue public boolean supportPreparedInsert()
supportPreparedInsert in interface StatementBatchpublic void preparedInsert(@Nonnull
java.lang.String statement,
@Nonnull
java.lang.Object[] args)
preparedInsert in interface StatementBatchstatement - the statementargs - the argumentsstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.