instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class CalculatedFieldManagerActor extends AbstractCalculatedFieldActor { private final CalculatedFieldManagerMessageProcessor processor; public CalculatedFieldManagerActor(ActorSystemContext systemContext, TenantId tenantId) { super(systemContext, tenantId); this.processor = new Calcula...
break; case CF_CACHE_INIT_MSG: processor.onCacheInitMsg((CalculatedFieldCacheInitMsg) msg); break; case CF_STATE_RESTORE_MSG: processor.onStateRestoreMsg((CalculatedFieldStateRestoreMsg) msg); break; case CF_STATE_PARTIT...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\actors\calculatedField\CalculatedFieldManagerActor.java
1
请完成以下Java代码
protected void parseProcessArchive(Element element, List<ProcessArchiveXml> parsedProcessArchives) { ProcessArchiveXmlImpl processArchive = new ProcessArchiveXmlImpl(); processArchive.setName(element.attribute(NAME)); processArchive.setTenantId(element.attribute(TENANT_ID)); List<String> processResou...
// add collected resource names. processArchive.setProcessResourceNames(processResourceNames); // add process archive to list of parsed archives. parsedProcessArchives.add(processArchive); } public ProcessesXml getProcessesXml() { return processesXml; } @Override public ProcessesXmlParse s...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\application\impl\metadata\ProcessesXmlParse.java
1
请完成以下Java代码
public void removeActionListener(final ActionListener listener) { m_text.removeActionListener(listener); } // removeActionListener /** * Set Field/WindowNo * * @param mField field */ @Override public void setField(final GridField mField) { m_field = mField; EditorContextPopupMenu.onGridFieldSet...
* @see java.awt.event.KeyListener#keyReleased(java.awt.event.KeyEvent) */ @Override public void keyReleased(final KeyEvent e) { if (LogManager.isLevelFinest()) { log.trace("Key=" + e.getKeyCode() + " - " + e.getKeyChar() + " -> " + m_text.getText()); } // ESC if (e.getKeyCode() == KeyEvent.VK_ESCAPE) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VFile.java
1
请完成以下Java代码
public class TenantCheck implements Serializable { private static final long serialVersionUID = 1L; /** * If <code>true</code> then the process engine performs tenant checks to * ensure that the query only access data that belongs to one of the * authenticated tenant ids. */ protected boolean isTena...
public boolean getIsTenantCheckEnabled() { return isTenantCheckEnabled; } public void setTenantCheckEnabled(boolean isTenantCheckEnabled) { this.isTenantCheckEnabled = isTenantCheckEnabled; } public List<String> getAuthTenantIds() { return authTenantIds; } public void setAuthTenantIds(List<St...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\TenantCheck.java
1
请完成以下Java代码
public JacksonJsonDeserializer<T> deserializer() { return this.jsonDeserializer; } /** * Copies this serde with same configuration, except new target type is used. * @param newTargetType type reference forced for serialization, and used as default for deserialization, not null * @param <X> new deserializatio...
*/ public JacksonJsonSerde<T> dontRemoveTypeHeaders() { this.jsonDeserializer.dontRemoveTypeHeaders(); return this; } /** * Ignore type information headers and use the configured target class. * @return the serde. */ public JacksonJsonSerde<T> ignoreTypeHeaders() { this.jsonDeserializer.ignoreTypeHeade...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\JacksonJsonSerde.java
1
请完成以下Java代码
public static MSalesRegion get (Properties ctx, int C_SalesRegion_ID) { Integer key = new Integer (C_SalesRegion_ID); MSalesRegion retValue = (MSalesRegion) s_cache.get (key); if (retValue != null) return retValue; retValue = new MSalesRegion (ctx, C_SalesRegion_ID, null); if (retValue.get_ID () != 0) ...
* @param success save success * @return success */ protected boolean afterSave (boolean newRecord, boolean success) { if (!success) return success; if (newRecord) insert_Tree(MTree_Base.TREETYPE_SalesRegion); // Value/Name change if (!newRecord && (is_ValueChanged("Value") || is_ValueChanged("Name")...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MSalesRegion.java
1
请完成以下Java代码
public Definitions newInstance(ModelTypeInstanceContext instanceContext) { return new DefinitionsImpl(instanceContext); } }); expressionLanguageAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_EXPRESSION_LANGUAGE) .defaultValue("http://www.omg.org/spec/FEEL/20140401") .buil...
.build(); drgElementCollection = sequenceBuilder.elementCollection(DrgElement.class) .build(); artifactCollection = sequenceBuilder.elementCollection(Artifact.class) .build(); elementCollectionCollection = sequenceBuilder.elementCollection(ElementCollection.class) .build(); busines...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\DefinitionsImpl.java
1
请完成以下Java代码
public static ProcessDefinitionSuspensionStateConfiguration fromJson(JsonObject jsonObject) { ProcessDefinitionSuspensionStateConfiguration config = new ProcessDefinitionSuspensionStateConfiguration(); config.by = JsonUtil.getString(jsonObject, JOB_HANDLER_CFG_BY); if (jsonObject.has(JOB_HANDLER_CFG_...
public static ProcessDefinitionSuspensionStateConfiguration byProcessDefinitionKey(String processDefinitionKey, boolean includeProcessInstances) { ProcessDefinitionSuspensionStateConfiguration configuration = new ProcessDefinitionSuspensionStateConfiguration(); configuration.by = JOB_HANDLER_CFG_PROCESS_DE...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\TimerChangeProcessDefinitionSuspensionStateJobHandler.java
1
请完成以下Java代码
public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public Integ...
} public String getUpdateBy() { return updateBy; } public void setUpdateBy(String updateBy) { this.updateBy = updateBy; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } ...
repos\springBoot-master\springboot-jpa\src\main\java\com\us\example\bean\User.java
1
请完成以下Java代码
public class BinaryTreeModel { private Object value; private BinaryTreeModel left; private BinaryTreeModel right; public BinaryTreeModel(Object value) { this.value = value; } public Object getValue() { return value; } public void setValue(Object value) { this....
} public void setLeft(BinaryTreeModel left) { this.left = left; } public BinaryTreeModel getRight() { return right; } public void setRight(BinaryTreeModel right) { this.right = right; } }
repos\tutorials-master\data-structures-2\src\main\java\com\baeldung\printbinarytree\BinaryTreeModel.java
1
请完成以下Java代码
public class SampleListener implements MessageListener { private JmsTemplate jmsTemplate; private Queue queue; public void setJmsTemplate(JmsTemplate jmsTemplate) { this.jmsTemplate = jmsTemplate; } public void setQueue(Queue queue) { this.queue = queue; } public void onM...
System.out.println("Received message: " + msg); if (msg == null) { throw new IllegalArgumentException("Null value received..."); } } catch (JMSException ex) { throw new RuntimeException(ex); } } } public Employe...
repos\tutorials-master\messaging-modules\spring-jms\src\main\java\com\baeldung\spring\jms\SampleListener.java
1
请在Spring Boot框架中完成以下Java代码
public String edit(HttpServletRequest request, @PathVariable("newsId") Long newsId) { request.setAttribute("path", "edit"); News news = newsService.queryNewsById(newsId); if (news == null) { return "error/error_400"; } request.setAttribute("news", news); reque...
news.setNewsContent(newsContent); news.setNewsCoverImage(newsCoverImage); news.setNewsStatus(newsStatus); news.setNewsTitle(newsTitle); String updateResult = newsService.updateNews(news); if ("success".equals(updateResult)) { return ResultGenerator.genSuccessResult("修...
repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\controller\admin\NewsController.java
2
请完成以下Java代码
public class SqlParamsInliner { private final boolean failOnError; @Builder private SqlParamsInliner( final boolean failOnError) { this.failOnError = failOnError; } public String inline(@NonNull final String sql, @Nullable final Object... params) { final List<Object> paramsList = params != null && param...
{ sqlFinal.append(ch); } } if (params != null && nextParamIndex < paramsCount) { appendExceedingParams(sqlFinal, nextParamIndex, paramsCount, params); } return sqlFinal.toString(); } private void appendMissingParam( final StringBuilder sql, final int missingParamIndexZeroBased) { final...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dao\sql\SqlParamsInliner.java
1
请完成以下Java代码
public void dispose() { final ProcessPanel panel = this.panel; if (panel != null) { panel.dispose(); this.panel = null; } super.dispose(); } public boolean isDisposed() { final ProcessPanel panel = this.panel;
return panel == null || panel.isDisposed(); } @Override public void setVisible(final boolean visible) { super.setVisible(visible); final ProcessPanel panel = this.panel; if (panel != null) { panel.setVisible(visible); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\process\ui\ProcessModalDialog.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult add(@RequestBody MemberBrandAttention memberBrandAttention) { int count = memberAttentionService.add(memberBrandAttention); if(count>0){ return CommonResult.success(count); }else{ return CommonResult.failed(); } } @ApiOperation("取消品牌关注...
Page<MemberBrandAttention> page = memberAttentionService.list(pageNum,pageSize); return CommonResult.success(CommonPage.restPage(page)); } @ApiOperation("根据品牌ID获取品牌关注详情") @RequestMapping(value = "/detail", method = RequestMethod.GET) @ResponseBody public CommonResult<MemberBrandAttention> d...
repos\mall-master\mall-portal\src\main\java\com\macro\mall\portal\controller\MemberAttentionController.java
2
请完成以下Spring Boot application配置
spring: ai: mistralai: api-key: ${MISTRAL_AI_API_KEY} chat: options: model: mistral-small-latest openai: api-key: xxxx chat.
enabled: true embedding.enabled: true chat.options.model: gpt-4o
repos\tutorials-master\spring-ai-modules\spring-ai-3\src\main\resources\application.yml
2
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(@NonNull IProcessPreconditionsContext context) { if (context.isNoSelection()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } return ProcessPreconditionsResolution.accept(); } @Override protected String doIt() { ...
{ copyDiscountSchemaBreaks(pricingConditions, product); }; return MSG_OK; } private void copyDiscountSchemaBreaks(final Set<PricingConditionsId> pricingConditions, ProductId product) { final ICompositeQueryFilter<I_M_DiscountSchemaBreak> queryFilter = Services.get(IQueryBL.class) .createCompositeQue...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pricing\process\M_DiscountSchemaBreak_CopyToSelectedSchema_Product.java
1
请完成以下Java代码
public void clearContext() { contextHolder.remove(); } @Override public SecurityContext getContext() { return getDeferredContext().get(); } @Override public Supplier<SecurityContext> getDeferredContext() { Supplier<SecurityContext> result = contextHolder.get(); if (result == null) { SecurityContext c...
public void setDeferredContext(Supplier<SecurityContext> deferredContext) { Assert.notNull(deferredContext, "Only non-null Supplier instances are permitted"); Supplier<SecurityContext> notNullDeferredContext = () -> { SecurityContext result = deferredContext.get(); Assert.notNull(result, "A Supplier<SecurityC...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\context\InheritableThreadLocalSecurityContextHolderStrategy.java
1
请完成以下Java代码
protected void load() { try { byte[] bytes = engineClient.getLocalBinaryVariable(variableName, executionId); setValue(bytes); this.isLoaded = true; } catch (EngineClientException e) { throw LOG.handledEngineClientException("loading deferred file", e); } } public boolean isLoa...
return super.getValue(); } public void setVariableName(String variableName) { this.variableName = variableName; } public void setExecutionId(String executionId){ this.executionId = executionId; }; public String getExecutionId() { return executionId; } @Override public String toString()...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\variable\impl\value\DeferredFileValueImpl.java
1
请在Spring Boot框架中完成以下Java代码
public void persistAuthorWithBooksAndRemoveOneBookList() { AuthorList alicia = new AuthorList(); alicia.setName("Alicia Tom"); alicia.setAge(38); alicia.setGenre("Anthology"); AuthorList mark = new AuthorList(); mark.setName("Mark Janel"); mark.setAge(23); ...
bookOfSwords.setIsbn("001-AT-MJ"); bookOfSwords.setTitle("The book of swords"); BookSet oneDay = new BookSet(); oneDay.setIsbn("002-AT-MJ"); oneDay.setTitle("One Day"); BookSet headDown = new BookSet(); headDown.setIsbn("001-AT"); headDown.setTitle("Head Down");...
repos\Hibernate-SpringBoot-master\HibernateSpringBootManyToManyBidirectionalListVsSet\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
private static Map<String, Object> convertClaimsIfNecessary(Map<String, Object> claims) { Map<String, Object> convertedClaims = new HashMap<>(claims); Object value = claims.get(OAuth2TokenIntrospectionClaimNames.ISS); if (value != null && !(value instanceof URL)) { URL convertedValue = ClaimConversionService....
} value = claims.get(OAuth2TokenIntrospectionClaimNames.AUD); if (value != null && !(value instanceof List)) { Object convertedValue = ClaimConversionService.getSharedInstance() .convert(value, OBJECT_TYPE_DESCRIPTOR, LIST_STRING_TYPE_DESCRIPTOR); if (convertedValue != null) { convertedClaims.put(OAu...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2TokenIntrospectionAuthenticationProvider.java
1
请完成以下Java代码
public ElementPermission getPermission(final int elementId) { final ElementResource resource = elementResource(elementId); final ElementPermission permission = getPermissionOrDefault(resource); return permission != null ? permission : ElementPermission.none(resource); } public ElementResource elementResource(...
public Builder setElementTableName(final String elementTableName) { this.elementTableName = elementTableName; return this; } public String getElementTableName() { Check.assumeNotEmpty(elementTableName, "elementTableName not empty"); return elementTableName; } @Override protected void assertV...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\ElementPermissions.java
1
请在Spring Boot框架中完成以下Java代码
public class Employee { // private long id; private String firstName; private String lastName; private String emailId; public Employee() { } @Id @GeneratedValue(strategy = GenerationType.AUTO) public long getId() { return id; } public void setId(long id) { ...
public void setLastName(String lastName) { this.lastName = lastName; } @Column(name = "email_address", nullable = false) public String getEmailId() { return emailId; } public void setEmailId(String emailId) { this.emailId = emailId; } @Override public String to...
repos\SpringBoot-Projects-FullStack-master\Part-1 Spring Boot Basic Fund Projects\SpringBootSources\SpringRestAPI\src\main\java\spring\boot\model\Employee.java
2
请完成以下Java代码
public String getLocalName() { return name; } public AttributeDefinition getDefinition() { return definition; } public AttributeDefinition getDefinition(final String name) { return definitions.get(name); } private static final Map<String, Element> MAP; static { final Map<String, Elemen...
if (name != null) map.put(name, element); } MAP = map; } public static Element forName(String localName) { final Element element = MAP.get(localName); return element == null ? UNKNOWN : element; } @SuppressWarnings("unused") private static List<AttributeDefinition> getAttributeDefini...
repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\extension\Element.java
1
请完成以下Java代码
protected void channelRead0(ChannelHandlerContext ctx, Operation msg) throws Exception { Long result = calculateEndpoint(msg); sendHttpResponse(ctx, new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CREATED), result.toString()); ctx.fireChannelRead(result); } private ...
// Generate an error page if response getStatus code is not OK (200). ByteBuf buf = Unpooled.copiedBuffer(content, CharsetUtil.UTF_8); res.content().writeBytes(buf); HttpUtil.setContentLength(res, res.content().readableBytes()); ctx.channel().writeAndFlush(res); } public void ...
repos\tutorials-master\libraries-server-2\src\main\java\com\baeldung\netty\CalculatorOperationHandler.java
1
请完成以下Java代码
public BigDecimal getQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); if (bd == null) return Env.ZERO; return bd; } /** Set Resource Assignment. @param S_ResourceAssignment_ID Resource Assignment */ public void setS_ResourceAssignment_ID (int S_ResourceAssignment_ID) { if (S_Re...
set_ValueNoCheck (COLUMNNAME_S_Resource_ID, Integer.valueOf(S_Resource_ID)); } /** Get Resource. @return Resource */ public int getS_Resource_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID); if (ii == null) return 0; return ii.intValue(); } /** Get Record ID/ColumnName ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_S_ResourceAssignment.java
1
请在Spring Boot框架中完成以下Java代码
private static TaxProductIdProvider getTaxProductIdProvider(@NonNull final JsonExternalSystemRequest externalSystemRequest) { final ImmutableMap.Builder<JsonMetasfreshId, List<BigDecimal>> productId2VatRatesBuilder = ImmutableMap.builder(); final Map<String, String> parameters = externalSystemRequest.getParameters...
.clientSecret(clientSecret) .build(); return (CurrencyInfoProvider)producerTemplate .sendBody("direct:" + GET_CURRENCY_ROUTE_ID, ExchangePattern.InOut, getCurrenciesRequest); } @NonNull private SalutationInfoProvider getSalutationInfoProvider(@NonNull final String basePath, @NonNull final String clientId...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\order\processor\BuildOrdersContextProcessor.java
2
请完成以下Java代码
public Set<Attribute> getByIds(@NonNull final Collection<AttributeId> ids) { if (ids.isEmpty()) {return ImmutableSet.of();} return ids.stream() .distinct() .map(this::getById) .collect(ImmutableSet.toImmutableSet()); } @NonNull public AttributeId getIdByCode(@NonNull final AttributeCode attributeC...
} return orderedAttributeIds.stream() .map(this::getById) .filter(Attribute::isActive) .map(Attribute::getAttributeCode) .collect(ImmutableList.toImmutableList()); } public Stream<Attribute> streamActive() { return attributesById.values().stream().filter(Attribute::isActive); } public boolea...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\impl\AttributesMap.java
1
请完成以下Java代码
public class WEBUI_M_ReceiptSchedule_ReceiveCUs_WithParam extends WEBUI_M_ReceiptSchedule_ReceiveCUs implements IProcessDefaultParametersProvider { private static final String PARAM_QtyCUsPerTU = "QtyCUsPerTU"; @Param(parameterName = PARAM_QtyCUsPerTU, mandatory = true) private BigDecimal p_QtyCUsPerTU; public WEB...
protected Stream<I_M_ReceiptSchedule> streamReceiptSchedulesToReceive() { return Stream.of(getM_ReceiptSchedule()); } private I_M_ReceiptSchedule getM_ReceiptSchedule() { return getRecord(I_M_ReceiptSchedule.class); } @Override protected BigDecimal getEffectiveQtyToReceive(I_M_ReceiptSchedule rs) { if(...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_ReceiptSchedule_ReceiveCUs_WithParam.java
1
请在Spring Boot框架中完成以下Java代码
public String getContent() { return content; } /** * Sets the value of the content property. * * @param value * allowed object is * {@link String } * */ public void setContent(String value) { th...
* * @return * possible object is * {@link String } * */ public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\AttachmentsType.java
2
请完成以下Java代码
public static void writeClassToDisk(String proxyClassName, Class aClass) { String path = ".\\" + proxyClassName + ".class"; writeClassToDisk(path, proxyClassName, aClass); } /** * @param path 输出路径 * @param proxyClassName 代理类名称($proxy4) * @param aClass 目标类对象 ...
fos.flush(); } catch (IOException e) { logger.error(e.getMessage(), e); } finally { if (fos != null) { try { fos.close(); } catch (IOException e) { logger.error(e.getMessage(), e); } ...
repos\spring-boot-student-master\spring-boot-student-mybatis\src\main\java\com\xiaolyuh\mybatis\JdkProxySourceClassUtil.java
1
请在Spring Boot框架中完成以下Java代码
public static class KeyValue { @NonNull String targetTableColumnName; @NonNull String selectionTableColumnName; @NonNull FTSJoinColumn.ValueType valueType; @Nullable Object value; public static KeyValue ofJoinColumnAndValue( @NonNull final FTSJoinColumn joinColumn, @Nullable final Object value) { ...
{ if (keys.isEmpty()) { throw new AdempiereException("empty key not allowed"); } keysBySelectionTableColumnName = Maps.uniqueIndex(keys, KeyValue::getSelectionTableColumnName); } @Nullable public Object getValueBySelectionTableColumnName(final String selectionTableColumName) { final KeyValu...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\query\FTSSearchResultItem.java
2
请完成以下Java代码
public String getProcessDefinitionName() { return processDefinitionName; } public String getProcessDefinitionCategory() { return processDefinitionCategory; } public Integer getProcessDefinitionVersion() { return processDefinitionVersion; } public String getProcessInsta...
public boolean isFinished() { return finished; } public boolean isUnfinished() { return unfinished; } public boolean isDeleted() { return deleted; } public boolean isNotDeleted() { return notDeleted; } public boolean isIncludeProcessVariables() { ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\HistoricProcessInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public void onBlurEvent() { outputText = inputText.toUpperCase(); } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public vo...
public void setOutputText(String outputText) { this.outputText = outputText; } public class Technology { private String name; private String currentVersion; public String getName() { return name; } public void setName(String name) { this...
repos\tutorials-master\web-modules\jsf\src\main\java\com\baeldung\springintegration\controllers\HelloPFBean.java
2
请完成以下Java代码
private Collection<ApplicationContextInitializer<?>> getInitializers() { List<ApplicationContextInitializer<?>> initializers = new ArrayList<>(); initializers.add(new RestartScopeInitializer()); return initializers; } private Collection<ApplicationListener<?>> getListeners() { List<ApplicationListener<?>> li...
catch (InterruptedException ex) { 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
请完成以下Java代码
public int getC_ElementValue_ID() { return get_ValueAsInt(COLUMNNAME_C_ElementValue_ID); } @Override public void setC_Invoice_Acct_ID (final int C_Invoice_Acct_ID) { if (C_Invoice_Acct_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Invoice_Acct_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Invoice_Acct_ID...
@Override public org.compiere.model.I_C_InvoiceLine getC_InvoiceLine() { return get_ValueAsPO(COLUMNNAME_C_InvoiceLine_ID, org.compiere.model.I_C_InvoiceLine.class); } @Override public void setC_InvoiceLine(final org.compiere.model.I_C_InvoiceLine C_InvoiceLine) { set_ValueFromPO(COLUMNNAME_C_InvoiceLine_ID,...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice_Acct.java
1
请在Spring Boot框架中完成以下Java代码
public class BookstoreService { private final AuthorRepository authorRepository; public BookstoreService(AuthorRepository authorRepository) { this.authorRepository = authorRepository; } @Transactional public void createAuthors() throws IOException { Author mt = new Author(); ...
public List<Author> fetchAuthorsByAgeGreaterThanEqual(int age) { List<Author> authors = authorRepository.findByAgeGreaterThanEqual(age); return authors; } @Transactional(readOnly = true) public byte[] fetchAuthorAvatarViaId(long id) { Author author = authorRepository.findById(id)....
repos\Hibernate-SpringBoot-master\HibernateSpringBootAttributeLazyLoadingBasic\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public int getRef_RMA_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Ref_RMA_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_AD_User getSalesRep() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_SalesRep_ID, org.compiere.model.I_AD_User.class...
Sales Representative or Company Agent */ @Override public void setSalesRep_ID (int SalesRep_ID) { if (SalesRep_ID < 1) set_Value (COLUMNNAME_SalesRep_ID, null); else set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID)); } /** Get Vertriebsbeauftragter. @return Sales Representative or ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_RMA.java
1
请在Spring Boot框架中完成以下Java代码
public class Pet extends NamedEntity { @Column @DateTimeFormat(pattern = "yyyy-MM-dd") private LocalDate birthDate; @ManyToOne @JoinColumn(name = "type_id") private PetType type; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) @JoinColumn(name = "pet_id") @OrderBy("date ASC") private final S...
return this.birthDate; } public PetType getType() { return this.type; } public void setType(PetType type) { this.type = type; } public Collection<Visit> getVisits() { return this.visits; } public void addVisit(Visit visit) { getVisits().add(visit); } }
repos\spring-petclinic-main\src\main\java\org\springframework\samples\petclinic\owner\Pet.java
2
请完成以下Java代码
private static WorkflowLauncher toWorkflowLauncher(final InventoryJobReference jobRef) { final WorkflowLauncherBuilder builder = WorkflowLauncher.builder() .applicationId(APPLICATION_ID) .caption(computeCaption(jobRef)); if (jobRef.isJobStarted()) { final WFProcessId wfProcessId = toWFProcessId(jobRe...
.append(" | ") .appendDate(jobRef.getMovementDate()) .append(" | ") .append(jobRef.getDocumentNo()) .build() ); } public QueryLimit getLaunchersLimit() { final int limitInt = sysConfigBL.getIntValue(Constants.SYSCONFIG_LaunchersLimit, -100); return limitInt == -100 ? Constants.DEFA...
repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\launchers\InventoryWorkflowLaunchersProvider.java
1
请完成以下Java代码
public File createPDF () { try { File temp = File.createTempFile(get_TableName()+get_ID()+"_", ".pdf"); return createPDF (temp); } catch (Exception e) { log.error("Could not create PDF - " + e.getMessage()); } return null; } // getPDF /** * Create PDF file * @param file output file * @...
* Get Document Owner (Responsible) * @return AD_User_ID (Created By) */ @Override public int getDoc_User_ID() { return getCreatedBy(); } // getDoc_User_ID /** * Get Document Approval Amount * @return DR amount */ @Override public BigDecimal getApprovalAmt() { return getTotalDr(); } // getAppro...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\model\MJournalBatch.java
1
请完成以下Java代码
static DocumentId convertInvoiceIdToDocumentId(@NonNull final InvoiceId invoiceId) { return DocumentId.of(invoiceId); } static InvoiceId convertDocumentIdToInvoiceId(@NonNull final DocumentId rowId) { return rowId.toId(InvoiceId::ofRepoId); } @Override public String toString() { return MoreObjects.toStr...
@Override public Set<String> getFieldNames() { return values.getFieldNames(); } @Override public ViewRowFieldNameAndJsonValues getFieldNameAndJsonValues() { return values.get(this); } @Override public Map<String, ViewEditorRenderMode> getViewEditorRenderModeByFieldName() { return values.getViewEditorR...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\InvoiceRow.java
1
请完成以下Java代码
public String getCaseInstanceId() { return caseInstanceId; } public String getCaseExecutionId() { return caseExecutionId; } public String getActivityInstanceId() { return activityInstanceId; } public String getName() { return name; } public String getDescription() { return descri...
public String getTaskState() { return taskState; } public static HistoricTaskInstanceDto fromHistoricTaskInstance(HistoricTaskInstance taskInstance) { HistoricTaskInstanceDto dto = new HistoricTaskInstanceDto(); dto.id = taskInstance.getId(); dto.processDefinitionKey = taskInstance.getProcessDefinition...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricTaskInstanceDto.java
1
请在Spring Boot框架中完成以下Java代码
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("VariableInstanceEntity["); sb.append("id=").append(id); sb.append(", name=").append(name); sb.append(", type=").append(type != null ? type.getTypeName() : "null"); if (executionId != null) { ...
sb.append(", longValue=").append(longValue); } if (doubleValue != null) { sb.append(", doubleValue=").append(doubleValue); } if (textValue != null) { sb.append(", textValue=").append(StringUtils.abbreviate(textValue, 40)); } if (textValue2 != null)...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\persistence\entity\VariableInstanceEntityImpl.java
2
请完成以下Java代码
public JsonNode waitForReply() { try { if (reply.await(requestTimeoutMs, TimeUnit.MILLISECONDS)) { log.trace("Waited for reply"); List<JsonNode> lastMsgs = getLastMsgs(); return lastMsgs.isEmpty() ? null : lastMsgs.get(0); } } catch...
public Map<String, String> getLatest(UUID deviceId) { Map<String, String> updates = new HashMap<>(); getLastMsgs().forEach(msg -> { EntityDataUpdate update = JacksonUtil.treeToValue(msg, EntityDataUpdate.class); Map<String, String> latest = update.getLatest(deviceId); ...
repos\thingsboard-master\monitoring\src\main\java\org\thingsboard\monitoring\client\WsClient.java
1
请完成以下Java代码
public String getType() { return type; } public BatchQuery tenantIdIn(String... tenantIds) { ensureNotNull("tenantIds", (Object[]) tenantIds); this.tenantIds = tenantIds; isTenantIdSet = true; return this; } public String[] getTenantIds() { return tenantIds; } public boolean isTen...
public BatchQuery orderById() { return orderBy(BatchQueryProperty.ID); } @Override public BatchQuery orderByTenantId() { return orderBy(BatchQueryProperty.TENANT_ID); } public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext.getBatchManager() .fi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\BatchQueryImpl.java
1
请完成以下Java代码
public String getProductValue(@NonNull final ProductId productId) { return productsService.getProductValue(productId); } // TODO move this method to de.metas.bpartner.service.IBPartnerDAO since it has nothing to do with price list // TODO: IdentifierString must also be moved to the module containing IBPartnerD...
return builder .externalId(bpartnerIdentifier.asExternalId()) .build(); } else if (Type.VALUE.equals(type)) { return builder .bpartnerValue(bpartnerIdentifier.asValue()) .build(); } else if (Type.GLN.equals(type)) { return builder .gln(bpartnerIdentifier.asGLN()) .build()...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\bpartner_pricelist\BpartnerPriceListServicesFacade.java
1
请完成以下Java代码
public void startNested(RequestPredicate predicate) { } @Override public void endNested(RequestPredicate predicate) { } @Override public void route(RequestPredicate predicate, HandlerFunction<?> handlerFunction) { DispatcherHandlerMappingDetails details = new DispatcherHandlerMappingDetails(); detai...
public void unknown(RouterFunction<?> routerFunction) { } } static class DispatcherHandlersMappingDescriptionProviderRuntimeHints implements RuntimeHintsRegistrar { private final BindingReflectionHintsRegistrar bindingRegistrar = new BindingReflectionHintsRegistrar(); @Override public void registerHints(R...
repos\spring-boot-4.0.1\module\spring-boot-webflux\src\main\java\org\springframework\boot\webflux\actuate\web\mappings\DispatcherHandlersMappingDescriptionProvider.java
1
请完成以下Java代码
public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Human other = (Human) obj; if (age != other.age) { ...
} } else if (!name.equals(other.name)) { return false; } return true; } @Override public String toString() { final StringBuilder builder = new StringBuilder(); builder.append("Human [name=").append(name).append(", age=").append(age).append("]"); r...
repos\tutorials-master\core-java-modules\core-java-lambdas\src\main\java\com\baeldung\java8\entity\Human.java
1
请完成以下Java代码
public Config setLayer1Size(int layer1Size) { this.layer1Size = layer1Size; return this; } public int getLayer1Size() { return layer1Size; } public Config setNumThreads(int numThreads) { this.numThreads = numThreads; return this; } public in...
{ this.alpha = alpha; return this; } public float getAlpha() { return alpha; } public Config setInputFile(String inputFile) { this.inputFile = inputFile; return this; } public String getInputFile() { return inputFile; } publ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\Config.java
1
请完成以下Java代码
public void setC_Campaign_ID (int C_Campaign_ID) { if (C_Campaign_ID < 1) set_Value (COLUMNNAME_C_Campaign_ID, null); else set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID)); } /** Get Campaign. @return Marketing Campaign */ public int getC_Campaign_ID () { Integer ii = (Inte...
{ return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Relative Priority. @param PromotionPriority Which promotion should be a...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Promotion.java
1
请完成以下Java代码
public ProcessDefinition getProcessDefinition() { return processDefinition; } @Override public String getActivityId() { return activityId; } @Override public String getTransitionName() { return transitionName; } @Override public String getProcessInstanceId(...
@Override public Date getTimeStamp() { return timeStamp; } @Override public String toString() { return "Event '" + processDefinition.getKey() + "' ['" + type + "', " + (type == BusinessProcessEventType.TAKE ? transitionName : activityId) + "]"; } @Override public VariableSc...
repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\event\CdiBusinessProcessEvent.java
1
请在Spring Boot框架中完成以下Java代码
private JsonRemittanceAdviceLine extractLineInfo(@NonNull final ListLineItemType lineItemType) { final Supplier<RuntimeException> missingMandatoryDataExSupplier = () -> new RuntimeException("Missing mandatory data! ListLineItemType: " + lineItemType); if (lineItemType.getListLineItemExtension() == null ||...
private String extractSendDateOrNull(@NonNull final ErpelMessageType erpelMessageType) { if (erpelMessageType.getErpelBusinessDocumentHeader() == null) { return null; } final DateTimeType sendDate = erpelMessageType.getErpelBusinessDocumentHeader().getInterchangeHeader().getDateTime(); final DateTimeFor...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\remadvimport\ecosio\RemadvXmlToJsonProcessor.java
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setAvailableInAPI (final boolean AvailableInAPI) { set_Value (COLUMNNAME_AvailableInAPI, AvailableInAPI); } @Override public boolean isAvailableInAPI() { r...
@Override public boolean isInitiallyClosed() { return get_ValueAsBoolean(COLUMNNAME_IsInitiallyClosed); } @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\de\metas\dataentry\model\X_DataEntry_Section.java
1
请在Spring Boot框架中完成以下Java代码
private List<Resource> resolveSchemaResources(ResourcePatternResolver resolver, String pattern) { try { return Arrays.asList(resolver.getResources(pattern)); } catch (IOException ex) { logger.debug(LogMessage.format("Could not resolve schema location: '%s'", pattern), ex); return Collections.emptyList();...
@Bean @SuppressWarnings("unchecked") GraphQlSourceBuilderCustomizer cursorStrategyCustomizer(CursorStrategy<?> cursorStrategy) { if (cursorStrategy.supports(ScrollPosition.class)) { CursorStrategy<ScrollPosition> scrollCursorStrategy = (CursorStrategy<ScrollPosition>) cursorStrategy; ConnectionFieldTypeV...
repos\spring-boot-4.0.1\module\spring-boot-graphql\src\main\java\org\springframework\boot\graphql\autoconfigure\GraphQlAutoConfiguration.java
2
请完成以下Java代码
public String getA_State () { return (String)get_Value(COLUMNNAME_A_State); } /** Set Tax Entity. @param A_Tax_Entity Tax Entity */ public void setA_Tax_Entity (String A_Tax_Entity) { set_Value (COLUMNNAME_A_Tax_Entity, A_Tax_Entity); } /** Get Tax Entity. @return Tax Entity */ public String getA...
@param TextMsg Text Message */ public void setTextMsg (String TextMsg) { set_Value (COLUMNNAME_TextMsg, TextMsg); } /** Get Text Message. @return Text Message */ public String getTextMsg () { return (String)get_Value(COLUMNNAME_TextMsg); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Info_Tax.java
1
请在Spring Boot框架中完成以下Java代码
public class CounterService { private ConcurrentMap<String, AtomicLong> namedCounterMap = new ConcurrentHashMap<>(); @Cacheable("Counters") public long getCachedCount(String counterName) { return getCount(counterName); } @CachePut("Counters") public long getCount(String counterName) { AtomicLong counter =...
counter = new AtomicLong(0L); AtomicLong existingCounter = this.namedCounterMap.putIfAbsent(counterName, counter); counter = existingCounter != null ? existingCounter : counter; } return counter.incrementAndGet(); } @CacheEvict("Counters") public void resetCounter(String counterName) { this.namedCoun...
repos\spring-boot-data-geode-main\spring-geode-samples\caching\look-aside\src\main\java\example\app\caching\lookaside\service\CounterService.java
2
请在Spring Boot框架中完成以下Java代码
class ArticleRepositoryAdapter implements ArticleRepository { private final TagJpaRepository tagJpaRepository; private final ArticleJpaRepository articleJpaRepository; private final ArticleCommentJpaRepository articleCommentJpaRepository; private final ArticleFavoriteJpaRepository articleFavoriteJpaRepo...
public List<Article> findByAuthors(Collection<User> authors, ArticleFacets facets) { return articleJpaRepository .findByAuthorInOrderByCreatedAtDesc(authors, PageRequest.of(facets.page(), facets.size())) .getContent(); } @Override @Transactional(readOnly = true) ...
repos\realworld-java21-springboot3-main\module\persistence\src\main\java\io\zhc1\realworld\persistence\ArticleRepositoryAdapter.java
2
请在Spring Boot框架中完成以下Java代码
private static class Loader { private final ConfigurableEnvironment environment; private final ResourceLoader resourceLoader; private final List<PropertySourceLoader> propertySourceLoaders; Loader(ConfigurableEnvironment environment, ResourceLoader resourceLoader) { this....
Resource resource = resourceLoader.getResource(location); if (!resource.exists()) { return; } String propertyResourceName = "flowableDefaultConfig: [" + location + "]"; List<PropertySource<?>> propertySources = loader.load(propertyReso...
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\environment\FlowableDefaultPropertiesEnvironmentPostProcessor.java
2
请完成以下Java代码
public ResponseEntity<ApiError> badRequestException(BadRequestException e) { // 打印堆栈信息 log.error(ThrowableUtil.getStackTrace(e)); return buildResponseEntity(ApiError.error(e.getStatus(),e.getMessage())); } /** * 处理 EntityExist */ @ExceptionHandler(value = EntityExistException...
* 处理所有接口数据验证异常 */ @ExceptionHandler(MethodArgumentNotValidException.class) public ResponseEntity<ApiError> handleMethodArgumentNotValidException(MethodArgumentNotValidException e){ // 打印堆栈信息 log.error(ThrowableUtil.getStackTrace(e)); ObjectError objectError = e.getBindingResult().ge...
repos\eladmin-master\eladmin-common\src\main\java\me\zhengjie\exception\handler\GlobalExceptionHandler.java
1
请完成以下Java代码
public Path getPath() { return this.delegate.getPath(); } @Override public boolean isContainedIn(Resource r) { return this.delegate.isContainedIn(r); } @Override public Iterator<Resource> iterator() { if (this.delegate instanceof CombinedResource) { return list().iterator(); } return List.<Resource...
} private List<Resource> asLoaderHidingResources(Collection<Resource> resources) { return resources.stream().filter(this::nonLoaderResource).map(this::asLoaderHidingResource).toList(); } private Resource asLoaderHidingResource(Resource resource) { return (resource instanceof LoaderHidingResource) ? resource : ...
repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\servlet\LoaderHidingResource.java
1
请完成以下Spring Boot application配置
# Configuration file # key = value greeting=Good morning quarkus.datasource.db-kind = h2 quarkus.datasource.jdbc.url = jdbc:h2:tcp://localhost/mem:test quarkus.hibernate-orm.database.generation = drop-and-create
%custom-profile.quarkus.datasource.jdbc.url = jdbc:h2:file:./testdb quarkus.http.test-port=0
repos\tutorials-master\quarkus-modules\quarkus\src\main\resources\application.properties
2
请完成以下Java代码
public String generateToken(UserDetails userDetails) { Map<String, Object> claims = new HashMap<>(16); claims.put( CLAIM_KEY_USERNAME, userDetails.getUsername() ); return Jwts.builder() .setClaims( claims ) .setExpiration( new Date( Instant.now().toEpochMilli() + ...
* 获取token的过期时间 */ public Date getExpirationDateFromToken(String token) { Date expiration = getClaimsFromToken( token ).getExpiration(); return expiration; } /** * 解析JWT */ private Claims getClaimsFromToken(String token) { Claims claims = Jwts.parser() ...
repos\SpringBootLearning-master (1)\springboot-jwt\src\main\java\com\gf\utils\JwtTokenUtil.java
1
请在Spring Boot框架中完成以下Java代码
protected BeanDefinition createInterceptorDefinition(Node node) { Element interceptMethodsElt = (Element) node; BeanDefinitionBuilder interceptor = BeanDefinitionBuilder .rootBeanDefinition(MethodSecurityInterceptor.class); // Default to autowiring to pick up after invocation mgr interceptor.setAutowire...
attributeBuilder.setFactoryMethod("createListFromCommaDelimitedString"); attributeBuilder.addConstructorArgValue(protectmethodElt.getAttribute(ATT_ACCESS)); // Support inference of class names String methodName = protectmethodElt.getAttribute(ATT_METHOD); if (methodName.lastIndexOf(".") == -1) { if...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\method\InterceptMethodsBeanDefinitionDecorator.java
2
请完成以下Java代码
public int getR_RequestProcessorLog_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_R_RequestProcessorLog_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Summary. @param Summary Textual summary of this request */ public void setSummary (String Summary) { set_Value (COLUMNNAM...
/** Set Text Message. @param TextMsg Text Message */ public void setTextMsg (String TextMsg) { set_Value (COLUMNNAME_TextMsg, TextMsg); } /** Get Text Message. @return Text Message */ public String getTextMsg () { return (String)get_Value(COLUMNNAME_TextMsg); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_RequestProcessorLog.java
1
请在Spring Boot框架中完成以下Java代码
public class PPOrderWeightingRunRepository { private final IQueryBL queryBL = Services.get(IQueryBL.class); public PPOrderWeightingRun getById(final PPOrderWeightingRunId id) { final PPOrderWeightingRunLoaderAndSaver loader = new PPOrderWeightingRunLoaderAndSaver(); return loader.getById(id); } public SeqNo ...
{ final PPOrderWeightingRunLoaderAndSaver loaderAndSaver = new PPOrderWeightingRunLoaderAndSaver(); loaderAndSaver.updateById(runId, consumer); } public void deleteChecks(final PPOrderWeightingRunId runId) { queryBL.createQueryBuilder(I_PP_Order_Weighting_RunCheck.class) .addEqualsFilter(I_PP_Order_Weight...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\manufacturing\order\weighting\run\PPOrderWeightingRunRepository.java
2
请完成以下Java代码
public boolean isMarkerVisible() { return isMarkerVisibleAttribute.getValue(this); } public void setMarkerVisible(boolean isMarkerVisible) { isMarkerVisibleAttribute.setValue(this, isMarkerVisible); } public boolean isMessageVisible() { return isMessageVisibleAttribute.getValue(this); } publi...
public void setParticipantBandKind(ParticipantBandKind participantBandKind) { participantBandKindAttribute.setValue(this, participantBandKind); } public BpmnShape getChoreographyActivityShape() { return choreographyActivityShapeAttribute.getReferenceTargetElement(this); } public void setChoreographyAc...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\bpmndi\BpmnShapeImpl.java
1
请完成以下Java代码
private void checkAuthorizationOfStartSignals(final CommandContext commandContext, List<EventSubscriptionEntity> startSignalEventSubscriptions, Map<String, ProcessDefinitionEntity> processDefinitions) { // check authorization for process definition for (EventSubscriptionEntity signalStartEventSubscription...
} } protected List<EventSubscriptionEntity> filterIntermediateSubscriptions(List<EventSubscriptionEntity> subscriptions) { List<EventSubscriptionEntity> result = new ArrayList<EventSubscriptionEntity>(); for (EventSubscriptionEntity subscription : subscriptions) { if (subscription.getExecutionId() !...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SignalEventReceivedCmd.java
1
请完成以下Java代码
protected DbOperation performTaskMetricsCleanup() { return Context .getCommandContext() .getMeterLogManager() .deleteTaskMetricsByRemovalTime(ClockUtil.getCurrentTime(), getTaskMetricsTimeToLive(), configuration.getMinuteFrom(), configuration.getMinuteTo(), getBatchSize()); } ...
protected boolean shouldRescheduleNow() { int batchSize = getBatchSize(); for (DbOperation deleteOperation : deleteOperations.values()) { if (deleteOperation.getRowsAffected() == batchSize) { return true; } } return false; } public int getBatchSize() { return Context ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\historycleanup\HistoryCleanupRemovalTime.java
1
请在Spring Boot框架中完成以下Java代码
public LettuceConnectionFactory redisConnectionFactory() { RedisStandaloneConfiguration redisConf = new RedisStandaloneConfiguration(); redisConf.setHostName(env.getProperty("spring.redis.host")); redisConf.setPort(Integer.parseInt(env.getProperty("spring.redis.port"))); redisConf.setPas...
/** * 自定义缓存key的生成类实现 */ @Bean(name = "myKeyGenerator") public KeyGenerator myKeyGenerator() { return new KeyGenerator() { @Override public Object generate(Object o, Method method, Object... params) { logger.info("自定义缓存,使用第一参数作为缓存key,params = " + Arrays.t...
repos\SpringBootBucket-master\springboot-cache\src\main\java\com\xncoding\trans\config\RedisCacheConfig.java
2
请在Spring Boot框架中完成以下Java代码
public Job getJobById(@PathVariable UUID id) throws ThingsboardException { JobId jobId = new JobId(id); return checkJobId(jobId, Operation.READ); } @GetMapping("/jobs") @PreAuthorize("hasAnyAuthority('TENANT_ADMIN')") public PageData<Job> getJobs(@Parameter(description = PAGE_SIZE_DESCR...
.build(); return jobService.findJobsByFilter(getTenantId(), filter, pageLink); } @PostMapping("/job/{id}/cancel") @PreAuthorize("hasAnyAuthority('TENANT_ADMIN')") public void cancelJob(@PathVariable UUID id) throws ThingsboardException { JobId jobId = new JobId(id); checkJobId(j...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\controller\JobController.java
2
请完成以下Java代码
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(DecisionService.class, DMN_ELEMENT_DECISION_SERVICE) .namespaceUri(LATEST_DMN_NS) .extendsType(NamedElement.class) .instanceProvider(new ModelTypeInstanceProvider<DecisionServ...
.uriElementReferenceCollection(Decision.class) .build(); inputDecisionRefCollection = sequenceBuilder.elementCollection(InputDecisionReference.class) .uriElementReferenceCollection(Decision.class) .build(); inputDataRefCollection = sequenceBuilder.elementCollection(InputDataReference.class) ...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\DecisionServiceImpl.java
1
请完成以下Java代码
public @NonNull ShipperTransportationId getOrCreate(@NonNull final CreateShipperTransportationRequest request) { return getSingleByQuery(ShipperTransportationQuery.builder() .shipperId(request.getShipperId()) .shipperBPartnerAndLocationId(request.getShipperBPartnerAndLocationId()) .shipDate(request.getSh...
.listDistinct(I_M_ShippingPackage.COLUMNNAME_C_Order_ID, OrderId.class); } @Override public Collection<I_M_ShipperTransportation> getByQuery(@NonNull final ShipperTransportationQuery query) { return toSqlQuery(query) .list(); } @Override public boolean anyMatch(@NonNull final ShipperTransportationQuery ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipping\api\impl\ShipperTransportationDAO.java
1
请完成以下Java代码
public void setDefaultFailureUrl(String defaultFailureUrl) { Assert.isTrue(UrlUtils.isValidRedirectUrl(defaultFailureUrl), () -> "'" + defaultFailureUrl + "' is not a valid redirect URL"); this.defaultFailureUrl = defaultFailureUrl; } protected boolean isUseForward() { return this.forwardToDestination; } ...
} protected RedirectStrategy getRedirectStrategy() { return this.redirectStrategy; } protected boolean isAllowSessionCreation() { return this.allowSessionCreation; } public void setAllowSessionCreation(boolean allowSessionCreation) { this.allowSessionCreation = allowSessionCreation; } }
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\SimpleUrlAuthenticationFailureHandler.java
1
请完成以下Java代码
public I_M_HU_Attribute getM_HU_Attribute() { return huAttribute; } @Override protected void setInternalValueString(final String value) { huAttribute.setValue(value); valueString = value; } @Override protected void setInternalValueNumber(final BigDecimal value) { huAttribute.setValueNumber(value); ...
private final void saveIfNeeded() { if (!saveOnChange) { return; } save(); } /** * Save to database. This method is saving no matter what {@link #isSaveOnChange()} says. */ final void save() { // Make sure the storage was not disposed assertNotDisposed(); // Make sure HU Attribute contains ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\HUAttributeValue.java
1
请完成以下Java代码
public BigDecimal getQtyReserved () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReserved); if (bd == null) return Env.ZERO; return bd; } /** Set Quantity to Order. @param QtyToOrder Quantity to Order */ public void setQtyToOrder (BigDecimal QtyToOrder) { set_Value (COLUMNNAME_QtyToOrder...
public String getReplenishmentCreate () { return (String)get_Value(COLUMNNAME_ReplenishmentCreate); } /** ReplenishType AD_Reference_ID=164 */ public static final int REPLENISHTYPE_AD_Reference_ID=164; /** Maintain Maximum Level = 2 */ public static final String REPLENISHTYPE_MaintainMaximumLevel = "2"; /** ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_T_Replenish.java
1
请完成以下Java代码
public int getDefaultFailedJobWaitTime() { return defaultFailedJobWaitTime; } public ProcessEngineConfiguration setDefaultFailedJobWaitTime(int defaultFailedJobWaitTime) { this.defaultFailedJobWaitTime = defaultFailedJobWaitTime; return this; } public int getAsyncFailedJobWaitT...
return this; } public ProcessEngineConfiguration setCopyVariablesToLocalForTasks(boolean copyVariablesToLocalForTasks) { this.copyVariablesToLocalForTasks = copyVariablesToLocalForTasks; return this; } public boolean isCopyVariablesToLocalForTasks() { return copyVariablesToLoca...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\ProcessEngineConfiguration.java
1
请在Spring Boot框架中完成以下Java代码
DispatcherServletRegistrationBean dispatcherServletRegistrationBean(DispatcherServlet dispatcherServlet) { return new DispatcherServletRegistrationBean(dispatcherServlet, "/"); } @Bean(name = DispatcherServlet.HANDLER_MAPPING_BEAN_NAME) CompositeHandlerMapping compositeHandlerMapping() { return new CompositeHan...
* {@link WebServerFactoryCustomizer} to add an {@link ErrorPage} so that the * {@link ManagementErrorEndpoint} can be used. */ static class ManagementErrorPageCustomizer implements WebServerFactoryCustomizer<ConfigurableServletWebServerFactory>, Ordered { private final WebProperties properties; Management...
repos\spring-boot-4.0.1\module\spring-boot-webmvc\src\main\java\org\springframework\boot\webmvc\autoconfigure\actuate\web\WebMvcEndpointChildContextConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public String getREFERENCEQUAL() { return referencequal; } /** * Sets the value of the referencequal property. * * @param value * allowed object is * {@link String } * */ public void setREFERENCEQUAL(String value) { this.referencequal = value...
* possible object is * {@link String } * */ public String getREFERENCEDATE1() { return referencedate1; } /** * Sets the value of the referencedate1 property. * * @param value * allowed object is * {@link String } * */ ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DRFAD1.java
2
请在Spring Boot框架中完成以下Java代码
public class Wizard { @Id private UUID id; private String name; @SortHouse private String house; @GenerateSpellPower private Integer spellPower; @GenerateUpdatedAtTimestamp private LocalDateTime updatedAt; public UUID getId() { return id; } public void ...
public String getName() { return name; } public void setName(String name) { this.name = name; } public String getHouse() { return house; } public LocalDateTime getUpdatedAt() { return updatedAt; } public Integer getSpellPower() { return spe...
repos\tutorials-master\persistence-modules\hibernate6\src\main\java\com\baeldung\attributevaluegenerator\Wizard.java
2
请在Spring Boot框架中完成以下Java代码
public class JsonPurchaseOrder { @JsonProperty("dateOrdered") @JsonFormat(shape = JsonFormat.Shape.STRING) ZonedDateTime dateOrdered; @JsonProperty("datePromised") @JsonFormat(shape = JsonFormat.Shape.STRING) ZonedDateTime datePromised; @JsonProperty("docStatus") String docStatus; @JsonProperty("documentNo"...
@JsonProperty("pdfAvailable") boolean pdfAvailable; @Builder @JsonCreator public JsonPurchaseOrder(@JsonProperty("dateOrdered") @NonNull final ZonedDateTime dateOrdered, @JsonProperty("datePromised") @NonNull final ZonedDateTime datePromised, @JsonProperty("docStatus") @NonNull final String docStatus, @Js...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-rest_api\src\main\java\de\metas\common\rest_api\v2\JsonPurchaseOrder.java
2
请完成以下Java代码
public void validate(MigratingTransitionInstance migratingInstance, MigratingProcessInstance migratingProcessInstance, MigratingTransitionInstanceValidationReportImpl instanceReport) { if (isInvalid(migratingInstance)) { instanceReport.addFailure("There is no migration instruction for this instance's ac...
protected boolean isInvalid(MigratingActivityInstance migratingInstance) { return hasNoInstruction(migratingInstance) && migratingInstance.getChildren().isEmpty(); } protected boolean isInvalid(MigratingEventScopeInstance migratingInstance) { return hasNoInstruction(migratingInstance.getEventSubscription()...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\validation\instance\NoUnmappedLeafInstanceValidator.java
1
请完成以下Java代码
protected List<String> getTenantsOfUser(ProcessEngine engine, String userId) { List<Tenant> tenants = engine.getIdentityService().createTenantQuery() .userMember(userId) .includingGroupsOfUser(true) .list(); List<String> tenantIds = new ArrayList<>(); for(Tenant tenant : tenants) { ...
protected Response unauthorized() { return Response.status(Status.UNAUTHORIZED).build(); } protected Response forbidden() { return Response.status(Status.FORBIDDEN).build(); } protected Response notFound() { return Response.status(Status.NOT_FOUND).build(); } private boolean isWebappsAuthenti...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\auth\UserAuthenticationResource.java
1
请完成以下Java代码
public void saveOrUpdate(final @NonNull OrgId orgId, final BPRelation rel) { final I_C_BP_Relation relation; if (rel.getBpRelationId() != null) { relation = InterfaceWrapperHelper.load(rel.getBpRelationId(), I_C_BP_Relation.class); } else { final Optional<I_C_BP_Relation> bpartnerRelation = getRelati...
} relation.setC_BPartnerRelation_ID(rel.getTargetBPartnerId().getRepoId()); relation.setC_BPartnerRelation_Location_ID(rel.getTargetBPLocationId().getRepoId()); relation.setName(coalesceNotNull(rel.getName(), relation.getName())); relation.setDescription(coalesce(rel.getDescription(), relation.getDescription())...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\bpartner\api\impl\BPRelationDAO.java
1
请完成以下Java代码
public Object getCredentials() { return ""; } /** * Returns the authorization URI. * @return the authorization URI */ public String getAuthorizationUri() { return this.authorizationUri; } /** * Returns the client identifier. * @return the client identifier */ public String getClientId() { retu...
* Returns the state. * @return the state */ @Nullable public String getState() { return this.state; } /** * Returns the requested (or authorized) scope(s). * @return the requested (or authorized) scope(s), or an empty {@code Set} if not * available */ public Set<String> getScopes() { return this.s...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\AbstractOAuth2AuthorizationCodeRequestAuthenticationToken.java
1
请完成以下Java代码
public BigDecimal getRoyaltyAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_RoyaltyAmt); if (bd == null) return Env.ZERO; return bd; } /** Set UPC/EAN. @param UPC Bar Code (Universal Product Code or its superset European Article Number) */ public void setUPC (String UPC) { set_Value...
return (String)get_Value(COLUMNNAME_VendorCategory); } /** Set Partner Product Key. @param VendorProductNo Product Key of the Business Partner */ public void setVendorProductNo (String VendorProductNo) { set_Value (COLUMNNAME_VendorProductNo, VendorProductNo); } /** Get Partner Product Key. @return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_PO.java
1
请完成以下Java代码
public void ignoredSentryWithMissingCondition(String id) { logInfo( "003", "Sentry with id '{}' will be ignored. Reason: Neither ifPart nor onParts are defined with a condition.", id ); } public void ignoredSentryWithInvalidParts(String id) { logInfo("004", "Sentry with id '{}' will b...
public CmmnTransformException nonMatchingVariableEvents(String id) { return new CmmnTransformException(exceptionMessage( "007", "The variableOnPart of the sentry with id '{}' must have one valid variable event. ", id )); } public CmmnTransformException emptyVariableName(String id) { r...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\transformer\CmmnTransformerLogger.java
1
请在Spring Boot框架中完成以下Java代码
public boolean deleteAiModelById( @Parameter( description = "ID of the AI model record", required = true, example = "de7900d4-30e2-11f0-9cd2-0242ac120002" ) @PathVariable UUID modelUuid ) throws ThingsboardException { ...
notes = "Submits a single prompt - made up of an optional system message and a required user message - to the specified AI chat model " + "and returns either the generated answer or an error envelope." + TENANT_AUTHORITY_PARAGRAPH ) @PreAuthorize("hasAuthority('TENANT_ADM...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\controller\AiModelController.java
2
请完成以下Java代码
public class WebAuthnAuthentication extends AbstractAuthenticationToken { @Serial private static final long serialVersionUID = -4879907158750659197L; private final PublicKeyCredentialUserEntity principal; public WebAuthnAuthentication(PublicKeyCredentialUserEntity principal, Collection<? extends GrantedAuthor...
private PublicKeyCredentialUserEntity principal; private Builder(WebAuthnAuthentication token) { super(token); this.principal = token.principal; } /** * Use this principal. It must be of type {@link PublicKeyCredentialUserEntity} * @param principal the principal to use * @return the {@link Builde...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\authentication\WebAuthnAuthentication.java
1
请在Spring Boot框架中完成以下Java代码
class RedisCacheConfiguration { @Bean RedisCacheManager cacheManager(CacheProperties cacheProperties, CacheManagerCustomizers cacheManagerCustomizers, ObjectProvider<org.springframework.data.redis.cache.RedisCacheConfiguration> redisCacheConfiguration, ObjectProvider<RedisCacheManagerBuilderCustomizer> redisCa...
.defaultCacheConfig(); config = config .serializeValuesWith(SerializationPair.fromSerializer(new JdkSerializationRedisSerializer(classLoader))); if (redisProperties.getTimeToLive() != null) { config = config.entryTtl(redisProperties.getTimeToLive()); } if (redisProperties.getKeyPrefix() != null) { conf...
repos\spring-boot-4.0.1\module\spring-boot-cache\src\main\java\org\springframework\boot\cache\autoconfigure\RedisCacheConfiguration.java
2
请完成以下Java代码
protected BigDecimal getBalance() {return BigDecimal.ZERO;} @Override protected List<Fact> createFacts(final AcctSchema as) { if (!AcctSchemaId.equals(as.getId(), costRevaluation.getAcctSchemaId())) { return ImmutableList.of(); } setC_Currency_ID(as.getCurrencyId()); final Fact fact = new Fact(this, ...
fact.createLine() .setDocLine(docLine) .setAccount(docLine.getAccount(ProductAcctType.P_Revenue_Acct, acctSchema)) .setAmtSource(null, costs) // .locatorId(line.getM_Locator_ID()) // N/A atm .buildAndAdd(); } // // Expense // ------------------------------------ // Product Asset ...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc_CostRevaluation.java
1
请完成以下Java代码
public class CompensateEventDefinition extends EventDefinition { protected String activityRef; protected boolean waitForCompletion = true; public String getActivityRef() { return activityRef; } public void setActivityRef(String activityRef) { this.activityRef = activityRef; } ...
public void setWaitForCompletion(boolean waitForCompletion) { this.waitForCompletion = waitForCompletion; } public CompensateEventDefinition clone() { CompensateEventDefinition clone = new CompensateEventDefinition(); clone.setValues(this); return clone; } public void s...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\CompensateEventDefinition.java
1
请完成以下Java代码
public class SequenceFlowImpl extends FlowElementImpl implements SequenceFlow { protected static AttributeReference<FlowNode> sourceRefAttribute; protected static AttributeReference<FlowNode> targetRefAttribute; protected static Attribute<Boolean> isImmediateAttribute; protected static ChildElement<ConditionEx...
} public boolean isImmediate() { return isImmediateAttribute.getValue(this); } public void setImmediate(boolean isImmediate) { isImmediateAttribute.setValue(this, isImmediate); } public ConditionExpression getConditionExpression() { return conditionExpressionCollection.getChild(this); } pu...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\SequenceFlowImpl.java
1
请完成以下Java代码
public DocumentId getId() { return id; } @Override public boolean isProcessed() { return false; } @Nullable @Override public DocumentPath getDocumentPath() { return null; } public ProductId getProductId() { return getProduct().getIdAs(ProductId::ofRepoId); } public String getProductName() { ...
public boolean isMatching(@NonNull final ProductsProposalViewFilter filter) { return Check.isEmpty(filter.getProductName()) || getProductName().toLowerCase().contains(filter.getProductName().toLowerCase()); } public ProductsProposalRow withExistingOrderLine(@Nullable final OrderLine existingOrderLine) { if...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\model\ProductsProposalRow.java
1
请完成以下Java代码
public void setCurrencyRate(BigDecimal CurrencyRate) { if (CurrencyRate == null) { log.warn("was NULL - set to 1"); super.setCurrencyRate(BigDecimal.ONE); } else if (CurrencyRate.signum() < 0) { log.warn("negative - " + CurrencyRate + " - set to 1"); super.setCurrencyRate(BigDecimal.ONE); } e...
super.setAmtAcctCr(AmtAcctCr); } if (rateDR != 0 && rateCR != 0 && rateDR != rateCR) { log.warn("Rates Different DR=" + rateDR + "(used) <> CR=" + rateCR + "(ignored)"); rateCR = 0; } if (rateDR < 0 || Double.isInfinite(rateDR) || Double.isNaN(rateDR)) { log.warn("DR Rate ignored - " + rateDR); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\model\MJournalLine.java
1
请完成以下Java代码
private int toDigit(char hexChar) { int digit = Character.digit(hexChar, 16); if(digit == -1) { throw new IllegalArgumentException("Invalid Hexadecimal Character: "+ hexChar); } return digit; } public String encodeUsingBigIntegerToString(byte[] bytes) { BigIn...
} public String encodeUsingGuava(byte[] bytes) { return BaseEncoding.base16() .encode(bytes); } public byte[] decodeUsingGuava(String hexString) { return BaseEncoding.base16() .decode(hexString.toUpperCase()); } public String encodeUsingHexFormat(byte[] byt...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-1\src\main\java\com\baeldung\algorithms\conversion\HexStringConverter.java
1
请完成以下Java代码
default void monitor(final Runnable runnable, final Metadata metadata) { monitor( () -> { runnable.run(); return null; }, metadata); } void recordElapsedTime(final long duration, TimeUnit unit, final Metadata metadata); @Value @Builder class Metadata { @NonNull Type type; @NonNul...
MODEL_INTERCEPTOR("modelInterceptor"), DOC_ACTION("docAction"), ASYNC_WORKPACKAGE("asyncWorkPackage"), SCHEDULER("scheduler"), EVENTBUS_REMOTE_ENDPOINT("eventbus-remote-endpoint"), REST_CONTROLLER("rest-controller"), REST_CONTROLLER_WITH_WINDOW_ID("rest-controller-with-windowId"), PO("po"), DB("...
repos\metasfresh-new_dawn_uat\backend\de.metas.monitoring\src\main\java\de\metas\monitoring\adapter\PerformanceMonitoringService.java
1
请完成以下Java代码
public class DoublyLinkedList { DoublyLinkedListNode head; DoublyLinkedListNode tail; public void add(Integer data) { DoublyLinkedListNode newNode = new DoublyLinkedListNode(data); if (head == null) { head = newNode; tail = newNode; } else { tail....
sb.append(currentNode.data).append(" - "); currentNode = currentNode.next; } sb.delete(sb.length() - 3, sb.length()); } return sb.toString(); } public static void main(String[] args) { DoublyLinkedList idsList = new DoublyLinkedList(); i...
repos\tutorials-master\core-java-modules\core-java-collections-list-6\src\main\java\com\baeldung\listtostring\DoublyLinkedList.java
1
请完成以下Java代码
public static DeliveryRule ofNullableCode(@Nullable final String code) { return code != null ? ofCode(code) : null; } public static DeliveryRule ofCode(@NonNull final String code) { final DeliveryRule type = typesByCode.get(code); if (type == null) { throw new AdempiereException("No " + DeliveryRule.cla...
public boolean isBasedOnDelivery() { return AVAILABILITY.equals(this) || COMPLETE_ORDER.equals(this) || COMPLETE_LINE.equals(this); } public boolean isAvailability() { return AVAILABILITY.equals(this); } public boolean isForce() { return FORCE.equals(this); } public boolean isManual() { return MAN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\order\DeliveryRule.java
1
请完成以下Java代码
private IOException releaseInflators(IOException exceptionChain) { Deque<Inflater> inflaterCache = this.inflaterCache; if (inflaterCache != null) { try { synchronized (inflaterCache) { inflaterCache.forEach(Inflater::end); } } finally { this.inflaterCache = null; } } return exceptio...
this.zipContent = null; } } return exceptionChain; } private IOException releaseZipContentForManifest(IOException exceptionChain) { ZipContent zipContentForManifest = this.zipContentForManifest; if (zipContentForManifest != null) { try { zipContentForManifest.close(); } catch (IOException ex)...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\jar\NestedJarFileResources.java
1