Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // depends: baja; program; history
- import javax.baja.collection.*;
- import javax.baja.naming.*;
- import javax.baja.sys.*;
- import javax.baja.history.*;
- import com.tridium.program.*;
- public class RobotImpl
- extends Robot
- {
- public void run()
- throws Exception
- {
- BHistoryConfig history = null;
- BOrd hqord = BOrd.make("history:/|bql:select *");
- BITable<BHistoryConfig> hresult = (BITable<BHistoryConfig>)hqord.resolve().get();
- TableCursor<BHistoryConfig> h = hresult.cursor();
- while(h.next()) {
- history = h.get();
- String historyName = history.getId().getHistoryDisplayName();
- log.println("setting non-critical flag on " + historyName);
- Slot idSlot = history.getSlot("id");
- history.setFlags(idSlot, history.getFlags(idSlot) | Flags.NON_CRITICAL);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement