Examples of HarmonySerialBlob


Examples of org.apache.derby.iapi.types.HarmonySerialBlob

    public static  AllTypesTuple   makeFirstAllTypesTuple() throws Exception
    {
        return new AllTypesTuple
            (
             new Long( 1L ),
             new HarmonySerialBlob( new byte[] { (byte) 1, (byte) 1, (byte) 1 } ),
             Boolean.TRUE,
             "firstt",
             new byte[] { (byte) 1, (byte) 1, (byte) 1 },
             new HarmonySerialClob( "firstt" ),
             new Date( 1L ),
View Full Code Here

Examples of org.apache.derby.iapi.types.HarmonySerialBlob

    public static  AllTypesTuple   makeSecondAllTypesTuple() throws Exception
    {
        return new AllTypesTuple
            (
             new Long( 2L ),
             new HarmonySerialBlob( new byte[] { (byte) 2, (byte) 2, (byte) 2 } ),
             Boolean.FALSE,
             "second",
             new byte[] { (byte) 2, (byte) 2, (byte) 2 },
             new HarmonySerialClob( "second" ),
             new Date( 2L ),
View Full Code Here

Examples of org.apache.derby.iapi.types.HarmonySerialBlob

     * Function for making a Blob.
     * </p>
     */
    public  static  final   Blob    makeBlob()  throws Exception
    {
        return new HarmonySerialBlob( BINARY_VALUE );
    }
View Full Code Here

Examples of org.apache.derby.iapi.types.HarmonySerialBlob

        byte    intValue = (byte) 1;
        float   floatValue = 1.0F;
        String lobValue = "abc";

        bigintarg[0] = _nullOutArgs ? null : new Long( intValue );
        blobarg[0] = _nullOutArgs ? null : new HarmonySerialBlob( BINARY_VALUE );
        booleanarg[0] = _nullOutArgs ? null : Boolean.TRUE;
        chararg[0] = _nullOutArgs ? null : stringValue;
        charforbitdataarg[0] = _nullOutArgs ? null : BINARY_VALUE;
        clobarg[0] = _nullOutArgs ? null : new HarmonySerialClob( lobValue );
        datearg[0]= _nullOutArgs ? null : new Date( 761990400000L );
View Full Code Here

Examples of org.apache.derby.iapi.types.HarmonySerialBlob

    //
    ///////////////////////////////////////////////////////////////////////////////////

    public static Blob makeSimpleBlob() throws SQLException
    {
        return new HarmonySerialBlob( new byte[] { 1 } );
    }
View Full Code Here

Examples of org.apache.derby.iapi.types.HarmonySerialBlob

    public static  AllTypesTuple   makeFirstAllTypesTuple() throws Exception
    {
        return new AllTypesTuple
            (
             new Long( 1L ),
             new HarmonySerialBlob( new byte[] { (byte) 1, (byte) 1, (byte) 1 } ),
             Boolean.TRUE,
             "firstt",
             new byte[] { (byte) 1, (byte) 1, (byte) 1 },
             new HarmonySerialClob( "firstt" ),
             new Date( 1L ),
View Full Code Here

Examples of org.apache.derby.iapi.types.HarmonySerialBlob

    public static  AllTypesTuple   makeSecondAllTypesTuple() throws Exception
    {
        return new AllTypesTuple
            (
             new Long( 2L ),
             new HarmonySerialBlob( new byte[] { (byte) 2, (byte) 2, (byte) 2 } ),
             Boolean.FALSE,
             "second",
             new byte[] { (byte) 2, (byte) 2, (byte) 2 },
             new HarmonySerialClob( "second" ),
             new Date( 2L ),
View Full Code Here

Examples of org.apache.derby.iapi.types.HarmonySerialBlob

             );
        ps.execute();
        ps.close();

        cs = chattyPrepareCall( conn, "call blobIn( ?, ? )" );
        cs.setBlob( 1, new HarmonySerialBlob( "ghi".getBytes( UTF8 ) ) );
        cs.registerOutParameter( 2, Types.VARCHAR );
        cs.execute();
        assertEquals( "ghi", cs.getString( 2 ) );
        cs.close();

        //
        // Blob output parameter
        //
        ps = chattyPrepare
            (
             conn,
             "create procedure blobOut\n" +
             "( out c blob )\n" +
             "language java\n" +
             "parameter style java\n" +
             "no sql\n" +
             "external name '" + getClass().getName() + ".blobOut'\n"
             );
        ps.execute();
        ps.close();

        cs = chattyPrepareCall( conn, "call blobOut( ? )" );
        cs.registerOutParameter( 1, Types.BLOB );
        cs.execute();
        outVal = cs.getBlob( 1 );
        assertEquals( "abc", getBlobValue( outVal ) );
        cs.close();
       
        //
        // Blob inout parameter
        //
        ps = chattyPrepare
            (
             conn,
             "create procedure blobInOut\n" +
             "( inout c blob )\n" +
             "language java\n" +
             "parameter style java\n" +
             "no sql\n" +
             "external name '" + getClass().getName() + ".blobInOut'\n"
             );
        ps.execute();
        ps.close();

        cs = chattyPrepareCall( conn, "call blobInOut( ? )" );
        cs.setBlob( 1, new HarmonySerialBlob( "ghi".getBytes( UTF8 ) ) );
        cs.registerOutParameter( 1, Types.BLOB );
        cs.execute();
        outVal = cs.getBlob( 1 );
        assertEquals( "ihg", getBlobValue( outVal ) );
       
View Full Code Here

Examples of org.apache.derby.iapi.types.HarmonySerialBlob

                value[ idx++ ] = template[ j ];
            }
                         
        }
       
        return new HarmonySerialBlob( value );
    }
View Full Code Here

Examples of org.apache.derby.iapi.types.HarmonySerialBlob

        byte[] left = in.getBytes( 1L, leftLength );
        byte[] right = inout[0].getBytes( 1L, rightLength );
        byte[] retval = new byte[ leftLength + rightLength ];
        System.arraycopy( left, 0, retval, 0, leftLength );
        System.arraycopy( right, 0, retval, leftLength, rightLength );
        inout[0] = new HarmonySerialBlob( retval );
       
        out[0] = new HarmonySerialBlob( new byte[] { (byte) 1, (byte) 2, (byte) 3 } );
    }
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.