Examples of valueType()


Examples of org.qi4j.api.property.PropertyDescriptor.valueType()

        try
        {
            if( prop != null )
            {
                PropertyDescriptor persistentProperty = entityDescriptor().state().findPropertyModelByQualifiedName( stateName );
                if( ValueType.isPrimitiveValueType( persistentProperty.valueType() ) )
                {
                    underlyingNode.setProperty( "prop::" + stateName.toString(), prop );
                }
                else
                {
View Full Code Here

Examples of org.qi4j.api.property.PropertyDescriptor.valueType()

                PropertyDescriptor descriptor = entityDescriptor.state().findPropertyModelByQualifiedName( stateName );
                if( descriptor == null )
                {
                    return null;
                }
                return valueSerialization.deserialize( descriptor.valueType(), json.toString() );
            }
        }
        catch( ValueSerializationException | JSONException e )
        {
            throw new EntityStoreException( e );
View Full Code Here

Examples of org.qi4j.api.type.MapType.valueType()

                    for( Object instance : map.keySet() )
                    {
                        ValueInstance.valueInstanceOf( (ValueComposite) instance ).prepareToBuild();
                    }
                }
                if( mapType.valueType() instanceof ValueCompositeType )
                {
                    for( Object instance : map.values() )
                    {
                        ValueInstance.valueInstanceOf( (ValueComposite) instance ).prepareToBuild();
                    }
View Full Code Here

Examples of org.qi4j.api.type.MapType.valueType()

                    for( Object instance : map.keySet() )
                    {
                        ValueInstance.valueInstanceOf( (ValueComposite) instance ).prepareBuilderState();
                    }
                }
                if( mapType.valueType() instanceof ValueCompositeType )
                {
                    Map map = (Map) value;
                    for( Object instance : map.values() )
                    {
                        ValueInstance.valueInstanceOf( (ValueComposite) instance ).prepareBuilderState();
View Full Code Here

Examples of org.qi4j.api.value.ValueDescriptor.valueType()

    public void serialize( ValueComposite value ) throws JSONException
    {
        ValueDescriptor valueDescriptor = (ValueDescriptor) Qi4j.DESCRIPTOR_FUNCTION.map(value);

        ValueType valueType = valueDescriptor.valueType();

        serialize( value, valueType );
    }

    public void serialize( Object value, ValueType valueType ) throws JSONException
View Full Code Here

Examples of org.qi4j.api.value.ValueDescriptor.valueType()

            if( !valueCompositeType.type().equals( Qi4j.DESCRIPTOR_FUNCTION.map( valueComposite ).type() ) )
            {
                // Actual value is a subtype - use it instead
                ValueDescriptor valueDescriptor = (ValueDescriptor) Qi4j.DESCRIPTOR_FUNCTION.map( valueComposite );

                valueCompositeType = valueDescriptor.valueType();

                if (includeTypeInformation)
                    key("_type").value( valueDescriptor.valueType().type().getName() );
            }
View Full Code Here

Examples of org.qi4j.api.value.ValueDescriptor.valueType()

                ValueDescriptor valueDescriptor = (ValueDescriptor) Qi4j.DESCRIPTOR_FUNCTION.map( valueComposite );

                valueCompositeType = valueDescriptor.valueType();

                if (includeTypeInformation)
                    key("_type").value( valueDescriptor.valueType().type().getName() );
            }

            AssociationStateHolder state = (AssociationStateHolder) Qi4j.INSTANCE_FUNCTION.map( valueComposite ).state();
            for( PropertyDescriptor persistentProperty : valueCompositeType.properties() )
            {
View Full Code Here

Examples of org.qi4j.api.value.ValueDescriptor.valueType()

                if( descriptor == null )
                {
                    throw new IllegalArgumentException( "Could not find any value of type '" + actualType + "' in module" + module );
                }

                actualValueType = descriptor.valueType();
            }

            final Map<QualifiedName, Object> values = new HashMap<QualifiedName, Object>();
            for( PropertyDescriptor persistentProperty : actualValueType.properties() )
            {
View Full Code Here

Examples of org.qi4j.api.value.ValueDescriptor.valueType()

                    // ValueComposite deserialization
                    JSONObject jsonObject = (JSONObject) json;
                    String type = jsonObject.getString( "_type" );

                    ValueDescriptor valueDescriptor = module.valueDescriptor( type );
                    return deserialize( json, valueDescriptor.valueType() );
                } else
                {
                    String serializedString = (String) json;
                    byte[] bytes = serializedString.getBytes( "UTF-8" );
                    bytes = Base64Encoder.decode( bytes );
View Full Code Here

Examples of org.qi4j.api.value.ValueDescriptor.valueType()

            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 ) )
            {
                TREE_PARSING_LOG.debug(
                    "Overriding {} with {} as defined in _type field.",
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.