本文整理汇总了Java中org.hsqldb.lib.Iterator类的典型用法代码示例。如果您正苦于以下问题:Java Iterator类的具体用法?Java Iterator怎么用?Java Iterator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Iterator类属于org.hsqldb.lib包,在下文中一共展示了Iterator类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: equalsVector
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
/** Tells whether the given list contains the same data as the vector */
private boolean equalsVector(HsqlList list, Vector vector) {
if (list.size() != vector.size()) {
return false;
}
Iterator listElements = list.iterator();
Enumeration vectorElements = vector.elements();
Object listObj = null;
Object vectorObj = null;
while (listElements.hasNext()) {
listObj = listElements.next();
vectorObj = vectorElements.nextElement();
if (!listObj.equals(vectorObj)) {
return false;
}
}
return true;
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:24,代码来源:TestDataStructures.java
示例2: hasColumn
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
/**
* Only for check constraints
*/
boolean hasColumn(Table table, String colname) {
if (constType != CHECK) {
return false;
}
Expression.Collector coll = new Expression.Collector();
coll.addAll(core.check, Expression.COLUMN);
Iterator it = coll.iterator();
for (; it.hasNext(); ) {
Expression e = (Expression) it.next();
if (e.getColumnName().equals(colname)
&& table.tableName.name.equals(e.getTableName())) {
return true;
}
}
return false;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:27,代码来源:Constraint.java
示例3: closeAllTransactionNavigators
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
public void closeAllTransactionNavigators() {
if (resultMap == null) {
return;
}
Iterator it = resultMap.values().iterator();
while (it.hasNext()) {
Result result = (Result) it.next();
if (!ResultProperties.isHoldable(result.rsProperties)) {
result.getNavigator().release();
it.remove();
}
}
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:18,代码来源:SessionData.java
示例4: getRightsArraySub
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
private static String[] getRightsArraySub(int right) {
// checkValidFlags(right);
if (right == 0) {
return emptyRightsList;
}
HsqlArrayList a = new HsqlArrayList();
Iterator it = rightsStringLookup.keySet().iterator();
for (; it.hasNext(); ) {
String rightString = (String) it.next();
if (rightString.equals(S_R_ALL)) {
continue;
}
int i = rightsStringLookup.get(rightString, 0);
if ((right & i) != 0) {
a.add(rightString);
}
}
return (String[]) a.toArray(new String[a.size()]);
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:27,代码来源:UserManager.java
示例5: collectAsteriskPos
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
/**
* is a private helper for replaceAsterisksInStatement, to avoid some code duplication
*/
private void collectAsteriskPos(final Select select,
IntKeyHashMap asteriskPositions) {
if (select.asteriskPositions == null) {
return;
}
Iterator asterisks = select.asteriskPositions.keySet().iterator();
while (asterisks.hasNext()) {
int pos = asterisks.nextInt();
asteriskPositions.put(pos, select.asteriskPositions.get(pos));
}
// The following is to guarantee the invariant of this class, that the |astersiskPositions|
// member of the various Select instances properly describe the occurances
// of Expression.ASTERISK in the statement.
// Since we are going to replace all those asterisks, we also need to reset the various
// |astersiskPositions| instances, which is best done here were all non-null
// Select's need to pass by.
select.asteriskPositions = null;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:27,代码来源:View.java
示例6: renameColumnInCheckConstraints
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
/**
* Used for rename column.
*/
private void renameColumnInCheckConstraints(String oldname,
String newname, boolean isquoted) throws HsqlException {
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.constType == Constraint.CHECK) {
Expression.Collector coll = new Expression.Collector();
coll.addAll(c.core.check, Expression.COLUMN);
Iterator it = coll.iterator();
for (; it.hasNext(); ) {
Expression e = (Expression) it.next();
if (e.getColumnName() == oldname) {
e.setColumnName(newname, isquoted);
}
}
}
}
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:27,代码来源:Table.java
示例7: hasColumn
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
/**
* Returns true if the view references the named column of the named table,
* otherwise false.
*/
boolean hasColumn(Table table, String colname) {
if (hasTable(table)) {
Expression.Collector coll = new Expression.Collector();
coll.addAll(viewSubqueries[viewSubqueries.length - 1].select,
Expression.COLUMN);
Iterator it = coll.iterator();
for (; it.hasNext(); ) {
Expression e = (Expression) it.next();
if (colname.equals(e.getBaseColumnName())
&& table.equals(e.getTableHsqlName())) {
return true;
}
}
}
return false;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:27,代码来源:View.java
示例8: updateRightsForNewColumn
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
/**
* Update own table column set rights to include a newly created column.<p?
*/
void updateRightsForNewColumn(HsqlName tableName, HsqlName columnName) {
Iterator it = directRightsMap.get(tableName);
Right existing = null;
while (it.hasNext()) {
existing = (Right) it.next();
}
if (existing == null) {
return;
}
existing.addNewColumn(columnName);
updateAllRights();
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:20,代码来源:Grantee.java
示例9: hasSequence
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
/**
* Returns true if the view references the named SEQUENCE,
* otherwise false.
*/
boolean hasSequence(NumberSequence sequence) {
Expression.Collector coll = new Expression.Collector();
coll.addAll(viewSubqueries[viewSubqueries.length - 1].select,
Expression.SEQUENCE);
Iterator it = coll.iterator();
for (; it.hasNext(); ) {
Expression e = (Expression) it.next();
if (e.valueData == sequence) {
return true;
}
}
return false;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:24,代码来源:View.java
示例10: readDDL
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
protected void readDDL(Session session)
throws IOException, HsqlException {
Result r = Result.read(rowIn, dataStreamIn);
Iterator it = r.iterator();
while (it.hasNext()) {
Object[] data = (Object[]) it.next();
String s = (String) data[0];
Result result = session.sqlExecuteDirectNoPreChecks(s);
if (result.isError()) {
db.logger.appLog.logContext(SimpleLog.LOG_ERROR,
result.getMainString());
/** @todo fredt - trap if unavaialble external functions are to be ignored */
throw Trace.error(result);
}
}
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:21,代码来源:ScriptReaderBinary.java
示例11: getReferencingObjects
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
OrderedHashSet getReferencingObjects(HsqlName table, HsqlName column) {
OrderedHashSet set = new OrderedHashSet();
Iterator it = referenceMap.get(table);
while (it.hasNext()) {
HsqlName name = (HsqlName) it.next();
SchemaObject object = getSchemaObject(name);
OrderedHashSet references = object.getReferences();
if (references.contains(column)) {
set.add(name);
}
}
return set;
}
开发者ID:s-store,项目名称:s-store,代码行数:18,代码来源:SchemaManager.java
示例12: getDatabaseURIs
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
/**
* Returns a vector containing the URI (type + path) for all the databases.
*/
public static Vector getDatabaseURIs() {
Vector v = new Vector();
synchronized (databaseIDMap) {
Iterator it = databaseIDMap.values().iterator();
while (it.hasNext()) {
Database db = (Database) it.next();
v.addElement(db.getURI());
}
}
return v;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:20,代码来源:DatabaseManager.java
示例13: dropSchemas
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
/**
* drop all schemas with the given authorisation
*/
public void dropSchemas(Session session, Grantee grantee,
boolean cascade) {
writeLock.lock();
try {
HsqlArrayList list = getSchemas(grantee);
Iterator it = list.iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
dropSchema(session, schema.getName().name, cascade);
}
} finally {
writeLock.unlock();
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:22,代码来源:SchemaManager.java
示例14: hasSchemas
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
public boolean hasSchemas(Grantee grantee) {
readLock.lock();
try {
Iterator it = schemaMap.values().iterator();
while (it.hasNext()) {
Schema schema = (Schema) it.next();
if (grantee.equals(schema.getOwner())) {
return true;
}
}
return false;
} finally {
readLock.unlock();
}
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:21,代码来源:SchemaManager.java
示例15: allColumnsAreDefinedIn
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
/**
* Check if all the column names used in the given expression are defined
* in the given defined column names.
*/
static boolean allColumnsAreDefinedIn(Expression exp,
HashSet definedColumns) {
HashSet colNames = new HashSet();
exp.collectAllColumnNames(colNames);
if ((colNames.size() > 0) && (definedColumns == null)) {
return false;
}
Iterator i = colNames.iterator();
while (i.hasNext()) {
if (!definedColumns.contains(i.next())) {
return false;
}
}
return true;
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:26,代码来源:Select.java
示例16: getReferencesToSchema
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
public MultiValueHashMap getReferencesToSchema(String schemaName) {
MultiValueHashMap map = new MultiValueHashMap();
Iterator mainIterator = referenceMap.keySet().iterator();
while (mainIterator.hasNext()) {
HsqlName name = (HsqlName) mainIterator.next();
if (!name.schema.name.equals(schemaName)) {
continue;
}
Iterator it = referenceMap.get(name);
while (it.hasNext()) {
map.put(name, it.next());
}
}
return map;
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:22,代码来源:SchemaManager.java
示例17: allRolesString
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
public String allRolesString() {
HashSet allRoles = getAllRoles();
if (allRoles.size() < 1) {
return null;
}
Iterator it = getAllRoles().iterator();
StringBuffer sb = new StringBuffer();
while (it.hasNext()) {
if (sb.length() > 0) {
sb.append(',');
}
sb.append((String) it.next());
}
return sb.toString();
}
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:22,代码来源:Grantee.java
示例18: getUserDefinedPropertyData
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
public Set getUserDefinedPropertyData() {
Set set = new HashSet();
Iterator it = dbMeta.values().iterator();
while (it.hasNext()) {
Object[] row = (Object[]) it.next();
if (((Integer) row[HsqlProperties.indexType]).intValue()
== SQL_PROPERTY) {
set.add(row);
}
}
return set;
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:17,代码来源:HsqlDatabaseProperties.java
示例19: removeParent
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
void removeParent(HsqlName parent) {
Iterator it = map.values().iterator();
while (it.hasNext()) {
if (type == SchemaObject.TRIGGER
|| type == SchemaObject.SPECIFIC_ROUTINE) {
SchemaObject object = (SchemaObject) it.next();
if (object.getName().parent == parent) {
it.remove();
}
} else {
HsqlName name = (HsqlName) it.next();
if (name.parent == parent) {
it.remove();
}
}
}
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:22,代码来源:SchemaObjectSet.java
示例20: visibleGrantees
import org.hsqldb.lib.Iterator; //导入依赖的package包/类
/**
* Iteration of all visible grantees, including self. <p>
*
* For grantees with admin, this is all grantees.
* For regular grantees, this is self plus all roles granted directly
* or indirectly
*/
public Set visibleGrantees() {
HashSet grantees = new HashSet();
GranteeManager gm = granteeManager;
if (isAdmin()) {
grantees.addAll(gm.getGrantees());
} else {
grantees.add(this);
Iterator it = getAllRoles().iterator();
while (it.hasNext()) {
grantees.add(it.next());
}
}
return grantees;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:27,代码来源:Grantee.java
注:本文中的org.hsqldb.lib.Iterator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论