Exemple #1
0
 public synchronized void deleteRelsInTx(long id, DatastoreTransaction tx) {
   for (RWRelation rel : relations.values()) {
     RelationInternals rel2 = (RelationInternals) rel;
     rel2.deleteFromInTx(id, tx);
     rel2.deleteToInTx(id, tx);
   }
 }
Exemple #2
0
  public synchronized void commit() {
    for (Table<?> table : tables.values()) {
      TableInternals<?> internal = (TableInternals<?>) table;
      internal.commit();
    }

    for (RWRelation rel : relations.values()) {
      RelationInternals internal = (RelationInternals) rel;
      internal.commit();
    }
  }
Exemple #3
0
  private void importRelations(long id) {
    int relN = (Integer) decode();

    for (int i = 0; i < relN; i++) {
      String relName = (String) decode();
      RelationInternals rel = (RelationInternals) relation(relName);
      int linksN = (Integer) decode();
      for (int j = 0; j < linksN; j++) {
        long linkTo = (Long) decode();
        rel.fill(id, linkTo);
      }
    }
  }