Examples of SearchResultEntryImpl


Examples of org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl

    /**
     * Creates a new getDecoratedMessage() of SearchResultEntryDsml.
     */
    public SearchResultEntryDsml( LdapCodecService codec )
    {
        super( codec, new SearchResultEntryImpl() );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl

     * Tests for inequality when the objectName dn is not the same.
     */
    @Test
    public void testNotEqualDiffObjectName() throws LdapException
    {
        SearchResultEntryImpl resp0 = new SearchResultEntryImpl( 5 );
        resp0.setEntry( getEntry() );
        resp0.setObjectName( new Dn( "dc=apache,dc=org" ) );

        SearchResultEntryImpl resp1 = new SearchResultEntryImpl( 5 );
        resp1.setEntry( getEntry() );
        resp1.setObjectName( new Dn( "dc=example,dc=com" ) );

        assertFalse( "different object names should not be equal", resp1.equals( resp0 ) );
        assertFalse( "different object names should not be equal", resp0.equals( resp1 ) );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl

     * Tests for equality when the same object reference is used.
     */
    @Test
    public void testEqualsSameObject()
    {
        SearchResultEntryImpl resp = new SearchResultEntryImpl( 5 );
        assertTrue( "the same object should be equal", resp.equals( resp ) );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl

     * Tests for equality when an exact copy is compared.
     */
    @Test
    public void testEqualsExactCopy() throws LdapException
    {
        SearchResultEntryImpl resp0 = new SearchResultEntryImpl( 5 );
        resp0.setEntry( getEntry() );
        resp0.setObjectName( new Dn( "dc=example,dc=com" ) );

        SearchResultEntryImpl resp1 = new SearchResultEntryImpl( 5 );
        resp1.setEntry( getEntry() );
        resp1.setObjectName( new Dn( "dc=example,dc=com" ) );

        assertTrue( "exact copies should be equal", resp0.equals( resp1 ) );
        assertTrue( "exact copies should be equal", resp1.equals( resp0 ) );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl

     * Tests for equal hashCode when the same object reference is used.
     */
    @Test
    public void testHashCodeSameObject()
    {
        SearchResultEntryImpl resp = new SearchResultEntryImpl( 5 );
        assertTrue( resp.hashCode() == resp.hashCode() );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl

     * Tests for equal hashCode when an exact copy is compared.
     */
    @Test
    public void testHashCodeExactCopy() throws LdapException
    {
        SearchResultEntryImpl resp0 = new SearchResultEntryImpl( 5 );
        resp0.setEntry( getEntry() );
        resp0.setObjectName( new Dn( "dc=example,dc=com" ) );

        SearchResultEntryImpl resp1 = new SearchResultEntryImpl( 5 );
        resp1.setEntry( getEntry() );
        resp1.setObjectName( new Dn( "dc=example,dc=com" ) );

        assertTrue( resp0.hashCode() == resp1.hashCode() );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl

            {
                public void action( LdapMessageContainer<MessageDecorator<? extends Message>> container )
                {
                    // Now, we can allocate the SearchResultEntry Object
                    SearchResultEntryDecorator searchResultEntry = new SearchResultEntryDecorator(
                        container.getLdapCodecService(), new SearchResultEntryImpl( container.getMessageId() ) );
                    container.setMessage( searchResultEntry );
                }
            } );

        // --------------------------------------------------------------------------------------------
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl

        }
        else
        {
            // The entry is not a referral, or the ManageDsaIt control is set
            SearchResultEntry respEntry;
            respEntry = new SearchResultEntryImpl( req.getMessageId() );
            respEntry.setEntry( entry );
            respEntry.setObjectName( entry.getDn() );

            return respEntry;
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl


    public Response get() throws Exception
    {
        Entry entry = ( ClonedServerEntry ) wrapped.get();
        SearchResultEntry se = new SearchResultEntryImpl( messageId );
        se.setEntry( entry );

        return se;
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.model.message.SearchResultEntryImpl

            // We send the added entry directly to the consumer if it's connected
            if ( pushInRealTime )
            {
                // Construct a new SearchResultEntry
                SearchResultEntry resultEntry = new SearchResultEntryImpl( searchRequest.getMessageId() );
                resultEntry.setObjectName( entry.getDn() );
                resultEntry.setEntry( entry );

                // Create the control which will be added to the response.
                SyncStateValue syncAdd = createControl( directoryService, SyncStateTypeEnum.ADD, entry );
               
                sendResult( resultEntry, entry, EventType.ADD, syncAdd, null );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.