@Override public ACLEntry getACLEntry(long fileId, String entity) throws DatabaseException { try { byte[] key = BabuDBStorageHelper.createACLPrefixKey(fileId, entity); byte[] value = database.lookup(ACL_INDEX, key, null).get(); return value == null ? null : new BufferBackedACLEntry(key, value); } catch (Exception exc) { throw new DatabaseException(exc); } }
@Override public DatabaseResultSet<ACLEntry> getACL(long fileId) throws DatabaseException { try { byte[] prefix = BabuDBStorageHelper.createACLPrefixKey(fileId, null); ResultSet<byte[], byte[]> it = database.prefixLookup(ACL_INDEX, prefix, null).get(); return new ACLIterator(it); } catch (Exception exc) { throw new DatabaseException(exc); } }