Examples of fromBytes()


Examples of com.impetus.kundera.property.accessor.EnumAccessor.fromBytes()

         * @return
         */
        private static Object decompose(Object value, Class clazz)
        {
            EnumAccessor accessor = new EnumAccessor();
            return accessor.fromBytes(clazz, ((byte[]) value));
        }
    }

    /**
     * Used to decompose and compose character type data objects
View Full Code Here

Examples of com.impetus.kundera.property.accessor.IntegerAccessor.fromBytes()

         * @return
         */
        private static Object decompose(Object value, Class clazz)
        {
            IntegerAccessor accessor = new IntegerAccessor();
            int thriftColumnValue = accessor.fromBytes(byte.class, (byte[]) value);
            ByteAccessor byteAccessor = new ByteAccessor();
            return byteAccessor.fromString(clazz, String.valueOf(thriftColumnValue));
        }

        /**
 
View Full Code Here

Examples of com.impetus.kundera.property.accessor.LongAccessor.fromBytes()

                            column.getValue(), isCql3Enabled);
                }
                else
                {
                    LongAccessor accessor = new LongAccessor();
                    Long value = accessor.fromBytes(Long.class, column.getValue());
                    return populateViaThrift(m, entity, entityType, relationNames, relations, thriftColumnName,
                            value != null ? value.toString() : null, isCql3Enabled);
                }
            }
View Full Code Here

Examples of com.impetus.kundera.property.accessor.SQLDateAccessor.fromBytes()

         * @return
         */
        private static Object decompose(Object value, Class clazz)
        {
            SQLDateAccessor accessor = new SQLDateAccessor();
            return accessor.fromBytes(clazz, ((byte[]) value));
        }
    }

    /**
     * Used to decompose and compose sql time type data objects
View Full Code Here

Examples of com.impetus.kundera.property.accessor.SQLTimeAccessor.fromBytes()

         * @return
         */
        private static Object decompose(Object value, Class clazz)
        {
            SQLTimeAccessor accessor = new SQLTimeAccessor();
            return accessor.fromBytes(clazz, ((byte[]) value));
        }
    }

    /**
     * Used to decompose and compose sql timestamp type data objects
View Full Code Here

Examples of com.impetus.kundera.property.accessor.SQLTimestampAccessor.fromBytes()

         * @return
         */
        private static Object decompose(Object value, Class clazz)
        {
            SQLTimestampAccessor accessor = new SQLTimestampAccessor();
            return accessor.fromBytes(clazz, ((byte[]) value));
        }
    }

    /**
     * Used to decompose and compose calendar type data objects
View Full Code Here

Examples of com.impetus.kundera.property.accessor.ShortAccessor.fromBytes()

         * @return
         */
        private static Object decomposeCQL2(Object value, Class clazz)
        {
            ShortAccessor shortAccessor = new ShortAccessor();
            return shortAccessor.fromBytes(clazz, (byte[]) value);
        }
    }

    /**
     * Used to decompose and compose big integer type data objects
View Full Code Here

Examples of com.impetus.kundera.property.accessor.UUIDAccessor.fromBytes()

            String str = (String) PropertyAccessorHelper.getObject(String.class, recInBytes);
           
            if(!str.equals("Vivek")) // string record is already compared
            {
                UUIDAccessor uuidAccessor = new UUIDAccessor();
                UUID recAsUUID = uuidAccessor.fromBytes(UUID.class, recInBytes);
                Assert.assertEquals(randomId, recAsUUID);
               
            }
        }
        catch (Exception e)
View Full Code Here

Examples of com.twitter.chill.KryoPool.fromBytes()

    @Test
    public void testSpecificRecordSerializer() throws Exception {
        ClassTag<FiscalRecord> tag = getClassTag(FiscalRecord.class);
        KryoPool kryo = getKryo(tag, AvroSerializer$.MODULE$.SpecificRecordSerializer(tag));
        byte[] bytes = kryo.toBytesWithClass(fiscalRecord);
        FiscalRecord result = (FiscalRecord) kryo.fromBytes(bytes);
        assertEquals(fiscalRecord,result);
    }

    @Test
    public void SpecificRecordBinarySerializer() throws Exception {
View Full Code Here

Examples of com.twitter.chill.KryoPool.fromBytes()

    @Test
    public void SpecificRecordBinarySerializer() throws Exception {
        ClassTag<FiscalRecord> tag = getClassTag(FiscalRecord.class);
        KryoPool kryo = getKryo(tag, AvroSerializer$.MODULE$.SpecificRecordBinarySerializer(tag));
        byte[] bytes = kryo.toBytesWithClass(fiscalRecord);
        FiscalRecord result = (FiscalRecord) kryo.fromBytes(bytes);
        assertEquals(fiscalRecord,result);
    }


    @Test
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.