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); } }
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(); } }
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); } } }