2026-03-17 13:31:18 -07:00

117 lines
2.7 KiB
Java

/*
* Decompiled with CFR 0.152.
*/
package com.tridium.collection;
import com.tridium.collection.BGenericTable;
import javax.baja.collection.BITable;
import javax.baja.collection.Column;
import javax.baja.collection.TableCursor;
import javax.baja.sys.BBoolean;
import javax.baja.sys.BComponent;
import javax.baja.sys.BFacets;
import javax.baja.sys.BNumber;
import javax.baja.sys.BObject;
import javax.baja.sys.Context;
/*
* Illegal identifiers - consider using --renameillegalidents true
*/
class GenericCursor
implements TableCursor {
private BGenericTable table;
private BComponent[] comps;
private int idx;
public Context getContext() {
return null;
}
public boolean next() {
boolean bl = false;
if (++this.idx < this.comps.length) {
bl = true;
}
return bl;
}
public boolean nextComponent() {
return this.next();
}
public BObject get() {
return this.comps[this.idx];
}
public boolean next(Class clazz) {
++this.idx;
while (this.idx < this.comps.length && !clazz.isAssignableFrom(this.comps[this.idx].getClass())) {
++this.idx;
}
boolean bl = false;
if (this.idx < this.comps.length) {
bl = true;
}
return bl;
}
public BITable getTable() {
return this.table;
}
public BObject get(Column column) {
return this.comps[this.idx].get(column.getName());
}
public String getString(Column column) {
return this.comps[this.idx].get(column.getName()).toString();
}
public double getDouble(Column column) {
return this.number(this.idx, column).getDouble();
}
public float getFloat(Column column) {
return this.number(this.idx, column).getFloat();
}
public int getInt(Column column) {
return this.number(this.idx, column).getInt();
}
public long getLong(Column column) {
return this.number(this.idx, column).getLong();
}
public boolean getBoolean(Column column) {
return this.bool(this.idx, column).getBoolean();
}
public int getFlags(Column column) {
return 0;
}
public BFacets getFacets(Column column) {
return BFacets.NULL;
}
private final BNumber number(int n, Column column) {
return (BNumber)this.comps[n].get(column.getName());
}
private final BBoolean bool(int n, Column column) {
return (BBoolean)this.comps[n].get(column.getName());
}
private final /* synthetic */ void this() {
this.idx = -1;
}
GenericCursor(BGenericTable bGenericTable) {
this.this();
this.table = bGenericTable;
this.comps = bGenericTable.comps;
}
}