instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public ItemReader<Transaction> itemReader(Resource inputData) { DelimitedLineTokenizer tokenizer = new DelimitedLineTokenizer(); tokenizer.setNames(tokens); DefaultLineMapper<Transaction> lineMapper = new DefaultLineMapper<>(); lineMapper.setLineTokenizer(tokenizer); lineMapper.s...
@Bean public Marshaller marshaller() { Jaxb2Marshaller marshaller = new Jaxb2Marshaller(); marshaller.setClassesToBeBound(Transaction.class); return marshaller; } @Bean public Step retryStep( JobRepository jobRepository, PlatformTransactionManager transactionManager,...
repos\tutorials-master\spring-batch-2\src\main\java\com\baeldung\batch\SpringBatchRetryConfig.java
1
请完成以下Java代码
public void setPriority (int Priority) { set_Value (COLUMNNAME_Priority, Integer.valueOf(Priority)); } /** Get Priority. @return Indicates if this request is of a high, medium or low priority. */ public int getPriority () { Integer ii = (Integer)get_Value(COLUMNNAME_Priority); if (ii == null) retu...
/** Get StructureXML. @return Autogenerated Containerdefinition as XML Code */ public String getStructureXML () { return (String)get_Value(COLUMNNAME_StructureXML); } /** Set Title. @param Title Name this entity is referred to as */ public void setTitle (String Title) { set_Value (COLUMNNAME_Ti...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Container.java
1
请在Spring Boot框架中完成以下Java代码
public class TokenToUserMethodArgumentResolver implements HandlerMethodArgumentResolver { @Autowired private AdminUserService adminUserService; public TokenToUserMethodArgumentResolver() { } public boolean supportsParameter(MethodParameter parameter) { if (parameter.hasParameterAnnotation...
} return null; } public static byte[] getRequestPostBytes(HttpServletRequest request) throws IOException { int contentLength = request.getContentLength(); if (contentLength < 0) { return null; } byte buffer[] = new byte[contentLength]; for...
repos\spring-boot-projects-main\SpringBoot前后端分离实战项目源码\spring-boot-project-front-end&back-end\src\main\java\cn\lanqiao\springboot3\config\handler\TokenToUserMethodArgumentResolver.java
2
请完成以下Java代码
private void presetRejectWithInternalReason(final String errorMessage, final Throwable ex) { logger.warn("Marked checker as not applicable: {} because {}", this, errorMessage, ex); _presetResolution = ProcessPreconditionsResolution.rejectWithInternalReason(errorMessage); } private ProcessPreconditionsResolution...
{ setPreconditionsContext(() -> preconditionsContext); return this; } public ProcessPreconditionChecker setPreconditionsContext(final Supplier<IProcessPreconditionsContext> preconditionsContextSupplier) { _preconditionsContextSupplier = preconditionsContextSupplier; return this; } private IProcessPrecond...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessPreconditionChecker.java
1
请完成以下Java代码
public Date getInProgressStartDueDate() { return null; } @Override public String getTaskDefinitionKey() { return activiti5Task.getTaskDefinitionKey(); } @Override public Date getDueDate() { return activiti5Task.getDueDate(); } @Override public String getCat...
} @Override public void setOwner(String owner) { activiti5Task.setOwner(owner); } @Override public void setAssignee(String assignee) { activiti5Task.setAssignee(assignee); } @Override public DelegationState getDelegationState() { return activiti5Task.getDelegat...
repos\flowable-engine-main\modules\flowable5-compatibility\src\main\java\org\flowable\compatibility\wrapper\Flowable5TaskWrapper.java
1
请完成以下Java代码
public void setPolicy(CrossOriginOpenerPolicy openerPolicy) { Assert.notNull(openerPolicy, "openerPolicy cannot be null"); this.policy = openerPolicy; } @Override public void writeHeaders(HttpServletRequest request, HttpServletResponse response) { if (this.policy != null && !response.containsHeader(OPENER_POL...
CrossOriginOpenerPolicy(String policy) { this.policy = policy; } public String getPolicy() { return this.policy; } public static @Nullable CrossOriginOpenerPolicy from(String openerPolicy) { for (CrossOriginOpenerPolicy policy : values()) { if (policy.getPolicy().equals(openerPolicy)) { retu...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\header\writers\CrossOriginOpenerPolicyHeaderWriter.java
1
请完成以下Java代码
/* package */class ReceiptScheduleHUDocument extends AbstractHUDocument { private final String displayName; private final List<IHUDocumentLine> lines; public ReceiptScheduleHUDocument(final String displayName, final List<IHUDocumentLine> lines) { super(); Check.assumeNotNull(displayName, "displayName not null...
} @Override public String getDisplayName() { return displayName; } @Override public List<IHUDocumentLine> getLines() { return lines; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\receiptschedule\impl\ReceiptScheduleHUDocument.java
1
请完成以下Java代码
public class MTab extends X_AD_Tab { public MTab (final Properties ctx, final int AD_Tab_ID, final String trxName) { super (ctx, AD_Tab_ID, trxName); if (is_new()) { setEntityType (ENTITYTYPE_UserMaintained); // U setHasTree (false); setIsReadOnly (false); setIsSingleRow (false); setIsSortTab (fa...
@Override protected boolean beforeSave (final boolean newRecord) { // UPDATE AD_Tab SET IsInsertRecord='N' WHERE IsInsertRecord='Y' AND IsReadOnly='Y' if (isReadOnly() && isInsertRecord()) setIsInsertRecord(false); //RF[2826384] if(isSortTab()) { if(getAD_ColumnSortOrder_ID() == 0) { throw new F...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MTab.java
1
请完成以下Java代码
public String getTxCtgy() { return txCtgy; } /** * Sets the value of the txCtgy property. * * @param value * allowed object is * {@link String } * */ public void setTxCtgy(String value) { this.txCtgy = value; } /** * Gets the va...
* * @param value * allowed object is * {@link CardSequenceNumberRange1 } * */ public void setSeqNbRg(CardSequenceNumberRange1 value) { this.seqNbRg = value; } /** * Gets the value of the txDtRg property. * * @return * possible object i...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\CardAggregated1.java
1
请完成以下Java代码
private void commitChunkTrx() throws DBException { Check.assumeNotNull(chunkTrx, "chunkTrx shall NOT be null; this=", this); // // Case: Locally created transaction => commit it if (chunkTrxIsLocal) { try { chunkTrx.commit(true); } catch (final Throwable e) { throw DBException.wrapIfN...
* * If something went wrong this method will throw an exception right away, exception which will stop entire batch processing. */ private void rollbackChunkTrx() { Check.assumeNotNull(chunkTrx, "chunkTrx shall NOT be null"); // // Case: Locally created transaction => rollback it if (chunkTrxIsLocal) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\processor\api\impl\TrxItemChunkProcessorExecutor.java
1
请在Spring Boot框架中完成以下Java代码
public class EmployeeService { @Autowired private EmployeeRepository employeeRepository; public List<Employee> getAllEmployees() { return employeeRepository.findAll(); } public Optional<Employee> getEmployeeById(Long employeeId) throws ResourceNotFoundException { return employeeRepository.findById(empl...
employee.setLastName(employeeDetails.getLastName()); employee.setFirstName(employeeDetails.getFirstName()); final Employee updatedEmployee = employeeRepository.save(employee); return updatedEmployee; } public Map<String, Boolean> deleteEmployee(Long employeeId) throws ResourceNotFoundException { Employee ...
repos\Spring-Boot-Advanced-Projects-main\spring-aop-advice-examples\src\main\java\net\alanbinu\springboot2\springboot2jpacrudexample\service\EmployeeService.java
2
请完成以下Java代码
public class ClientLoggerUtil extends LoggerUtil { public void beanCreationSkipped(String className, String beanName) { logDebug("001", "Skipping creation of bean '{}' for factory '{}'. " + "A bean of type '{}' already exists", beanName, className, ExternalTaskClient.class); } public void regist...
public void backoffStrategyFound() { logDebug("005", "Client backoff strategy found"); } public SpringExternalTaskClientException noUniqueClientException() { return new SpringExternalTaskClientException(exceptionMessage( "006", "Multiple matching client bean candidates have been found " + ...
repos\camunda-bpm-platform-master\spring-boot-starter\starter-client\spring\src\main\java\org\camunda\bpm\client\spring\impl\client\util\ClientLoggerUtil.java
1
请完成以下Java代码
public Object getCredentials() { return null; } @Override public Object getDetails() { return null; } @Override public Object getPrincipal() { return this; } @Override ...
} public String getAccessToken() { try { OAuth2AuthorizeRequest oAuth2AuthorizeRequest = OAuth2AuthorizeRequest .withClientRegistrationId(clientRegistration.getRegistrationId()) .principal(principal) .build(); OAuth2AuthorizedClient cl...
repos\tutorials-master\spring-cloud-modules\spring-cloud-openfeign\src\main\java\com\baeldung\cloud\openfeign\oauthfeign\OAuthClientCredentialsFeignManager.java
1
请完成以下Java代码
public Class<I_I_GLJournal> getImportModelClass() { return I_I_GLJournal.class; } @Override public String getImportTableName() { return I_I_GLJournal.Table_Name; } @Override protected String getTargetTableName() { return I_GL_Journal.Table_Name; }
@Override protected String getImportOrderBySql() { return "COALESCE(BatchDocumentNo, I_GLJournal_ID ||' '), COALESCE(JournalDocumentNo, " + "I_GLJournal_ID ||' '), C_AcctSchema_ID, PostingType, C_DocType_ID, GL_Category_ID, " + "C_Currency_ID, TRUNC(DateAcct), Line, I_GLJournal_ID"; } @Override public I...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\impexp\GLJournalImportProcess.java
1
请完成以下Java代码
public void setQtyBOM (final @Nullable BigDecimal QtyBOM) { set_ValueNoCheck (COLUMNNAME_QtyBOM, QtyBOM); } @Override public BigDecimal getQtyBOM() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyBOM); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyOnHand (final @Nu...
{ set_ValueNoCheck (COLUMNNAME_QtyRequiered, QtyRequiered); } @Override public BigDecimal getQtyRequiered() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyRequiered); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyReserved (final @Nullable BigDecimal QtyReserved) {...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_RV_PP_Order_BOMLine.java
1
请完成以下Java代码
public DocumentPrintOptionDescriptorsList getPrintingOptionDescriptors(@NonNull final AdProcessId reportProcessId) { return cache.getOrLoad(reportProcessId, this::retrievePrintingOptionDescriptors); } private DocumentPrintOptionDescriptorsList retrievePrintingOptionDescriptors(@NonNull final AdProcessId reportPro...
final String parameterName = processPara.getColumnName(); if (!parameterName.startsWith(DocumentPrintOptionDescriptor.PROCESS_PARAM_PRINTER_OPTIONS_PREFIX)) { return null; } final IModelTranslationMap trls = InterfaceWrapperHelper.getModelTranslationMap(processPara); return DocumentPrintOptionDescriptor....
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\report\DocumentPrintOptionDescriptorsRepository.java
1
请完成以下Java代码
public int getC_Activity_ID() { if (m_ioLine == null) { return 0; } return m_ioLine.getC_Activity_ID(); } public int getC_Order_ID() { if (m_ioLine == null) { return 0; } return m_ioLine.getC_Order_ID(); } /** * Get Campaign * * @return campaign if based on shipment line and 0 for c...
public int getUser2_ID() { if (m_ioLine == null) { return 0; } return m_ioLine.getUser2_ID(); } /** * Get Attribute Set Instance * * @return ASI if based on shipment line and 0 for charge based */ public int getM_AttributeSetInstance_ID() { if (m_ioLine == null) { return 0; } return...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MRMALine.java
1
请完成以下Java代码
private static LocalDate parseLocalDate(final String dateStr) { return !Check.isEmpty(dateStr, true) ? LocalDate.parse(dateStr, dateFormatter) : null; } private static LocalTime parseLocalTime(final String timeStr) { return !Check.isEmpty(timeStr, true) ? LocalTime.parse(timeStr, timeFormatter) : null; } pr...
.type(GOPackageLabelType.DIN_A6_ROUTER_LABEL) .fileName(GOPackageLabelType.DIN_A6_ROUTER_LABEL.toString()) .contentType(PackageLabel.CONTENTTYPE_PDF) .labelData(pdfs.getRouterlabel()) .build()) .label(PackageLabel.builder() .type(GOPackageLabelType.DIN_A6_ROUTER_LABEL_ZEBRA) .fil...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java\de\metas\shipper\gateway\go\GOClient.java
1
请在Spring Boot框架中完成以下Java代码
private MediatedCommissionSettings toMediatedCommissionSettings(@NonNull final I_C_MediatedCommissionSettings record) { final ImmutableList<MediatedCommissionSettingsLine> lines = queryBL.createQueryBuilder(I_C_MediatedCommissionSettingsLine.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_C_MediatedC...
.build(); } @NonNull private MediatedCommissionSettingsLine toMediatedCommissionLine(@NonNull final I_C_MediatedCommissionSettingsLine record) { final MediatedCommissionSettingsId settingsId = MediatedCommissionSettingsId.ofRepoId(record.getC_MediatedCommissionSettings_ID()); return MediatedCommissionSettings...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\mediated\repository\MediatedCommissionSettingsRepo.java
2
请完成以下Java代码
public void setAD_Org_From_ID (final int AD_Org_From_ID) { if (AD_Org_From_ID < 1) set_Value (COLUMNNAME_AD_Org_From_ID, null); else set_Value (COLUMNNAME_AD_Org_From_ID, AD_Org_From_ID); } @Override public int getAD_Org_From_ID() { return get_ValueAsInt(COLUMNNAME_AD_Org_From_ID); } @Override ...
@Override public void setC_BPartner_From_ID (final int C_BPartner_From_ID) { if (C_BPartner_From_ID < 1) set_Value (COLUMNNAME_C_BPartner_From_ID, null); else set_Value (COLUMNNAME_C_BPartner_From_ID, C_BPartner_From_ID); } @Override public int getC_BPartner_From_ID() { return get_ValueAsInt(COLUM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_OrgChange_History.java
1
请完成以下Java代码
public Edge getEdge(Node from, Node to) { // 首先尝试词+词 Attribute attribute = get(from.compiledWord, to.compiledWord); if (attribute == null) attribute = get(from.compiledWord, WordNatureWeightModelMaker.wrapTag(to.label)); if (attribute == null) attribute = get(WordNatureWeightModelMak...
{ dependencyRelation = new String[size]; p = new float[size]; } Attribute(String dr, float p) { dependencyRelation = new String[]{dr}; this.p = new float[]{p}; } /** * 加权 * @param boost */ public...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\bigram\WordNatureDependencyModel.java
1
请在Spring Boot框架中完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public FileInfo uploadedDate(String uploadedDate) { this.uploadedDate = uploadedDate; return this; } /** * The timestamp in this field shows the date/time when the seller uploaded the evidential docume...
Objects.equals(this.uploadedDate, fileInfo.uploadedDate); } @Override public int hashCode() { return Objects.hash(fileId, fileType, name, uploadedDate); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class FileInfo {\n"); sb.append(" fileId: ").append(toIn...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\FileInfo.java
2
请完成以下Java代码
public class Calculator { public int calculate(int a, int b, String operator) { int result = Integer.MIN_VALUE; if ("add".equals(operator)) { result = a + b; } else if ("multiply".equals(operator)) { result = a * b; } else if ("divide".equals(operator)) { ...
case MULTIPLY: result = a * b; break; case DIVIDE: result = a / b; break; case SUBTRACT: result = a - b; break; case MODULO: result = a % b; break; default: result = Integer.MIN_VA...
repos\tutorials-master\patterns-modules\design-patterns-creational\src\main\java\com\baeldung\reducingIfElse\Calculator.java
1
请完成以下Java代码
public void setPhase(int phase) { this.phase = phase; } @Override public synchronized void onApplicationEvent(ListenerContainerIdleEvent event) { LOGGER.debug(() -> event.toString()); MessageListenerContainer parent = event.getContainer(MessageListenerContainer.class); MessageListenerContainer container = (...
} this.running = true; } public void initialize() { this.groups.clear(); for (String group : this.groupNames) { this.groups.add(Objects.requireNonNull(this.applicationContext).getBean(group + ".group", ContainerGroup.class)); } if (!this.groups.isEmpty()) { this.iterator = this.groups.iterator(); ...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\ContainerGroupSequencer.java
1
请完成以下Java代码
public void schemaDrop() { try { executeMandatorySchemaResource("drop", schemaComponent); } catch (Exception e) { logger.info("Error dropping {} tables", schemaComponent, e); } } @Override public String schemaUpdate() { return schemaUpdate(null); ...
public void schemaCheckVersion() { String dbVersion = getSchemaVersion(); if (!FlowableVersions.CURRENT_VERSION.equals(dbVersion)) { throw new FlowableWrongDbException(FlowableVersions.CURRENT_VERSION, dbVersion); } } protected boolean isUpdateNeeded() { return isTab...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\db\ServiceSqlScriptBasedDbSchemaManager.java
1
请完成以下Java代码
public class X_C_User_Role extends org.compiere.model.PO implements I_C_User_Role, org.compiere.model.I_Persistent { private static final long serialVersionUID = -1464548893L; /** Standard Constructor */ public X_C_User_Role (final Properties ctx, final int C_User_Role_ID, @Nullable final String trxName) ...
public int getC_User_Role_ID() { return get_ValueAsInt(COLUMNNAME_C_User_Role_ID); } @Override public void setIsUniqueForBPartner (final boolean IsUniqueForBPartner) { set_Value (COLUMNNAME_IsUniqueForBPartner, IsUniqueForBPartner); } @Override public boolean isUniqueForBPartner() { return get_ValueA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_User_Role.java
1
请完成以下Java代码
public class MKTG_ContactPerson_CreateFrom_C_BPartner extends JavaProcess { @Param(mandatory = true, parameterName = I_MKTG_Campaign.COLUMNNAME_MKTG_Campaign_ID) private int campaignRecordId; @Param(mandatory = true, parameterName = "IsRemoveAllExistingContactsFromCampaign") private boolean removeAllExistingConta...
final CampaignId campaignId = CampaignId.ofRepoId(campaignRecordId); final MKTG_ContactPerson_ProcessBase contactPersonProcessBase = SpringContextHolder.instance.getBean(MKTG_ContactPerson_ProcessBase.class); final MKTG_ContactPerson_ProcessParams params = MKTG_ContactPerson_ProcessParams.builder() .selection...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\process\MKTG_ContactPerson_CreateFrom_C_BPartner.java
1
请在Spring Boot框架中完成以下Java代码
public void evict(TenantId tenantId, DeviceId deviceId) { DeviceProfileId old = devicesMap.remove(deviceId); if (old != null) { DeviceProfile newProfile = get(tenantId, deviceId); if (newProfile == null || !old.equals(newProfile.getId())) { notifyDeviceListeners(t...
deviceListeners.remove(listenerId); } } private void notifyProfileListeners(DeviceProfile profile) { ConcurrentMap<EntityId, Consumer<DeviceProfile>> tenantListeners = profileListeners.get(profile.getTenantId()); if (tenantListeners != null) { tenantListeners.forEach((id, li...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\profile\DefaultTbDeviceProfileCache.java
2
请完成以下Java代码
public String getType() { return type; } public void setType(String type) { this.type = type; } public String getTopic() { return topic; } public void setTopic(String topic) { this.topic = topic; } public boolean isDoNotIncludeVariables() { ret...
} @Override public void addOutParameter(IOParameter outParameter) { outParameters.add(outParameter); } @Override public void setOutParameters(List<IOParameter> outParameters) { this.outParameters = outParameters; } @Override public ExternalWorkerServiceTask clone() { ...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\ExternalWorkerServiceTask.java
1
请完成以下Java代码
private void setDefaultButton() { setDefaultButton(confirmPanel.getOKButton()); } private void setDefaultButton(final JButton button) { final Window frame = AEnv.getWindow(this); if (frame instanceof RootPaneContainer) { final RootPaneContainer c = (RootPaneContainer)frame; c.getRootPane().setDefault...
} @Override public void setFocusable(final boolean focusable) { // ignore it } @Override public void requestFocus() { if (isSimpleSearchPanelActive()) { if (m_editorFirst != null) { m_editorFirst.requestFocus(); } } } @Override public boolean requestFocusInWindow() { if (isSimpleSea...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindPanel.java
1
请在Spring Boot框架中完成以下Java代码
public class ShipmentCandidatesView_Launcher extends ViewBasedProcessTemplate implements IProcessPrecondition { @Autowired private IViewsRepository viewsFactory; @Override protected ProcessPreconditionsResolution checkPreconditionsApplicable() { final DocumentIdsSelection selectedRowIds = getSelectedRowIds(); ...
.target(ViewOpenTarget.ModalOverlay) .build()); return MSG_OK; } private ImmutableSet<ShipmentScheduleId> getSelectedShipmentScheduleIds() { final DocumentIdsSelection selectedRowIds = getSelectedRowIds(); if (selectedRowIds.isEmpty()) { return ImmutableSet.of(); } else if (selectedRowIds.isAll(...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\shipment_candidates_editor\process\ShipmentCandidatesView_Launcher.java
2
请在Spring Boot框架中完成以下Java代码
public class SecurityPubSubChannel { @Bean(name = "startPSChannel") @SecuredChannel(interceptor = "channelSecurityInterceptor", sendAccess = "ROLE_VIEWER") public PublishSubscribeChannel startChannel() { return new PublishSubscribeChannel(executor()); } @ServiceActivator(inputChannel = "st...
public String getRoles() { SecurityContext securityContext = SecurityContextHolder.getContext(); return securityContext.getAuthentication().getAuthorities().stream().map(auth -> auth.getAuthority()).collect(Collectors.joining(",")); } public String getUsername() { SecurityContext securi...
repos\tutorials-master\spring-integration\src\main\java\com\baeldung\si\security\SecurityPubSubChannel.java
2
请完成以下Java代码
public ICalloutField asCalloutField() { if (_calloutField == null) { _calloutField = new DocumentFieldAsCalloutField(this); } return _calloutField; } private void updateValid(final IDocumentChangesCollector changesCollector) { final DocumentValidStatus validStatusOld = _validStatus; final DocumentVa...
return _validStatus; } @Override public DocumentValidStatus updateStatusIfInitialInvalidAndGet(final IDocumentChangesCollector changesCollector) { if (_validStatus.isInitialInvalid()) { updateValid(changesCollector); } return _validStatus; } @Override public boolean hasChangesToSave() { if (isRea...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentField.java
1
请完成以下Spring Boot application配置
# dubbo 配置项,对应 DubboConfigurationProperties 配置类 dubbo: # Dubbo 应用配置 application: name: user-service-provider # 应用名 # Dubbo 注册中心配 registry: address: nacos://127.0.0.1:8848 # 注册中心地址。个鞥多注册中心,可见 http://dubbo.apache.org/zh-cn/docs/user/references/registry/introduction.html 文档。 # Dubbo 服务提供者协议配置 protocol:...
timeout: 1000 # 【重要】远程服务调用超时时间,单位:毫秒。默认为 1000 毫秒,胖友可以根据自己业务修改 UserRpcService: version: 1.0.0 # 配置扫描 Dubbo 自定义的 @Service 注解,暴露成 Dubbo 服务提供者 scan: base-packages: cn.iocoder.springboot.lab30.rpc.service
repos\SpringBoot-Labs-master\lab-30\lab-30-dubbo-annotations-nacos\user-rpc-service-provider-03\src\main\resources\application.yaml
2
请完成以下Java代码
protected void prepare() { ProcessInfoParameter[] para = getParametersAsArray(); for (int i = 0; i < para.length; i++) { String name = para[i].getParameterName(); if (para[i].getParameter() == null) ; else if (name.equals("C_Order_ID")) p_C_Order_ID = para[i].getParameterAsInt(); else log...
*/ protected String doIt() throws AdempiereSystemError { log.info("doIt - Open C_Order_ID=" + p_C_Order_ID); if (p_C_Order_ID == 0) return ""; // MOrder order = new MOrder (getCtx(), p_C_Order_ID, get_TrxName()); String msg = order.reopenIt(); if ( msg.length() != 0 ) { throw new AdempiereSystemEr...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\process\OrderOpen.java
1
请完成以下Java代码
private boolean isMatch(String url, List<Pattern> patterns) { for (Pattern pattern : patterns) { if (pattern.matcher(url).find()) { return true; } } return false; } public static DevToolsSettings get() { if (settings == null) { settings = load(); } return settings; } static DevToolsSettin...
while (urls.hasMoreElements()) { settings.add(PropertiesLoaderUtils.loadProperties(new UrlResource(urls.nextElement()))); } if (logger.isDebugEnabled()) { logger.debug("Included patterns for restart : " + settings.restartIncludePatterns); logger.debug("Excluded patterns for restart : " + settings.rest...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\settings\DevToolsSettings.java
1
请完成以下Java代码
public @Nullable String get(String key) { return this.entries.getProperty(key); } /** * Return the value of the specified property as an {@link Instant} or {@code null} if * the value is not a valid {@link Long} representation of an epoch time. * @param key the key of the property * @return the property va...
this.iterator = properties.entrySet().iterator(); } @Override public boolean hasNext() { return this.iterator.hasNext(); } @Override public Entry next() { Map.Entry<Object, Object> entry = this.iterator.next(); return new Entry((String) entry.getKey(), (String) entry.getValue()); } @Override...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\info\InfoProperties.java
1
请完成以下Java代码
public int getM_Movement_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Movement_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Processed. @param Processed The document has been processed */ public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Processed, ...
} return false; } /** 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(COLUMNNAM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_MovementConfirm.java
1
请完成以下Java代码
public void sendMessageToPartition(String message, int partition) { kafkaTemplate.send(partitionedTopicName, partition, null, message); } public void sendMessageToFiltered(String message) { kafkaTemplate.send(filteredTopicName, message); } public void sendGreeti...
@KafkaListener(topics = "${message.topic.name}", containerFactory = "headersKafkaListenerContainerFactory") public void listenWithHeaders(@Payload String message, @Header(KafkaHeaders.RECEIVED_PARTITION) int partition) { System.out.println("Received Message: " + message + " from partition: " + parti...
repos\tutorials-master\spring-kafka\src\main\java\com\baeldung\spring\kafka\KafkaApplication.java
1
请完成以下Java代码
private void updateMDCandidatesFromDDOrderCandidate(final DDOrderCandidate ddOrderCandidate) { final DDOrderCandidateId ddOrderCandidateId = ddOrderCandidate.getIdNotNull(); if (ddOrderCandidate.getMaterialDispoGroupId() != null) { candidateRepositoryWriteService.updateCandidatesByQuery( CandidatesQuery...
.build(); } @Nullable private PPOrderId findForwardPPOrderId(@NonNull final DDOrderCandidateRequestedEvent event) { return findForwardPPOrderId(event.getDdOrderCandidateData().getForwardPPOrderRef()); } @Nullable private PPOrderId findForwardPPOrderId(@Nullable final PPOrderRef forwardPPOrderRef) { if (fo...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddordercandidate\material_dispo\DDOrderCandidateRequestedEventHandler.java
1
请完成以下Java代码
public I_MSV3_Verfuegbarkeit_Transaction store() { final I_MSV3_Verfuegbarkeit_Transaction transactionRecord = newInstance(I_MSV3_Verfuegbarkeit_Transaction.class); transactionRecord.setAD_Org_ID(orgId.getRepoId()); final I_MSV3_VerfuegbarkeitsanfrageEinzelne verfuegbarkeitsanfrageEinzelneRecord = // availa...
save(transactionRecord); return transactionRecord; } public RuntimeException getExceptionOrNull() { if (faultInfo == null && otherException == null) { return null; } return Msv3ClientException.builder().msv3FaultInfo(faultInfo) .cause(otherException).build(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java\de\metas\vertical\pharma\vendor\gateway\msv3\availability\MSV3AvailabilityTransaction.java
1
请完成以下Java代码
public Object getLineAggregationKey() { return Util.mkKey( getM_Product_ID(), getAttributeSetInstanceId().getRepoId(), getC_UOM_ID(), getM_HU_PI_Item_Product_ID(), getPrice()); } /** * Creates and {@link I_PMM_PurchaseCandidate} to {@link I_C_OrderLine} line allocation using the whole candid...
final BigDecimal qtyToOrder = getQtyToOrder(); final BigDecimal qtyToOrderTU = getQtyToOrder_TU(); // // Create allocation final I_PMM_PurchaseCandidate_OrderLine alloc = InterfaceWrapperHelper.newInstance(I_PMM_PurchaseCandidate_OrderLine.class, orderLine); alloc.setC_OrderLine(orderLine); alloc.setPMM_Pu...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\impl\PurchaseCandidate.java
1
请在Spring Boot框架中完成以下Java代码
GitInfoContributor gitInfoContributor(GitProperties gitProperties, InfoContributorProperties infoContributorProperties) { return new GitInfoContributor(gitProperties, infoContributorProperties.getGit().getMode()); } @Bean @ConditionalOnEnabledInfoContributor("build") @ConditionalOnSingleCandidate(BuildPropert...
} @Bean @ConditionalOnEnabledInfoContributor(value = "process", fallback = InfoContributorFallback.DISABLE) @Order(DEFAULT_ORDER) ProcessInfoContributor processInfoContributor() { return new ProcessInfoContributor(); } @Bean @ConditionalOnEnabledInfoContributor(value = "ssl", fallback = InfoContributorFallba...
repos\spring-boot-4.0.1\module\spring-boot-actuator-autoconfigure\src\main\java\org\springframework\boot\actuate\autoconfigure\info\InfoContributorAutoConfiguration.java
2
请完成以下Java代码
public Integer getPrecedence() { return ProcessApplicationElResolver.SPRING_RESOLVER; } @Override public ELResolver getElResolver(AbstractProcessApplication processApplication) { if (processApplication instanceof SpringProcessApplication) { SpringProcessApplication springProcessApplication = (Spri...
return null; } ServletContext servletContext = servletProcessApplication.getServletContext(); WebApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext); if(applicationContext != null) { return new ApplicationContextElResolver(applicat...
repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\application\SpringProcessApplicationElResolver.java
1
请在Spring Boot框架中完成以下Java代码
public void addQtyToAllMatchingGroups(@NonNull final AddToResultGroupRequest request) { // note that we might select more quantities than we actually wanted (bc of the way we match attributes in the query using LIKE) // for that reason, we need to be lenient in case not all quantities can be added to a bucked bu...
.product(ProductClassifier.specific(request.getProductId().getRepoId())) .storageAttributesKeyMatcher(AttributesKeyPatternsUtil.matching(request.getStorageAttributesKey())) .build(); buckets.add(bucket); return bucket; } @VisibleForTesting ImmutableList<AvailableToPromiseResultBucket> getBuckets() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\atp\AvailableToPromiseResultBuilder.java
2
请完成以下Java代码
public class SqlBatch { @Getter private final String sqlCommand; private final ArrayList<SqlParams> rows = new ArrayList<>(); private SqlBatch(final String sqlCommand) { this.sqlCommand = sqlCommand; } public static SqlBatch ofSql(@NonNull final String sqlCommand) { return new SqlBatch(sqlCommand); } pu...
} public void addRow(@NonNull SqlParams row) { rows.add(row); } public Stream<Sql> streamSqls() {return rows.stream().map(this::toSql);} private Sql toSql(final SqlParams sqlParams) { return Sql.ofSql(sqlCommand, sqlParams); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\logger\SqlBatch.java
1
请完成以下Java代码
public static void readEmails(Store store) throws MessagingException, IOException { Folder inbox = store.getFolder("inbox"); inbox.open(Folder.READ_ONLY); Message[] messages = inbox.getMessages(); if (messages.length > 0) { Message message = messages[0]; LOGGER.in...
LOGGER.info("Delete the seventh message: " + seventhLatestMessage.getSubject()); } else { LOGGER.info("There are less than seven messages in the inbox."); } inbox.close(true); } public static void markLatestUnreadAsRead(Store store) throws MessagingException { Folder...
repos\tutorials-master\libraries-io\src\main\java\com\baeldung\java\io\accessemailwithimap\GmailApp.java
1
请完成以下Java代码
public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getRoleLevel() { return roleLevel; } public void setRoleLevel(Integer roleLevel) { this.roleLevel = r...
public int compareTo(Role o) { if(id == o.getId()){ return 0; }else if(id > o.getId()){ return 1; }else{ return -1; } } @Override public boolean equals(Object obj) { // TODO Auto-generated method stub if(obj instanceof Role){ if(this.id == ((Role)obj).getId()){ return true; } } r...
repos\springBoot-master\springboot-springSecurity4\src\main\java\com\yy\example\bean\Role.java
1
请完成以下Java代码
private boolean isInstall() { return environment.acceptsProfiles(Profiles.of("install")); } private void initSession() { if (this.keyspaceName != null) { this.sessionBuilder.withKeyspace(this.keyspaceName); } this.sessionBuilder.withLocalDatacenter(localDatacenter); ...
public void close() { if (reporter != null) { reporter.stop(); } if (session != null) { session.close(); } } public ConsistencyLevel getDefaultReadConsistencyLevel() { return driverOptions.getDefaultReadConsistencyLevel(); } public Consis...
repos\thingsboard-master\common\dao-api\src\main\java\org\thingsboard\server\dao\cassandra\AbstractCassandraCluster.java
1
请完成以下Java代码
public class UserWithView { @JsonView(InternalView.class) private Long id; @JsonView(PublicView.class) private String name; public UserWithView(Long id, String name) { this.id = id; this.name = name; } public UserWithView() { } public String getName() { r...
/** * View that is used to hide sensitive information */ public interface PublicView { } /** * View that is used to show all information */ public interface InternalView extends PublicView { } }
repos\tutorials-master\jackson-modules\jackson-annotations\src\main\java\com\baeldung\jackson\dynamicignore\UserWithView.java
1
请完成以下Java代码
public @Nullable Object invoke(MethodInvocation mi) throws Throwable { Object result = mi.proceed(); if (result == null) { return null; } Assert.notNull(this.authorizationProxyFactory, "authorizationProxyFactory cannot be null"); return this.authorizationProxyFactory.proxy(result); } /** * Use this {@...
return this.pointcut; } public void setPointcut(Pointcut pointcut) { this.pointcut = pointcut; } @Override public Advice getAdvice() { return this; } @Override public boolean isPerInstance() { return true; } static final class MethodReturnTypePointcut extends StaticMethodMatcherPointcut { private...
repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\method\AuthorizeReturnObjectMethodInterceptor.java
1
请在Spring Boot框架中完成以下Java代码
public InMemoryUserDetailsManager userDetailsService() { UserDetails user1 = User.withUsername("user1") .password(passwordEncoder().encode("user1Pass")) .roles("USER") .build(); UserDetails admin1 = User.withUsername("admin1") .password(passwordEncoder()....
return new MySimpleUrlAuthenticationSuccessHandler(); } @Bean public HttpSessionEventPublisher httpSessionEventPublisher() { return new HttpSessionEventPublisher(); } @Bean public PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } @Bean MvcRe...
repos\tutorials-master\spring-security-modules\spring-security-web-mvc\src\main\java\com\baeldung\session\security\config\SecSecurityConfig.java
2
请在Spring Boot框架中完成以下Java代码
public T pathMatchers(HttpMethod method, String... antPatterns) { List<PathPattern> pathPatterns = parsePatterns(antPatterns); return matcher(ServerWebExchangeMatchers.pathMatchers(method, pathPatterns.toArray(new PathPattern[0]))); } /** * Maps a {@link List} of {@link PathPatternParserServerWebExchangeMatche...
public T matchers(ServerWebExchangeMatcher... matchers) { return registerMatcher(new OrServerWebExchangeMatcher(matchers)); } /** * Subclasses should implement this method for returning the object that is chained to * the creation of the {@link ServerWebExchangeMatcher} instances. * @param matcher the {@link...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\web\server\AbstractServerWebExchangeMatcherRegistry.java
2
请完成以下Java代码
public static ExecutableScript getScriptFromResourceExpression(String language, Expression resourceExpression, ScriptFactory scriptFactory) { ensureNotEmpty(NotValidException.class, "Script language", language); ensureNotNull(NotValidException.class, "Script resource expression", resourceExpression); return...
} /** * Returns the configured script factory in the context or a new one. */ public static ScriptFactory getScriptFactory() { ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration(); if (processEngineConfiguration != null) { return processEngineConfi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\ScriptUtil.java
1
请完成以下Java代码
/* package */ void validateBbanLength(final String iban, final BBANStructure structure) { final int expectedBbanLength = structure.getBbanLength(); final String bban = getBBAN(iban); final int bbanLength = bban.length(); Check.assume(expectedBbanLength == bbanLength, msgBL.getMsg(Env.getCtx(), "BBAN_Length...
Check.assume(Character.isLetterOrDigit(ch), msgBL.getMsg(Env.getCtx(), "BBAN_Letters_Digits", new Object[] { entryValue })); } break; case n: for (char ch : entryValue.toCharArray()) { Check.assume(Character.isDigit(ch), msgBL.getMsg(Env.getCtx(), "BBAN_Digits", new Object[] { entryValue })); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java\de\metas\payment\sepa\api\impl\IBANValidationBL.java
1
请完成以下Java代码
private AdColumnId getAD_Column_ID() { return adColumnId; } public C_AggregationItem_Builder setIncluded_Aggregation(final I_C_Aggregation includedAggregation) { this.includedAggregation = includedAggregation; return this; } private I_C_Aggregation getIncluded_Aggregation() { return includedAggregation...
} private String getIncludeLogic() { return includeLogic; } public C_AggregationItem_Builder setC_Aggregation_Attribute(I_C_Aggregation_Attribute attribute) { this.attribute = attribute; return this; } private I_C_Aggregation_Attribute getC_Aggregation_Attribute() { return this.attribute; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java\de\metas\aggregation\model\C_AggregationItem_Builder.java
1
请完成以下Java代码
public InputStream connectNext(final boolean lastWasSuccess) { if (currentStream != null) { try { // note: close alone didn't suffice (at least in WinXP when // running in eclipse debug session) currentStream.getFD().sync(); currentStream.close(); } catch (IOException e) { throw...
{ ConfigException.throwNew(ConfigException.FILE_ACCESS_FAILED_2P, currentFile.getAbsolutePath(), e.getMessage()); } } return null; } @Override public List<Parameter> getParameters() { final List<Parameter> result = new ArrayList<Parameter>(); result.add(new Parameter(IInboundProcessorBL.LOCA...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\impex\spi\impl\FileImporter.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO (Properties ctx) { org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName()); return poi; } /** Set Country Area. @param C_CountryArea_ID Country Area */ @Override public void setC_CountryArea_ID (int C_Cou...
public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Name */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set Suchschlüssel. @param Value Suchschlüssel für den Eintrag im erforderlich...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CountryArea.java
1
请完成以下Java代码
public static String convertJpg2Pdf(String strJpgFile, String strPdfFile) throws Exception { Document document = new Document(); RandomAccessFileOrArray rafa = null; FileOutputStream outputStream = null; try { RandomAccessFile aFile = new RandomAccessFile(strJpgFile, "r"); ...
throw new Exception(e); } finally { if (document != null) { document.close(); } if (rafa != null) { rafa.close(); } if (outputStream != null) { outputStream.close(); } } return...
repos\kkFileView-master\server\src\main\java\cn\keking\utils\ConvertPicUtil.java
1
请完成以下Java代码
public synchronized void reload(final InboundEMailConfig config) { final InboundEMailConfigId configId = config.getId(); final InboundEMailConfig loadedConfig = loadedConfigs.get(configId); if (loadedConfig != null && loadedConfig.equals(config)) { logger.info("Skip reloading {} because it's already loaded ...
.register(); loadedConfigs.put(config.getId(), config); logger.info("Loaded inbound mail for {}", config); } private IntegrationFlow createIntegrationFlow(final InboundEMailConfig config) { return IntegrationFlows .from(Mail.imapIdleAdapter(config.getUrl()) .javaMailProperties(p -> p.put("mail.deb...
repos\metasfresh-new_dawn_uat\backend\de.metas.inbound.mail\src\main\java\de\metas\inbound\mail\InboundEMailServer.java
1
请完成以下Java代码
public void setStorno(Boolean value) { this.storno = value; } /** * Gets the value of the copy property. * * @return * possible object is * {@link Boolean } * */ public boolean isCopy() { if (copy == null) { return false; ...
/** * Gets the value of the responseTimestamp property. * */ public int getResponseTimestamp() { return responseTimestamp; } /** * Sets the value of the responseTimestamp property. * */ public void setResponseTimestamp(int value) { this.responseTimestamp ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\response\PayloadType.java
1
请完成以下Java代码
public class ContractChangeDAO extends AbstractContractChangeDAO { @Override public I_C_Contract_Change retrieveChangeConditions( final I_C_Flatrate_Term term, final int newSubscriptionId, final Timestamp changeDate) { final String where = X_C_Contract_Change.COLUMNNAME_Action + "='" + X_C_Contract_Chang...
final List<I_C_Contract_Change> entries = new Query(ctx, I_C_Contract_Change.Table_Name, where, trxName) .setParameters(term.getC_Flatrate_Transition_ID(), term.getC_Flatrate_Conditions_ID(), newSubscriptionId) .setOnlyActiveRecords(true) .setClient_ID() .setOrderBy(I_C_Contract_Change.COLUMNNAME_C_Cont...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\impl\ContractChangeDAO.java
1
请完成以下Spring Boot application配置
#primary spring.primary.datasource.url=jdbc:mysql://localhost:3306/test1 spring.primary.datasource.username=root spring.primary.datasource.password=root spring.primary.datasource.driver-class-name=com.mysql.jdbc.Driver #secondary spring.secondary.datasource.url=jdbc:mysql://localhost:3306/test2 spring.secondary.datasou...
bc.Driver #multiple Setting spring.jpa.properties.hibernate.hbm2ddl.auto=update spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect spring.jpa.show-sql= true
repos\spring-boot-leaning-master\1.x\第04课:Spring Data Jpa 的使用\spring-boot-multi-Jpa\src\main\resources\application.properties
2
请完成以下Java代码
public Tags apply(ServerWebExchange exchange) { String outcome = "CUSTOM"; String status = "CUSTOM"; String httpStatusCodeStr = "NA"; String httpMethod = exchange.getRequest().getMethod().name(); // a non standard HTTPS status could be used. Let's be defensive here // it needs to be checked for first, oth...
httpStatusCodeStr = status; HttpStatus resolved = HttpStatus.resolve(statusInt); if (resolved != null) { // this is not a CUSTOM status, so use series here. outcome = resolved.series().name(); status = resolved.name(); } } } return Tags.of("outcome", outcome, "status", status, "httpSt...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\support\tagsprovider\GatewayHttpTagsProvider.java
1
请完成以下Java代码
public class StartCreatedProcessInstanceCmd<T> implements Command<ProcessInstance>, Serializable { private static final long serialVersionUID = 1L; private ProcessInstance internalProcessInstance; private Map<String, Object> variables; public StartCreatedProcessInstanceCmd(ProcessInstance internalProc...
ExecutionEntity processExecution = (ExecutionEntity) internalProcessInstance; ProcessInstanceHelper processInstanceHelper = commandContext .getProcessEngineConfiguration() .getProcessInstanceHelper(); Process process = ProcessDefinitionUtil.getProcess(internalProcessInstance.getP...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\StartCreatedProcessInstanceCmd.java
1
请完成以下Java代码
public static boolean set(String key, Object val, long cacheTime){ // clean timeout cache, before set new cache (avoid cache too much) cleanTimeoutCache(); // set new cache if (key==null || key.trim().length()==0) { return false; } if (val == null) { ...
* get cache * * @param key * @return */ public static Object get(String key){ if (key==null || key.trim().length()==0) { return null; } LocalCacheData localCacheData = cacheRepository.get(key); if (localCacheData!=null && System.currentTimeMillis()<loc...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\util\LocalCacheUtil.java
1
请完成以下Java代码
static class PostgresDbR2dbcDockerComposeConnectionDetails extends DockerComposeConnectionDetails implements R2dbcConnectionDetails { private static final Option<String> APPLICATION_NAME = Option.valueOf("applicationName"); private static final ConnectionFactoryOptionsBuilder connectionFactoryOptionsBuilder = ...
ConnectionFactoryOptions connectionFactoryOptions = connectionFactoryOptionsBuilder.build(service, env.getDatabase(), env.getUsername(), env.getPassword()); return addApplicationNameIfNecessary(connectionFactoryOptions, environment); } private static ConnectionFactoryOptions addApplicationNameIfNecessary( ...
repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\docker\compose\PostgresR2dbcDockerComposeConnectionDetailsFactory.java
1
请在Spring Boot框架中完成以下Java代码
public void doSignatureValidation(JoinPoint point) throws Exception { // 获取方法上的注解 MethodSignature signature = (MethodSignature) point.getSignature(); Method method = signature.getMethod(); SignatureCheck signatureCheck = method.getAnnotation(SignatureCheck.class); log.in...
if ("Sign签名校验失败!".equals(errorMessage)) { // 如果是默认错误消息,使用原始的详细错误信息 throw e; } else { // 如果是自定义错误消息,使用自定义消息 throw new IllegalArgumentException(errorMessage, e); } } catch (Exception e) { // 包装其他异常 Stri...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\sign\aspect\SignatureCheckAspect.java
2
请完成以下Java代码
public Long execute(CommandContext commandContext) { ProcessEngineConfigurationImpl engineConfig = getProcessEngineConfiguration(commandContext); configureAuthCheck(parameter, engineConfig, commandContext); return (Long) commandContext.getDbSqlSession().selectOne(statement, parameter); } } ...
protected String statement; protected Object parameter; protected Class clazz; public <T> ExecuteSingleQueryCmd(String statement, Object parameter, Class<T> clazz) { this.statement = statement; this.parameter = parameter; this.clazz = clazz; } @Override public T execute(Comma...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\db\QueryServiceImpl.java
1
请完成以下Java代码
public void onMessage(MapRecord<String, String, String> record) { counter.incrementAndGet(); deque.add(record); } /** * @return new instance of {@link CapturingStreamListener}. */ public static CapturingStreamListener create() { return new CapturingStreamListener(); } /** * @return the total number ...
*/ public int recordsReceived() { return counter.get(); } /** * Retrieves and removes the head of the queue waiting if * necessary until an element becomes available. * * @return * @throws InterruptedException if interrupted while waiting */ public MapRecord<String, String, String> take() throws Inte...
repos\spring-data-examples-main\redis\streams\src\main\java\example\springdata\redis\sync\CapturingStreamListener.java
1
请完成以下Java代码
public Builder setIdFieldName(final String idFieldName) { this.idFieldName = idFieldName; return this; } private String getIdFieldName() { return idFieldName; } public Builder setHasAttributesSupport(final boolean hasAttributesSupport) { this.hasAttributesSupport = hasAttributesSupport; r...
return this; } public Builder setTreeCollapsible(final boolean treeCollapsible) { this.treeCollapsible = treeCollapsible; return this; } public Builder setTreeExpandedDepth(final int treeExpandedDepth) { this.treeExpandedDepth = treeExpandedDepth; return this; } public Builder setAllowOpe...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\descriptor\ViewLayout.java
1
请在Spring Boot框架中完成以下Java代码
public List<Menu> getMenus() { return menus; } public void setMenus(List<Menu> menus) { this.menus = menus; } public Theme getThemes() { return themes; } public void setThemes(Theme themes) { this.themes = themes; } public List<Server> getServers() {
return servers; } public void setServers(List<Server> servers) { this.servers = servers; } @Override public String toString() { return "WordpressProperties{" + "menus=" + menus + ", themes=" + themes + ", servers=" + servers + ...
repos\spring-boot-master\yaml-simple\src\main\java\com\mkyong\config\WordpressProperties.java
2
请完成以下Java代码
public void run(){ if (graph.size() > 0){ graph.get(0).setVisited(true); } while (isDisconnected()){ Edge nextMinimum = new Edge(Integer.MAX_VALUE); Vertex nextVertex = graph.get(0); for (Vertex vertex : graph){ if (vertex.isVisited...
public String originalGraphToString(){ StringBuilder sb = new StringBuilder(); for (Vertex vertex : graph){ sb.append(vertex.originalToString()); } return sb.toString(); } public void resetPrintHistory(){ for (Vertex vertex : graph){ Iterator<Map....
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-5\src\main\java\com\baeldung\algorithms\prim\Prim.java
1
请完成以下Java代码
public Integer getUsePointLimitNew() { return usePointLimitNew; } public void setUsePointLimitNew(Integer usePointLimitNew) { this.usePointLimitNew = usePointLimitNew; } public String getOperateMan() { return operateMan; } public void setOperateMan(String operateMan) {...
sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", productId=").append(productId); sb.append(", priceOld=").append(priceOld); sb.append(", priceNew=").append(priceNew); sb.ap...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProductOperateLog.java
1
请完成以下Java代码
public boolean isConstant() { return constantValue != null; } @Override public boolean constantValue() { if (constantValue == null) { throw ExpressionEvaluationException.newWithTranslatableMessage("Not a constant expression: " + this); } return constantValue; } @Override public ILogicExpression t...
return _parameters; } /** * @return {@link CtxName} or {@link String}; never returns null */ public Object getOperand1() { return operand1; } /** * @return {@link CtxName} or {@link String}; never returns null */ public Object getOperand2() { return operand2; } /** * @return operator; never r...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\LogicTuple.java
1
请完成以下Java代码
public void setHtmlText(String htmlText) { editor.setText(htmlText); } public String getHtmlText() { try { StringWriter sw = new StringWriter(); new AltHTMLWriter(sw, editor.getDocument()).write(); // new HTMLWriter(sw, editor.document).write(); String html = sw.toString(); return html; } ...
{ if (e instanceof Dialog) { parent = (Dialog)e; break; } e = e.getParent(); } return parent; } public boolean print() { throw new UnsupportedOperationException(); } public static boolean isHtml(String s) { if (s == null) return false; String s2 = s.trim().toUpperCase(); retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\RichTextEditor.java
1
请完成以下Java代码
protected String doIt() throws Exception { final I_ESR_Import esrImport = retrieveESR_Import(); ESRImportEnqueuer.newInstance() .esrImport(esrImport) .fromDataSource(ESRImportEnqueuerDataSource.ofFile(p_FileName)) // .asyncBatchName(p_AsyncBatchName) .asyncBatchDesc(p_AsyncBatchDesc) .pinst...
if (p_ESR_Import_ID <= 0) { if (I_ESR_Import.Table_Name.equals(getTableName())) { p_ESR_Import_ID = getRecord_ID(); } if (p_ESR_Import_ID <= 0) { throw new FillMandatoryException(I_ESR_Import.COLUMNNAME_ESR_Import_ID); } } final I_ESR_Import esrImport = InterfaceWrapperHelper.create(get...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\process\ESR_Import_LoadFromFile.java
1
请完成以下Java代码
public HistoricActivityInstanceQueryImpl activityInstanceId(String activityInstanceId) { this.activityInstanceId = activityInstanceId; return this; } // getters and setters // ////////////////////////////////////////////////////// public String getProcessInstanceId() { return p...
public boolean isFinished() { return finished; } public boolean isUnfinished() { return unfinished; } public String getActivityInstanceId() { return activityInstanceId; } public String getDeleteReason() { return deleteReason; } public String getDeleteR...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\HistoricActivityInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
protected static final <T extends AbstractTranslationEntity<?>> Map<String, T> mapByLanguage(final List<T> list) { if (list.isEmpty()) { return new HashMap<>(); } final Map<String, T> map = new HashMap<>(list.size()); for (final T e : list) { map.put(e.getLanguage(), e); } return map; } /** ...
protected <T extends IConfirmableDTO> T assertNotDeleteRequest_WarnAndFix(@NonNull final T syncModel, final String reason) { if (syncModel.isDeleted()) { logger.warn("Setting Deleted flag to " + syncModel + " is not allowed while: " + reason + ". Unsetting the flag and going forward."); return (T)syncModel.w...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\sync\AbstractSyncImportService.java
2
请在Spring Boot框架中完成以下Java代码
public class AppController { @Autowired private AppManagement appManagement; @GetMapping("/names.json") public Result<List<String>> queryApps(HttpServletRequest request) { return Result.ofSuccess(appManagement.getAppNames()); } @GetMapping("/briefinfos.json") public Result<List<Ap...
Collections.sort(list, Comparator.comparing(MachineInfo::getApp).thenComparing(MachineInfo::getIp).thenComparingInt(MachineInfo::getPort)); return Result.ofSuccess(MachineInfoVo.fromMachineInfoList(list)); } @RequestMapping(value = "/{app}/machine/remove.json") public Result<String> removeMachi...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\controller\AppController.java
2
请完成以下Java代码
public String getEntityType () { return (String)get_Value(COLUMNNAME_EntityType); } /** Set Field Value. @param FieldValue Field Value */ public void setFieldValue (String FieldValue) { set_Value (COLUMNNAME_FieldValue, FieldValue); } /** Get Field Value. @return Field Value */ public String getF...
/** Get Reihenfolge. @return Zur Bestimmung der Reihenfolge der Eintraege; die kleinste Zahl kommt zuerst */ public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) return 0; return ii.intValue(); } /** Type AD_Reference_ID=540203 */ public static final int TYPE...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_AD_TriggerUI_Action.java
1
请完成以下Java代码
static ZonedDateTime computeOrderLineDeliveryDate( @NonNull final I_C_OrderLine orderLine, @NonNull final I_C_Order order) { final ZonedDateTime presetDateShipped = TimeUtil.asZonedDateTime(orderLine.getPresetDateShipped()); if (presetDateShipped != null) { return presetDateShipped; } // Fetch it f...
// Fail miserably... throw new AdempiereException("@NotFound@ @DeliveryDate@") .appendParametersToMessage() .setParameter("oderLine", orderLine) .setParameter("order", order); } private static DocumentLineDescriptor createDocumentLineDescriptor( @NonNull final OrderAndLineId orderAndLineId, @NonN...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\spi\impl\ShipmentScheduleOrderReferenceProvider.java
1
请在Spring Boot框架中完成以下Java代码
public class MySimpleUrlAuthenticationSuccessHandler implements AuthenticationSuccessHandler { private final Log logger = LogFactory.getLog(this.getClass()); private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy(); protected MySimpleUrlAuthenticationSuccessHandler() { super(); ...
} else { throw new IllegalStateException(); } } /** * Removes temporary authentication-related data which may have been stored in the session * during the authentication process. */ protected final void clearAuthenticationAttributes(final HttpServletRequest request) { ...
repos\tutorials-master\spring-security-modules\spring-security-web-persistent-login\src\main\java\com\baeldung\security\MySimpleUrlAuthenticationSuccessHandler.java
2
请在Spring Boot框架中完成以下Java代码
public WebSecurityCustomizer debugSecurity() { return (web) -> web.debug(true); } @Bean public InMemoryUserDetailsManager userDetailsService() { UserDetails user = User.withUsername("user") .password(encoder().encode("userPass")) .roles("ADMIN") .build(); ...
} @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http.authorizeHttpRequests((authorize) -> authorize.requestMatchers("/admin/**") .hasRole("ADMIN") .anyRequest() .permitAll()) ...
repos\tutorials-master\spring-security-modules\spring-security-core-2\src\main\java\com\baeldung\httpsecurityvswebsecurity\SecurityConfiguration.java
2
请完成以下Java代码
public HistoricDetailQueryImpl orderByVariableRevision() { orderBy(HistoricDetailQueryProperty.VARIABLE_REVISION); return this; } public HistoricDetailQueryImpl orderByVariableType() { orderBy(HistoricDetailQueryProperty.VARIABLE_TYPE); return this; } // getters and set...
public String getType() { return type; } public boolean getExcludeTaskRelated() { return excludeTaskRelated; } public String getExecutionId() { return executionId; } public String getActivityInstanceId() { return activityInstanceId; } }
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\HistoricDetailQueryImpl.java
1
请完成以下Java代码
public Flux<ZipCode> postZipCode(@RequestParam String city) { return zipRepo.findByCity(city); } @PostMapping public Mono<ZipCode> create(@RequestBody ZipCode zipCode) { return getById(zipCode.getZip()) .switchIfEmpty(Mono.defer(createZipCode(zipCode))) .onEr...
private boolean isKeyDuplicated(Throwable ex) { return ex instanceof DataIntegrityViolationException || ex instanceof UncategorizedR2dbcException; } private Function<? super Throwable, ? extends Mono<ZipCode>> recoverWith(ZipCode zipCode) { return throwable -> zipRepo.findById(zipCode.getZip())...
repos\tutorials-master\quarkus-modules\quarkus-vs-springboot\spring-project\src\main\java\com\baeldung\spring_project\ZipCodeApi.java
1
请完成以下Java代码
public List<Coordinate> solve(Maze maze) { LinkedList<Coordinate> nextToVisit = new LinkedList<>(); Coordinate start = maze.getEntry(); nextToVisit.add(start); while (!nextToVisit.isEmpty()) { Coordinate cur = nextToVisit.remove(); if (!maze.isValidLocation(cur....
} return Collections.emptyList(); } private List<Coordinate> backtrackPath(Coordinate cur) { List<Coordinate> path = new ArrayList<>(); Coordinate iter = cur; while (iter != null) { path.add(iter); iter = iter.parent; } return path; ...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-2\src\main\java\com\baeldung\algorithms\maze\solver\BFSMazeSolver.java
1
请完成以下Java代码
public static String processPattern(String pattern, TbMsg tbMsg) { try { String result = processPattern(pattern, tbMsg.getMetaData()); JsonNode json = JacksonUtil.toJsonNode(tbMsg.getData()); result = result.replace(ALL_DATA_TEMPLATE, JacksonUtil.toString(json)); ...
String result = template; for (Map.Entry<String, String> kv : data.entrySet()) { result = processVar(result, kv.getKey(), kv.getValue()); } return result; } private static String processVar(String pattern, String key, String val) { return pattern.replace(formatMetada...
repos\thingsboard-master\rule-engine\rule-engine-api\src\main\java\org\thingsboard\rule\engine\api\util\TbNodeUtils.java
1
请在Spring Boot框架中完成以下Java代码
public String getPlatform() { return this.platform; } public void setPlatform(String platform) { this.platform = platform; } public @Nullable String getUsername() { return this.username; } public void setUsername(@Nullable String username) { this.username = username; } public @Nullable String getPas...
public void setContinueOnError(boolean continueOnError) { this.continueOnError = continueOnError; } public String getSeparator() { return this.separator; } public void setSeparator(String separator) { this.separator = separator; } public @Nullable Charset getEncoding() { return this.encoding; } publ...
repos\spring-boot-4.0.1\module\spring-boot-sql\src\main\java\org\springframework\boot\sql\autoconfigure\init\SqlInitializationProperties.java
2
请在Spring Boot框架中完成以下Java代码
public Money toMoney() {return relativeValue;} public @NonNull BigDecimal toBigDecimal() {return toMoney().toBigDecimal();} public Money toRealValueAsMoney() {return multiplier.convertToRealValue(relativeValue);} public BigDecimal toRealValueAsBigDecimal() {return toRealValueAsMoney().toBigDecimal();} public bo...
} public InvoiceTotal withCMAdjusted() { if (multiplier.isCreditMemoAdjusted()) { return this; } else if (multiplier.isCreditMemo()) { return new InvoiceTotal(relativeValue.negate(), multiplier.withCMAdjusted(true)); } else { return new InvoiceTotal(relativeValue, multiplier.withCMAdjusted(t...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\service\impl\InvoiceTotal.java
2
请完成以下Java代码
public org.compiere.model.I_M_AttributeSearch getM_AttributeSearch() { return get_ValueAsPO(COLUMNNAME_M_AttributeSearch_ID, org.compiere.model.I_M_AttributeSearch.class); } @Override public void setM_AttributeSearch(final org.compiere.model.I_M_AttributeSearch M_AttributeSearch) { set_ValueFromPO(COLUMNNAME_...
set_ValueNoCheck (COLUMNNAME_Value, Value); } @Override public java.lang.String getValue() { return get_ValueAsString(COLUMNNAME_Value); } @Override public void setValueMax (final @Nullable BigDecimal ValueMax) { set_Value (COLUMNNAME_ValueMax, ValueMax); } @Override public BigDecimal getValueMax() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Attribute.java
1
请完成以下Java代码
static Money extractLineNetAmt(final I_C_OrderLine orderLine) { return Money.of(orderLine.getLineNetAmt(), CurrencyId.ofRepoId(orderLine.getC_Currency_ID())); } static Quantity extractQtyEntered(final I_C_OrderLine orderLine) { final UomId uomId = UomId.ofRepoId(orderLine.getC_UOM_ID()); return Quantitys.of(...
String getDescriptionBottomById(@NonNull OrderId orderId); String getDescriptionById(@NonNull OrderId orderId); void setShipperId(@NonNull I_C_Order order); default boolean isLUQtySet(final @NonNull de.metas.interfaces.I_C_OrderLine orderLine) { final BigDecimal luQty = orderLine.getQtyLU(); return luQty != ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\IOrderBL.java
1
请完成以下Java代码
protected Date calculateRemovalTime(HistoricDecisionInstanceEntity historicDecisionInstance, DecisionDefinition decisionDefinition) { return Context.getProcessEngineConfiguration() .getHistoryRemovalTimeProvider() .calculateRemovalTime(historicDecisionInstance, decisionDefinition); } protected void...
protected boolean isHistoryRemovalTimeStrategyStart() { return HISTORY_REMOVAL_TIME_STRATEGY_START.equals(getHistoryRemovalTimeStrategy()); } protected String getHistoryRemovalTimeStrategy() { return Context.getProcessEngineConfiguration() .getHistoryRemovalTimeStrategy(); } protected HistoricPr...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\producer\DefaultDmnHistoryEventProducer.java
1
请完成以下Java代码
public BatchStatisticsQuery withoutTenantId() { this.tenantIds = null; isTenantIdSet = true; return this; } public BatchStatisticsQuery active() { this.suspensionState = SuspensionState.ACTIVE; return this; } public BatchStatisticsQuery suspended() { this.suspensionState = SuspensionSt...
public SuspensionState getSuspensionState() { return suspensionState; } public BatchStatisticsQuery orderById() { return orderBy(BatchQueryProperty.ID); } @Override public BatchStatisticsQuery orderByTenantId() { return orderBy(BatchQueryProperty.TENANT_ID); } @Override public BatchStatis...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\BatchStatisticsQueryImpl.java
1
请完成以下Java代码
public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } public String getRootProcessInstanceId() { return rootProcessInstanceId; } public void setRootProcessInstanceId(String rootProcessInstanceId) { this.rootProcessInstanceI...
public String toString() { return this.getClass().getSimpleName() + "[taskId=" + taskId + ", deploymentId=" + deploymentId + ", processDefinitionKey=" + processDefinitionKey + ", jobId=" + jobId + ", jobDefinitionId=" + jobDefinitionId + ", batchId=" + batchId ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\UserOperationLogEntryEventEntity.java
1
请在Spring Boot框架中完成以下Java代码
public int getLockTimeInMillis() { return jobExecutor.getLockTimeInMillis(); } public void setLockTimeInMillis(int lockTimeInMillis) { jobExecutor.setLockTimeInMillis(lockTimeInMillis); } public String getLockOwner() { return jobExecutor.getLockOwner(); } public void setLockOwner(String lockO...
jobExecutor.setMaxJobsPerAcquisition(maxJobsPerAcquisition); } public String getName() { return jobExecutor.getName(); } public JobExecutor getValue() { return jobExecutor; } public boolean isActive() { return jobExecutor.isActive(); } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\jmx\services\JmxManagedJobExecutor.java
2
请完成以下Java代码
public final class RedisSessionMapper implements BiFunction<String, Map<String, Object>, MapSession> { /** * The key in the hash representing {@link Session#getCreationTime()}. */ static final String CREATION_TIME_KEY = "creationTime"; /** * The key in the hash representing {@link Session#getLastAccessedTime...
if (creationTime == null) { handleMissingKey(CREATION_TIME_KEY); } session.setCreationTime(Instant.ofEpochMilli(creationTime)); Long lastAccessedTime = (Long) map.get(LAST_ACCESSED_TIME_KEY); if (lastAccessedTime == null) { handleMissingKey(LAST_ACCESSED_TIME_KEY); } session.setLastAccessedTime(Instan...
repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\RedisSessionMapper.java
1
请在Spring Boot框架中完成以下Java代码
private JsonResponseBPartnerCompositeUpsertItem getResponseItemBySourceBPIdentifier( @NonNull final String sourceBPIdentifier, @NonNull final List<JsonResponseBPartnerCompositeUpsertItem> responseItems) { return responseItems .stream() .filter(upsertItem -> upsertItem.getResponseBPartnerItem() != null ...
} @NonNull private JsonMetasfreshId getFirstLocationMFId(@NonNull final JsonResponseBPartnerCompositeUpsertItem bpartnerUpsertResponseItem) { if (bpartnerUpsertResponseItem.getResponseLocationItems() == null || bpartnerUpsertResponseItem.getResponseLocationItems().isEmpty()) { throw new RuntimeCamelException...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\de-metas-camel-alberta-camelroutes\src\main\java\de\metas\camel\externalsystems\alberta\patient\processor\CreateBPRelationReqProcessor.java
2
请完成以下Java代码
public int getAD_Role_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_Role_ID); if (ii == null) return 0; return ii.intValue(); } /** Set AD_Window_Access. @param AD_Window_Access_ID AD_Window_Access */ @Override public void setAD_Window_Access_ID (int AD_Window_Access_ID) { if (AD_Window_...
else set_ValueNoCheck (COLUMNNAME_AD_Window_ID, Integer.valueOf(AD_Window_ID)); } /** Get Fenster. @return Data entry or display window */ @Override public int getAD_Window_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_Window_ID); if (ii == null) return 0; return ii.intValue(); } /*...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Window_Access.java
1
请在Spring Boot框架中完成以下Java代码
public TimeUnit getBaseTimeUnit() { return this.baseTimeUnit; } public void setBaseTimeUnit(TimeUnit baseTimeUnit) { this.baseTimeUnit = baseTimeUnit; } public Map<String, Meter> getMeter() { return this.meter; } /** * Per-meter settings. */ public static class Meter { /** * Maximum number of ...
public void setMaxBucketCount(@Nullable Integer maxBucketCount) { this.maxBucketCount = maxBucketCount; } public @Nullable HistogramFlavor getHistogramFlavor() { return this.histogramFlavor; } public void setHistogramFlavor(@Nullable HistogramFlavor histogramFlavor) { this.histogramFlavor = histogram...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\otlp\OtlpMetricsProperties.java
2