com.avaje.ebean.Ebean.execute()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中com.avaje.ebean.Ebean.execute()方法的一些代码示例,展示了Ebean.execute()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ebean.execute()方法的具体详情如下:
包路径:com.avaje.ebean.Ebean
类名称:Ebean
方法名:execute

Ebean.execute介绍

[英]For making calls to stored procedures.

Example:

String sql = "{call sp_order_modify(?,?,?)}"; 
CallableSql cs = Ebean.createCallableSql(sql); 
cs.setParameter(1, 27); 
cs.setParameter(2, "SHIPPED"); 
cs.registerOut(3, Types.INTEGER); 
Ebean.execute(cs); 
// read the out parameter 
Integer returnValue = (Integer) cs.getObject(3); 
}

[中]用于调用存储过程。
例子:

String sql = "{call sp_order_modify(?,?,?)}"; 
CallableSql cs = Ebean.createCallableSql(sql); 
cs.setParameter(1, 27); 
cs.setParameter(2, "SHIPPED"); 
cs.registerOut(3, Types.INTEGER); 
Ebean.execute(cs); 
// read the out parameter 
Integer returnValue = (Integer) cs.getObject(3); 
}

代码示例

代码示例来源:origin: com.typesafe.play/play-java-ebean

public F.Promise<Result> call(final Context ctx) throws Throwable {
  return Ebean.execute(new TxCallable<F.Promise<Result>>() {
    public F.Promise<Result> call() {
      try {
        return delegate.call(ctx);
      } catch(RuntimeException e) {
        throw e;
      } catch(Throwable t) {
        throw new RuntimeException(t);
      }
    }
  });
}

代码示例来源:origin: org.avaje.ebean/ebean

public int execute() {
 if (server != null) {
  return server.execute(this);
 } else {
  // Hopefully this doesn't catch anyone out...
  return Ebean.execute(this);
 }
}

代码示例来源:origin: org.avaje/ebean

public int execute() {
  if (server != null) {
    return server.execute(this);
  } else {
    // Hopefully this doesn't catch anyone out...
    return Ebean.execute(this);
  }
}

代码示例来源:origin: org.avaje.ebeanorm/avaje-ebeanorm-server

public int execute() {
  if (server != null) {
    return server.execute(this);
  } else {
    // Hopefully this doesn't catch anyone out...
    return Ebean.execute(this);
  }
}

相关文章