Examples of JPOXDataStoreException


Examples of org.jpox.exceptions.JPOXDataStoreException

            maximumScale      = rs.getShort(15);
            numPrecRadix      = rs.getInt(18);
        }
        catch (SQLException e)
        {
            throw new JPOXDataStoreException("Can't read JDBC metadata from result set", e).setFatal();
        }
    }
View Full Code Here

Examples of org.jpox.exceptions.JPOXDataStoreException

            }
            catch (SQLException e1)
            {
                try
                {
                    throw new JPOXDataStoreException("Can't get float result: param = " + param + " - " +((ResultSet) rs).getString(param), e);
                }
                catch (SQLException e2)
                {
                    throw new JPOXDataStoreException(LOCALISER.msg("055002","float","" + param, column, e.getMessage()), e);
                }
            }
        }

        return value;
View Full Code Here

Examples of org.jpox.exceptions.JPOXDataStoreException

                ((PreparedStatement) ps).setFloat(param, ((Float)value).floatValue());
            }
        }
        catch (SQLException e)
        {
            throw new JPOXDataStoreException(LOCALISER.msg("055001","Object","" + value, column, e.getMessage()), e);
        }
    }
View Full Code Here

Examples of org.jpox.exceptions.JPOXDataStoreException

            }
            catch (SQLException e1)
            {
                try
                {
                    throw new JPOXDataStoreException("Can't get float result: param = " + param + " - " + ((ResultSet) rs).getString(param), e);
                }
                catch (SQLException e2)
                {
                    throw new JPOXDataStoreException(LOCALISER.msg("055002", "Object", "" + param, column, e.getMessage()), e);
                }
            }
        }

        return value;
View Full Code Here

Examples of org.jpox.exceptions.JPOXDataStoreException

        {
            ((PreparedStatement) ps).setDouble(param, value);
        }
        catch (SQLException e)
        {
            throw new JPOXDataStoreException(LOCALISER.msg("055001","int","" + value, column, e.getMessage()), e);
        }
    }
View Full Code Here

Examples of org.jpox.exceptions.JPOXDataStoreException

                }
            }
        }
        catch (SQLException e)
        {
            throw new JPOXDataStoreException(LOCALISER.msg("055002","int","" + param, column, e.getMessage()), e);
        }

        return value;
    }
View Full Code Here

Examples of org.jpox.exceptions.JPOXDataStoreException

        {
            ((PreparedStatement) ps).setLong(param, value);
        }
        catch (SQLException e)
        {
            throw new JPOXDataStoreException(LOCALISER.msg("055001","long","" + value, column, e.getMessage()), e);
        }
    }
View Full Code Here

Examples of org.jpox.exceptions.JPOXDataStoreException

                }
            }
        }
        catch (SQLException e)
        {
            throw new JPOXDataStoreException(LOCALISER.msg("055002","long","" + param, column, e.getMessage()), e);
        }

        return value;
    }
View Full Code Here

Examples of org.jpox.exceptions.JPOXDataStoreException

        {
            ((PreparedStatement) ps).setDouble(param, value);
        }
        catch (SQLException e)
        {
            throw new JPOXDataStoreException(LOCALISER.msg("055001","double","" + value, column, e.getMessage()), e);
        }
    }
View Full Code Here

Examples of org.jpox.exceptions.JPOXDataStoreException

                if (fmd.isSerialized())
                {
                    // Serialised field so just perform basic Java serialisation for retrieval
                    if (!(value instanceof Serializable))
                    {
                        throw new JPOXDataStoreException(LOCALISER.msg("055005", value.getClass().getName()));
                    }
                    BlobImpl b = new BlobImpl(value);
                    bytes = b.getBytes(0, (int) b.length());
                }
                else if (value instanceof boolean[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromBooleanArray(value);
                }
                else if (value instanceof char[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromCharArray(value);
                }
                else if (value instanceof double[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromDoubleArray(value);
                }
                else if (value instanceof float[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromFloatArray(value);
                }
                else if (value instanceof int[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromIntArray(value);
                }
                else if (value instanceof long[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromLongArray(value);
                }
                else if (value instanceof short[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromShortArray(value);
                }
                else if (value instanceof Boolean[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromBooleanObjectArray(value);
                }
                else if (value instanceof Byte[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromByteObjectArray(value);
                }
                else if (value instanceof Character[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromCharObjectArray(value);
                }
                else if (value instanceof Double[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromDoubleObjectArray(value);
                }
                else if (value instanceof Float[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromFloatObjectArray(value);
                }
                else if (value instanceof Integer[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromIntObjectArray(value);
                }
                else if (value instanceof Long[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromLongObjectArray(value);
                }
                else if (value instanceof Short[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromShortObjectArray(value);
                }
                else if (value instanceof BigDecimal[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromBigDecimalArray(value);
                }
                else if (value instanceof BigInteger[])
                {
                    bytes = TypeConversionHelper.getByteArrayFromBigIntegerArray(value);
                }
                else if (value instanceof byte[])
                {
                    bytes = (byte[]) value;
                }
                else if (value instanceof java.util.BitSet)
                {
                    bytes = TypeConversionHelper.getByteArrayFromBooleanArray(TypeConversionHelper.getBooleanArrayFromBitSet((java.util.BitSet) value));
                }
                else
                {
                    // Fall back to just perform Java serialisation for storage
                    if (!(value instanceof Serializable))
                    {
                        throw new JPOXDataStoreException(LOCALISER.msg("055005", value.getClass().getName()));
                    }
                    BlobImpl b = new BlobImpl(value);
                    bytes = b.getBytes(0, (int) b.length());
                }
            }
            catch (SQLException e)
            {
                throw new JPOXDataStoreException(LOCALISER.msg("055001", "Object", "" + value, fmd, e.getMessage()), e);
            }
            catch (IOException e1)
            {
                // Do nothing
            }
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.