Examples of create()


Examples of org.nutz.dao.SqlManager.create()

  }

  @Test
  public void check_Create_SQL() {
    SqlManager sqls = createSqls();
    Sql sql = sqls.create(".abc.create");
    assertTrue(sql.toString().toUpperCase().startsWith("CREATE"));
  }

  @Test
  public void check_Insert_SQL() {

Examples of org.nutz.dao.impl.FileSqlManager.create()

  @Test
  public void test_parse_whole_directory() {
    SqlManager sqls = new FileSqlManager("org/nutz/dao/test/sqls/dir");
    assertTrue(sqls.count() > 0);
    Sql sql = sqls.create(".abc.update");
    sql.params().set("name", "ABC");
    sql.params().set("id", 16);
    assertEquals("UPDATE t_abc SET name='ABC' WHERE id=16;", sql.toString());
  }
}

Examples of org.nutz.dao.impl.NutDao.create()

      Pojo pojo = new Pojo();
      pojo.setName("abc"+i);
      list.add(pojo);
    }
   
    dao.create(Pojo.class, true);
    dao.fastInsert(list);
    System.out.println("预热完成,开始测试");
   
    //--------------------------------------------------
    dao.create(Pojo.class, true);

Examples of org.nutz.mongo.MongoDao.create()

  public void init(NutConfig config) {
    CommonMongoService commons = config.getIoc().get(CommonMongoService.class, "commons");
    MongoDao dao = commons.dao();
   
    //初始化集合
    dao.create(User.class, false);
    dao.create(Question.class, false);
    dao.create(Answer.class, false);
    dao.create(SystemConfig.class, false);
    dao.create(App.class, false);
    dao.create(Role.class, false);

Examples of org.odmg.OQLQuery.create()

        String oql = "select all from java.lang.Object where " + predicate;
        TransactionImpl tx = getTransaction();
        if (tx == null) throw new QueryInvalidException("Need running transaction to do query");

        OQLQuery predicateQuery = tx.getImplementation().newOQLQuery();
        predicateQuery.create(oql);
        Query pQ = ((OQLQueryImpl) predicateQuery).getQuery();
        Criteria pCrit = pQ.getCriteria();

        PBCapsule handle = new PBCapsule(pbKey, tx);
        DList result;

Examples of org.ofbiz.entity.Delegator.create()

                return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunNotCreated", locale));
            }
        }
        try {
            if (productionRunId != null && orderId != null && orderItemSeqId != null) {
                delegator.create("WorkOrderItemFulfillment", UtilMisc.toMap("workEffortId", productionRunId, "orderId", orderId, "orderItemSeqId", orderItemSeqId));
            }
        } catch (GenericEntityException e) {
            return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingRequirementNotDeleted", locale));
        }

Examples of org.ofbiz.entity.GenericDelegator.create()

                        }

                        if (rtSeg == null) {
                            rtSeg = delegator.makeValue("ShipmentRouteSegment", UtilMisc.toMap("shipmentId", shipmentId, "shipmentRouteSegmentId", "00001"));
                            try {
                                delegator.create(rtSeg);
                            } catch (GenericEntityException e) {
                                Debug.logError(e, module);
                                return ServiceUtil.returnError(e.getMessage());
                            }
                        }

Examples of org.ofbiz.entity.GenericValue.create()

                    try {
                        resultService = dispatcher.runSync("createProductionRunsForProductBom", serviceContext);
                        GenericValue workEffortPreDecessor = delegator.makeValue("WorkEffortAssoc", UtilMisc.toMap(
                                "workEffortIdTo", productionRunId, "workEffortIdFrom", resultService.get("productionRunId"),
                                "workEffortAssocTypeId", "WORK_EFF_PRECEDENCY", "fromDate", UtilDateTime.nowTimestamp()));
                        workEffortPreDecessor.create();
                    } catch (GenericServiceException e) {
                        return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunNotCreated", locale));
                    } catch (GenericEntityException e) {
                        return ServiceUtil.returnError(UtilProperties.getMessage(resource, "ManufacturingProductionRunTryToCreateWorkEffortAssoc", locale));
                    }

Examples of org.ofbiz.entity.datasource.GenericHelper.create()

            if (value != null && value.getModelEntity().getHasFieldWithAuditLog()) {
                createEntityAuditLogAll(value, false, false);
            }

            try {
                value = helper.create(value);

                if (testMode) {
                    storeForTestRollback(new TestOperation(OperationType.INSERT, value));
                }
            } catch (GenericEntityException e) {

Examples of org.omg.CosTransactions.TransactionFactory.create()

      boolean correct = true;
      Control[] controls = new Control[numberOfControls];

      for (int index = 0; correct && (index < controls.length); index++)
      {
        controls[index] = transactionFactory.create(0);

        correct = correct && (controls[index].get_coordinator().get_status() == Status.StatusActive);
      }

      for (int index = 0; correct && (index < controls.length); index++)
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.