All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dream.flex.def.UnionDef Maven / Gradle / Ivy

The newest version!
package com.dream.flex.def;

import com.dream.antlr.smt.UnionStatement;

public interface UnionDef<
        ForUpdate extends ForUpdateDef,
        Query extends QueryDef>
        extends ForUpdateDef {

    default ForUpdate union(QueryDef queryDef) {
        UnionStatement unionStatement = new UnionStatement();
        unionStatement.setAll(false);
        unionStatement.setStatement(queryDef.statement());
        statement().setUnionStatement(unionStatement);
        return (ForUpdate) creatorFactory().newForUpdateDef(statement());
    }

    default ForUpdate unionAll(QueryDef queryDef) {
        UnionStatement unionStatement = new UnionStatement();
        unionStatement.setAll(true);
        unionStatement.setStatement(queryDef.statement());
        statement().setUnionStatement(unionStatement);
        return (ForUpdate) creatorFactory().newForUpdateDef(statement());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy