本文整理匯總了Java中org.jooq.util.JavaWriter類的典型用法代碼示例。如果您正苦於以下問題:Java JavaWriter類的具體用法?Java JavaWriter怎麽用?Java JavaWriter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
JavaWriter類屬於org.jooq.util包,在下文中一共展示了JavaWriter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: generateClientGetterAndSetter
import org.jooq.util.JavaWriter; //導入依賴的package包/類
protected void generateClientGetterAndSetter(JavaWriter out) {
out.println();
out.tab(1).println("private AsyncJooqSQLClient client;");
out.println();
generateSetVertxAnnotation(out);
out.tab(1).println("@Override");
out.tab(1).println("public void setClient(AsyncJooqSQLClient client) {");
out.tab(2).println("this.client = client;");
out.tab(1).println("}");
out.println();
out.tab(1).println("@Override");
out.tab(1).println("public AsyncJooqSQLClient client() {");
out.tab(2).println("return this.client;");
out.tab(1).println("}");
out.println();
}
示例2: generateVertxGetterAndSetterConfigurationMethod
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateVertxGetterAndSetterConfigurationMethod(JavaWriter out) {
out.println();
out.tab(1).println("private io.vertx.rxjava.core.Vertx vertx;");
out.println();
generateSetVertxAnnotation(out);
out.tab(1).println("@Override");
out.tab(1).println("public void setVertx(io.vertx.core.Vertx vertx) {");
out.tab(2).println("this.vertx = new io.vertx.rxjava.core.Vertx(vertx);");
out.tab(1).println("}");
out.println();
out.tab(1).println("@Override");
out.tab(1).println("public void setVertx(io.vertx.rxjava.core.Vertx vertx) {");
out.tab(2).println("this.vertx = vertx;");
out.tab(1).println("}");
out.println();
out.tab(1).println("@Override");
out.tab(1).println("public io.vertx.rxjava.core.Vertx vertx() {");
out.tab(2).println("return this.vertx;");
out.tab(1).println("}");
out.println();
}
示例3: generateVertxGetterAndSetterConfigurationMethod
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateVertxGetterAndSetterConfigurationMethod(JavaWriter out) {
out.println();
out.tab(1).println("private io.vertx.reactivex.core.Vertx vertx;");
out.println();
generateSetVertxAnnotation(out);
out.tab(1).println("@Override");
out.tab(1).println("public void setVertx(io.vertx.reactivex.core.Vertx vertx) {");
out.tab(2).println("this.vertx = vertx;");
out.tab(1).println("}");
out.println();
out.tab(1).println("@Override");
out.tab(1).println("public io.vertx.reactivex.core.Vertx vertx() {");
out.tab(2).println("return this.vertx;");
out.tab(1).println("}");
out.println();
}
示例4: generateFetchOneByMethods
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateFetchOneByMethods(JavaWriter out, String pType, String colName, String colClass, String colType, String colIdentifier) {
out.tab(1).javadoc("Fetch a unique record that has <code>%s = value</code> asynchronously", colName);
out.tab(1).println("public CompletableFuture<%s> fetchOneBy%sAsync(%s value) {", pType,colClass, colType);
out.tab(2).println("return fetchOneAsync(%s,value);", colIdentifier);
out.tab(1).println("}");
}
示例5: generateFetchByMethods
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateFetchByMethods(JavaWriter out, String pType, String colName, String colClass, String colType, String colIdentifier) {
out.tab(1).javadoc("Fetch records that have <code>%s IN (values)</code> asynchronously", colName);
out.tab(1).println("public CompletableFuture<List<%s>> fetchBy%sAsync(%s<%s> values) {", pType, colClass, List.class, colType);
//out.tab(2).println("return fetch(%s, values);", colIdentifier);
out.tab(2).println("return fetchAsync(%s,values);", colIdentifier);
out.tab(1).println("}");
}
示例6: generateFetchOneByMethods
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateFetchOneByMethods(JavaWriter out, String pType, String colName, String colClass, String colType, String colIdentifier) {
out.tab(1).javadoc("Fetch a unique record that has <code>%s = value</code> asynchronously", colName);
out.tab(1).println("public CompletableFuture<%s> fetchOneBy%sAsync(%s value) {", pType,colClass, colType);
out.tab(2).println("return FutureTool.executeBlocking(h->h.complete(fetchOneBy%s(value)),vertx());", colClass);
out.tab(1).println("}");
}
示例7: generateDAOImports
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateDAOImports(JavaWriter out) {
out.println("import io.reactivex.Completable;");
out.println("import io.reactivex.Observable;");
out.println("import io.reactivex.Single;");
out.println("import io.github.jklingsporn.vertx.jooq.async.rx.util.RXTool;");
}
示例8: generateFetchOneByMethods
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateFetchOneByMethods(JavaWriter out, String pType, String colName, String colClass, String colType, String colIdentifier) {
out.tab(1).javadoc("Fetch a unique record that has <code>%s = value</code> asynchronously", colName);
out.tab(1).println("public Single<%s> fetchOneBy%sAsync(%s value) {", pType,colClass, colType);
out.tab(2).println("return RXTool.executeBlocking(h->h.complete(fetchOneBy%s(value)),vertx());", colClass);
out.tab(1).println("}");
}
示例9: generateFetchByMethods
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateFetchByMethods(JavaWriter out, String pType, String colName, String colClass, String colType, String colIdentifier) {
out.tab(1).javadoc("Fetch records that have <code>%s IN (values)</code> asynchronously", colName);
out.tab(1).println("public Single<List<%s>> fetchBy%sAsync(%s<%s> values) {", pType, colClass, List.class,
colType);
out.tab(2).println("return fetchAsync(%s,values);", colIdentifier);
out.tab(1).println("}");
out.tab(1).javadoc("Fetch records that have <code>%s IN (values)</code> asynchronously", colName);
out.tab(1).println("public Observable<%s> fetchBy%sObservable(%s<%s> values) {", pType, colClass, List.class, colType);
out.tab(2).println("return fetchObservable(%s,values);", colIdentifier);
out.tab(1).println("}");
}
示例10: generateDAOImports
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateDAOImports(JavaWriter out) {
out.println("import io.reactivex.Completable;");
out.println("import io.reactivex.Observable;");
out.println("import io.reactivex.Single;");
out.println("import io.github.jklingsporn.vertx.jooq.async.rx.util.RXTool;");
out.println("import io.github.jklingsporn.vertx.jooq.async.rx.AsyncJooqSQLClient;");
}
示例11: generateFetchOneByMethods
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateFetchOneByMethods(JavaWriter out, String pType, String colName, String colClass, String colType, String colIdentifier) {
out.tab(1).javadoc("Fetch a unique record that has <code>%s = value</code> asynchronously", colName);
out.tab(1).println("public Single<%s> fetchOneBy%sAsync(%s value) {", pType,colClass, colType);
out.tab(2).println("return fetchOneAsync(%s,value);", colIdentifier);
out.tab(1).println("}");
}
示例12: generateFetchOneByMethods
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateFetchOneByMethods(JavaWriter out, String pType, String colName, String colClass, String colType, String colIdentifier) {
out.tab(1).javadoc("Fetch a unique record that has <code>%s = value</code> asynchronously", colName);
out.tab(1).println("public void fetchOneBy%sAsync(%s value,Handler<AsyncResult<%s>> resultHandler) {", colClass, colType,pType);
out.tab(2).println("fetchOneAsync(%s,value,resultHandler);", colIdentifier);
out.tab(1).println("}");
}
示例13: generateFetchByMethods
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateFetchByMethods(JavaWriter out, String pType, String colName, String colClass, String colType, String colIdentifier) {
out.tab(1).javadoc("Fetch records that have <code>%s IN (values)</code> asynchronously", colName);
out.tab(1).println("public void fetchBy%sAsync(%s<%s> values,Handler<AsyncResult<List<%s>>> resultHandler) {", colClass, List.class, colType,pType);
//out.tab(2).println("return fetch(%s, values);", colIdentifier);
out.tab(2).println("fetchAsync(%s,values,resultHandler);", colIdentifier);
out.tab(1).println("}");
}
示例14: renderInsertReturningOverwrite
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void renderInsertReturningOverwrite(TableDefinition table, JavaWriter out, String reason) {
out.println();
out.tab(1).println("@Override");
out.tab(1).println("public void insertReturningPrimaryAsync(%s object, Handler<AsyncResult<%s>> resultHandler){",
out.ref(getStrategy().getFullJavaClassName(table, GeneratorStrategy.Mode.POJO)),
getKeyType(table.getPrimaryKey()));
out.tab(2).println("throw new UnsupportedOperationException(\"%s\");",reason);
out.tab(1).println("}");
out.println();
}
示例15: generateFetchOneByMethods
import org.jooq.util.JavaWriter; //導入依賴的package包/類
@Override
protected void generateFetchOneByMethods(JavaWriter out, String pType, String colName, String colClass, String colType, String colIdentifier) {
out.tab(1).javadoc("Fetch a unique record that has <code>%s = value</code> asynchronously", colName);
out.tab(1).println("public void fetchOneBy%sAsync(%s value,Handler<AsyncResult<%s>> resultHandler) {", colClass, colType,pType);
out.tab(2).println("vertx().executeBlocking(h->h.complete(fetchOneBy%s(value)),resultHandler);", colClass);
out.tab(1).println("}");
}