212 lines
6.2 KiB
Java
212 lines
6.2 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* com.tridium.bql.collection.BqlColumn
|
|
* com.tridium.bql.collection.BqlColumnList
|
|
* com.tridium.bql.collection.PropertyColumn
|
|
* javax.baja.collection.BICollection
|
|
* javax.baja.collection.BIList
|
|
* javax.baja.collection.BITable
|
|
* javax.baja.collection.Column
|
|
* javax.baja.collection.ColumnList
|
|
* javax.baja.nre.util.IFilter
|
|
* javax.baja.sys.BFacets
|
|
* javax.baja.sys.BObject
|
|
* javax.baja.sys.Context
|
|
* javax.baja.sys.Cursor
|
|
* javax.baja.sys.Property
|
|
* javax.baja.sys.Sys
|
|
* javax.baja.sys.Type
|
|
* javax.baja.util.IFilter
|
|
*/
|
|
package com.tridium.alarm.db;
|
|
|
|
import com.tridium.alarm.AlarmTableCursor;
|
|
import com.tridium.bql.collection.BqlColumn;
|
|
import com.tridium.bql.collection.BqlColumnList;
|
|
import com.tridium.bql.collection.PropertyColumn;
|
|
import java.util.ArrayList;
|
|
import javax.baja.alarm.BAlarmDatabase;
|
|
import javax.baja.alarm.BAlarmRecord;
|
|
import javax.baja.collection.BICollection;
|
|
import javax.baja.collection.BIList;
|
|
import javax.baja.collection.BITable;
|
|
import javax.baja.collection.Column;
|
|
import javax.baja.collection.ColumnList;
|
|
import javax.baja.sys.BFacets;
|
|
import javax.baja.sys.BObject;
|
|
import javax.baja.sys.Context;
|
|
import javax.baja.sys.Cursor;
|
|
import javax.baja.sys.Property;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
import javax.baja.util.IFilter;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public abstract class BAlarmTable
|
|
extends BObject
|
|
implements BITable {
|
|
public static final Type TYPE;
|
|
private BAlarmDatabase db;
|
|
private IFilter filter;
|
|
private Context context;
|
|
private BqlColumnList columns;
|
|
private ArrayList recs;
|
|
private BFacets tableFacets;
|
|
static /* synthetic */ Class class$com$tridium$alarm$db$BAlarmTable;
|
|
|
|
public BAlarmDatabase getAlarmDb() {
|
|
return this.db;
|
|
}
|
|
|
|
public Cursor cursor() {
|
|
return new AlarmTableCursor(this, this.inner(), (javax.baja.nre.util.IFilter)this.filter);
|
|
}
|
|
|
|
protected abstract Cursor inner();
|
|
|
|
public BIList toList() {
|
|
return this;
|
|
}
|
|
|
|
public BITable toTable() {
|
|
return this;
|
|
}
|
|
|
|
public abstract BICollection filter(IFilter var1);
|
|
|
|
public int size() {
|
|
this.load();
|
|
return this.recs.size();
|
|
}
|
|
|
|
public BObject get(int n) {
|
|
return (BObject)this.recs.get(n);
|
|
}
|
|
|
|
public BObject[] list() {
|
|
this.load();
|
|
return this.recs.toArray(new BObject[this.recs.size()]);
|
|
}
|
|
|
|
public BObject[] list(BObject[] bObjectArray) {
|
|
this.load();
|
|
return this.recs.toArray(bObjectArray);
|
|
}
|
|
|
|
public ColumnList getColumns() {
|
|
if (this.columns == null) {
|
|
BAlarmRecord bAlarmRecord = new BAlarmRecord();
|
|
Property[] propertyArray = bAlarmRecord.getPropertiesArray();
|
|
BqlColumn[] bqlColumnArray = new BqlColumn[propertyArray.length];
|
|
int n = 0;
|
|
while (n < propertyArray.length) {
|
|
Property property = propertyArray[n];
|
|
Object var6_6 = null;
|
|
bqlColumnArray[n] = new PropertyColumn(propertyArray[n]);
|
|
++n;
|
|
}
|
|
this.columns = new BqlColumnList((Column[])bqlColumnArray);
|
|
}
|
|
return this.columns;
|
|
}
|
|
|
|
public BObject get(int n, Column column) {
|
|
this.load();
|
|
return ((BqlColumn)column).get((BObject)((BAlarmRecord)((Object)this.recs.get(n))));
|
|
}
|
|
|
|
public String getString(int n, Column column) {
|
|
this.load();
|
|
return ((BqlColumn)column).getString((BObject)((BAlarmRecord)((Object)this.recs.get(n))));
|
|
}
|
|
|
|
public float getFloat(int n, Column column) {
|
|
this.load();
|
|
return ((BqlColumn)column).getFloat((BObject)((BAlarmRecord)((Object)this.recs.get(n))));
|
|
}
|
|
|
|
public double getDouble(int n, Column column) {
|
|
this.load();
|
|
return ((BqlColumn)column).getDouble((BObject)((BAlarmRecord)((Object)this.recs.get(n))));
|
|
}
|
|
|
|
public int getInt(int n, Column column) {
|
|
this.load();
|
|
return ((BqlColumn)column).getInt((BObject)((BAlarmRecord)((Object)this.recs.get(n))));
|
|
}
|
|
|
|
public long getLong(int n, Column column) {
|
|
this.load();
|
|
return ((BqlColumn)column).getLong((BObject)((BAlarmRecord)((Object)this.recs.get(n))));
|
|
}
|
|
|
|
public boolean getBoolean(int n, Column column) {
|
|
this.load();
|
|
return ((BqlColumn)column).getBoolean((BObject)((BAlarmRecord)((Object)this.recs.get(n))));
|
|
}
|
|
|
|
public int getFlags(int n, Column column) {
|
|
this.load();
|
|
return ((BqlColumn)column).getFlags((BObject)((BAlarmRecord)((Object)this.recs.get(n))));
|
|
}
|
|
|
|
public BFacets getFacets(int n, Column column) {
|
|
this.load();
|
|
return ((BqlColumn)column).getFacets((BObject)((BAlarmRecord)((Object)this.recs.get(n))));
|
|
}
|
|
|
|
public BFacets getTableFacets() {
|
|
return this.tableFacets;
|
|
}
|
|
|
|
private final void load() {
|
|
if (this.recs != null) {
|
|
return;
|
|
}
|
|
this.recs = new ArrayList(1000);
|
|
Cursor cursor = this.cursor();
|
|
while (cursor.next()) {
|
|
this.recs.add((BAlarmRecord)((BAlarmRecord)cursor.get()).newCopy());
|
|
}
|
|
}
|
|
|
|
public Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
static /* synthetic */ Class class(String string, boolean bl) {
|
|
try {
|
|
Class<?> clazz = Class.forName(string);
|
|
if (!bl) {
|
|
clazz = clazz.getComponentType();
|
|
}
|
|
return clazz;
|
|
}
|
|
catch (ClassNotFoundException classNotFoundException) {
|
|
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
|
}
|
|
}
|
|
|
|
public BAlarmTable(BAlarmDatabase bAlarmDatabase) {
|
|
this(bAlarmDatabase, null);
|
|
}
|
|
|
|
public BAlarmTable(BAlarmDatabase bAlarmDatabase, IFilter iFilter) {
|
|
this.db = bAlarmDatabase;
|
|
this.filter = iFilter;
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$com$tridium$alarm$db$BAlarmTable;
|
|
if (clazz == null) {
|
|
clazz = class$com$tridium$alarm$db$BAlarmTable = BAlarmTable.class("[Lcom.tridium.alarm.db.BAlarmTable;", false);
|
|
}
|
|
TYPE = Sys.loadType((Class)clazz);
|
|
}
|
|
}
|
|
|