instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class JaxpTransformer { private Document input; public JaxpTransformer(String resourcePath) throws SAXException, IOException, ParserConfigurationException { // 1- Build the doc from the XML file DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setFe...
// 3- Make the change on the selected nodes for (int i = 0; i < nodes.getLength(); i++) { Element value = (Element) nodes.item(i); value.setAttribute(attribute, newValue); } // Stream api syntax // IntStream // .range(0, nodes.getLength()) // .mapT...
repos\tutorials-master\xml-modules\xml-2\src\main\java\com\baeldung\xml\attribute\JaxpTransformer.java
1
请完成以下Java代码
public String getLocalname() { return localname; } public void setLocalname(String localname) { this.localname = localname == null ? null : localname.trim(); } public String getGovernmentform() { return governmentform; } public void setGovernmentform(String governmentf...
public Integer getCapital() { return capital; } public void setCapital(Integer capital) { this.capital = capital; } public String getCode2() { return code2; } public void setCode2(String code2) { this.code2 = code2 == null ? null : code2.trim(); } }
repos\spring-boot-quick-master\quick-modules\dao\src\main\java\com\modules\entity\Country.java
1
请完成以下Java代码
public java.lang.String getDocBaseType () { return (java.lang.String)get_Value(COLUMNNAME_DocBaseType); } @Override public org.compiere.model.I_R_RequestType getR_RequestType() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_R_RequestType_ID, org.compiere.model.I_R_RequestType.class); } @Overrid...
set_Value (COLUMNNAME_R_RequestType_ID, null); else set_Value (COLUMNNAME_R_RequestType_ID, Integer.valueOf(R_RequestType_ID)); } /** Get Anfrageart. @return Type of request (e.g. Inquiry, Complaint, ..) */ @Override public int getR_RequestType_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_R_Re...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UserBPAccess.java
1
请完成以下Java代码
public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getUserAgent() { return userAgen...
@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(", adminId=").append(adminId); sb.append(", c...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsAdminLoginLog.java
1
请完成以下Java代码
public Properties getCtx() { return ctx; } @Override public String getTrxName() { final String trxName = getThreadInheritedTrxName(); if (isNull(trxName)) { // task 07752: if there is no inherited trx (yet!), we fall back to <<ThreadInherited>> return ITrx.TRXNAME_ThreadInherit...
@Override public final boolean isDebugClosedTransactions() { return debugClosedTransactionsList != null; } @Override public final List<ITrx> getDebugClosedTransactions() { trxName2trxLock.lock(); try { if (debugClosedTransactionsList == null) { return Collections.emptyList(); } return new...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\api\impl\AbstractTrxManager.java
1
请完成以下Java代码
public List<Task> findTasksByParentTaskId(String parentTaskId) { return getDbSqlSession().selectList("selectTasksByParentTaskId", parentTaskId); } public void deleteTask(String taskId, String deleteReason, boolean cascade) { TaskEntity task = Context .getCommandContext() ...
deleteTask(task, reason, cascade); } else if (cascade) { Context .getCommandContext() .getHistoricTaskInstanceEntityManager() .deleteHistoricTaskInstanceById(taskId); } } public void updateTaskTenantIdForDeployment(String d...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\TaskEntityManager.java
1
请在Spring Boot框架中完成以下Java代码
public static String buildRequest(Map<String, String> sParaTemp, String strMethod, String strButtonName) { // 待请求参数数组 Map<String, String> sPara = buildRequestPara(sParaTemp); List<String> keys = new ArrayList<String>(sPara.keySet()); StringBuffer sbHtml = new StringBuffer(); sbHtml.append("<form id=\"alipa...
// 构造访问query_timestamp接口的URL串 String strUrl = ALIPAY_GATEWAY_NEW + "service=query_timestamp&partner=" + PARTNER + "&_input_charset" + INPUT_CHARSET; StringBuffer result = new StringBuffer(); SAXReader reader = new SAXReader(); Document doc = reader.read(new URL(strUrl).openStream()); List<Node> nodeList = d...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\utils\alipay\AlipaySubmit.java
2
请完成以下Java代码
public void setMaxContentLogged(int maxContentLogged) { this.maxContentLogged = maxContentLogged; } @Override public void onError(ProducerRecord<K, V> record, @Nullable RecordMetadata recordMetadata, Exception exception) { this.logger.error(exception, () -> { StringBuilder logOutput = new StringBuilder(); ...
} logOutput.append(":"); return logOutput.toString(); }); } private String keyOrValue(Object keyOrValue) { if (keyOrValue instanceof byte[]) { return "byte[" + ((byte[]) keyOrValue).length + "]"; } else { return toDisplayString(ObjectUtils.nullSafeToString(keyOrValue), this.maxContentLogged); }...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\LoggingProducerListener.java
1
请完成以下Java代码
public void setIncrementNo (int IncrementNo) { set_Value (COLUMNNAME_IncrementNo, Integer.valueOf(IncrementNo)); } /** Get Increment. @return The number to increment the last document number by */ public int getIncrementNo () { Integer ii = (Integer)get_Value(COLUMNNAME_IncrementNo); if (ii == null) ...
*/ public String getPrefix () { return (String)get_Value(COLUMNNAME_Prefix); } /** Set Start No. @param StartNo Starting number/position */ public void setStartNo (int StartNo) { set_Value (COLUMNNAME_StartNo, Integer.valueOf(StartNo)); } /** Get Start No. @return Starting number/position */...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_SerNoCtl.java
1
请完成以下Java代码
public void setValue(Object value) { setValueInternal(value); } @SuppressWarnings("unchecked") private <V> void setValueInternal(Object value) { ((ThreadLocalAccessor<V>) this.delegate).setValue((V) value); } @Override public void setValue() { this.delegate.setValue(); } @Override @Deprecated(since = ...
@Override public Object key() { return getClass().getName(); } @Override public @Nullable Object getValue() { return null; } @Override public void setValue(Object value) { } @Override public void setValue() { } @Override public void restore(Object previousValue) { } @Override ...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\execution\SecurityContextThreadLocalAccessor.java
1
请完成以下Java代码
public boolean isActive() { return isActive; } public RejectedJobsHandler getRejectedJobsHandler() { return rejectedJobsHandler; } public void setRejectedJobsHandler(RejectedJobsHandler rejectedJobsHandler) { this.rejectedJobsHandler = rejectedJobsHandler; } protected void startJobAcquisition...
jobAcquisitionThread.join(); } catch (InterruptedException e) { LOG.interruptedWhileShuttingDownjobExecutor(e); } jobAcquisitionThread = null; } public AcquireJobsRunnable getAcquireJobsRunnable() { return acquireJobsRunnable; } public Runnable getExecuteJobsRunnable(List<String> jobIds, Proces...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\JobExecutor.java
1
请完成以下Java代码
public String getPasswd() { return passwd; } /** * @param passwd */ public void setPasswd(String passwd) { this.passwd = passwd == null ? null : passwd.trim(); } /** * @return CREATE_TIME */ public Date getCreateTime() { return createTime; } ...
* @param createTime */ public void setCreateTime(Date createTime) { this.createTime = createTime; } /** * @return STATUS */ public String getStatus() { return status; } /** * @param status */ public void setStatus(String status) { this.statu...
repos\SpringAll-master\27.Spring-Boot-Mapper-PageHelper\src\main\java\com\springboot\bean\User.java
1
请完成以下Java代码
public String toString() { return ObjectUtils.toString(this); } @Override public boolean test(final T item) { if (item == null) { return false; } // Don't accept it if it's explicitelly excluded if (excludes.contains(item)) { return false; } // Accept it right away if it explicitelly inc...
Check.assumeNotNull(itemToInclude, "itemToInclude not null"); final boolean added = includes.add(itemToInclude); // Reset last built, in case of change if (added) { lastBuilt = null; } return this; } public Builder<T> exclude(final T itemToExclude) { // guard against null: tollerate it...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\IncludeExcludeListPredicate.java
1
请完成以下Java代码
public class RfQException extends AdempiereException { private static final long serialVersionUID = -8279948147175847410L; public RfQException(final String message, final Throwable cause) { super(message, cause); } public RfQException(final String message) { super(message); } protected static String buil...
} protected static String buildInfoString(final I_C_RfQResponseLine rfqResponseLine) { if (rfqResponseLine == null) { return "?"; } return new StringBuilder() .append(buildInfoString(rfqResponseLine.getC_RfQResponse())) .append(", @Line@ ").append(rfqResponseLine.getLine()) .toString(); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\exceptions\RfQException.java
1
请完成以下Java代码
public JFrame getOwner() { return (JFrame) super.getOwner(); } /** * Is Accepted * * @return true if accepted */ public final boolean isAccepted() { return m_accept; } // isAccepted /** * Reject License
*/ public final void cmd_reject() { String info = "License rejected or expired"; try { info = s_res.getString("License_rejected"); } catch (Exception e) { } log.error(info); System.exit(10); } // cmd_reject } // IniDialog
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\IniDialog.java
1
请完成以下Java代码
public Builder setTooltipIconName(@Nullable final String tooltipIconName) { this.tooltipIconName = tooltipIconName; return this; } /** * @return true if this field has ORDER BY instructions */ public boolean isDefaultOrderBy() { final DocumentFieldDataBindingDescriptor dataBinding = getDataBin...
} private DeviceDescriptorsProvider getDeviceDescriptorsProvider() { return deviceDescriptorsProvider; } public Builder mainAdFieldId(@Nullable final AdFieldId mainAdFieldId) { this.mainAdFieldId = mainAdFieldId; return this; } @Nullable public AdFieldId getMainAdFieldId() {return mainAdFiel...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentFieldDescriptor.java
1
请完成以下Java代码
public String getProperty(final String name) { final Object value = get(name); return value instanceof String ? value.toString() : null; } public String getProperty(final String name, final String defaultValue) { final String value = getProperty(name); if (value == null) { return defaultValue; } ...
{ throw new RuntimeException(e); } } else { throw new RuntimeException("Invalid object " + value + " for property " + name + " (expected class: " + interfaceClazz + ")"); } } else if (interfaceClazz.isAssignableFrom(value.getClass())) { @SuppressWarnings("unchecked") final T obj = (...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\Context.java
1
请完成以下Java代码
public class FontImpl extends BpmnModelElementInstanceImpl implements Font { protected static Attribute<String> nameAttribute; protected static Attribute<Double> sizeAttribute; protected static Attribute<Boolean> isBoldAttribute; protected static Attribute<Boolean> isItalicAttribute; protected static Attribu...
public void setBold(boolean isBold) { isBoldAttribute.setValue(this, isBold); } public Boolean isItalic() { return isItalicAttribute.getValue(this); } public void setItalic(boolean isItalic) { isItalicAttribute.setValue(this, isItalic); } public Boolean isUnderline() { return isUnderlineA...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\dc\FontImpl.java
1
请在Spring Boot框架中完成以下Java代码
public int getMaxMessageCount() { return this.maxMessageCount; } public void setMaxMessageCount(int maxMessageCount) { this.maxMessageCount = maxMessageCount; } public int getMaxThreads() { return this.maxThreads; } public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; } public i...
this.socketBufferSize = socketBufferSize; } public int getSubscriptionCapacity() { return this.subscriptionCapacity; } public void setSubscriptionCapacity(int subscriptionCapacity) { this.subscriptionCapacity = subscriptionCapacity; } public String getSubscriptionDiskStoreName() { return this.subscriptio...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\CacheServerProperties.java
2
请在Spring Boot框架中完成以下Java代码
public TaskServiceConfiguration setEnableEventDispatcher(boolean enableEventDispatcher) { this.enableEventDispatcher = enableEventDispatcher; return this; } @Override public TaskServiceConfiguration setEventDispatcher(FlowableEventDispatcher eventDispatcher) { this.eventDispatcher =...
@Override public TaskServiceConfiguration setTypedEventListeners(Map<String, List<FlowableEventListener>> typedEventListeners) { this.typedEventListeners = typedEventListeners; return this; } public TaskPostProcessor getTaskPostProcessor() { return taskPostProcessor; } publ...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\TaskServiceConfiguration.java
2
请完成以下Java代码
public class HandleTaskEscalationCmd implements Command<Void>, Serializable{ private static final long serialVersionUID = 1L; protected String taskId; protected String escalationCode; protected Map<String, Object> variables; public HandleTaskEscalationCmd(String taskId, String escalationCode) { this.t...
@Override public Void execute(CommandContext commandContext) { validateInput(); TaskEntity task = commandContext.getTaskManager().findTaskById(taskId); ensureNotNull(NotFoundException.class,"Cannot find task with id " + taskId, "task", task); for(CommandChecker checker : commandContext.getProcessEng...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\HandleTaskEscalationCmd.java
1
请完成以下Java代码
public class LogTrackAspect { private static final Logger logger = TrackLoggerFactory.getLogger(LogTrackAspect.class); @Pointcut("@annotation(com.wlqq.etc.common.log.annotations.LogTrack)") public void pointcut() { } @Around("pointcut()") public Object log(ProceedingJoinPoint joinPoint) throws...
/** * 为每个请求设置唯一标示到MDC容器中 * * @return */ private boolean setMdc() { try {// 设置SessionId if (StringUtils.isEmpty(MDC.get(MdcConstant.REQUEST_KEY))) { String sessionId = UUID.randomUUID().toString(); String requestId = UUID.randomUUID().toString()...
repos\spring-boot-student-master\spring-boot-student-log\src\main\java\com\xiaolyuh\aspect\LogTrackAspect.java
1
请完成以下Java代码
public void saveConstraints() { final Thread callingThread = Thread.currentThread(); try (final CloseableReentrantLock lock = thread2TrxConstraintLock.open()) { final ITrxConstraints constraints = getConstraints(callingThread); // make sure that there is at least one instance if (isDisabled(constraints)) ...
Check.assume(!stack.isEmpty(), "Stack for thread " + callingThread + " is not empty"); if (stack.size() <= 1) { // there is only the current constraint instance, but no saved instance. // Consequently there is nothing to restore. return; } stack.pop(); } } @Override public boolean isDisab...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\util\trxConstraints\api\impl\TrxConstraintsBL.java
1
请完成以下Java代码
public void setUPC (String UPC) { set_ValueNoCheck (COLUMNNAME_UPC, UPC); } /** Get UPC/EAN. @return Bar Code (Universal Product Code or its superset European Article Number) */ public String getUPC () { return (String)get_Value(COLUMNNAME_UPC); } /** Set Search Key. @param Value Search key for ...
{ return (String)get_Value(COLUMNNAME_Value); } /** Set Warehouse. @param WarehouseName Warehouse Name */ public void setWarehouseName (String WarehouseName) { set_ValueNoCheck (COLUMNNAME_WarehouseName, WarehouseName); } /** Get Warehouse. @return Warehouse Name */ public String getWarehouseN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_RV_WarehousePrice.java
1
请在Spring Boot框架中完成以下Java代码
public UnitType getTargetUnit() { return targetUnit; } /** * Sets the value of the targetUnit property. * * @param value * allowed object is * {@link UnitType } * */ public void setTargetUnit(UnitType value) { this.targetUnit = value; } ...
* This is why there is not a <CODE>set</CODE> method for the baseUnitArticleNumber property. * * <p> * For example, to add a new item, do as follows: * <pre> * getBaseUnitArticleNumber().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allow...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\UnitConversionType.java
2
请在Spring Boot框架中完成以下Java代码
public Flux<Instance> getInstances() { return repository.findAll().filter(filter::filter); } /** * Get a list of all registered application instances that satisfy the filter. * @param name the name to search for. * @return list of instances for the given application that satisfy the filter. */ public Flux...
* @return a Mono with the Instance. */ public Mono<Instance> getInstance(InstanceId id) { return repository.find(id).filter(filter::filter); } /** * Remove a specific instance from services * @param id the instances id to unregister * @return the id of the unregistered instance */ public Mono<InstanceI...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\services\InstanceRegistry.java
2
请在Spring Boot框架中完成以下Java代码
public class UserController { // ========== 使用通用的 ReactiveRedisTemplate 的方式 ========== @Autowired private ReactiveRedisTemplate<String, Object> commonRedisTemplate; /** * 获得指定用户编号的用户 * * @param id 用户编号 * @return 用户 */ @GetMapping("/get") public Mono<UserCacheObject> g...
@GetMapping("/v2/get") public Mono<UserCacheObject> getV2(@RequestParam("id") Integer id) { String key = genKeyV2(id); return userRedisTemplate.opsForValue().get(key); } /** * 设置指定用户的信息 * * @param user 用户 * @return 是否成功 */ @PostMapping("/v2/set") public Mono...
repos\SpringBoot-Labs-master\lab-27\lab-27-webflux-redis\src\main\java\cn\iocoder\springboot\lab27\springwebflux\controller\UserController.java
2
请完成以下Java代码
private DocumentFilterDescriptor createIsVendorFilterDescriptor() { return DocumentFilterDescriptor.builder() .setFilterId(FILTERID_IsVendor) .setFrequentUsed(true) .addParameter(DocumentFilterParamDescriptor.builder() .fieldName(PARAM_IsVendor) .displayName(Services.get(IMsgBL.class).transla...
} public DocumentFilterList extractFilters(@NonNull final JSONFilterViewRequest filterViewRequest) { return filterViewRequest.getFiltersUnwrapped(getFilterDescriptorsProvider()); } public DocumentFilterList extractFilters(@NonNull final CreateViewRequest request) { return request.isUseAutoFilters() ? get...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\view\PricingConditionsViewFilters.java
1
请完成以下Java代码
public final UOMType getQtyUOMTypeOrNull() { final I_M_HU hu = getM_HU(); final IHUStorageDAO huStorageDAO = getHUStorageDAO(); return huStorageDAO.getC_UOMTypeOrNull(hu); } @Override public final BigDecimal getStorageQtyOrZERO() { final IHUStorageFactory huStorageFactory = getAttributeStorageFactory().ge...
{ return handlingUnitsBL.isVirtual(getM_HU()); } @Override public Optional<WarehouseId> getWarehouseId() { final I_M_HU hu = getM_HU(); if (hu == null) { return Optional.empty(); } final WarehouseId warehouseId = IHandlingUnitsBL.extractWarehouseIdOrNull(hu); return Optional.ofNullable(warehouseI...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\AbstractHUAttributeStorage.java
1
请完成以下Java代码
public void execute() { execute(true); } @Override public Batch executeAsync() { return commandExecutor.execute(new ProcessInstanceModificationBatchCmd(this)); } public CommandExecutor getCommandExecutor() { return commandExecutor; } public ProcessInstanceQuery getProcessInstanceQuery() { ...
public List<AbstractProcessInstanceModificationCommand> getInstructions() { return instructions; } public void setInstructions(List<AbstractProcessInstanceModificationCommand> instructions) { this.instructions = instructions; } public boolean isSkipCustomListeners() { return skipCustomListeners; ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ModificationBuilderImpl.java
1
请完成以下Java代码
public static void pushOperationUsingDocument() { MongoDatabase database = mongoClient.getDatabase(databaseName); MongoCollection<Document> collection = database.getCollection(testCollectionName); Document item = new Document().append("itemName", "PIZZA MANIA") .append("quantity", ...
// Push document into the array using DBObject // pushOperationUsingDBObject(); // // Push document into the array using Document. // pushOperationUsingDocument(); // // Push document into the array using addToSet operator. // addToSetO...
repos\tutorials-master\persistence-modules\java-mongodb-2\src\main\java\com\baeldung\mongo\PushOperations.java
1
请完成以下Java代码
private void generateInvoicesForAsyncBatch(@NonNull final Set<InvoiceCandidateId> invoiceCandIds) { final AsyncBatchId asyncBatchId = asyncBatchBL.newAsyncBatch(C_Async_Batch_InternalName_InvoiceCandidate_Processing); final PInstanceId invoiceCandidatesSelectionId = DB.createT_Selection(invoiceCandIds, Trx.TRXNAM...
final Supplier<IEnqueueResult> enqueueInvoiceCandidates = () -> enqueuer .enqueueSelection(invoiceCandidatesSelectionId); asyncBatchService.executeBatch(enqueueInvoiceCandidates, asyncBatchId); } @NonNull private IInvoicingParams createDefaultIInvoicingParams() { final PlainInvoicingParams invoicingParams...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoice\InvoiceService.java
1
请完成以下Java代码
public void updateQtyEnteredTU(final I_C_Invoice_Candidate ic) { final Set<Integer> seenIOLs = new HashSet<>(); final BigDecimal qtyEnteredTU; if (TableRecordCacheLocal.isChildModelType(ic, I_M_InOutLine.class)) // if it's 1-to-1 with shipment line, use the Record_ID { final I_M_InOutLine iol = TableRecor...
final BigDecimal olQtyEnteredTU = ol.getQtyEnteredTU(); if (olQtyEnteredTU != null) // safety { qtyEnteredTU = olQtyEnteredTU; } } for (final I_M_InOutLine iol : iols) { // // Just to be safe and prevent a possible bug, make sure the IOL IDs are unique final int iolId = iol.getM_InOutLine_I...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\model\validator\C_Invoice_Candidate.java
1
请完成以下Java代码
public static DaysOfMonthExploder of(final int... days) { return of(Arrays.stream(days).boxed().collect(ImmutableSet.toImmutableSet())); } public static final DaysOfMonthExploder LAST_DAY = new DaysOfMonthExploder(ImmutableSet.of(31)); private final ImmutableSet<Integer> days; public DaysOfMonthExploder(final...
@Override public Set<LocalDateTime> explodeBackward(final LocalDateTime date) { return days.stream() .map(day -> withDayOfMonth(date, day)) .filter(dayDate -> dayDate.compareTo(date) <= 0) // Skip all dates which are after our given date .collect(ImmutableSet.toImmutableSet()); } private static final...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\time\generator\DaysOfMonthExploder.java
1
请完成以下Java代码
public static Map<String, Object> singletonMap(String key, Object value) { Map<String, Object> map = new HashMap<>(); map.put(key, value); return map; } /** * Helper method to easily create a map with keys of type String and values of type Object. Null values are allowed. * ...
"key at index " + keyIndex + " should be a String but is a " + key.getClass() ); } if (value != null && !clazz.isInstance(value)) { throw new ActivitiIllegalArgumentException( "value at index " + valueIndex + " should be a " + clazz + " but is ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\CollectionUtil.java
1
请完成以下Java代码
public class CustomP6SpyLogger implements MessageFormattingStrategy { // 重置颜色 private static final String RESET = "\u001B[0m"; // 红色 private static final String RED = "\u001B[31m"; // 绿色 private static final String GREEN = "\u001B[32m"; /** * 格式化 sql * @param connectionId 连接id ...
* @param url 数据库连接url * @return 格式化后的sql */ @Override public String formatMessage(int connectionId, String now, long elapsed, String category, String prepared, String sql, String url) { // 去掉换行和多余空格 if(StrUtil.isNotBlank(sql)){ sql = sql.replaceAll("\\s+", " ").trim(); ...
repos\eladmin-master\eladmin-common\src\main\java\me\zhengjie\config\CustomP6SpyLogger.java
1
请完成以下Java代码
public class ProcessExtensionResourceReader implements ResourceReader<ProcessExtensionModel> { private final ObjectMapper objectMapper; private final Map<String, VariableType> variableTypeMap; public ProcessExtensionResourceReader(ObjectMapper objectMapper, Map<String, VariableType> variableTypeMap) { ...
*/ private ProcessExtensionModel convertJsonVariables(ProcessExtensionModel processExtensionModel) { if ( processExtensionModel != null && processExtensionModel.getAllExtensions() != null && processExtensionModel.getAllExtensions().size() > 0 ) { for (...
repos\Activiti-develop\activiti-core\activiti-spring-process-extensions\src\main\java\org\activiti\spring\process\ProcessExtensionResourceReader.java
1
请完成以下Java代码
public void setTextMsg (java.lang.String TextMsg) { set_Value (COLUMNNAME_TextMsg, TextMsg); } /** Get Mitteilung. @return Text Message */ @Override public java.lang.String getTextMsg () { return (java.lang.String)get_Value(COLUMNNAME_TextMsg); } /** Set Titel. @param Title Name this entity is ...
@Override public void setTitle (java.lang.String Title) { set_Value (COLUMNNAME_Title, Title); } /** Get Titel. @return Name this entity is referred to as */ @Override public java.lang.String getTitle () { return (java.lang.String)get_Value(COLUMNNAME_Title); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Attachment.java
1
请完成以下Java代码
public class EmbedStoreConfigBean { public static final String PREFIX = "jeecg.airag.embed-store"; /** * host */ private String host = "127.0.0.1"; /** * 端口 */ private int port = 5432; /** * 数据库 */ private String database = "postgres";
/** * 用户名 */ private String user = "postgres"; /** * 密码 */ private String password = "postgres"; /** * 存储向量的表 */ private String table = "embeddings"; }
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-module\jeecg-boot-module-airag\src\main\java\org\jeecg\modules\airag\llm\config\EmbedStoreConfigBean.java
1
请完成以下Java代码
public void applyTo(ProcessInstanceModificationBuilder builder, ProcessEngine engine, ObjectMapper mapper) { checkValidity(); ProcessInstanceModificationInstantiationBuilder activityBuilder = null; if (ancestorActivityInstanceId != null) { activityBuilder = builder.startTransition(transitionId, ance...
checkValidity(); builder.startTransition(transitionId); if (builder instanceof ProcessInstantiationBuilder) { applyVariables((ProcessInstantiationBuilder) builder, engine, mapper); } } protected void checkValidity() { if (transitionId == null) { throw new InvalidRequestException(Status...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\modification\StartTransitionInstructionDto.java
1
请完成以下Java代码
public void updateBusinessStatus(String caseInstanceId, String businessStatus) { commandExecutor.execute(new SetCaseInstanceBusinessStatusCmd(caseInstanceId, businessStatus)); } public void changePlanItemState(ChangePlanItemStateBuilderImpl changePlanItemStateBuilder) { commandExecutor.execute(...
return new CaseInstanceStartEventSubscriptionModificationBuilderImpl(this); } @Override public CaseInstanceStartEventSubscriptionDeletionBuilder createCaseInstanceStartEventSubscriptionDeletionBuilder() { return new CaseInstanceStartEventSubscriptionDeletionBuilderImpl(this); } public Even...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CmmnRuntimeServiceImpl.java
1
请完成以下Java代码
private static ArrayList<String> retrieveActiveProfilesFromSysConfig() { return new ArrayList<>(Services .get(ISysConfigBL.class) .getValuesForPrefix(SYSCONFIG_PREFIX_WEBUI_SPRING_PROFILES_ACTIVE, ClientAndOrgId.SYSTEM) .values()); } @Bean @Primary public ObjectMapper jsonObjectMapper() { return ...
final AbstractHttp11Protocol<?> httpProtocol = (AbstractHttp11Protocol<?>)connector.getProtocolHandler(); httpProtocol.setCompression("on"); httpProtocol.setCompressionMinSize(256); final String mimeTypes = httpProtocol.getCompressibleMimeType(); final String mimeTypesWithJson = mimeTypes + "," + MediaType....
repos\metasfresh-new_dawn_uat\backend\metasfresh-webui-api\src\main\java\de\metas\ui\web\WebRestApiApplication.java
1
请完成以下Java代码
public HUEditorRowId toTopLevelRowId() { if (isTopLevel()) { return this; } final HuId huId = getTopLevelHUId(); final ProductId storageProductId = null; final HuId topLevelHUId = null; final String json = null; final DocumentId documentId = null; return new HUEditorRowId(huId, storageProductId, ...
public HuId getTopLevelHUId() { if (topLevelHUId != null) { return topLevelHUId; } return huId; } public ProductId getStorageProductId() { return storageProductId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorRowId.java
1
请完成以下Java代码
public boolean isService(ServiceType serviceType) { return serviceTypes.contains(serviceType); } @Override public ServiceInfo generateNewServiceInfoWithCurrentSystemInfo() { ServiceInfo.Builder builder = ServiceInfo.newBuilder() .setServiceId(serviceId) .addA...
this.ready = ready; return changed; } private TransportProtos.SystemInfoProto getCurrentSystemInfoProto() { TransportProtos.SystemInfoProto.Builder builder = TransportProtos.SystemInfoProto.newBuilder(); getCpuUsage().ifPresent(builder::setCpuUsage); getMemoryUsage().ifPresent(...
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\discovery\DefaultTbServiceInfoProvider.java
1
请完成以下Java代码
public int getSeqNo() { return 0; } /** * Change {@link I_C_OLCand#COLUMN_IsError IsError}, {@link I_C_OLCand#COLUMN_ErrorMsg ErrorMsg}, * {@link I_C_OLCand#COLUMNNAME_AD_Issue_ID ADIssueID} accordingly, but <b>do not</b> save. */ @Override public void validate(@NonNull final I_C_OLCand olCand) ...
olCand.setIsError(true); olCand.setErrorMsg(me.getLocalizedMessage()); final AdIssueId issueId = errorManager.createIssue(e); olCand.setAD_Issue_ID(issueId.getRepoId()); olCand.setErrorMsgJSON(JsonObjectMapperHolder.toJsonNonNull(JsonErrorItem.builder() .message(me.getLocalizedMessage()) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\OLCandSPIRegistry.java
1
请完成以下Java代码
public final Stream<T> streamByIds(@NonNull final DocumentIdsSelection rowIds) { if (rowIds.isAll()) { return getRows().stream(); } else if (rowIds.isEmpty()) { return Stream.empty(); } else { return rowIds.stream().map(rowsData::getByIdOrNull).filter(Objects::nonNull); } } public final S...
protected boolean isEligibleInvalidateEvent(final TableRecordReference recordRef) { return true; } protected final DocumentIdsSelection getDocumentIdsToInvalidate(@NonNull final TableRecordReferenceSet recordRefs) { return rowsData.getDocumentIdsToInvalidate(recordRefs); } // extends IEditableView.patchView...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\template\AbstractCustomView.java
1
请完成以下Java代码
public void handleFailure(ExternalTaskFailureDto dto) { ExternalTaskService externalTaskService = engine.getExternalTaskService(); try { externalTaskService.handleFailure(externalTaskId, dto.getWorkerId(), dto.getErrorMessage(), dto.getErrorDetails(), dto.getRetrie...
public void extendLock(ExtendLockOnExternalTaskDto extendLockDto) { ExternalTaskService externalTaskService = engine.getExternalTaskService(); try { externalTaskService.extendLock(externalTaskId, extendLockDto.getWorkerId(), extendLockDto.getNewDuration()); } catch (NotFoundException e) { throw...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\externaltask\impl\ExternalTaskResourceImpl.java
1
请完成以下Java代码
public class C_Invoice_Clearing_Alloc { /** * If there is a <code>C_Flatrate_DataEntry </code> record for the given <code>ica</code>'s candidate and term, then retrieve and reference it. */ @ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW }) public void linkToFlatrateDataEntryIfExists(final I_C_Invoice_Cl...
invoiceCand.getDateOrdered(), X_C_Flatrate_DataEntry.TYPE_Invoicing_PeriodBased, UomId.ofRepoIdOrNull(term.getC_UOM_ID()), true); // onlyNonSim final I_C_Flatrate_DataEntry dataEntry; if (entries.isEmpty()) { dataEntry = null; } else { dataEntry = entries.get(0); Check.assume(ent...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\interceptor\C_Invoice_Clearing_Alloc.java
1
请在Spring Boot框架中完成以下Java代码
public boolean shouldIgnoreNextImportTimestamp(@NonNull final JsonExternalSystemRequest externalSystemRequest) { final String orderId = externalSystemRequest.getParameters().get(ExternalSystemConstants.PARAM_ORDER_ID); final String orderNo = externalSystemRequest.getParameters().get(ExternalSystemConstants.PARAM_O...
final String orderId = request.getParameters().get(ExternalSystemConstants.PARAM_ORDER_ID); if (Check.isNotBlank(orderId)) { getSpecificOrderQuery.add(buildEqualsJsonQuery(FIELD_ORDER_ID, orderId)); } final String orderNo = request.getParameters().get(ExternalSystemConstants.PARAM_ORDER_NO); if (Check.isN...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\order\OrderQueryHelper.java
2
请完成以下Java代码
private static MaterialDispoGroupId getMaterialDispoGroupId(final @NonNull I_DD_Order ddOrderRecord) { return ATTR_DDORDER_REQUESTED_EVENT_GROUP_ID.getValue(ddOrderRecord); } @Nullable private ProductPlanning getProductPlanning(final @NonNull I_DD_Order ddOrderRecord) { final ProductPlanningId productPlanning...
{ final DistributionNetworkLine distributionNetworkLine = extractDistributionNetworkAndLineId(lineRecord) .map(distributionNetworkRepository::getLineById) .orElse(null); final int durationDays = DDOrderUtil.calculateDurationDays(productPlanning, distributionNetworkLine); final Instant supplyDate = extrac...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddorder\lowlevel\interceptor\DDOrderLoader.java
1
请完成以下Java代码
private ProductsProposalRowsData loadRowsData(final CreateViewRequest request) { final TableRecordReference recordRef = getRecordReference(request); return createRowsLoaderFromRecord(recordRef) .load(); } private TableRecordReference getRecordReference(final CreateViewRequest request) { final TableRecord...
@Override public final void closeById(@NonNull final ViewId viewId, @NonNull final ViewCloseAction closeAction) { beforeViewClose(viewId, closeAction); views.invalidate(viewId); views.cleanUp(); } protected void beforeViewClose(@NonNull final ViewId viewId, @NonNull final ViewCloseAction closeAction) { /...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\view\ProductsProposalViewFactoryTemplate.java
1
请完成以下Java代码
public void setExternalSystemValue (final String ExternalSystemValue) { set_Value (COLUMNNAME_ExternalSystemValue, ExternalSystemValue); } @Override public String getExternalSystemValue() { return get_ValueAsString(COLUMNNAME_ExternalSystemValue); } @Override public void setIsAutoSendWhenCreatedByUserGrou...
public String getRemoteURL() { return get_ValueAsString(COLUMNNAME_RemoteURL); } @Override public void setRouting_Key (final String Routing_Key) { set_Value (COLUMNNAME_Routing_Key, Routing_Key); } @Override public String getRouting_Key() { return get_ValueAsString(COLUMNNAME_Routing_Key); } @Overri...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_RabbitMQ_HTTP.java
1
请完成以下Java代码
public void setCamundaTopic(String camundaTopic) { camundaTopicAttribute.setValue(this, camundaTopic); } public String getCamundaType() { return camundaTypeAttribute.getValue(this); } public void setCamundaType(String camundaType) { camundaTypeAttribute.setValue(this, camundaType); } public S...
@Override public String getCamundaMapDecisionResult() { return camundaMapDecisionResultAttribute.getValue(this); } @Override public void setCamundaMapDecisionResult(String camundaMapDecisionResult) { camundaMapDecisionResultAttribute.setValue(this, camundaMapDecisionResult); } public String getCam...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\BusinessRuleTaskImpl.java
1
请完成以下Java代码
public String getPath() { return this.path; } /** * Returns the name of the variable used to catch all remaining path segments or * {@code null}. * @return the variable name * @since 2.2.0 */ public @Nullable String getMatchAllRemainingPathSegmentsVariable() { return this.matchAllRemainingPathSegments...
result = result && this.consumes.equals(other.consumes); result = result && this.httpMethod == other.httpMethod; result = result && this.canonicalPath.equals(other.canonicalPath); result = result && this.produces.equals(other.produces); return result; } @Override public int hashCode() { final int prime = ...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\web\WebOperationRequestPredicate.java
1
请在Spring Boot框架中完成以下Java代码
public SecurityContextConfigurer<H> securityContextRepository(SecurityContextRepository securityContextRepository) { getBuilder().setSharedObject(SecurityContextRepository.class, securityContextRepository); return this; } public SecurityContextConfigurer<H> requireExplicitSave(boolean requireExplicitSave) { th...
if (this.requireExplicitSave) { SecurityContextHolderFilter securityContextHolderFilter = postProcess( new SecurityContextHolderFilter(securityContextRepository)); securityContextHolderFilter.setSecurityContextHolderStrategy(getSecurityContextHolderStrategy()); http.addFilter(securityContextHolderFilter);...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\SecurityContextConfigurer.java
2
请完成以下Java代码
public Document importXMLDocument(final StringBuilder result, final Document documentToBeImported, final String trxName) { final String xmlRequestStr = XMLHelper.createStringFromDOMNode(documentToBeImported); if (xmlRequestStr == null) { return null; } final Object xmlRequest = createXMLObject(xmlRequest...
{ this.jaxbObjectFactory = jaxbObjectFactory; } private Object createXMLObject(final String xml) { try { final Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); final Source source = createXMLSourceFromString(xml); final JAXBElement<?> jaxbElement = (JAXBElement<?>)unmarshaller.unmarshal(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\server\rpl\api\impl\MockedImportHelper.java
1
请完成以下Java代码
private Set<HUToReturn> getHUsToReturn() { Check.assumeNotEmpty(_husToReturn, "husToReturn is not empty"); return _husToReturn; } public List<I_M_HU> getHUsReturned() { return _husToReturn.stream().map(HUToReturn::getHu).collect(Collectors.toList()); } public VendorReturnsInOutProducer addHUToReturn(@NonN...
return this; } @Value private static final class HUToReturn { private @NonNull final I_M_HU hu; private final int originalReceiptInOutLineId; private int getM_HU_ID() { return hu.getM_HU_ID(); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\returns\vendor\VendorReturnsInOutProducer.java
1
请在Spring Boot框架中完成以下Java代码
public class BankStatementListenerService implements IBankStatementListenerService { private static final Logger logger = LogManager.getLogger(BankStatementListenerService.class); private final CompositeBankStatementListener listeners = new CompositeBankStatementListener(); @Override public void addListener(@NonNu...
{ if (payments.isEmpty()) { return; } listeners.onPaymentsLinked(payments); } @Override public void firePaymentsUnlinkedFromBankStatementLineReferences(@NonNull BankStatementLineReferenceList lineRefs) { listeners.onPaymentsUnlinkedFromBankStatementLineReferences(lineRefs); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\service\impl\BankStatementListenerService.java
2
请完成以下Java代码
public java.lang.String getBackupValue () { return (java.lang.String)get_Value(COLUMNNAME_BackupValue); } /** Set Spaltenname. @param ColumnName Name der Spalte in der Datenbank */ @Override public void setColumnName (java.lang.String ColumnName) { set_Value (COLUMNNAME_ColumnName, ColumnName); } ...
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set New Value. @param NewValue New field value */ @Override public void setNewValue (java.lang.String NewValue) { set_Value (COLUMNNAME_NewValue, NewValue); } /** Get New Value. ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\ad\migration\model\X_AD_MigrationData.java
1
请完成以下Java代码
public void setGL_BudgetControl_ID (int GL_BudgetControl_ID) { if (GL_BudgetControl_ID < 1) set_ValueNoCheck (COLUMNNAME_GL_BudgetControl_ID, null); else set_ValueNoCheck (COLUMNNAME_GL_BudgetControl_ID, Integer.valueOf(GL_BudgetControl_ID)); } /** Get Budget Control. @return Budget Control */ pub...
/** Get Before Approval. @return The Check is before the (manual) approval */ public boolean isBeforeApproval () { Object oo = get_Value(COLUMNNAME_IsBeforeApproval); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false;...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_GL_BudgetControl.java
1
请在Spring Boot框架中完成以下Java代码
public ImmutableList<ExternalProjectReference> getByExternalSystemType(@NonNull final ExternalSystemType externalSystemType) { final ExternalSystem externalSystem = externalSystemRepository.getByType(externalSystemType); return queryBL.createQueryBuilder(I_S_ExternalProjectReference.class) .addOnlyActiveRecord...
{ final I_S_ExternalProjectReference record = InterfaceWrapperHelper.load(externalProjectReferenceId, I_S_ExternalProjectReference.class); return buildExternalProjectReference(record); } @NonNull private ExternalProjectReference buildExternalProjectReference(@NonNull final I_S_ExternalProjectReference record) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\external\project\ExternalProjectRepository.java
2
请完成以下Java代码
public static String getEndDateFromConfiguration(String jobHandlerConfiguration) { try { JsonNode cfgJson = readJsonValue(jobHandlerConfiguration); JsonNode endDateNode = cfgJson.get(PROPERTYNAME_END_DATE_EXPRESSION); if (endDateNode != null) { return endDateN...
return CommandContextUtil.getProcessEngineConfiguration().getObjectMapper().createObjectNode(); } protected static ObjectNode readJsonValueAsObjectNode(String config) throws JacksonException { return (ObjectNode) readJsonValue(config); } protected static JsonNode readJsonValue(String c...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\jobexecutor\TimerEventHandler.java
1
请完成以下Java代码
public List<String> shortcutFieldOrder() { return Arrays.asList("isGolden","customerIdCookie"); } @Override public Predicate<ServerWebExchange> apply(Config config) { return (ServerWebExchange t) -> { List<HttpCookie> cookies = t.getRequest() .getCookies()...
public Config() {} public Config( boolean isGolden, String customerIdCookie) { this.isGolden = isGolden; this.customerIdCookie = customerIdCookie; } public boolean isGolden() { return isGolden; } public void setGolden...
repos\tutorials-master\spring-cloud-modules\spring-cloud-bootstrap\spring-cloud-gateway-intro\src\main\java\com\baeldung\springcloudgateway\custompredicates\factories\GoldenCustomerRoutePredicateFactory.java
1
请完成以下Java代码
public void checkAvailabilityAsync(@NonNull final PurchaseCandidatesAvailabilityRequest request, @NonNull final AvailabilityCheckCallback callback) { newAvailabilityCheckCommand(request).checkAvailabilityAsync(callback); } private AvailabilityCheckCommand newAvailabilityCheckCommand(final PurchaseCandidatesAvaila...
qtyToPurchase.toBigDecimal().max(ONE), // check availability for at least one, even if qtyToPurchase is still zero qtyToPurchase.getUOMId()); return AvailabilityRequestItem.builder() .trackingId(trackingId) .productAndQuantity(productAndQuantity) .purchaseCandidateId(PurchaseCandidateId.getRepoIdOr(p...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\availability\AvailabilityCheckService.java
1
请完成以下Java代码
public <X extends Throwable> T orElseThrow(Supplier<? extends X> exceptionSupplier) throws X { if (this.value == null) { throw exceptionSupplier.get(); } return this.value; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getCla...
} @Override public int hashCode() { return ObjectUtils.nullSafeHashCode(this.value); } @SuppressWarnings("unchecked") static <T> BindResult<T> of(@Nullable T value) { if (value == null) { return (BindResult<T>) UNBOUND; } return new BindResult<>(value); } }
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\bind\BindResult.java
1
请完成以下Java代码
public java.lang.String getI_IsImported () { return (java.lang.String)get_Value(COLUMNNAME_I_IsImported); } /** Set Import Postal Data. @param I_Postal_ID Import Postal Data */ @Override public void setI_Postal_ID (int I_Postal_ID) { if (I_Postal_ID < 1) set_ValueNoCheck (COLUMNNAME_I_Postal_ID, nul...
{ set_Value (COLUMNNAME_RegionName, RegionName); } /** Get Region. @return Name der Region */ @Override public java.lang.String getRegionName () { return (java.lang.String)get_Value(COLUMNNAME_RegionName); } /** Set Gültig ab. @param ValidFrom Gültig ab inklusiv (erster Tag) */ @Override pu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Postal.java
1
请在Spring Boot框架中完成以下Java代码
public class DeleteProcessInstanceBatchConfiguration extends BatchConfiguration { protected String deleteReason; protected boolean skipCustomListeners; protected boolean skipSubprocesses; protected boolean skipIoMappings; public DeleteProcessInstanceBatchConfiguration(List<String> ids, DeploymentMappings ma...
} public boolean isSkipSubprocesses() { return skipSubprocesses; } public void setSkipSubprocesses(boolean skipSubprocesses) { this.skipSubprocesses = skipSubprocesses; } public boolean isSkipIoMappings() { return skipIoMappings; } public void setSkipIoMappings(boolean skipIoMappings) { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\deletion\DeleteProcessInstanceBatchConfiguration.java
2
请完成以下Java代码
private TypeOfDestCountry getTypeOfDestCountry(@NonNull final CountryId countryId, @Nullable final CountryId toCountryId) { final TypeOfDestCountry typeOfDestCountry; if (countryId.equals(toCountryId)) { typeOfDestCountry = DOMESTIC; } else if (toCountryId == null) { return null; } else { fi...
} final I_C_BPartner_Location bpartnerLocation = bPartnerDAO.getBPartnerLocationByIdEvenInactive(bpartnerLocationId.getBpartnerLocationId()); if (bpartnerLocation == null) { throw new AdempiereException("No location found for bpartnerLocationId: " + bpartnerLocationId); } return locationDAO.getCountryIdB...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\tax\api\impl\TaxDAO.java
1
请完成以下Java代码
public void setText(String html) { this.editor.setText(html); } public void setCaretPosition(int position) { this.editor.setCaretPosition(position); } public ActionMap getEditorActionMap() { return this.editor.getActionMap(); }
public InputMap getEditorInputMap(int condition) { return this.editor.getInputMap(condition); } public Keymap getEditorKeymap() { return this.editor.getKeymap(); } public JTextComponent getTextComponent() { return this.editor; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\net\sf\memoranda\ui\htmleditor\HTMLEditor.java
1
请完成以下Java代码
public ModelQuery modelWithoutTenantId() { this.withoutTenantId = true; return this; } // sorting //////////////////////////////////////////// public ModelQuery orderByModelCategory() { return orderBy(ModelQueryProperty.MODEL_CATEGORY); } public ModelQuery orderByModelId()...
return name; } public String getNameLike() { return nameLike; } public Integer getVersion() { return version; } public String getCategory() { return category; } public String getCategoryLike() { return categoryLike; } public String getCategory...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\ModelQueryImpl.java
1
请完成以下Java代码
public void addStringParameter(String name, String value) { addParameter(name, value, Types.VARCHAR, "VARCHAR"); } public void addDoubleParameter(String name, double value) { addParameter(name, value, Types.DOUBLE, "DOUBLE"); } public void addLongParameter(String name, long value) { ...
this.type = type; this.name = name; } } public TenantId getTenantId() { return securityCtx.getTenantId(); } public CustomerId getCustomerId() { return securityCtx.getCustomerId(); } public EntityType getEntityType() { return securityCtx.getEntityTyp...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\query\SqlQueryContext.java
1
请在Spring Boot框架中完成以下Java代码
public void releaseAllReservations(@NonNull final PickingJob pickingJob) { final ImmutableSet<HUReservationDocRef> reservationDocRefs = pickingJob .getLines().stream() .flatMap(line -> line.getSteps().stream()) .map(step -> HUReservationDocRef.ofPickingJobStepId(step.getId())) .collect(ImmutableSet.t...
{ return getHUProductStorage(huId, productId) .map(IHUProductStorage::getQty) .map(Quantity::isPositive) .orElse(false); } private Optional<IHUProductStorage> getHUProductStorage(final @NotNull HuId huId, final @NotNull ProductId productId) { final I_M_HU hu = handlingUnitsBL.getById(huId); final...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\external\hu\PickingJobHUService.java
2
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .omitNullValues() .add("filename", filename) .add("uri", uri) .add("content.size", content != null ? content.length : null) .toString(); } @JsonIgnore public DataSource createDataSource() { if (uri != null) {
try { return new URLDataSource(uri.toURL()); } catch (final MalformedURLException ex) { throw new AdempiereException("@Invalid@ @URL@: " + uri, ex); } } else { return ByteArrayBackedDataSource.of(filename, content); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\email\EMailAttachment.java
1
请完成以下Java代码
public void beforeSave(final I_C_UOM_Conversion uomConversion, final ModelChangeType changeType) { if (uomConversion.getC_UOM_ID() == uomConversion.getC_UOM_To_ID()) { throw new AdempiereException("@C_UOM_ID@ = @C_UOM_To_ID@"); } // // Nothing to convert if (uomConversion.getMultiplyRate().signum() <= ...
{ final UomId fromUomId = UomId.ofRepoId(uomConversion.getC_UOM_ID()); final UomId productStockingUomId = Services.get(IProductBL.class).getStockUOMId(productId); if (!productStockingUomId.equals(fromUomId)) { final I_C_UOM uom = Services.get(IUOMDAO.class).getById(productStockingUomId); throw...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\uom\interceptor\C_UOM_Conversion.java
1
请完成以下Java代码
protected boolean isHeldExclusively() { // 如果货物到锁,当前线程独占 return getState() == 1; } // 返回一个Condition,每个condition都包含了一个condition队列 Condition newCondition() { return new ConditionObject(); } } // 仅需要将操作代理到Sync上即可 private final Sync sync = ne...
@Override public Condition newCondition() { return sync.newCondition(); } public static void main(String[] args) { MutexLock lock = new MutexLock(); final User user = new User(); for (int i = 0; i < 100; i++) { new Thread(() -> { lock.lock(); ...
repos\spring-boot-student-master\spring-boot-student-concurrent\src\main\java\com\xiaolyuh\MutexLock.java
1
请完成以下Java代码
public Map<String, Dependency> getRequestedDependencies() { return Collections.unmodifiableMap(this.requestedDependencies); } @Override public String getGroupId() { return this.groupId; } /** * Sets the group id. * @param groupId the group id */ public void setGroupId(String groupId) { this.groupId ...
} @Override public String getApplicationName() { return this.applicationName; } /** * Sets the application name. * @param applicationName the application name */ public void setApplicationName(String applicationName) { this.applicationName = applicationName; } @Override public String getPackageName...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\project\MutableProjectDescription.java
1
请完成以下Java代码
public String getName() { return this.name; } @Override public Class<?> getOutputType() { return this.outputType; } @Override public String getDescription() { return this.description; } @Override public List<JmxOperationParameter> getParameters() { return this.parameters; } @Override protected v...
} result.append(":").append(this.type); return result.toString(); } } /** * Utility to convert to JMX supported types. */ private static final class JmxType { static Class<?> get(Class<?> source) { if (source.isEnum()) { return String.class; } if (Date.class.isAssignableFrom(source) || ...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\jmx\annotation\DiscoveredJmxOperation.java
1
请完成以下Java代码
public class Documents_EnqueueNotPosted extends JavaProcess { private final transient AcctDocRegistry docFactory = Adempiere.getBean(AcctDocRegistry.class); private final transient IPostingService postingService = Services.get(IPostingService.class); @Override @RunOutOfTrx protected String doIt() { for (final ...
enqueueDocument(docTableName, recordId); countEnqueued++; } if (countEnqueued > 0) { addLog("{}: enqueued {} documents", docTableName, countEnqueued); } } catch (final SQLException ex) { addLog("{}: failed fetching IDs. Check log.", docTableName); log.warn("Failed fetching IDs: \n SQL={...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\process\Documents_EnqueueNotPosted.java
1
请在Spring Boot框架中完成以下Java代码
BuildProperties buildProperties() throws Exception { return new BuildProperties( loadFrom(this.properties.getBuild().getLocation(), "build", this.properties.getBuild().getEncoding())); } protected Properties loadFrom(Resource location, String prefix, Charset encoding) throws IOException { prefix = prefix.end...
ResourceLoader loader = context.getResourceLoader(); Environment environment = context.getEnvironment(); String location = environment.getProperty("spring.info.git.location"); if (location == null) { location = "classpath:git.properties"; } ConditionMessage.Builder message = ConditionMessage.forCondi...
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\info\ProjectInfoAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public void processRow(ResultSet rs) throws SQLException { order.setCustomerId(rs.getInt("customerid")); order.setOrderId(rs.getInt("orderid")); order.setItemId(rs.getInt("itemid")); order.setQuantity(rs.getInt("quantity")); } }); ...
jdbcTemplate.query(orderItemJoinQuery, new Object[] { orderId }, new RowCallbackHandler() { public void processRow(ResultSet rs) throws SQLException { order.setCustomerId(rs.getInt("customerid")); order.setOrderId(rs.getInt("orderid")); order.setItemId(rs.getI...
repos\tutorials-master\spring-boot-modules\spring-boot-caching\src\main\java\com\baeldung\multiplecachemanager\repository\OrderDetailRepository.java
2
请在Spring Boot框架中完成以下Java代码
public class Lwm2mTransportHealthChecker extends TransportHealthChecker<Lwm2mTransportMonitoringConfig> { private Lwm2mClient lwm2mClient; protected Lwm2mTransportHealthChecker(Lwm2mTransportMonitoringConfig config, TransportMonitoringTarget target) { super(config, target); } @Override pr...
} @Override protected void destroyClient() throws Exception { if (lwm2mClient != null) { lwm2mClient.destroy(); lwm2mClient = null; } } @Override protected TransportType getTransportType() { return TransportType.LWM2M; } }
repos\thingsboard-master\monitoring\src\main\java\org\thingsboard\monitoring\service\transport\impl\Lwm2mTransportHealthChecker.java
2
请在Spring Boot框架中完成以下Java代码
public UserDTO toDtoId(User user) { if (user == null) { return null; } UserDTO userDto = new UserDTO(); userDto.setId(user.getId()); return userDto; } @Named("idSet") @BeanMapping(ignoreByDefault = true) @Mapping(target = "id", source = "id") publ...
UserDTO userDto = new UserDTO(); userDto.setId(user.getId()); userDto.setLogin(user.getLogin()); return userDto; } @Named("loginSet") @BeanMapping(ignoreByDefault = true) @Mapping(target = "id", source = "id") @Mapping(target = "login", source = "login") public Set<UserD...
repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\service\mapper\UserMapper.java
2
请完成以下Java代码
public void updateChangedRows( @NonNull final Set<DocumentId> changedRowIds, @NonNull final AddRemoveChangedRowIdsCollector changesCollector) { if (changedRowIds.isEmpty()) { return; } computeCurrentSelectionsIfPresent(selections -> addRemoveChangedRows(selections, changedRowIds, changesCollector)); ...
orderBys, this::createSelectionFromSelection); } private ViewRowIdsOrderedSelection createSelectionFromSelection( @NonNull final ViewRowIdsOrderedSelection fromSelection, @Nullable final DocumentQueryOrderByList orderBys) { final ViewEvaluationCtx viewEvaluationCtx = getViewEvaluationCtx(); final SqlD...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewRowIdsOrderedSelectionsHolder.java
1
请完成以下Java代码
public void voidIt(final DocumentTableFields docFields) { throw new UnsupportedOperationException(); } @Override public void closeIt(final DocumentTableFields docFields) { final I_C_RfQResponse rfqResponse = extractRfQResponse(docFields); rfqEventDispacher.fireBeforeClose(rfqResponse); // // Mark as c...
public void reverseCorrectIt(final DocumentTableFields docFields) { throw new UnsupportedOperationException(); } @Override public void reverseAccrualIt(final DocumentTableFields docFields) { throw new UnsupportedOperationException(); } @Override public void reactivateIt(final DocumentTableFields docFields...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\RfQResponseDocumentHandler.java
1
请完成以下Java代码
public Mono<OAuth2AuthenticatedPrincipal> introspect(String token) { return delegate.introspect(token) .map( this::mapPrincipal); } protected OAuth2AuthenticatedPrincipal mapPrincipal(OAuth2AuthenticatedPrincipal principal) { return new DefaultOAuth2AuthenticatedP...
// Map<String,List<String>> realm_access = principal.getAttribute("realm_access"); List<String> roles = realm_access.getOrDefault("roles", Collections.emptyList()); List<GrantedAuthority> rolesAuthorities = roles.stream() .map(SimpleGrantedAuthority::new) .collect...
repos\tutorials-master\spring-cloud-modules\spring-cloud-gateway\src\main\java\com\baeldung\springcloudgateway\oauth\shared\KeycloakReactiveTokenInstrospector.java
1
请在Spring Boot框架中完成以下Java代码
public class NewManualInvoiceCandidate { OrgId orgId; ExternalId externalHeaderId; ExternalId externalLineId; String poReference; BPartnerInfo billPartnerInfo; ProductId productId; InvoiceRule invoiceRuleOverride; SOTrx soTrx; LocalDate dateOrdered; LocalDate presetDateInvoiced; StockQtyAndUOMQty qt...
this.externalLineId = externalLineId; this.externalHeaderId = externalHeaderId; this.poReference = poReference; this.billPartnerInfo = billPartnerInfo; this.productId = productId; this.invoiceRuleOverride = invoiceRuleOverride; this.soTrx = soTrx; this.dateOrdered = dateOrdered; this.presetDateInvoiced...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\externallyreferenced\NewManualInvoiceCandidate.java
2
请完成以下Java代码
public void removeLast() { --size; } public int getLast() { return data[size - 1]; } public void setLast(int value) { data[size - 1] = value; } public int pop() { return data[--size]; } @Override public void save(DataOutputStream ou...
data[i] = byteArray.nextInt(); } linearExpandFactor = byteArray.nextInt(); exponentialExpanding = byteArray.nextBoolean(); exponentialExpandFactor = byteArray.nextDouble(); return true; } private void writeObject(ObjectOutputStream out) throws IOException { l...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\trie\datrie\IntArrayList.java
1
请在Spring Boot框架中完成以下Java代码
public String getDepartment() { return department; } /** * Sets the value of the department property. * * @param value * allowed object is * {@link String } * */ public void setDepartment(String value) { this.department = value; } /*...
*/ public String getCostUnit() { return costUnit; } /** * Sets the value of the costUnit property. * * @param value * allowed object is * {@link String } * */ public void setCostUnit(String value) { this.costUnit = value; } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\OrderingPartyExtensionType.java
2
请完成以下Java代码
public class Msg implements Serializable { private int id; private String content; private long ttl; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getContent() { return content; }
public void setContent(String content) { this.content = content; } public long getTtl() { return ttl; } public void setTtl(long ttl) { this.ttl = ttl; } @Override public String toString() { return "Msg{" + "id=" + id + ", content='" + content + '\'' + ", ttl=" + ttl + '}'; } }
repos\spring-boot-quick-master\quick-rabbitmq\src\main\java\com\quick\mq\model\Msg.java
1
请完成以下Java代码
private final boolean isProcurement(final de.metas.rfq.model.I_C_RfQResponse rfqResponse) { return Services.get(IPMM_RfQ_BL.class).isProcurement(rfqResponse); } @Override public void onBeforeComplete(final de.metas.rfq.model.I_C_RfQ rfq) { if (!isProcurement(rfq)) { return; } final I_C_RfQ pmmRfq = ...
syncRfQCloseEvents.add(syncRfQCloseEvent); } } // // Push to WebUI: RfQ close events if (!syncRfQCloseEvents.isEmpty()) { Services.get(ITrxManager.class) .getTrxListenerManagerOrAutoCommit(ITrx.TRXNAME_ThreadInherited) .newEventListener(TrxEventTiming.AFTER_COMMIT) .registerWeakly(false)...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\rfq\model\interceptor\PMMRfQEventListener.java
1
请完成以下Java代码
public Object[] toArray() { return Arrays.copyOf(internal, internal.length); } @SuppressWarnings("unchecked") @Override public <T> T[] toArray(T[] array) { if (array.length < internal.length) { return (T[]) Arrays.copyOf(internal, internal.length, array.getClass()); ...
} @Override public ListIterator<E> listIterator(int index) { // ignored for brevity return null; } private class CustomIterator implements Iterator<E> { int index; @Override public boolean hasNext() { return index != internal.length; } ...
repos\tutorials-master\core-java-modules\core-java-collections-list-7\src\main\java\com\baeldung\list\CustomList.java
1
请在Spring Boot框架中完成以下Java代码
class ElasticPropertiesConfigAdapter extends StepRegistryPropertiesConfigAdapter<ElasticProperties> implements ElasticConfig { ElasticPropertiesConfigAdapter(ElasticProperties properties) { super(properties); } @Override public String prefix() { return "management.elastic.metrics.export"; } @Override pu...
return obtain(ElasticProperties::isAutoCreateIndex, ElasticConfig.super::autoCreateIndex); } @Override public @Nullable String userName() { return get(ElasticProperties::getUserName, ElasticConfig.super::userName); } @Override public @Nullable String password() { return get(ElasticProperties::getPassword, E...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\elastic\ElasticPropertiesConfigAdapter.java
2
请完成以下Java代码
public static UserId toUserIdOrNull(@Nullable final BPartnerContactId id) { return id != null ? id.getUserId() : null; } public static boolean equals(@Nullable final BPartnerContactId id1, @Nullable final BPartnerContactId id2) { return Objects.equals(id1, id2); } @JsonCreator public static BPartnerContact...
return of( BPartnerId.ofRepoId(Integer.parseInt(parts.get(0))), UserId.ofRepoId(Integer.parseInt(parts.get(1)))); } catch (Exception ex) { throw new AdempiereException("Invalid BPartnerContactId string: " + idStr, ex); } } @JsonValue public String toJson() { return bpartnerId.getRepoId() + "...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\BPartnerContactId.java
1
请在Spring Boot框架中完成以下Java代码
public ContextSourceBuilder root(String root) { this.root = root; return this; } /** * Specifies the ldap server URL when not using the embedded LDAP server. For * example, "ldaps://ldap.example.com:33389/dc=myco,dc=org". * @param url the ldap server URL * @return the {@link ContextSourceBuilder}...
else { throw new IllegalStateException("Embedded LDAP server is not provided"); } } private int getPort() { if (this.port == null) { this.port = getDefaultPort(); } return this.port; } private int getDefaultPort() { try (ServerSocket serverSocket = new ServerSocket(DEFAULT_PORT)) { ...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\authentication\configurers\ldap\LdapAuthenticationProviderConfigurer.java
2
请完成以下Java代码
public int getM_Warehouse_ID() { return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } /** * OrderPickingTy...
public static final String PRIORITYRULE_Medium = "5"; /** Low = 7 */ public static final String PRIORITYRULE_Low = "7"; /** Urgent = 1 */ public static final String PRIORITYRULE_Urgent = "1"; /** Minor = 9 */ public static final String PRIORITYRULE_Minor = "9"; @Override public void setPriorityRule (final @Null...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Workplace.java
1
请完成以下Java代码
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { ShiroUser shiroUser = (ShiroUser) principals.getPrimaryPrincipal(); SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo(); Set<String> roles = Sets.newHashSet(); Set<String> permiss...
@Override public void clearCachedAuthorizationInfo(PrincipalCollection principals) { super.clearCachedAuthorizationInfo(principals); clearAllCache(); } @Override public void clearCachedAuthenticationInfo(PrincipalCollection principals) { super.clearCachedAuthenticationInfo(princ...
repos\springBoot-master\springboot-shiro2\src\main\java\cn\abel\rest\shiro\ShiroRealm.java
1
请完成以下Java代码
private static byte[] hexStr2Bytes(final CharSequence hex) { // Adding one byte to get the right conversion // values starting with "0" can be converted final byte[] bArray = new BigInteger("10" + hex, 16).toByteArray(); final byte[] ret = new byte[bArray.length - 1]; // Copy all the REAL bytes, not the "fi...
*/ private static byte[] hmac_sha1(final byte[] keyBytes, final byte[] text) { try { final Mac hmac = Mac.getInstance("HmacSHA1"); final SecretKeySpec macKey = new SecretKeySpec(keyBytes, "RAW"); hmac.init(macKey); return hmac.doFinal(text); } catch (final GeneralSecurityException gse) { thro...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\user_2fa\totp\TOTPUtils.java
1
请完成以下Java代码
public long findHistoricActivityInstanceCountByQueryCriteria( HistoricActivityInstanceQueryImpl historicActivityInstanceQuery ) { return (Long) getDbSqlSession().selectOne( "selectHistoricActivityInstanceCountByQueryCriteria", historicActivityInstanceQuery ); } ...
@SuppressWarnings("unchecked") public List<HistoricActivityInstance> findHistoricActivityInstancesByNativeQuery( Map<String, Object> parameterMap, int firstResult, int maxResults ) { return getDbSqlSession().selectListWithRawParameter( "selectHistoricActivityInstanceB...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisHistoricActivityInstanceDataManager.java
1
请完成以下Java代码
public abstract class C_Flatrate_Term_Create extends JavaProcess { private final FlatrateTermCreatorBuilder builder = FlatrateTermCreator.builder(); public void setStartDate(Timestamp startDate) { builder.startDate(startDate); } public void setEndDate(Timestamp endDate) { builder.endDate(endDate); } publ...
@Override public String doIt() throws Exception { builder .ctx(getCtx()) .bPartners(getBPartners()) .build() .createTermsForBPartners(); return MSG_OK; } /** * Implement this method in the subclass to provide all the partners that are about to have terms created. * * @return an iterator ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\process\C_Flatrate_Term_Create.java
1
请在Spring Boot框架中完成以下Java代码
public void launchAutoSett(String userNo){ RpUserInfo userInfo = rpUserInfoService.getDataByMerchentNo(userNo); RpAccount account = rpAccountQueryService.getAccountByUserNo(userNo); BigDecimal settAmount = account.getAvailableSettAmount(); String settMinAmount = AccountConfigUtil.readConfig("sett_min_amount"); ...
} settRecord.setSettStatus(settStatus); settRecord.setEditTime(new Date()); settRecord.setRemark(remark); rpSettRecordDao.update(settRecord); if(settStatus.equals(SettRecordStatusEnum.CANCEL.name())){//审核不通过 //解冻金额 rpAccountTransactionService.unFreezeSettAmount(settRecord.getUserNo(), settRecord.getS...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\service\impl\RpSettHandleServiceImpl.java
2