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 StatementBatch
tg
- 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 StatementBatch
field
- The fieldpublic void setRecentLink(@Nonnull DBField field, @Nonnull java.lang.String txt)
setRecentLink
in interface StatementBatch
field
- The fieldtxt
- the textpublic void deleteField(@Nonnull java.lang.String table, long row, @Nonnull GlobalId fieldId)
deleteField
in interface StatementBatch
table
- the tablerow
- the row to usefieldId
- the fieldpublic void deleteCriteria(@Nonnull java.lang.String table, @Nonnull java.lang.String criteria)
deleteCriteria
in interface StatementBatch
table
- the table.criteria
- the criteriapublic void deleteCriteriaPost(@Nonnull java.lang.String table, @Nonnull java.lang.String criteria)
deleteCriteriaPost
in interface StatementBatch
table
- the table.criteria
- the criteriapublic void deleteRow(@Nonnull java.lang.String table, long row)
deleteRow
in interface StatementBatch
table
- the tablerow
- the row to usepublic void addSystemTransaction(@Nonnull java.lang.String systemCode)
addSystemTransaction
in interface StatementBatch
systemCode
- the codepublic void addInsert(@Nonnull java.lang.String statement)
addInsert
in interface StatementBatch
statement
- the statementpublic void addRowTrans(@Nonnull RowTrans rt)
addRowTrans
in interface StatementBatch
rt
- the row transaction@CheckReturnValue public boolean hasSQLEscape()
hasSQLEscape
in interface StatementBatch
public 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 StatementBatch
obj
- 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 StatementBatch
obj
- 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 StatementBatch
dbClass
- the classrowKey
- the rowfield
- The fieldpublic void copyFieldToTrans(@Nonnull DBClass dbClass, @Nonnull java.lang.Long rowKey, @Nonnull java.lang.String fieldID)
copyFieldToTrans
in interface StatementBatch
dbClass
- the classrowKey
- the rowfieldID
- The field IDpublic void addUpdate(@Nonnull java.lang.String statement)
addUpdate
in interface StatementBatch
statement
- the statementpublic void addPreStatements(@Nonnull java.lang.String statement)
addPreStatements
in interface StatementBatch
statement
- the statementpublic void beginTransaction() throws java.lang.Exception
beginTransaction
in interface StatementBatch
java.lang.Exception
- Exception A serious problempublic void execute() throws java.lang.Exception
execute
in interface StatementBatch
java.lang.Exception
- Exception A serious problempublic void postSave()
postSave
in interface StatementBatch
public void correctJournal(@Nonnegative long rowUID, @Nonnull DBClass rootClass)
correctJournal
in interface StatementBatch
rowUID
- the row to checkrootClass
- root class@CheckReturnValue public boolean supportWildCardCopyToJournal()
supportWildCardCopyToJournal
in interface StatementBatch
@CheckReturnValue public boolean supportPreparedInsert()
supportPreparedInsert
in interface StatementBatch
public void preparedInsert(@Nonnull java.lang.String statement, @Nonnull java.lang.Object[] args)
preparedInsert
in interface StatementBatch
statement
- the statementargs
- the argumentsstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.