Package org.apache.directory.shared.ldap.extras.extended

Examples of org.apache.directory.shared.ldap.extras.extended.StoredProcedureRequestImpl


    private List<Integer> paramValueLength;


    public StoredProcedureRequestDecorator( LdapApiService codec )
    {
        super( codec, new StoredProcedureRequestImpl() );
    }
View Full Code Here


        try
        {
            /**
             * Create a new stored procedure execution request.
             */
            StoredProcedureRequestImpl req = new StoredProcedureRequestImpl( 0, procedureName, language );

            /**
             * For each argument UTF-8-encode the type name
             * and Java-serialize the value
             * and add them to the request as a parameter object.
             */
            for ( int i = 0; i < arguments.length; i++ )
            {
                byte[] type;
                byte[] value;
                type = arguments[i].getClass().getName().getBytes( "UTF-8" );
                value = SerializationUtils.serialize( ( Serializable ) arguments[i] );
                req.addParameter( type, value );
            }

            /**
             * Call the stored procedure via the extended operation
             * and get back its return value.
View Full Code Here

     */
    @Test
    public void testLoadingExtendedOperation() throws Exception
    {
        LdapApiService codec = LdapApiServiceFactory.getSingleton();
        StoredProcedureRequest req = new StoredProcedureRequestImpl();
        req.setLanguage( "Java" );
        req.setProcedure( Strings.getBytesUtf8( "bogusProc" ) );
       
        assertNotNull( req );
        assertNotNull( codec );
       
        StoredProcedureRequest decorator = ( StoredProcedureRequest ) codec.decorate( req );
View Full Code Here

        try
        {
            /**
             * Create a new stored procedure execution request.
             */
            StoredProcedureRequestImpl req = new StoredProcedureRequestImpl( 0, procedureName, language );

            /**
             * For each argument UTF-8-encode the type name
             * and Java-serialize the value
             * and add them to the request as a parameter object.
             */
            for ( int i = 0; i < arguments.length; i++ )
            {
                byte[] type;
                byte[] value;
                type = arguments[i].getClass().getName().getBytes( "UTF-8" );
                value = SerializationUtils.serialize( ( Serializable ) arguments[i] );
                req.addParameter( type, value );
            }

            /**
             * Call the stored procedure via the extended operation
             * and get back its return value.
View Full Code Here

     */
    @Test
    public void testLoadingExtendedOperation()
    {
        StandaloneLdapCodecService codec = new StandaloneLdapCodecService();
        StoredProcedureRequest req = new StoredProcedureRequestImpl();
        req.setLanguage( "Java" );
        req.setProcedure( Strings.getBytesUtf8( "bogusProc" ) );
       
        assertNotNull( req );
        assertNotNull( codec );
       
        StoredProcedureRequest decorator = ( StoredProcedureRequest ) codec.decorate( req );
View Full Code Here

    private List<Integer> paramValueLength;
   
   
    public StoredProcedureRequestDecorator( LdapCodecService codec )
    {
        super( codec, new StoredProcedureRequestImpl() );
    }
View Full Code Here

     */
    @Test
    public void testLoadingExtendedOperation() throws Exception
    {
        LdapApiService codec = LdapApiServiceFactory.getSingleton();
        StoredProcedureRequest req = new StoredProcedureRequestImpl();
        req.setLanguage( "Java" );
        req.setProcedure( Strings.getBytesUtf8( "bogusProc" ) );
       
        assertNotNull( req );
        assertNotNull( codec );
       
        StoredProcedureRequest decorator = ( StoredProcedureRequest ) codec.decorate( req );
View Full Code Here

    private List<Integer> paramValueLength;
   
   
    public StoredProcedureRequestDecorator( LdapApiService codec )
    {
        super( codec, new StoredProcedureRequestImpl() );
    }
View Full Code Here

        try
        {
            /**
             * Create a new stored procedure execution request.
             */
            StoredProcedureRequestImpl req = new StoredProcedureRequestImpl( 0, procedureName, language );

            /**
             * For each argument UTF-8-encode the type name
             * and Java-serialize the value
             * and add them to the request as a parameter object.
             */
            for ( int i = 0; i < arguments.length; i++ )
            {
                byte[] type;
                byte[] value;
                type = arguments[i].getClass().getName().getBytes( "UTF-8" );
                value = SerializationUtils.serialize( ( Serializable ) arguments[i] );
                req.addParameter( type, value );
            }

            /**
             * Call the stored procedure via the extended operation
             * and get back its return value.
View Full Code Here

    private List<Integer> paramValueLength;


    public StoredProcedureRequestDecorator( LdapApiService codec )
    {
        super( codec, new StoredProcedureRequestImpl() );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.extras.extended.StoredProcedureRequestImpl

Copyright © 2018 www.massapicom. 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.