instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public static BPartnerLocationId ofRepoIdOrNull( @Nullable final BPartnerId bpartnerId, @Nullable final Integer bpartnerLocationId) { return bpartnerId != null && bpartnerLocationId != null && bpartnerLocationId > 0 ? ofRepoId(bpartnerId, bpartnerLocationId) : null; } @Jacksonized @Builder private BPartne...
public static int toRepoId(@Nullable final BPartnerLocationId bpLocationId) { return bpLocationId != null ? bpLocationId.getRepoId() : -1; } @Nullable public static Integer toRepoIdOrNull(@Nullable final BPartnerLocationId bpLocationId) { return bpLocationId != null ? bpLocationId.getRepoId() : null; } pub...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\BPartnerLocationId.java
1
请完成以下Java代码
private int expireLocks() { final String sql = "UPDATE "+I_R_Group_Prospect.Table_Name+" SET " +" "+I_R_Group_Prospect.COLUMNNAME_Locked+"=?" +","+I_R_Group_Prospect.COLUMNNAME_LockedBy+"=?" +","+I_R_Group_Prospect.COLUMNNAME_LockedDate+"=?" +" WHERE " +" "+I_R_Group_Prospect.COLUMNNAME_AD_Client_ID+"...
{ int[] ids = new Query(getCtx(), X_R_Group.Table_Name, null, get_TrxName()) //.setOnlyActiveRecords(true) // check all bundles .setClient_ID() .getIDs(); int count = 0; for (int R_Group_ID : ids) { boolean updated = BundleUtil.updateCCM_Bundle_Status(R_Group_ID, get_TrxName()); if (updated) cou...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\callcenter\process\CallCenterDailyMaintenance.java
1
请在Spring Boot框架中完成以下Java代码
public class LongPollingBakeryClient { public String callBakeWithRestTemplate(RestTemplateBuilder restTemplateBuilder) { RestTemplate restTemplate = restTemplateBuilder .setConnectTimeout(Duration.ofSeconds(10)) .setReadTimeout(Duration.ofSeconds(10)) .build(); try { ...
public String callBakeWithWebClient() { WebClient webClient = WebClient.create(); try { return webClient.get() .uri("/api/bake/cookie?bakeTime=1000") .retrieve() .bodyToFlux(String.class) .timeout(Duration.ofSeconds(10)) ...
repos\tutorials-master\spring-web-modules\spring-rest-http-2\src\main\java\com\baeldung\longpolling\client\LongPollingBakeryClient.java
2
请完成以下Java代码
InputStream openStream() throws IOException { Assert.state(this.file != null, "'file' must not be null"); return new FileInputStream(this.file); } /** * Return the scope of the library. * @return the scope */ public @Nullable LibraryScope getScope() { return this.scope; } /** * Return the {@linkpla...
/** * Return if the library is local (part of the same build) to the application that is * being packaged. * @return if the library is local */ public boolean isLocal() { return this.local; } /** * Return if the library is included in the uber jar. * @return if the library is included */ public boo...
repos\spring-boot-4.0.1\loader\spring-boot-loader-tools\src\main\java\org\springframework\boot\loader\tools\Library.java
1
请完成以下Java代码
public void onASIorDiscountChange(final I_C_InvoiceLine invoiceLine, final ICalloutField field) { Services.get(IInvoiceLineBL.class).updatePrices(invoiceLine); } /** * Recalculate priceActual on discount or priceEntered change. * Don't invoice the pricing engine. */ @CalloutMethod(columnNames = { I_C_In...
// set the product to null if the orderline was set to null invoiceLine.setM_Product_ID(-1); return; } final I_C_OrderLine ol = invoiceLine.getC_OrderLine(); invoiceLine.setM_Product_ID(ol.getM_Product_ID()); } @CalloutMethod(columnNames = { I_C_InvoiceLine.COLUMNNAME_C_OrderLine_ID }) public void set...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\callout\C_InvoiceLine.java
1
请完成以下Java代码
public int getPP_Order_Node_ID() { return get_ValueAsInt(COLUMNNAME_PP_Order_Node_ID); } @Override public void setPP_Order_Node_ID(final int PP_Order_Node_ID) { if (PP_Order_Node_ID < 1) set_ValueNoCheck(COLUMNNAME_PP_Order_Node_ID, null); else set_ValueNoCheck(COLUMNNAME_PP_Order_Node_ID, PP_Order_No...
{ return get_ValueAsInt(COLUMNNAME_SeqNo); } @Override public void setSeqNo(final int SeqNo) { set_Value(COLUMNNAME_SeqNo, SeqNo); } @Override public java.lang.String getSpecification() { return get_ValueAsString(COLUMNNAME_Specification); } @Override public void setSpecification(final @Nullable jav...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Order_Node_Product.java
1
请完成以下Java代码
public void setM_HU_PI_Item_ID (final int M_HU_PI_Item_ID) { if (M_HU_PI_Item_ID < 1) set_ValueNoCheck (COLUMNNAME_M_HU_PI_Item_ID, null); else set_ValueNoCheck (COLUMNNAME_M_HU_PI_Item_ID, M_HU_PI_Item_ID); } @Override public int getM_HU_PI_Item_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_PI_Item...
set_ValueNoCheck (COLUMNNAME_M_HU_PI_Version_ID, M_HU_PI_Version_ID); } @Override public int getM_HU_PI_Version_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_PI_Version_ID); } @Override public void setQty (final @Nullable BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PI_Item.java
1
请完成以下Java代码
public Integer getAttendCount() { return attendCount; } public void setAttendCount(Integer attendCount) { this.attendCount = attendCount; } public Integer getAttentionCount() { return attentionCount; } public void setAttentionCount(Integer attentionCount) { thi...
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", categoryId=").append(categoryId); sb.appen...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsTopic.java
1
请完成以下Java代码
public void setIsError (boolean IsError) { set_Value (COLUMNNAME_IsError, Boolean.valueOf(IsError)); } /** Get Fehler. @return Ein Fehler ist bei der Durchführung aufgetreten */ @Override public boolean isError () { Object oo = get_Value(COLUMNNAME_IsError); if (oo != null) { if (oo instanceof...
} /** Set Verarbeitet. @param Processed Checkbox sagt aus, ob der Beleg verarbeitet wurde. */ @Override public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); } /** Get Verarbeitet. @return Checkbox sagt aus, ob der Beleg verarbeitet wurde. ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\event\model\X_AD_EventLog_Entry.java
1
请完成以下Java代码
public void setIsSimulation (final boolean IsSimulation) { throw new IllegalArgumentException ("IsSimulation is virtual column"); } @Override public boolean isSimulation() { return get_ValueAsBoolean(COLUMNNAME_IsSimulation); } @Override public void setM_Product_DataEntry_ID (final int M_Product_DataEntry...
{ return get_ValueAsBoolean(COLUMNNAME_Processing); } @Override public void setQty_Planned (final @Nullable BigDecimal Qty_Planned) { set_Value (COLUMNNAME_Qty_Planned, Qty_Planned); } @Override public BigDecimal getQty_Planned() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty_Planned); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Flatrate_DataEntry.java
1
请在Spring Boot框架中完成以下Java代码
public static boolean hasAdminIntersection(String usernames) { if (oConvertUtils.isEmpty(usernames)) { return false; } // 使用HashSet提高查找效率 Set<String> adminSet = Arrays.stream(ADMIN_ACCOUNT) .map(String::toLowerCase) .collect(Collectors.toSet()); return Arrays.stream(usernames.split(SymbolConstant....
* @param symbol * @return */ private Map<String, String> getDepartNamesByUserIds(List<String> userIdList, String symbol) { Map<String, String> userOrgCodeMap = new HashMap<>(); if (CollectionUtil.isNotEmpty(userIdList)) { List<SysUserSysDepPostModel> userDepPosts = sysUserDepar...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysUserServiceImpl.java
2
请完成以下Java代码
public JsonExternalId toJsonOrNull(@Nullable final ExternalId externalId) { if (externalId == null) { return null; } return JsonExternalId.of(externalId.getValue()); } public ExternalId fromJsonOrNull(@Nullable final JsonExternalId jsonExternalId) { if (jsonExternalId == null) { return null; }...
public JsonAttachmentType toJsonAttachmentType(@NonNull final AttachmentEntryType type) { switch (type) { case Data: return JsonAttachmentType.Data; case URL: return JsonAttachmentType.URL; case LocalFileURL: return JsonAttachmentType.LocalFileURL; default: throw new AdempiereException(...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\utils\JsonConverters.java
1
请完成以下Java代码
public class C_DunningDoc { @ModelChange(timings = ModelValidator.TYPE_BEFORE_NEW) public void setDocTypeId(final I_C_DunningDoc dunningDoc) { final IDocTypeDAO docTypeDAO = Services.get(IDocTypeDAO.class); final DocTypeQuery query = DocTypeQuery .builder() .adClientId(dunningDoc.getAD_Client_ID()) ...
/** * Updates <code>C_DunningDoc.BPartnerAddress</code> when the the <code>C_BPartner_Location_ID</code> column is changed. * Task 07359 */ @ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE }, // ifColumnsChanged = I_C_DunningDoc.COLUMNNAME_C_BPartner_Location_ID) pub...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\modelvalidator\C_DunningDoc.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setAdditionalText(final @Nullable String AdditionalText) { set_Value(COLUMNNAME_AdditionalText, AdditionalText); } @Override public @NotNull String getAddition...
@Override public void setC_BPartner_ID(final int C_BPartner_ID) { if (C_BPartner_ID < 1) set_Value(COLUMNNAME_C_BPartner_ID, null); else set_Value(COLUMNNAME_C_BPartner_ID, C_BPartner_ID); } @Override public int getC_BPartner_ID() { return get_ValueAsInt(COLUMNNAME_C_BPartner_ID); } @Override pub...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\partnerreporttext\model\X_C_BPartner_Report_Text.java
1
请完成以下Java代码
public class PPOrderCreatedEvent implements MaterialEvent { private final EventDescriptor eventDescriptor; private final PPOrder ppOrder; private final boolean directlyPickIfFeasible; public static final String TYPE = "PPOrderCreatedEvent"; @JsonCreator @Builder public PPOrderCreatedEvent( @JsonProperty("e...
final PPOrderId ppOrderId = ppOrder.getPpOrderId(); Check.errorIf(ppOrderId == null, "The given ppOrderCreatedEvent event has a ppOrder with ppOrderId={}", ppOrderId); ppOrder.getLines().forEach(this::validateLine); } private void validateLine(final PPOrderLine ppOrderLine) { final int ppOrderLineId = ppOrde...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\pporder\PPOrderCreatedEvent.java
1
请完成以下Java代码
public static void applyFieldDeclaration(FieldDeclaration declaration, Object target) { Method setterMethod = ReflectUtil.getSetter(declaration.getName(), target.getClass(), declaration.getValue().getClass()); if(setterMethod != null) { try { setterMethod.invoke(target, declaration.getValue...
throw LOG.incompatibleTypeForFieldDeclaration(declaration, target, field); } ReflectUtil.setField(field, target, declaration.getValue()); } } public static boolean fieldTypeCompatible(FieldDeclaration declaration, Field field) { if(declaration.getValue() != null) { return field.getType()....
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\ClassDelegateUtil.java
1
请完成以下Java代码
protected boolean hasPlanItemDefinition(CmmnModel model, String elementId) { return model.getPrimaryCase().getAllCaseElements().containsKey(elementId); } protected CaseDefinition resolveCaseDefinition(CaseInstanceMigrationDocument document, CommandContext commandContext) { if (document.getMigra...
protected String printCaseDefinitionIdentifierMessage(CaseInstanceMigrationDocument document) { String id = document.getMigrateToCaseDefinitionId(); String key = document.getMigrateToCaseDefinitionKey(); Integer version = document.getMigrateToCaseDefinitionVersion(); String tenantId = do...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\migration\CaseInstanceMigrationManagerImpl.java
1
请在Spring Boot框架中完成以下Java代码
private <C> void setSharedObject(B http, Class<C> clazz, C object) { if (http.getSharedObject(clazz) == null) { http.setSharedObject(clazz, object); } } static class PathQueryRequestMatcher implements RequestMatcher { private final RequestMatcher matcher; PathQueryRequestMatcher(RequestMatcher pathMatch...
} @Override public boolean matches(HttpServletRequest request) { return matcher(request).isMatch(); } @Override public MatchResult matcher(HttpServletRequest request) { return this.matcher.matcher(request); } } }
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\saml2\Saml2LoginConfigurer.java
2
请完成以下Java代码
public static class Builder { private final List<DocumentFilterDescriptor> descriptors = new ArrayList<>(); private Builder() { } public ImmutableDocumentFilterDescriptorsProvider build() { if (descriptors.isEmpty()) { return EMPTY; } return new ImmutableDocumentFilterDescriptorsProvider(...
} public Builder addDescriptors(@NonNull final Collection<DocumentFilterDescriptor> descriptors) { if (descriptors.isEmpty()) { return this; } this.descriptors.addAll(descriptors); return this; } public Builder addDescriptors(@NonNull final DocumentFilterDescriptorsProvider provider) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\provider\ImmutableDocumentFilterDescriptorsProvider.java
1
请完成以下Java代码
public String docValidate(final PO po, final int timing) throws Exception { Check.assume(isDocument(), "PO '{}' is a document", po); if (timing == ModelValidator.TIMING_AFTER_COMPLETE && !documentBL.isReversalDocument(po)) { externalSystemScriptedExportConversionService .retrieveBestMatchingConfig(A...
.setRecord(configTableId, config.getId().getRepoId()) .setAD_ProcessByClassname(InvokeScriptedExportConversionAction.class.getName()) .addParameter(PARAM_EXTERNAL_REQUEST, COMMAND_CONVERT_MESSAGE_FROM_METASFRESH) .addParameter(PARAM_CHILD_CONFIG_ID, config.getId().getRepoId()) .addParameter(PARA...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\scriptedexportconversion\interceptor\ExternalSystemScriptedExportConversionInterceptor.java
1
请完成以下Java代码
public List<User> getAll() { return new ArrayList<>(users.values()); } @Override public void save(User user) { user.setId(UUID.randomUUID().toString()); users.put(user.getId(), user); } @Override public void save(Role role) { role.setId(UUID.randomUUID().toStrin...
@Override public Role getRoleByName(String name) { return roles.values() .stream() .filter(role -> role.getName().equalsIgnoreCase(name)) .findFirst() .orElse(null); } @Override public void deleteAll() { users.clear(); roles.clear(...
repos\tutorials-master\patterns-modules\design-patterns-architectural\src\main\java\com\baeldung\dtopattern\domain\InMemoryRepository.java
1
请完成以下Java代码
public Timestamp getDatePromised() { return TimeUtil.trunc(model.getDatePromised(), TimeUtil.TRUNC_DAY); } public Object getHeaderAggregationKey() { // the pricelist is no aggregation criterion, because // the orderline's price is manually set, i.e. the pricing system is not invoked // and we often want to...
getM_HU_PI_Item_Product_ID(), getPrice()); } /** * Creates and {@link I_PMM_PurchaseCandidate} to {@link I_C_OrderLine} line allocation using the whole candidate's QtyToOrder. * * @param orderLine */ /* package */void createAllocation(final I_C_OrderLine orderLine) { Check.assumeNotNull(orderLine, "o...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\impl\PurchaseCandidate.java
1
请完成以下Java代码
public class Employee { private Integer employeeNumber; private String name; private Integer departmentId; public Employee(Integer employeeNumber, String name, Integer departmentId) { this.employeeNumber = employeeNumber; this.name = name; this.departmentId = departmentId; ...
} public void setName(String name) { this.name = name; } public Integer getDepartmentId() { return departmentId; } public void setDepartmentId(Integer departmentId) { this.departmentId = departmentId; } }
repos\tutorials-master\core-java-modules\core-java-collections-list-3\src\main\java\com\baeldung\collection\filtering\Employee.java
1
请完成以下Java代码
public Object homemadeMatrixMultiplication(MatrixProvider matrixProvider) { return HomemadeMatrix.multiplyMatrices(matrixProvider.getFirstMatrix(), matrixProvider.getSecondMatrix()); } @Benchmark public Object ejmlMatrixMultiplication(MatrixProvider matrixProvider) { SimpleMatrix firstMatri...
@Benchmark public Object nd4jMatrixMultiplication(MatrixProvider matrixProvider) { INDArray firstMatrix = Nd4j.create(matrixProvider.getFirstMatrix()); INDArray secondMatrix = Nd4j.create(matrixProvider.getSecondMatrix()); return firstMatrix.mmul(secondMatrix); } @Benchmark pub...
repos\tutorials-master\core-java-modules\core-java-lang-math-2\src\main\java\com\baeldung\matrices\benchmark\MatrixMultiplicationBenchmarking.java
1
请在Spring Boot框架中完成以下Java代码
public String audit(Model model, DwzAjax dwz, @RequestParam("userNo") String userNo , @RequestParam("auditStatus") String auditStatus) { rpUserPayConfigService.audit(userNo, auditStatus); dwz.setStatusCode(DWZ.SUCCESS); dwz.setMessage(DWZ.SUCCESS_MSG); model.addAttribute("dwz", dwz); return DWZ.AJAX_DONE; ...
/** * 函数功能说明 : 更新银行卡信息 * * @参数: @return * @return String * @throws */ @RequiresPermissions("pay:config:edit") @RequestMapping(value = "/editBank", method = RequestMethod.POST) public String editBank(Model model, RpUserBankAccount rpUserBankAccount, DwzAjax dwz) { rpUserBankAccountService.createOrUpdat...
repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\controller\pay\UserPayConfigController.java
2
请完成以下Java代码
public ProcessDialogBuilder setAD_Process_ID(final int AD_Process_ID) { this.AD_Process_ID = AD_Process_ID; return this; } int getAD_Process_ID() { return AD_Process_ID; } public ProcessDialogBuilder setIsSOTrx(final boolean isSOTrx) { this.isSOTrx = isSOTrx; return this; } boolean isSOTrx() { ...
public ProcessDialogBuilder setFromGridTab(GridTab gridTab) { final int windowNo = gridTab.getWindowNo(); final int tabNo = gridTab.getTabNo(); setWindowAndTabNo(windowNo, tabNo); setAdWindowId(gridTab.getAdWindowId()); setIsSOTrx(Env.isSOTrx(gridTab.getCtx(), windowNo)); setTableAndRecord(gridTab.getAD_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\process\ui\ProcessDialogBuilder.java
1
请完成以下Java代码
public ITabCallout build() { if (tabCalloutsAll.isEmpty()) { return ITabCallout.NULL; } else if (tabCalloutsAll.size() == 1) { return tabCalloutsAll.get(0); } else { return new CompositeTabCallout(tabCalloutsAll); } }
public Builder addTabCallout(final ITabCallout tabCallout) { Check.assumeNotNull(tabCallout, "tabCallout not null"); if (tabCalloutsAll.contains(tabCallout)) { return this; } tabCalloutsAll.add(tabCallout); return this; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\ui\spi\impl\CompositeTabCallout.java
1
请完成以下Java代码
public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public org.eevol...
} @Override public void setQtyBOM (final @Nullable BigDecimal QtyBOM) { set_Value (COLUMNNAME_QtyBOM, QtyBOM); } @Override public BigDecimal getQtyBOM() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyBOM); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setSel_Product_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_T_BOMLine.java
1
请在Spring Boot框架中完成以下Java代码
public Job dataSourceItemReaderJob() throws Exception { return jobBuilderFactory.get("dataSourceItemReaderJob") .start(step()) .build(); } private Step step() throws Exception { return stepBuilderFactory.get("step") .<TestData, TestData>chunk(2) ...
data.setField1(resultSet.getString(2)); // 读取第一个字段,类型为String data.setField2(resultSet.getString(3)); data.setField3(resultSet.getString(4)); return data; }); Map<String, Order> sort = new HashMap<>(1); sort.put("id", Order.ASCENDING); provider.setSort...
repos\SpringAll-master\68.spring-batch-itemreader\src\main\java\cc\mrbird\batch\job\DataSourceItemReaderDemo.java
2
请完成以下Java代码
public class User implements Serializable { private static final long serialVersionUID = -3258839839160856613L; private String id; private String userName; private String passWord; public User(String userName, String passWord) { this.userName = userName; ...
public void setUserName(String userName) { this.userName = userName; } public String getPassWord() { return passWord; } public void setPassWord(String passWord) { this.passWord = passWord; } @Override public Strin...
repos\spring-boot-leaning-master\2.x_42_courses\第 4-7 课:Spring Boot 简单集成 MongoDB\spring-boot-multi-mongodb\src\main\java\com\neo\model\User.java
1
请完成以下Java代码
public String getStrackTrace(String trxName) { return Services.get(IOpenTrxBL.class).getCreationStackTrace(trxName); } @ManagedOperation public String[] getServerContext() { final Properties ctx = Env.getCtx(); String[] context = Env.getEntireContext(ctx); Arrays.sort(context); return context; } @Man...
{ final Level level = LogManager.getLevel(); return level == null ? null : level.toString(); } @ManagedOperation public void runFinalization() { System.runFinalization(); } @ManagedOperation public void resetLocalCache() { CacheMgt.get().reset(); } @ManagedOperation public void rotateMigrationScr...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\jmx\Metasfresh.java
1
请完成以下Java代码
public ValueMapperException cannotSerializeVariable(String variableName, Throwable e) { return new ValueMapperException(exceptionMessage("025", "Cannot serialize variable '{}'", variableName), e); } public void logDataFormats(Collection<DataFormat> formats) { if (isInfoEnabled()) { for (DataFormat fo...
@SuppressWarnings("rawtypes") public void logDataFormatConfigurator(DataFormatConfigurator configurator) { if (isInfoEnabled()) { logInfo("027", "Discovered data format configurator: {}[dataformat = {}]", configurator.getClass(), configurator.getDataFormatClass().getName()); } } public Ex...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\impl\ExternalTaskClientLogger.java
1
请完成以下Java代码
class WorkflowNodeModel { private final IADWorkflowDAO workflowDAO = Services.get(IADWorkflowDAO.class); @NonNull private final WorkflowModel workflowModel; @NonNull private final WFNode node; private Integer xPosition; private Integer yPosition; public WorkflowNodeModel( @NonNull final WorkflowModel wor...
public @NonNull WFNodeAction getAction() {return node.getAction();} public @NonNull ITranslatableString getName() {return node.getName();} @NonNull public ITranslatableString getDescription() {return node.getDescription();} @NonNull public ITranslatableString getHelp() {return node.getHelp();} public @NonNull...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\wf\WorkflowNodeModel.java
1
请完成以下Java代码
public static BPartnerCompositeLookupKey ofIdentifierString(@NonNull final IdentifierString bpartnerIdentifier) { switch (bpartnerIdentifier.getType()) { case EXTERNAL_ID: return BPartnerCompositeLookupKey.ofJsonExternalId(bpartnerIdentifier.asJsonExternalId()); case VALUE: return BPartnerCompositeLo...
String code; GLN gln; GlnWithLabel glnWithLabel; private BPartnerCompositeLookupKey( @Nullable final MetasfreshId metasfreshId, @Nullable final JsonExternalId jsonExternalId, @Nullable final String code, @Nullable final GLN gln, @Nullable final GlnWithLabel glnWithLabel) { this.metasfreshId = meta...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\utils\BPartnerCompositeLookupKey.java
1
请完成以下Java代码
public void onMessage(List<ConsumerRecord<K, V>> records, @Nullable Acknowledgment acknowledgment, @Nullable Consumer<?, ?> consumer) { final RecordFilterStrategy<K, V> recordFilterStrategy = getRecordFilterStrategy(); final List<ConsumerRecord<K, V>> consumerRecords = recordFilterStrategy.filterBatch(records);...
case SIMPLE: this.delegate.onMessage(consumerRecords); } } /* * Since the container uses the delegate's type to determine which method to call, we * must implement them all. */ @Override public void onMessage(List<ConsumerRecord<K, V>> data) { onMessage(data, null, null); // NOSONAR } @Override ...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\adapter\FilteringBatchMessageListenerAdapter.java
1
请完成以下Java代码
public AccountId getOrCreateWithinTrx(@NonNull final AccountDimension dimension) { return getOrCreate(dimension, () -> InterfaceWrapperHelper.newInstance(I_C_ValidCombination.class)); } @Override @NonNull public AccountId getOrCreateOutOfTrx(@NonNull final AccountDimension dimension) { return getOrCreate(dim...
{ vc.setAD_Org_ID(dimension.getAD_Org_ID()); vc.setC_AcctSchema_ID(AcctSchemaId.toRepoId(dimension.getAcctSchemaId())); vc.setAccount_ID(dimension.getC_ElementValue_ID()); vc.setC_SubAcct_ID(dimension.getC_SubAcct_ID()); vc.setM_Product_ID(dimension.getM_Product_ID()); vc.setC_BPartner_ID(dimension.getC_BPa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\api\impl\AccountDAO.java
1
请完成以下Java代码
public boolean isVirtualColumn(final String columnName) { final IDocumentFieldView field = document.getFieldViewOrNull(columnName); return field != null && field.isReadonlyVirtualField(); } @Override public boolean isKeyColumnName(final String columnName) { final IDocumentFieldView field = document.getField...
{ // TODO: implement throw new UnsupportedOperationException(); } @Override public boolean invokeEquals(final Object[] methodArgs) { // TODO: implement throw new UnsupportedOperationException(); } @Override public Object invokeParent(final Method method, final Object[] methodArgs) throws Exception { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentInterfaceWrapper.java
1
请完成以下Java代码
public BigDecimal retrievePriceStd( final @NonNull OrgId orgId, final int productId, final int partnerId, final int priceListId, @Nullable final CountryId countryId, final BigDecimal qty, final boolean soTrx) { final MProductPricing pricing = new MProductPricing( orgId, productId, pa...
ResultSet rs = null; try { pstmt.setInt(1, productPriceId); pstmt.setBigDecimal(2, qty); pstmt.setMaxRows(1); rs = pstmt.executeQuery(); if (rs.next()) { logger.debug("Returning existing instance for M_ProductPrice " + productPriceId + " and quantity " + qty); return new X_M_ProductSca...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\product\impl\ProductPA.java
1
请在Spring Boot框架中完成以下Java代码
public Builder parameters(Consumer<Map<String, String>> parametersConsumer) { parametersConsumer.accept(this.parameters); return this; } /** * Use this strategy for converting parameters into an encoded query string. The * resulting query does not contain a leading question mark. * * In the event...
public Builder parametersQuery(Function<Map<String, String>, String> encoder) { this.encoder = encoder; return this; } /** * Build the {@link Saml2LogoutResponse} * @return a constructed {@link Saml2LogoutResponse} */ public Saml2LogoutResponse build() { return new Saml2LogoutResponse(this.loca...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\authentication\logout\Saml2LogoutResponse.java
2
请完成以下Spring Boot application配置
spring: security: saml2: relyingparty: registration: okta: signing: credentials: - private-key-location: classpath:local.key certificate-location: classpath:local.crt singlelogout: url: https://dev-566172...
binding: POST response-url: "{baseUrl}/logout/saml2/slo" assertingparty: metadata-uri: "classpath:metadata/metadata-idp-okta.xml"
repos\tutorials-master\spring-security-modules\spring-security-saml2\src\main\resources\application.yml
2
请完成以下Java代码
public class ProxyIpFilter extends ChannelInboundHandlerAdapter { private MqttTransportContext context; public ProxyIpFilter(MqttTransportContext context) { this.context = context; } @Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { log.t...
private void closeChannel(ChannelHandlerContext ctx) { while (ctx.pipeline().last() != this) { ChannelHandler handler = ctx.pipeline().removeLast(); if (handler instanceof ChannelInboundHandlerAdapter) { try { ((ChannelInboundHandlerAdapter) handler).c...
repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\limits\ProxyIpFilter.java
1
请在Spring Boot框架中完成以下Java代码
public class PurchaseDemand { PurchaseDemandId id = PurchaseDemandId.createNew(); @NonNull OrgId orgId; /** might be needed when creating new purchase candidates. */ @NonNull WarehouseId warehouseId; @NonNull ProductId productId; @NonNull AttributeSetInstanceId attributeSetInstanceId; @NonNull Quantity...
@NonNull ZonedDateTime salesPreparationDate; @Nullable OrderAndLineId salesOrderAndLineIdOrNull; /** * A demand instance might be (partially) backed by already existing purchase candidates. * We need to hold their IDs to sync with them later. */ @Singular List<PurchaseCandidateId> existingPurchaseCandidat...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\PurchaseDemand.java
2
请在Spring Boot框架中完成以下Java代码
public ArticleMapping updateInsuranceContract(String albertaApiKey, String tenant, String id, Article body) throws ApiException { ApiResponse<ArticleMapping> resp = updateInsuranceContractWithHttpInfo(albertaApiKey, tenant, id, body); return resp.getData(); } /** * Krankenkassenvertrag in ...
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { c...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\api\DefaultApi.java
2
请在Spring Boot框架中完成以下Java代码
public class HistoricProcessInstanceCommentCollectionResource extends HistoricProcessInstanceBaseResource { @Autowired protected RestResponseFactory restResponseFactory; @Autowired protected HistoryService historyService; @Autowired protected TaskService taskService; @ApiOperation(va...
@ApiOperation(value = "Create a new comment on a historic process instance", tags = { "History Process" }, notes = "Parameter saveProcessInstanceId is optional, if true save process instance id of task with comment.", code = 201) @ApiResponses(value = { @ApiResponse(code = 201, m...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricProcessInstanceCommentCollectionResource.java
2
请完成以下Java代码
public class Authentication { public static void main(String[] args) throws IOException { OkHttpClient client = new OkHttpClient(); client.setAuthenticator(new Authenticator() { @Override public Request authenticate(Proxy proxy, Response response) throws IOException { ...
return null; } }); Request request = new Request.Builder() .url("http://www.baidu.com") .build(); Response response = client.newCall(request).execute(); if (!response.isSuccessful()) { throw new IOException("服务器端错误: " + response);...
repos\spring-boot-quick-master\quick-okhttp\src\main\java\com\quick\okhttp\Authentication.java
1
请完成以下Java代码
public void setES_FTS_Config_ID (final int ES_FTS_Config_ID) { if (ES_FTS_Config_ID < 1) set_ValueNoCheck (COLUMNNAME_ES_FTS_Config_ID, null); else set_ValueNoCheck (COLUMNNAME_ES_FTS_Config_ID, ES_FTS_Config_ID); } @Override public int getES_FTS_Config_ID() { return get_ValueAsInt(COLUMNNAME_ES_FT...
@Override public java.lang.String getES_Index() { return get_ValueAsString(COLUMNNAME_ES_Index); } @Override public void setES_QueryCommand (final java.lang.String ES_QueryCommand) { set_Value (COLUMNNAME_ES_QueryCommand, ES_QueryCommand); } @Override public java.lang.String getES_QueryCommand() { r...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java-gen\de\metas\elasticsearch\model\X_ES_FTS_Config.java
1
请完成以下Java代码
public static DocumentFilter createFilter(@NonNull final IHUQueryBuilder huQuery) { final HUIdsFilterData filterData = HUIdsFilterData.ofHUQuery(huQuery); return DocumentFilter.singleParameterFilter(FILTER_ID, FILTER_PARAM_Data, Operator.EQUAL, filterData); } public static DocumentFilter createFilter(@NonNull f...
{ throw new AdempiereException("No " + HUIdsFilterData.class + " found for " + huIdsFilter); } return huIdsFilterData; } public static Optional<HUIdsFilterData> extractFilterData(@Nullable final DocumentFilterList filters) { return findExisting(filters).map(HUIdsFilterHelper::extractFilterData); } publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\filter\HUIdsFilterHelper.java
1
请在Spring Boot框架中完成以下Java代码
public class FilterChainBeanDefinitionParser implements BeanDefinitionParser { private static final String ATT_REQUEST_MATCHER_REF = "request-matcher-ref"; @Override public BeanDefinition parse(Element elt, ParserContext pc) { MatcherType matcherType = MatcherType.fromElementOrMvc(elt); String path = elt.getAt...
if (filters.equals(HttpSecurityBeanDefinitionParser.OPT_FILTERS_NONE)) { builder.addConstructorArgValue(Collections.EMPTY_LIST); } else { String[] filterBeanNames = StringUtils.tokenizeToStringArray(filters, ","); ManagedList<RuntimeBeanReference> filterChain = new ManagedList<>(filterBeanNames.length); ...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\http\FilterChainBeanDefinitionParser.java
2
请完成以下Java代码
public Map<Integer, List<String>> streamCollectByStringLength(List<String> source, Supplier<Map<Integer, List<String>>> mapSupplier, Supplier<List<String>> listSupplier) { BiConsumer<Map<Integer, List<String>>, String> accumulator = (response, element) -> { Integer key = e...
List<String> collection = listSupplier.get(); collection.add(element); return collection; }; BinaryOperator<List<String>> mergeFunction = (existing, replacement) -> { existing.addAll(replacement); return existing; }; return source.stream(...
repos\tutorials-master\core-java-modules\core-java-collections-conversions-4\src\main\java\com\baeldung\convertlisttomap\ListToMapConverter.java
1
请完成以下Java代码
public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public long getValue() { return value; } public void setValue(long value) { this.value = value; }
public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } @Override public String toString() { return "Order [orderId=" + orderId + ", desc=" + desc + ", value=" + value + "]"; } }
repos\tutorials-master\core-java-modules\core-java-string-operations-12\src\main\java\com\baeldung\tostring\Order.java
1
请在Spring Boot框架中完成以下Java代码
public class PrintingClientStandaloneService { private final transient Logger logger = Logger.getLogger(getClass().getName()); public static void main(final String[] args) { new PrintingClientStandaloneService().run(); } /** * Thanks to http://stackoverflow.com/questions/3777055/reading-manifest-mf-file-from...
catch (final IOException e1) { // Silently ignore wrong manifests on classpath? } } private void run() { final Context context = Context.getContext(); context.addSource(new ConfigFileContext()); logVersionInfo(); // // Start the client final PrintingClient client = new PrintingClient(); clien...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\PrintingClientStandaloneService.java
2
请完成以下Java代码
public static Result addOne(String desformCode, JSONObject formData, String token) { return addOrEditOne(desformCode, formData, token, HttpMethod.POST); } /** * 修改数据 * * @param desformCode * @param formData * @param token * @return */ public static Result editOne(...
return builder; } private static StringBuilder getBaseUrl(String desformCode, String dataId) { StringBuilder builder = getBaseUrl(); builder.append("/").append(desformCode); if (dataId != null) { builder.append("/").append(dataId); } return builder; } ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\RestDesformUtil.java
1
请完成以下Java代码
public class TaskCompletedListenerDelegate implements ActivitiEventListener { private List<TaskRuntimeEventListener<TaskCompletedEvent>> listeners; private ToTaskCompletedConverter taskCompletedConverter; public TaskCompletedListenerDelegate( List<TaskRuntimeEventListener<TaskCompletedEvent>> lis...
if (event instanceof ActivitiEntityEvent) { taskCompletedConverter .from((ActivitiEntityEvent) event) .ifPresent(convertedEvent -> { for (TaskRuntimeEventListener<TaskCompletedEvent> listener : listeners) { listener.onEvent(converte...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-task-runtime-impl\src\main\java\org\activiti\runtime\api\event\internal\TaskCompletedListenerDelegate.java
1
请完成以下Java代码
private void setValueForField(Class clazz, Field field, List<BaseComponent> componentList) throws IllegalAccessException { // 获取Processor对象 Object processor = applicationContext.getBean(clazz); // 将field设为public field.setAccessible(true); // 赋值 field.set(processor, comp...
} // 遍历components for (Class<BaseComponent> componentClass : componentClassList) { // 获取IOC容器中的Component对象 BaseComponent componentInstance = applicationContext.getBean(componentClass); // 加入容器 componentList.add(componentInstance); } retur...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Order\src\main\java\com\gaoxi\order\init\InitComponentList.java
1
请完成以下Java代码
protected void resolveProcessDefinitionInfo() { ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(); if (processEngineConfiguration == null) { // We are outside of a command context so do not try to resolve anything retur...
} if (parentId != null) { strb.append(" - parent '").append(parentId).append("'"); } } if (StringUtils.isNotEmpty(tenantId)) { strb.append(" - tenantId '").append(tenantId).append("'"); } return strb.toString(); } @Override ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\ExecutionEntityImpl.java
1
请完成以下Java代码
public void setCarrier_Service_ID (final int Carrier_Service_ID) { if (Carrier_Service_ID < 1) set_Value (COLUMNNAME_Carrier_Service_ID, null); else set_Value (COLUMNNAME_Carrier_Service_ID, Carrier_Service_ID); } @Override public int getCarrier_Service_ID() { return get_ValueAsInt(COLUMNNAME_Carri...
} @Override public void setCarrier_ShipmentOrder_Service_ID (final int Carrier_ShipmentOrder_Service_ID) { if (Carrier_ShipmentOrder_Service_ID < 1) set_ValueNoCheck (COLUMNNAME_Carrier_ShipmentOrder_Service_ID, null); else set_ValueNoCheck (COLUMNNAME_Carrier_ShipmentOrder_Service_ID, Carrier_ShipmentO...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_ShipmentOrder_Service.java
1
请完成以下Java代码
private void dbUpdateSubProducer(@NonNull final ImportRecordsSelection selection) { // Set M_Warehouse_ID final StringBuilder sql = new StringBuilder("UPDATE I_Inventory i ") .append("SET SubProducer_BPartner_ID=(SELECT C_BPartner_ID FROM C_BPartner bp WHERE i.SubProducerBPartner_Value=bp.value) ") .append...
} } // // No Product { final StringBuilder sql = new StringBuilder("UPDATE I_Inventory ") .append(" SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Product, ' ") .append(" WHERE M_Product_ID IS NULL ") .append(" AND I_IsImported<>'Y' ") .append(selection.toSqlWhereClause()); fina...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\inventory\impexp\MInventoryImportTableSqlUpdater.java
1
请完成以下Java代码
public void setTaskExecutor(TaskExecutor taskExecutor) { this.taskExecutor = taskExecutor; } public void executeJobs(List<String> jobIds, ProcessEngineImpl processEngine) { try { taskExecutor.execute(getExecuteJobsRunnable(jobIds, processEngine)); } catch (RejectedExecutionException e) { logReje...
((ThreadPoolTaskExecutor) taskExecutor).getActiveCount()); } } } @Override protected void startExecutingJobs() { startJobAcquisitionThread(); } @Override protected void stopExecutingJobs() { stopJobAcquisitionThread(); } }
repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\components\jobexecutor\SpringJobExecutor.java
1
请完成以下Java代码
public void setUrl(String url) { this.url = url; } public String getPermission() { return permission; } public void setPermission(String permission) { this.permission = permission; } public Long getParentId() { return parentId; } public void setParentI...
public void setParentIds(String parentIds) { this.parentIds = parentIds; } public Boolean getAvailable() { return available; } public void setAvailable(Boolean available) { this.available = available; } public List<SysRole> getRoles() { return roles; } ...
repos\springboot-demo-master\shiro\src\main\java\com\et\shiro\entity\SysPermission.java
1
请完成以下Java代码
public boolean isSystemLanguage () { Object oo = get_Value(COLUMNNAME_IsSystemLanguage); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set ISO Language Code. @param LanguageISO Lower-case two-letter ISO-3...
/** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Language.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isCachable() { return true; } @Override public Object getValue(ValueFields valueFields) { if (valueFields.getLongValue() != null) { return Integer.valueOf(valueFields.getLongValue().intValue()); } return null; } @Override public void s...
valueFields.setTextValue(value.toString()); } else { valueFields.setLongValue(null); valueFields.setTextValue(null); } } @Override public boolean isAbleToStore(Object value) { if (value == null) { return true; } return Integer.clas...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\IntegerType.java
2
请完成以下Java代码
public void addBankAccount(@NonNull final BPartnerBankAccount bankAccount) { bankAccounts.add(bankAccount); } public Optional<BPartnerBankAccount> getBankAccountByIBAN(@NonNull final String iban) { Check.assumeNotEmpty(iban, "iban is not empty"); return bankAccounts.stream() .filter(bankAccount -> iban....
creditLimits.add(creditLimit); } @NonNull public Stream<BPartnerContactId> streamContactIds() { return this.getContacts().stream().map(BPartnerContact::getId); } @NonNull public Stream<BPartnerLocationId> streamBPartnerLocationIds() { return this.getLocations().stream().map(BPartnerLocation::getId); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\composite\BPartnerComposite.java
1
请完成以下Java代码
public java.lang.String getStorageAttributesKey () { return (java.lang.String)get_Value(COLUMNNAME_StorageAttributesKey); } /** Set Transfert Time. @param TransfertTime Transfert Time */ @Override public void setTransfertTime (java.math.BigDecimal TransfertTime) { set_Value (COLUMNNAME_TransfertTime, Tr...
/** Set Yield %. @param Yield The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 percent */ @Override public void setYield (int Yield) { set_Value (COLUMNNAME_Yield, Integer.valueOf(Yield)); } /** Get Yield %. @return The Yield is the percentage of a l...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\product\model\X_M_Product_PlanningSchema.java
1
请完成以下Java代码
public Long[] projectionRowCount() { final Session session = HibernateUtil.getHibernateSession(); final CriteriaBuilder cb = session.getCriteriaBuilder(); final CriteriaQuery<Long> cr = cb.createQuery(Long.class); final Root<Item> root = cr.from(Item.class); cr.select(cb.count(ro...
public Double[] projectionAverage() { final Session session = HibernateUtil.getHibernateSession(); final CriteriaBuilder cb = session.getCriteriaBuilder(); final CriteriaQuery<Double> cr = cb.createQuery(Double.class); final Root<Item> root = cr.from(Item.class); cr.select(cb.avg...
repos\tutorials-master\persistence-modules\hibernate-queries\src\main\java\com\baeldung\hibernate\criteria\view\ApplicationView.java
1
请完成以下Java代码
public boolean isAckAfterHandle() { return this.ackAfterHandle; } @Override public void setAckAfterHandle(boolean ackAfterHandle) { this.ackAfterHandle = ackAfterHandle; } /** * True to reclassify the exception if different from the previous failure. If * classified as retryable, the existing back off se...
ErrorHandlingUtils.retryBatch(thrownException, records, consumer, container, invokeListener, this.backOff, this.seeker, this.recoverer, this.logger, getLogLevel(), this.retryListeners, getExceptionMatcher(), this.reclassifyOnExceptionChange); } finally { this.retrying.remove(Thread.currentThread()); ...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\FallbackBatchErrorHandler.java
1
请完成以下Java代码
public class Player { private int points ; final String name; public Player(String name) { this(name, 0); } private Player(String name, int points) { this.name = name; this.points = 0; } public void gainPoint() { points++; }
public boolean hasScoreBiggerThan(Score score) { return this.points > score.points(); } public int pointsDifference(Player other) { return points - other.points; } public String name() { return name; } public String score() { return Score.from(points).label(); ...
repos\tutorials-master\patterns-modules\clean-architecture\src\main\java\com\baeldung\pattern\richdomainmodel\Player.java
1
请完成以下Java代码
public void setCommittedAmt (BigDecimal CommittedAmt) { set_Value (COLUMNNAME_CommittedAmt, CommittedAmt); } /** Get Committed Amount. @return The (legal) commitment amount */ public BigDecimal getCommittedAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CommittedAmt); if (bd == null) ret...
public int getC_Payment_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_Payment_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Not Committed Aount. @param NonCommittedAmt Amount not committed yet */ public void setNonCommittedAmt (BigDecimal NonCommittedAmt) { set_Value (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_SellerFunds.java
1
请完成以下Java代码
public float getLayoutAlignmentX(Container target) { return 0f; } // getLayoutAlignmentX /** * Returns the alignment along the y axis. This specifies how * the component would like to be aligned relative to other * components. The value should be a number between 0 and 1 * where 0 represents alignmen...
} // getColCount /** * Set Horizontal Space (top, between rows, button) * @param spaceH horizontal space (top, between rows, button) */ public void setSpaceH (int spaceH) { m_spaceH = spaceH; } // setSpaceH /** * Get Horizontal Space (top, between rows, button) * @return spaceH horizontal s...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ALayout.java
1
请在Spring Boot框架中完成以下Java代码
public String getProductFileEndpoint() { return getLocalFileConnectionString(fileNamePatternProduct); } @Override @NonNull public String getBPartnerFileEndpoint() { return getLocalFileConnectionString(fileNamePatternBPartner); } @Override @NonNull public String getWarehouseFileEndpoint() { return get...
.append("?") .append("charset=utf-8") .append("&") .append("delay=").append(pollingFrequency.toMillis()) .append("&") .append("move=").append(processedFilesFolder).append("/").append(seenFileRenamePattern) .append("&") .append("moveFailed=").append(errorFilesFolder).append("/").append(seenFi...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-pcm-file-import\src\main\java\de\metas\camel\externalsystems\pcm\config\LocalFileConfig.java
2
请完成以下Java代码
public void setM_HU_ID (final int M_HU_ID) { if (M_HU_ID < 1) set_Value (COLUMNNAME_M_HU_ID, null); else set_Value (COLUMNNAME_M_HU_ID, M_HU_ID); } @Override public int getM_HU_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_ID); } @Override public void setM_Locator_ID (final int M_Locator_ID) { ...
return get_ValueAsInt(COLUMNNAME_M_PickingSlot_ID); } @Override public void setM_Warehouse_ID (final int M_Warehouse_ID) { if (M_Warehouse_ID < 1) set_Value (COLUMNNAME_M_Warehouse_ID, null); else set_Value (COLUMNNAME_M_Warehouse_ID, M_Warehouse_ID); } @Override public int getM_Warehouse_ID() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\picking\model\X_M_PickingSlot.java
1
请完成以下Java代码
public static HUQRCodeUniqueId ofUUID(@NonNull final UUID uuid) { final String uuidStr = uuid.toString().replace("-", ""); // expect 32 chars final StringBuilder uuidFirstPart = new StringBuilder(32); final StringBuilder uuidLastPart = new StringBuilder(); // TO reduce the change of having duplicate display...
final String idBase = json.substring(0, idx); final String displayableSuffix = json.substring(idx + 1); return new HUQRCodeUniqueId(idBase, displayableSuffix); } @Override @Deprecated public String toString() { return getAsString(); } @JsonValue public String getAsString() { return idBase + "-" + dis...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\model\HUQRCodeUniqueId.java
1
请完成以下Java代码
public TenantId getTenantId() { return this.tenantId; } @Schema(description = "JSON object with Customer Id. Use 'assignEdgeToCustomer' to change the Customer Id.", accessMode = Schema.AccessMode.READ_ONLY) @Override public CustomerId getCustomerId() { return this.customerId; } ...
@Schema(description = "Label that may be used in widgets", example = "Silo Edge on far field") public String getLabel() { return this.label; } @Schema(requiredMode = Schema.RequiredMode.REQUIRED, description = "Edge routing key ('username') to authorize on cloud") public String getRoutingKey() ...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\edge\Edge.java
1
请完成以下Java代码
public void clearStoredHashCode() { storedHashCode = null; } /** * 两个状态是否等价,只有状态转移函数完全一致才算相等<br> * Evaluates the equality of this node with another object. * This node is equal to obj if and only if obj is also an MDAGNode, * and the set of transitions paths from t...
* Hashes this node using its accept state status and set of outgoing _transition paths. * This is an expensive operation, so the result is cached and only cleared when necessary. * @return an int of this node's hash code */ @Override public int hashCode() { if(storedHas...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\MDAG\MDAGNode.java
1
请完成以下Java代码
public Document getDocument() { return m_view.getDocument(); } /** * Returns the starting offset into the model for this view. * * @return the starting offset */ public int getStartOffset() { return m_view.getStartOffset(); } /** * Returns the ending offset into the model for this view....
this.m_width = (int) width; m_view.setSize(width, height); } /** * Fetches the factory to be used for building the * various view fragments that make up the view that * represents the model. This is what determines * how the model will be represented. This is implemented * to fetch the factory ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\HTMLRenderer.java
1
请完成以下Java代码
public class C_Doc_Outbound_Log_Selection_Export_JSON extends C_Invoice_Selection_Export_JSON { private final IDocOutboundDAO docOutboundDAO = Services.get(IDocOutboundDAO.class); private final IADTableDAO tableDAO = Services.get(IADTableDAO.class); @Override @Nullable protected InvoiceId extractSingleSelectedInv...
{ return null; } return InvoiceId.ofRepoIdOrNull(reference.getRecord_ID()); } @Override @NonNull protected IQueryBuilder<I_C_Invoice> createSelectedInvoicesQueryBuilder() { return queryBL .createQueryBuilder(I_C_Doc_Outbound_Log.class) .filter(getProcessInfo().getQueryFilterOrElseFalse()) .a...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\export\json\C_Doc_Outbound_Log_Selection_Export_JSON.java
1
请在Spring Boot框架中完成以下Java代码
public class JPAEntityVariableType implements VariableType, CacheableVariable { public static final String TYPE_NAME = "jpa-entity"; private JPAEntityMappings mappings; private boolean forceCacheable; public JPAEntityVariableType() { mappings = new JPAEntityMappings(); } @Override ...
} if (value != null) { String className = mappings.getJPAClassString(value); String idString = mappings.getJPAIdString(value); valueFields.setTextValue(className); valueFields.setTextValue2(idString); } else { valueFields.setTextValue(null); ...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\JPAEntityVariableType.java
2
请完成以下Java代码
public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setS...
@Override public int getStartDay() { return get_ValueAsInt(COLUMNNAME_StartDay); } @Override public void setStartMonth (final int StartMonth) { set_Value (COLUMNNAME_StartMonth, StartMonth); } @Override public int getStartMonth() { return get_ValueAsInt(COLUMNNAME_StartMonth); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_SubscrDiscount_Line.java
1
请完成以下Java代码
private String getResponsiblePerson(@NonNull final XmlBody body) { String response = ""; final XMLEmployee employee = body.getContact().getEmployee(); if (employee != null) { response += employee.getFamilyName(); if (employee.getGivenName() != null) { response += " " + employee.getGivenName(); ...
} return null; } @NonNull private String getRecipient(@NonNull final XmlBody body) { return body.getContact().getCompany().getCompanyName(); } @SuppressWarnings("UnstableApiUsage") private ImmutableList<RejectedError> getErrors(@NonNull final XmlBody body) { if (body.getRejected() != null) { return...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\base\export\invoice\InvoiceImportClientImpl.java
1
请在Spring Boot框架中完成以下Java代码
private Path getSchemaUpdateFile(String version) { return Paths.get(installScripts.getDataDir(), "upgrade", version, SCHEMA_UPDATE_SQL); } private void loadSql(Path sqlFile) { String sql; try { sql = Files.readString(sqlFile); } catch (IOException e) { th...
private void execute(@Language("sql") String statement, boolean ignoreErrors) { try { jdbcTemplate.execute(statement); } catch (Exception e) { if (!ignoreErrors) { throw e; } } } private void printWarnings(SQLWarning warnings) { ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\install\SqlDatabaseUpgradeService.java
2
请完成以下Java代码
public boolean isSpecific() { return !isAll() && !isOther() && !isNone(); } public String getSqlLikeString() { String sqlLikeString = _sqlLikeString; if (sqlLikeString == null) { sqlLikeString = _sqlLikeString = computeSqlLikeString(); } return sqlLikeString; } private String computeSqlLikeString...
boolean partPatternMatched = false; if (AttributesKey.NONE.getAsString().equals(attributesKey.getAsString())) { partPatternMatched = partPattern.matches(AttributesKeyPart.NONE); } else { for (final AttributesKeyPart part : attributesKey.getParts()) { if (partPattern.matches(part)) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\keys\AttributesKeyPattern.java
1
请在Spring Boot框架中完成以下Java代码
static class JsonbJsonpMapperConfiguration { @Bean JsonbJsonpMapper jsonbJsonpMapper(Jsonb jsonb) { return new JsonbJsonpMapper(JsonProvider.provider(), jsonb); } } @ConditionalOnMissingBean(JsonpMapper.class) @Configuration(proxyBeanMethods = false) static class SimpleJsonpMapperConfiguration { @Bea...
} @Configuration(proxyBeanMethods = false) @ConditionalOnBean(ElasticsearchTransport.class) static class ElasticsearchClientConfiguration { @Bean @ConditionalOnMissingBean ElasticsearchClient elasticsearchClient(ElasticsearchTransport transport) { return new ElasticsearchClient(transport); } } }
repos\spring-boot-4.0.1\module\spring-boot-elasticsearch\src\main\java\org\springframework\boot\elasticsearch\autoconfigure\ElasticsearchClientConfigurations.java
2
请完成以下Java代码
public static final CacheIntrospectionException wrapIfNeeded(final Throwable e) { if (e == null) { return new CacheIntrospectionException("Unknown cache exception"); } else if (e instanceof CacheIntrospectionException) { return (CacheIntrospectionException)e; } else if ((e instanceof InvocationTarg...
return this; } if (this.hintsToFix == null) { this.hintsToFix = new HashSet<>(); } this.hintsToFix.add(hintToFix); resetMessageBuilt(); return this; } @Override protected ITranslatableString buildMessage() { final TranslatableStringBuilder message = TranslatableStrings.builder(); message.app...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\interceptor\CacheIntrospectionException.java
1
请在Spring Boot框架中完成以下Java代码
public class ProcessDefinitionDto { protected String id; protected String key; protected String category; protected String description; protected String name; protected int version; protected String resource; protected String deploymentId; protected String diagram; protected boolean suspended; pr...
} public Integer getHistoryTimeToLive() { return historyTimeToLive; } public boolean isStartableInTasklist() { return isStartableInTasklist; } public static ProcessDefinitionDto fromProcessDefinition(ProcessDefinition definition) { ProcessDefinitionDto dto = new ProcessDefinitionDto(); dto....
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\repository\ProcessDefinitionDto.java
2
请完成以下Java代码
public long countByCriteria(HistoricPlanItemInstanceQueryImpl query) { setSafeInValueLists(query); return (Long) getDbSqlSession().selectOne("selectHistoricPlanItemInstancesCountByQueryCriteria", query); } @Override public void deleteByCaseDefinitionId(String caseDefinitionId) { get...
public HistoricPlanItemInstanceEntity create() { return new HistoricPlanItemInstanceEntityImpl(); } @Override public HistoricPlanItemInstanceEntity create(PlanItemInstance planItemInstance) { return new HistoricPlanItemInstanceEntityImpl(planItemInstance); } protected void setS...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\data\impl\MybatisHistoricPlanItemInstanceDataManager.java
1
请在Spring Boot框架中完成以下Java代码
public class UserController { // 创建线程安全的Map,模拟users信息的存储 static Map<Long, User> users = Collections.synchronizedMap(new HashMap<Long, User>()); /** * 处理"/users/"的GET请求,用来获取用户列表 * * @return */ @GetMapping("/") public List<User> getUserList() { // 还可以通过@RequestParam从页面中传递...
*/ @GetMapping("/{id}") public User getUser(@PathVariable Long id) { // url中的id可通过@PathVariable绑定到函数的参数中 return users.get(id); } /** * 处理"/users/{id}"的PUT请求,用来更新User信息 * * @param id * @param user * @return */ @PutMapping("/{id}") public String putUs...
repos\SpringBoot-Learning-master\2.x\chapter2-1\src\main\java\com\didispace\chapter21\UserController.java
2
请在Spring Boot框架中完成以下Java代码
public long countFeed(long userId) { return assemblyRepository.countFeed(userId); } @Mapper(config = MappingConfig.class) interface ArticleMapper { @Mapping(target = "tagList", source = "tags") @Mapping(target = "tagIds", source = "tags") ArticleJdbcEntity fromDomain(Articl...
return source.stream().map(Tag::name).collect(Collectors.joining(",")); } default List<ArticleTagJdbcEntity> tagIds(List<Tag> source) { return source.stream().map(t -> new ArticleTagJdbcEntity(t.id())).toList(); } default List<Tag> tags(ArticleJdbcEntity source) { ...
repos\realworld-backend-spring-master\service\src\main\java\com\github\al\realworld\infrastructure\db\jdbc\ArticleJdbcRepositoryAdapter.java
2
请在Spring Boot框架中完成以下Java代码
public ImmutableSet<Integer> getExternalSystemConfigIds(@NonNull final DataExportAuditId dataExportAuditId) { return queryBL.createQueryBuilder(I_Data_Export_Audit_Log.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_Data_Export_Audit_Log.COLUMNNAME_Data_Export_Audit_ID, dataExportAuditId.getRepoId())...
.map(DataExportAuditLogRepository::toDataExportAuditLog) .collect(ImmutableList.toImmutableList()); } @NonNull private static DataExportAuditLog toDataExportAuditLog(@NonNull final I_Data_Export_Audit_Log record) { return DataExportAuditLog.builder() .dataExportAuditLogId(DataExportAuditLogId.ofRepoId(Da...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\audit\data\repository\DataExportAuditLogRepository.java
2
请完成以下Java代码
public final class PayPalOrderStatus { @JsonCreator public static PayPalOrderStatus ofCode(@NonNull final String code) { final PayPalOrderStatus status = cacheByCode.get(code); return status != null ? status : new PayPalOrderStatus(code); } public static final PayPalOrderStatus UNKNOWN = new PayPalOrderStatus...
{ if (this == CREATED) { return PaymentReservationStatus.WAITING_PAYER_APPROVAL; } else if (this == APPROVED) { return PaymentReservationStatus.APPROVED_BY_PAYER; } else if (this == COMPLETED) { return PaymentReservationStatus.COMPLETED; } else if (this == REMOTE_DELETED) { return Paym...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java\de\metas\payment\paypal\client\PayPalOrderStatus.java
1
请完成以下Spring Boot application配置
spring: jms: cache: enabled: true # 默认 true session-cache-size: 5 # 默认 1 artemis: mode: native broker-url: tcp://localhost:61616 user: admin password: 123456 pool: enabled: true # 默认 false m
ax-connections: 50 # 默认 1 idle-timeout: 5s # 默认 30s max-sessions-per-connection: 100 # 默认 500
repos\spring-boot-best-practice-master\spring-boot-activemq\src\main\resources\application.yml
2
请完成以下Java代码
public class Category { private final @Id Long id; private String name, description; private LocalDateTime created; private Long inserted; public Category(String name, String description) { this.id = null; this.name = name; this.description = description; this.created = LocalDateTime.now(); } @Persis...
public String getDescription() { return this.description; } public LocalDateTime getCreated() { return this.created; } public Long getInserted() { return this.inserted; } public void setName(String name) { this.name = name; } public void setDescription(String description) { this.description = desc...
repos\spring-data-examples-main\jdbc\aot-optimization\src\main\java\example\springdata\aot\Category.java
1
请完成以下Java代码
public static long daysBetween(@NonNull final LocalDateAndOrgId d1, @NonNull final LocalDateAndOrgId d2) { assertSameOrg(d2, d2); return ChronoUnit.DAYS.between(d1.toLocalDate(), d2.toLocalDate()); } private static void assertSameOrg(@NonNull final LocalDateAndOrgId d1, @NonNull final LocalDateAndOrgId d2) { ...
public Timestamp toTimestamp(@NonNull final Function<OrgId, ZoneId> orgMapper) { return Timestamp.from(toInstant(orgMapper)); } @Override public int compareTo(final @Nullable LocalDateAndOrgId o) { return compareToByLocalDate(o); } /** * In {@code LocalDateAndOrgId}, only the ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\organization\LocalDateAndOrgId.java
1
请完成以下Java代码
public JobManager getJobManager() { return processEngineConfiguration.getJobManager(); } // Involved executions //////////////////////////////////////////////////////// public void addInvolvedExecution(ExecutionEntity executionEntity) { if (executionEntity.getId() != null) { in...
} public ActivitiEngineAgenda getAgenda() { return agenda; } public Object getResult() { return resultStack.pollLast(); } public void setResult(Object result) { resultStack.add(result); } public boolean isReused() { return reused; } public void se...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\interceptor\CommandContext.java
1
请在Spring Boot框架中完成以下Java代码
public abstract class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; private int age; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { ...
return age; } public void setAge(int age) { this.age = age; } public Employee(String name, int age) { super(); this.name = name; this.age = age; } public Employee() { super(); } }
repos\tutorials-master\persistence-modules\spring-jpa-3\src\main\java\com\baeldung\jpa\subtypes\entity\Employee.java
2
请完成以下Java代码
public class HashMapBenchmark { @State(Scope.Thread) public static class MyState { Map<Long, Employee> employeeMap = new HashMap<>(); //LinkedHashMap<Long, Employee> employeeMap = new LinkedHashMap<>(); //IdentityHashMap<Long, Employee> employeeMap = new IdentityHashMap<>(); //...
public Employee testPut(MyState state) { return state.employeeMap.put(state.employee.getId(), state.employee); } @Benchmark public Boolean testContainsKey(MyState state) { return state.employeeMap.containsKey(state.employee.getId()); } public static void main(String[] args) throws...
repos\tutorials-master\core-java-modules\core-java-collections-7\src\main\java\com\baeldung\performance\HashMapBenchmark.java
1
请完成以下Java代码
protected @NonNull String decorate(@NonNull PdxInstance pdxInstance, @NonNull String json) { if (isDecorationRequired(pdxInstance, json)) { try { ObjectMapper objectMapper = newObjectMapper(json); JsonNode jsonNode = objectMapper.readTree(json); if (isMissingObjectTypeMetadata(jsonNode)) { ((O...
.filter(StringUtils::hasText) .filter(className -> !JSONFormatter.JSON_CLASSNAME.equals(className)) .isPresent(); } private boolean isDecorationRequired(@Nullable PdxInstance pdxInstance, @Nullable String json) { return isMissingObjectTypeMetadata(pdxInstance) && isValidJson(json); } private boolean isMis...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\data\json\converter\support\JSONFormatterPdxToJsonConverter.java
1
请完成以下Java代码
public boolean registerCallout( @NonNull final String tableName, @NonNull final String columnName, @NonNull final ICalloutInstance callout) { final String tableNameToUse = tableName.toLowerCase(); // // Add the new callout to our internal map final AtomicBoolean registered = new AtomicBoolean(false);...
if (calloutInstances.isEmpty()) { throw new AdempiereException("No binding columns found for " + annotatedCalloutObj + " (class=" + annotatedCalloutObj.getClass() + ")"); } boolean registered = false; for (final AnnotatedCalloutInstance calloutInstance : calloutInstances) { final String tableName = cal...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\callout\spi\impl\ProgramaticCalloutProvider.java
1
请完成以下Java代码
public InputStream getProcessModel(String processDefinitionId) { return commandExecutor.execute(new GetDeploymentProcessModelCmd(processDefinitionId)); } public Model newModel() { return commandExecutor.execute(new CreateModelCmd()); } public void saveModel(Model model) { comma...
} public byte[] getModelEditorSource(String modelId) { return commandExecutor.execute(new GetModelEditorSourceCmd(modelId)); } public byte[] getModelEditorSourceExtra(String modelId) { return commandExecutor.execute(new GetModelEditorSourceExtraCmd(modelId)); } public void addCand...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\RepositoryServiceImpl.java
1
请完成以下Java代码
public void setAD_Scheduler_ID (final int AD_Scheduler_ID) { if (AD_Scheduler_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_Scheduler_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_Scheduler_ID, AD_Scheduler_ID); } @Override public int getAD_Scheduler_ID() { return get_ValueAsInt(COLUMNNAME_AD_Scheduler...
public java.lang.String getErrorMsg() { return get_ValueAsString(COLUMNNAME_ErrorMsg); } @Override public void setIsProcessing (final boolean IsProcessing) { set_Value (COLUMNNAME_IsProcessing, IsProcessing); } @Override public boolean isProcessing() { return get_ValueAsBoolean(COLUMNNAME_IsProcessin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PInstance.java
1
请在Spring Boot框架中完成以下Java代码
protected void createDefaultStructures(Element rootTypes) { NodeList complexTypes = rootTypes.getElementsByTagNameNS("http://www.w3.org/2001/XMLSchema", "complexType"); for (int i = 0; i < complexTypes.getLength(); i++) { Element element = (Element) complexTypes.item(i); String s...
} } @Override public Map<String, StructureDefinition> getStructures() { return this.structures; } @Override public Map<String, WSService> getServices() { return this.wsServices; } @Override public Map<String, WSOperation> getOperations() { return this.wsOpe...
repos\flowable-engine-main\modules\flowable-cxf\src\main\java\org\flowable\engine\impl\webservice\WSDLImporter.java
2
请完成以下Java代码
public Duration getDelay() { return this.delay; } /** * Specify the base delay after the initial invocation. * <p> * If a {@linkplain #getMultiplier() multiplier} is specified, this serves as the * initial delay to multiply from. * @param delay the base delay (must be greater than or equal to zero) */ ...
} /** * Return the maximum delay for any retry attempt. * @return the maximum delay */ public Duration getMaxDelay() { return this.maxDelay; } /** * Specify the maximum delay for any retry attempt, limiting how far * {@linkplain #getJitter() jitter} and the {@linkplain #getMultiplier() multiplier} *...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\retry\RetryPolicySettings.java
1