Package com.mysql.clusterj

Examples of com.mysql.clusterj.ClusterJUserException


        switch (offset) {
            case 0:
                break;
            case 1:
                if (length > 255) {
                    throw new ClusterJUserException(local.message("ERR_Varchar_Too_Big",
                            length, columnName));
                }
                byteBuffer.put((byte)(length % 256));
                break;
            case 2:
                if (length > 65535) {
                    throw new ClusterJUserException(local.message("ERR_Varchar_Too_Big",
                            length, columnName));
                }
                byteBuffer.put((byte)(length % 256));
                byteBuffer.put((byte)(length / 256));
                break;
View Full Code Here


        int day = calendar.get(Calendar.DATE);
        int hour = calendar.get(Calendar.HOUR);
        int minute = calendar.get(Calendar.MINUTE);
        int second = calendar.get(Calendar.SECOND);
        if (month != 0) {
            throw new ClusterJUserException(
                    local.message("ERR_Write_Time_Domain", new java.sql.Time(millis), millis, year, month, day, hour, minute, second));
        }
        int time = ((day - 1) * 240000) + (hour * 10000) + (minute * 100) + second;
        return time;
    }
View Full Code Here

        String decimal = null;
        try {
            decimal = getDecimalString(byteBuffer, length, precision, scale);
            return new BigDecimal(decimal);
        } catch (NumberFormatException nfe) {
            throw new ClusterJUserException(
                    local.message("ERR_Number_Format", decimal, dump(decimal)));
        }
    }
View Full Code Here

        String decimal = null;
        try {
            decimal = getDecimalString(byteBuffer, length, precision, scale);
            return new BigInteger(decimal);
        } catch (NumberFormatException nfe) {
            throw new ClusterJUserException(
                    local.message("ERR_Number_Format", decimal, dump(decimal)));
        }
    }
View Full Code Here

        // allow for decimal point and sign and one more for trailing null
        int capacity = precision + 3;
        ByteBuffer digits = ByteBuffer.allocateDirect(capacity);
        int returnCode = Utils.decimal_bin2str(byteBuffer, length, precision, scale, digits, capacity);
        if (returnCode != 0) {
            throw new ClusterJUserException(
                    local.message("ERR_Binary_Decimal_To_String",
                    returnCode, precision, scale, dumpBytes(byteBuffer)));
        }
        String string = null;
        // look for the end (null) of the result string
View Full Code Here

        int minute = packedTime % 100;
        packedTime /= 100;
        int hour = packedTime % 24;
        int date = (packedTime / 24) + 1;
        if (date > 31) {
            throw new ClusterJUserException(
                    local.message("ERR_Read_Time_Domain", packedTime, date, hour, minute, second));
        }
        Calendar calendar = Calendar.getInstance();
        calendar.clear();
        calendar.set(Calendar.DATE, date);
View Full Code Here

    }

    public ColumnImpl getColumn(String columnName) {
  NdbColumn ndbColumn = table.getColumn(columnName);
  if (ndbColumn == null) {
      throw new ClusterJUserException(
        local.message("ERR_No_Column", table.getName(), columnName));
  }
        return new ColumnImpl(table, ndbColumn);
    }
View Full Code Here

     // TODO Auto-generated method stub

     }

     public void init(Connection arg0, Properties arg1) throws SQLException {
     throw new ClusterJUserException("BadConnectionLifecycleInterceptor is built to fail.");
     }
View Full Code Here

            ConnectionLifecycleInterceptor connectionLifecycleInterceptor,
            Connection connection, Properties properties) {
        InterceptorImpl result = getInterceptorImpl(connection, properties);
        if (result.connectionLifecycleInterceptor != null) {
            if (result.connectionLifecycleInterceptor != connectionLifecycleInterceptor) {
                throw new ClusterJUserException(
                        local.message("ERR_Duplicate_Connection_Lifecycle_Interceptor"));
            }
        } else {
            result.connectionLifecycleInterceptor = connectionLifecycleInterceptor;
        }
View Full Code Here

    public static InterceptorImpl getInterceptorImpl(
            StatementInterceptor statementInterceptor, Connection connection,
            Properties properties) {
        InterceptorImpl result = getInterceptorImpl(connection, properties);
        if (result.statementInterceptor != null) {
            throw new ClusterJUserException(
                    local.message("ERR_Duplicate_Statement_Interceptor"));
        }
        result.statementInterceptor = statementInterceptor;
        if (result.connectionLifecycleInterceptor != null) {
            result.ready = true;
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.