Package com.mysql.clusterj

Examples of com.mysql.clusterj.ClusterJUserException


        try {
            int parameterIndex = Integer.valueOf(index) + offset;
            Long result = parameterBindings.getLong(parameterIndex);
            return result;
        } catch (SQLException ex) {
                throw new ClusterJUserException(local.message("ERR_Getting_Parameter_Value", offset, index), ex);
        }
    }
View Full Code Here


        try {
            int parameterIndex = Integer.valueOf(index) + offset;
            Short result = parameterBindings.getShort(parameterIndex);
            return result;
        } catch (SQLException ex) {
                throw new ClusterJUserException(local.message("ERR_Getting_Parameter_Value", offset, index), ex);
        }
    }
View Full Code Here

        try {
            int parameterIndex = Integer.valueOf(index) + offset;
            String result = parameterBindings.getString(parameterIndex);
            return result;
        } catch (SQLException ex) {
                throw new ClusterJUserException(local.message("ERR_Getting_Parameter_Value", offset, index), ex);
        }
    }
View Full Code Here

        try {
            int parameterIndex = Integer.valueOf(index) + offset;
            Object result = parameterBindings.getObject(parameterIndex);
            return result;
        } catch (SQLException ex) {
                throw new ClusterJUserException(local.message("ERR_Getting_Parameter_Value", offset, index), ex);
        }
    }
View Full Code Here

    protected DomainTypeHandlerImpl(String tableName, Dictionary dictionary) {
        if (logger.isDebugEnabled()) logger.debug("New JDBC DomainTypeHandlerImpl for table " + tableName);
        this.tableName = tableName;
        this.table = dictionary.getTable(tableName);
        if (table == null) {
            throw new ClusterJUserException(local.message("ERR_Get_NdbTable", tableName, tableName));
        }
        String[] columnNames = table.getColumnNames();
        fieldNames = columnNames;
        if (logger.isDebugEnabled()) logger.debug("Found Table for " + tableName
                + " with columns " + Arrays.toString(columnNames));
View Full Code Here

    static Class<?> loadClass(String className) {
        try {
            return Class.forName(className);
        } catch (ClassNotFoundException e) {
            // TODO Auto-generated catch block
            throw new ClusterJUserException(local.message("ERR_Loading_Native_Class", className), e);
        }
    }
View Full Code Here

                result = (CharsetMap)charsetMapCreateMethod.invoke(null, (Object[])null);
                builder.append("charsetMapCreateMethod.invoke() succeeded:" + result);
            } catch (Throwable t2) {
                builder.append("charsetMapCreateMethod.invoke() threw " + t2.getClass().getName() + ":" + t2.getMessage());
            }
            throw new ClusterJUserException(builder.toString());
        }
    }
View Full Code Here

        byteBuffer.flip();
        int returnCode = Utils.decimal_str2bin(
                byteBuffer, length, precision, scale, result, bytesNeeded);
        byteBuffer.flip();
        if (returnCode != 0) {
            throw new ClusterJUserException(
                    local.message("ERR_String_To_Binary_Decimal",
                    returnCode, scaledValue, storeColumn.getName(), precision, scale));
        }
        return result;
    }
View Full Code Here

        byteBuffer.flip();
        int returnCode = Utils.decimal_str2bin(
                byteBuffer, length, precision, scale, result, bytesNeeded);
        byteBuffer.flip();
        if (returnCode != 0) {
            throw new ClusterJUserException(
                    local.message("ERR_String_To_Binary_Decimal",
                    returnCode, stringRepresentation, storeColumn.getName(), precision, scale));
        }
        return result;
    }
View Full Code Here

    private static CharSequence padString(CharSequence value, Column storeColumn) {
        CharSequence chars = value;
        int suppliedLength = value.length();
        int requiredLength = storeColumn.getColumnSpace();
        if (suppliedLength > requiredLength) {
            throw new ClusterJUserException(local.message("ERR_Data_Too_Long",
                    storeColumn.getName(), requiredLength, suppliedLength));
        } else if (suppliedLength < requiredLength) {
            // pad to fixed length
            StringBuilder buffer = new StringBuilder(requiredLength);
            buffer.append(value);
View Full Code Here

TOP

Related Classes of com.mysql.clusterj.ClusterJUserException

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.