Package com.asakusafw.dmdl.thundergate.util

Examples of com.asakusafw.dmdl.thundergate.util.TableModelBuilder


     * simple table.
     * @throws Exception if test was failed
     */
    @Test
    public void table() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("comment", "VALUE", new StringType(255))
            .toDescription();

        ThunderGateModelEmitter emitter = new ThunderGateModelEmitter(config());
        emitter.emit(table);
View Full Code Here


     * simple join.
     * @throws Exception if test was failed
     */
    @Test
    public void join() throws Exception {
        TableModelDescription left = new TableModelBuilder("LEFT")
            .add(null, "SID", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY)
            .add(null, "RIGHT_ID", PropertyTypeKind.LONG)
            .add(null, "VALUE", new StringType(255))
            .toDescription();
        TableModelDescription right = new TableModelBuilder("RIGHT")
            .add(null, "SID", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY)
            .add(null, "VALUE", new StringType(255))
            .toDescription();
        JoinedModelDescription join = new JoinedModelBuilder("SIMPLE", left, "l", right, "r")
            .on("l.RIGHT_ID", "r.SID")
View Full Code Here

     * simple summarize.
     * @throws Exception if test was failed
     */
    @Test
    public void summarize() throws Exception {
        TableModelDescription target = new TableModelBuilder("TARGET")
            .add(null, "SID", PropertyTypeKind.LONG, Attribute.PRIMARY_KEY)
            .add(null, "VALUE_A", PropertyTypeKind.INT)
            .add(null, "VALUE_B", PropertyTypeKind.LONG)
            .add(null, "VALUE_C", PropertyTypeKind.DATE)
            .toDescription();
View Full Code Here

     * table cache.
     * @throws Exception if test was failed
     */
    @Test
    public void table_cached() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("", "SID", new BasicType(PropertyTypeKind.LONG))
            .add("", "TIMESTAMP", new BasicType(PropertyTypeKind.DATETIME))
            .toDescription();

        Configuration config = config();
View Full Code Here

     * table cache.
     * @throws Exception if test was failed
     */
    @Test
    public void table_cached_with_delete() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("", "SID", new BasicType(PropertyTypeKind.LONG))
            .add("", "TIMESTAMP", new BasicType(PropertyTypeKind.DATETIME))
            .add("", "DELETE", new BasicType(PropertyTypeKind.BOOLEAN))
            .toDescription();

View Full Code Here

     * table cache without SID.
     * @throws Exception if test was failed
     */
    @Test
    public void table_cached_no_sid() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("", "TIMESTAMP", new BasicType(PropertyTypeKind.DATETIME))
            .add("", "DELETE", new BasicType(PropertyTypeKind.BOOLEAN))
            .toDescription();

        Configuration config = config();
View Full Code Here

     * table cache with invalid SID.
     * @throws Exception if test was failed
     */
    @Test
    public void table_cached_invalid_sid() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("", "SID", new BasicType(PropertyTypeKind.INT))
            .add("", "TIMESTAMP", new BasicType(PropertyTypeKind.DATETIME))
            .add("", "DELETE", new BasicType(PropertyTypeKind.BOOLEAN))
            .toDescription();

View Full Code Here

     * table cache without timestamp.
     * @throws Exception if test was failed
     */
    @Test
    public void table_cached_no_timestamp() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("", "SID", new BasicType(PropertyTypeKind.LONG))
            .add("", "DELETE", new BasicType(PropertyTypeKind.BOOLEAN))
            .toDescription();

        Configuration config = config();
View Full Code Here

     * table cache with invalid timestamp.
     * @throws Exception if test was failed
     */
    @Test
    public void table_cached_invalid_timestamp() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("", "SID", new BasicType(PropertyTypeKind.LONG))
            .add("", "TIMESTAMP", new BasicType(PropertyTypeKind.LONG))
            .add("", "DELETE", new BasicType(PropertyTypeKind.BOOLEAN))
            .toDescription();

View Full Code Here

     * table cache without delete flag.
     * @throws Exception if test was failed
     */
    @Test
    public void table_cached_no_delete() throws Exception {
        TableModelDescription table = new TableModelBuilder("SIMPLE")
            .add("", "SID", new BasicType(PropertyTypeKind.LONG))
            .add("", "TIMESTAMP", new BasicType(PropertyTypeKind.DATETIME))
            .toDescription();

        Configuration config = config();
View Full Code Here

TOP

Related Classes of com.asakusafw.dmdl.thundergate.util.TableModelBuilder

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.