public void toLong(ResultSet res, MProperties prop, String name, int i, int type) throws MException, SQLException { prop.setLong(name, res.getLong(i)); }
public void fillProperties(File file, MProperties p) { checkState(); File metaFile = getMetaFileFor(file); if (metaFile.exists() && metaFile.isFile()) { MProperties meta = MProperties.load(metaFile); p.putAll(meta); } p.setLong(CaoConst.MODIFIED, metaFile.lastModified()); }
public void fillProperties(File file, MProperties p) { checkState(); if (useMetaFile) { File metaFile = getMetaFileFor(file); if (metaFile.exists() && metaFile.isFile()) { MProperties meta = MProperties.load(metaFile); p.putAll(meta); } } p.setLong(CaoConst.MODIFIED, file.lastModified()); }
@Override public Result<PNodeInfo> getScheduledFlowNodes(STATE_NODE state, long scheduled) throws IOException { DbConnection con = null; try { con = pool.getConnection(); MProperties prop = new MProperties(); DbStatement sta = null; if (state == null) { prop.setLong("scheduled", scheduled); sta = con.createStatement("SELECT "+NODE_COLUMNS+" FROM " + prefix + "_node_ WHERE scheduled_ <= $scheduled$"); } else { prop.setLong("scheduled", scheduled); prop.put("state", state); sta = con.createStatement("SELECT "+NODE_COLUMNS+" FROM " + prefix + "_node_ WHERE state_=$state$ and scheduled_ <= $scheduled$"); } DbResult res = sta.executeQuery(prop); return new SqlResultNode(con,res); } catch (Exception e) { try { if (con != null) con.close(); } catch (Exception e2) {} throw new IOException(e); } }