Examples of HeapTupleSchema


Examples of com.boundary.tuple.HeapTupleSchema

* Created by cliff on 5/9/14.
*/
public class HeapTupleCodeGeneratorTest {
    @Test
    public void testAccessorsGetGenerated() throws Exception {
        HeapTupleSchema schema = TupleSchema.builder().
                addField("a", Long.TYPE).
                addField("b", Integer.TYPE).
                addField("c", Short.TYPE).
                addField("d", Character.TYPE).
                addField("e", Byte.TYPE).
                addField("f", Float.TYPE).
                addField("g", Double.TYPE).
                heapMemory().
                build();

        HeapTupleCodeGenerator codegen = new HeapTupleCodeGenerator(null, schema.getFieldNames(), schema.getFieldTypes());
        Class clazz = codegen.cookToClass();
        assertGetterAndSetterGenerated(clazz, "a", long.class);
        assertGetterAndSetterGenerated(clazz, "b", int.class);
        assertGetterAndSetterGenerated(clazz, "c", short.class);
        assertGetterAndSetterGenerated(clazz, "d", char.class);
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.