Author: seelmann Date: Sun Feb 28 16:28:47 2010 New Revision: 917196 URL: http://svn.apache.org/viewvc?rev=917196&view=rev Log: formatting Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Modified: directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java?rev=917196&r1=917195&r2=917196&view=diff ============================================================================== --- directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java (original) +++ directory/apacheds/trunk/jdbm-partition/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmPartition.java Sun Feb 28 16:28:47 2010 @@ -47,9 +47,7 @@ */ public class JdbmPartition extends AbstractXdbmPartition { - - - + /** * Creates a store based on JDBM B+Trees. */ @@ -60,7 +58,7 @@ @SuppressWarnings("unchecked") - public final void initialize( ) throws Exception + public final void initialize() throws Exception { store.setWorkingDirectory( getPartitionDir() ); @@ -68,7 +66,7 @@ CursorBuilder cursorBuilder = new CursorBuilder( store, evaluatorBuilder ); // setup optimizer and registries for parent - if ( ! optimizerEnabled ) + if ( !optimizerEnabled ) { optimizer = new NoOpOptimizer(); } @@ -78,77 +76,77 @@ } searchEngine = new DefaultSearchEngine( store, cursorBuilder, evaluatorBuilder, optimizer ); - + // initialize the store store.setCacheSize( cacheSize ); store.setName( id ); - + // Normalize the suffix suffix.normalize( schemaManager.getNormalizerMapping() ); store.setSuffixDn( suffix.getNormName() ); store.setWorkingDirectory( getPartitionDir() ); - Set> userIndices = new HashSet>(); - - for ( Index obj : getIndexedAttributes() ) + Set> userIndices = new HashSet>(); + + for ( Index obj : getIndexedAttributes() ) { - Index index; + Index index; if ( obj instanceof JdbmIndex ) { - index = ( JdbmIndex ) obj; + index = ( JdbmIndex ) obj; } else { - index = new JdbmIndex(); + index = new JdbmIndex(); index.setAttributeId( obj.getAttributeId() ); index.setCacheSize( obj.getCacheSize() ); index.setWkDirPath( obj.getWkDirPath() ); } String oid = schemaManager.getAttributeTypeRegistry().getOidByName( index.getAttributeId() ); - + if ( SYS_INDEX_OIDS.contains( oid ) ) { if ( oid.equals( ApacheSchemaConstants.APACHE_ALIAS_AT_OID ) ) { - store.setAliasIndex( ( Index ) index ); + store.setAliasIndex( ( Index ) index ); } else if ( oid.equals( ApacheSchemaConstants.APACHE_EXISTENCE_AT_OID ) ) { - store.setPresenceIndex( ( Index ) index ); + store.setPresenceIndex( ( Index ) index ); } else if ( oid.equals( ApacheSchemaConstants.APACHE_ONE_LEVEL_AT_OID ) ) { - store.setOneLevelIndex( ( Index ) index ); + store.setOneLevelIndex( ( Index ) index ); } else if ( oid.equals( ApacheSchemaConstants.APACHE_N_DN_AT_OID ) ) { - store.setNdnIndex( ( Index ) index ); + store.setNdnIndex( ( Index ) index ); } else if ( oid.equals( ApacheSchemaConstants.APACHE_ONE_ALIAS_AT_OID ) ) { - store.setOneAliasIndex( ( Index ) index ); + store.setOneAliasIndex( ( Index ) index ); } else if ( oid.equals( ApacheSchemaConstants.APACHE_SUB_ALIAS_AT_OID ) ) { - store.setSubAliasIndex( ( Index ) index ); + store.setSubAliasIndex( ( Index ) index ); } else if ( oid.equals( ApacheSchemaConstants.APACHE_UP_DN_AT_OID ) ) { - store.setUpdnIndex( ( Index ) index ); + store.setUpdnIndex( ( Index ) index ); } else if ( oid.equals( SchemaConstants.OBJECT_CLASS_AT_OID ) ) { - store.setObjectClassIndex( ( Index ) index ); + store.setObjectClassIndex( ( Index ) index ); } else if ( oid.equals( SchemaConstants.ENTRY_CSN_AT_OID ) ) { - store.setEntryCsnIndex( ( Index ) index ); + store.setEntryCsnIndex( ( Index ) index ); } else if ( oid.equals( SchemaConstants.ENTRY_UUID_AT_OID ) ) { - store.setEntryUuidIndex( ( Index ) index ); + store.setEntryUuidIndex( ( Index ) index ); } else { @@ -159,7 +157,7 @@ { userIndices.add( index ); } - + store.setUserIndices( userIndices ); } @@ -171,14 +169,14 @@ { return store.getObjectClassIndex(); } - - + + public Index getEntryCsnIndex() { return store.getEntryCsnIndex(); } - + public Index getEntryUuidIndex() { return store.getEntryUuidIndex();