Package org.qi4j.api.value

Examples of org.qi4j.api.value.ValueComposite


        } else if( valueType instanceof ValueCompositeType ) // Handle all other types
        {
            ValueCompositeType valueCompositeType = (ValueCompositeType) valueType;

            objectStart();
            ValueComposite valueComposite = (ValueComposite) value;

            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 );
View Full Code Here


            EntityComposite composite = (EntityComposite) compositeOrServiceReferenceOrUow;
            return EntityInstance.entityInstanceOf( composite ).module();
        }
        else if( compositeOrServiceReferenceOrUow instanceof ValueComposite )
        {
            ValueComposite composite = (ValueComposite) compositeOrServiceReferenceOrUow;
            return ValueInstance.valueInstanceOf( composite ).module();
        }
        else if( compositeOrServiceReferenceOrUow instanceof ServiceComposite )
        {
            ServiceComposite composite = (ServiceComposite) compositeOrServiceReferenceOrUow;
View Full Code Here

            EntityComposite composite = (EntityComposite) compositeOrServiceReference;
            return EntityInstance.entityInstanceOf( composite ).descriptor();
        }
        else if( compositeOrServiceReference instanceof ValueComposite )
        {
            ValueComposite composite = (ValueComposite) compositeOrServiceReference;
            return ValueInstance.valueInstanceOf( composite ).descriptor();
        }
        else if( compositeOrServiceReference instanceof ServiceComposite )
        {
            ServiceComposite composite = (ServiceComposite) compositeOrServiceReference;
View Full Code Here

   public boolean writeRequest(Object requestObject, Request request) throws ResourceException
   {
      if (requestObject instanceof ValueComposite)
      {
         // Value as parameter
         final ValueComposite valueObject = (ValueComposite) requestObject;
         if (request.getMethod().equals(Method.GET))
         {
            StateHolder holder = spi.stateOf( valueObject );
            final ValueDescriptor descriptor = spi.valueDescriptorFor( valueObject );
View Full Code Here

    @Override
    public void writeObject( Object object, final MessageWriter writer, final Context context )
        throws DatabindingException
    {
        ValueComposite composite = (ValueComposite) object;
        writer.writeXsiType( NamespaceUtil.convertJavaTypeToQName(
            first( Qi4j.FUNCTION_DESCRIPTOR_FOR.map( composite ).types() ) ) );
        AssociationStateHolder state = spi.stateOf( composite );
        for( Property<?> property : state.properties() )
        {
            Object value = property.get();
            AegisType type = null;
            if( value instanceof ValueComposite )
            {
                ValueComposite compositeValue = (ValueComposite) value;
                type = getTypeMapping().getType( NamespaceUtil.convertJavaTypeToQName(
                    first( Qi4j.FUNCTION_DESCRIPTOR_FOR.map( compositeValue ).types() ) ) );
            }
            else if( value != null )
            {
View Full Code Here

TOP

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

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.