instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public List<Object> getAllPrincipals() {
throw new UnsupportedOperationException("SpringSessionBackedSessionRegistry does "
+ "not support retrieving all principals, since Spring Session provides "
+ "no way to obtain that information");
}
@Override
public List<SessionInformation> getAllSessions(Object pr... | /*
* This is a no-op, as we don't administer sessions ourselves.
*/
@Override
public void removeSessionInformation(String sessionId) {
}
/**
* Derives a String name for the given principal.
* @param principal as provided by Spring Security
* @return name of the principal, or its {@code toString()} repres... | repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\security\SpringSessionBackedSessionRegistry.java | 1 |
请完成以下Java代码 | public WorkPackageBuilder setAsyncBatchId(@Nullable final AsyncBatchId asyncBatchId)
{
if (asyncBatchId == null)
{
return this;
}
assertNotBuilt();
this.asyncBatchId = asyncBatchId;
this.asyncBatchSet = true;
return this;
}
@Override
public IWorkPackageBuilder setAD_PInstance_ID(final PInstance... | if (userInChargeId != null)
{
workPackage.setAD_User_InCharge_ID(userInChargeId.getRepoId());
}
@SuppressWarnings("deprecation") // Suppressing the warning, because *this class* is the workpackage builder to be used
final I_C_Queue_WorkPackage enqueuedWorkpackage = workPackageQueue.enqueueWorkPackag... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\api\impl\WorkPackageBuilder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HibernateConf {
@Autowired
private Environment env;
@Bean
public LocalSessionFactoryBean sessionFactory() {
final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean();
sessionFactory.setDataSource(dataSource());
sessionFactory.setPackagesToScan(ne... | dataSource.setPassword(Preconditions.checkNotNull(env.getProperty("jdbc.pass")));
return dataSource;
}
@Bean
public PlatformTransactionManager hibernateTransactionManager() {
final HibernateTransactionManager transactionManager = new HibernateTransactionManager();
transactionManage... | repos\tutorials-master\persistence-modules\spring-hibernate-6\src\main\java\com\baeldung\hibernate\bootstrap\HibernateConf.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public CmmnDeploymentQuery orderByDeploymentTime() {
return orderBy(CmmnDeploymentQueryProperty.DEPLOY_TIME);
}
@Override
public CmmnDeploymentQuery orderByDeploymentName() {
return orderBy(CmmnDeploymentQueryProperty.DEPLOYMENT_NAME);
}
@Override
public CmmnDeploymentQuery ord... | public String getParentDeploymentIdLike() {
return parentDeploymentIdLike;
}
public List<String> getParentDeploymentIds() {
return parentDeploymentIds;
}
public boolean isLatest() {
return latest;
}
public String getTenantId() {
return tenantId;
}
publ... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\repository\CmmnDeploymentQueryImpl.java | 2 |
请完成以下Java代码 | public static UOMConversionRate one(@NonNull final UomId uomId)
{
return builder()
.fromUomId(uomId)
.toUomId(uomId)
.fromToMultiplier(BigDecimal.ONE)
.toFromMultiplier(BigDecimal.ONE)
.build();
}
public UOMConversionRate invert()
{
if (fromUomId.equals(toUomId))
{
return this;
}
... | public static BigDecimal computeInvertedMultiplier(@NonNull final BigDecimal multiplier)
{
if (multiplier.signum() == 0)
{
throw new AdempiereException("Multiplier shall not be ZERO");
}
return NumberUtils.stripTrailingDecimalZeros(BigDecimal.ONE.divide(multiplier, 12, RoundingMode.HALF_UP));
}
public Bi... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\uom\UOMConversionRate.java | 1 |
请完成以下Java代码 | protected void stopExecutingJobs() {
stopJobAcquisitionThread();
}
public void executeJobs(List<String> jobIds, ProcessEngineImpl processEngine) {
try {
threadPoolExecutor.execute(getExecuteJobsRunnable(jobIds, processEngine));
} catch (RejectedExecutionException e) {
logRejectedExecution... | logJobExecutionInfo(processEngine, threadPoolExecutor.getQueue().size(), totalQueueCapacity,
threadPoolExecutor.getMaximumPoolSize(), threadPoolExecutor.getPoolSize());
}
}
// getters / setters
public ThreadPoolExecutor getThreadPoolExecutor() {
return threadPoolExecutor;
}
public void se... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\ThreadPoolJobExecutor.java | 1 |
请完成以下Java代码 | public void setC_HierarchyCommissionSettings_ID (final int C_HierarchyCommissionSettings_ID)
{
if (C_HierarchyCommissionSettings_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_HierarchyCommissionSettings_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_HierarchyCommissionSettings_ID, C_HierarchyCommissionSettings_ID... | else
set_Value (COLUMNNAME_M_Product_Category_ID, M_Product_Category_ID);
}
@Override
public int getM_Product_Category_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_Category_ID);
}
@Override
public void setPercentOfBasePoints (final BigDecimal PercentOfBasePoints)
{
set_Value (COLUMNNAME_PercentO... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\commission\model\X_C_CommissionSettingsLine.java | 1 |
请完成以下Java代码 | protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_T_MRP_CRP[")
.append(get_ID()).append("]");
return sb.toString();
}
public I_AD_... | */
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Sequence.
@param SeqNo
Method of ordering records; lowest number comes first
*/
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Sequence.
@return M... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_T_MRP_CRP.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getPayPwd() {
return payPwd;
}
public void setPayPwd(String payPwd) {
this.payPwd = payPwd;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public String getPassword() {
return password;
}
public void setPassword(String... | }
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName == null ? null : userName.trim();
}
public String getAccountNo() {
return accountNo;
}
public void setAccountNo(String accountNo) {
this.... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\entity\RpUserInfo.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class PredicateProperties {
@NotNull
private @Nullable String name;
private Map<String, String> args = new LinkedHashMap<>();
public PredicateProperties() {
}
public PredicateProperties(String text) {
int eqIdx = text.indexOf('=');
if (eqIdx <= 0) {
throw new ValidationException(
"Unable to... | this.args = args;
}
public void addArg(String key, String value) {
this.args.put(key, value);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PredicateProperties that = (PredicateProperties) o;
return... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\config\PredicateProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class TextToSpeechService {
private OpenAiAudioSpeechModel openAiAudioSpeechModel;
@Autowired
public TextToSpeechService(OpenAiAudioSpeechModel openAiAudioSpeechModel) {
this.openAiAudioSpeechModel = openAiAudioSpeechModel;
}
public byte[] makeSpeech(String text) {
return t... | SpeechResponse response = openAiAudioSpeechModel.call(speechPrompt);
return response.getResult().getOutput();
}
public Flux<byte[]> makeSpeechStream(String text) {
SpeechPrompt speechPrompt = new SpeechPrompt(text);
Flux<SpeechResponse> responseStream = openAiAudioSpeechModel.stream(sp... | repos\tutorials-master\spring-ai-modules\spring-ai-3\src\main\java\com\baeldung\springai\transcribe\services\TextToSpeechService.java | 2 |
请完成以下Java代码 | public class SpnegoEntryPoint implements AuthenticationEntryPoint {
private static final Log LOG = LogFactory.getLog(SpnegoEntryPoint.class);
private final String forwardUrl;
private final HttpMethod forwardMethod;
private final boolean forward;
/**
* Instantiates a new spnego entry point. Using this constr... | this.forward = false;
}
}
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException ex)
throws IOException, ServletException {
if (LOG.isDebugEnabled()) {
LOG.debug("Add header WWW-Authenticate:Negotiate to " + request.getRequestURL() + ", forward: "
+ (thi... | repos\spring-security-main\kerberos\kerberos-web\src\main\java\org\springframework\security\kerberos\web\authentication\SpnegoEntryPoint.java | 1 |
请完成以下Java代码 | public void actionPerformed(ActionEvent e)
{
fireEditingStopped();
}
});
}
private final JCheckBox checkbox = new CCheckBox();
/**
* Return Selection Status as IDColumn
*
* @return value
*/
@Override
public Object getCellEditorValue()
{
return checkbox.isSelected();
}
/**
* Get visual... | * @return Component
*/
@Override
public Component getTableCellEditorComponent(final JTable table, final Object value, final boolean isSelected, final int row, final int column)
{
final boolean selected = DisplayType.toBooleanNonNull(value, false);
checkbox.setSelected(selected);
return checkbox;
}
@Overri... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\swing\table\SelectionColumnCellEditor.java | 1 |
请完成以下Java代码 | private Iterator<I_C_Invoice> retrieveSelection(@NonNull final PInstanceId pinstanceId)
{
return queryBL
.createQueryBuilder(I_C_Invoice.class)
.setOnlySelection(pinstanceId)
.create()
.iterate(I_C_Invoice.class);
}
private boolean canVoidPaidInvoice(@NonNull final I_C_Invoice invoice)
{
final ... | .recipientUserId(Env.getLoggedUserId())
.build();
notificationBL.send(userNotificationRequest);
return false;
}
return true;
}
@NonNull
private IInvoicingParams getIInvoicingParams()
{
final PlainInvoicingParams invoicingParams = new PlainInvoicingParams();
invoicingParams.setUpdateLocationAnd... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\async\spi\impl\RecreateInvoiceWorkpackageProcessor.java | 1 |
请完成以下Java代码 | protected String getCaseDefinitionKey(String caseDefinitionKeyExpression, VariableContainer variableContainer, ExpressionManager expressionManager) {
if (StringUtils.isNotEmpty(caseDefinitionKeyExpression)) {
return (String) expressionManager.createExpression(caseDefinitionKeyExpression).getValue(va... | triggerCaseTask(execution, variables);
leave(execution);
}
public void triggerCaseTask(DelegateExecution execution, Map<String, Object> variables) {
execution.setVariables(variables);
ExecutionEntity executionEntity = (ExecutionEntity) execution;
if (executionEntity.isSuspended... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\behavior\CaseTaskActivityBehavior.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PageController {
/**
* 跳转到 首页
*
* @param request 请求
*/
@GetMapping("/index")
public ModelAndView index(HttpServletRequest request) {
ModelAndView mv = new ModelAndView();
String token = (String) request.getSession().getAttribute(Consts.SESSION_KEY);
... | ModelAndView mv = new ModelAndView();
if (ObjectUtil.isNotNull(redirect) && ObjectUtil.equal(true, redirect)) {
mv.addObject("message", "请先登录!");
}
mv.setViewName("login");
return mv;
}
@GetMapping("/doLogin")
public String doLogin(HttpSession session) {
... | repos\spring-boot-demo-master\demo-session\src\main\java\com\xkcoding\session\controller\PageController.java | 2 |
请完成以下Java代码 | public void setProcessInstanceQuery(ProcessInstanceQueryDto processInstanceQuery) {
this.processInstanceQuery = processInstanceQuery;
}
public boolean isSkipIoMappings() {
return skipIoMappings;
}
public void setSkipIoMappings(boolean skipIoMappings) {
this.skipIoMappings = skipIoMappings;
}
... | return annotation;
}
public void setAnnotation(String annotation) {
this.annotation = annotation;
}
public HistoricProcessInstanceQueryDto getHistoricProcessInstanceQuery() {
return historicProcessInstanceQuery;
}
public void setHistoricProcessInstanceQuery(HistoricProcessInstanceQueryDto histori... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\ModificationDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void propagateQrForSplitHUs(@NonNull final I_M_HU sourceHU, @NonNull final ImmutableList<I_M_HU> splitHUs)
{
final ImmutableSet<HuId> idCandidatesToShareQrCode = qrCodeConfigurationService.filterSplitHUsForSharingQr(sourceHU, splitHUs);
if (idCandidatesToShareQrCode.isEmpty())
{
return;
}
final Imm... | return customHUQRCode;
}
// M_HU.Value / ExternalBarcode attribute
{
final HuId huId = handlingUnitsBL.getHUIdByValueOrExternalBarcode(scannedCode).orElse(null);
if (huId != null)
{
return getFirstQRCodeByHuId(huId);
}
}
final GS1HUQRCode gs1HUQRCode = GS1HUQRCode.fromScannedCodeOrNullIfNotH... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\service\HUQRCodesService.java | 2 |
请完成以下Java代码 | private String getWebApplicationContextAttribute() {
String dispatcherServletName = getDispatcherWebApplicationContextSuffix();
if (dispatcherServletName == null) {
return null;
}
return SERVLET_CONTEXT_PREFIX + dispatcherServletName;
}
/**
* Return the {@code <servlet-name>} to use the DispatcherServle... | }
/**
* Invoked after the springSessionRepositoryFilter is added.
* @param servletContext the {@link ServletContext}
*/
protected void afterSessionRepositoryFilter(ServletContext servletContext) {
}
/**
* Get the {@link DispatcherType} for the springSessionRepositoryFilter.
* @return the {@link Dispatc... | repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\context\AbstractHttpSessionApplicationInitializer.java | 1 |
请完成以下Java代码 | public ProductId getProductId()
{
return product != null ? ProductId.ofRepoIdOrNull(product.getKeyAsInt()) : null;
}
@Nullable
public UomId getUomId()
{
return uom == null ? null : UomId.ofRepoIdOrNull(uom.getKeyAsInt());
}
private JSONLookupValue getClearanceStatus()
{
return clearanceStatus;
}
@Nul... | @Override
public IViewRowAttributes getAttributes() throws EntityNotFoundException
{
if (attributesSupplier == null)
{
throw new EntityNotFoundException("This PPOrderLineRow does not support attributes; this=" + this);
}
final IViewRowAttributes attributes = attributesSupplier.get();
if (attributes == n... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\PPOrderLineRow.java | 1 |
请完成以下Java代码 | public boolean isUsing2FA() {
return isUsing2FA;
}
public void setUsing2FA(boolean isUsing2FA) {
this.isUsing2FA = isUsing2FA;
}
@Override
public int hashCode() {
int prime = 31;
int result = 1;
result = (prime * result) + ((email == null) ? 0 : email.hashCo... | if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
User user = (User) obj;
if (!email.equals(user.email)) {
return false;
}
return true;
}
@Override
public String toString() {
... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\rolesauthorities\model\User.java | 1 |
请完成以下Java代码 | public void onMovementQty(final I_PP_Cost_Collector cc)
{
updateDurationReal(cc);
}
/**
* Calculates and sets DurationReal based on selected PP_Order_Node
*/
private void updateDurationReal(final I_PP_Cost_Collector cc)
{
final WorkingTime durationReal = computeWorkingTime(cc);
if (durationReal == null)... | if (activityId == null)
{
return null;
}
final PPOrderRoutingActivity activity = orderRoutingRepository.getOrderRoutingActivity(activityId);
return WorkingTime.builder()
.durationPerOneUnit(activity.getDurationPerOneUnit())
.unitsPerCycle(activity.getUnitsPerCycle())
.qty(costCollectorBL.getMov... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\callout\PP_Cost_Collector.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result save(@RequestBody Picture picture, @TokenToUser AdminUser loginUser) {
if (loginUser == null) {
return ResultGenerator.genErrorResult(Constants.RESULT_CODE_NOT_LOGIN, "未登录!");
}
if (StringUtils.isEmpty(picture.getPath()) || StringUtils.isEmpty(picture.getRemark())) {
... | */
@RequestMapping(value = "/delete", method = RequestMethod.DELETE)
public Result delete(@RequestBody Integer[] ids, @TokenToUser AdminUser loginUser) {
if (loginUser == null) {
return ResultGenerator.genErrorResult(Constants.RESULT_CODE_NOT_LOGIN, "未登录!");
}
if (ids.length ... | repos\spring-boot-projects-main\SpringBoot前后端分离实战项目源码\spring-boot-project-front-end&back-end\src\main\java\cn\lanqiao\springboot3\controller\PictureController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected List<String> getFileNames(@Nullable ClassLoader classLoader) {
return Arrays.asList(StandardConfigDataLocationResolver.DEFAULT_CONFIG_NAMES);
}
/**
* Get the locations to consider. A location is a classpath location that may or may
* not use the standard {@code classpath:} prefix.
* @param classLoa... | List<PropertySourceLoader> propertySourceLoaders = getSpringFactoriesLoader(classLoader)
.load(PropertySourceLoader.class);
for (PropertySourceLoader propertySourceLoader : propertySourceLoaders) {
for (String fileExtension : propertySourceLoader.getFileExtensions()) {
String candidate = "." + fileExtension... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\ConfigDataLocationRuntimeHints.java | 2 |
请完成以下Java代码 | public String toString() {
return "VariableDeclaration[" + name + ":" + type + "]";
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
... | public String getDestinationVariableName() {
return destinationVariableName;
}
public void setDestinationVariableName(String destinationVariableName) {
this.destinationVariableName = destinationVariableName;
}
public Expression getDestinationExpression() {
return destinationExpression;
}
publ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\variable\VariableDeclaration.java | 1 |
请完成以下Java代码 | private void fireLocalAndRemoteListenersNow(@NonNull final List<SumUpTransactionStatusChangedEvent> events)
{
final IEventBus eventBus = getEventBus();
// NOTE: we don't have to fireLocalListeners
// because we assume we will also get back this event and then we will handle it
events.forEach(eventBus::enqueu... | @NonNull final SumUpTransaction trxPrev)
{
if (!isForceSendingChangeEvents() && hasChanges(trx, trxPrev))
{
return;
}
fireLocalAndRemoteListenersAfterTrxCommit(SumUpTransactionStatusChangedEvent.ofChangedTransaction(trx, trxPrev));
}
private static boolean hasChanges(final @NonNull SumUpTransaction trx,... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java\de\metas\payment\sumup\SumUpEventsDispatcher.java | 1 |
请完成以下Java代码 | public String getFilePassword() {
return filePassword;
}
public void setFilePassword(String filePassword) {
this.filePassword = filePassword;
}
public boolean getUsePasswordCache() {
return usePasswordCache;
}
public void setUsePasswordCache(boolean usePasswordCache) {... | this.name = name;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public Boolean getSkipDownLoad() {
return skipDownLoad;
}
public void setSkipDownLoad(Boolean skipDownLoad) {
this.skipDownLoad = skipDownLoad... | repos\kkFileView-master\server\src\main\java\cn\keking\model\FileAttribute.java | 1 |
请完成以下Java代码 | public int getMaxResults() {
return maxResults;
}
public Object getParameter() {
return parameter;
}
public void setFirstResult(int firstResult) {
this.firstResult = firstResult;
}
public void setMaxResults(int maxResults) {
this.maxResults = maxResults;
}
public void setParameter(Ob... | this.authCheck = authCheck;
}
public TenantCheck getTenantCheck() {
return tenantCheck;
}
public void setTenantCheck(TenantCheck tenantCheck) {
this.tenantCheck = tenantCheck;
}
public List<QueryOrderingProperty> getOrderingProperties() {
return orderingProperties;
}
public void setOrder... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\ListQueryParameterObject.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ModificationRestServiceImpl extends AbstractRestProcessEngineAware implements ModificationRestService {
public ModificationRestServiceImpl(String engineName, ObjectMapper objectMapper) {
super(engineName, objectMapper);
}
@Override
public void executeModification(ModificationDto modificationE... | HistoricProcessInstanceQueryDto historicProcessInstanceQueryDto = dto.getHistoricProcessInstanceQuery();
if(historicProcessInstanceQueryDto != null) {
HistoricProcessInstanceQuery historicProcessInstanceQuery = historicProcessInstanceQueryDto.toQuery(getProcessEngine());
builder.historicProcessInstanceQ... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\ModificationRestServiceImpl.java | 2 |
请完成以下Java代码 | public int getDoc_User_ID()
{
return handler.getDoc_User_ID(model);
}
@Override
public int getC_Currency_ID()
{
return handler.getC_Currency_ID(model);
}
@Override
public BigDecimal getApprovalAmt()
{
return handler.getApprovalAmt(model);
}
@Override
public int getAD_Client_ID()
{
return model.g... | return InterfaceWrapperHelper.getModelTableId(model);
}
@Override
public String get_TrxName()
{
return InterfaceWrapperHelper.getTrxName(model);
}
@Override
public void set_TrxName(final String trxName)
{
InterfaceWrapperHelper.setTrxName(model, trxName);
}
@Override
public boolean isActive()
{
ret... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\DocumentWrapper.java | 1 |
请完成以下Java代码 | public boolean isAvailableForAnyBPartner(@NonNull final I_M_PickingSlot pickingSlot)
{
return PickingSlotUtils.isAvailableForAnyBPartner(pickingSlot);
}
@Override
public boolean isAvailableForBPartnerId(@NonNull final I_M_PickingSlot pickingSlot, @Nullable final BPartnerId bpartnerId)
{
return PickingSlotUtil... | .collect(ImmutableList.toImmutableList());
final GlobalQRCodeService globalQRCodeService = SpringContextHolder.instance.getBean(GlobalQRCodeService.class);
return globalQRCodeService.createPDF(qrCodes);
}
@Override
public boolean isAvailableForAnyBPartner(@NonNull final PickingSlotId pickingSlotId)
{
return... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\picking\api\impl\PickingSlotBL.java | 1 |
请完成以下Java代码 | public void write(StringWriter writer, ValidationResultFormatter formatter, int maxSize) {
int printedCount = 0;
int previousLength = 0;
for (var entry : collectedResults.entrySet()) {
var element = entry.getKey();
var results = entry.getValue();
formatter.formatElement(writer, element);
... | int maxSize, int currentSize, int printedCount, ValidationResultFormatter formatter) {
boolean isLastItemToPrint = printedCount == errorCount + warningCount - 1;
if (isLastItemToPrint && currentSize <= maxSize) {
return true;
}
int remaining = errorCount + warningCount - printedCount;
int suff... | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\validation\ModelValidationResultsImpl.java | 1 |
请完成以下Java代码 | public int getExternalSystem_Service_Instance_ID()
{
return get_ValueAsInt(COLUMNNAME_ExternalSystem_Service_Instance_ID);
}
@Override
public void setExternalSystem_Status_ID (final int ExternalSystem_Status_ID)
{
if (ExternalSystem_Status_ID < 1)
set_ValueNoCheck (COLUMNNAME_ExternalSystem_Status_ID, nu... | return get_ValueAsString(COLUMNNAME_ExternalSystemMessage);
}
/**
* ExternalSystemStatus AD_Reference_ID=541502
* Reference name: ExpectedStatus
*/
public static final int EXTERNALSYSTEMSTATUS_AD_Reference_ID=541502;
/** Active = Active */
public static final String EXTERNALSYSTEMSTATUS_Active = "Active";
... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Status.java | 1 |
请完成以下Java代码 | public void setDescription (String Description)
{
if (Description != null && Description.length() > 0)
super.setDescription (Description);
else
super.setDescription (getAD_Table_ID() + "#" + getRecord_ID());
} // setDescription
/**
* Get History as htlp paragraph
* @param ConfidentialType confidenti... | history.addElement(new hr());
// User & Date
b b = new b();
final I_AD_User user = Services.get(IUserDAO.class).getById(entry.getCreatedBy());
b.addElement(user.getName());
b.addElement(" \t");
Timestamp created = entry.getCreated();
if (m_format == null)
m_format = DisplayType.getDateFormat(Di... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MChat.java | 1 |
请完成以下Java代码 | public String getName() {
return this.name;
}
/**
* Sets the name.
* @param name the name
*/
public void setName(String name) {
this.name = name;
}
@Override
public String getDescription() {
return this.description;
}
/**
* Sets the description.
* @param description the description
*/
publ... | }
/**
* Sets the package name.
* @param packageName the package name
*/
public void setPackageName(String packageName) {
this.packageName = packageName;
}
@Override
public String getBaseDirectory() {
return this.baseDirectory;
}
/**
* Sets the base directory.
* @param baseDirectory the base dire... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\project\MutableProjectDescription.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private WFProcess setScannedBarcode0(
@NonNull final WFProcess wfProcess,
@NonNull final WFActivity wfActivity,
@NonNull final String scannedBarcode)
{
return wfActivityHandlersRegistry
.getFeature(wfActivity.getWfActivityType(), SetScannedBarcodeSupport.class)
.setScannedBarcode(SetScannedBarcodeRe... | final WFActivity wfActivity = wfProcess.getActivityById(wfActivityId);
WFProcess wfProcessChanged = processor.apply(wfProcess, wfActivity);
if (!Objects.equals(wfProcess, wfProcessChanged))
{
wfProcessChanged = withUpdatedActivityStatuses(wfProcessChanged);
}
return wfProcessChanged;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.workflow.rest-api\src\main\java\de\metas\workflow\rest_api\service\WorkflowRestAPIService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void afterPropertiesSet() throws Exception {
Assert.hasText(this.servicePrincipal, "servicePrincipal must be specified");
if (this.keyTabLocation != null && this.keyTabLocation instanceof ClassPathResource) {
LOG.warn(
"Your keytab is in the classpath. This file needs special protection and shouldn'... | options.put("principal", this.servicePrincipal);
if (this.keyTabLocation != null) {
options.put("useKeyTab", "true");
options.put("keyTab", this.keyTabLocationAsString);
options.put("storeKey", "true");
}
options.put("doNotPrompt", "true");
if (this.useTicketCache) {
options.put("useTicketCache",... | repos\spring-security-main\kerberos\kerberos-client\src\main\java\org\springframework\security\kerberos\client\config\SunJaasKrb5LoginConfig.java | 2 |
请完成以下Java代码 | public void afterConnectionEstablished(WebSocketSession session) {
log.info("和客户端建立连接");
}
@Override
public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception {
session.close(CloseStatus.SERVER_ERROR);
log.error("连接异常", exception);
}
@... | // 发送消息给客户端
session.sendMessage(new TextMessage(fakeAi(receiveMessage)));
// 关闭连接
// session.close(CloseStatus.NORMAL);
}
private static String fakeAi(String input) {
if (input == null || "".equals(input)) {
return "你说什么?没听清︎";
}
return input.replace(... | repos\SpringAll-master\76.spring-boot-websocket-socketjs\src\main\java\cc\mrbird\socket\handler\MyStringWebSocketHandler.java | 1 |
请完成以下Java代码 | protected Object createMessage(InstanceEvent event, Instance instance) {
Map<String, String> messageJson = new HashMap<>();
messageJson.put("text", createContent(event, instance));
return messageJson;
}
@Override
protected String getDefaultMessage() {
return DEFAULT_MESSAGE;
}
public void setRestTemplate... | @Nullable
public String getRoom() {
return room;
}
public void setRoom(@Nullable String room) {
this.room = room;
}
@Nullable
public String getToken() {
return token;
}
public void setToken(@Nullable String token) {
this.token = token;
}
} | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\LetsChatNotifier.java | 1 |
请完成以下Java代码 | public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNam... | set_ValueNoCheck (COLUMNNAME_R_Category_ID, null);
else
set_ValueNoCheck (COLUMNNAME_R_Category_ID, Integer.valueOf(R_Category_ID));
}
/** Get Category.
@return Request Category
*/
public int getR_Category_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_R_Category_ID);
if (ii == null)
return... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_Category.java | 1 |
请完成以下Java代码 | String fixedLocation(String location, String host, String path, StripVersion stripVersion, Pattern hostPortPattern,
Pattern hostPortVersionPattern) {
final boolean doStrip = StripVersion.ALWAYS_STRIP.equals(stripVersion)
|| (StripVersion.AS_IN_REQUEST.equals(stripVersion) && !VERSIONED_PATH.matcher(path).match... | public @Nullable String getHostValue() {
return hostValue;
}
public Config setHostValue(String hostValue) {
this.hostValue = hostValue;
return this;
}
public String getProtocols() {
return protocols;
}
public Config setProtocols(String protocols) {
this.protocols = protocols;
this.hostP... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RewriteLocationResponseHeaderGatewayFilterFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
RefundItem refundItem = (RefundItem)o;
return Objects.equals(this.refundAmount, refundItem.refundAmount) &&
Objects.equals(this.lineItemId, refundItem.lineItemId) &... | sb.append(" refundAmount: ").append(toIndentedString(refundAmount)).append("\n");
sb.append(" lineItemId: ").append(toIndentedString(lineItemId)).append("\n");
sb.append(" legacyReference: ").append(toIndentedString(legacyReference)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Conv... | 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\RefundItem.java | 2 |
请完成以下Java代码 | public class FactorsOfInteger {
public static Set<Integer> getAllFactorsVer1(int n) {
Set<Integer> factors = new HashSet<>();
for (int i = 1; i <= n; i++) {
if (n % i == 0) {
factors.add(i);
}
}
return factors;
}
public static Set<Inte... | return factors;
}
public static Set<Integer> getAllFactorsVer3(int n) {
Set<Integer> factors = new HashSet<>();
int step = n % 2 == 0 ? 1 : 2;
for (int i = 1; i <= Math.sqrt(n); i += step) {
if (n % i == 0) {
factors.add(i);
factors.add(n / i)... | repos\tutorials-master\core-java-modules\core-java-numbers-5\src\main\java\com\baeldung\factors\FactorsOfInteger.java | 1 |
请完成以下Java代码 | public class FlowableHttpRequestHandlerParser extends BaseChildElementParser {
@Override
public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception {
FlowableHttpRequestHandler requestHandler = new FlowableHttpRequestHandler();
BpmnXMLUtil.a... | if (parentElement instanceof HttpServiceTask) {
((HttpServiceTask) parentElement).setHttpRequestHandler(requestHandler);
if (ImplementationType.IMPLEMENTATION_TYPE_SCRIPT.equals(requestHandler.getImplementationType())) {
parseChildElements(xtr, requestHandler, model, new ScriptIn... | repos\flowable-engine-main\modules\flowable-bpmn-converter\src\main\java\org\flowable\bpmn\converter\child\FlowableHttpRequestHandlerParser.java | 1 |
请完成以下Java代码 | public void setAD_Language (final java.lang.String AD_Language)
{
set_ValueNoCheck (COLUMNNAME_AD_Language, AD_Language);
}
@Override
public java.lang.String getAD_Language()
{
return get_ValueAsString(COLUMNNAME_AD_Language);
}
@Override
public void setC_CostClassification_Category_ID (final int C_CostC... | }
@Override
public void setIsTranslated (final boolean IsTranslated)
{
set_Value (COLUMNNAME_IsTranslated, IsTranslated);
}
@Override
public boolean isTranslated()
{
return get_ValueAsBoolean(COLUMNNAME_IsTranslated);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CostClassification_Category_Trl.java | 1 |
请完成以下Java代码 | public Class<? extends BaseElement> getHandledType() {
return EndEvent.class;
}
@Override
protected void executeParse(BpmnParse bpmnParse, EndEvent endEvent) {
ActivityImpl endEventActivity = createActivityOnCurrentScope(bpmnParse, endEvent, BpmnXMLConstants.ELEMENT_EVENT_END);
Eve... | // Cancel end event
} else if (eventDefinition instanceof CancelEventDefinition) {
ScopeImpl scope = bpmnParse.getCurrentScope();
if (scope.getProperty("type") == null || !scope.getProperty("type").equals("transaction")) {
LOGGER.warn("end event with cancelEventDefinition... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\handler\EndEventParseHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | String getResourceLocation() {
return this.resourceLocation;
}
boolean isMandatoryDirectory() {
return !this.configDataLocation.isOptional() && this.directory != null;
}
@Nullable String getDirectory() {
return this.directory;
}
@Nullable String getProfile() {
return this.profile;
}
boolean isSkippa... | }
StandardConfigDataReference other = (StandardConfigDataReference) obj;
return this.resourceLocation.equals(other.resourceLocation);
}
@Override
public int hashCode() {
return this.resourceLocation.hashCode();
}
@Override
public String toString() {
return this.resourceLocation;
}
} | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\StandardConfigDataReference.java | 2 |
请在Spring Boot框架中完成以下Java代码 | PropertyDescriptor createPropertyDescriptor(String name, PropertyDescriptor propertyDescriptor) {
String key = ConventionUtils.toDashedCase(name);
if (this.items.containsKey(key)) {
ItemMetadata itemMetadata = this.items.get(key);
ItemHint itemHint = this.hints.get(key);
return new SourcePropertyDescr... | }
@Override
protected boolean isMarkedAsNested(MetadataGenerationEnvironment environment) {
return this.delegate.isMarkedAsNested(environment);
}
@Override
protected String resolveDescription(MetadataGenerationEnvironment environment) {
String description = this.delegate.resolveDescription(environment... | repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\ConfigurationPropertiesSourceResolver.java | 2 |
请完成以下Java代码 | public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Reihenfolge.
@param SeqNo
Zur Bestimmung der Reihenfolge der Einträge; die kl... | public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Reihenfolge.
@return Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst
*/
@Override
public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\tourplanning\model\X_M_DeliveryDay.java | 1 |
请完成以下Java代码 | public String getTempleNumber() {
return TempleNumber;
}
public void setTempleNumber(String templeNumber) {
TempleNumber = templeNumber;
}
public String getTomb() {
return tomb;
}
public void setTomb(String tomb) {
this.tomb = tomb;
}
public String get... | public void setSons(List<FatherAndSonRelation> sons) {
this.sons = sons;
}
/**
* 添加友谊的关系
* @param
*/
public void addRelation(FatherAndSonRelation fatherAndSonRelation){
if(this.sons == null){
this.sons = new ArrayList<>();
}
this.sons.add(fatherAnd... | repos\springBoot-master\springboot-neo4j\src\main\java\cn\abel\neo4j\bean\King.java | 1 |
请完成以下Java代码 | public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
@Override
public void setTabLevel (final int TabLevel)
{
set_Value (COLUMNNAME_TabLevel, TabLevel);
}
@Override
public int getTabLevel()
{
... | if (Template_Tab_ID < 1)
set_Value (COLUMNNAME_Template_Tab_ID, null);
else
set_Value (COLUMNNAME_Template_Tab_ID, Template_Tab_ID);
}
@Override
public int getTemplate_Tab_ID()
{
return get_ValueAsInt(COLUMNNAME_Template_Tab_ID);
}
@Override
public void setWhereClause (final @Nullable java.lang.St... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Tab.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
/** The id of the parent activity instance. If the activity is the process definition,
{@link #getId()} and {@link #getParentActivityInstanceId()} return the same value */
public String getParentActivityInstanceId() {
return parentActivityInstanceId;
}
/** the ... | return incidents;
}
public static ActivityInstanceDto fromActivityInstance(ActivityInstance instance) {
ActivityInstanceDto result = new ActivityInstanceDto();
result.id = instance.getId();
result.parentActivityInstanceId = instance.getParentActivityInstanceId();
result.activityId = instance.getAct... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\ActivityInstanceDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BookServiceImpl implements BookService {
// 模拟数据库,存储 Book 信息
// 第五章《数据存储》会替换成 H2 数据源存储
private static Map<Long, Book> BOOK_DB = new HashMap<>();
@Override
public List<Book> findAll() {
return new ArrayList<>(BOOK_DB.values());
}
@Override
public Book insertByBook... | @Override
public Book update(Book book) {
BOOK_DB.put(book.getId(), book);
return book;
}
@Override
public Book delete(Long id) {
return BOOK_DB.remove(id);
}
@Override
public Book findById(Long id) {
return BOOK_DB.get(id);
}
} | repos\springboot-learning-example-master\chapter-4-spring-boot-web-thymeleaf\src\main\java\demo\springboot\service\impl\BookServiceImpl.java | 2 |
请完成以下Java代码 | public void setEventScopeActivityId(String eventScopeActivityId) {
this.eventScopeActivityId = eventScopeActivityId;
}
public boolean isStartEvent() {
return isStartEvent;
}
public void setStartEvent(boolean isStartEvent) {
this.isStartEvent = isStartEvent;
}
public String getEventType() {
... | /**
* Resolves the event name within the given scope.
*/
public String resolveExpressionOfEventName(VariableScope scope) {
if (isExpressionAvailable()) {
if(scope instanceof BaseDelegateExecution) {
// the variable scope execution is also the current context execution
// during express... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\parser\EventSubscriptionDeclaration.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DemoController {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private RestTemplate restTemplate;
@Autowired
private CircuitBreakerFactory circuitBreakerFactory;
@GetMapping("/get_user")
public String getUser(@RequestParam("id") Integer id) {
... | return restTemplate.getForEntity("http://127.0.0.1:18080/user/get?id="
+ id, String.class).getBody();
}
}, new Function<Throwable, String>() {
@Override
public String apply(Throwable throwable) {
logger.info("[getUserFallback][id({}) ... | repos\SpringBoot-Labs-master\labx-24\labx-24-resilience4j-demo02\src\main\java\cn\iocoder\springcloud\labx24\resilience4jdemo\controller\DemoController.java | 2 |
请完成以下Java代码 | public java.sql.Timestamp getDateOrdered()
{
return get_ValueAsTimestamp(COLUMNNAME_DateOrdered);
}
@Override
public void setDatePromised (final @Nullable java.sql.Timestamp DatePromised)
{
set_Value (COLUMNNAME_DatePromised, DatePromised);
}
@Override
public java.sql.Timestamp getDatePromised()
{
re... | }
@Override
public int getRecord_ID()
{
return get_ValueAsInt(COLUMNNAME_Record_ID);
}
@Override
public void setRemotePurchaseOrderId (final @Nullable java.lang.String RemotePurchaseOrderId)
{
set_Value (COLUMNNAME_RemotePurchaseOrderId, RemotePurchaseOrderId);
}
@Override
public java.lang.String getR... | repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java-gen\de\metas\purchasecandidate\model\X_C_PurchaseCandidate_Alloc.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class TbLwM2MAuthorizer implements Authorizer {
private final TbLwM2MDtlsSessionStore sessionStorage;
private final TbMainSecurityStore securityStore;
private final SecurityChecker securityChecker = new SecurityChecker();
private final LwM2mClientContext clientContext;
@Override
public ... | if (expectedSecurityInfo != null && expectedSecurityInfo.usePSK() && expectedSecurityInfo.getEndpoint().equals(SecurityMode.NO_SEC.toString())
&& expectedSecurityInfo.getPskIdentity().equals(SecurityMode.NO_SEC.toString())
&& Arrays.equals(SecurityMode.NO_SEC.toString().g... | repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\secure\TbLwM2MAuthorizer.java | 2 |
请完成以下Java代码 | public void onDeleteMHUPI(final I_M_HU_PI pi)
{
final List<I_M_HU_PI_Version> piVersions = handlingUnitsDAO.retrieveAllPIVersions(pi);
for (final I_M_HU_PI_Version version : piVersions)
{
InterfaceWrapperHelper.delete(version);
}
}
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.T... | {
return;
}
final I_M_HU_PI previousDefault = handlingUnitsDAO.retrievePIDefaultForPicking();
if (previousDefault != null)
{
logger.debug("M_HU_PI={} is now IsDefaultForPicking; -> Change previousDefault M_HU_PI={} to IsDefaultForPicking='N'",
newDefault.getM_HU_PI_ID(), previousDefault.getM_... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\model\validator\M_HU_PI.java | 1 |
请完成以下Java代码 | public DomainInfo findDomainInfoById(TenantId tenantId, DomainId domainId) {
log.trace("Executing findDomainInfoById [{}] [{}]", tenantId, domainId);
Domain domain = domainDao.findById(tenantId, domainId.getId());
return getDomainInfo(domain);
}
@Override
public boolean isOauth2Enab... | }
private DomainInfo getDomainInfo(Domain domain) {
if (domain == null) {
return null;
}
List<OAuth2ClientInfo> clients = oauth2ClientDao.findByDomainId(domain.getUuidId()).stream()
.map(OAuth2ClientInfo::new)
.sorted(Comparator.comparing(OAuth2Cl... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\domain\DomainServiceImpl.java | 1 |
请完成以下Java代码 | public MeterProvider<Counter> getServerCallCounter() {
return this.serverCallCounter;
}
public MeterProvider<DistributionSummary> getSentMessageSizeDistribution() {
return this.sentMessageSizeDistribution;
}
public MeterProvider<DistributionSummary> getReceivedMessageSizeDistribution()... | this.serverCallCounter = counter;
return this;
}
public Builder setSentMessageSizeDistribution(MeterProvider<DistributionSummary> distribution) {
this.sentMessageSizeDistribution = distribution;
return this;
}
public Builder setReceivedMessageSizeDis... | repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\metrics\MetricsServerMeters.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class JacksonJsonbUnavailable {
}
}
private static class JacksonAndJsonbUnavailableCondition extends NoneNestedConditions {
JacksonAndJsonbUnavailableCondition() {
super(ConfigurationPhase.REGISTER_BEAN);
}
@ConditionalOnBean(JacksonHttpMessageConvertersConfiguration.JacksonJsonHttpMessageConve... | @SuppressWarnings("removal")
@ConditionalOnBean(Jackson2HttpMessageConvertersConfiguration.Jackson2JsonMessageConvertersCustomizer.class)
static class Jackson2Available {
}
@ConditionalOnProperty(name = HttpMessageConvertersAutoConfiguration.PREFERRED_MAPPER_PROPERTY,
havingValue = "jsonb")
static class... | repos\spring-boot-4.0.1\module\spring-boot-http-converter\src\main\java\org\springframework\boot\http\converter\autoconfigure\GsonHttpMessageConvertersConfiguration.java | 2 |
请完成以下Java代码 | public static String toGlobalQRCodeJsonString(final UserAuthQRCode qrCode)
{
return toGlobalQRCode(qrCode).getAsString();
}
public static GlobalQRCode toGlobalQRCode(final UserAuthQRCode qrCode)
{
return JsonConverterV1.toGlobalQRCode(qrCode);
}
@NonNull
public static UserAuthQRCode fromGlobalQRCodeJsonStr... | final GlobalQRCodeVersion version = globalQRCode.getVersion();
if (GlobalQRCodeVersion.equals(globalQRCode.getVersion(), JsonConverterV1.GLOBAL_QRCODE_VERSION))
{
return JsonConverterV1.fromGlobalQRCode(globalQRCode);
}
else
{
throw new AdempiereException("Invalid QR Code version: " + version);
}
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\qr\UserAuthQRCodeJsonConverter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class TomcatServletWebServerFactoryCustomizer
implements WebServerFactoryCustomizer<TomcatServletWebServerFactory>, Ordered {
private final TomcatServerProperties tomcatProperties;
TomcatServletWebServerFactoryCustomizer(TomcatServerProperties tomcatProperties) {
this.tomcatProperties = tomcatProperties;
}
@... | customizeRedirectContextRoot(factory, this.tomcatProperties.getRedirectContextRoot());
}
customizeUseRelativeRedirects(factory, this.tomcatProperties.isUseRelativeRedirects());
}
private void customizeRedirectContextRoot(ConfigurableTomcatWebServerFactory factory, boolean redirectContextRoot) {
factory.addCont... | repos\spring-boot-4.0.1\module\spring-boot-tomcat\src\main\java\org\springframework\boot\tomcat\autoconfigure\servlet\TomcatServletWebServerFactoryCustomizer.java | 2 |
请完成以下Java代码 | public LookupDescriptorProvider listByAD_Reference_Value_ID(@NonNull final ReferenceId AD_Reference_Value_ID)
{
return sql()
.setCtxTableName(null) // tableName
.setCtxColumnName(null)
.setDisplayType(DisplayType.List)
.setAD_Reference_Value_ID(AD_Reference_Value_ID)
.setReadOnlyAccess()
.bui... | @SuppressWarnings("OptionalUsedAsFieldOrParameterType")
@ToString
private static class SingletonLookupDescriptorProvider implements LookupDescriptorProvider
{
private final Optional<LookupDescriptor> lookupDescriptor;
private SingletonLookupDescriptorProvider(@NonNull final LookupDescriptor lookupDescriptor)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\LookupDescriptorProviders.java | 1 |
请完成以下Java代码 | public UOMType getQtyUOMTypeOrNull()
{
// no UOMType available
return null;
}
@Override
public String toString()
{
return "NullAttributeStorage []";
}
@Override
public BigDecimal getStorageQtyOrZERO()
{
// no storage quantity available; assume ZERO
return BigDecimal.ZERO;
}
/**
* @return <code... | {
throw new AttributeNotFoundException(attribute, this);
}
/**
* @return true, i.e. never disposed
*/
@Override
public boolean assertNotDisposed()
{
return true; // not disposed
}
@Override
public boolean assertNotDisposedTree()
{
return true; // not disposed
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\NullAttributeStorage.java | 1 |
请完成以下Java代码 | class WFPopupItem extends JMenuItem
{
private static final long serialVersionUID = 4634863991042969718L;
public WFPopupItem(String title, WorkflowNodeModel node, WFNodeId nodeToId)
{
super(title);
m_node = node;
m_line = null;
this.nodeToId = nodeToId;
} // WFPopupItem
/**
* Delete Line I... | */
public void execute()
{
// Add Line
if (m_node != null && nodeToId != null)
{
final I_AD_WF_NodeNext newLine = InterfaceWrapperHelper.newInstance(I_AD_WF_NodeNext.class);
newLine.setAD_Org_ID(OrgId.ANY.getRepoId());
newLine.setAD_WF_Node_ID(m_node.getId().getRepoId());
newLine.setAD_WF_N... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\wf\WFContentPanel.java | 1 |
请完成以下Java代码 | public NumberAndSumOfTransactions2 getTtlNtries() {
return ttlNtries;
}
/**
* Sets the value of the ttlNtries property.
*
* @param value
* allowed object is
* {@link NumberAndSumOfTransactions2 }
*
*/
public void setTtlNtries(NumberAndSumOfTransactio... | /**
* Sets the value of the ttlDbtNtries property.
*
* @param value
* allowed object is
* {@link NumberAndSumOfTransactions1 }
*
*/
public void setTtlDbtNtries(NumberAndSumOfTransactions1 value) {
this.ttlDbtNtries = value;
}
/**
* Gets the valu... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\TotalTransactions2.java | 1 |
请完成以下Java代码 | private Stream<PropertySource<?>> getPropertySources() {
if (this.environment == null) {
return Stream.empty();
}
return this.environment.getPropertySources()
.stream()
.filter((source) -> !ConfigurationPropertySources.isAttachedConfigurationPropertySource(source));
}
private void appendDetails(String... | for (S item : input) {
results.add(converter.apply(item));
}
return results;
}
private static final class Descriptor {
private final String propertyName;
private final @Nullable Origin origin;
private Descriptor(String propertyName, @Nullable Origin origin) {
this.propertyName = propertyName;
t... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\diagnostics\analyzer\MutuallyExclusiveConfigurationPropertiesFailureAnalyzer.java | 1 |
请完成以下Java代码 | protected <T> void configureAuthCheck(ListQueryParameterObject parameter,
ProcessEngineConfigurationImpl engineConfig,
CommandContext commandContext) {
AuthorizationCheck authCheck = parameter.getAuthCheck();
commandContext.getA... | @Override
public List<T> execute(CommandContext commandContext) {
ProcessEngineConfigurationImpl engineConfig = getProcessEngineConfiguration(commandContext);
configureAuthCheck(parameter, engineConfig, commandContext);
if (parameter.isMaxResultsLimitEnabled()) {
QueryMaxResultsLimitUtil... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\db\QueryServiceImpl.java | 1 |
请完成以下Java代码 | public int getC_UOM_ID()
{
return forecastLine.getC_UOM_ID();
}
@Override
public void setC_UOM_ID(final int uomId)
{
forecastLine.setC_UOM_ID(uomId);
}
@Override
public void setQty(final BigDecimal qty)
{
forecastLine.setQty(qty);
final ProductId productId = ProductId.ofRepoIdOrNull(getM_Product_ID(... | @Override
public void setQtyTU(final BigDecimal qtyPacks)
{
forecastLine.setQtyEnteredTU(qtyPacks);
}
@Override
public void setC_BPartner_ID(final int partnerId)
{
values.setC_BPartner_ID(partnerId);
}
@Override
public int getC_BPartner_ID()
{
return values.getC_BPartner_ID();
}
@Override
public b... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\ForecastLineHUPackingAware.java | 1 |
请完成以下Java代码 | public class HibernateUtil {
private static String PROPERTY_FILE_NAME;
public static SessionFactory getSessionFactory() throws IOException {
return getSessionFactory(null);
}
public static SessionFactory getSessionFactory(String propertyFileName) throws IOException {
PROPERTY_FILE_NAME... | return metadata.getSessionFactoryBuilder()
.build();
}
private static ServiceRegistry configureServiceRegistry() throws IOException {
return configureServiceRegistry(getProperties());
}
private static ServiceRegistry configureServiceRegistry(Properties properties) throws IOExc... | repos\tutorials-master\persistence-modules\hibernate-enterprise\src\main\java\com\baeldung\hibernate\HibernateUtil.java | 1 |
请完成以下Java代码 | public class NativeHistoricDetailQueryImpl
extends AbstractNativeQuery<NativeHistoricDetailQuery, HistoricDetail>
implements NativeHistoricDetailQuery {
private static final long serialVersionUID = 1L;
public NativeHistoricDetailQueryImpl(CommandContext commandContext) {
super(commandContext);... | public List<HistoricDetail> executeList(
CommandContext commandContext,
Map<String, Object> parameterMap,
int firstResult,
int maxResults
) {
return commandContext
.getHistoricDetailEntityManager()
.findHistoricDetailsByNativeQuery(parameterMap, firstR... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\NativeHistoricDetailQueryImpl.java | 1 |
请完成以下Java代码 | public java.lang.String getLastSyncStatus ()
{
return (java.lang.String)get_Value(COLUMNNAME_LastSyncStatus);
}
/** Set MKTG_ContactPerson.
@param MKTG_ContactPerson_ID MKTG_ContactPerson */
@Override
public void setMKTG_ContactPerson_ID (int MKTG_ContactPerson_ID)
{
if (MKTG_ContactPerson_ID < 1)
s... | @Override
public int getMKTG_Platform_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_MKTG_Platform_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
@Override
public void setName (java.lang.String Name)
{
set_Value ... | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java-gen\de\metas\marketing\base\model\X_MKTG_ContactPerson.java | 1 |
请完成以下Java代码 | public static void createCopyOfSubProcessExecutionForCompensation(ExecutionEntity subProcessExecution) {
EventSubscriptionEntityManager eventSubscriptionEntityManager =
Context.getCommandContext().getEventSubscriptionEntityManager();
List<EventSubscriptionEntity> eventSubscriptions =
... | eventSubscriptionEntityManager.delete(eventSubscriptionEntity);
CompensateEventSubscriptionEntity newSubscription =
eventSubscriptionEntityManager.insertCompensationEvent(
eventScopeExecution,
eventSubscriptionEntity.getActivityId()
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\helper\ScopeUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String[] queryDict(String dicTable, String dicCode, String dicText) {
List<String> dictReplaces = new ArrayList<String>();
List<DictModel> dictList = null;
// step.1 如果没有字典表则使用系统字典表
if (oConvertUtils.isEmpty(dicTable)) {
dictList = commonApi.queryDictItemsByCode(dicCode);
} else {
try {
dicTe... | // 代码逻辑说明: [issues/4917]excel 导出异常---
if(t!=null && t.getText()!=null && t.getValue()!=null){
// 代码逻辑说明: [issues/I4MBB3]@Excel dicText字段的值有下划线时,导入功能不能正确解析---
if(t.getValue().contains(EXCEL_SPLIT_TAG)){
String val = t.getValue().replace(EXCEL_SPLIT_TAG,TEMP_EXCEL_SPLIT_TAG);
dictReplaces.add(t.getTe... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\AutoPoiDictConfig.java | 2 |
请完成以下Java代码 | public void assignTradingUnitToLoadingUnit(final IHUContext huContext,
final I_M_HU loadingUnit,
final I_M_HU tradingUnit) throws NoCompatibleHUItemParentFoundException
{
//
// Services
final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlingUnitsDAO.class);
final IHandlingUnitsBL handlingUnitsB... | {
continue; // Item not supported by this handling unit
}
// Assign HU to the luItem which we just found
huTrxBL.setParentHU(huContext, luItem, tradingUnit);
return; // we are done
}
// we did not find a compatible item for 'tradingUnit' to attach.
// try if we can create one on the fly
final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\impl\HUJoinBL.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Demo01Producer {
@Autowired
private RabbitTemplate rabbitTemplate;
public void syncSend(Integer id) {
// 创建 Demo01Message 消息
Demo01Message message = new Demo01Message();
message.setId(id);
// 同步发送消息
rabbitTemplate.convertAndSend(Demo01Message.EXCHANGE, ... | @Async
public ListenableFuture<Void> asyncSend(Integer id) {
try {
// 发送消息
this.syncSend(id);
// 返回成功的 Future
return AsyncResult.forValue(null);
} catch (Throwable ex) {
// 返回异常的 Future
return AsyncResult.forExecutionException(e... | repos\SpringBoot-Labs-master\lab-04-rabbitmq\lab-04-rabbitmq-demo\src\main\java\cn\iocoder\springboot\lab04\rabbitmqdemo\producer\Demo01Producer.java | 2 |
请完成以下Java代码 | private void showError(final String title, final Object messageObj)
{
JOptionPane.showMessageDialog(this,
messageObj, // message
title,
JOptionPane.ERROR_MESSAGE);
}
/**
* Test Database connection.
*
* If the database connection is not OK, an error popup will be displayed to user.
*/
private ... | }
catch (Exception e)
{
log.error(e.getMessage(), e);
showError(res.getString("ConnectionError") + ": " + m_cc.getConnectionURL(), e);
}
finally
{
setBusy(false);
}
} // cmd_testDB
public boolean isCancel()
{
return isCancel;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\db\CConnectionDialog.java | 1 |
请完成以下Java代码 | public String getProcessInstanceId() {
return processInstanceId;
}
public String getTaskId() {
return taskId;
}
public String getActivityInstanceId() {
return activityInstanceId;
}
public boolean getExcludeTaskRelated() {
return excludeTaskRelated;
}
p... | public String getExecutionId() {
return executionId;
}
public Set<String> getExecutionIds() {
return executionIds;
}
public boolean isExcludeTaskRelated() {
return excludeTaskRelated;
}
public boolean isExcludeVariableInitialization() {
return excludeVariableIn... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\HistoricVariableInstanceQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private <T> T getBeanOrNull(Class<?> clazz) {
ApplicationContext context = getBuilder().getSharedObject(ApplicationContext.class);
if (context == null) {
return null;
}
return (T) context.getBeanProvider(clazz).getIfUnique();
}
private static final class EitherLogoutHandler implements LogoutHandler... | @Override
public void logout(HttpServletRequest request, HttpServletResponse response,
Authentication authentication) {
if (request.getParameter("_spring_security_internal_logout") == null) {
this.left.logout(request, response, authentication);
}
else {
this.right.logout(request, response,... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\oauth2\client\OidcLogoutConfigurer.java | 2 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public BigDecimal ... | public void setAllergens(AllergensAsEntity allergens) {
this.allergens = allergens;
}
public Long getId() {
return id;
}
@Override
public String toString() {
return "MealWithMultipleEntities [id=" + id + ", name=" + name + ", description=" + description + ", price=" + price... | repos\tutorials-master\persistence-modules\java-jpa-2\src\main\java\com\baeldung\jpa\multipletables\multipleentities\MealWithMultipleEntities.java | 1 |
请完成以下Java代码 | protected int get_AccessLevel()
{
return accessLevel.intValue();
}
/** Load Meta Data */
protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new Strin... | if (M_PromotionGroup_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_PromotionGroup_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_PromotionGroup_ID, Integer.valueOf(M_PromotionGroup_ID));
}
/** Get Promotion Group.
@return Promotion Group */
public int getM_PromotionGroup_ID ()
{
Integer ii = (Integer)get... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionGroup.java | 1 |
请完成以下Java代码 | public boolean isFulfilled(ActivityExecutionTuple element) {
return escalationEventDefinitionFinder.getEscalationEventDefinition() != null || element == null;
}
});
EscalationEventDefinition escalationEventDefinition = escalationEventDefinitionFinder.getEscalationEventDefinition();
if (escala... | escalationExecution.setVariable(escalationEventDefinition.getEscalationCodeVariable(), escalationCode);
}
escalationExecution.executeActivity(escalationHandler);
}
protected static PvmScope getScopeForEscalation(EscalationEventDefinition escalationEventDefinition) {
PvmActivity escalationHandler = esc... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\helper\EscalationHandler.java | 1 |
请完成以下Java代码 | public class DelegateExpressionFlowableEventListener extends BaseDelegateEventListener {
protected Expression expression;
protected boolean failOnException;
public DelegateExpressionFlowableEventListener(Expression expression, Class<?> entityClass) {
this.expression = expression;
setEntity... | ((FlowableEventListener) delegate).onEvent(event);
} else {
// Force failing, since the exception we're about to throw
// cannot be ignored, because it did not originate from the listener itself
failOnException = true;
throw new FlowableIllega... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\helper\DelegateExpressionFlowableEventListener.java | 1 |
请完成以下Java代码 | public void setAttributes(final BoilerPlateContext attributes)
{
this.attributes = attributes;
fMessage.setAttributes(attributes);
}
public BoilerPlateContext getAttributes()
{
return attributes;
}
/**
* Action Listener - Send email
*/
@Override
public void actionPerformed(final ActionEvent e)
{
... | } // actionPerformed
public void setPrintOnOK(final boolean value)
{
m_isPrintOnOK = value;
}
public boolean isPressedOK()
{
return m_isPressedOK;
}
public boolean isPrinted()
{
return m_isPrinted;
}
public File getPDF()
{
return fMessage.getPDF(getTitle());
}
public RichTextEditor getRichText... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\LetterDialog.java | 1 |
请完成以下Java代码 | public BigDecimal getQtyReceived()
{
Check.assumeNotNull(qtyReceived, "qtyReceived not null");
return qtyReceived;
}
public void setQtyReceived(final BigDecimal qtyReceived)
{
this.qtyReceived = qtyReceived;
}
@Override
public I_C_UOM getQtyReceivedUOM()
{
Check.assumeNotNull(qtyReceivedUOM, "qtyRecei... | }
/**
* This method does nothing!
*/
@Override
public void add(final Object IGNORED)
{
}
/**
* This method returns the empty list.
*/
@Override
public List<Object> getModels()
{
return Collections.emptyList();
}
@Override public I_M_PriceList_Version getPLV()
{
return plv;
}
public void se... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\PlainVendorReceipt.java | 1 |
请完成以下Java代码 | public void setIsIVTherapy (final boolean IsIVTherapy)
{
set_Value (COLUMNNAME_IsIVTherapy, IsIVTherapy);
}
@Override
public boolean isIVTherapy()
{
return get_ValueAsBoolean(COLUMNNAME_IsIVTherapy);
}
@Override
public void setIsTransferPatient (final boolean IsTransferPatient)
{
set_Value (COLUMNNAME... | public void setPayerType (final @Nullable String PayerType)
{
set_Value (COLUMNNAME_PayerType, PayerType);
}
@Override
public String getPayerType()
{
return get_ValueAsString(COLUMNNAME_PayerType);
}
@Override
public void setUpdatedAt (final @Nullable java.sql.Timestamp UpdatedAt)
{
set_Value (COLUMNNA... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_C_BPartner_AlbertaPatient.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ForkJoinService {
private final ApplicationContext applicationContext;
public ForkJoinService(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
// ForkJoinPool will start 1 thread for each available core
public static final int NUMBER_OF... | StopWatch watch = new StopWatch();
watch.start();
forkjoin(lines);
watch.stop();
logger.log(Level.INFO, "Stop inserting. \n Total time: {0} ms ({1} s)",
new Object[]{watch.getTotalTimeMillis(), watch.getTotalTimeSeconds()});
}
private void forkjoin(List<String> ... | repos\Hibernate-SpringBoot-master\HibernateSpringBootBatchJsonFileForkJoin\src\main\java\com\citylots\forkjoin\ForkJoinService.java | 2 |
请完成以下Java代码 | public class KafkaOperationsOutboundEventChannelAdapter implements OutboundEventChannelAdapter<Object> {
protected KafkaOperations<Object, Object> kafkaOperations;
protected KafkaPartitionProvider partitionProvider;
protected KafkaMessageKeyProvider<?> messageKeyProvider;
protected String topic;
/... | kafkaOperations.send(producerRecord).get();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new FlowableException("Sending the event was interrupted", e);
} catch (ExecutionException e) {
if (e.getCause() instanceof RuntimeExc... | repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\kafka\KafkaOperationsOutboundEventChannelAdapter.java | 1 |
请完成以下Java代码 | class PerfectNumber {
public static boolean isPerfectBruteForce(int number) {
int sum = 0;
for (int i = 1; i <= number / 2; i++) {
if (number % i == 0) {
sum += i;
}
}
return sum == number;
}
public static boolean isPerfectStream(int ... | }
public static boolean isPerfectEuclidEulerUsingShift(int number) {
int p = 2;
int perfectNumber = (2 << (p - 1)) * ((2 << p) - 1);
while (perfectNumber <= number) {
if (perfectNumber == number) {
return true;
}
p++;
perfectNu... | repos\tutorials-master\algorithms-modules\algorithms-numeric\src\main\java\com\baeldung\algorithms\perfectnumber\PerfectNumber.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<ExternalWorkerJobEntity> findExternalJobsToExecute(ExternalWorkerJobAcquireBuilderImpl builder, int numberOfJobs) {
return getDbSqlSession().selectList("selectExternalWorkerJobsToExecute", builder, new Page(0, numberOfJobs));
}
@Override
public List<ExternalWorkerJobEntity> findJobsBySc... | }
@Override
public List<ExternalWorkerJobEntity> findJobsByWorkerIdAndTenantId(String workerId, String tenantId) {
Map<String, String> paramMap = new HashMap<>();
paramMap.put("workerId", workerId);
paramMap.put("tenantId", tenantId);
return getList("selectExternalWorkerJobs... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\data\impl\MybatisExternalWorkerJobDataManager.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class FileSyncConfiguration {
@Resource
SessionFactory<ChannelSftp.LsEntry> sftpSessionFactory;
@Resource
private SftpProperties properties;
@Bean
public SftpInboundFileSynchronizer sftpInboundFileSynchronizer(SessionFactory<ChannelSftp.LsEntry> sftpSessionFactory) {
SftpInboun... | public MessageSource<File> sftpMessageSource(SftpInboundFileSynchronizer sftpInboundFileSynchronizer) {
SftpInboundFileSynchronizingMessageSource source =
new SftpInboundFileSynchronizingMessageSource(sftpInboundFileSynchronizer);
source.setLocalDirectory(new File(properties.getLocalDir(... | repos\springboot-demo-master\sftp\src\main\java\com\et\sftp\config\file\sync\FileSyncConfiguration.java | 2 |
请完成以下Java代码 | public static class ExecutionPlan {
private final Map<String, Boolean> testPlan = testPlan();
void validate(Function<String, Boolean> functionUnderTest) {
testPlan.forEach((key, value) -> {
Boolean result = functionUnderTest.apply(key);
assertEquals(value, r... | @Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public void usingNumberUtils_isParsable(ExecutionPlan plan) {
plan.validate(subject::usingNumberUtils_isParsable);
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
... | repos\tutorials-master\core-java-modules\core-java-string-operations\src\main\java\com\baeldung\isnumeric\Benchmarking.java | 1 |
请完成以下Java代码 | public final void setRealmName(String realmName) {
this.realmName = realmName;
}
private static Map<String, String> errorMessageParameters(Map<String, String> parameters) {
parameters.put("error", BearerTokenErrorCodes.INSUFFICIENT_SCOPE);
parameters.put("error_description",
"The request requires higher pr... | private static String computeWWWAuthenticateHeaderValue(Map<String, String> parameters) {
StringBuilder wwwAuthenticate = new StringBuilder();
wwwAuthenticate.append("Bearer");
if (!parameters.isEmpty()) {
wwwAuthenticate.append(" ");
int i = 0;
for (Map.Entry<String, String> entry : parameters.entrySet(... | repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\web\access\server\BearerTokenServerAccessDeniedHandler.java | 1 |
请完成以下Java代码 | public void setAPI_Request_Audit_ID (final int API_Request_Audit_ID)
{
if (API_Request_Audit_ID < 1)
set_Value (COLUMNNAME_API_Request_Audit_ID, null);
else
set_Value (COLUMNNAME_API_Request_Audit_ID, API_Request_Audit_ID);
}
@Override
public int getAPI_Request_Audit_ID()
{
return get_ValueAsInt(CO... | else
set_Value (COLUMNNAME_Record_ID, Record_ID);
}
@Override
public int getRecord_ID()
{
return get_ValueAsInt(COLUMNNAME_Record_ID);
}
@Override
public void setTrxName (final @Nullable java.lang.String TrxName)
{
set_Value (COLUMNNAME_TrxName, TrxName);
}
@Override
public java.lang.String getTr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_API_Request_Audit_Log.java | 1 |
请完成以下Java代码 | public static RemoteToLocalSyncResult obtainedEmailBounceInfo(@NonNull final ContactPerson datarecord)
{
return RemoteToLocalSyncResult.builder()
.synchedDataRecord(datarecord)
.remoteToLocalStatus(RemoteToLocalStatus.OBTAINED_EMAIL_BOUNCE_INFO)
.build();
}
/** email doesn't exist remotely but we do h... | /** See {@link RemoteToLocalSyncResult#notYetAddedToRemotePlatform(DataRecord)}. */
NOT_YET_ADDED_TO_REMOTE_PLATFORM,
/** See {@link RemoteToLocalSyncResult#obtainedRemoteId(DataRecord)}. */
OBTAINED_REMOTE_ID,
/** See {@link RemoteToLocalSyncResult#obtainedRemoteEmail(DataRecord)}. */
OBTAINED_REMOTE_EMAIL... | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\model\RemoteToLocalSyncResult.java | 1 |
请完成以下Java代码 | public boolean isPrepay(@NonNull final DocTypeId docTypeId)
{
final I_C_DocType docType = docTypesRepo.getById(docTypeId);
return isPrepay(docType);
}
@Override
public boolean isPrepay(final I_C_DocType dt)
{
return X_C_DocType.DOCSUBTYPE_PrepayOrder.equals(dt.getDocSubType())
&& X_C_DocType.DOCBASETYPE... | @NonNull
public ImmutableList<I_C_DocType> retrieveForSelection(@NonNull final PInstanceId pinstanceId)
{
return docTypesRepo.retrieveForSelection(pinstanceId);
}
public DocTypeId cloneToOrg(@NonNull final I_C_DocType fromDocType, @NonNull final OrgId toOrgId)
{
final String newName = fromDocType.getName() + ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\impl\DocTypeBL.java | 1 |
请完成以下Java代码 | private ProcessingMod createProcessingMod()
{
return ProcessingMod.builder()
.transportMod(createTransportMod())
.build();
}
private TransportMod createTransportMod()
{
if (Check.isEmpty(exportFileFromEAN, true))
{
return null;
}
return TransportMod.builder()
.from(exportFileFromEAN)
.... | catch (final DatatypeConfigurationException e)
{
throw new AdempiereException(e).appendParametersToMessage()
.setParameter("cal", cal);
}
}
private SoftwareMod createSoftwareMod(@NonNull final MetasfreshVersion metasfreshVersion)
{
final long versionNumber = metasfreshVersion.getMajor() * 100 + metasf... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\base\export\dunning\DunningExportClientImpl.java | 1 |
请完成以下Java代码 | public void setPP_Product_BOM_ID (int PP_Product_BOM_ID)
{
if (PP_Product_BOM_ID < 1)
set_Value (COLUMNNAME_PP_Product_BOM_ID, null);
else
set_Value (COLUMNNAME_PP_Product_BOM_ID, Integer.valueOf(PP_Product_BOM_ID));
}
/** Get BOM & Formula.
@return BOM & Formula
*/
public int getPP_Product_BOM_ID... | Request Group
*/
public void setR_Group_ID (int R_Group_ID)
{
if (R_Group_ID < 1)
set_ValueNoCheck (COLUMNNAME_R_Group_ID, null);
else
set_ValueNoCheck (COLUMNNAME_R_Group_ID, Integer.valueOf(R_Group_ID));
}
/** Get Group.
@return Request Group
*/
public int getR_Group_ID ()
{
Integer ii =... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_Group.java | 1 |
请完成以下Java代码 | public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
... | return stock;
}
public void setStock(Integer stock) {
this.stock = stock;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
} | repos\tutorials-master\spring-batch-2\src\main\java\com\baeldung\batch\model\Product.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.