本文整理匯總了Java中org.dbunit.operation.DatabaseOperation.UPDATE屬性的典型用法代碼示例。如果您正苦於以下問題:Java DatabaseOperation.UPDATE屬性的具體用法?Java DatabaseOperation.UPDATE怎麽用?Java DatabaseOperation.UPDATE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在類org.dbunit.operation.DatabaseOperation
的用法示例。
在下文中一共展示了DatabaseOperation.UPDATE屬性的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getDBOperation
/**
* Gets the Database operation
*
* @param operation
* @return
* @throws Exception
*/
private static DatabaseOperation getDBOperation(@NonNull String operation)
throws Exception {
switch (operation) {
case "INSERT":
return DatabaseOperation.INSERT;
case "CLEAN_INSERT":
return DatabaseOperation.CLEAN_INSERT;
case "UPDATE":
return DatabaseOperation.UPDATE;
case "REFRESH":
return DatabaseOperation.REFRESH;
case "DELETE":
return DatabaseOperation.DELETE;
case "DELETE_ALL":
return DatabaseOperation.DELETE_ALL;
case "TRUNCATE_TABLE":
return DatabaseOperation.TRUNCATE_TABLE;
case "NONE":
return DatabaseOperation.NONE;
default:
log.error("Unknown DB operation : " + operation);
throw new Exception("Unknown DB operation : " + operation);
}
}
示例2: getSetUpOperation
protected DatabaseOperation getSetUpOperation()
throws Exception
{
if (!update) {
if (doCleanInsert())
{
return DatabaseOperation.CLEAN_INSERT;
}
return DatabaseOperation.REFRESH;
}
return DatabaseOperation.UPDATE;
}
示例3: updateStrategy
@Override
public DatabaseOperation updateStrategy() {
return DatabaseOperation.UPDATE;
}