Ejemplo n.º 1
0
 public Station getStationFromDatabase(EmbeddedGraphDatabase database) {
   Transaction transaction = database.beginTx();
   Station res = null;
   try {
     res = new Station(database.getNodeById(this.nodeId));
     transaction.success();
   } catch (Exception e) {
     Logger.getLogger(Station.class)
         .error("Unable to retreive " + this.name() + " from the graph-database.", e);
     transaction.failure();
   } finally {
     transaction.finish();
   }
   return res;
 }
 public Node getNodeById(long id) {
   return inner.getNodeById(id);
 }