Package org.qi4j.api.value

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


                                {
                                    return vTypeClass.isAssignableFrom( item );
                                }
                            }, vDesc.types() ) )
                            {
                                for( PropertyDescriptor subPDesc : vDesc.state().properties() )
                                {
                                    this.processPropertyTypeForQNames( //
                                        subPDesc, //
                                        qNameInfos, //
                                        newQNames, //
View Full Code Here


    {
        ValueDescriptor vDesc = this._qi4SPI.valueDescriptorFor( (ValueComposite) property );
        StateHolder state = Qi4j.FUNCTION_COMPOSITE_INSTANCE_OF.map( (ValueComposite) property ).state();
        Integer originalPropertyPK = propertyPK;
        ++propertyPK;
        for( PropertyDescriptor pDesc : vDesc.state().properties() )
        {

            propertyPK = this.insertProperty(
                qNameInsertPSs,
                insertAllQNamesPS,
View Full Code Here

    @Test
    public void givenValuesOfTheSameTypeWhenTestingPropertyDescriptorEqualityExpectEquals()
    {
        Some some = buildSomeValue( module );
        ValueDescriptor someDescriptor = qi4j.api().valueDescriptorFor( some );
        PropertyDescriptor someCharPropDesc = someDescriptor.state().findPropertyModelByName( "characterProperty" );

        Some other = buildSomeValue( module );
        ValueDescriptor otherDescriptor = qi4j.api().valueDescriptorFor( other );
        PropertyDescriptor otherCharPropDesc = otherDescriptor.state().findPropertyModelByName( "characterProperty" );
View Full Code Here

        ValueDescriptor someDescriptor = qi4j.api().valueDescriptorFor( some );
        PropertyDescriptor someCharPropDesc = someDescriptor.state().findPropertyModelByName( "characterProperty" );

        Some other = buildSomeValue( module );
        ValueDescriptor otherDescriptor = qi4j.api().valueDescriptorFor( other );
        PropertyDescriptor otherCharPropDesc = otherDescriptor.state().findPropertyModelByName( "characterProperty" );

        assertThat( "PropertyDescriptors equal",
                    someCharPropDesc,
                    equalTo( otherCharPropDesc ) );
        assertThat( "PropertyDescriptors hashcode equal",
View Full Code Here

    @Test
    public void givenValuesOfCommonTypesWhenTestingPropertyDescriptorEqualityExpectEquals()
    {
        Some some = buildSomeValue( module );
        ValueDescriptor someDescriptor = qi4j.api().valueDescriptorFor( some );
        PropertyDescriptor someCharPropDesc = someDescriptor.state().findPropertyModelByName( "characterProperty" );

        PrimitivesValue primitive = buildPrimitivesValue( module );
        ValueDescriptor primitiveDescriptor = qi4j.api().valueDescriptorFor( primitive );
        PropertyDescriptor primitiveCharPropDesc = primitiveDescriptor.state().findPropertyModelByName( "characterProperty" );
View Full Code Here

        ValueDescriptor someDescriptor = qi4j.api().valueDescriptorFor( some );
        PropertyDescriptor someCharPropDesc = someDescriptor.state().findPropertyModelByName( "characterProperty" );

        PrimitivesValue primitive = buildPrimitivesValue( module );
        ValueDescriptor primitiveDescriptor = qi4j.api().valueDescriptorFor( primitive );
        PropertyDescriptor primitiveCharPropDesc = primitiveDescriptor.state().findPropertyModelByName( "characterProperty" );

        assertThat( "PropertyDescriptors equal",
                    someCharPropDesc,
                    equalTo( primitiveCharPropDesc ) );
        assertThat( "PropertyDescriptors hashcode equal",
View Full Code Here

    @Test
    public void givenValuesOfDifferentTypesWhenTestingPropertyDescriptorEqualityExpectNotEquals()
    {
        Some some = buildSomeValue( module );
        ValueDescriptor someDescriptor = qi4j.api().valueDescriptorFor( some );
        PropertyDescriptor someCharPropDesc = someDescriptor.state().findPropertyModelByName( "characterProperty" );

        Other other = buildOtherValue( module );
        ValueDescriptor otherDescriptor = qi4j.api().valueDescriptorFor( other );
        PropertyDescriptor otherCharPropDesc = otherDescriptor.state().findPropertyModelByName( "characterProperty" );
View Full Code Here

        ValueDescriptor someDescriptor = qi4j.api().valueDescriptorFor( some );
        PropertyDescriptor someCharPropDesc = someDescriptor.state().findPropertyModelByName( "characterProperty" );

        Other other = buildOtherValue( module );
        ValueDescriptor otherDescriptor = qi4j.api().valueDescriptorFor( other );
        PropertyDescriptor otherCharPropDesc = otherDescriptor.state().findPropertyModelByName( "characterProperty" );

        assertThat( "PropertyDescriptors not equal",
                    someCharPropDesc,
                    not( equalTo( otherCharPropDesc ) ) );
        assertThat( "PropertyDescriptors hashcode not equal",
View Full Code Here

            final Reference ref = request.getResourceRef();
            ref.setQuery( null );

             try
             {
                 for( PropertyDescriptor propertyDescriptor : descriptor.state().properties() )
                 {
                     Object value = holder.propertyFor( propertyDescriptor.accessor() ).get();
                     String param;
                     if( value == null )
                     {
View Full Code Here

        QName qname = getSchemaType();
        final String className = ( qname.getNamespaceURI() + "." + qname.getLocalPart() ).substring( 20 );

        // Read attributes
        ValueDescriptor descriptor = module.valueDescriptor( className );
        StateDescriptor stateDescriptor = descriptor.state();
        final Map<QualifiedName, Object> values = new HashMap<>();
        while( reader.hasMoreElementReaders() )
        {
            MessageReader childReader = reader.getNextElementReader();
            QName childName = childReader.getName();
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.