instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void setIsbn(String isbn) { this.isbn = isbn; } public String getBookRating() { return bookRating; } public void setBookRating(String bookRating) { this.bookRating = bookRating; } @Override public String toString() { return "BookReview{" + "reviewsId...
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; BookReview that = (BookReview) o; return Objects.equals(reviewsId, that.reviewsId) && Objects.equals(userId, that.userId) && Obje...
repos\tutorials-master\spring-boot-modules\spring-caching-3\src\main\java\com\baeldung\caching\disable\BookReview.java
1
请完成以下Java代码
protected void setInternalValueDateInitial(Date value) { throw new UnsupportedOperationException("Setting initial value not supported"); } @Override protected Date getInternalValueDateInitial() { return null; } /** * @return {@code PROPAGATIONTYPE_NoPropagation}. */ @Override public String getPropaga...
public boolean isDisplayedUI() { return true; } @Override public boolean isMandatory() { return false; } @Override public boolean isOnlyIfInProductAttributeSet() { return false; } /** * @return our attribute instance's {@code M_Attribute_ID}. */ @Override public int getDisplaySeqNo() { ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\AIAttributeValue.java
1
请在Spring Boot框架中完成以下Java代码
public R save(@RequestBody Notice notice) { return R.status(noticeService.save(notice)); } /** * 修改 */ @PostMapping("/update") @ApiOperationSupport(order = 4) @Operation(summary = "修改", description = "传入notice") public R update(@RequestBody Notice notice) { return R.status(noticeService.updateById(notice...
public R submit(@RequestBody Notice notice) { return R.status(noticeService.saveOrUpdate(notice)); } /** * 删除 */ @PostMapping("/remove") @ApiOperationSupport(order = 6) @Operation(summary = "逻辑删除", description = "传入notice") public R remove(@Parameter(description = "主键集合") @RequestParam String ids) { bool...
repos\SpringBlade-master\blade-service\blade-demo\src\main\java\com\example\demo\controller\NoticeController.java
2
请完成以下Java代码
public static GlobalQRCodeParseResult ok(@NonNull final GlobalQRCode globalQRCode) { return new GlobalQRCodeParseResult(globalQRCode, null); } public GlobalQRCodeParseResult(@Nullable final GlobalQRCode globalQRCode, @Nullable final String error) { if (CoalesceUtil.countNotNulls(globalQRCode, error) != 1) { ...
if (globalQRCode == null) { throw Check.mkEx(error); } else { return globalQRCode; } } public GlobalQRCode orNullIfError() { return globalQRCode; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.global_qrcode.api\src\main\java\de\metas\global_qrcodes\GlobalQRCodeParseResult.java
1
请完成以下Java代码
private static OAuth2AccessToken.TokenType getAccessTokenType(Map<String, Object> tokenResponseParameters) { if (OAuth2AccessToken.TokenType.BEARER.getValue() .equalsIgnoreCase(getParameterValue(tokenResponseParameters, OAuth2ParameterNames.TOKEN_TYPE))) { return OAuth2AccessToken.TokenType.BEARER; } else i...
long parameterValue = defaultValue; Object obj = tokenResponseParameters.get(parameterName); if (obj != null) { // Final classes Long and Integer do not need to be coerced if (obj.getClass() == Long.class) { parameterValue = (Long) obj; } else if (obj.getClass() == Integer.class) { parameterVal...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\endpoint\DefaultMapOAuth2AccessTokenResponseConverter.java
1
请完成以下Java代码
public String getBusinessKey() { return businessKey; } public CaseExecutionState getState() { return state; } public boolean isCaseInstancesOnly() { return false; } public String getSuperProcessInstanceId() { return superProcessInstanceId; } public String getSubProcessInstanceId() { ...
public String getSuperCaseInstanceId() { return superCaseInstanceId; } public String getSubCaseInstanceId() { return subCaseInstanceId; } public String getDeploymentId() { return deploymentId; } public Boolean isRequired() { return required; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\runtime\CaseExecutionQueryImpl.java
1
请完成以下Java代码
public ImmutableCredentialRecordBuilder backupState(boolean backupState) { this.backupState = backupState; return this; } public ImmutableCredentialRecordBuilder attestationObject(@Nullable Bytes attestationObject) { this.attestationObject = attestationObject; return this; } public ImmutableCreden...
} public ImmutableCredentialRecordBuilder label(String label) { this.label = label; return this; } public ImmutableCredentialRecord build() { return new ImmutableCredentialRecord(this.credentialType, this.credentialId, this.userEntityUserId, this.publicKey, this.signatureCount, this.uvInitialized,...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\ImmutableCredentialRecord.java
1
请完成以下Java代码
public class DmnDecisionRequirementsGraphImpl implements DmnDecisionRequirementsGraph { protected String key; protected String name; protected Map<String, DmnDecision> decisions = new HashMap<String, DmnDecision>(); public String getKey() { return key; } public void setKey(String key) { this.key...
decisions.put(decision.getKey(), decision); } public DmnDecision getDecision(String key) { return decisions.get(key); } public Set<String> getDecisionKeys() { return decisions.keySet(); } @Override public String toString() { return "DmnDecisionRequirementsGraphImpl [key=" + key + ", name=" ...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnDecisionRequirementsGraphImpl.java
1
请完成以下Java代码
public void setHelp (java.lang.String Help) { set_Value (COLUMNNAME_Help, Help); } /** Get Kommentar/Hilfe. @return Comment or Hint */ @Override public java.lang.String getHelp () { return (java.lang.String)get_Value(COLUMNNAME_Help); } /** Set Order By Value. @param IsOrderByValue Order list u...
} /** * ValidationType AD_Reference_ID=2 * Reference name: AD_Reference Validation Types */ public static final int VALIDATIONTYPE_AD_Reference_ID=2; /** ListValidation = L */ public static final String VALIDATIONTYPE_ListValidation = "L"; /** DataType = D */ public static final String VALIDATIONTYPE_Data...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Reference.java
1
请在Spring Boot框架中完成以下Java代码
public class RedisConfig { /** * 重写Redis序列化方式,使用Json方式: * 当我们的数据存储到Redis的时候,我们的键(key)和值(value)都是通过Spring提供的Serializer序列化到数据库的。RedisTemplate默认使用的是JdkSerializationRedisSerializer,StringRedisTemplate默认使用的是StringRedisSerializer。 * Spring Data JPA为我们提供了下面的Serializer: * GenericToStringSerializer、Jack...
redisTemplate.afterPropertiesSet(); return redisTemplate; } @Bean RedisMessageListenerContainer redisContainer(RedisConnectionFactory redisConnectionFactory, MessageListenerAdapter messageListener) { final RedisMessageListenerContainer container = new RedisMessageListenerContainer(); ...
repos\spring-boot-student-master\spring-boot-student-cache-redis-caffeine\src\main\java\com\xiaolyuh\config\RedisConfig.java
2
请完成以下Java代码
public void setFieldValueFormat (String FieldValueFormat) { set_Value (COLUMNNAME_FieldValueFormat, FieldValueFormat); } /** Get Value Format. @return Value Format */ public String getFieldValueFormat () { return (String)get_Value(COLUMNNAME_FieldValueFormat); } /** Set Null Value. @param IsNullFiel...
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Reihenfolge. @return Zur Bestimmung der Reihenfolge der Eintraege; die kleinste Zahl kommt zuerst */ public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) return 0; return ii.intValue(); } /** T...
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代码
public class Employee { private int id; private String name; private String address; public Employee(int id, String name) { this.id = id; this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id; } public S...
return name; } public void setName(String name) { this.name = name; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } }
repos\tutorials-master\json-modules\gson\src\main\java\com\baeldung\gson\entities\Employee.java
1
请完成以下Java代码
default String getProductValueAndName(final int productId) { return getProductValueAndName(ProductId.ofRepoIdOrNull(productId)); } String getProductValue(ProductId productId); GS1ProductCodesCollection getGS1ProductCodesCollection(@NonNull ProductId productId); GS1ProductCodesCollection getGS1ProductCodesColl...
ImmutableList<String> retrieveSupplierApprovalNorms(ProductId productId); boolean isDiscontinuedAt(I_M_Product productRecord, LocalDate targetDate); Optional<IssuingToleranceSpec> getIssuingToleranceSpec(@NonNull ProductId productId); @NonNull ImmutableList<I_M_Product> getByIdsInTrx(@NonNull Set<ProductId> prod...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\IProductBL.java
1
请完成以下Java代码
public File createPDF() { return null; } /** * Get Process Message * * @return clear text error message */ @Override public String getProcessMsg() { return m_processMsg; } // getProcessMsg /** * Get Document Owner (Responsible) * * @return AD_User_ID (Created) */ @Override public int ...
@Deprecated public boolean isComplete() { return Services.get(IGLJournalBL.class).isComplete(this); } // isComplete // metas: cg: 02476 private static void setAmtPrecision(final I_GL_Journal journal) { final AcctSchemaId acctSchemaId = AcctSchemaId.ofRepoIdOrNull(journal.getC_AcctSchema_ID()); if (acctS...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\model\MJournal.java
1
请完成以下Java代码
public class DelegatingReactiveAuthenticationManager implements ReactiveAuthenticationManager { private final List<ReactiveAuthenticationManager> delegates; private boolean continueOnError = false; private final Log logger = LogFactory.getLog(getClass()); public DelegatingReactiveAuthenticationManager(ReactiveA...
Flux<ReactiveAuthenticationManager> result = Flux.fromIterable(this.delegates); Function<ReactiveAuthenticationManager, Mono<Authentication>> logging = (m) -> m.authenticate(authentication) .doOnError(AuthenticationException.class, (ex) -> ex.setAuthenticationRequest(authentication)) .doOnError(this.logger::deb...
repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\DelegatingReactiveAuthenticationManager.java
1
请完成以下Java代码
public ResponseEntity<Object> resetPwd(@RequestBody Set<Long> ids) { String pwd = passwordEncoder.encode("123456"); userService.resetPwd(ids, pwd); return new ResponseEntity<>(HttpStatus.OK); } @ApiOperation("修改头像") @PostMapping(value = "/updateAvatar") public ResponseEntity<Obj...
} verificationCodeService.validated(CodeEnum.EMAIL_RESET_EMAIL_CODE.getKey() + user.getEmail(), code); userService.updateEmail(userDto.getUsername(),user.getEmail()); return new ResponseEntity<>(HttpStatus.OK); } /** * 如果当前用户的角色级别低于创建用户的角色级别,则抛出权限不足的错误 * @param resources / ...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\rest\UserController.java
1
请在Spring Boot框架中完成以下Java代码
public class WebSecurityConfig { // @formatter:off @Autowired public void configureGlobal(AuthenticationManagerBuilder auth, UserDetailsService userDetailsService) throws Exception { auth .userDetailsService(userDetailsService) .passwordEncoder(new BCryptPasswordEncoder()); } // @formatter:on // @fo...
// @formatter:on // @formatter:off @Bean SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { return http .authorizeHttpRequests((authorize) -> authorize .requestMatchers(PathRequest.toStaticResources().atCommonLocations()).permitAll() .anyRequest().authenticated() ) .for...
repos\spring-session-main\spring-session-samples\spring-session-sample-boot-websocket\src\main\java\sample\config\WebSecurityConfig.java
2
请完成以下Java代码
public EventSubscriptionQueryImpl activityId(String activityId) { ensureNotNull("activity id", activityId); this.activityId = activityId; return this; } public EventSubscriptionQuery tenantIdIn(String... tenantIds) { ensureNotNull("tenantIds", (Object[]) tenantIds); this.tenantIds = tenantIds; ...
public List<EventSubscription> executeList(CommandContext commandContext, Page page) { checkQueryOk(); return commandContext .getEventSubscriptionManager() .findEventSubscriptionsByQueryCriteria(this,page); } //getters ////////////////////////////////////////// public String getEventSubscri...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\EventSubscriptionQueryImpl.java
1
请完成以下Java代码
public Builder setDescription(@NonNull final ITranslatableString description) { this.description = description; return this; } public Builder setInternalName(final String internalName) { this.internalName = internalName; return this; } public Builder setUIStyle(@Nullable final String uiStyle) ...
public Builder setClosableMode(@NonNull final ClosableMode closableMode) { this.closableMode = closableMode; return this; } public Builder setCaptionMode(@NonNull final CaptionMode captionMode) { this.captionMode = captionMode; return this; } public boolean isValid() { return invalidReaso...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutSectionDescriptor.java
1
请完成以下Java代码
public class MissingAuthorization { private String permissionName; private String resourceType; protected String resourceId; public MissingAuthorization(String permissionName, String resourceType, String resourceId) { this.permissionName = permissionName; this.resourceType = resourceType; this.res...
} public String getResourceId() { return resourceId; } @Override public String toString() { return this.getClass().getSimpleName() + "[permissionName=" + permissionName + ", resourceType=" + resourceType + ", resourceId=" + resourceId + "]"; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\authorization\MissingAuthorization.java
1
请完成以下Java代码
public List<ExecutionInfo> getExecutionInfos() { return executionInfos; } @Override public boolean isFullyFetched() { return iterator.isFullyFetched(); } @Override public int getAvailableWithoutFetching() { return iterator.remaining(); } @NonNull @Override ...
this.statement = this.statement.setPagingState(nextPagingState); AsyncResultSet nextPage = GuavaSession.getSafe(this.session.executeAsync(this.statement)); currentPage = nextPage; remaining += nextPage.remaining(); currentRows = nextPage.currentPage().iter...
repos\thingsboard-master\common\dao-api\src\main\java\org\thingsboard\server\dao\cassandra\guava\GuavaMultiPageResultSet.java
1
请完成以下Java代码
public class WEBUI_PP_Order_M_Source_HU_Delete extends WEBUI_PP_Order_Template implements IProcessPrecondition { @Override protected ProcessPreconditionsResolution checkPreconditionsApplicable() { if (!getSelectedRowIds().isSingleDocumentId()) { return ProcessPreconditionsResolution.rejectBecauseNotSingl...
{ final PPOrderLineRow rowToProcess = getSingleSelectedRow(); final HuId huId = rowToProcess.getHuId(); // unselect the row we just deleted the record of, to avoid an 'EntityNotFoundException' final boolean sourceWasDeleted = SourceHUsService.get().deleteSourceHuMarker(huId); if (sourceWasDeleted) { get...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\process\WEBUI_PP_Order_M_Source_HU_Delete.java
1
请完成以下Java代码
public class PaymentResponse { @JacksonXmlProperty(localName = "status") private String status; @JacksonXmlProperty(localName = "message") private String message; @JacksonXmlProperty(localName = "referenceNumber") private String referenceNumber; public PaymentResponse() { } publ...
public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getReferenceNumber() { return referenceNumber; } public void setReferenceNumber(String referenceNumber) { this.referenceNumber = refe...
repos\tutorials-master\spring-web-modules\spring-resttemplate-3\src\main\java\com\baeldung\xmlpost\model\PaymentResponse.java
1
请完成以下Java代码
public void onParameterChanged(@NonNull final String parameterName) { if (PARAM_M_Product_ID.equals(parameterName)) { if (productId != null) { qtyCUsPerTU = getHUStorageQty(productId).toBigDecimal(); } } } @Override protected String doIt() { if (productId == null) { throw new FillMandato...
.stream() .filter(productStorage -> !productStorage.isEmpty()) .map(IProductStorage::getProductId) .distinct() .collect(ImmutableList.toImmutableList()); } private Quantity getHUStorageQty(@NonNull final ProductId productId) { return getHUProductStorages() .stream() .filter(productStorage ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\process\WEBUI_Picking_ReturnQtyToSourceHU.java
1
请完成以下Java代码
public class GetCamundaFormDefinitionCmd implements Command<CamundaFormDefinition> { protected CamundaFormRef camundaFormRef; protected String deploymentId; public GetCamundaFormDefinitionCmd(CamundaFormRef camundaFormRef, String deploymentId) { this.camundaFormRef = camundaFormRef; this.deploymentId = ...
if (binding.equals(DefaultFormHandler.FORM_REF_BINDING_DEPLOYMENT)) { definition = manager.findDefinitionByDeploymentAndKey(deploymentId, key); } else if (binding.equals(DefaultFormHandler.FORM_REF_BINDING_LATEST)) { definition = manager.findLatestDefinitionByKey(key); } else if (binding.equals(Defa...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\GetCamundaFormDefinitionCmd.java
1
请完成以下Java代码
private HUEditorRow getParentHURowOrNull(final HUEditorRow cuRow) { if (cuRow == null) { return null; } return getView().getParentRowByChildIdOrNull(cuRow.getId()); } private boolean isAggregateHU(final HUEditorRow huRow) { final I_M_HU hu = huRow.getM_HU(); return handlingUnitsBL.isAggregateHU(hu);...
} /** * @return true if at least one HU was removed */ private boolean removeHUsIfDestroyed(final Collection<HuId> huIds) { final ImmutableSet<HuId> destroyedHUIds = huIds.stream() .distinct() .map(huId -> load(huId, I_M_HU.class)) .filter(Services.get(IHandlingUnitsBL.class)::isDestroyed) .ma...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_Add_Batch_SerialNo_To_CUs.java
1
请完成以下Java代码
public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Date getCreatedAt() { ...
public Date getUpdatedAt() { return updatedAt; } public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; } @Override public String toString() { return "Name: " + this.name + "\nEmail: " + this.email; } }
repos\tutorials-master\web-modules\vraptor\src\main\java\com\baeldung\models\User.java
1
请完成以下Java代码
public class InvokeGRSSignumAction extends AlterExternalSystemServiceStatusAction { public final ExternalSystemConfigRepo externalSystemConfigDAO = SpringContextHolder.instance.getBean(ExternalSystemConfigRepo.class); @Override protected IExternalSystemChildConfigId getExternalChildConfigId() { final int id; ...
final Map<String, String> parameters = new HashMap<>(); parameters.put(ExternalSystemConstants.PARAM_CAMEL_HTTP_RESOURCE_AUTH_KEY, grsConfig.getCamelHttpResourceAuthKey()); parameters.put(ExternalSystemConstants.PARAM_BASE_PATH, grsConfig.getBaseUrl()); return parameters; } @Override protected String getTabN...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\InvokeGRSSignumAction.java
1
请完成以下Java代码
public void executeAsync(final OutputStream out) { Check.assume(executorService == null, "No other execution started: {}", executorService); prepareDataSource(); // // Prepare & execute asynchronously executorService = Executors.newFixedThreadPool(2); final Runnable exportRunnable = new Runnable() { ...
executorService.shutdownNow(); } }; futureExportResult = executorService.submit(exportRunnable); executorService.submit(exportMonitor); } public void waitToFinish() { try { futureExportResult.get(); } catch (InterruptedException e) { throw new AdempiereException(e.getLocalizedMessage(), e)...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\data\export\api\impl\ASyncExporterWrapper.java
1
请完成以下Java代码
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 List<Double> getData() { return data; } public void setData(List<Double> data) { this.data = data; } public Label getLabel() { return label; } public void setLabel(Label label) { this.label = label; } }
repos\SpringBootBucket-master\springboot-echarts\src\main\java\com\xncoding\echarts\api\model\jmh\Serie.java
1
请完成以下Java代码
private boolean hasTokenExpired(OAuth2Token token) { return this.clock.instant().isAfter(token.getExpiresAt().minus(this.clockSkew)); } /** * Sets the client used when requesting an access token credential at the Token * Endpoint for the {@code client_credentials} grant. * @param accessTokenResponseClient th...
*/ public void setClockSkew(Duration clockSkew) { Assert.notNull(clockSkew, "clockSkew cannot be null"); Assert.isTrue(clockSkew.getSeconds() >= 0, "clockSkew must be >= 0"); this.clockSkew = clockSkew; } /** * Sets the {@link Clock} used in {@link Instant#now(Clock)} when checking the access * token expi...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\ClientCredentialsReactiveOAuth2AuthorizedClientProvider.java
1
请在Spring Boot框架中完成以下Java代码
class PurchaseCandidateImmutableFields { @Nullable ExternalSystemId externalSystemId; @Nullable ExternalId externalHeaderId; @Nullable ExternalId externalLineId; @Nullable String poReference; @Nullable OrderAndLineId salesOrderAndLineIdOrNull; @NonNull DemandGroupReference groupReference; @NonNull ...
@NonNull WarehouseId warehouseId; @NonNull ProductId productId; @NonNull AttributeSetInstanceId attributeSetInstanceId; String vendorProductNo; boolean aggregatePOs; @Nullable ForecastLineId forecastLineId; @Nullable Dimension dimension; @Nullable PurchaseCandidateSource source; @Nullable String ...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\PurchaseCandidateImmutableFields.java
2
请完成以下Java代码
public BigDecimal getQtyInvoicedInOrderedUOM() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyInvoicedInOrderedUOM); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setRate (final @Nullable BigDecimal Rate) { set_Value (COLUMNNAME_Rate, Rate); } @Override public BigDecima...
{ return get_ValueAsString(COLUMNNAME_UPC_CU); } @Override public void setUPC_TU (final @Nullable java.lang.String UPC_TU) { set_ValueNoCheck (COLUMNNAME_UPC_TU, UPC_TU); } @Override public java.lang.String getUPC_TU() { return get_ValueAsString(COLUMNNAME_UPC_TU); } @Override public void setValue ...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_cctop_invoic_500_v.java
1
请完成以下Java代码
public void setAD_LabelPrinter_ID (int AD_LabelPrinter_ID) { if (AD_LabelPrinter_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_LabelPrinter_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_LabelPrinter_ID, Integer.valueOf(AD_LabelPrinter_ID)); } /** Get Label printer. @return Label Printer Definition */ ...
} /** 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 String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Re...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_LabelPrinter.java
1
请完成以下Java代码
public Optional<I_M_HU_PI_Item_Product> retrieveDefaultForProduct( @NonNull final ProductId productId, @Nullable final BPartnerId bpartnerId, @NonNull final ZonedDateTime date) { final IHUPIItemProductQuery query = createHUPIItemProductQuery(); query.setBPartnerId(bpartnerId); query.setProductId(product...
@Override @Nullable public I_M_HU_PI_Item_Product retrieveDefaultForProduct( @NonNull final ProductId productId, @NonNull final ZonedDateTime date) { final IHUPIItemProductQuery query = createHUPIItemProductQuery(); query.setProductId(productId); query.setDate(date); query.setDefaultForProduct(true); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUPIItemProductDAO.java
1
请完成以下Java代码
public void setAD_Process_CustomQuery(final org.compiere.model.I_AD_Process AD_Process_CustomQuery) { set_ValueFromPO(COLUMNNAME_AD_Process_CustomQuery_ID, org.compiere.model.I_AD_Process.class, AD_Process_CustomQuery); } @Override public void setAD_Process_CustomQuery_ID (final int AD_Process_CustomQuery_ID) {...
} @Override public void setLeichMehl_PluFile_ConfigGroup_ID (final int LeichMehl_PluFile_ConfigGroup_ID) { if (LeichMehl_PluFile_ConfigGroup_ID < 1) set_ValueNoCheck (COLUMNNAME_LeichMehl_PluFile_ConfigGroup_ID, null); else set_ValueNoCheck (COLUMNNAME_LeichMehl_PluFile_ConfigGroup_ID, LeichMehl_PluFile...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_LeichMehl_PluFile_ConfigGroup.java
1
请完成以下Java代码
public class MChatEntry extends X_CM_ChatEntry { /** * */ private static final long serialVersionUID = -158924400098841023L; /** * Standard Constructor * @param ctx cintext * @param CM_ChatEntry_ID id * @param trxName transaction */ public MChatEntry (Properties ctx, int CM_ChatEntry_ID, String trx...
{ super (ctx, rs, trxName); } // MChatEntry /** * Can be published * @param ConfidentialType minimum confidential type * @return true if withing confidentiality */ public boolean isConfidentialType(String ConfidentialType) { String ct = getConfidentialType(); if (ConfidentialType == null || CONF...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MChatEntry.java
1
请在Spring Boot框架中完成以下Java代码
public class ServerVerticle extends AbstractVerticle { @Autowired private Integer defaultPort; private void getAllArticlesHandler(RoutingContext routingContext) { vertx.eventBus() .<String>send(ArticleRecipientVerticle.GET_ALL_ARTICLES, "", result -> { if (result.succee...
} @Override public void start() throws Exception { super.start(); Router router = Router.router(vertx); router.get("/api/baeldung/articles") .handler(this::getAllArticlesHandler); vertx.createHttpServer() .requestHandler(router::accept) .lis...
repos\tutorials-master\vertx-modules\spring-vertx\src\main\java\com\baeldung\vertxspring\verticles\ServerVerticle.java
2
请完成以下Java代码
public GridField getField() { return m_mField; } /** * Feature Request [1707462] * Set VFormat * @param strMask mask * @author fer_luck */ public void setVFormat (String strMask) { m_VFormat = strMask; //Get the actual caret from the field, if there's no //caret then just catch the exception...
* Feature Request [1707462] * Get VFormat * @return strMask mask * @author fer_luck */ public String getVFormat () { return this.m_VFormat; } // getVFormat /** * Focus Gained. * Enabled with Obscure * @param e event */ @Override public void focusGained (FocusEvent e) { m_infocus = tru...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VString.java
1
请在Spring Boot框架中完成以下Java代码
public static Optional<BPUpsertCamelRequest> usersToBPartnerUpsert( @NonNull final String orgCode, @NonNull final JsonMetasfreshId bPartnerId, @Nullable final Users... users) { if (users == null) { return Optional.empty(); } final JsonRequestContactUpsert.JsonRequestContactUpsertBuilder usersUpser...
if (Check.isEmpty(usersUpsert.getRequestItems())) { return Optional.empty(); } return contactToBPartnerUpsert(usersUpsert, bPartnerId, orgCode); } @NonNull public static Optional<JsonRequestBPartnerLocationAndContact> pharmacyToDropShipBPartner(@Nullable final String pharmacyId) { if(Check.isBlank(phar...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\de-metas-camel-alberta-camelroutes\src\main\java\de\metas\camel\externalsystems\alberta\common\DataMapper.java
2
请在Spring Boot框架中完成以下Java代码
public class UserController { // ------------------------ // PUBLIC METHODS // ------------------------ /** * Create a new user with an auto-generated id and email and name as passed * values. */ @RequestMapping(value="/create") @ResponseBody public String create(String email, String name) { ...
public String getByEmail(String email) { String userId; try { User user = userDao.getByEmail(email); userId = String.valueOf(user.getId()); } catch (Exception ex) { return "User not found: " + ex.toString(); } return "The user id is: " + userId; } /** * Update the ema...
repos\spring-boot-samples-master\spring-boot-mysql-jpa-hibernate\src\main\java\netgloo\controllers\UserController.java
2
请完成以下Java代码
private void generalOwnership () { String set = "SET AD_Org_ID=0 WHERE AD_Client_ID=" + getAD_Client_ID() + " AND AD_Org_ID<>0"; // R_ContactInterest String sql = "UPDATE R_ContactInterest " + set; int no = DB.executeUpdateAndSaveErrorOnFail(sql, get_TrxName()); if (no != 0) log.debug("generalOwne...
// Withholding sql = "UPDATE C_BP_Withholding x " + set; no = DB.executeUpdateAndSaveErrorOnFail(sql, get_TrxName()); if (no != 0) log.debug("generalOwnership - C_BP_Withholding=" + no); // Replenish sql = "UPDATE M_Replenish " + set; no = DB.executeUpdateAndSaveErrorOnFail(sql, get_TrxName()); if (no...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\OrgOwnership.java
1
请完成以下Java代码
public Builder setFrequentUsed(final boolean frequentUsed) { this.frequentUsed = frequentUsed; return this; } public Builder setInlineRenderMode(final DocumentFilterInlineRenderMode inlineRenderMode) { this.inlineRenderMode = inlineRenderMode; return this; } private DocumentFilterInlineRenderM...
} public Builder addParameter(final DocumentFilterParamDescriptor.Builder parameter) { parameters.add(parameter); return this; } public Builder addInternalParameter(final String parameterName, final Object constantValue) { return addInternalParameter(DocumentFilterParam.ofNameEqualsValue(parameterN...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\DocumentFilterDescriptor.java
1
请完成以下Java代码
private Collection<ApplicationListener<?>> getListeners() { List<ApplicationListener<?>> listeners = new ArrayList<>(); listeners.add(new AnsiOutputApplicationListener()); listeners.add(EnvironmentPostProcessorApplicationListener .with(EnvironmentPostProcessorsFactory.of(ConfigDataEnvironmentPostProcessor.clas...
Thread.currentThread().interrupt(); } } } /** * Run the {@link RemoteSpringApplication}. * @param args the program arguments (including the remote URL as a non-option * argument) */ public static void main(String[] args) { new RemoteSpringApplication().run(args); } }
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\RemoteSpringApplication.java
1
请在Spring Boot框架中完成以下Java代码
public void write(T t, @Nullable Type type, @Nullable MediaType contentType, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException { this.smartConverter.write(t, ResolvableType.forType(type), contentType, outputMessage, null); } @Override public boolean canRead(Class<?> clazz, @N...
} @Override public T read(Class<? extends T> clazz, HttpInputMessage inputMessage) throws IOException, HttpMessageNotReadableException { return this.smartConverter.read(clazz, inputMessage); } @Override public void write(T t, @Nullable MediaType contentType, HttpOutputMessage outputMessage) throws IOExce...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\web\server\GenericHttpMessageConverterAdapter.java
2
请在Spring Boot框架中完成以下Java代码
public void getCorsFile(String urlPath, HttpServletResponse response,FileAttribute fileAttribute) throws IOException { URL url; try { urlPath = WebUtils.decodeUrl(urlPath); url = WebUtils.normalizedURL(urlPath); } catch (Exception ex) { logger.error(String.for...
IOUtils.copy(fileResponse.getBody(), response.getOutputStream()); return null; }); } catch (Exception e) { System.out.println(e); } }else{ try { if(urlPath.contains(".svg")) { response.se...
repos\kkFileView-master\server\src\main\java\cn\keking\web\controller\OnlinePreviewController.java
2
请完成以下Java代码
public static ProductAndAttributes toProductAndAttributes(@NonNull final LookupValue lookupValue) { final ProductId productId = lookupValue.getIdAs(ProductId::ofRepoId); final Map<Object, Object> valuesByAttributeIdMap = lookupValue.getAttribute(ATTRIBUTE_ASI); final ImmutableAttributeSet attributes = Immutable...
@Default @NonNull ImmutableAttributeSet attributes = ImmutableAttributeSet.EMPTY; } private interface I_M_Product_Lookup_V { String Table_Name = "M_Product_Lookup_V"; String COLUMNNAME_AD_Org_ID = "AD_Org_ID"; String COLUMNNAME_IsActive = "IsActive"; String COLUMNNAME_M_Product_ID = "M_Product_ID"; S...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\ProductLookupDescriptor.java
1
请完成以下Java代码
public List<SessionDescriptor> getSessions() { return this.sessions; } /** * A description of user's {@link Session session} exposed by {@code sessions} * endpoint. Primarily intended for serialization to JSON. */ public static final class SessionDescriptor { private final String id; private final Set...
public Set<String> getAttributeNames() { return this.attributeNames; } public Instant getCreationTime() { return this.creationTime; } public Instant getLastAccessedTime() { return this.lastAccessedTime; } public long getMaxInactiveInterval() { return this.maxInactiveInterval; } public bo...
repos\spring-boot-4.0.1\module\spring-boot-session\src\main\java\org\springframework\boot\session\actuate\endpoint\SessionsDescriptor.java
1
请完成以下Java代码
public class ScriptServiceTask extends ServiceTask implements HasInParameters { public static final String SCRIPT_TASK = "script"; protected boolean autoStoreVariables; protected boolean doNotIncludeVariables = false; protected List<IOParameter> inParameters; public ScriptServiceTask() { ...
return inParameters; } @Override public void addInParameter(IOParameter inParameter) { if (inParameters == null) { inParameters = new ArrayList<>(); } inParameters.add(inParameter); } @Override public void setInParameters(List<IOParameter> inParameters) { ...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\ScriptServiceTask.java
1
请在Spring Boot框架中完成以下Java代码
default Profile profile(ArticleAssemblyJdbcEntity source) { return new Profile(source.authorUsername(), source.authorBio(), source.authorImage(), source.authorFollowing()); } default List<String> tagList(String source) { ...
var tagNames = tagList.split(","); if (tagNames.length == tagIds.size()) { List<Tag> tags = new ArrayList<>(); for (var i = 0; i < tagIds.size(); i++) { var tag = new Tag(tagIds.get(i).tagId(), tagNames[i]); ...
repos\realworld-backend-spring-master\service\src\main\java\com\github\al\realworld\infrastructure\db\jdbc\ArticleJdbcRepositoryAdapter.java
2
请完成以下Java代码
protected void localUsage() { paramDesc("-input <file>", "Use text data from <file> to train the model"); System.err.printf("\nExamples:\n"); System.err.printf("java %s -input corpus.txt -output vectors.txt -size 200 -window 5 -sample 0.0001 -negative 5 -hs 0 -binary -cbow 1 -iter 3\n\n", ...
int i; if ((i = argPos("-input", args)) >= 0) config.setInputFile(args[i + 1]); Word2VecTraining w2v = new Word2VecTraining(config); System.err.printf("Starting training using text file %s\nthreads = %d, iter = %d\n", config.getInputFile(), co...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\Train.java
1
请完成以下Java代码
public Optional<String> getByPathAsString(final String... path) { return getByPath(path).map(Object::toString); } public Optional<Object> getByPath(final String... path) { Object currentValue = properties; for (final String pathElement : path) { if (!(currentValue instanceof Map)) { //throw new A...
} } return Optional.of(currentValue); } private static Optional<Object> getByKey(final Map<String, Object> map, final String key) { return map.entrySet() .stream() .filter(e -> e.getKey().equalsIgnoreCase(key)) .map(Map.Entry::getValue) .filter(Objects::nonNull) .findFirst(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\serverRoot\de.metas.adempiere.adempiere.serverRoot.base\src\main\java\de\metas\server\ui_trace\rest\JsonUITraceEvent.java
1
请在Spring Boot框架中完成以下Java代码
public class KafkaApplicationLongMessage { public static void main(String[] args) throws Exception { ConfigurableApplicationContext context = SpringApplication.run(KafkaApplicationLongMessage.class, args); LongMessageProducer producer = context.getBean(LongMessageProducer.class); String ...
@Autowired private KafkaTemplate<String, String> kafkaTemplate; @Value(value = "${long.message.topic.name}") private String topicName; public void sendMessage(String message) { kafkaTemplate.send(topicName, message); System.out.println("Long message Sent"); ...
repos\tutorials-master\spring-kafka-4\src\main\java\com\baeldung\spring\kafka\KafkaApplicationLongMessage.java
2
请在Spring Boot框架中完成以下Java代码
public class DDOrderRef { int ddOrderCandidateId; int ddOrderId; int ddOrderLineId; @Builder(toBuilder = true) @Jacksonized private DDOrderRef( final int ddOrderCandidateId, final int ddOrderId, final int ddOrderLineId) { if (ddOrderCandidateId <= 0 && ddOrderId <= 0) { throw new AdempiereExcept...
public static DDOrderRef ofNullableDDOrderCandidateId(final int ddOrderCandidateId) { return ddOrderCandidateId > 0 ? builder().ddOrderCandidateId(ddOrderCandidateId).build() : null; } public DDOrderRef withDdOrderCandidateId(final int ddOrderCandidateIdNew) { final int ddOrderCandidateIdNewNorm = norm...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\ddorder\DDOrderRef.java
2
请在Spring Boot框架中完成以下Java代码
private void addNonceParameters(Map<String, Object> attributes, Map<String, Object> additionalParameters) { try { String nonce = this.secureKeyGenerator.generateKey(); String nonceHash = createHash(nonce); attributes.put(OidcParameterNames.NONCE, nonce); additiona...
* @see <a target="_blank" href="https://tools.ietf.org/html/rfc7636#section-4.2">4.2. Client Creates the Code Challenge</a> */ private void addPkceParameters(Map<String, Object> attributes, Map<String, Object> additionalParameters) { String codeVerifier = this.secureKeyGenerator.generateKey(); ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\config\CustomOAuth2AuthorizationRequestResolver.java
2
请在Spring Boot框架中完成以下Java代码
public void updateAuthor() { Author author = authorRepository.findByName("Mark Janel"); author.setAge(45); } @Transactional public void updateBooks() { Author author = authorRepository.findByName("Quartis Young"); List<Book> books = author.getBooks(); for (Book boo...
@Transactional(readOnly = true) public void queryEntityHistory() { AuditReader reader = AuditReaderFactory.get(em); AuditQuery queryAtRev = reader.createQuery().forEntitiesAtRevision(Book.class, 3); System.out.println("Get all Book instances modified at revision #3:"); System.out.pr...
repos\Hibernate-SpringBoot-master\HibernateSpringBootEnvers\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public class UserEvent implements Comparable<UserEvent> { private String userEventId; private long eventNanoTime; private long globalSequenceNumber; @SuppressWarnings("unused") public UserEvent() { // Required for Jackson Serialization and Deserialization } public UserEvent(String ...
} @Override public int compareTo(UserEvent other) { return Long.compare(this.globalSequenceNumber, other.globalSequenceNumber); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof UserEvent)) { ...
repos\tutorials-master\apache-kafka\src\main\java\com\baeldung\kafka\message\ordering\payload\UserEvent.java
1
请完成以下Java代码
public HUMoveToDirectWarehouseService setFailIfNoHUs(final boolean failIfNoHUs) { _failIfNoHUs = failIfNoHUs; return this; } private boolean isFailIfNoHUs() { return _failIfNoHUs; } public HUMoveToDirectWarehouseService setDocumentsCollection(final DocumentCollection documentsCollection) { this.documen...
{ documentsCollection.invalidateDocumentByRecordId(I_M_HU.Table_Name, huId.getRepoId()); } catch (final Exception ex) { logger.warn("Failed invalidating documents for M_HU_ID={}. Ignored", huId, ex); } } // // Remove this HU from the view // Don't invalidate. We will do it at the end of all...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\HUMoveToDirectWarehouseService.java
1
请在Spring Boot框架中完成以下Java代码
public HttpClient configureSsl(HttpClient client) { final HttpClientProperties.Ssl ssl = getSslProperties(); if (getBundle() != null || (ssl.getKeyStore() != null && ssl.getKeyStore().length() > 0) || getTrustedX509CertificatesForTrustManager().length > 0 || ssl.isUseInsecureTrustManager()) { client = clien...
else { sslContextBuilder.keyManager(getKeyManagerFactory()); } } catch (Exception e) { logger.error(e); } }); sslContextSpec.sslContext(clientSslContext) .handshakeTimeout(ssl.getHandshakeTimeout()) .closeNotifyFlushTimeout(ssl.getCloseNotifyFlushTimeout()) .closeNotifyReadTimeout(ss...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\HttpClientSslConfigurer.java
2
请完成以下Java代码
protected void prepare() { } @Override protected String doIt() { final IArchiveAware archiveAware = getRecord(IArchiveAware.class); final I_AD_Archive archive = archiveAware.getAD_Archive(); Check.assumeNotNull(archive, "Parameter archive is not null"); final IArchiveBL archiveBL = Services.get(IArchiveB...
} private void openPdfFile(@NonNull final byte[] data, @NonNull final String contentType, @NonNull final String filename) { final boolean backEndOrSwing = Ini.getRunMode() == RunMode.BACKEND || Ini.isSwingClient(); if (backEndOrSwing) { Services.get(IClientUI.class).download(data, contentType, filename)...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\process\ExportArchivePDF.java
1
请完成以下Java代码
public static GTIN ofString(@NonNull final String value) { return new GTIN(value); } public static GTIN ofNullableString(@Nullable final String value) { final String valueNorm = StringUtils.trimBlankToNull(value); return valueNorm != null ? ofString(valueNorm) : null; } public static Optional<GTIN> option...
return ean13 != null && ean13.productCodeEndsWith(expectedProductCode); } /** * @return true if fixed code (e.g. not a variable weight EAN13 etc) */ public boolean isFixed() { final EAN13 ean13 = toEAN13().orElse(null); return ean13 == null || ean13.isFixed(); } /** * @return true if fixed code (e.g. ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\gs1\GTIN.java
1
请完成以下Java代码
private void addCompleteListener(UserTask userTask) { addListenerToUserTask(userTask, TaskListener.EVENTNAME_COMPLETE, new CdiTaskListener(userTask.getId(), BusinessProcessEventType.COMPLETE_TASK)); } private void addAssignListener(UserTask userTask) { addListenerToUserTask(userTask, TaskListen...
FlowableListener listener = new FlowableListener(); listener.setEvent(event); listener.setImplementationType(ImplementationType.IMPLEMENTATION_TYPE_INSTANCE); listener.setInstance(instance); flowElement.getExecutionListeners().add(listener); } protected void addListenerToUserTas...
repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\event\CdiEventSupportBpmnParseHandler.java
1
请完成以下Java代码
public void setBatchId(String batchId) { this.batchId = batchId; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public Date getCompleteTime() { return completeTime; } public void setComplet...
} succesfulMigrationParts.add(migrationPart); } else { if (failedMigrationParts == null) { failedMigrationParts = new ArrayList<>(); } failedMigrationParts.add(migrationPart); } } } ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\migration\ProcessInstanceBatchMigrationResult.java
1
请完成以下Java代码
public String getCamundaTaskPriority() { return camundaTaskPriorityAttribute.getValue(this); } @Override public void setCamundaTaskPriority(String taskPriority) { camundaTaskPriorityAttribute.setValue(this, taskPriority); } @Override public Integer getCamundaHistoryTimeToLive() { String ttl = ...
camundaHistoryTimeToLiveAttribute.removeAttribute(this); } else { camundaHistoryTimeToLiveAttribute.setValue(this, historyTimeToLive); } } @Override public Boolean isCamundaStartableInTasklist() { return camundaIsStartableInTasklistAttribute.getValue(this); } @Override public void setCam...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ProcessImpl.java
1
请在Spring Boot框架中完成以下Java代码
public String getScopeDefinitionId() { return scopeDefinitionId; } public void setScopeDefinitionId(String scopeDefinitionId) { this.scopeDefinitionId = scopeDefinitionId; } public String getSubScopeId() { return subScopeId; } public void setSubScopeId(String subScopeI...
public String getScopeType() { return scopeType; } public void setScopeType(String scopeType) { this.scopeType = scopeType; } public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } }
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricTaskLogEntryResponse.java
2
请完成以下Java代码
public String getFormKey() { return formKey; } public void setFormKey(String formKey) { this.formKey = formKey; } public CamundaFormRef getCamundaFormRef() { return camundaFormRef; } public void setCamundaFormRef(CamundaFormRef camundaFormRef) { this.camundaFormRef = camundaFormRef; } ...
} public List<FormProperty> getFormProperties() { return formProperties; } public void setFormProperties(List<FormProperty> formProperties) { this.formProperties = formProperties; } public List<FormField> getFormFields() { return formFields; } public void setFormFields(List<FormField> form...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\form\FormDataImpl.java
1
请完成以下Java代码
public org.compiere.model.I_M_InOutLine getRef_InOutLine() throws RuntimeException { return (org.compiere.model.I_M_InOutLine)MTable.get(getCtx(), org.compiere.model.I_M_InOutLine.Table_Name) .getPO(getRef_InOutLine_ID(), get_TrxName()); } /** Set Referenced Shipment Line. @param Ref_InOutLine_ID Reference...
public BigDecimal getScrappedQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ScrappedQty); if (bd == null) return Env.ZERO; return bd; } /** Set Zielmenge. @param TargetQty Zielmenge der Warenbewegung */ public void setTargetQty (BigDecimal TargetQty) { set_ValueNoCheck (COLUMNNAME_...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_RV_M_InOutLine_Overview.java
1
请在Spring Boot框架中完成以下Java代码
private static void updateHUAttributes( @NonNull final IAttributeStorage huAttributes, @NonNull final HUAttributesUpdateRequest from) { huAttributes.setValue(AttributeConstants.ATTR_SecurPharmScannedStatus, from.getStatus().getCode()); if (!from.isSkipUpdatingBestBeforeDate()) { final JsonExpirationDat...
private static class HUAttributesUpdateRequest { public static final HUAttributesUpdateRequest ERROR = builder() .status(SecurPharmAttributesStatus.ERROR) // UPDATE just the status field, skip the others .skipUpdatingBestBeforeDate(true) .skipUpdatingLotNo(true) .skipUpdatingSerialNo(true) .b...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\service\SecurPharmHUAttributesScanner.java
2
请完成以下Java代码
public int lastIndexOf(String m) { String text = this.value; if (text == null || m == null || text.length() < m.length()) { return -1; } return text.toLowerCase().lastIndexOf(m.toLowerCase()); } /** * 是否包含, 大小写不敏感 * <pre * "abcxyz" 包含 "abc" => true ...
return NonCaseString.of(this.value.substring(beginIndex, endIndex)); } public boolean isNotEmpty() { return !this.value.isEmpty(); } @Override public int length() { return this.value.length(); } @Override public char charAt(int index) { return this.value.charAt...
repos\SpringBootCodeGenerator-master\src\main\java\com\softdev\system\generator\entity\NonCaseString.java
1
请完成以下Java代码
public BatchQuery active() { this.suspensionState = SuspensionState.ACTIVE; return this; } public BatchQuery suspended() { this.suspensionState = SuspensionState.SUSPENDED; return this; } public SuspensionState getSuspensionState() { return suspensionState; } public BatchQuery orderBy...
@Override public BatchQuery orderByTenantId() { return orderBy(BatchQueryProperty.TENANT_ID); } public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext.getBatchManager() .findBatchCountByQueryCriteria(this); } public List<Batch> executeList(CommandCo...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\BatchQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public String getDeliveryOrTransportTermsCode() { return deliveryOrTransportTermsCode; } /** * Sets the value of the deliveryOrTransportTermsCode property. * * @param value * allowed object is * {@link String } * */ public void setDeliveryOrTransport...
this.incotermText = value; } /** * Gets the value of the incotermLocation property. * * @return * possible object is * {@link String } * */ public String getIncotermLocation() { return incotermLocation; } /** * Sets the value of the inc...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\IncotermType.java
2
请完成以下Java代码
private List<Fact> createFacts_Variance( final AcctSchema as, final ProductAcctType varianceAcctType) { final DocLine_CostCollector docLine = getLine(); final AggregatedCostAmount costResult = docLine.getCreateCosts(as).orElse(null); if(costResult == null) { // NOTE: there is no need to fail if no cos...
{ continue; } final CostAmount costs = costResult.getCostAmountForCostElement(element).getMainAmt(); final Fact fact = createFactLines(as, element, debit, credit, costs.negate(), qty.negate()); if (fact != null) { facts.add(fact); } } return facts; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\manufacturing\acct\Doc_PPCostCollector.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult<UserVO> get4(@RequestParam("id") Integer id) { // 查询用户 UserVO user = new UserVO().setId(id).setUsername("username:" + id); // 返回 return CommonResult.success(user); } /** * 测试抛出 NullPointerException 异常 */ @GetMapping("/exception-01") public U...
// @PostMapping(value = "/add", // // ↓ 增加 "application/xml"、"application/json" ,针对 Content-Type 请求头 // consumes = {MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE}, // // ↓ 增加 "application/xml"、"application/json" ,针对 Accept 请求头 // produces = {MediaType.A...
repos\SpringBoot-Labs-master\lab-27\lab-27-webflux-02\src\main\java\cn\iocoder\springboot\lab27\springwebflux\controller\UserController.java
2
请完成以下Java代码
public Expression getCategoryExpression() { return categoryExpression; } public void setCategoryExpression(Expression categoryExpression) { this.categoryExpression = categoryExpression; } public Map<String, List<TaskListener>> getTaskListeners() { return taskListeners; } ...
this.addTaskListener(TaskListener.EVENTNAME_CREATE, taskListener); this.addTaskListener(TaskListener.EVENTNAME_ASSIGNMENT, taskListener); this.addTaskListener(TaskListener.EVENTNAME_COMPLETE, taskListener); this.addTaskListener(TaskListener.EVENTNAME_DELETE, taskListener); }...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\task\TaskDefinition.java
1
请完成以下Java代码
protected void executeExecutionListenersBeforeAll(CommandContext commandContext) { if (agendaOperationExecutionListeners != null && !agendaOperationExecutionListeners.isEmpty()) { for (AgendaOperationExecutionListener listener : agendaOperationExecutionListeners) { listener.beforeAll...
for (AgendaOperationExecutionListener listener : agendaOperationExecutionListeners) { listener.afterExecute(commandContext, runnable); } } } protected void executeExecutionListenersAfterException(CommandContext commandContext, Runnable runnable, Throwable throwable) { ...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\interceptor\DmnCommandInvoker.java
1
请完成以下Java代码
protected void prepare() { // nothing } @Override protected String doIt() { final I_M_Forecast forecast = getM_Forecast(); ddOrderLowLevelService.completeBackwardDDOrders(forecast); return MSG_OK; } private I_M_Forecast getM_Forecast() { if (p_forecast != null) { return p_forecast;
} if (I_M_Forecast.Table_Name.equals(getTableName()) && getRecord_ID() > 0) { p_forecast = InterfaceWrapperHelper.create(getCtx(), getRecord_ID(), I_M_Forecast.class, get_TrxName()); } if (p_forecast == null || p_forecast.getM_Forecast_ID() <= 0) { throw new FillMandatoryException(I_M_Forecast.COLUMNN...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\process\M_Forecast_CompleteBackwardDDOrders.java
1
请完成以下Java代码
public String getJsonField() { return jsonField; } public void setJsonField(String jsonField) { this.jsonField = jsonField; } public String getJsonPointerExpression() { return jsonPointerExpression; } public void setJsonPointerExpression(String jsonPointerE...
return xmlXPathExpression; } public void setXmlXPathExpression(String xmlXPathExpression) { this.xmlXPathExpression = xmlXPathExpression; } public String getDelegateExpression() { return delegateExpression; } public void setDelegateExpression(String delegateExpression) { ...
repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\ChannelEventKeyDetection.java
1
请在Spring Boot框架中完成以下Java代码
public class Book implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String title; private String isbn; public Long getId() { return id; } public void setId(Long id) ...
public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getIsbn() { return isbn; } public void setIsbn(String isbn) { this.isbn = isbn; } }
repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoViaCrossJoins\src\main\java\com\bookstore\entity\Book.java
2
请完成以下Java代码
public int getRed_1 () { Integer ii = (Integer)get_Value(COLUMNNAME_Red_1); if (ii == null) return 0; return ii.intValue(); } /** Set Repeat Distance. @param RepeatDistance Distance in points to repeat gradient color - or zero */ public void setRepeatDistance (int RepeatDistance) { set_Value ...
/** South East = 4 */ public static final String STARTPOINT_SouthEast = "4"; /** South = 5 */ public static final String STARTPOINT_South = "5"; /** South West = 6 */ public static final String STARTPOINT_SouthWest = "6"; /** West = 7 */ public static final String STARTPOINT_West = "7"; /** North West = 8 */ p...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Color.java
1
请完成以下Java代码
public void setM_PackagingContainer_ID (int M_PackagingContainer_ID) { if (M_PackagingContainer_ID < 1) set_ValueNoCheck (COLUMNNAME_M_PackagingContainer_ID, null); else set_ValueNoCheck (COLUMNNAME_M_PackagingContainer_ID, Integer.valueOf(M_PackagingContainer_ID)); } /** Get Verpackung. @return Verpa...
return new KeyNamePair(get_ID(), getName()); } /** Set Suchschluessel. @param Value Suchschluessel fuer den Eintrag im erforderlichen Format - muss eindeutig sein */ public void setValue (String Value) { set_Value (COLUMNNAME_Value, Value); } /** Get Suchschluessel. @return Suchschluessel fuer de...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_M_PackagingContainer.java
1
请完成以下Java代码
public void reportEdqsCountQuery(TenantId tenantId, EntityCountQuery query, long timingNanos) { checkTiming(tenantId, query, timingNanos); getTimer("edqsCountQueryTimer").record(timingNanos, TimeUnit.NANOSECONDS); } @Override public void reportStringCompressed() { getCounter("string...
} private StatsTimer getTimer(String name) { return timers.computeIfAbsent(name, __ -> statsFactory.createStatsTimer("edqsTimers", name)); } private StatsCounter getCounter(String name) { return counters.computeIfAbsent(name, __ -> statsFactory.createStatsCounter("edqsCounters", name)); ...
repos\thingsboard-master\common\edqs\src\main\java\org\thingsboard\server\edqs\stats\DefaultEdqsStatsService.java
1
请完成以下Java代码
public List<String> getBigramTempls_() { return bigramTempls_; } public void setBigramTempls_(List<String> bigramTempls_) { this.bigramTempls_ = bigramTempls_; } public List<String> getY_() { return y_; } public void setY_(List<String> y_) { thi...
public List<List<Path>> getPathList_() { return pathList_; } public void setPathList_(List<List<Path>> pathList_) { this.pathList_ = pathList_; } public List<List<Node>> getNodeList_() { return nodeList_; } public void setNodeList_(List<List<Node>> nodeList...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\crfpp\FeatureIndex.java
1
请完成以下Java代码
public class UmsMemberLoginLog implements Serializable { private Long id; private Long memberId; private Date createTime; private String ip; private String city; @ApiModelProperty(value = "登录类型:0->PC;1->android;2->ios;3->小程序") private Integer loginType; private String province; ...
} public String getProvince() { return province; } public void setProvince(String province) { this.province = province; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" [")...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsMemberLoginLog.java
1
请完成以下Java代码
public void setMessageConverter(MessageConverter messageConverter) { Assert.notNull(messageConverter, "'messageConverter' cannot be null"); this.messageConverter = messageConverter; } /** * Set a {@link KafkaHeaderMapper}. * @param headerMapper the header mapper to use for mapping headers of incoming {@link ...
private ConsumerRecord convertConsumerRecord(ConsumerRecord receivedRecord) { Map<String, Object> headerMap = new HashMap<>(); if (this.headerMapper != null) { this.headerMapper.toHeaders(receivedRecord.headers(), headerMap); } Message message = new GenericMessage<>(receivedRecord.value(), headerMap); Obj...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\adapter\ConvertingMessageListener.java
1
请完成以下Java代码
public void setAutoStartup(boolean autoStartup) { this.autoStartup = autoStartup; } /** * Return the value for the 'autoStartup' property. If "true", this * component will start upon a ContextRefreshedEvent. */ @Override public boolean isAutoStartup() { return this.autoSt...
} } } @Override public void stop() { synchronized (this.lifeCycleMonitor) { if (this.running) { logger.info("Stopping..."); doStop(); this.running = false; logger.info("Stopped."); } } } ...
repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\AbstractActivitiSmartLifeCycle.java
1
请在Spring Boot框架中完成以下Java代码
public class DeviceConfigException extends AdempiereException { public static DeviceConfigException permanentFailure(final String msg, final Throwable cause) { final boolean permanentFailure = true; return new DeviceConfigException(msg, cause, permanentFailure); } public static DeviceConfigException wrapIfNeed...
{ final String msg = extractMessage(cause); final boolean permanentFailure = false; return new DeviceConfigException(msg, cause, permanentFailure); } } private final boolean permanentFailure; public DeviceConfigException(final String msg) { super(msg); permanentFailure = false; } private DeviceC...
repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\config\DeviceConfigException.java
2
请完成以下Java代码
public static void addAvailableBeamElements(ArrayList<BeamElement> elements, float prevScore, boolean canShift, boolean canReduce, boolean canRightArc, boolean canLeftArc, Object[] features, AveragedPerceptron classifier, boolean isDecode, int b, ArrayList<Integer> dependencyRelations) { if (canShift) ...
float score = rightArcScores[dependency]; float addedScore = score + prevScore; elements.add(new BeamElement(addedScore, b, 2, dependency)); } } if (canLeftArc) { float[] leftArcScores = classifier.leftArcScores(features, isDecode); ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\perceptron\transition\parser\PartialTreeBeamScorerThread.java
1
请完成以下Java代码
protected boolean isExecuteCallout(final IAttributeValueContext attributeValueContext, final IAttributeSet attributeSet, final I_M_Attribute attribute, final Object valueOld, final Object valueNew) { final IWeightable weightable = getWeightableOrNull(attributeSet); if (weightable == null) { return...
} if (!(attributeValueContext instanceof IHUAttributePropagationContext)) { return false; } final IHUAttributePropagationContext huAttributePropagationContext = (IHUAttributePropagationContext)attributeValueContext; final AttributeCode attr_WeightNet = weightable.getWeightNetAttribute(); if (huAttribut...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\org\adempiere\mm\attributes\spi\impl\WeightGrossAttributeValueCallout.java
1
请完成以下Java代码
public void validateRemittanceAdviceLineInvoiceDocType(@NonNull final I_C_RemittanceAdvice_Line record) { final RemittanceAdviceLine remittanceAdviceLine = getLineOrFail(record); if (remittanceAdviceLine.getInvoiceId() != null) { final I_C_Invoice lineResolvedInvoice = invoiceDAO.getByIdInTrx(remittanceAdvic...
@ModelChange(timings = { ModelValidator.TYPE_AFTER_DELETE }) public void recomputeReadOnlyCurrenciesFlagOnDelete(@NonNull final I_C_RemittanceAdvice_Line record) { final RemittanceAdviceId remittanceAdviceId = RemittanceAdviceId.ofRepoId(record.getC_RemittanceAdvice_ID()); final RemittanceAdvice remittanceAdvice ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\remittanceadvice\interceptor\C_RemittanceAdvice_Line.java
1
请完成以下Java代码
public void setOrg(final OrgId orgId, final String orgName) { setProperty(Env.CTXNAME_AD_Org_ID, OrgId.toRepoId(orgId)); setProperty(Env.CTXNAME_AD_Org_Name, orgName); Ini.setProperty(Ini.P_ORG, orgName); } public void setUserOrgs(final String userOrgs) { setProperty(Env.CTXNAME_User_Org, userOrgs); } ...
{ setProperty(Env.CTXNAME_Printer, printerName == null ? "" : printerName); Ini.setProperty(Ini.P_PRINTER, printerName); } public void setAcctSchema(final AcctSchema acctSchema) { setProperty("$C_AcctSchema_ID", acctSchema.getId().getRepoId()); setProperty("$C_Currency_ID", acctSchema.getCurrencyId().getRe...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\LoginContext.java
1
请在Spring Boot框架中完成以下Java代码
private UserEntity getUserEntity(String sessionID) { // SessionID为空 if (StringUtils.isEmpty(sessionID)) { return null; } // 获取UserEntity // TODO 暂时存储本地 // Object userEntity = redisService.get(sessionID); Object userEntity = RedisServiceTemp.userMap.get...
/** * 获取用户ID * @param httpReq HTTP请求 * @return 用户ID */ private String getUserId(HttpServletRequest httpReq) { UserEntity userEntity = userUtil.getUser(httpReq); if (userEntity == null) { throw new CommonBizException(ExpCodeEnum.UNLOGIN); } return user...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Controller\src\main\java\com\gaoxi\controller\user\UserControllerImpl.java
2
请完成以下Java代码
public class CaseInstanceMigrationBatchCmd implements Command<Batch> { protected CmmnEngineConfiguration cmmnEngineConfiguration; protected String caseDefinitionId; protected String caseDefinitionKey; protected int caseDefinitionVersion; protected String caseDefinitionTenantId; protected C...
this.caseDefinitionTenantId = caseDefinitionTenantId; this.caseInstanceMigrationDocument = caseInstanceMigrationDocument; this.cmmnEngineConfiguration = cmmnEngineConfiguration; } @Override public Batch execute(CommandContext commandContext) { CaseInstanceMigrationManager migrationM...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\CaseInstanceMigrationBatchCmd.java
1
请完成以下Java代码
public String getProcessMsg() { return null; } @Override public String getSummary() { return getDocumentNo() + "/" + getDatePromised(); } @Override public LocalDate getDocumentDate() { return TimeUtil.asLocalDate(getDateOrdered()); } @Override public File createPDF() { final DocumentReportServic...
+ ",C_DocType_ID=" + getC_DocType_ID() + "]"; } /** * Auto report the first Activity and Sub contracting if are Milestone Activity */ private void autoReportActivities() { final IPPCostCollectorBL ppCostCollectorBL = Services.get(IPPCostCollectorBL.class); final PPOrderRouting orderRouting = getOrderR...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\MPPOrder.java
1
请完成以下Java代码
private void initUI() { MiniTable table = new MiniTable(); table.setRowSelectionAllowed(false); relatedTbl = table; } private void init() { ColumnInfo[] s_layoutRelated = new ColumnInfo[] { new ColumnInfo(Msg.translate(Env.getCtx(), "Warehouse"), "orgname", String.class), new ColumnInfo( Msg....
pstmt.setInt(2, M_PriceList_Version_ID); rs = pstmt.executeQuery(); relatedTbl.loadTable(rs); rs.close(); } catch (Exception e) { log.warn(sql, e); } finally { DB.close(rs, pstmt); rs = null; pstmt = null; } } public java.awt.Component getComponent() { return (java.awt.Component...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\gui\search\InfoProductRelated.java
1
请完成以下Java代码
public void calculate(final IPricingContext pricingCtx, final IPricingResult result) { final ZonedDateTime date = extractPriceDate(pricingCtx); final HashSet<PriceListVersionId> seenPriceListVersionIds = new HashSet<>(); PriceListVersionId currentPriceListVersionId = getPriceListVersionIdEffective(pricingCtx, d...
@Nullable private PriceListVersionId getBasePriceListVersionId(@Nullable final PriceListVersionId priceListVersionId, @NonNull final ZonedDateTime date) { if (priceListVersionId == null) { return null; } return priceListDAO.getBasePriceListVersionIdForPricingCalculationOrNull(priceListVersionId, date); }...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\price_list_version\PriceListVersionPricingRule.java
1
请完成以下Java代码
public int getM_ShippingPackage_ID() { return get_ValueAsInt(COLUMNNAME_M_ShippingPackage_ID); } @Override public void setNote (final @Nullable java.lang.String Note) { set_Value (COLUMNNAME_Note, Note); } @Override public java.lang.String getNote() { return get_ValueAsString(COLUMNNAME_Note); } @...
@Override public java.lang.String getProductValue() { return get_ValueAsString(COLUMNNAME_ProductValue); } @Override public void setQtyLU (final @Nullable BigDecimal QtyLU) { set_Value (COLUMNNAME_QtyLU, QtyLU); } @Override public BigDecimal getQtyLU() { final BigDecimal bd = get_ValueAsBigDecimal(C...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\shipping\model\X_M_ShippingPackage.java
1
请在Spring Boot框架中完成以下Java代码
private boolean isSkipBecauseMatchingsAlreadyExist() { return _skipIfMatchingsAlreadyExist && matchInvoiceService.hasMatchInvs(getInvoiceLineId(), getInOutLineId(), getInoutCostId()); } /** * @return true if underlying invoice line is part of a credit memo invoice */ private boolean isCreditMemoInvoice() { ...
return inoutLineProductId; } private boolean isSOTrx() { final I_C_Invoice invoice = getInvoice(); final I_M_InOut inout = getInOut(); final boolean invoiceIsSOTrx = invoice.isSOTrx(); final boolean inoutIsSOTrx = inout.isSOTrx(); // // Make sure IsSOTrx matches if (invoiceIsSOTrx != inoutIsSOTrx) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\matchinv\service\MatchInvBuilder.java
2
请在Spring Boot框架中完成以下Java代码
public class SecurityUtil { @Autowired private UserDetailsService userDetailsService; public void logInAs(String username) { UserDetails user = userDetailsService.loadUserByUsername(username); if (user == null) { throw new IllegalStateException("User " + username + " doesn't ex...
} @Override public boolean isAuthenticated() { return true; } @Override public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException {} @Override ...
repos\Activiti-develop\activiti-examples\activiti-api-spring-integration-example\src\main\java\org\activiti\examples\SecurityUtil.java
2
请完成以下Java代码
public String getRootProcessInstanceId() { return rootProcessInstanceId; } /** * Returns task State of history tasks */ public String getTaskState() { return taskState; } public static HistoricTaskInstanceDto fromHistoricTaskInstance(HistoricTaskInstance taskInstance) { HistoricTaskInstanceDto ...
dto.description = taskInstance.getDescription(); dto.deleteReason = taskInstance.getDeleteReason(); dto.owner = taskInstance.getOwner(); dto.assignee = taskInstance.getAssignee(); dto.startTime = taskInstance.getStartTime(); dto.endTime = taskInstance.getEndTime(); dto.duration = taskInstance.ge...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricTaskInstanceDto.java
1
请完成以下Java代码
public String charge(final ICalloutField calloutField) { if (isCalloutActive()) { return NO_ERROR; } final I_C_Payment payment = calloutField.getModel(I_C_Payment.class); final int C_Charge_ID = payment.getC_Charge_ID(); if (C_Charge_ID <= 0) // assuming it is resetting value { return NO_ERROR; ...
final IDocumentNoInfo documentNoInfo = Services.get(IDocumentNoBuilderFactory.class) .createPreliminaryDocumentNoBuilder() .setNewDocType(docType) .setOldDocumentNo(payment.getDocumentNo()) .setDocumentModel(payment) .buildOrNull(); if (documentNoInfo != null && documentNoInfo.isDocNoContro...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\CalloutPayment.java
1