Examples of findPropertyDescriptor()


Examples of com.asakusafw.directio.hive.serde.DataModelDescriptor.findPropertyDescriptor()

                "  @directio.hive.string",
                "  simple : DATE;",
                "};"
        });
        DataModelDescriptor descriptor = descriptor(loader, "ModelDescriptorFactory");
        PropertyDescriptor property = descriptor.findPropertyDescriptor("simple");
        assertThat(property, is(notNullValue()));
        assertThat(property.getTypeInfo(), is((TypeInfo) TypeInfoFactory.stringTypeInfo));
    }

    /**
 
View Full Code Here

Examples of com.asakusafw.directio.hive.serde.DataModelDescriptor.findPropertyDescriptor()

                "  @directio.hive.string",
                "  simple : DATETIME;",
                "};"
        });
        DataModelDescriptor descriptor = descriptor(loader, "ModelDescriptorFactory");
        PropertyDescriptor property = descriptor.findPropertyDescriptor("simple");
        assertThat(property, is(notNullValue()));
        assertThat(property.getTypeInfo(), is((TypeInfo) TypeInfoFactory.stringTypeInfo));
    }

    /**
 
View Full Code Here

Examples of com.asakusafw.directio.hive.serde.DataModelDescriptor.findPropertyDescriptor()

                "  @directio.hive.timestamp",
                "  simple : DATE;",
                "};"
        });
        DataModelDescriptor descriptor = descriptor(loader, "ModelDescriptorFactory");
        PropertyDescriptor property = descriptor.findPropertyDescriptor("simple");
        assertThat(property, is(notNullValue()));
        assertThat(property.getTypeInfo(), is((TypeInfo) TypeInfoFactory.timestampTypeInfo));
    }

    /**
 
View Full Code Here

Examples of com.asakusafw.directio.hive.serde.DataModelDescriptor.findPropertyDescriptor()

                "  @directio.hive.decimal(precision = 10, scale = 2)",
                "  simple : DECIMAL;",
                "};"
        });
        DataModelDescriptor descriptor = descriptor(loader, "ModelDescriptorFactory");
        PropertyDescriptor property = descriptor.findPropertyDescriptor("simple");
        assertThat(property, is(notNullValue()));
        assertThat(property.getTypeInfo(), is((TypeInfo) TypeInfoFactory.getDecimalTypeInfo(10, 2)));
    }

    /**
 
View Full Code Here

Examples of com.asakusafw.directio.hive.serde.DataModelDescriptor.findPropertyDescriptor()

                "  @directio.hive.char(length = 10)",
                "  simple : TEXT;",
                "};"
        });
        DataModelDescriptor descriptor = descriptor(loader, "ModelDescriptorFactory");
        PropertyDescriptor property = descriptor.findPropertyDescriptor("simple");
        assertThat(property, is(notNullValue()));
        assertThat(property.getTypeInfo(), is((TypeInfo) TypeInfoFactory.getCharTypeInfo(10)));
    }

    /**
 
View Full Code Here

Examples of com.asakusafw.directio.hive.serde.DataModelDescriptor.findPropertyDescriptor()

                "  @directio.hive.varchar(length = 10)",
                "  simple : TEXT;",
                "};"
        });
        DataModelDescriptor descriptor = descriptor(loader, "ModelDescriptorFactory");
        PropertyDescriptor property = descriptor.findPropertyDescriptor("simple");
        assertThat(property, is(notNullValue()));
        assertThat(property.getTypeInfo(), is((TypeInfo) TypeInfoFactory.getVarcharTypeInfo(10)));
    }

    /**
 
View Full Code Here

Examples of com.asakusafw.directio.hive.serde.DataModelDescriptor.findPropertyDescriptor()

                "  simple : TEXT;",
                "};"
        });
        DataModelDescriptor descriptor = descriptor(loader, "ModelDescriptorFactory");
        assertThat(descriptor.getPropertyDescriptors(), hasSize(1));
        assertThat(descriptor.findPropertyDescriptor("simple"), is(notNullValue()));

        Method simple = descriptor.getDataModelClass().getMethod("getIgnoredOption");
        HiveField field = simple.getAnnotation(HiveField.class);
        assertThat(field, is(notNullValue()));
        assertThat(field.ignore(), is(true));
View Full Code Here

Examples of com.asakusafw.directio.hive.serde.DataModelDescriptor.findPropertyDescriptor()

        DataModelDescriptor descriptor = descriptor(loader, "ModelDescriptorFactory");
        assertThat(descriptor.createDataModelObject(), instanceOf(loader.modelType("Model")));
        assertThat(descriptor.getDataModelComment(), is(nullValue()));
        assertThat(descriptor.getPropertyDescriptors(), hasSize(1));

        PropertyDescriptor property = descriptor.findPropertyDescriptor("simple");
        assertThat(property, is(notNullValue()));
        assertThat(property.getFieldName(), is("simple"));
        assertThat(property.getTypeInfo(), is((TypeInfo) TypeInfoFactory.intTypeInfo));
        assertThat(property.getFieldComment(), is(nullValue()));
View Full Code Here

Examples of com.asakusafw.directio.hive.serde.DataModelDescriptor.findPropertyDescriptor()

        });
        DataModelDescriptor descriptor = descriptor(loader, "ModelDescriptorFactory");
        assertThat(descriptor.getDataModelComment(), is("c1"));
        assertThat(descriptor.getPropertyDescriptors(), hasSize(1));

        PropertyDescriptor property = descriptor.findPropertyDescriptor("simple");
        assertThat(property, is(notNullValue()));
        assertThat(property.getInspector().getTypeName(), is("int"));
        assertThat(property.getFieldComment(), is("c2"));
    }
View Full Code Here

Examples of com.asakusafw.directio.hive.serde.DataModelDescriptor.findPropertyDescriptor()

                "  @directio.hive.field(name = 'f')",
                "  simple : INT;",
                "};"
        });
        DataModelDescriptor descriptor = descriptor(loader, "ModelDescriptorFactory");
        PropertyDescriptor property = descriptor.findPropertyDescriptor("f");
        assertThat(property, is(notNullValue()));
        assertThat(property.getFieldName(), is("f"));
        assertThat(property.getInspector().getTypeName(), is("int"));

        Method simple = descriptor.getDataModelClass().getMethod("getSimpleOption");
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.