Examples of HarmonySerialClob


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

        String value = getClobValue( c[ 0 ] );
       
        char[] inValue = value.toCharArray();
        char[] outValue = reverse( inValue );

        c[ 0 ] = new HarmonySerialClob( new String( outValue ) );
    }
View Full Code Here

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

    }

   /** Clob-creating function */
    public  static  Clob    makeClob( String contents ) throws Exception
    {
        return new HarmonySerialClob( contents );
    }
View Full Code Here

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

             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 ),
             new BigDecimal( "1" ),
             new Double( 1.0 ),
             new Integer( 1 ),
             new String( "firstt" ),
View Full Code Here

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

             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 ),
             new BigDecimal( "2" ),
             new Double( 2.0 ),
             new Integer( 2 ),
             new String( "second" ),
View Full Code Here

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

        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 );
        doublearg[0] = _nullOutArgs ? null : new  Double( floatValue );
        floatarg[0] = _nullOutArgs ? null : new Double( floatValue );
        intarg[0] = _nullOutArgs ? null : new Integer( intValue );
        longvarchararg[0] = _nullOutArgs ? null : stringValue;
View Full Code Here

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

        return new HarmonySerialBlob( makeBinary( contents ) );
    }

    private  static  Clob    makeClob( String contents )
    {
        return new HarmonySerialClob( contents );
    }
View Full Code Here

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

        throws SQLException
    {
        String  columnValue = getString( columnIndex );

        if ( columnValue == null ) { return null; }
        { return new HarmonySerialClob( getString( columnIndex ) ); }
    }
View Full Code Here

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

    }

   /** Clob-creating function */
    public  static  Clob    makeClob( String contents ) throws Exception
    {
        return new HarmonySerialClob( contents );
    }
View Full Code Here

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

        cs.execute();
        assertEquals( "def", cs.getString( 1 ) );
        cs.close();

        cs = chattyPrepareCall( conn, "call clobIn( ?, ? )" );
        cs.setClob( 1, new HarmonySerialClob( "ghi" ) );
        cs.registerOutParameter( 2, Types.VARCHAR );
        cs.execute();
        assertEquals( "ghi", cs.getString( 2 ) );
        cs.close();

        //
        // Clob output parameter
        //
        ps = chattyPrepare
            (
             conn,
             "create procedure clobOut\n" +
             "( out c clob )\n" +
             "language java\n" +
             "parameter style java\n" +
             "no sql\n" +
             "external name '" + getClass().getName() + ".clobOut'\n"
             );
        ps.execute();
        ps.close();
       
        cs = chattyPrepareCall( conn, "call clobOut( ? )" );
        cs.registerOutParameter( 1, Types.CLOB );
        cs.execute();
        outVal = cs.getClob( 1 );
        assertEquals( "abc", outVal.getSubString( 1L, (int) outVal.length() ) );
        cs.close();

        //
        // Clob inout parameter
        //
        ps = chattyPrepare
            (
             conn,
             "create procedure clobInOut\n" +
             "( inout c clob )\n" +
             "language java\n" +
             "parameter style java\n" +
             "no sql\n" +
             "external name '" + getClass().getName() + ".clobInOut'\n"
             );
        ps.execute();
        ps.close();
       
        cs = chattyPrepareCall( conn, "call clobInOut( ? )" );
        cs.setClob( 1, new HarmonySerialClob( "ghi" ) );
        cs.registerOutParameter( 1, Types.CLOB );
        cs.execute();
        outVal = cs.getClob( 1 );
        assertEquals( "ihg", outVal.getSubString( 1L, (int) outVal.length() ) );
View Full Code Here

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

                value[ idx++ ] = template[ j ];
            }
                         
        }
       
        return new HarmonySerialClob( new String( value ) );
    }
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.