You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2010/05/22 13:42:11 UTC
svn commit: r947283 -
/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
Author: seelmann
Date: Sat May 22 11:42:11 2010
New Revision: 947283
URL: http://svn.apache.org/viewvc?rev=947283&view=rev
Log:
Formatting
Modified:
directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
Modified: directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java?rev=947283&r1=947282&r2=947283&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java (original)
+++ directory/apacheds/trunk/xdbm-search/src/main/java/org/apache/directory/server/xdbm/AbstractStore.java Sat May 22 11:42:11 2010
@@ -208,12 +208,12 @@ public abstract class AbstractStore<E, I
public void setSuffixDn( DN suffixDn )
{
protect( "suffixDn" );
-
+
if ( !suffixDn.isNormalized() )
{
throw new IllegalArgumentException( I18n.err( I18n.ERR_218, suffixDn.getName() ) );
}
-
+
this.suffixDn = suffixDn;
}
@@ -252,13 +252,13 @@ public abstract class AbstractStore<E, I
{
// convert and initialize system indices
Map<String, Index<?, E, ID>> tmp = new HashMap<String, Index<?, E, ID>>();
-
+
for ( String oid : userIndices.keySet() )
{
// check that the attributeType has an EQUALITY matchingRule
AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( oid );
MatchingRule mr = attributeType.getEquality();
-
+
if ( mr != null )
{
Index<?, E, ID> index = userIndices.get( oid );
@@ -270,7 +270,7 @@ public abstract class AbstractStore<E, I
LOG.error( I18n.err( I18n.ERR_4, attributeType.getName() ) );
}
}
-
+
userIndices = tmp;
}
@@ -286,47 +286,47 @@ public abstract class AbstractStore<E, I
{
addIndex( new GenericIndex<String, E, ID>( ApacheSchemaConstants.APACHE_EXISTENCE_AT_OID ) );
}
-
+
if ( getOneLevelIndex() == null )
{
addIndex( new GenericIndex<ID, E, ID>( ApacheSchemaConstants.APACHE_ONE_LEVEL_AT_OID ) );
}
-
+
if ( getSubLevelIndex() == null )
{
addIndex( new GenericIndex<ID, E, ID>( ApacheSchemaConstants.APACHE_SUB_LEVEL_AT_OID ) );
}
-
+
if ( getRdnIndex() == null )
{
addIndex( new GenericIndex<ParentIdAndRdn<ID>, E, ID>( ApacheSchemaConstants.APACHE_RDN_AT_OID ) );
}
-
+
if ( getAliasIndex() == null )
{
addIndex( new GenericIndex<String, E, ID>( ApacheSchemaConstants.APACHE_ALIAS_AT_OID ) );
}
-
+
if ( getOneAliasIndex() == null )
{
addIndex( new GenericIndex<ID, E, ID>( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID ) );
}
-
+
if ( getSubAliasIndex() == null )
{
addIndex( new GenericIndex<ID, E, ID>( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID ) );
}
-
+
if ( getObjectClassIndex() == null )
{
addIndex( new GenericIndex<String, E, ID>( SchemaConstants.OBJECT_CLASS_AT_OID ) );
}
-
+
if ( getEntryUuidIndex() == null )
{
addIndex( new GenericIndex<String, E, ID>( SchemaConstants.ENTRY_UUID_AT_OID ) );
}
-
+
if ( getEntryCsnIndex() == null )
{
addIndex( new GenericIndex<String, E, ID>( SchemaConstants.ENTRY_CSN_AT_OID ) );
@@ -458,7 +458,7 @@ public abstract class AbstractStore<E, I
{
return userIndices.get( id );
}
-
+
if ( systemIndices.containsKey( id ) )
{
return systemIndices.get( id );
@@ -527,7 +527,7 @@ public abstract class AbstractStore<E, I
// Check that the index ID is valid
String oid = index.getAttributeId();
-
+
if ( !OID.isOID( oid ) )
{
throw new IllegalArgumentException( I18n.err( I18n.ERR_309, oid ) );
@@ -723,7 +723,7 @@ public abstract class AbstractStore<E, I
public ID getParentId( ID childId ) throws Exception
{
ParentIdAndRdn<ID> key = rdnIdx.reverseLookup( childId );
-
+
if ( key == null )
{
return null;
@@ -762,7 +762,7 @@ public abstract class AbstractStore<E, I
{
IndexCursor<ID, E, ID> cursor = oneLevelIdx.forwardCursor( id );
cursor.beforeValue( id, null );
-
+
return cursor;
}
@@ -1136,13 +1136,13 @@ public abstract class AbstractStore<E, I
if ( deleteOldRdn )
{
RDN oldRdn = updn.getRdn();
-
+
for ( AVA oldAtav : oldRdn )
{
// check if the new ATAV is part of the old RDN
// if that is the case we do not remove the ATAV
boolean mustRemove = true;
-
+
for ( AVA newAtav : newRdn )
{
if ( oldAtav.equals( newAtav ) )
@@ -1261,12 +1261,12 @@ public abstract class AbstractStore<E, I
{
ParentIdAndRdn<ID> cur = rdnIdx.reverseLookup( parentId );
RDN[] rdns = cur.getRdns();
-
+
for ( RDN rdn : rdns )
{
dn.addNormalizedInOrder( rdn );
}
-
+
parentId = cur.getParentId();
}
while ( !parentId.equals( getRootId() ) );
@@ -1662,7 +1662,7 @@ public abstract class AbstractStore<E, I
// check if alias parent and aliased entry are the same
DN normalizedAliasTargetParentDn = ( DN ) normalizedAliasTargetDn.clone();
normalizedAliasTargetParentDn.remove( normalizedAliasTargetDn.size() - 1 );
-
+
if ( !aliasDn.isChildOf( normalizedAliasTargetParentDn ) )
{
oneAliasIdx.add( ancestorId, targetId );
@@ -1843,7 +1843,7 @@ public abstract class AbstractStore<E, I
//updated the RDN index
rdnIdx.drop( id );
-
+
if ( !updn.isNormalized() )
{
// just normalize the RDN alone