本文整理汇总了Java中org.hsqldb.RowAction类的典型用法代码示例。如果您正苦于以下问题:Java RowAction类的具体用法?Java RowAction怎么用?Java RowAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RowAction类属于org.hsqldb包,在下文中一共展示了RowAction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: commitRow
import org.hsqldb.RowAction; //导入依赖的package包/类
public void commitRow(Session session, Row row, int changeAction,
int txModel) {
switch (changeAction) {
case RowAction.ACTION_DELETE :
remove(row);
break;
case RowAction.ACTION_INSERT :
break;
case RowAction.ACTION_INSERT_DELETE :
// INSERT + DELEETE
remove(row);
break;
case RowAction.ACTION_DELETE_FINAL :
throw Error.runtimeError(ErrorCode.U_S0500, "RowStore");
}
}
示例2: commitRow
import org.hsqldb.RowAction; //导入依赖的package包/类
public void commitRow(Session session, Row row, int changeAction,
int txModel) {
Object[] data = row.getData();
switch (changeAction) {
case RowAction.ACTION_DELETE :
database.logger.writeDeleteStatement(session, (Table) table,
data);
break;
case RowAction.ACTION_INSERT :
database.logger.writeInsertStatement(session, row,
(Table) table);
break;
case RowAction.ACTION_INSERT_DELETE :
// INSERT + DELETE
break;
case RowAction.ACTION_DELETE_FINAL :
throw Error.runtimeError(ErrorCode.U_S0500, "RowStore");
}
}
示例3: rollbackRow
import org.hsqldb.RowAction; //导入依赖的package包/类
public void rollbackRow(Session session, Row row, int changeAction,
int txModel) {
switch (changeAction) {
case RowAction.ACTION_DELETE :
if (txModel == TransactionManager.LOCKS) {
((RowAVL) row).setNewNodes(this);
indexRow(session, row);
}
break;
case RowAction.ACTION_INSERT :
delete(session, row);
remove(row);
break;
case RowAction.ACTION_INSERT_DELETE :
// INSERT + DELETE
remove(row);
break;
}
}
示例4: getNewCachedObject
import org.hsqldb.RowAction; //导入依赖的package包/类
public CachedObject getNewCachedObject(Session session,
Object object)
{
Row row = new RowAVL(table, (Object[]) object);
if (session != null) {
RowAction.addAction(session, RowAction.ACTION_INSERT, table, row);
}
int id = rowIdSequence++;
row.setPos(id);
rowIdMap.put(id, row);
return row;
}
示例5: commitRow
import org.hsqldb.RowAction; //导入依赖的package包/类
public void commitRow(Session session, Row row, int changeAction,
int txModel) {
switch (changeAction) {
case RowAction.ACTION_DELETE :
remove(row);
break;
case RowAction.ACTION_INSERT :
break;
case RowAction.ACTION_INSERT_DELETE :
// INSERT + DELEETE
remove(row);
break;
case RowAction.ACTION_DELETE_FINAL :
delete(session, row);
remove(row);
break;
}
}
示例6: getNewCachedObject
import org.hsqldb.RowAction; //导入依赖的package包/类
public CachedObject getNewCachedObject(Session session, Object object,
boolean tx) {
int id;
synchronized (this) {
id = rowIdSequence++;
}
Row row = new RowAVL(table, (Object[]) object, id, this);
if (tx) {
RowAction action = new RowAction(session, table,
RowAction.ACTION_INSERT, row,
null);
row.rowAction = action;
}
return row;
}
示例7: commitRow
import org.hsqldb.RowAction; //导入依赖的package包/类
public void commitRow(Session session, Row row, int changeAction,
int txModel) {
switch (changeAction) {
case RowAction.ACTION_DELETE :
remove(row.getPos());
break;
case RowAction.ACTION_INSERT :
break;
case RowAction.ACTION_INSERT_DELETE :
// INSERT + DELEETE
remove(row.getPos());
break;
case RowAction.ACTION_DELETE_FINAL :
delete(session, row);
break;
}
}
示例8: rollbackRow
import org.hsqldb.RowAction; //导入依赖的package包/类
public void rollbackRow(Session session, Row row, int changeAction,
int txModel) {
switch (changeAction) {
case RowAction.ACTION_DELETE :
row = (Row) get(row, true);
((RowAVL) row).setNewNodes(this);
row.keepInMemory(false);
indexRow(session, row);
break;
case RowAction.ACTION_INSERT :
delete(session, row);
remove(row.getPos());
break;
case RowAction.ACTION_INSERT_DELETE :
// INSERT + DELEETE
remove(row.getPos());
break;
}
}
示例9: getNewCachedObject
import org.hsqldb.RowAction; //导入依赖的package包/类
public CachedObject getNewCachedObject(Session session, Object object,
boolean tx) {
Row row = new RowAVLDisk(table, (Object[]) object, this);
add(row);
if (tx) {
RowAction action = new RowAction(session, table,
RowAction.ACTION_INSERT, row,
null);
row.rowAction = action;
}
return row;
}
示例10: rollbackRow
import org.hsqldb.RowAction; //导入依赖的package包/类
public void rollbackRow(Session session, Row row, int changeAction,
int txModel) {
switch (changeAction) {
case RowAction.ACTION_DELETE :
row = (Row) get(row, true);
((RowAVL) row).setNewNodes(this);
row.keepInMemory(false);
indexRow(session, row);
break;
case RowAction.ACTION_INSERT :
delete(session, row);
remove(row);
break;
case RowAction.ACTION_INSERT_DELETE :
// INSERT + DELEETE
remove(row);
break;
}
}
示例11: getNewCachedObject
import org.hsqldb.RowAction; //导入依赖的package包/类
public CachedObject getNewCachedObject(Session session, Object object,
boolean tx) {
int id = rowIdSequence.getAndIncrement();
Row row = new RowAVL(table, (Object[]) object, id, this);
if (tx) {
RowAction.addInsertAction(session, table, row);
}
return row;
}
示例12: postCommitAction
import org.hsqldb.RowAction; //导入依赖的package包/类
public void postCommitAction(Session session, RowAction action) {
if (action.getType() == RowAction.ACTION_DELETE_FINAL
&& !action.isDeleteComplete()) {
action.setDeleteComplete();
Row row = action.getRow();
delete(session, row);
}
}
示例13: commitRow
import org.hsqldb.RowAction; //导入依赖的package包/类
public void commitRow(Session session, Row row, int changeAction,
int txModel) {
Object[] data = row.getData();
switch (changeAction) {
case RowAction.ACTION_DELETE :
database.logger.writeDeleteStatement(session, (Table) table,
data);
if (txModel == TransactionManager.LOCKS) {
remove(row);
}
break;
case RowAction.ACTION_INSERT :
database.logger.writeInsertStatement(session, row,
(Table) table);
break;
case RowAction.ACTION_INSERT_DELETE :
// INSERT + DELETE
if (txModel == TransactionManager.LOCKS) {
remove(row);
}
break;
case RowAction.ACTION_DELETE_FINAL :
throw Error.runtimeError(ErrorCode.U_S0500, "RowStore");
}
}
示例14: add
import org.hsqldb.RowAction; //导入依赖的package包/类
public synchronized void add(Session session, CachedObject object,
boolean tx) {
super.add(session, object, tx);
if (tx) {
RowAction.addInsertAction(session, (Table) table, (Row) object);
}
}
示例15: canRead
import org.hsqldb.RowAction; //导入依赖的package包/类
public boolean canRead(Session session, CachedObject object, int mode,
int[] colMap) {
RowAction action = ((Row) object).rowAction;
if (action == null) {
return true;
}
return action.canRead(session, mode);
}