本文整理汇总了Java中org.hsqldb.Table.clearAllData方法的典型用法代码示例。如果您正苦于以下问题:Java Table.clearAllData方法的具体用法?Java Table.clearAllData怎么用?Java Table.clearAllData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.hsqldb.Table
的用法示例。
在下文中一共展示了Table.clearAllData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: cacheClear
import org.hsqldb.Table; //导入方法依赖的package包/类
/**
* Clears the contents of cached system tables and resets user slots
* to null. <p>
*
*/
protected final void cacheClear() {
int i = sysTables.length;
while (i-- > 0) {
Table t = sysTables[i];
if (t != null) {
t.clearAllData(session);
}
sysTableSessions[i] = null;
}
isDirty = false;
}
示例2: cacheClear
import org.hsqldb.Table; //导入方法依赖的package包/类
/**
* Clears the contents of cached system tables and resets user slots
* to null. <p>
*
*/
protected final void cacheClear(Session session) {
int i = sysTables.length;
while (i-- > 0) {
Table t = sysTables[i];
if (t != null) {
t.clearAllData(session);
}
}
}
示例3: getSystemTable
import org.hsqldb.Table; //导入方法依赖的package包/类
/**
* Retrieves the system <code>Table</code> object corresponding to
* the given <code>name</code> and <code>session</code> arguments. <p>
*
* @param session the Session object requesting the table
* @param name a String identifying the desired table
* database access error occurs
* @return a system table corresponding to the <code>name</code> and
* <code>session</code> arguments
*/
public final Table getSystemTable(Session session, String name) {
Table t;
int tableIndex;
// must come first...many methods depend on this being set properly
this.session = session;
if (!isSystemTable(name)) {
return null;
}
tableIndex = getSysTableID(name);
t = sysTables[tableIndex];
// fredt - any system table that is not supported will be null here
if (t == null) {
return t;
}
// At the time of opening the database, no content is needed
// at present. However, table structure is required at this
// point to allow processing logged View defn's against system
// tables. Returning tables without content speeds the database
// open phase under such cases.
if (!withContent) {
return t;
}
if (isDirty) {
cacheClear();
}
HsqlName oldUser = sysTableSessions[tableIndex];
boolean tableValid = oldUser != null;
// user has changed and table is user-dependent
if (session.getGrantee().getName() != oldUser
&& sysTableSessionDependent[tableIndex]) {
tableValid = false;
}
if (nonCachedTablesSet.contains(name)) {
tableValid = false;
}
// any valid cached table will be returned here
if (tableValid) {
return t;
}
// fredt - clear the contents of table and set new User
t.clearAllData(session);
sysTableSessions[tableIndex] = session.getGrantee().getName();
// match and if found, generate.
t = generateTable(tableIndex);
// t will be null at this point if the implementation
// does not support the particular table.
//
// send back what we found or generated
return t;
}