@Override public boolean visit(long record) throws IndexException { result.add(new DBProperty(db, record).getKey().getString()); return true; // There should never be duplicates. } });
@Override public boolean visit(long record) throws IndexException { result.add(new DBProperty(db, record).getKey().getString()); return true; // There should never be duplicates. } });
/** * Deletes all properties, does not delete the record associated with the object itself * - that is it can be re-populated. * @throws IndexException */ public void clear() throws IndexException { this.index.accept(new IBTreeVisitor(){ @Override public int compare(long address) throws IndexException { return 0; } @Override public boolean visit(long address) throws IndexException { new DBProperty(DBProperties.this.db, address).delete(); return false; // there should never be duplicates } }); }
/** * Deletes all properties, does not delete the record associated with the object itself * - that is it can be re-populated. * @throws IndexException */ public void clear() throws IndexException { this.index.accept(new IBTreeVisitor(){ @Override public int compare(long address) throws IndexException { return 0; } @Override public boolean visit(long address) throws IndexException { new DBProperty(DBProperties.this.db, address).delete(); return false; // there should never be duplicates } }); }
/** * Writes the key, value mapping to the properties. If a mapping for the * same key already exists, it is overwritten. * @param key a non-null property name * @param value a value to associate with the key. may not be null. * @throws IndexException * @throws NullPointerException if key is null */ public void setProperty(String key, String value) throws IndexException { removeProperty(key); DBProperty newProperty= new DBProperty(this.db, key, value); this.index.insert(newProperty.getRecord()); }
/** * Writes the key, value mapping to the properties. If a mapping for the * same key already exists, it is overwritten. * @param key a non-null property name * @param value a value to associate with the key. may not be null. * @throws IndexException * @throws NullPointerException if key is null */ public void setProperty(String key, String value) throws IndexException { removeProperty(key); DBProperty newProperty= new DBProperty(this.db, key, value); this.index.insert(newProperty.getRecord()); }
@Override public boolean visit(long address) throws IndexException { new DBProperty(DBProperties.this.db, address).delete(); return false; // there should never be duplicates } });
@Override public boolean visit(long address) throws IndexException { new DBProperty(DBProperties.this.db, address).delete(); return false; // there should never be duplicates } });
@Override public boolean visit(long record) throws IndexException { result[0] = new DBProperty(db, record); return false; // There should never be duplicates. } });
@Override public boolean visit(long record) throws IndexException { result[0] = new DBProperty(db, record); return false; // There should never be duplicates. } });