Package org.qi4j.api.type

Examples of org.qi4j.api.type.CollectionType


                {
                    value = new LinkedHashSet( (Collection) value);
                }

                // Check if items are Values
                CollectionType collection = (CollectionType) propertyDescriptor.valueType();
                if( collection.collectedType() instanceof ValueCompositeType )
                {
                    Collection coll = (Collection) value;
                    for( Object instance : coll )
                    {
                        ValueInstance.getValueInstance( (ValueComposite) instance ).prepareToBuild();
View Full Code Here


                        value = (T) Collections.unmodifiableCollection( (Collection<? extends Object>) value );
                        set( value );
                    }
                }

                CollectionType collection = (CollectionType) propertyDescriptor.valueType();
                if( collection.collectedType() instanceof ValueCompositeType )
                {
                    Collection coll = (Collection) value;
                    for( Object instance : coll )
                    {
                        ValueInstance.getValueInstance( (ValueComposite) instance ).prepareBuilderState();
View Full Code Here

    @Test
    public void givenCollectionTypeWithByteAndNullElementWhenSerializingExpectCorrectJsonOutput()
        throws Exception
    {
        ValueType collectedType = new ValueType( Byte.class );
        CollectionType collectionType = new CollectionType( Collection.class, collectedType );

        Collection<Byte> value = byteCollection();
        JSONObjectSerializer serializer = new JSONObjectSerializer();
        serializer.serialize( value, collectionType );
        Object json = serializer.getRoot();
View Full Code Here

    @Test
    public void givenCollectionTypeWithShortAndNullElementWhenSerializingExpectCorrectJsonOutput()
        throws Exception
    {
        ValueType collectedType = new ValueType( Short.class );
        CollectionType collectionType = new CollectionType( Collection.class, collectedType );

        Collection<Short> value = shortCollection();
        JSONObjectSerializer serializer = new JSONObjectSerializer();
        serializer.serialize( value, collectionType );
        Object json = serializer.getRoot();
View Full Code Here

    @Test
    public void givenCollectionTypeWithIntegerAndNullElementWhenSerializingExpectCorrectJsonOutput()
        throws Exception
    {
        ValueType collectedType = new ValueType( Integer.class );
        CollectionType collectionType = new CollectionType( Collection.class, collectedType );

        Collection<Integer> value = integerCollection();
        JSONObjectSerializer serializer = new JSONObjectSerializer();
        serializer.serialize( value, collectionType );
        Object json = serializer.getRoot();
View Full Code Here

    @Test
    public void givenCollectionTypeWithLongAndNullElementWhenSerializingExpectCorrectJsonOutput()
        throws Exception
    {
        ValueType collectedType = new ValueType( Long.class );
        CollectionType collectionType = new CollectionType( Collection.class, collectedType );

        Collection<Long> value = longCollection();
        JSONObjectSerializer serializer = new JSONObjectSerializer();
        serializer.serialize( value, collectionType );
        Object json = serializer.getRoot();
View Full Code Here

    @Test
    public void givenCollectionTypeWithFloatAndNullElementWhenSerializingExpectCorrectJsonOutput()
        throws Exception
    {
        ValueType collectedType = new ValueType( Float.class );
        CollectionType collectionType = new CollectionType( Collection.class , collectedType );

        Collection<Float> value = floatCollection();
        JSONObjectSerializer serializer = new JSONObjectSerializer();
        serializer.serialize( value, collectionType );
        Object json = serializer.getRoot();
View Full Code Here

    @Test
    public void givenCollectionTypeWithDoubleAndNullElementWhenSerializingExpectCorrectJsonOutput()
        throws Exception
    {
        ValueType collectedType = new ValueType( Double.class );
        CollectionType collectionType = new CollectionType( Collection.class, collectedType );

        Collection<Double> value = doubleCollection();
        JSONObjectSerializer serializer = new JSONObjectSerializer();
        serializer.serialize( value, collectionType );
        Object json = serializer.getRoot();
View Full Code Here

    @Test
    public void givenCollectionTypeWithBigIntegerAndNullElementWhenSerializingExpectCorrectJsonOutput()
        throws Exception
    {
        ValueType collectedType = new ValueType( BigInteger.class );
        CollectionType collectionType = new CollectionType( Collection.class, collectedType );

        Collection<BigInteger> value = bigIntegerCollection();
        JSONObjectSerializer serializer = new JSONObjectSerializer();
        serializer.serialize( value, collectionType );
        Object json = serializer.getRoot();
View Full Code Here

    @Test
    public void givenCollectionTypeWithBigDecimalAndNullElementWhenSerializingExpectCorrectJsonOutput()
        throws Exception
    {
        ValueType collectedType = new ValueType( BigDecimal.class );
        CollectionType collectionType = new CollectionType( Collection.class, collectedType );

        Collection<BigDecimal> value = bigDecimalCollection();
        JSONObjectSerializer serializer = new JSONObjectSerializer();
        serializer.serialize( value, collectionType );
        Object json = serializer.getRoot();
View Full Code Here

TOP

Related Classes of org.qi4j.api.type.CollectionType

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.