instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class JsonAttachment { @ApiModelProperty( // allowEmptyValue = false, // value = "Reference in terms of the external system. Can reference multiple records (e.g. multiple order line candidates)\n" + "To be used in conjunction with <code>externalSystemCode</code>") String externalReference; @ApiMod...
@Builder(toBuilder = true) private JsonAttachment( @JsonProperty("externalReference") @NonNull final String externalReference, @JsonProperty("externalSystemCode") @NonNull final String externalSystemCode, @JsonProperty("attachmentId") @NonNull final String attachmentId, @JsonProperty("type") final @NonNull...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-ordercandidates\src\main\java\de\metas\common\ordercandidates\v1\response\JsonAttachment.java
2
请完成以下Java代码
public LookupValuesPage retrieveEntities(final LookupDataSourceContext evalCtx) { final String filter = evalCtx.getFilter(); return labelsValuesLookupDataSource.findEntities(evalCtx, filter); } public Set<Object> normalizeStringIds(final Set<String> stringIds) { if (stringIds.isEmpty()) { return Immutab...
private static int convertToInt(final String stringId) { try { return Integer.parseInt(stringId); } catch (final Exception ex) { throw new AdempiereException("Failed converting `" + stringId + "` to int.", ex); } } public ColumnSql getSqlForFetchingValueIdsByLinkId(@NonNull final String tableNameO...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\LabelsLookup.java
1
请完成以下Java代码
protected void createSnapshotsByParentIds(final Set<Integer> huIds) { query(I_M_HU_Item.class) .addInArrayOrAllFilter(I_M_HU_Item.COLUMN_M_HU_ID, huIds) .create() .insertDirectlyInto(I_M_HU_Item_Snapshot.class) .mapCommonColumns() .mapColumnToConstant(I_M_HU_Item_Snapshot.COLUMNNAME_Snapshot_UUID...
} @Override protected void restoreChildrenFromSnapshots(I_M_HU_Item huItem) { final M_HU_SnapshotHandler includedHUSnapshotHandler = new M_HU_SnapshotHandler(this); includedHUSnapshotHandler.restoreModelsFromSnapshotsByParent(huItem); final M_HU_Item_Storage_SnapshotHandler huItemStorageSnapshotHandler = new...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\snapshot\impl\M_HU_Item_SnapshotHandler.java
1
请在Spring Boot框架中完成以下Java代码
public class CommentsController { private SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); private List<CommentDTO> comments = null; /** * Public constructor to initialize the comments and handle the * ParseException * * @throws ParseException */ public CommentsController() throws Pars...
* * @param taskId * @return */ @RequestMapping(value = "/{taskId}", method = RequestMethod.GET, headers = "Accept=application/json") public List<CommentDTO> getCommentsByTaskId(@PathVariable("taskId") String taskId) { List<CommentDTO> commentListToReturn = new ArrayList<CommentDTO>(); for (CommentDTO curre...
repos\spring-boot-microservices-master\comments-webservice\src\main\java\com\rohitghatol\microservices\comments\apis\CommentsController.java
2
请完成以下Java代码
public ILogicExpression toConstantExpression(final boolean constantValue) { if (this.constantValue != null && this.constantValue == constantValue) { return this; } return new LogicTuple(constantValue, this); } @Override public String getExpressionString() { return expressionStr; } @Override publ...
* @return {@link CtxName} or {@link String}; never returns null */ public Object getOperand2() { return operand2; } /** * @return operator; never returns null */ public String getOperator() { return operator; } @Override public String toString() { return getExpressionString(); } @Override pu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\LogicTuple.java
1
请在Spring Boot框架中完成以下Java代码
public String getMyRoles(String username) { SecurityContext securityContext = SecurityContextHolder.getContext(); return securityContext.getAuthentication().getAuthorities().stream().map(auth -> auth.getAuthority()).collect(Collectors.joining(",")); } @PostAuthorize("#username == authentication...
public String joinUsernamesAndRoles(List<String> usernames, List<String> roles) { return usernames.stream().collect(Collectors.joining(";")) + ":" + roles.stream().collect(Collectors.joining(";")); } @PostFilter("filterObject != authentication.principal.username") public List<String> getAllUsername...
repos\tutorials-master\spring-security-modules\spring-security-core\src\main\java\com\baeldung\methodsecurity\service\UserRoleService.java
2
请完成以下Java代码
public Date getStartTime() { return startTime; } public Date getEndTime() { return endTime; } public Long getDurationInMillis() { return durationInMillis; } @Override public String getId() { return id; } @Override public void setId(String id) {...
public void setProcessDefinitionName(String processDefinitionName) { this.processDefinitionName = processDefinitionName; } public void setProcessDefinitionVersion(Integer processDefinitionVersion) { this.processDefinitionVersion = processDefinitionVersion; } public void setDeploymentId...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricScopeInstanceEntity.java
1
请在Spring Boot框架中完成以下Java代码
protected void forwardToSubscriptionManagerService(TenantId tenantId, EntityId entityId, Consumer<SubscriptionManagerService> toSubscriptionManagerService, Supplier<TransportProtos.ToCoreMsg> toCore) { ...
@Override public void onSuccess(@Nullable T result) { callback.accept(result); } @Override public void onFailure(Throwable t) {} }, executor); } protected static Consumer<Throwable> safeCallback(FutureCallback<Void> callback) { if...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\telemetry\AbstractSubscriptionService.java
2
请在Spring Boot框架中完成以下Java代码
private PathPatternRequestMatcher.Builder getRequestMatcherBuilder() { if (this.requestMatcherBuilder != null) { return this.requestMatcherBuilder; } this.requestMatcherBuilder = this.context.getBeanProvider(PathPatternRequestMatcher.Builder.class) .getIfUnique(() -> constructRequestMatcherBuilder(this.cont...
* Match when the {@link HttpMethod} is {@code method} * </p> * <p> * If a specific {@link RequestMatcher} must be specified, use * {@link #requestMatchers(RequestMatcher...)} instead * </p> * @param method the {@link HttpMethod} to use or {@code null} for any * {@link HttpMethod}. * @return the object t...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\AbstractRequestMatcherRegistry.java
2
请完成以下Java代码
public AbstractServiceConfiguration<S> setEnableEventDispatcher(boolean enableEventDispatcher) { this.enableEventDispatcher = enableEventDispatcher; return this; } public FlowableEventDispatcher getEventDispatcher() { return eventDispatcher; } public AbstractServiceConfiguratio...
public ObjectMapper getObjectMapper() { return objectMapper; } public AbstractServiceConfiguration<S> setObjectMapper(ObjectMapper objectMapper) { this.objectMapper = objectMapper; return this; } public Clock getClock() { return clock; } public AbstractServiceC...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\AbstractServiceConfiguration.java
1
请完成以下Java代码
public class SSCC18AttributeValueGenerator extends AbstractAttributeValueGenerator { private final ISSCC18CodeBL sscc18CodeBL = Services.get(ISSCC18CodeBL.class); private static final AtomicBoolean disabled = new AtomicBoolean(false); public static IAutoCloseable temporaryDisableItIf(final boolean condition) { ...
{ return !disabled.get(); } @Override public String generateStringValue( final Properties ctx_IGNORED, @NonNull final IAttributeSet attributeSet, final I_M_Attribute attribute_IGNORED) { final I_M_HU hu = Services.get(IHUAttributesBL.class).getM_HU(attributeSet); // Just don't use the M_HU_ID as se...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attributes\sscc18\impl\SSCC18AttributeValueGenerator.java
1
请完成以下Java代码
public DmnDecisionTableResult evaluateDecisionTable(String decisionKey, DmnModelInstance dmnModelInstance, VariableContext variableContext) { ensureNotNull("decisionKey", decisionKey); List<DmnDecision> decisions = parseDecisions(dmnModelInstance); for (DmnDecision decision : decisions) { if (decision...
throw LOG.unableToFindDecisionWithKey(decisionKey); } public DmnDecisionResult evaluateDecision(String decisionKey, DmnModelInstance dmnModelInstance, Map<String, Object> variables) { ensureNotNull("variables", variables); return evaluateDecision(decisionKey, dmnModelInstance, Variables.fromMap(variables)....
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DefaultDmnEngine.java
1
请完成以下Java代码
private boolean processAllocation() { if (m_alloc == null) { return true; } processPayment(); // Process It if (m_alloc.processIt(IDocument.ACTION_Complete) && m_alloc.save()) { m_alloc = null; return true; } // m_alloc = null; return false; } // processAllocation /** * Process Paym...
*/ private boolean processPayment() { if (m_payment == null) { return true; } // Process It if (m_payment.processIt(IDocument.ACTION_Complete) && m_payment.save()) { m_payment = null; return true; } // m_payment = null; return false; } // processPayment } // InvoiceWriteOff
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\process\InvoiceWriteOff.java
1
请在Spring Boot框架中完成以下Java代码
public class CustomWebSecurityConfig { @Bean public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) { return http .csrf(csrfSpec -> csrfSpec.disable()) .authorizeExchange(auth -> auth.pathMatchers(HttpMethod.GET,"/**") .authenticated()) ...
authentication.getCredentials(), Collections.singletonList(new SimpleGrantedAuthority("ROLE_USER")) ) ); } public ReactiveAuthenticationManager employeesAuthenticationManager() { return authentication -> employee(authentication) .switchIfEmpty(Mono.error(ne...
repos\tutorials-master\spring-reactive-modules\spring-reactive-security\src\main\java\com\baeldung\reactive\authresolver\CustomWebSecurityConfig.java
2
请完成以下Java代码
public VariableInstanceQuery variableNameLike(String variableNameLike) { wrappedVariableInstanceQuery.variableNameLike(variableNameLike); return this; } @Override public VariableInstanceQuery excludeTaskVariables() { wrappedVariableInstanceQuery.excludeTaskVariables(); retur...
@Override public VariableInstanceQuery asc() { wrappedVariableInstanceQuery.asc(); return this; } @Override public VariableInstanceQuery desc() { wrappedVariableInstanceQuery.desc(); return this; } @Override public VariableInstanceQuery orderBy(QueryProperty...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CmmnVariableInstanceQueryImpl.java
1
请完成以下Java代码
public void onGetAttributesResponse(GetAttributeResponseMsg getAttributesResponse) { } @Override public void onAttributeUpdate(UUID sessionId, AttributeUpdateNotificationMsg attributeUpdateNotification) { log.trace("[{}] Received attributes update notification to device", sessionId); try { ...
} } @Override public void onToDeviceRpcRequest(UUID sessionId, ToDeviceRpcRequestMsg toDeviceRequest) { log.trace("[{}] Received RPC command to device", sessionId); try { snmpTransportContext.getSnmpTransportService().onToDeviceRpcRequest(this, toDeviceRequest); snmp...
repos\thingsboard-master\common\transport\snmp\src\main\java\org\thingsboard\server\transport\snmp\session\DeviceSessionContext.java
1
请完成以下Java代码
public class PrintStreamToStringUtil { public static String usingByteArrayOutputStreamClass(String input) throws IOException { if (input == null) { return null; } String output; try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); PrintStream printStre...
String output; try (CustomOutputStream outputStream = new CustomOutputStream(); PrintStream printStream = new PrintStream(outputStream)) { printStream.print(input); output = outputStream.toString(); } return output; } private static class CustomOutputStream ext...
repos\tutorials-master\core-java-modules\core-java-io-conversions-2\src\main\java\com\baeldung\printstreamtostring\PrintStreamToStringUtil.java
1
请完成以下Java代码
public void setC_BankStatement_ID (final int C_BankStatement_ID) { if (C_BankStatement_ID < 1) set_ValueNoCheck (COLUMNNAME_C_BankStatement_ID, null); else set_ValueNoCheck (COLUMNNAME_C_BankStatement_ID, C_BankStatement_ID); } @Override public int getC_BankStatement_ID() { return get_ValueAsInt(CO...
public void setESR_Import(final de.metas.payment.esr.model.I_ESR_Import ESR_Import) { set_ValueFromPO(COLUMNNAME_ESR_Import_ID, de.metas.payment.esr.model.I_ESR_Import.class, ESR_Import); } @Override public void setESR_Import_ID (final int ESR_Import_ID) { if (ESR_Import_ID < 1) set_ValueNoCheck (COLUMNNA...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-gen\de\metas\payment\esr\model\X_x_esr_import_in_c_bankstatement_v.java
1
请完成以下Java代码
public String getExecutionId() { return executionId; } public void setExecutionId(String executionId) { this.executionId = executionId; } public Date getTime() { return getCreateTime(); } public ByteArrayRef getByteArrayRef() { return byteArrayRef; } /...
} if (doubleValue != null) { sb.append(", doubleValue=").append(doubleValue); } if (textValue != null) { sb.append(", textValue=").append(StringUtils.abbreviate(textValue, 40)); } if (textValue2 != null) { sb.append(", textValue2=").append(Stri...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricVariableInstanceEntityImpl.java
1
请完成以下Java代码
public static int count(String keyword, String srcText) { int count = 0; int leng = srcText.length(); int j = 0; for (int i = 0; i < leng; i++) { if (srcText.charAt(i) == keyword.charAt(j)) { j++; if (j == keyword.length...
return sb.toString(); } public static String combine(String... termArray) { StringBuilder sbSentence = new StringBuilder(); for (String word : termArray) { sbSentence.append(word); } return sbSentence.toString(); } public static String join(Itera...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\utility\TextUtility.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getContent() {
return content; } public void setContent(String content) { this.content = content; } public String getSlug() { return slug; } public void setSlug(String slug) { this.slug = slug; } }
repos\tutorials-master\patterns-modules\vertical-slice-architecture\src\main\java\com\baeldung\hexagonal\persistence\entity\Article.java
1
请完成以下Java代码
private void logAfter(Log log, String prefix, Object result, Stopwatch stopwatch) { // 判断是否是方法之前输出日志,不是就输出参数日志 if (!LogTypeEnum.PARAMETER.equals(log.value())) { logger.info("【返回参数 {} 】:{} ,耗时:{} 毫秒", prefix, JSON.toJSONString(result), stopwatch.elapsed(TimeUnit.MILLISECONDS)); } ...
} public static Method getSpecificmethod(ProceedingJoinPoint pjp) { MethodSignature methodSignature = (MethodSignature) pjp.getSignature(); Method method = methodSignature.getMethod(); // The method may be on an interface, but we need attributes from the // target class. If the targ...
repos\spring-boot-student-master\spring-boot-student-log\src\main\java\com\xiaolyuh\aspect\LogAspect.java
1
请在Spring Boot框架中完成以下Java代码
public void setNotifyTimes(Integer notifyTimes) { this.notifyTimes = notifyTimes; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } /** 限制通知次数 **/ public Integer getLimitNotifyTimes() {...
} /** 商户编号 **/ public String getMerchantNo() { return merchantNo; } /** 商户编号 **/ public void setMerchantNo(String merchantNo) { this.merchantNo = merchantNo == null ? null : merchantNo.trim(); } /** 商户订单号 **/ public String getMerchantOrderNo() { return merchant...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\notify\entity\RpNotifyRecord.java
2
请完成以下Java代码
public UIComponent getUIComponent( final @NonNull WFProcess wfProcess, final @NonNull WFActivity wfActivity, final @NonNull JsonOpts jsonOpts) { return UserConfirmationSupportUtil.createUIComponent( UserConfirmationSupportUtil.UIComponentProps.builderFrom(wfActivity) .question(getQuestion(wfProces...
{ request.getWfActivity().getWfActivityType().assertExpected(HANDLED_ACTIVITY_TYPE); return PickingMobileApplication.mapPickingJob( request.getWfProcess(), pickingJobRestService::complete ); } private String getQuestion(@NonNull final WFProcess wfProcess, @NonNull final String language) { final Pick...
repos\metasfresh-new_dawn_uat\backend\de.metas.picking.rest-api\src\main\java\de\metas\picking\workflow\handlers\activity_handlers\CompletePickingWFActivityHandler.java
1
请完成以下Java代码
private List<Method> findMatchingAnnotatedMethods(String parameterName) { List<Method> result = new ArrayList<Method>(); Method[] methods = this.getClass().getMethods(); for (int i = 0; i < methods.length; i++) { Method method = methods[i]; Annotation[] methodAnnotations = method.getAnnotations(...
} private Class<? extends JacksonAwareStringToTypeConverter<?>> findAnnotatedTypeConverter(Method method) { Annotation[] methodAnnotations = method.getAnnotations(); for (int j = 0; j < methodAnnotations.length; j++) { Annotation annotation = methodAnnotations[j]; if (annotation instanceof Camun...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\AbstractSearchQueryDto.java
1
请在Spring Boot框架中完成以下Java代码
public EmailVo sendEmail(String email, String key) { EmailVo emailVo; String content; String redisKey = key + email; // 如果不存在有效的验证码,就创建一个新的 TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); Template t...
} else { content = template.render(Dict.create().set("code",oldCode)); } emailVo = new EmailVo(Collections.singletonList(email),"ELADMIN后台管理系统",content); return emailVo; } @Override public void validated(String key, String code) { String value = redisUtils.get(ke...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\service\impl\VerifyServiceImpl.java
2
请完成以下Java代码
public col setCharOff(int char_off) { addAttribute("charoff",Integer.toString(char_off)); return(this); } /** Sets the charoff="" attribute. @param char_off When present this attribute specifies the offset of the first occurrence of the alignment character o...
@param element Adds an Element to the element. */ public col addElement(String hashcode,String element) { addElementToRegistry(hashcode,element); return(this); } /** Adds an Element to the element. @param element Adds an Element to the element. */ ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\col.java
1
请完成以下Java代码
private class ReceiptScheduleEffectiveDocumentLocation implements IDocumentLocationAdapter { private final I_M_ReceiptSchedule delegate; private ReceiptScheduleEffectiveDocumentLocation(@NonNull final I_M_ReceiptSchedule delegate) { this.delegate = delegate; } @Override public int getC_BPartner_ID() ...
} @Override public void setAD_User_ID(final int AD_User_ID) { } @Override public String getBPartnerAddress() { return delegate.getBPartnerAddress_Override(); } @Override public void setBPartnerAddress(final String address) { delegate.setBPartnerAddress_Override(address); } } @Overrid...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\ReceiptScheduleBL.java
1
请完成以下Java代码
public class Item { private int id; private String name; private List<Detail> details; public Item(int id, String name) { super(); this.id = id; this.name = name; } public int getId() { return id; } public void setId(int id) { this.id = id;
} public String getName() { return name; } public void setName(String name) { this.name = name; } public List<Detail> getDetails() { return details; } public void setDetails(List<Detail> details) { this.details = details; } }
repos\tutorials-master\spring-web-modules\spring-thymeleaf-2\src\main\java\com\baeldung\thymeleaf\pathvariables\Item.java
1
请完成以下Java代码
public byte[] getRouterlabel() { return routerlabel; } /** * Sets the value of the routerlabel property. * * @param value * allowed object is * byte[] */ public void setRouterlabel...
/** * Sets the value of the routerlabelZebra property. * * @param value * allowed object is * byte[] */ public void setRouterlabelZebra(byte[] value) { this.routerlabelZebra = value; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java-xjc\de\metas\shipper\gateway\go\schema\Label.java
1
请完成以下Java代码
public void setM_InOutLine(final org.compiere.model.I_M_InOutLine M_InOutLine) { set_ValueFromPO(COLUMNNAME_M_InOutLine_ID, org.compiere.model.I_M_InOutLine.class, M_InOutLine); } @Override public void setM_InOutLine_ID (final int M_InOutLine_ID) { if (M_InOutLine_ID < 1) set_Value (COLUMNNAME_M_InOutLine...
@Override public void setQtyEntered (final @Nullable BigDecimal QtyEntered) { set_Value (COLUMNNAME_QtyEntered, QtyEntered); } @Override public BigDecimal getQtyEntered() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyEntered); return bd != null ? bd : BigDecimal.ZERO; } @Override public ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_CallOrderDetail.java
1
请完成以下Java代码
public void setC_Commission_Share(final de.metas.contracts.commission.model.I_C_Commission_Share C_Commission_Share) { set_ValueFromPO(COLUMNNAME_C_Commission_Share_ID, de.metas.contracts.commission.model.I_C_Commission_Share.class, C_Commission_Share); } @Override public void setC_Commission_Share_ID (final int...
{ return get_ValueAsString(COLUMNNAME_Commission_Fact_State); } @Override public void setCommissionFactTimestamp (final java.lang.String CommissionFactTimestamp) { set_ValueNoCheck (COLUMNNAME_CommissionFactTimestamp, CommissionFactTimestamp); } @Override public java.lang.String getCommissionFactTimestamp(...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\commission\model\X_C_Commission_Fact.java
1
请完成以下Java代码
public GridField getField() { return m_mField; } /** * String Representation * * @return info */ @Override public String toString() { final StringBuilder sb = new StringBuilder("VAccount[") .append(m_title) .append(", value=").append(m_value) .append("]"); return sb.toString(); } // to...
if (m_text == null) return; // arhipac: teo_sarca: already disposed // Test Case: Open a window, click on account field that is mandatory but not filled, close the window and you will get an NPE // TODO: integrate to trunk // New text String newText = m_text.getText(); if (newText == null) newText...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VAccount.java
1
请完成以下Java代码
public Iterator<?> retrieveAllModelsWithMissingCandidates(final QueryLimit limit_IGNORED) { return Collections.emptyIterator(); } @Override public InvoiceCandidateGenerateResult createCandidatesFor(final InvoiceCandidateGenerateRequest request) { throw new IllegalStateException("Not supported"); } @Overrid...
@Override public String getSourceTable() { return I_M_Inventory.Table_Name; } @Override public boolean isUserInChargeUserEditable() { return false; } @Override public void setOrderedData(final I_C_Invoice_Candidate ic) { throw new IllegalStateException("Not supported"); } @Override public void set...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\spi\impl\M_Inventory_Handler.java
1
请完成以下Java代码
public Collection<String> getProduces() { return Collections.unmodifiableCollection(this.produces); } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } WebOperationRequestPredicate other = (WebOperatio...
result = prime * result + this.consumes.hashCode(); result = prime * result + this.httpMethod.hashCode(); result = prime * result + this.canonicalPath.hashCode(); result = prime * result + this.produces.hashCode(); return result; } @Override public String toString() { StringBuilder result = new StringBuil...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\web\WebOperationRequestPredicate.java
1
请完成以下Java代码
public class Charges4 { @XmlElement(name = "TtlChrgsAndTaxAmt") protected ActiveOrHistoricCurrencyAndAmount ttlChrgsAndTaxAmt; @XmlElement(name = "Rcrd") protected List<ChargesRecord2> rcrd; /** * Gets the value of the ttlChrgsAndTaxAmt property. * * @return * possible obj...
* This is why there is not a <CODE>set</CODE> method for the rcrd property. * * <p> * For example, to add a new item, do as follows: * <pre> * getRcrd().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Charg...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\Charges4.java
1
请完成以下Java代码
public static final TargetPOKeyPropertiesPartDescriptor createIfApplies(Method method, Cached annotation) { final String[] keyProperties = annotation.keyProperties(); if (keyProperties == null || keyProperties.length <= 0) { return null; } return new TargetPOKeyPropertiesPartDescriptor(ImmutableSet.copyO...
{ final String msg = "Invalid keyProperty '" + keyProp + "' for cached method " + targetObject.getClass() // + "." + constructorOrMethod.getName() + ". Target PO has no such column; PO=" + po; throw new RuntimeException(msg); } final Object keyValue = po.get_Value(keyProp); keyBuilde...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\interceptor\TargetPOKeyPropertiesPartDescriptor.java
1
请完成以下Java代码
public class IntegerWrapperLookup extends Lookup { private Integer[] elements; private final int pivot = 2; @Override @Setup public void prepare() { int common = 1; elements = new Integer[s]; for (int i = 0; i < s - 1; i++) { elements[i] = common; } ...
int index = 0; Integer pivotWrapper = pivot; while (!pivotWrapper.equals(elements[index])) { index++; } return index; } @Override public String getSimpleClassName() { return IntegerWrapperLookup.class.getSimpleName(); } }
repos\tutorials-master\core-java-modules\core-java-lang-2\src\main\java\com\baeldung\primitive\IntegerWrapperLookup.java
1
请在Spring Boot框架中完成以下Java代码
public Result list(@RequestParam Map<String, Object> params) { if (ObjectUtils.isEmpty(params.get("page")) || ObjectUtils.isEmpty(params.get("limit"))) { return ResultGenerator.genFailResult("参数异常!"); } PageQueryUtil pageUtil = new PageQueryUtil(params); return ResultGenerato...
* 分类修改 */ @RequestMapping(value = "/categories/update", method = RequestMethod.POST) @ResponseBody public Result update(@RequestParam("categoryId") Long categoryId, @RequestParam("categoryName") String categoryName) { if (!StringUtils.hasText(categoryName)) { ...
repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\controller\admin\CategoryController.java
2
请在Spring Boot框架中完成以下Java代码
public int hashCode() { return Objects.hash(authenticityVerification, fulfillmentProgram); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Program {\n"); sb.append(" authenticityVerification: ").append(toIndentedString(authenticityVerification)).append("\...
/** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\Program.java
2
请完成以下Java代码
public boolean isStartableInTasklist() { return isStartableInTasklist; } public boolean isNotStartableInTasklist() { return isNotStartableInTasklist; } public boolean isStartablePermissionCheck() { return startablePermissionCheck; } public void setProcessDefinitionCreatePermissionChecks(List<...
processDefinitionCreatePermissionChecks.addAll(processDefinitionCreatePermissionCheck.getAllPermissionChecks()); } public List<String> getCandidateGroups() { if (cachedCandidateGroups != null) { return cachedCandidateGroups; } if(authorizationUserId != null) { List<Group> groups = Context....
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessDefinitionQueryImpl.java
1
请完成以下Java代码
final class DataRedisHealth { private DataRedisHealth() { } static Health.Builder up(Health.Builder builder, Properties info) { builder.withDetail("version", info.getProperty("redis_version", "unknown")); return builder.up(); } static Health.Builder fromClusterInfo(Health.Builder builder, ClusterInfo cluste...
if (slotsOk != null) { builder.withDetail("slots_up", slotsOk); } Long slotsFail = clusterInfo.getSlotsFail(); if (slotsFail != null) { builder.withDetail("slots_fail", slotsFail); } if ("fail".equalsIgnoreCase(clusterInfo.getState())) { return builder.down(); } else { return builder.up(); }...
repos\spring-boot-4.0.1\module\spring-boot-data-redis\src\main\java\org\springframework\boot\data\redis\health\DataRedisHealth.java
1
请在Spring Boot框架中完成以下Java代码
public class CommonService_Service extends Service { private final static URL COMMONSERVICE_WSDL_LOCATION; private final static WebServiceException COMMONSERVICE_EXCEPTION; private final static QName COMMONSERVICE_QNAME = new QName("http://model.webservice.xncoding.com/", "CommonService"); static ...
super(wsdlLocation, serviceName, features); } /** * * @return * returns CommonService */ @WebEndpoint(name = "CommonServiceImplPort") public CommonService getCommonServiceImplPort() { return super.getPort(new QName("http://model.webservice.xncoding.com/", "CommonService...
repos\SpringBootBucket-master\springboot-cxf\src\main\java\com\xncoding\webservice\client\CommonService_Service.java
2
请在Spring Boot框架中完成以下Java代码
public List<UmsMenuNode> treeList() { List<UmsMenu> menuList = menuMapper.selectByExample(new UmsMenuExample()); List<UmsMenuNode> result = menuList.stream() .filter(menu -> menu.getParentId().equals(0L)) .map(menu -> covertMenuNode(menu, menuList)) .colle...
} /** * 将UmsMenu转化为UmsMenuNode并设置children属性 */ private UmsMenuNode covertMenuNode(UmsMenu menu, List<UmsMenu> menuList) { UmsMenuNode node = new UmsMenuNode(); BeanUtils.copyProperties(menu, node); List<UmsMenuNode> children = menuList.stream() .filter(subMenu ...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\UmsMenuServiceImpl.java
2
请在Spring Boot框架中完成以下Java代码
public class UserRequest extends UserResponse { protected boolean firstNameChanged; protected boolean lastNameChanged; protected boolean displayNameChanged; protected boolean passwordChanged; protected boolean emailChanged; @Override public void setEmail(String email) { super.setEm...
@JsonIgnore public boolean isEmailChanged() { return emailChanged; } @JsonIgnore public boolean isFirstNameChanged() { return firstNameChanged; } @JsonIgnore public boolean isLastNameChanged() { return lastNameChanged; } @JsonIgnore public boolean isDis...
repos\flowable-engine-main\modules\flowable-idm-rest\src\main\java\org\flowable\idm\rest\service\api\user\UserRequest.java
2
请完成以下Java代码
public Builder setM_Product_ID(final int M_Product_ID) { this.M_Product_ID = M_Product_ID; return this; } public Builder setM_AttributeSetInstance_ID(final int M_AttributeSetInstance_ID) { this.M_AttributeSetInstance_ID = M_AttributeSetInstance_ID; return this; } public Builder setM_HU_PI_It...
return this; } public Builder setQtyOrdered(final BigDecimal qtyOrdered, final BigDecimal qtyOrdered_TU) { this.qtyOrdered = qtyOrdered; this.qtyOrdered_TU = qtyOrdered_TU; return this; } public Builder setQtyDelivered(BigDecimal qtyDelivered) { this.qtyDelivered = qtyDelivered; return th...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\balance\PMMBalanceChangeEvent.java
1
请完成以下Java代码
public String getExpressionString() { return expressionString; } @Override public Set<CtxName> getParameters() { return ImmutableSet.of(); } @Override public String toString() { return toStringValue; } @Override public String getFormatedExpressionString() { return expressionString; } @Overrid...
{ return value; } @Override public LogicExpressionResult evaluateToResult(final Evaluatee ctx, final OnVariableNotFound onVariableNotFound) throws ExpressionEvaluationException { return value ? LogicExpressionResult.TRUE : LogicExpressionResult.FALSE; } @Override public ILogicExpression evaluatePartial(fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\ConstantLogicExpression.java
1
请完成以下Java代码
public String toString() { return "ManagementProperties [health=" + health + "]"; } public static class Health { private Camunda camunda = new Camunda(); /** * @return the camunda */ public Camunda getCamunda() { return camunda; } /** * @param camunda the camunda to ...
return enabled; } /** * @param enabled the enabled to set */ public void setEnabled(boolean enabled) { this.enabled = enabled; } @Override public String toString() { return joinOn(this.getClass()) .add("enabled=" + enabled) .toStrin...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\ManagementProperties.java
1
请完成以下Java代码
public String getId() { return id; } public Date getTime() { return time; } public String getType() { return type; } public String getUserId() { return userId; } public String getGroupId() { return groupId; } public String getTaskId() { return taskId; } public Strin...
public static HistoricIdentityLinkLogDto fromHistoricIdentityLink(HistoricIdentityLinkLog historicIdentityLink) { HistoricIdentityLinkLogDto dto = new HistoricIdentityLinkLogDto(); fromHistoricIdentityLink(dto, historicIdentityLink); return dto; } public static void fromHistoricIdentityLink(HistoricIde...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricIdentityLinkLogDto.java
1
请完成以下Java代码
public Class<? extends ObservationConvention<? extends Observation.Context>> getDefaultConvention() { return DefaultGatewayObservationConvention.class; } @Override public KeyName[] getLowCardinalityKeyNames() { return LowCardinalityKeys.values(); } @Override public KeyName[] getHighCardinalityKeyNam...
}, /** * HTTP URI taken from the Route. */ ROUTE_URI { @Override public String asString() { return "spring.cloud.gateway.route.uri"; } } } @NonNullApi enum HighCardinalityKeys implements KeyName { /** * Full HTTP URI. */ URI { @Override public String asString() { retu...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\headers\observation\GatewayDocumentedObservation.java
1
请在Spring Boot框架中完成以下Java代码
public class Demo01Producer { @Autowired private RocketMQTemplate rocketMQTemplate; public SendResult syncSend(Integer id) { // 创建 Demo01Message 消息 Demo01Message message = new Demo01Message(); message.setId(id); // 同步发送消息 return rocketMQTemplate.syncSend(Demo01Messa...
Demo01Message message = new Demo01Message(); message.setId(id); // 异步发送消息 rocketMQTemplate.asyncSend(Demo01Message.TOPIC, message, callback); } public void onewaySend(Integer id) { // 创建 Demo01Message 消息 Demo01Message message = new Demo01Message(); message.setId(...
repos\SpringBoot-Labs-master\lab-31\lab-31-rocketmq-demo\src\main\java\cn\iocoder\springboot\lab31\rocketmqdemo\producer\Demo01Producer.java
2
请完成以下Java代码
UserRolePermissionsIncludesList getUserRolePermissionsIncluded() { Check.assumeNotNull(userRolePermissionsIncluded, "userRolePermissionsIncluded not null"); return userRolePermissionsIncluded; } public UserRolePermissionsBuilder setMenuInfo(final UserMenuInfo menuInfo) { this._menuInfo = menuInfo; return t...
{ final Role adRole = getRole(); final AdTreeId roleMenuTreeId = adRole.getMenuTreeId(); if (roleMenuTreeId != null) { return UserMenuInfo.of(roleMenuTreeId, adRole.getRootMenuId()); } final I_AD_ClientInfo adClientInfo = getAD_ClientInfo(); final AdTreeId adClientMenuTreeId = AdTreeId.ofRepoIdOrNull(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\impl\UserRolePermissionsBuilder.java
1
请完成以下Java代码
private void endOrCacheInflater(Inflater inflater) { Deque<Inflater> inflaterCache = this.inflaterCache; if (inflaterCache != null) { synchronized (inflaterCache) { if (this.inflaterCache == inflaterCache && inflaterCache.size() < INFLATER_CACHE_LIMIT) { inflater.reset(); this.inflaterCache.add(inf...
inputStream.close(); } catch (IOException ex) { exceptionChain = addToExceptionChain(exceptionChain, ex); } } this.inputStreams.clear(); } return exceptionChain; } private IOException releaseZipContent(IOException exceptionChain) { ZipContent zipContent = this.zipContent; if (zipConten...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\jar\NestedJarFileResources.java
1
请完成以下Java代码
public CaseExecutionQuery caseInstanceVariableValueLessThanOrEqual(String name, Object value) { addVariable(name, value, QueryOperator.LESS_THAN_OR_EQUAL, false); return this; } public CaseExecutionQuery caseInstanceVariableValueLike(String name, String value) { addVariable(name, value, QueryOperator.L...
public String getBusinessKey() { return businessKey; } public CaseExecutionState getState() { return state; } public boolean isCaseInstancesOnly() { return false; } public String getSuperProcessInstanceId() { return superProcessInstanceId; } public String getSubProcessInstanceId() { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\runtime\CaseExecutionQueryImpl.java
1
请完成以下Java代码
public void setK_Topic_ID (int K_Topic_ID) { if (K_Topic_ID < 1) set_ValueNoCheck (COLUMNNAME_K_Topic_ID, null); else set_ValueNoCheck (COLUMNNAME_K_Topic_ID, Integer.valueOf(K_Topic_ID)); } /** Get Knowledge Topic. @return Knowledge Topic */ public int getK_Topic_ID () { Integer ii = (Integer...
/** 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 Record...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_K_Topic.java
1
请完成以下Java代码
public void registerScriptScannerClass(final String fileExtension, final Class<? extends IScriptScanner> scannerClass) { final String fileExtensionNorm = normalizeFileExtension(fileExtension); final Class<? extends IScriptScanner> scannerClassOld = scriptScannerClasses.put(fileExtensionNorm, scannerClass); if (...
return fileExtension.trim().toLowerCase(); } @Override public void setScriptFactory(final IScriptFactory scriptFactory) { this.scriptFactory = scriptFactory; } @Override public IScriptFactory getScriptFactoryToUse() { if (scriptFactory != null) { return scriptFactory; } return scriptFactoryDefau...
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\scanner\impl\ScriptScannerFactory.java
1
请完成以下Java代码
private byte[] getResourceBytes(Resource resource) { return FileCopyUtils.copyToByteArray(resource.getInputStream()); } @SneakyThrows private SecretKey loadSecretKeyFromResource(Resource resource) { byte[] secretKeyBytes = Base64.getDecoder().decode(getResourceBytes(resource)); retu...
* @return a {@link javax.crypto.SecretKey} object */ @SneakyThrows public static SecretKey getAESKeyFromPassword(char[] password, SaltGenerator saltGenerator, int iterations, String algorithm){ SecretKeyFactory factory = SecretKeyFactory.getInstance(algorithm); KeySpec spec = new PBEKeySpec...
repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\encryptor\SimpleGCMByteEncryptor.java
1
请完成以下Java代码
public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } @Override public int getVersion() { return version; } public void setVersion(int version) { this.version = version; ...
return Objects.hash(super.hashCode(), id, name, description, version, key, formKey); } @Override public String toString() { return ( "ProcessDefinition{" + "id='" + id + '\'' + ", name='" + name + '\'' + ...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\ProcessDefinitionImpl.java
1
请在Spring Boot框架中完成以下Java代码
private static PickingSlotSuggestion toPickingSlotSuggestion( @NonNull final I_M_PickingSlot pickingSlot, @NonNull final ImmutableMap<BPartnerLocationId, DocumentLocation> deliveryLocationsById, @NonNull final PickingSlotQueuesSummary queues) { final PickingSlotIdAndCaption pickingSlotIdAndCaption = toPicki...
} private static ImmutableSet<PickingSlotId> extractPickingSlotIds(final List<I_M_PickingSlot> pickingSlots) { return pickingSlots.stream() .map(pickingSlot -> PickingSlotId.ofRepoId(pickingSlot.getM_PickingSlot_ID())) .collect(ImmutableSet.toImmutableSet()); } private static PickingSlotIdAndCaption toP...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\PickingJobSlotService.java
2
请完成以下Java代码
public void setA_Depreciation_Method_ID (int A_Depreciation_Method_ID) { if (A_Depreciation_Method_ID < 1) set_ValueNoCheck (COLUMNNAME_A_Depreciation_Method_ID, null); else set_ValueNoCheck (COLUMNNAME_A_Depreciation_Method_ID, Integer.valueOf(A_Depreciation_Method_ID)); } /** Get Depreciation Calculat...
/** Set Processed. @param Processed The document has been processed */ public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); } /** Get Processed. @return The document has been processed */ public boolean isProcessed () { Object oo = get_Val...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Depreciation_Method.java
1
请完成以下Java代码
public Date getDate() { return date; } public void setDate(Date date) { this.date = date; } public Long getId() { return id; } public String getAuthor() { return author; } @Override
public String toString() { return ToStringBuilder.reflectionToString(this); } @Override public boolean equals(Object obj) { return EqualsBuilder.reflectionEquals(this, obj); } @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } }
repos\tutorials-master\xml-modules\jaxb\src\main\java\com\baeldung\jaxb\Book.java
1
请完成以下Java代码
public int getFirstAD_User_ID() { getRecipients(false); for (int i = 0; i < m_recipients.length; i++) { if (m_recipients[i].getAD_User_ID() != -1) return m_recipients[i].getAD_User_ID(); } return -1; } // getFirstAD_User_ID /** * @return unique list of recipient users */ public Set<UserId> ge...
/** * String Representation * @return info */ @Override public String toString () { StringBuffer sb = new StringBuffer ("MAlert["); sb.append(get_ID()) .append("-").append(getName()) .append(",Valid=").append(isValid()); if (m_rules != null) sb.append(",Rules=").append(m_rules.length); if (m_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MAlert.java
1
请完成以下Java代码
public void setC_BPartner_Location(org.compiere.model.I_C_BPartner_Location C_BPartner_Location) { set_ValueFromPO(COLUMNNAME_C_BPartner_Location_ID, org.compiere.model.I_C_BPartner_Location.class, C_BPartner_Location); } /** Set Partner Location. @param C_BPartner_Location_ID Identifies the (ship to) addres...
} /** Set Recurrent Payment. @param C_RecurrentPayment_ID Recurrent Payment */ @Override public void setC_RecurrentPayment_ID (int C_RecurrentPayment_ID) { if (C_RecurrentPayment_ID < 1) set_ValueNoCheck (COLUMNNAME_C_RecurrentPayment_ID, null); else set_ValueNoCheck (COLUMNNAME_C_RecurrentPayment_...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-gen\de\metas\banking\model\X_C_RecurrentPayment.java
1
请在Spring Boot框架中完成以下Java代码
public class ContactPerson { @NonNull String name; @Nullable PhoneNumber phone; @Nullable String emailAddress; @Nullable String simplePhoneNumber; @NonNull String languageCode; @Builder @Jacksonized private ContactPerson( @NonNull final String name, @Nullable final PhoneNumber phone, @Nullable final S...
Check.errorUnless( simplePhoneNumberIsEmpty || phoneIsEmpty, "Its not allowed to specify both a simple phone number string and a PhoneNumber instance because they might be contradictory; simplePhoneNumber={}; phone={}", simplePhoneNumber, phone); } @JsonIgnore @Nullable public String getPhoneAsStringOr...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.spi\src\main\java\de\metas\shipper\gateway\spi\model\ContactPerson.java
2
请完成以下Java代码
public <T> Stream<T> streamByQuery(@NonNull final IQueryBuilder<I_M_HU> queryBuilder, @NonNull final Function<I_M_HU, T> mapper) { return queryBuilder .create() .iterateAndStream() .map(mapper); } @Override public void createTUPackingInstructions(final CreateTUPackingInstructionsRequest request) { ...
.addEqualsFilter(I_M_HU_PI_Item_Product.COLUMNNAME_M_HU_PI_Item_Product_ID, piItemProductId) .andCollect(I_M_HU_PI_Item_Product.COLUMNNAME_M_HU_PI_Item_ID, I_M_HU_PI_Item.class) .addEqualsFilter(I_M_HU_PI_Item.COLUMNNAME_ItemType, X_M_HU_PI_Item.ITEMTYPE_Material) .addInArrayFilter(I_M_HU_PI_Item.COLUMNNAME...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HandlingUnitsDAO.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setCarrier_Product_ID (final int Carrier_Product_ID) { if (Carrier_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_Carrier_Product_ID, null); else set_Value...
@Override public int getM_Shipper_ID() { return get_ValueAsInt(COLUMNNAME_M_Shipper_ID); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_Product.java
1
请完成以下Java代码
public void validate() { for (Validator<AbstractQuery<?, ?>> validator : validators) { validate(validator); } } public void validate(Validator<AbstractQuery<?, ?>> validator) { validator.validate(this); } public void addValidator(Validator<AbstractQuery<?, ?>> validator) { validators.add...
validate(); evaluateExpressions(); return !hasExcludingConditions() ? executeIdsList(commandContext) : new ArrayList<>(); } public List<String> executeIdsList(CommandContext commandContext) { throw new UnsupportedOperationException("executeIdsList not supported by " + getClass().getCanonicalName()); ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\AbstractQuery.java
1
请完成以下Java代码
public void dispose() { m_frame.dispose(); } // dispose @Override public void actionPerformed(final ActionEvent e) { try { actionPerformed0(e); } catch (final Exception ex) { log.warn("", ex); statusBar.setStatusLine(ex.getLocalizedMessage(), true); } } private void actionPerformed0(fina...
? t.importTrl(directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()) : t.exportTrl(directory, AD_Client_ID, AD_Language.getValue(), AD_Table.getValue()); } if (msg == null || msg.length() == 0) { msg = (imp ? "Import" : "Export") + " Successful. [" + directory + "]"; } s...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\i18n\VTranslationImpExpDialog.java
1
请完成以下Java代码
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (!hasBoundValueObject(beanName)) { bind(ConfigurationPropertiesBean.get(this.applicationContext, bean, beanName)); } return bean; } private boolean hasBoundValueObject(String beanName) { return BindMetho...
} /** * Register a {@link ConfigurationPropertiesBindingPostProcessor} bean if one is not * already registered. * @param registry the bean definition registry * @since 2.2.0 */ public static void register(BeanDefinitionRegistry registry) { Assert.notNull(registry, "'registry' must not be null"); if (!r...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\ConfigurationPropertiesBindingPostProcessor.java
1
请完成以下Java代码
public void setT_Amount (final @Nullable BigDecimal T_Amount) { set_Value (COLUMNNAME_T_Amount, T_Amount); } @Override public BigDecimal getT_Amount() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_T_Amount); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setT_Date (final @...
} @Override public void setT_Qty (final @Nullable BigDecimal T_Qty) { set_Value (COLUMNNAME_T_Qty, T_Qty); } @Override public BigDecimal getT_Qty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_T_Qty); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setT_Time (final @Nul...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Test.java
1
请完成以下Java代码
public class TaxAmount1 { @XmlElement(name = "Rate") protected BigDecimal rate; @XmlElement(name = "TaxblBaseAmt") protected ActiveOrHistoricCurrencyAndAmount taxblBaseAmt; @XmlElement(name = "TtlAmt") protected ActiveOrHistoricCurrencyAndAmount ttlAmt; @XmlElement(name = "Dtls") protec...
public ActiveOrHistoricCurrencyAndAmount getTtlAmt() { return ttlAmt; } /** * Sets the value of the ttlAmt property. * * @param value * allowed object is * {@link ActiveOrHistoricCurrencyAndAmount } * */ public void setTtlAmt(ActiveOrHistoricCurrency...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\TaxAmount1.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult<UmsAdmin> getItem(@PathVariable Long id) { UmsAdmin admin = adminService.getItem(id); return CommonResult.success(admin); } @ApiOperation("修改指定用户信息") @RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@Pa...
@ResponseBody public CommonResult updateStatus(@PathVariable Long id,@RequestParam(value = "status") Integer status) { UmsAdmin umsAdmin = new UmsAdmin(); umsAdmin.setStatus(status); int count = adminService.update(id,umsAdmin); if (count > 0) { return CommonResult.succes...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\UmsAdminController.java
2
请完成以下Java代码
public void setInstances(int instances) { this.instances = instances; } public int getFailedJobs() { return failedJobs; } public void setFailedJobs(int failedJobs) { this.failedJobs = failedJobs; } public List<IncidentStatistics> getIncidentStatistics() { return incidentStatistics; } pub...
+ ", deploymentId=" + deploymentId + ", description=" + description + ", historyLevel=" + historyLevel + ", category=" + category + ", hasStartFormKey=" + hasStartFormKey + ", diagramResourceName=" + diagramResourceName + ", key=" + key + ", n...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ProcessDefinitionStatisticsEntity.java
1
请完成以下Java代码
public boolean equals(final Object obj) { if (this == obj) { return true; } final InvoicingItem other = EqualsBuilder.getOther(this, obj); if (other == null) { return false; } return new EqualsBuilder() .append(product, other.product) .append(qty, other.qty) .append(uom, other.uom) .isE...
return product; } @Override public BigDecimal getQty() { return qty; } @Override public I_C_UOM getC_UOM() { return uom; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\InvoicingItem.java
1
请完成以下Java代码
public VariableInstanceQuery orderByVariableName() { wrappedVariableInstanceQuery.orderByVariableName(); return this; } @Override public VariableInstanceQuery asc() { wrappedVariableInstanceQuery.asc(); return this; } @Override public VariableInstanceQuery desc(...
@Override public VariableInstance singleResult() { return wrappedVariableInstanceQuery.singleResult(); } @Override public List<VariableInstance> list() { return wrappedVariableInstanceQuery.list(); } @Override public List<VariableInstance> listPage(int firstResult, int maxR...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CmmnVariableInstanceQueryImpl.java
1
请完成以下Java代码
public String getRegionNameLabel() { return regionNameLabel; } @SuppressWarnings("unused") public boolean isHasRegions() { return hasRegions; } public int getSelectedRegionId() { final MRegion region = getSelectedItem(); if (region == null) { return -1; } return region.getC_Re...
{ final boolean enabled = captureSequence.hasPart(partName); setEnabledByCaptureSequence(enabled); } private void setEnabledByCaptureSequence(final boolean enabledByCaptureSequence) { if (this.enabledByCaptureSequence == enabledByCaptureSequence) { return; } this.enabledByCaptureSequence =...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VLocationDialog.java
1
请完成以下Java代码
public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** Set Manual. @param IsManual This is a manual process */ public void setIsManual (boolean IsManual) { set_Value (COLUMNNAME_IsManual, Boolean.valueOf(IsManual)); } /** Get Manual. @return This is a manual process */ p...
public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set SLA Criteria. @param PA_SLA_Criteria_ID Serv...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_SLA_Criteria.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO (Properties ctx) { org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName()); return poi; } @Override public String toString() { StringBuffer sb = new StringBuffer ("X_IMP_RequestHandlerType[") ...
set_ValueNoCheck (COLUMNNAME_IMP_RequestHandlerType_ID, null); else set_ValueNoCheck (COLUMNNAME_IMP_RequestHandlerType_ID, Integer.valueOf(IMP_RequestHandlerType_ID)); } /** Get Request handler type. @return Request handler type */ @Override public int getIMP_RequestHandlerType_ID () { Integer ii = ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\process\rpl\requesthandler\model\X_IMP_RequestHandlerType.java
1
请完成以下Java代码
public void scheduleDeleteSelections(@NonNull final Set<String> selectionIds) { SqlViewSelectionToDeleteHelper.scheduleDeleteSelections(selectionIds); } public static Set<DocumentId> retrieveRowIdsForLineIds( @NonNull final SqlViewKeyColumnNamesMap keyColumnNamesMap, final ViewId viewId, final Set<Intege...
while (rs.next()) { final DocumentId rowId = keyColumnNamesMap.retrieveRowId(rs, "", false); if (rowId != null) { rowIds.add(rowId); } } return rowIds.build(); } catch (final SQLException ex) { throw new DBException(ex, sqlAndParams.getSql(), sqlAndParams.getSqlParams()); } fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\SqlViewRowIdsOrderedSelectionFactory.java
1
请完成以下Java代码
public String asString() { return "messaging.rabbitmq.message.delivery_tag"; } } } /** * Default {@link RabbitListenerObservationConvention} for Rabbit listener key values. */ public static class DefaultRabbitListenerObservationConvention implements RabbitListenerObservationConvention { /** * ...
context.getListenerId(), RabbitListenerObservation.ListenerLowCardinalityTags.DESTINATION_NAME.asString(), consumerQueue); } @Override public KeyValues getHighCardinalityKeyValues(RabbitMessageReceiverContext context) { return KeyValues.of(RabbitListenerObservation.ListenerHighCardinalityTags.DELIVE...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\support\micrometer\RabbitListenerObservation.java
1
请完成以下Java代码
public DeviceProfileId getDeviceProfileId() { return deviceProfileId; } public void setDeviceProfileId(DeviceProfileId deviceProfileId) { this.deviceProfileId = deviceProfileId; } @Schema(description = "JSON object with content specific to type of transport in the device profile.") ...
log.warn("Can't serialize device data: ", e); } } @Schema(description = "JSON object with Ota Package Id.") public OtaPackageId getFirmwareId() { return firmwareId; } public void setFirmwareId(OtaPackageId firmwareId) { this.firmwareId = firmwareId; } @Schema(descr...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\Device.java
1
请完成以下Java代码
public void setTriggerEventType(String triggerEventType) { this.triggerEventType = triggerEventType; } public boolean isSendSynchronously() { return sendSynchronously; } public void setSendSynchronously(boolean sendSynchronously) { this.sendSynchronously = sendSynchronously; ...
setEventType(otherElement.getEventType()); setTriggerEventType(otherElement.getTriggerEventType()); setSendSynchronously(otherElement.isSendSynchronously()); eventInParameters = new ArrayList<>(); if (otherElement.getEventInParameters() != null && !otherElement.getEventInParamet...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\SendEventServiceTask.java
1
请完成以下Java代码
public class VehicleFactory { /** * Stores the already created vehicles. */ private static Map<Color, Vehicle> vehiclesCache = new HashMap<Color, Vehicle>(); /** * Private constructor to prevent this class instantiation. */ private VehicleFactory() { } /** * Returns a vehicle of the same color passed...
* * @param color * the color of the vehicle to return * @return a vehicle of the specified color */ public static Vehicle createVehicle(Color color) { // Looks for the requested vehicle into the cache. // If the vehicle doesn't exist, a new one is created. Vehicle newVehicle = vehiclesCache.c...
repos\tutorials-master\patterns-modules\design-patterns-creational-2\src\main\java\com\baeldung\flyweight\VehicleFactory.java
1
请完成以下Java代码
public String toString() { StringBuffer sb = new StringBuffer ("X_M_BOMAlternative[") .append(get_ID()).append("]"); return sb.toString(); } /** Set Description. @param Description Optional short description of the record */ public void setDescription (String Description) { set...
} /** 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 ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_BOMAlternative.java
1
请完成以下Java代码
public class DLM_Partition_Config_Line { static final DLM_Partition_Config_Line INSTANCE = new DLM_Partition_Config_Line(); private DLM_Partition_Config_Line() { } @ModelChange(timings = ModelValidator.TYPE_BEFORE_DELETE) public void deleteReferences(final I_DLM_Partition_Config_Line configLine) { Services.g...
{ if (configLine.getDLM_Referencing_Table_ID() <= 0) { return; } final ModelValidationEngine engine = ModelValidationEngine.get(); engine.addModelChange(configLine.getDLM_Referencing_Table().getTableName(), AddToPartitionInterceptor.INSTANCE); } @ModelChange(timings = ModelValidator.TYPE_AFTER_DELETE) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\model\interceptor\DLM_Partition_Config_Line.java
1
请完成以下Java代码
public boolean isAccountNonExpired() { return true; } @Override public boolean isAccountNonLocked() { return true; } @Override public boolean isCredentialsNonExpired() { return true; } @Override public boolean isEnabled() { return true; } @...
authorities.add( new SimpleGrantedAuthority( role.getName() ) ); } return authorities; } @Override public String getUsername() { return username; } @Override public String getPassword() { return password; } }
repos\Spring-Boot-In-Action-master\springbt_security_jwt\src\main\java\cn\codesheep\springbt_security_jwt\model\entity\User.java
1
请在Spring Boot框架中完成以下Java代码
public final class BatchAutoConfiguration { @Configuration(proxyBeanMethods = false) static class SpringBootBatchDefaultConfiguration extends DefaultBatchConfiguration { private final @Nullable TaskExecutor taskExecutor; private final @Nullable JobParametersConverter jobParametersConverter; SpringBootBatchD...
@Override @Deprecated(since = "4.0.0", forRemoval = true) @SuppressWarnings("removal") protected JobParametersConverter getJobParametersConverter() { return (this.jobParametersConverter != null) ? this.jobParametersConverter : super.getJobParametersConverter(); } @Override protected TaskExecutor ge...
repos\spring-boot-4.0.1\module\spring-boot-batch\src\main\java\org\springframework\boot\batch\autoconfigure\BatchAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public static List toList() { TrxTypeEnum[] ary = TrxTypeEnum.values(); List list = new ArrayList(); for (int i = 0; i < ary.length; i++) { Map<String, String> map = new HashMap<String, String>(); map.put("desc", ary[i].getDesc()); list.add(map); } return list; } public static TrxTypeEnum getEnum(...
* * @return */ public static String getJsonStr() { TrxTypeEnum[] enums = TrxTypeEnum.values(); StringBuffer jsonStr = new StringBuffer("["); for (TrxTypeEnum senum : enums) { if (!"[".equals(jsonStr.toString())) { jsonStr.append(","); } jsonStr.append("{id:'").append(senum).append("',desc:'").ap...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\enums\TrxTypeEnum.java
2
请完成以下Java代码
protected String doIt() throws Exception { final I_DLM_Partition partitionDB = getProcessInfo().getRecord(I_DLM_Partition.class); final ITrxManager trxManager = Services.get(ITrxManager.class); try (final AutoCloseable customizer = connectionCustomizerService.registerTemporaryCustomizer(DLMConnectionCustomizer....
IDLMAware.COLUMNNAME_DLM_Partition_ID, 0); Loggables.addLog("Unassigned {} records from {}", updateCount, partitionDB); partitionDB.setPartitionSize(0); InterfaceWrapperHelper.save(partitionDB); if (isClearWorkQueue) { final IQueryBL queryBL = Services.get(IQueryBL.class); final int deleteCount = que...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\process\DLM_Partition_Destroy.java
1
请完成以下Java代码
public String getUserNameAttributeName() { return this.userNameAttributeName; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || this.getClass() != obj.getClass()) { return false; } OAuth2UserAuthority that = (OAuth2UserAuthority) obj; if (!this....
result = 31 * result; for (Map.Entry<String, Object> e : getAttributes().entrySet()) { Object key = e.getKey(); Object value = convertURLIfNecessary(e.getValue()); result += Objects.hashCode(key) ^ Objects.hashCode(value); } return result; } @Override public String toString() { return this.getAutho...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\user\OAuth2UserAuthority.java
1
请完成以下Java代码
static class Sync extends AbstractQueuedSynchronizer { // 我们定义状态标志位是1时表示获取到了锁,为0时表示没有获取到锁 @Override protected boolean tryAcquire(int arg) { // 获取锁有竞争所以需要使用CAS原子操作 if (compareAndSetState(0, 1)) { setExclusiveOwnerThread(Thread.currentThread()); ...
} @Override public Condition newCondition() { return sync.newCondition(); } public static void main(String[] args) { MutexLock lock = new MutexLock(); final User user = new User(); for (int i = 0; i < 100; i++) { new Thread(() -> { lock.lock...
repos\spring-boot-student-master\spring-boot-student-concurrent\src\main\java\com\xiaolyuh\MutexLock.java
1
请完成以下Java代码
public Properties getCtx() { return ctx; } @Override public String getProcessingTag() { return processingTag; } @Override public void close() { releaseTag(ctx, processingTag);
} @Override @NonNull public Iterator<I_Fact_Acct_Log> iterator() { return retrieveForTag(ctx, processingTag); } @Override public void deleteAll() { deleteAllForTag(ctx, processingTag); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\aggregation\legacy\impl\LegacyFactAcctLogDAO.java
1
请在Spring Boot框架中完成以下Java代码
public void setTHM(Boolean value) { this.thm = value; } /** * Gets the value of the nonReturnableContainer property. * * @return * possible object is * {@link Boolean } * */ public Boolean isNonReturnableContainer() { return nonReturnableCont...
} /** * Gets the value of the specialConditionCode property. * * @return * possible object is * {@link String } * */ public String getSpecialConditionCode() { return specialConditionCode; } /** * Sets the value of the specialConditionCode p...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\INVOICListLineItemExtensionType.java
2
请完成以下Java代码
public class CustomStringArrayType implements UserType<String[]> { @Override public int getSqlType() { return Types.ARRAY; } @Override public Class<String[]> returnedClass() { return String[].class; } @Override public boolean equals(String[] x, String[] y) { if...
st.setNull(index, Types.ARRAY); } } } @Override public String[] deepCopy(String[] value) { return value != null ? Arrays.copyOf(value, value.length) : null; } @Override public boolean isMutable() { return false; } @Override public Serializable d...
repos\tutorials-master\persistence-modules\hibernate-mapping\src\main\java\com\baeldung\hibernate\arraymapping\CustomStringArrayType.java
1
请完成以下Java代码
public Object getParameterDefaultValue(final IProcessDefaultParameter parameter) { if (PARAM_C_BPartner_ID.contentEquals(parameter.getColumnName())) { final I_C_BankStatementLine bankStatementLine = getSingleSelectedBankStatementLine(); final BPartnerId bpartnerId = BPartnerId.ofRepoIdOrNull(bankStatementLin...
else { final Set<PaymentId> eligiblePaymentIds = bankStatementPaymentBL.findEligiblePaymentIds( bankStatementLine, bpartnerId, ImmutableSet.of(), // excludePaymentIds 2 // limit ); if (eligiblePaymentIds.isEmpty()) { bankStatementPaymentBL.createSinglePaymentAndLink(bankStatement,...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\banking\process\C_BankStatement_ReconcileWithSinglePayment.java
1
请完成以下Java代码
public <R> R forProcessInstanceWritable(final DocumentId pinstanceId, final IDocumentChangesCollector changesCollector, @NonNull final Function<IProcessInstanceController, R> processor) { try (final IAutoCloseable ignored = getInstance(pinstanceId).lockForWriting()) { final HUReportProcessInstance processInstan...
{ private final ImmutableMap<ProcessId, WebuiHUProcessDescriptor> descriptorsByProcessId; private IndexedWebuiHUProcessDescriptors(final List<WebuiHUProcessDescriptor> descriptors) { descriptorsByProcessId = Maps.uniqueIndex(descriptors, WebuiHUProcessDescriptor::getProcessId); } public WebuiHUProcessDes...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\report\HUReportProcessInstancesRepository.java
1
请完成以下Java代码
private LookupValuesList getAll() { LookupValuesList all = this.all; if (all == null) { all = this.all = ZoneId.getAvailableZoneIds() .stream() .map(TimeZoneLookupDescriptor::fromZoneIdToLookupValue) .collect(LookupValuesList.collect()); } return all; } private static StringLookupValue f...
} @Override public Set<String> getDependsOnFieldNames() { return ImmutableSet.of(); } @Override @Nullable public LookupValue retrieveLookupValueById(final @NonNull LookupDataSourceContext evalCtx) { return StringUtils.trimBlankToOptional(evalCtx.getIdToFilterAsString()) .map(zoneId -> getAll().getById...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\TimeZoneLookupDescriptor.java
1
请在Spring Boot框架中完成以下Java代码
public LineBuilder setTableName(final String tableName) { this.tableName = tableName; return this; } public String getTableName() { return tableName; } /** * Sets the primary key of the {@link I_DLM_Partition_Config_Line} records that already exists for the {@link PartitionerConfigLine} instan...
{ final PartitionerConfigReference.RefBuilder refBuilder = new PartitionerConfigReference.RefBuilder(this); refBuilders.add(refBuilder); return refBuilder; } public LineBuilder endRef() { final List<RefBuilder> distinctRefBuilders = refBuilders.stream() // if a builder's ref was already persis...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\config\PartitionerConfigLine.java
2
请完成以下Java代码
protected final void finalize() throws Throwable { // NOTE: to avoid memory leaks we need to programatically clear our internal state try (final IAutoCloseable ignored = CacheMDC.putCache(this)) { logger.debug("Running finalize"); cache.invalidateAll(); } } public CCacheStats stats() { final CacheS...
.name(cacheName) .labels(labels) .config(config) .debugAcquireStacktrace(debugAcquireStacktrace) // .size(cache.size()) .hitCount(guavaStats.hitCount()) .missCount(guavaStats.missCount()) .build(); } private boolean isNoCache() { return allowDisablingCacheByThreadLocal && ThreadLoc...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\CCache.java
1
请在Spring Boot框架中完成以下Java代码
public class BookstoreService { private final AuthorRepository authorRepository; public BookstoreService(AuthorRepository authorRepository) { this.authorRepository = authorRepository; } @Transactional public void newAuthor() { Author author = new Author(); author.setName(...
} @Transactional public void selectUpdateDeleteAuthor() { // this will call @PostLoad (the user is in persistent context) Author author = authorRepository.findById(1L).orElseThrow(); // force update, so @Pre/PostUpdate will be called author.setAge(35); authorRepository...
repos\Hibernate-SpringBoot-master\HibernateSpringBootJpaCallbacks\src\main\java\com\bookstore\service\BookstoreService.java
2