Package org.neo4j.graphdb

Examples of org.neo4j.graphdb.Transaction.finish()


        Transaction tx = db.beginTx();
        try {
            node.setProperty(AssetDB.NAME,name);
            tx.success();
        } finally {
            tx.finish();
        }
    }

    public Node getNode() {
        return node;
View Full Code Here


                sb.append(",");
            }
            this.node.setProperty("colors",sb.toString());
            tx.success();
        } finally {
            tx.finish();
        }
    }

    public void load() {
        String stringcolors = (String) this.node.getProperty("colors");
View Full Code Here

        Transaction tx = db.beginTx();
        try {
            node.setProperty("editable",Boolean.valueOf(editable));
            tx.success();
        } finally {
            tx.finish();
        }
    }
}
View Full Code Here

        } catch(Exception e) {
            tx.failure();
            throw new RuntimeException(
                "Could not add relation of type " + type + " between " + source + " and " + target, e);
        } finally {
          tx.finish();
        }
        return new Relation(source.getId(), target.getId(), type);
    }

    @Override
View Full Code Here

        } catch(Exception e) {
            tx.failure();
            throw new RuntimeException(
                "Could not add relation of type " + type + " between " + source + " and " + target, e);
        } finally {
          tx.finish();
        }
    }

    /* (non-Javadoc)
     * @see org.cedj.geekseek.domain.relation.RelationRepositoryTe#findTargets(org.cedj.geekseek.domain.model.Identifiable, java.lang.String, java.lang.Class)
View Full Code Here

        } catch(Exception e) {
            tx.failure();
            throw new RuntimeException(
                "Could not clean up relation of type " + type + " from " + source, e);
        } finally {
          tx.finish();
        }
        return targets;
    }

    /**
 
View Full Code Here

      Node sequenceNode = factory.getOrCreate( ID_SEQUENCE_PROPERTY, generateId( key ) );
      tx.success();
      return sequenceNode;
    }
    finally {
      tx.finish();
    }
  }

  private Object generateId(RowKey key) {
    StringBuilder builder = new StringBuilder( key.getTable() );
View Full Code Here

      tx.success();
      lock.release();
      return nextValue;
    }
    finally {
      tx.finish();
    }
  }

  private int updateSequenceValue(Node sequence, int increment) {
    int currentValue = (Integer) sequence.getProperty( VALUE_SEQUENCE_PROPERTY );
View Full Code Here

        Transaction tx = db.beginTx();
        try {
            node.setProperty(AssetDB.NAME,name);
            tx.success();
        } finally {
            tx.finish();
        }
    }

    public Node getNode() {
        return node;
View Full Code Here

        tx.success();
      } else {
        tx.failure();
      }
    } finally {
      tx.finish();
    }
  }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.