Package org.qi4j.api.value

Examples of org.qi4j.api.value.ValueSerializationException


                {
                    throw ex;
                }
                catch( Exception ex )
                {
                    throw new ValueSerializationException( ex );
                }
            }
        };
    }
View Full Code Here


        if( typeInfo != null )
        {
            ValueDescriptor valueDescriptor = valuesModule().valueDescriptor( typeInfo );
            if( valueDescriptor == null )
            {
                throw new ValueSerializationException( "Specified value type could not be resolved: " + typeInfo );
            }
            valueCompositeType = valueDescriptor.valueType();
            valueBuilderType = Class.forName( typeInfo );
            if( !valueType.equals( valueCompositeType ) )
            {
View Full Code Here

                {
                    throw ex;
                }
                catch( Exception ex )
                {
                    throw new ValueSerializationException( ex );
                }
            }
        };
    }
View Full Code Here

                    "In deserializeNodeGuessed(), getObjectFieldValue( {} ) returned '{}'",
                    inputNode, typeInfo );
                ValueDescriptor valueDescriptor = valuesModule().valueDescriptor( typeInfo );
                if( valueDescriptor == null )
                {
                    throw new ValueSerializationException( "Specified value type could not be resolved: " + typeInfo );
                }
                valueCompositeType = valueDescriptor.valueType();
                TREE_PARSING_LOG.debug(
                    "Overriding {} with {} as defined in _type field.",
                    valueType, valueCompositeType );
            }
            else // without _type info
            {
                ValueDescriptor valueDescriptor = valuesModule().valueDescriptor( first( valueType.types() ).getName() );
                if( valueDescriptor == null )
                {
                    throw new ValueSerializationException( "Don't know how to deserialize " + inputNode );
                }
                valueCompositeType = valueDescriptor.valueType();
                TREE_PARSING_LOG.debug(
                    "Overriding {} with {} as found in available ValueComposites.",
                    valueType, valueCompositeType );
View Full Code Here

        {
            throw ex;
        }
        catch( Exception ex )
        {
            throw new ValueSerializationException( "Could not serialize value", ex );
        }
    }
View Full Code Here

        {
            throw ex;
        }
        catch( Exception ex )
        {
            throw new ValueSerializationException( "Could not serialize value", ex );
        }
    }
View Full Code Here

        }
        else // Object or Array
        if( JSONObject.class.isAssignableFrom( nextValue.getClass() )
            || JSONArray.class.isAssignableFrom( nextValue.getClass() ) )
        {
            throw new ValueSerializationException( "Asked for a Value but found an Object or an Array." );
        }
        return nextValue;
    }
View Full Code Here

        {
            return null;
        }
        if( inputNode instanceof JSONObject || inputNode instanceof JSONArray )
        {
            throw new ValueSerializationException( "Expected a simple value but got " + inputNode );
        }
        return inputNode;
    }
View Full Code Here

        {
            return false;
        }
        if( !( inputNode instanceof JSONObject ) )
        {
            throw new ValueSerializationException( "Expected an object but got " + inputNode );
        }
        JSONObject json = (JSONObject) inputNode;
        return json.has( key );
    }
View Full Code Here

        {
            return;
        }
        if( !( inputNode instanceof JSONArray ) )
        {
            throw new ValueSerializationException( "Expected an array but got " + inputNode );
        }
        JSONArray array = (JSONArray) inputNode;
        for( int idx = 0; idx < array.length(); idx++ )
        {
            Object item = array.get( idx );
View Full Code Here

TOP

Related Classes of org.qi4j.api.value.ValueSerializationException

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.