/** * Check if the subBtree contains a given value */ protected boolean btreeContains( V value ) { try { return valueBtree.hasKey( value ); } catch ( IOException e ) { // TODO Auto-generated catch block e.printStackTrace(); return false; } catch ( KeyNotFoundException knfe ) { knfe.printStackTrace(); return false; } }
return valueBtree.hasKey( checkedValue );
/** * {@inheritDoc} */ @Override public boolean has( PartitionTxn partitionTxn, K key ) throws LdapException { try { return bt.hasKey( key ); } catch ( IOException ioe ) { throw new LdapException( ioe ); } catch ( KeyNotFoundException knfe ) { throw new LdapException( knfe ); } }
if ( !bt.hasKey( key ) )
/** * {@inheritDoc} */ @Override protected synchronized KrbIdentity doUpdateIdentity(KrbIdentity identity) throws KrbException { String p = identity.getPrincipalName(); try { if (!database.hasKey(p)) { throw new KrbException("No identity found with the principal " + p); } database.delete(p); return database.insert(p, identity); } catch (Exception e) { throw new KrbException("Failed to update the identity " + p); } }
if ( bt.hasKey( key ) )
/** * {@inheritDoc} */ @Override protected synchronized KrbIdentity doAddIdentity(KrbIdentity identity) throws KrbException { String p = identity.getPrincipalName(); try { if (database.hasKey(p)) { throw new KrbException("Identity already exists " + p); } return database.insert(p, identity); } catch (KeyNotFoundException e) { throw new KrbException("No such identity exists " + p); } catch (IOException e) { throw new KrbException("Failed to add the identity " + p); } }
if ( !bt.hasKey( key ) )