instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
protected IAttributeStorage getAttributeStorageForModel(final ModelType model) { final ArrayKey key = mkKey(model); try { final IAttributeStorage result = key2storage.get(key, () -> { final AttributeStorageType storage = createAttributeStorage(model); Check.assumeNotNull(storage, "storage not null"); ...
* Create attribute storage for underlying model * * @return attribute storage */ protected abstract AttributeStorageType createAttributeStorage(final ModelType model); @Override public void flush() { getHUAttributesDAO().flush(); } /** * Method called when an {@link IAttributeStorage} is removed from ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\AbstractModelAttributeStorageFactory.java
1
请完成以下Java代码
public class PMM_PurchaseCandidate { public static final transient PMM_PurchaseCandidate instance = new PMM_PurchaseCandidate(); private PMM_PurchaseCandidate() { super(); } @ModelChange(timings = { ModelValidator.TYPE_BEFORE_DELETE }) public void onDelete(final I_PMM_PurchaseCandidate candidate) { // NOTE...
} @CalloutMethod(columnNames = I_PMM_PurchaseCandidate.COLUMNNAME_QtyToOrder_TU) public void onQtyToOrderTUChanged_UI(final I_PMM_PurchaseCandidate candidate) { Services.get(IPMMPurchaseCandidateBL.class).updateQtyToOrderFromQtyToOrderTU(candidate); } @CalloutMethod(columnNames = I_PMM_PurchaseCandidate.COLUMN...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\interceptor\PMM_PurchaseCandidate.java
1
请完成以下Java代码
public String toString() { return "DateTrunc-" + trunc; } /** * Convert {@link TimeUtil}.TRUNC_* values to their correspondent TRUNC db function parameter * * @param trunc * @return */ private static String getTruncSql(final String trunc) { if (TimeUtil.TRUNC_DAY.equals(trunc)) { return "DD"; ...
params.add(value); } if (truncSql == null) { return valueSql; } // note: cast is needed for postgresql, else you get "ERROR: function trunc(unknown, unknown) is not unique" return "TRUNC(?::timestamp, " + DB.TO_STRING(truncSql) + ")"; } /** * @deprecated Please use {@link #convertValue(java.util.D...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\DateTruncQueryFilterModifier.java
1
请完成以下Java代码
public final class ProductionMaterialComparator implements Comparator<IProductionMaterial> { public static final ProductionMaterialComparator instance = new ProductionMaterialComparator(); private ProductionMaterialComparator() { super(); } public boolean equals(final IProductionMaterial pm1, final IProduction...
{ return cmp; } } // // Compare UOM { final int uomId1 = pm1.getC_UOM().getC_UOM_ID(); final int uomId2 = pm2.getC_UOM().getC_UOM_ID(); if (uomId1 != uomId2) { return uomId1 - uomId2; } } // // Compare QM_QtyDeliveredPercOfRaw { final BigDecimal qty1 = pm1.getQM_QtyDeliver...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\ProductionMaterialComparator.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...
public int getStartNo () { Integer ii = (Integer)get_Value(COLUMNNAME_StartNo); if (ii == null) return 0; return ii.intValue(); } /** Set Suffix. @param Suffix Suffix after the number */ public void setSuffix (String Suffix) { set_Value (COLUMNNAME_Suffix, Suffix); } /** Get Suffix. @ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_LotCtl.java
1
请完成以下Java代码
public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public Double getSortNo() { return sortNo; } public void setSortNo(Double sortNo) { this.sortNo = sortNo; } public Integer getMenuType() { return menuType; } public void setMenuType(Integer menuType) { t...
this.updateBy = updateBy; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getPerms() { return perms; } pub...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\model\SysPermissionTree.java
1
请完成以下Java代码
public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return p...
@JsonIgnore @Override public boolean isCredentialsNonExpired() { return true; } @JsonIgnore @Override public boolean isEnabled() { return true; } @JsonIgnore @Override public Collection<? extends GrantedAuthority> getAuthorities() { return authorities; ...
repos\springBoot-master\springboot-springSecurity2\src\main\java\com\us\example\domain\SysUser.java
1
请完成以下Java代码
public class EngineInfoResponse { @ApiModelProperty(example = "default") private String name; @ApiModelProperty(example = "file://flowable/flowable.cfg.xml") private String resourceUrl; @ApiModelProperty(example = "null") private String exception; @ApiModelProperty(example = "6.3.1") pr...
public String getException() { return exception; } public void setException(String exception) { this.exception = exception; } public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } }
repos\flowable-engine-main\modules\flowable-common-rest\src\main\java\org\flowable\common\rest\api\EngineInfoResponse.java
1
请完成以下Java代码
protected final ProcessPreconditionsResolution checkPreconditionsApplicable_SingleSelectedRow() { final DocumentIdsSelection selectedRowIds = getSelectedRowIds(); if (selectedRowIds.isEmpty()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } else if (!selectedRowIds.isSingleDocumentId...
protected final Stream<PackageableRow> streamSelectedRows() { return super.streamSelectedRows() .map(PackageableRow::cast); } protected final ShipmentScheduleLockRequest createLockRequest(final PackageableRow row) { return ShipmentScheduleLockRequest.builder() .shipmentScheduleIds(row.getShipmentSchedu...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\packageable\process\PackageablesViewBasedProcess.java
1
请在Spring Boot框架中完成以下Java代码
public T get(TenantId tenantId) { return cache.getAndPutInTransaction(tenantId, () -> { AdminSettings adminSettings = adminSettingsService.findAdminSettingsByTenantIdAndKey(tenantId, settingsKey); if (adminSettings != null) { try { return JacksonUtil.c...
adminSettings.setJsonValue(JacksonUtil.valueToTree(settings)); AdminSettings savedAdminSettings = adminSettingsService.saveAdminSettings(tenantId, adminSettings); T savedSettings; try { savedSettings = JacksonUtil.convertValue(savedAdminSettings.getJsonValue(), clazz); } catc...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\vc\TbAbstractVersionControlSettingsService.java
2
请在Spring Boot框架中完成以下Java代码
public class GrpcServerSecurityAutoConfiguration { /** * The interceptor for handling security related exceptions such as {@link AuthenticationException} and * {@link AccessDeniedException}. * * @return The exceptionTranslatingServerInterceptor bean. */ @Bean @ConditionalOnMissingB...
/** * The security interceptor that handles the authorization of requests. * * @param accessDecisionManager The access decision manager used to check the requesting user. * @param securityMetadataSource The source for the security metadata (access constraints). * @return The authorizationChecki...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\autoconfigure\GrpcServerSecurityAutoConfiguration.java
2
请完成以下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_M_ProductDownload[") .append(get_ID()).append("]"); return sb.toString(); } /** ...
/** Get Product. @return Product, Service, Item */ public int getM_Product_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_ProductDownload.java
1
请完成以下Java代码
public List<Deployer> getDeployers() { return deployers; } public void setDeployers(List<Deployer> deployers) { this.deployers = deployers; } public DeploymentCache<ProcessDefinitionCacheEntry> getProcessDefinitionCache() { return processDefinitionCache; } public void ...
} public void setProcessEngineConfiguration(ProcessEngineConfigurationImpl processEngineConfiguration) { this.processEngineConfiguration = processEngineConfiguration; } public ProcessDefinitionEntityManager getProcessDefinitionEntityManager() { return processDefinitionEntityManager; } ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\deploy\DeploymentManager.java
1
请在Spring Boot框架中完成以下Java代码
public UpdateProcessDefinitionSuspensionStateBuilderImpl processDefinitionWithoutTenantId() { this.processDefinitionTenantId = null; this.isTenantIdSet = true; return this; } @Override public UpdateProcessDefinitionSuspensionStateBuilderImpl processDefinitionTenantId(String tenantId) { ensureNotN...
public String getProcessDefinitionId() { return processDefinitionId; } public boolean isIncludeProcessInstances() { return includeProcessInstances; } public Date getExecutionDate() { return executionDate; } public String getProcessDefinitionTenantId() { return processDefinitionTenantId; ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\repository\UpdateProcessDefinitionSuspensionStateBuilderImpl.java
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setExternal_Request (final String External_Request) { set_Value (COLUMNNAME_External_Request, External_Request); } @Override public String getExternal_Request(...
set_ValueNoCheck (COLUMNNAME_ExternalSystem_RuntimeParameter_ID, ExternalSystem_RuntimeParameter_ID); } @Override public int getExternalSystem_RuntimeParameter_ID() { return get_ValueAsInt(COLUMNNAME_ExternalSystem_RuntimeParameter_ID); } @Override public void setName (final String Name) { set_Value (COL...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_RuntimeParameter.java
1
请完成以下Java代码
public class AssociationValidator extends ValidatorImpl { @Override public void validate(BpmnModel bpmnModel, List<ValidationError> errors) { // Global associations Collection<Artifact> artifacts = bpmnModel.getGlobalArtifacts(); if (artifacts != null) { for (Artifact artifa...
for (Artifact artifact : artifacts) { if (artifact instanceof Association) { validate(process, (Association) artifact, errors); } } } } protected void validate(Process process, Association association, List<ValidationError> errors) { ...
repos\Activiti-develop\activiti-core\activiti-process-validation\src\main\java\org\activiti\validation\validator\impl\AssociationValidator.java
1
请完成以下Java代码
public void setRequestID (final java.lang.String RequestID) { set_Value (COLUMNNAME_RequestID, RequestID); } @Override public java.lang.String getRequestID() { return get_ValueAsString(COLUMNNAME_RequestID); } @Override public void setRequestMessage (final @Nullable java.lang.String RequestMessage) { ...
return get_ValueAsString(COLUMNNAME_RequestMessage); } @Override public void setResponseMessage (final @Nullable java.lang.String ResponseMessage) { set_Value (COLUMNNAME_ResponseMessage, ResponseMessage); } @Override public java.lang.String getResponseMessage() { return get_ValueAsString(COLUMNNAME_Resp...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_ShipmentOrder_Log.java
1
请完成以下Java代码
public String toString() { return "BatchEntity{" + "batchHandler=" + batchJobHandler + ", id='" + id + '\'' + ", type='" + type + '\'' + ", size=" + totalJobs + ", jobCreated=" + jobsCreated + ", batchJobsPerSeed=" + batchJobsPerSeed + ", invocationsPerBatchJob=" + invocati...
@Override public Map<String, Class> getReferencedEntitiesIdAndClass() { Map<String, Class> referenceIdAndClass = new HashMap<>(); if (seedJobDefinitionId != null) { referenceIdAndClass.put(seedJobDefinitionId, JobDefinitionEntity.class); } if (batchJobDefinitionId != null) { referenceIdAn...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\BatchEntity.java
1
请完成以下Java代码
public boolean isAsync() { return async; } public void setAsync(boolean async) { this.async = async; } public Map<String, CaseElement> getAllCaseElements() { return allCaseElements; } public void setAllCaseElements(Map<String, CaseElement> allCaseElements) { th...
} public void setReactivateEventListener(ReactivateEventListener reactivateEventListener) { this.reactivateEventListener = reactivateEventListener; } @Override public List<FlowableListener> getLifecycleListeners() { return this.lifecycleListeners; } @Override public void s...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\Case.java
1
请完成以下Java代码
private boolean isDebugModeEnabled() { return sysConfigBL.getBooleanValue(SYSCONFIG_DEBUG, false); } /** * Gets the EMail TO address to be used when sending mails. * If present, this address will be used to send all emails to a particular address instead of actual email addresses. * * @return email addres...
return null; } } public void send(final EMail email) { final EMailSentStatus sentStatus = email.send(); sentStatus.throwIfNotOK(); } public MailTextBuilder newMailTextBuilder(@NonNull final MailTemplate mailTemplate) { return MailTextBuilder.newInstance(mailTemplate); } public MailTextBuilder newMail...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\email\MailService.java
1
请在Spring Boot框架中完成以下Java代码
public List<String> roleTreeKeys(String roleIds) { List<RoleMenu> roleMenus = roleMenuService.list(Wrappers.<RoleMenu>query().lambda().in(RoleMenu::getRoleId, Func.toLongList(roleIds))); return roleMenus.stream().map(roleMenu -> Func.toStr(roleMenu.getMenuId())).collect(Collectors.toList()); } @Override public ...
routes.forEach(route -> list.add(Kv.init().set(route.getPath(), Kv.init().set("authority", Func.toStrArray(route.getAlias()))))); return list; } @Override public List<MenuVO> grantTopTree(BladeUser user) { return ForestNodeMerger.merge(user.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? baseMapper.grantT...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\service\impl\MenuServiceImpl.java
2
请完成以下Java代码
public Result processWorkPackage(@NonNull final I_C_Queue_WorkPackage workPackage, final String localTrxName) { // use the workpackge's ctx. It contains the client, org and user that created the queu-block this package belongs to final Properties localCtx = InterfaceWrapperHelper.getCtx(workPackage); final List...
// This is a workaround and we do that because our testers reported that randomly, when we do mass invoicing, // sometimes there are some invoice candidates invalidated. final AsyncBatchId asyncBatchId = AsyncBatchId.ofRepoIdOrNull(getC_Queue_WorkPackage().getC_Async_Batch_ID()); invoiceCandUpdateSchedulerServic...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\async\spi\impl\InvoiceCandWorkpackageProcessor.java
1
请在Spring Boot框架中完成以下Java代码
public void setName(String name) { this.name = name; } public void setFields(Set<String> fields) { this.fields = fields; } public String getAlias() { return alias; } public void setAlias(String alias) { this.alias = alias; } public boolean isAll() { ...
return false; } for (String queryField : fields) { if (oConvertUtils.isIn(queryField, controlFields)) { log.warn("字典表白名单校验,表【" + name + "】中字段【" + queryField + "】无权限查询"); return false; } } return true; } @Override ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\firewall\SqlInjection\SysDictTableWhite.java
2
请完成以下Java代码
public class ExpressionBasedPreInvocationAdvice implements PreInvocationAuthorizationAdvice { private MethodSecurityExpressionHandler expressionHandler = new DefaultMethodSecurityExpressionHandler(); @Override public boolean before(Authentication authentication, MethodInvocation mi, PreInvocationAttribute attr) { ...
} else if (invocation.getArguments().length == 1) { Object arg = invocation.getArguments()[0]; if (arg.getClass().isArray() || arg instanceof Collection<?>) { filterTarget = arg; } Assert.notNull(filterTarget, () -> "A PreFilter expression was set but the method argument type" + arg.getClass() + ...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\expression\method\ExpressionBasedPreInvocationAdvice.java
1
请完成以下Java代码
private String extractFileName(final @NonNull PrintingData printingData) { final boolean includeSystemTimeMS = sysConfigBL.getBooleanValue( SYSCONFIG_STORE_PDF_INCLUDE_SYSTEM_TIME_MS_IN_FILENAME, true /*defaultValue*/, ClientId.METASFRESH.getRepoId(), printingData.getOrgId().getRepoId()); final St...
{ final HardwarePrinter printer = segment.getPrinter(); if (!OutputType.Store.equals(printer.getOutputType())) { logger.debug("Printer with id={} has outputType={}; -> skipping it", printer.getId().getRepoId(), printer.getOutputType()); continue; } final Path path; if (segment.getTrayId() != n...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\printingdata\PrintingDataToPDFFileStorer.java
1
请完成以下Java代码
protected void restoreModelWhenSnapshotIsMissing(final I_M_HU model) { throw new HUException("Cannot restore " + model + " because snapshot is missing"); } @Override protected int getModelId(final I_M_HU_Snapshot modelSnapshot) { return modelSnapshot.getM_HU_ID(); } @Override protected I_M_HU getModel(fin...
Set<Integer> huIdsToCheck = new HashSet<>(startHUIds); while (!huIdsToCheck.isEmpty()) { huIdsCollector.addAll(huIdsToCheck); final Set<Integer> huItemIds = retrieveM_HU_Item_Ids(huIdsToCheck); huItemIdsCollector.addAll(huItemIds); final Set<Integer> includedHUIds = retrieveIncludedM_HUIds(huItemIds); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\snapshot\impl\M_HU_SnapshotHandler.java
1
请在Spring Boot框架中完成以下Java代码
public int getMigrationLastSeqNo(final I_AD_Migration migration) { final Properties ctx = InterfaceWrapperHelper.getCtx(migration); final String trxName = InterfaceWrapperHelper.getTrxName(migration); final BigDecimal maxSeqNo = new TypedSqlQuery<I_AD_Migration>(ctx, I_AD_Migration.class, null, trxName) .agg...
@Override public List<I_AD_MigrationData> retrieveMigrationData(final I_AD_MigrationStep step) { if (step == null || step.getAD_MigrationStep_ID() <= 0) { return new ArrayList<I_AD_MigrationData>(); } final Properties ctx = InterfaceWrapperHelper.getCtx(step); final String trxName = InterfaceWrapperHelp...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\service\impl\MigrationDAO.java
2
请完成以下Java代码
public void actionPerformed(ActionEvent e) { // log.trace( "ADialogDialog.actionPerformed - " + e); if (e.getActionCommand().equals(ConfirmPanel.A_OK)) { m_returnCode = A_OK; dispose(); } else if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL) || e.getSource() == mEnd) { m_returnCode = A_CANCE...
} else if (initialAnswer == A_CANCEL) { // NOTE: we need to set the OK's Accelerator keystroke to null because in most of the cases it is "Enter" // and we want to prevent user for hiting ENTER by mistake okAction.setAccelerator(null); cancelAction.setDefaultAccelerator(); rootPane.setDefaultButton(c...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ADialogDialog.java
1
请完成以下Java代码
public org.compiere.model.I_R_Request getR_Request() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_R_Request_ID, org.compiere.model.I_R_Request.class); } @Override public void setR_Request(org.compiere.model.I_R_Request R_Request) { set_ValueFromPO(COLUMNNAME_R_Request_ID, org.compiere.model.I_R_R...
{ return get_ValueAsPO(COLUMNNAME_To_User_ID, org.compiere.model.I_AD_User.class); } @Override public void setTo_User(org.compiere.model.I_AD_User To_User) { set_ValueFromPO(COLUMNNAME_To_User_ID, org.compiere.model.I_AD_User.class, To_User); } /** Set To User. @param To_User_ID To User */ @Override p...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Mail.java
1
请完成以下Java代码
public void setTaxAmt (java.math.BigDecimal TaxAmt) { set_ValueNoCheck (COLUMNNAME_TaxAmt, TaxAmt); } /** Get Steuerbetrag. @return Tax Amount for a document */ @Override public java.math.BigDecimal getTaxAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TaxAmt); if (bd == null) return En...
*/ @Override public void setTaxBaseAmt (java.math.BigDecimal TaxBaseAmt) { set_ValueNoCheck (COLUMNNAME_TaxBaseAmt, TaxBaseAmt); } /** Get Bezugswert. @return Base for calculating the tax amount */ @Override public java.math.BigDecimal getTaxBaseAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_TaxDeclarationLine.java
1
请完成以下Java代码
public TbMsgProcessingStackItem pop() { if (stack == null || stack.isEmpty()) { return null; } return stack.removeLast(); } public static TbMsgProcessingCtx fromProto(MsgProtos.TbMsgProcessingCtxProto ctx) { int ruleNodeExecCounter = ctx.getRuleNodeExecCounter(); ...
return new TbMsgProcessingCtx(ruleNodeExecCounter); } } public MsgProtos.TbMsgProcessingCtxProto toProto() { var ctxBuilder = MsgProtos.TbMsgProcessingCtxProto.newBuilder(); ctxBuilder.setRuleNodeExecCounter(ruleNodeExecCounter.get()); if (stack != null) { for (TbMsg...
repos\thingsboard-master\common\message\src\main\java\org\thingsboard\server\common\msg\TbMsgProcessingCtx.java
1
请完成以下Java代码
public void setPayPal_ClientSecret (final java.lang.String PayPal_ClientSecret) { set_Value (COLUMNNAME_PayPal_ClientSecret, PayPal_ClientSecret); } @Override public java.lang.String getPayPal_ClientSecret() { return get_ValueAsString(COLUMNNAME_PayPal_ClientSecret); } @Override public void setPayPal_Con...
} @Override public java.lang.String getPayPal_PaymentApprovedCallbackUrl() { return get_ValueAsString(COLUMNNAME_PayPal_PaymentApprovedCallbackUrl); } @Override public void setPayPal_Sandbox (final boolean PayPal_Sandbox) { set_Value (COLUMNNAME_PayPal_Sandbox, PayPal_Sandbox); } @Override public bool...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java-gen\de\metas\payment\paypal\model\X_PayPal_Config.java
1
请完成以下Java代码
public class HelloWorldMain { public static void main(String[] args) { String path = System.getProperty("user.dir") + "/target/libraries2-1.0.0-SNAPSHOT.jar"; CommandInfo.URI uri = CommandInfo.URI.newBuilder().setValue(path).setExtract(false).build(); String helloWorldCom...
.setUser("") .setName("Hello World Framework (Java)"); frameworkBuilder.setPrincipal("test-framework-java"); MesosSchedulerDriver driver = new MesosSchedulerDriver(new HelloWorldScheduler(executorHelloWorld), frameworkBuilder.build(), args[0]); int status = driver.run() == Pro...
repos\tutorials-master\apache-libraries\src\main\java\com\baeldung\mesos\HelloWorldMain.java
1
请在Spring Boot框架中完成以下Java代码
public class ResourceProductService implements IResourceProductService { @Override public ResourceType getResourceTypeById(final ResourceTypeId resourceTypeId) { return Services.get(IResourceDAO.class).getResourceTypeById(resourceTypeId); } @Override public ResourceType getResourceTypeByResourceId(final Resour...
} @Override public TemporalUnit getResourceTemporalUnit(final ResourceId resourceId) { final ProductId resourceProductId = getProductIdByResourceId(resourceId); final I_C_UOM uom = Services.get(IProductBL.class).getStockUOM(resourceProductId); return UOMUtil.toTemporalUnit(uom); } @Override public I_C_UOM...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\impl\ResourceProductService.java
2
请在Spring Boot框架中完成以下Java代码
public class InMemoryTokenRepositoryImpl implements PersistentTokenRepository { private final Map<String, PersistentRememberMeToken> seriesTokens = new HashMap<>(); @Override public synchronized void createNewToken(PersistentRememberMeToken token) { PersistentRememberMeToken current = this.seriesTokens.get(token...
// Store it, overwriting the existing one. this.seriesTokens.put(series, newToken); } @Override public synchronized @Nullable PersistentRememberMeToken getTokenForSeries(String seriesId) { return this.seriesTokens.get(seriesId); } @Override public synchronized void removeUserTokens(String username) { Iter...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\rememberme\InMemoryTokenRepositoryImpl.java
2
请在Spring Boot框架中完成以下Java代码
public CustomUser loadUserDetail(String username) { return userRoleRepository.loadUserByUserName(username); } @PreFilter("filterObject != authentication.principal.username") public String joinUsernames(List<String> usernames) { return usernames.stream().collect(Collectors.joining(";")); ...
} @IsViewer public String getUsername4() { SecurityContext securityContext = SecurityContextHolder.getContext(); return securityContext.getAuthentication().getName(); } @PreAuthorize("#username == authentication.principal.username") @PostAuthorize("returnObject.username == authenti...
repos\tutorials-master\spring-security-modules\spring-security-core\src\main\java\com\baeldung\methodsecurity\service\UserRoleService.java
2
请完成以下Java代码
private void showOrgChangeModalIfNeeded(final @NonNull I_C_BPartner_Location bpLocation, final LocationId newLocationId, @Nullable final LocationId oldLocationId) { if (Execution.isCurrentExecutionAvailable() && isAskForOrgChangeOnRegionChange()) { final I_C_Location newLocation = locationDAO.getById(newLoc...
} } private JSONTriggerAction moveToAnotherOrgTriggerAction(final @NonNull I_C_BPartner_Location bpLocation) { return JSONTriggerAction.startProcess( getMoveToAnotherOrgProcessId(), getBPartnerDocumentPath(bpLocation)); } private boolean isAskForOrgChangeOnRegionChange() { return sysConfigBL.getBool...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bpartner\interceptor\C_BPartner_Location.java
1
请完成以下Java代码
public String getGeom() { return geom; } public void setGeom(String geom) { this.geom = geom; } public String getId() { return id; } public void setId(String id) { this.id = id; }
public String getDes() { return des; } public void setDes(String des) { this.des = des; } public boolean isAppendWrite() { return appendWrite; } public void setAppendWrite(boolean appendWrite) { this.appendWrite = appendWrite; } }
repos\springboot-demo-master\GeoTools\src\main\java\com\et\geotools\pojos\ShpInfo.java
1
请完成以下Java代码
public class ExecuteJobCmd implements Command<Object>, Serializable { private static final long serialVersionUID = 1L; private static Logger log = LoggerFactory.getLogger(ExecuteJobCmd.class); protected String jobId; public ExecuteJobCmd(String jobId) { this.jobId = jobId; } public ...
protected void executeInternal(CommandContext commandContext, Job job) { commandContext.addCloseListener( new FailedJobListener(commandContext.getProcessEngineConfiguration().getCommandExecutor(), job) ); try { commandContext.getJobManager().execute(job); } catch...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\ExecuteJobCmd.java
1
请完成以下Java代码
public List<HistoricIncidentDto> getOpenHistoricIncidents(@QueryParam("createdAfter") String createdAfterAsString, @QueryParam("createdAt") String createdAtAsString, @QueryParam("maxResults") int maxR...
config.getOptimizeService().getHistoricDecisionInstances(evaluatedAfter, evaluatedAt, maxResults); List<HistoricDecisionInstanceDto> resultList = new ArrayList<>(); for (HistoricDecisionInstance historicDecisionInstance : historicDecisionInstances) { HistoricDecisionInstanceDto dto = HistoricDeci...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\optimize\OptimizeRestService.java
1
请在Spring Boot框架中完成以下Java代码
public class MainRowBucketId { @NonNull ProductId productId; @NonNull LocalDate date; private MainRowBucketId( @NonNull final ProductId productId, @NonNull final LocalDate date) { this.productId = productId; this.date = date; } public static MainRowBucketId createInstanceForCockpitRecord( @NonNull ...
return new MainRowBucketId( ProductId.ofRepoId(stockRecord.getM_Product_ID()), date); } @NonNull public static MainRowBucketId createInstanceForQuantitiesRecord( @NonNull final ProductWithDemandSupply qtyRecord, @NonNull final LocalDate date) { return new MainRowBucketId(qtyRecord.getProductId(), d...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\rowfactory\MainRowBucketId.java
2
请完成以下Java代码
public List<PlanItem> getExitDependencies() { return exitDependencies; } public void setExitDependencies(List<PlanItem> exitDependencies) { this.exitDependencies = exitDependencies; } public List<PlanItem> getEntryDependentPlanItems() { return entryDependentPlanItems; } ...
allDependentPlanItems.addAll(exitDependentPlanItems); return allDependentPlanItems; } @Override public String toString() { StringBuilder stringBuilder = new StringBuilder("PlanItem"); if (getName() != null) { stringBuilder.append(" '").append(getName()).append("'"); ...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\PlanItem.java
1
请完成以下Java代码
protected void handle(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException { String targetUrl = determineTargetUrl(authentication); if (response.isCommitted()) { logger.debug("Response has already been committed. Unable to redirect to "...
HttpSession session = request.getSession(false); if (session == null) { return; } session.removeAttribute(WebAttributes.AUTHENTICATION_EXCEPTION); } public void setRedirectStrategy(RedirectStrategy redirectStrategy) { this.redirectStrategy = redirectStrategy; } ...
repos\tutorials-master\spring-web-modules\spring-static-resources\src\main\java\com\baeldung\security\MySimpleUrlAuthenticationSuccessHandler.java
1
请完成以下Java代码
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { switch (ruleIndex) { case 2: return expr_sempred((ExprContext)_localctx, predIndex); } return true; } private boolean expr_sempred(ExprContext _localctx, int predIndex) { switch (predIndex) { case 0: return precpred(_ctx, ...
"\2\2\2\13\t\3\2\2\2\13\f\3\2\2\2\f\3\3\2\2\2\r\16\5\6\4\2\16\17\7\f\2"+ "\2\17\27\3\2\2\2\20\21\7\n\2\2\21\22\7\3\2\2\22\23\5\6\4\2\23\24\7\f\2"+ "\2\24\27\3\2\2\2\25\27\7\f\2\2\26\r\3\2\2\2\26\20\3\2\2\2\26\25\3\2\2"+ "\2\27\5\3\2\2\2\30\31\b\4\1\2\31 \7\13\2\2\32 \7\n\2\2\33\34\7\4\2\2\34"+ "\35\5\6\4\2\35\3...
repos\springboot-demo-master\ANTLR\src\main\java\com\et\antlr\LabeledExprParser.java
1
请完成以下Java代码
protected String doIt() throws Exception { final MInvoice invoice = new MInvoice(getCtx(), p_C_Invoice_ID, get_TrxName()); recalculateTax(invoice); // return "@ProcessOK@"; } public static void recalculateTax(final MInvoice invoice) { final IBPartnerDAO bpartnerDAO = Services.get(IBPartnerDAO.class); f...
Services.get(IFactAcctDAO.class).deleteForDocument(invoice); // // Update Invoice invoice.calculateTaxTotal(); invoice.setPosted(false); invoice.saveEx(); // FRESH-152 Update bpartner stats Services.get(IBPartnerStatisticsUpdater.class) .updateBPartnerStatistics(BPartnerStatisticsUpdateRequest.builde...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\eevolution\process\InvoiceCalculateTax.java
1
请完成以下Java代码
public void setC_Location_ID (int C_Location_ID) { if (C_Location_ID < 1) set_Value (COLUMNNAME_C_Location_ID, null); else set_Value (COLUMNNAME_C_Location_ID, Integer.valueOf(C_Location_ID)); } /** Get Anschrift. @return Adresse oder Anschrift */ @Override public int getC_Location_ID () { In...
*/ @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 erforderlichen Format - muss eindeutig sein */ @Override public void setValue (java.lang.String Value) { set_Value (COLUMNNA...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java-gen\de\metas\fresh\model\X_C_Allotment.java
1
请完成以下Java代码
private ImmutableMap<Optional<PaymentTermId>, IInvoiceLineRW> mapUniqueIInvoiceLineRWPerPaymentTerm(@NonNull final List<IInvoiceCandAggregate> lines) { final List<IInvoiceLineRW> invoiceLinesRW = new ArrayList<>(); lines.forEach(lineAgg -> invoiceLinesRW.addAll(lineAgg.getAllLines())); return invoiceLinesRW.str...
final Money totalAmt = invoiceHeader.calculateTotalNetAmtFromLines(); docTypeIdToBeUsed = docTypeInvoicingPool.getDocTypeId(totalAmt); final I_C_DocType docTypeToBeUsedRecord = docTypeBL.getById(docTypeIdToBeUsed); Check.assume(invoiceIsSOTrx == docTypeToBeUsedRecord.isSOTrx(), "InvoiceHeader's IsSOTrx={} sh...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\AggregationEngine.java
1
请完成以下Java代码
public static JSONClosableMode ofClosableMode(@NonNull final ClosableMode closableMode) { switch (closableMode) { case ALWAYS_OPEN: return ALWAYS_OPEN; case INITIALLY_CLOSED: return INITIALLY_CLOSED; case INITIALLY_OPEN: return INITIALLY_OPEN; default: throw new AdempiereExce...
if (options.isShowAdvancedFields()) { return section.getCaption(options.getAdLanguage()).trim(); } else { return null; } } else if (CaptionMode.DONT_DISPLAY.equals(section.getCaptionMode())) { return null; } throw new AdempiereException("Unexpected captionMode=" + section.getCaption...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONDocumentLayoutSection.java
1
请在Spring Boot框架中完成以下Java代码
private static Set<X509Certificate> getTrustedCerts(KeyStore ks, boolean trustsOnly) { Set<X509Certificate> set = new HashSet<>(); try { for (Enumeration<String> e = ks.aliases(); e.hasMoreElements(); ) { String alias = e.nextElement(); if (ks.isCertificateEnt...
for (Certificate cert : certs) { // is CA certificate if (((X509Certificate) cert).getBasicConstraints()>=0) { set.add((X509Certificate) cert); } } ...
repos\thingsboard-master\common\transport\transport-api\src\main\java\org\thingsboard\server\common\transport\config\ssl\AbstractSslCredentials.java
2
请完成以下Java代码
private int getSequenceId(@NonNull final ProductCategoryId productCategoryId) { return productCategoryId2AD_Sequence_ID.getOrLoad( productCategoryId, () -> extractSequenceId(productCategoryId, new HashSet<>())); } private int extractSequenceId( @NonNull final ProductCategoryId productCategoryId, @No...
if (productCategory.getM_Product_Category_Parent_ID() > 0) { final ProductCategoryId productCategoryParentId = ProductCategoryId.ofRepoId(productCategory.getM_Product_Category_Parent_ID()); // first, guard against a loop if (!seenIds.add(productCategoryParentId)) { // there is no AD_Sequence_ID for u...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\sequence\ProductValueSequenceProvider.java
1
请完成以下Java代码
public Collection<DocumentFilterDescriptor> getAll() { return filtersById.values(); } @Override public DocumentFilterDescriptor getByFilterIdOrNull(final String filterId) { return filtersById.get(filterId); } @Override public DocumentFilter unwrap(final @NonNull JSONDocumentFilter jsonFilter) { if (Pro...
return Optional.empty(); } private ImmutableList<ProductBarcodeFilterDataFactory> getProductBarcodeFilterDataFactories() { return ImmutableList.of( // Check if given barcode is a product UPC or M_Product.Value new UPCProductBarcodeFilterDataFactory(), // Check if given barcode is a SSCC18 of an existi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\packageable\filters\PackageableFilterDescriptorProvider.java
1
请完成以下Java代码
public List<String> getEntryPoints() { return entryPoints; } public void setEntryPoints(List<String> entryPoints) { this.entryPoints = entryPoints; } public boolean isEnableSecureCookie() { return enableSecureCookie; } public void setEnableSecureCookie(boolean enableSecureCookie) { this.e...
if (enableSecureCookie) { // only add param if it's true; default is false initParams.put("enableSecureCookie", String.valueOf(enableSecureCookie)); } if (!enableSameSiteCookie) { // only add param if it's false; default is true initParams.put("enableSameSiteCookie", String.valueOf(enableSameSiteCo...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\CsrfProperties.java
1
请完成以下Java代码
public void setVersion (java.lang.String Version) { set_Value (COLUMNNAME_Version, Version); } /** Get Version. @return Version of the table definition */ @Override public java.lang.String getVersion () { return (java.lang.String)get_Value(COLUMNNAME_Version); } /** Set WebUIServletListener Class. ...
*/ @Override public void setWebUIServletListenerClass (java.lang.String WebUIServletListenerClass) { set_Value (COLUMNNAME_WebUIServletListenerClass, WebUIServletListenerClass); } /** Get WebUIServletListener Class. @return Optional class to execute custom code on WebUI startup; A declared class needs to impl...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_EntityType.java
1
请在Spring Boot框架中完成以下Java代码
public class CostsRevaluationResult { @NonNull CurrentCostBeforeEvaluation currentCostBeforeEvaluation; @NonNull @Singular ImmutableList<CostDetailAdjustment> costDetailAdjustments; @NonNull CurrentCostAfterEvaluation currentCostAfterEvaluation; // // // @Value public static class CurrentCostBeforeEvaluation ...
this.qty = qty; this.costPriceOld = costPriceOld; this.costPriceNew = costPriceNew; } } @Value @Builder public static class CurrentCostAfterEvaluation { @NonNull Quantity qty; @NonNull CostAmount costPriceComputed; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\CostsRevaluationResult.java
2
请完成以下Java代码
public String[] segment(String text) { if (text.length() == 0) return new String[0]; char[] charArray = text.toCharArray(); CharTable.normalization(charArray); // 先拆成字 List<int[]> atomList = new LinkedList<int[]>(); int start = 0; int end = charArray.length; ...
if (preType == CharType.CT_NUM || preType == CharType.CT_LETTER) atomList.add(new int[]{start, offsetAtom - start}); if (atomList.isEmpty()) return new String[0]; // 输出 String[] termArray = new String[atomList.size() - 1]; Iterator<int[]> iterator = atomList.iterator(); int[] pre...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\tokenizers\BigramTokenizer.java
1
请完成以下Java代码
public static User getSingletonInstance(String name, String email, String country) { if (instance == null) { synchronized (User.class) { if (instance == null) { instance = new User(name, email, country); } } } return ins...
this.country = country; } public String getName() { return name; } public String getEmail() { return email; } public String getCountry() { return country; } }
repos\tutorials-master\patterns-modules\design-patterns-creational-2\src\main\java\com\baeldung\constructorsstaticfactorymethods\entities\User.java
1
请在Spring Boot框架中完成以下Java代码
public Session getSession() { return this.session; } } /** * Reactive server properties. */ public static class Reactive { private final Session session = new Session(); public Session getSession() { return this.session; } public static class Session { /** * Session timeout. If a dur...
*/ public enum ForwardHeadersStrategy { /** * Use the underlying container's native support for forwarded headers. */ NATIVE, /** * Use Spring's support for handling forwarded headers. */ FRAMEWORK, /** * Ignore X-Forwarded-* headers. */ NONE } public static class Encoding { /**...
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\autoconfigure\ServerProperties.java
2
请完成以下Java代码
public void setStatus (java.lang.String Status) { set_Value (COLUMNNAME_Status, Status); } /** Get Status. @return Status of the currently running check */ @Override public java.lang.String getStatus () { return (java.lang.String)get_Value(COLUMNNAME_Status); } @Override public org.compiere.model....
return ii.intValue(); } /** * WeekDay AD_Reference_ID=167 * Reference name: Weekdays */ public static final int WEEKDAY_AD_Reference_ID=167; /** Sonntag = 7 */ public static final String WEEKDAY_Sonntag = "7"; /** Montag = 1 */ public static final String WEEKDAY_Montag = "1"; /** Dienstag = 2 */ public...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Scheduler.java
1
请在Spring Boot框架中完成以下Java代码
public ClientRegionShortcut getShortcut() { return this.shortcut != null ? this.shortcut : DEFAULT_CLIENT_REGION_SHORTCUT; } public void setShortcut(ClientRegionShortcut shortcut) { this.shortcut = shortcut; } } public static class PoolProperties { private String name; public String getName() { ...
public void setIndexable(String[] indexable) { this.indexable = indexable; } } public static class SessionExpirationProperties { private int maxInactiveIntervalSeconds; public int getMaxInactiveIntervalSeconds() { return this.maxInactiveIntervalSeconds; } public void setMaxInactiveIntervalSeconds(...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\SpringSessionProperties.java
2
请完成以下Java代码
public class BookBorrowResponse { private String userId; private String bookId; private String status; public BookBorrowResponse(String userId, String bookId, String status) { this.userId = userId; this.bookId = bookId; this.status = status; } public String getUserId()...
public String getBookId() { return bookId; } public void setBookId(String bookId) { this.bookId = bookId; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } }
repos\tutorials-master\spring-reactive-modules\spring-webflux\src\main\java\com\baeldung\spring\convertmonoobject\BookBorrowResponse.java
1
请完成以下Java代码
class UpperBoundAllocationStrategy extends AbstractAllocationStrategy { @Nullable private final Capacity capacityOverride; /** * @param capacityOverride optional capacity that can override the one from the packing instructions. */ public UpperBoundAllocationStrategy( @Nullable final Capacity capacityOverrid...
// + "\n PI: " + handlingUnitsBL.getPI(item.getM_HU()).getName() + "\n Request: " + request); } return AllocationUtils.nullResult(); } // // We are about to allocate to Virtual HUs linked to given "item" (which shall be of type Material). // In this case we rely on the standard logic. return supe...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\strategy\UpperBoundAllocationStrategy.java
1
请完成以下Java代码
public CountResultDto getJobsCount(UriInfo uriInfo) { JobQueryDto queryDto = new JobQueryDto(getObjectMapper(), uriInfo.getQueryParameters()); return queryJobsCount(queryDto); } @Override public CountResultDto queryJobsCount(JobQueryDto queryDto) { ProcessEngine engine = getProcessEngine(); query...
} try { SetJobRetriesByJobsAsyncBuilder builder = getProcessEngine().getManagementService() .setJobRetriesByJobsAsync(setJobRetriesDto.getRetries().intValue()) .jobIds(setJobRetriesDto.getJobIds()) .jobQuery(jobQuery); if(setJobRetriesDto.isDueDateSet()) { builder....
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\JobRestServiceImpl.java
1
请完成以下Spring Boot application配置
server: port: 8088 spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver type: com.zaxxer.hikari.HikariDataSource url: jdbc:mysql://127.0.0.1:3306/demo?useUnicod
e=true&characterEncoding=utf-8&useSSL=false username: root password: root
repos\springboot-demo-master\mysql\src\main\resources\application.yaml
2
请在Spring Boot框架中完成以下Java代码
public ResponseEntity<Object> saveUser(@RequestBody User user) { return new ResponseEntity<>(userService.saveUser(user), HttpStatus.OK); } /** * 修改用户信息 * api :localhost:8099/users * @param user * @return */ @RequestMapping(method = RequestMethod.PUT) @ResponseBody @...
return new ResponseEntity<>(userService.updateUser(user), HttpStatus.OK); } /** * 通过ID删除用户 * api :localhost:8099/users/2 * @param id * @return */ @RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @ResponseBody @ApiOperation(value = "通过id删除用户信息", notes="返回删除状态1...
repos\springBoot-master\springboot-swagger-ui\src\main\java\com\abel\example\controller\UserController.java
2
请完成以下Java代码
public Date timestamp() { return this.timestamp; } byte[] bodyAsByteArray() throws IOException { var bodyStream = new ByteArrayOutputStream(); var channel = Channels.newChannel(bodyStream); for (ByteBuffer byteBuffer : body()) { channel.write(byteBuffer); } return bodyStream.toByteArray(); } String...
return this; } public Builder timestamp(Date timestamp) { this.timestamp = timestamp.toInstant(); return this; } public Builder body(String data) { return appendToBody(ByteBuffer.wrap(data.getBytes(StandardCharsets.UTF_8))); } public Builder appendToBody(ByteBuffer byteBuffer) { this.body.add...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\cache\CachedResponse.java
1
请完成以下Java代码
public class PDF2TextExample { private static final String PDF = "src/main/resources/pdf.pdf"; private static final String TXT = "src/main/resources/txt.txt"; public static void main(String[] args) { try { generateTxtFromPDF(PDF); generatePDFFromTxt(TXT); } catch (IOException | DocumentException e) { ...
private static void generatePDFFromTxt(String filename) throws IOException, DocumentException { Document pdfDoc = new Document(PageSize.A4); PdfWriter.getInstance(pdfDoc, new FileOutputStream("src/output/txt.pdf")) .setPdfVersion(PdfWriter.PDF_VERSION_1_7); pdfDoc.open(); Font myfont = new Font(); myfo...
repos\tutorials-master\text-processing-libraries-modules\pdf\src\main\java\com\baeldung\pdf\PDF2TextExample.java
1
请在Spring Boot框架中完成以下Java代码
public class SessionListener implements HttpSessionListener, HttpSessionIdListener, ApplicationContextAware { private static final Logger LOG = LoggerFactory.getLogger(SessionListener.class); private final UserAccessService userAccessService; @Autowired public SessionListener(UserAccessService userAc...
LOG.info("sessionDestroyed: {}", se.getSession().getId()); userAccessService.logout(SessionId.from(se.getSession().getId())); } @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { LOG.info("setApplicationContext"); if (applicati...
repos\spring-examples-java-17\spring-security\src\main\java\itx\examples\springboot\security\springsecurity\config\SessionListener.java
2
请完成以下Java代码
public ProcessInstanceQueryDto getProcessInstanceQuery() { return processInstanceQuery; } public void setProcessInstanceQuery(ProcessInstanceQueryDto processInstanceQuery) { this.processInstanceQuery = processInstanceQuery; } public String getDeleteReason() { return deleteReason; } public voi...
public HistoricProcessInstanceQueryDto getHistoricProcessInstanceQuery() { return historicProcessInstanceQuery; } public boolean isSkipSubprocesses() { return skipSubprocesses; } public void setSkipSubprocesses(Boolean skipSubprocesses) { this.skipSubprocesses = skipSubprocesses; } public boo...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\batch\DeleteProcessInstancesDto.java
1
请完成以下Java代码
public static Set<String> columnNames() { return getColumnName2typesMap().keySet(); } public static final InvoiceWriteOffAmountType valueOfColumnNameOrNull(final String columnName) { final InvoiceWriteOffAmountType type = getColumnName2typesMap().get(columnName); return type; } public static final Invoice...
private static Map<String, InvoiceWriteOffAmountType> _columnName2types; private static final Map<String, InvoiceWriteOffAmountType> getColumnName2typesMap() { if (_columnName2types == null) { // NOTE: we preserve the same order as the values() are. final ImmutableMap.Builder<String, InvoiceWriteOffAmountT...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.swingui\src\main\java\de\metas\banking\payment\paymentallocation\model\InvoiceWriteOffAmountType.java
1
请完成以下Java代码
public class Person { private final String name; private final Integer age; private Person(String name, Integer age) { this.name = name; this.age = age; } public String getName() { return name; } public Integer getAge() { return age; } @JsonPOJOBu...
Builder withName(String name) { this.name = name; return this; } Builder withAge(Integer age) { this.age = age; return this; } Person build() { return new Person(name, age); } } }
repos\tutorials-master\jackson-modules\jackson-conversions-3\src\main\java\com\baeldung\jackson\immutable\Person.java
1
请完成以下Java代码
public void updateQtyPromisedAndSave(final I_C_RfQResponseLine rfqResponseLine) { final BigDecimal qtyPromised = Services.get(IRfqDAO.class).calculateQtyPromised(rfqResponseLine); rfqResponseLine.setQtyPromised(qtyPromised); InterfaceWrapperHelper.save(rfqResponseLine); } // @Override // public void uncloseIn...
// // // final IRfQEventDispacher rfQEventDispacher = getRfQEventDispacher(); // rfQEventDispacher.fireBeforeUnClose(rfqResponse); // // // // // Mark as NOT closed // rfqResponse.setDocStatus(X_C_RfQResponse.DOCSTATUS_Completed); // InterfaceWrapperHelper.save(rfqResponse); // updateRfQResponseLinesStatus(rfqR...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\impl\RfqBL.java
1
请完成以下Java代码
public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** EntityType AD_Reference_ID=389 */ public static final int ENTITYTYPE_AD_Reference_ID=389; /** Set Entitaets-Art. @param EntityType Dictionary Entity Type; Determines ownership and synchronization */ public void s...
return "Y".equals(oo); } return false; } /** Set Reihenfolge. @param SeqNo Zur Bestimmung der Reihenfolge der Eintraege; die kleinste Zahl kommt zuerst */ public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Reihenfolge. @return Zur Bestimmung der Re...
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代码
protected String doIt() { if (!isPartialDeliveryAllowed()) { if (!getView().isApproved()) { throw new AdempiereException("Not all rows were approved"); } } final ImmutableSet<PickingCandidateId> validPickingCandidates = getValidPickingCandidates(); if (!validPickingCandidates.isEmpty()) { ...
final List<I_M_HU> husToDeliver = handlingUnitsRepo.getByIds(huIdsToDeliver); HUShippingFacade.builder() .hus(husToDeliver) .addToShipperTransportationId(shipperTransportationId) .completeShipments(true) .failIfNoShipmentCandidatesFound(true) .invoiceMode(BillAssociatedInvoiceCandidates.IF_INVOIC...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\process\ProductsToPick_4EyesReview_ProcessAll.java
1
请完成以下Java代码
public void setM_Locator_ID (final int M_Locator_ID) { if (M_Locator_ID < 1) set_Value (COLUMNNAME_M_Locator_ID, null); else set_Value (COLUMNNAME_M_Locator_ID, M_Locator_ID); } @Override public int getM_Locator_ID() { return get_ValueAsInt(COLUMNNAME_M_Locator_ID); } @Override public void setM...
else set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, M_Warehouse_ID); } @Override public int getM_Warehouse_ID() { return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID); } /** * ReplenishType AD_Reference_ID=164 * Reference name: M_Replenish Type */ public static final int REPLENISHTYPE_AD_Reference_ID=1...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Replenish.java
1
请完成以下Java代码
private void createAndHandleMainDataRequestForOldValues( @NonNull final OldShipmentScheduleData oldShipmentScheduleData, @NonNull final MainDataRecordIdentifier identifier) { final BigDecimal oldReservedQuantity = oldShipmentScheduleData.getOldReservedQuantity(); final BigDecimal oldOrderedQuantity = oldShip...
final Map<ProductDescriptor, Quantity> components = productBOMBL.calculateRequiredQtyInStockUOMForComponents(qty, productBOM); for (final Map.Entry<ProductDescriptor, Quantity> component : components.entrySet()) { final MainDataRecordIdentifier bomIdentifier = MainDataRecordIdentifier.builder() .product...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\view\eventhandler\ShipmentScheduleEventHandler.java
1
请在Spring Boot框架中完成以下Java代码
public class TokenBasedAuthService { private final Logger logger = Logger.getLogger(TokenBasedAuthService.class.getName()); private final ConcurrentHashMap<String, Authentication> restApiAuthToken = new ConcurrentHashMap<>(); @NonNull private final List<PreAuthenticatedIdentity> preAuthenticatedIdentities; publ...
public int getNumberOfAuthenticatedTokens(@NonNull final String authority) { final SimpleGrantedAuthority grantedAuthority = new SimpleGrantedAuthority(authority); return (int)restApiAuthToken.values() .stream() .map(Authentication::getAuthorities) .filter(item -> item.contains(grantedAuthority)) ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\core\src\main\java\de\metas\camel\externalsystems\core\restapi\auth\TokenBasedAuthService.java
2
请完成以下Java代码
public boolean isExpired() { return this.cached.isExpired(); } private void flushIfRequired() { if (RedisSessionRepository.this.flushMode == FlushMode.IMMEDIATE) { save(); } } private boolean hasChangedSessionId() { return !getId().equals(this.originalSessionId); } private void save() { ...
} } private void saveDelta() { if (this.delta.isEmpty()) { return; } String key = getSessionKey(getId()); RedisSessionRepository.this.sessionRedisOperations.opsForHash().putAll(key, new HashMap<>(this.delta)); RedisSessionRepository.this.sessionRedisOperations.expireAt(key, Instant.ofEpochM...
repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\RedisSessionRepository.java
1
请在Spring Boot框架中完成以下Java代码
public Result update(@RequestBody Article article, @TokenToUser AdminUser loginUser) { if (loginUser == null) { return ResultGenerator.genErrorResult(Constants.RESULT_CODE_NOT_LOGIN, "未登录!"); } if (articleService.update(article) > 0) { return ResultGenerator.genSuccessRes...
public Result delete(@RequestBody Integer[] ids, @TokenToUser AdminUser loginUser) { if (loginUser == null) { return ResultGenerator.genErrorResult(Constants.RESULT_CODE_NOT_LOGIN, "未登录!"); } if (ids.length < 1) { return ResultGenerator.genErrorResult(Constants.RESULT_COD...
repos\spring-boot-projects-main\SpringBoot前后端分离实战项目源码\spring-boot-project-front-end&back-end\src\main\java\cn\lanqiao\springboot3\controller\ArticleController.java
2
请完成以下Java代码
private void transferHandlingUnit(final IHUContext huContext, final I_M_ReceiptSchedule rs, final I_M_HU hu, final I_M_InOutLine receiptLine) { // // Assign it to Receipt Line assignHU(receiptLine, hu); // // Transfer attributes from HU to receipt line's ASI final IHUConte...
return IHUContextProcessor.NULL_RESULT; }); // // Create HU snapshots huSnapshotProducer.addModel(hu); } private void unassignHU(final I_M_ReceiptSchedule_Alloc rsa) { // // De-activate this allocation because we moved the HU to receipt line // TODO: provide proper implementation. See http://dewiki90...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\inoutcandidate\spi\impl\InOutProducerFromReceiptScheduleHU.java
1
请在Spring Boot框架中完成以下Java代码
private void regionValuesPointcut() { } @Around("regionPointcut() && regionGetPointcut()") public Object regionGetAdvice(ProceedingJoinPoint joinPoint) throws Throwable { return PdxInstanceWrapper.from(joinPoint.proceed()); } @Around("regionPointcut() && regionGetAllPointcut()") public Object regionGetAllAdvic...
} @Override public Region<K, V> getRegion() { return getDelegate().getRegion(); } @Override public CacheStatistics getStatistics() { return getDelegate().getStatistics(); } @Override public Object setUserAttribute(Object userAttribute) { return getDelegate().setUserAttribute(userAttribute); ...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\support\PdxInstanceWrapperRegionAspect.java
2
请完成以下Java代码
public class Contracts { private static final Logger logger = LoggerFactory.getLogger(Contracts.class); @Getter private final BPartner bpartner; @Getter private final ImmutableList<Contract> contracts; public Contracts( @NonNull final BPartner bpartner, @NonNull final List<Contract> contracts) { this.b...
if (contractLine == null) { continue; } if (contract.isRfq()) { matchingLinesWithRfq.add(contractLine); } else { matchingLinesOthers.add(contractLine); } } // Contracts with RfQ (priority) if (!matchingLinesWithRfq.isEmpty()) { if (matchingLinesWithRfq.size() > 1) { ...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\model\Contracts.java
1
请在Spring Boot框架中完成以下Java代码
public class DocumentPrintOptionDescriptorsList { public static final DocumentPrintOptionDescriptorsList EMPTY = new DocumentPrintOptionDescriptorsList(ImmutableList.of()); ImmutableList<DocumentPrintOptionDescriptor> options; private DocumentPrintOptionDescriptorsList(@NonNull final List<DocumentPrintOptionDescri...
public DocumentPrintOptions getDefaults() { final DocumentPrintOptions.DocumentPrintOptionsBuilder builder = DocumentPrintOptions.builder() .sourceName("AD_Process defaults"); for (final DocumentPrintOptionDescriptor option : options) { if (option.getDefaultValue() == null) { continue; } bu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\report\DocumentPrintOptionDescriptorsList.java
2
请完成以下Java代码
public class FactAcctChangesList { public static final FactAcctChangesList EMPTY = new FactAcctChangesList(ImmutableList.of()); private final ImmutableList<FactAcctChanges> allLines; private final ImmutableListMultimap<AcctSchemaId, FactAcctChanges> linesToAddGroupedByAcctSchemaId; private final ImmutableMap<FactL...
public boolean isEmpty() {return allLines.isEmpty();} public void forEachRemove(@NonNull final Consumer<FactAcctChanges> consumer) { linesToRemoveByKey.values().forEach(consumer); } public FactAcctChangesList removingIf(@NonNull final Predicate<FactAcctChanges> predicate) { if (allLines.isEmpty()) { ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\factacct_userchanges\FactAcctChangesList.java
1
请完成以下Java代码
private IAllocationDestination createAllocationDestinationAsSourceHUs() { final Collection<I_M_HU> sourceHUs = sourceHUsRepository.retrieveActualSourceHUs(ImmutableSet.of(huId)); if (sourceHUs.isEmpty()) { throw new AdempiereException("No source HUs found for M_HU_ID=" + huId); } return HUListAllocationS...
private HUListAllocationSourceDestination createAllocationSourceAsHU() { final I_M_HU hu = load(huId, I_M_HU.class); // we made sure that if the target HU is active, so the source HU also needs to be active. Otherwise, goods would just seem to vanish if (!X_M_HU.HUSTATUS_Active.equals(hu.getHUStatus())) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\candidate\commands\RemoveQtyFromHUCommand.java
1
请完成以下Java代码
private Optional<Object> getDefaultValue(final String variableName) { // FIXME: hardcoded default to avoid a lot of warnings if (variableName.endsWith("_ID")) { return Optional.of(InterfaceWrapperHelper.getFirstValidIdByColumnName(variableName) - 1); } // TODO: find some defaults? return Optional.empty...
return (Integer)valueObj; } else if (valueObj instanceof Number) { return ((Number)valueObj).intValue(); } else if (valueObj instanceof IntegerLookupValue) { return ((IntegerLookupValue)valueObj).getIdAsInt(); } else { final String valueStr = valueObj.toString().trim(); if (valueStr.isEmpt...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentEvaluatee.java
1
请在Spring Boot框架中完成以下Java代码
public List<Object[]> fetchBooksWithAuthorsViaArrayOfObjects() { List<Object[]> books = bookRepository.findByViaQueryArrayOfObjects(); System.out.println("\nResult set:"); books.forEach(b -> System.out.println(Arrays.toString(b))); briefOverviewOfPersistentContextContent(); re...
for (Object entry : entitiesByKey.values()) { EntityEntry ee = persistenceContext.getEntry(entry); System.out.println( "Entity name: " + ee.getEntityName() + " | Status: " + ee.getStatus() + " | State: " + Arrays.toString(ee.getLoadedSt...
repos\Hibernate-SpringBoot-master\HibernateSpringBootNestedVsVirtualProjection\src\main\java\com\bookstore\service\BookstoreService.java
2
请在Spring Boot框架中完成以下Java代码
public class Student { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int id; @Column(name = "first_name") private String firstName; @Column(name = "last_name") private String lastName; @Column(name = "grad_year") private int gradYear; public int getId() { ...
public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public int getGradYear() { return gradYear; } public void...
repos\tutorials-master\persistence-modules\hibernate-queries\src\main\java\com\baeldung\hibernate\criteriaquery\Student.java
2
请在Spring Boot框架中完成以下Java代码
protected Integer getOrSaveKeyId(String strKey) { if (strKey.length() > MAX_KEY_LENGTH) { log.warn("[ts_kv_latest] Value size [{}] exceeds maximum size [{}] of column [key] and will be truncated!", strKey.length(), MAX_KEY_LENGTH); log.warn("Affected data:\n{}", strKe...
KeyDictionaryEntry dictionary = tsKvDictionaryOptional.orElseThrow(() -> new RuntimeException("Failed to get TsKvDictionary entity from DB!")); tsKvDictionaryMap.put(dictionary.getKey(), dictionary.getKeyId()); keyId = dictionary.getKeyId(); ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\install\migrate\CassandraTsLatestToSqlMigrateService.java
2
请在Spring Boot框架中完成以下Java代码
public Collection<String> getNames() { return names; } // This method is needed because we have a different way of querying list and single objects via MyBatis. // Querying lists wraps the object in a ListQueryParameterObject public InternalVariableInstanceQueryImpl getParameter() { ret...
return false; } if (param.subScopeIds != null && !param.subScopeIds.contains(entity.getSubScopeId())) { return false; } if (param.withoutSubScopeId && entity.getSubScopeId() != null) { return false; } if (param.scopeType != null && !param.scopeT...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\InternalVariableInstanceQueryImpl.java
2
请完成以下Java代码
public Collection<Class<? extends PPOrderRequestedEvent>> getHandledEventType() { return ImmutableList.of(PPOrderRequestedEvent.class); } @Override public void handleEvent(@NonNull final PPOrderRequestedEvent event) { createProductionOrder(event); } /** * Creates a production order. Note that it does not...
.clientAndOrgId(ppOrderData.getClientAndOrgId()) .productPlanningId(ProductPlanningId.ofRepoIdOrNull(ppOrderData.getProductPlanningId())) .materialDispoGroupId(ppOrderData.getMaterialDispoGroupId()) .plantId(ppOrderData.getPlantId()) .workstationId(ppOrderData.get...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\event\PPOrderRequestedEventHandler.java
1
请在Spring Boot框架中完成以下Java代码
public void delResourceList(Long adminId) { String key = REDIS_DATABASE + ":" + REDIS_KEY_RESOURCE_LIST + ":" + adminId; redisService.del(key); } @Override public void delResourceListByRole(Long roleId) { UmsAdminRoleRelationExample example = new UmsAdminRoleRelationExample(); ...
@Override public UmsAdmin getAdmin(String username) { String key = REDIS_DATABASE + ":" + REDIS_KEY_ADMIN + ":" + username; return (UmsAdmin) redisService.get(key); } @Override public void setAdmin(UmsAdmin admin) { String key = REDIS_DATABASE + ":" + REDIS_KEY_ADMIN + ":" + adm...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\UmsAdminCacheServiceImpl.java
2
请完成以下Java代码
private static Map<String, String> errorMessageParameters(Map<String, String> parameters) { parameters.put("error", BearerTokenErrorCodes.INSUFFICIENT_SCOPE); parameters.put("error_description", "The request requires higher privileges than provided by the access token."); parameters.put("error_uri", "https://...
StringBuilder wwwAuthenticate = new StringBuilder(); wwwAuthenticate.append("Bearer"); if (!parameters.isEmpty()) { wwwAuthenticate.append(" "); int i = 0; for (Map.Entry<String, String> entry : parameters.entrySet()) { wwwAuthenticate.append(entry.getKey()).append("=\"").append(entry.getValue()).appen...
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 String getMessage() { return message; } public void setMessage(String errorMessage) { this.message = errorMessage; } public int getLine() { return line; } public void setLine(int line) { this.line = line; } public int getColumn() { return column; } public void setColu...
} public String getMainElementId() { return mainElementId; } public void setMainElementId(String mainElementId) { this.mainElementId = mainElementId; } public List<String> getЕlementIds() { return еlementIds; } public void setЕlementIds(List<String> elementIds) { this.еlementIds = elem...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\ProblemDto.java
1
请完成以下Java代码
public void updateGroup(GroupDto group) { ensureNotReadOnly(); Group dbGroup = findGroupObject(); if(dbGroup == null) { throw new InvalidRequestException(Status.NOT_FOUND, "Group with id " + resourceId + " does not exist"); } group.update(dbGroup); identityService.saveGroup(dbGroup); ...
public GroupMembersResource getGroupMembersResource() { return new GroupMembersResourceImpl(getProcessEngine().getName(), resourceId, rootResourcePath, getObjectMapper()); } protected Group findGroupObject() { try { return identityService.createGroupQuery() .groupId(resourceId) .s...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\identity\impl\GroupResourceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class StoreOrdersResponse { @XmlElement(required = true) protected StoreOrdersResponseType orderResult; /** * Gets the value of the orderResult property. * * @return * possible object is * {@link StoreOrdersResponseType } * */ public StoreOrdersR...
} /** * Sets the value of the orderResult property. * * @param value * allowed object is * {@link StoreOrdersResponseType } * */ public void setOrderResult(StoreOrdersResponseType value) { this.orderResult = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\StoreOrdersResponse.java
2
请完成以下Java代码
public ExecutionEntity resolveRepresentativeExecution() { return eventScopeExecution; } @Override public void removeChild(MigratingScopeInstance migratingScopeInstance) { childInstances.remove(migratingScopeInstance); } @Override public void addChild(MigratingScopeInstance migratingScopeInstance) ...
} } @Override public void remove(boolean skipCustomListeners, boolean skipIoMappings) { // never invokes listeners and io mappings because this does not remove an active // activity instance eventScopeExecution.remove(); migratingEventSubscription.remove(); setParent(null); } @Override ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingEventScopeInstance.java
1
请在Spring Boot框架中完成以下Java代码
public class RelatedDunningsForInvoicesProvider implements RelatedRecordsProvider { @Override public SourceRecordsKey getSourceRecordsKey() { return SourceRecordsKey.of(I_C_Invoice.Table_Name); } @Override public IPair<SourceRecordsKey, List<ITableRecordReference>> provideRelatedRecords( @NonNull final Lis...
.addInArrayFilter(I_C_Dunning_Candidate.COLUMN_Record_ID, invoiceIds) .andCollectChildren(I_C_DunningDoc_Line_Source.COLUMN_C_Dunning_Candidate_ID) .addOnlyActiveRecordsFilter() .andCollect(I_C_DunningDoc_Line_Source.COLUMN_C_DunningDoc_Line_ID) .addOnlyActiveRecordsFilter() .andCollect(I_C_DunningD...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\order\restart\RelatedDunningsForInvoicesProvider.java
2
请完成以下Java代码
public void setPostingType (String PostingType) { set_Value (COLUMNNAME_PostingType, PostingType); } /** Get PostingType. @return The type of posted amount for the transaction */ public String getPostingType () { return (String)get_Value(COLUMNNAME_PostingType); } /** Set Sequence. @param SeqNo ...
*/ public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Sequence. @return Method of ordering records; lowest number comes first */ public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) return 0; return ii.intVal...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_ReportLine.java
1
请完成以下Java代码
public void merge(ConfigurableEnvironment parent) { for (PropertySource<?> ps : parent.getPropertySources()) { if (!this.getPropertySources().contains(ps.getName())) { this.getPropertySources().addLast(ps); } } super.merge(parent); } /** {@inherit...
return super.getPropertySources(); } /** {@inheritDoc} */ @Override public void setEncryptablePropertySources(MutablePropertySources propertySources) { this.encryptablePropertySources = propertySources; ((MutableConfigurablePropertyResolver)this.getPropertyResolver()).setPropertySources...
repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\environment\StandardEncryptableServletEnvironment.java
1
请完成以下Java代码
public String getLabelFormatType () { return (String)get_Value(COLUMNNAME_LabelFormatType); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity ...
*/ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), String.valueOf(getSeqNo())); } /** Set X Position. @param XPosition Absolute X (horizontal) position in 1/72 of an inch */ public void setXPosition (int XPosition) { set_Value (COLUMNNAME_XPosition, Integer.valu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintLabelLine.java
1