instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
private Runnable timeoutCallBack(String clientId) { return () -> { log.info("连接超时:{}", clientId); removeUser(clientId); }; } /** * 推送消息异常时,回调方法 * * @param clientId 客户端ID * @return java.util.function.Consumer<java.lang.Throwable> * @author re ...
} } }; } /** * 移除用户连接 * * @param clientId 客户端ID * @author re * @date 2021/12/14 **/ private void removeUser(String clientId) { sseCache.remove(clientId); log.info("SseEmitterServiceImpl[removeUser]:移除用户:{}", clientId); } }
repos\spring-boot-quick-master\quick-sse\src\main\java\com\quick\service\SseEmitterServiceImpl.java
2
请完成以下Java代码
public class OrderStatusJAXBConvertersV1 implements OrderStatusServerJAXBConverters { public static final transient OrderStatusJAXBConvertersV1 instance = new OrderStatusJAXBConvertersV1(); private final OrderJAXBConvertersV1 orderConverters; private final ObjectFactory jaxbObjectFactory; private OrderStatusJAXBC...
private static BestellstatusAbfragen castToRequestFromClient(final Object soapRequestObj) { final BestellstatusAbfragen soapRequest = (BestellstatusAbfragen)soapRequestObj; return soapRequest; } @Override public JAXBElement<BestellstatusAbfragenResponse> encodeResponseToClient(final OrderStatusResponse respons...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.commons\src\main\java\de\metas\vertical\pharma\msv3\protocol\order\v1\OrderStatusJAXBConvertersV1.java
1
请完成以下Java代码
public class OrderMainLocationAdapter implements IDocumentLocationAdapter, RecordBasedLocationAdapter<OrderMainLocationAdapter> { private final I_C_Order delegate; OrderMainLocationAdapter(@NonNull final I_C_Order delegate) { this.delegate = delegate; } @Override public int getC_BPartner_ID() { return de...
} @Override public void setBPartnerAddress(String address) { delegate.setBPartnerAddress(address); } @Override public void setRenderedAddressAndCapturedLocation(final @NonNull RenderedAddressAndCapturedLocation from) { IDocumentLocationAdapter.super.setRenderedAddressAndCapturedLocation(from); } @Overri...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\location\adapter\OrderMainLocationAdapter.java
1
请完成以下Java代码
public List<Customer> findCustomersByTenantIdAndIds(TenantId tenantId, List<CustomerId> customerIds) { log.trace("Executing findCustomersByTenantIdAndIds, tenantId [{}], customerIds [{}]", tenantId, customerIds); return customerDao.findCustomersByTenantIdAndIds(tenantId.getId(), customerIds.stream().map...
@Override public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) { return Optional.ofNullable(findCustomerById(tenantId, new CustomerId(entityId.getId()))); } @Override public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId entityId) { re...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\customer\CustomerServiceImpl.java
1
请在Spring Boot框架中完成以下Java代码
private String getPubKey() { // 如果本地没有密钥,就从授权服务器中获取 return StringUtils.isEmpty(resourceServerProperties.getJwt().getKeyValue()) ? getKeyFromAuthorizationServer() : resourceServerProperties.getJwt().getKeyValue(); } /** * 本地没有公钥的时候,从服务器上获取 * 需要进行 Basic 认证 * * @return public k...
JSONObject body = objectMapper.readValue(pubKey, JSONObject.class); log.info("Get Key From Authorization Server."); return body.getStr("value"); } catch (IOException e) { log.error("Get public key error: {}", e.getMessage()); } return null; } /** ...
repos\spring-boot-demo-master\demo-oauth\oauth-resource-server\src\main\java\com\xkcoding\oauth\config\OauthResourceTokenConfig.java
2
请完成以下Java代码
protected ContextSource getContextSource() { return this.contextSource; } public String[] getUserAttributes() { return this.userAttributes; } /** * Builds list of possible DNs for the user, worked out from the * <tt>userDnPatterns</tt> property. * @param username the user's login name * @return the li...
Assert.notNull(userAttributes, "The userAttributes property cannot be set to null"); this.userAttributes = userAttributes; } /** * Sets the pattern which will be used to supply a DN for the user. The pattern should * be the name relative to the root DN. The pattern argument {0} will contain the * username. A...
repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\authentication\AbstractLdapAuthenticator.java
1
请完成以下Java代码
public List benchmarkStringIndexOf() { int pos = 0, end; while ((end = longString.indexOf(' ', pos)) >= 0) { stringSplit.add(longString.substring(pos, end)); pos = end + 1; } //Add last token of string stringSplit.add(longString.substring(pos)); re...
@Benchmark public boolean benchmarkStringMatches() { return longString.matches(baeldung); } @Benchmark public boolean benchmarkPrecompiledMatches() { return longPattern.matcher(baeldung).matches(); } @Benchmark public int benchmarkStringCompareTo() { return longStri...
repos\tutorials-master\core-java-modules\core-java-strings\src\main\java\com\baeldung\stringperformance\StringPerformance.java
1
请完成以下Java代码
private static AccountId setValuesAndSave( @NonNull final I_C_ValidCombination vc, @NonNull final AccountDimension dimension) { vc.setAD_Org_ID(dimension.getAD_Org_ID()); vc.setC_AcctSchema_ID(AcctSchemaId.toRepoId(dimension.getAcctSchemaId())); vc.setAccount_ID(dimension.getC_ElementValue_ID()); vc.setC...
vc.setC_Activity_ID(dimension.getC_Activity_ID()); vc.setUser1_ID(dimension.getUser1_ID()); vc.setUser2_ID(dimension.getUser2_ID()); vc.setUserElement1_ID(dimension.getUserElement1_ID()); vc.setUserElement2_ID(dimension.getUserElement2_ID()); vc.setUserElementString1(dimension.getUserElementString1()); vc.s...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\api\impl\AccountDAO.java
1
请完成以下Spring Boot application配置
spring.datasource.url=jdbc:mysql://localhost:3306/springjdbc spring.datasource.username=guest_user spring.datasource.password=guest_password spring.jp
a.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
repos\tutorials-master\persistence-modules\spring-persistence-simple\src\main\resources\com\baeldung\spring\jdbc\template\guide\application-mysql.properties
2
请完成以下Java代码
public Object getPersistentState() { // details are not updatable so we always provide the same object as the state return HistoricDetailEntity.class; } public void delete() { DbSqlSession dbSqlSession = Context .getCommandContext() .getDbSqlSession(); ...
@Override public String getTaskId() { return taskId; } public void setTaskId(String taskId) { this.taskId = taskId; } @Override public String getExecutionId() { return executionId; } public void setExecutionId(String executionId) { this.executionId = ex...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricDetailEntity.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } /** * DefaultAuthenticationMethod AD_Reference_ID=541848 * Reference name: MobileAuthenticationMethod */ public static final int DEFAULTAUTHENTICATIONMETHOD_AD_Reference_ID=541848; ...
public java.lang.String getDefaultAuthenticationMethod() { return get_ValueAsString(COLUMNNAME_DefaultAuthenticationMethod); } @Override public void setMobileConfiguration_ID (final int MobileConfiguration_ID) { if (MobileConfiguration_ID < 1) set_ValueNoCheck (COLUMNNAME_MobileConfiguration_ID, null); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MobileConfiguration.java
1
请完成以下Java代码
public String getInfoName() { return infoName; } // getInfoName public Operator getOperator() { return operator; } /** * Get Info Operator * * @return info Operator */ public String getInfoOperator() { return operator == null ? null : operator.getCaption(); } // getInfoOperator /** * Get Di...
StringBuilder sb = new StringBuilder(infoDisplay); sb.append(" - ").append(infoDisplayTo); return sb.toString(); } // getInfoDisplay public Object getCode() { return code; } public String getInfoDisplay() { return infoDisplay; } public Object getCodeTo() { return codeTo; } public String getInfo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MQuery.java
1
请完成以下Java代码
private static int findPlaceholderEndIndex(CharSequence buf, int startIndex) { int index = startIndex + PLACEHOLDER_PREFIX.length(); int withinNestedPlaceholder = 0; while (index < buf.length()) { if (substringMatch(buf, index, PLACEHOLDER_SUFFIX)) { if (withinNestedPlaceholder > 0) { withinNestedPlac...
index++; } } return -1; } private static boolean substringMatch(CharSequence str, int index, CharSequence substring) { for (int j = 0; j < substring.length(); j++) { int i = index + j; if (i >= str.length() || str.charAt(i) != substring.charAt(j)) { return false; } } return true; } }
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\launch\SystemPropertyUtils.java
1
请完成以下Java代码
void sendRequests() { // prepare the response callback final StreamObserver<HelloWorldResponse> responseObserver = new StreamObserver<HelloWorldResponse>() { @Override public void onNext(HelloWorldResponse helloWorldResponse) { log.info("Hello World Response: {}",...
}; // connect to the server final StreamObserver<HelloWorldRequest> request = stub.sayHello(responseObserver); // send multiple requests (streaming) Stream.of("Tom", "Julia", "Baeldung", "", "Ralf") .map(HelloWorldRequest.newBuilder()::setName) .map(HelloW...
repos\tutorials-master\spring-boot-modules\spring-boot-3-grpc\helloworld-grpc-consumer\src\main\java\com\baeldung\helloworld\consumer\HelloWorldClient.java
1
请完成以下Java代码
public String getLastName() { return lastName; } @Override public void setLastName(String lastName) { this.lastName = lastName; } @Override public String getEmail() { return email; } @Override public void setEmail(String email) { this.email = email; } @Override public String ...
} @Override public void setPassword(String password) { this.password = password; } @Override public String toString() { return joinOn(this.getClass()) .add("id=" + id) .add("firstName=" + firstName) .add("lastName=" + lastName) .add("email=" + email) .add("password=****...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\AdminUserProperty.java
1
请完成以下Java代码
private void setASI(final int recordId, final KeyNamePair asi) { if (isValidASI(asi)) { recordId2asi.put(recordId, asi.getKey()); } else { recordId2asi.remove(recordId); } } private boolean isValidASI(final KeyNamePair asi) { if (asi == null) { return false; } if (asi.getKey() <= 0) ...
@Override public Object getParameterValue(final int index, final boolean returnValueTo) { return null; } @Override public String[] getWhereClauses(final List<Object> params) { return new String[0]; } @Override public String getText() { return null; } @Override public void save(final Properties ctx...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\InfoProductASIController.java
1
请在Spring Boot框架中完成以下Java代码
public LocalDateTime convert(Instant source) { return LocalDateTime.ofInstant(source, ZoneOffset.UTC); } } @ReadingConverter public enum InstantReadConverter implements Converter<LocalDateTime, Instant> { INSTANCE; @Override public Instant convert(LocalDateTime ...
} } @WritingConverter public enum ZonedDateTimeWriteConverter implements Converter<ZonedDateTime, LocalDateTime> { INSTANCE; @Override public LocalDateTime convert(ZonedDateTime zonedDateTime) { return zonedDateTime.toLocalDateTime(); } } @WritingConver...
repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\config\DatabaseConfiguration.java
2
请完成以下Java代码
public void setMaxValue (int MaxValue) { set_Value (COLUMNNAME_MaxValue, Integer.valueOf(MaxValue)); } /** Get Max Value. @return Max Value */ public int getMaxValue () { Integer ii = (Integer)get_Value(COLUMNNAME_MaxValue); if (ii == null) return 0; return ii.intValue(); } /** Set Min Value. ...
/** Get Service date. @return Date service was provided */ public Timestamp getServiceDate () { return (Timestamp)get_Value(COLUMNNAME_ServiceDate); } /** Set Text Message. @param TextMsg Text Message */ public void setTextMsg (String TextMsg) { set_Value (COLUMNNAME_TextMsg, TextMsg); } /**...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Attribute.java
1
请在Spring Boot框架中完成以下Java代码
public Filter addMissingHeadersFilter() { return new Filter() { @Override public void init(final FilterConfig filterConfig) { } @Override public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException { try ...
// If the Cache-Control is not set then set it to no-cache. // In this way we precisely tell to browser that it shall not cache our REST calls. // The Cache-Control is usually defined by features like ETag if (!httpResponse.containsHeader("Cache-Control")) { httpResponse.setHeader("Cache-...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\config\WebConfig.java
2
请完成以下Java代码
private GenericZoomIntoTableInfo retrieveTableInfo(@NonNull final TableInfoCacheKey key) { return tableInfoRepository.retrieveTableInfo(key.getTableName(), key.isIgnoreExcludeFromZoomTargetsFlag()) .withCustomizedWindowIds(customizedWindowInfoMapRepository.get()); } private SOTrx getRecordSOTrxEffective() { ...
return Optional.of(parentRecordRef); } catch (final Exception ex) { logger.warn("Failed retrieving parent record ID from current record. Returning empty. \n\tthis={} \n\tSQL: {}", this, sql, ex); return Optional.empty(); } } @NonNull private static CustomizedWindowInfoMapRepository getCustomizedWindow...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\references\zoom_into\RecordWindowFinder.java
1
请完成以下Java代码
public EventDefinitionEntity findEventDefinitionByKeyAndVersionAndTenantId(String eventDefinitionKey, Integer eventVersion, String tenantId) { Map<String, Object> params = new HashMap<>(); params.put("eventDefinitionKey", eventDefinitionKey); params.put("eventVersion", eventVersion); par...
@Override public long findEventDefinitionCountByNativeQuery(Map<String, Object> parameterMap) { return (Long) getDbSqlSession().selectOne("selectEventDefinitionCountByNativeQuery", parameterMap); } @Override public void updateEventDefinitionTenantIdForDeployment(String deploymentId, String newT...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\persistence\entity\data\impl\MybatisEventDefinitionDataManager.java
1
请在Spring Boot框架中完成以下Java代码
public String getScopeId() { return scopeId; } public void setScopeId(String scopeId) { this.scopeId = scopeId; } public Boolean getWithoutScopeId() { return withoutScopeId; } public void setWithoutScopeId(Boolean withoutScopeId) { this.withoutScopeId = without...
} public boolean isIgnoreTaskAssignee() { return ignoreTaskAssignee; } public void setIgnoreTaskAssignee(boolean ignoreTaskAssignee) { this.ignoreTaskAssignee = ignoreTaskAssignee; } public String getRootScopeId() { return rootScopeId; } public void setRootScopeId...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricTaskInstanceQueryRequest.java
2
请完成以下Java代码
private DeliveryOrder updateDeliveryOrder(final @NonNull DeliveryOrder deliveryOrder, @NonNull final JsonDeliveryResponse response) { final ImmutableMap<String, JsonDeliveryResponseItem> lineIdToResponseMap = response.getItems().stream() .collect(ImmutableMap.toImmutableMap(JsonDeliveryResponseItem::getLineId, F...
.map(line -> createPackageLabel(line.getLabelPdfBase64(), line.getAwb(), orderIdAsString)) .collect(Collectors.toList()); } @Override public @NonNull JsonDeliveryAdvisorResponse adviseShipment(final @NonNull JsonDeliveryAdvisorRequest request) { return shipAdvisorService.advise(request); } @NonNull priva...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.nshift\src\main\java\de\metas\shipper\gateway\nshift\client\NShiftShipperGatewayClient.java
1
请完成以下Java代码
public void setMessageConverter(MessageConverter messageConverter) { super.setMessageConverter(messageConverter); this.messageConverter = messageConverter; } @Override public void setValidator(Validator validator) { super.setValidator(validator); this.validator = validator; } @Override protected List<Ha...
} // Has to be at the end - look at PayloadMethodArgumentResolver documentation resolvers.add(resolvers.size() - 1, new KafkaNullAwarePayloadArgumentResolver(this.messageConverter, this.validator)); this.argumentResolvers.addResolvers(resolvers); return resolvers; } @Override public InvocableHandlerMethod c...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\adapter\KafkaMessageHandlerMethodFactory.java
1
请完成以下Java代码
public boolean isExclusive() { return exclusive; } public void setExclusive(boolean exclusive) { this.exclusive = exclusive; } public String getPriority() { return priority; } public void setPriority(String priority) { this.priority = priority; } publi...
this.concurrency = concurrency; } public String getExecutor() { return executor; } public void setExecutor(String executor) { this.executor = executor; } public String getAckMode() { return ackMode; } public void setAckMode(String ackMode) { this.ackMo...
repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\RabbitInboundChannelModel.java
1
请完成以下Java代码
public void setM_PackagingTreeItemSched_ID(int M_PackagingTreeItemSched_ID) { if (M_PackagingTreeItemSched_ID < 1) set_ValueNoCheck(COLUMNNAME_M_PackagingTreeItemSched_ID, null); else set_ValueNoCheck(COLUMNNAME_M_PackagingTreeItemSched_ID, Integer.valueOf(M_PackagingTreeItemSched_ID)); } /** * Get Pack...
@Override public int getM_ShipmentSchedule_ID() { Integer ii = (Integer)get_Value(COLUMNNAME_M_ShipmentSchedule_ID); if (ii == null) return 0; return ii.intValue(); } @Override public void setM_ShipmentSchedule_ID(int M_ShipmentSchedule_ID) { if (M_ShipmentSchedule_ID < 1) set_Value(COLUMNNAME_M_Sh...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\compiere\model\X_M_PackagingTreeItemSched.java
1
请完成以下Java代码
default <ST> RT addNotInSubQueryFilter(final String columnName, final String subQueryColumnName, final IQuery<ST> subQuery) { final IQueryFilter<T> filter = InSubQueryFilter.<T>builder() .tableName(getModelTableName()) .subQuery(subQuery) .matchingColumnNames(columnName, subQueryColumnName) .build();...
} default RT addIntervalIntersection( @NonNull final String lowerBoundColumnName, @NonNull final String upperBoundColumnName, @Nullable final ZonedDateTime lowerBoundValue, @Nullable final ZonedDateTime upperBoundValue) { addIntervalIntersection( lowerBoundColumnName, upperBoundColumnName, ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\ICompositeQueryFilterProxy.java
1
请完成以下Java代码
public static String sentenceCase(List<String> words) { List<String> capitalized = new ArrayList<>(); for (int i = 0; i < words.size(); i++) { String currentWord = words.get(i); if (i == 0) { capitalized.add(capitalizeFirst(currentWord)); } else { ...
for (int i = 0; i < words.size(); i++) { String currentWord = words.get(i); if (i == 0 || !STOP_WORDS.contains(currentWord.toLowerCase())) { capitalized.add(capitalizeFirst(currentWord)); } else { capitalized.add(currentWord.toLowerCase()); ...
repos\tutorials-master\core-java-modules\core-java-regex-2\src\main\java\com\baeldung\regex\camelcasetowords\Recapitalize.java
1
请完成以下Java代码
public boolean deleteByIdAndRecipientId(TenantId tenantId, UserId recipientId, NotificationId notificationId) { return notificationRepository.deleteByIdAndRecipientId(notificationId.getId(), recipientId.getId()) != 0; } @Override public int updateStatusByDeliveryMethodAndRecipientId(TenantId tenant...
@Override protected Class<NotificationEntity> getEntityClass() { return NotificationEntity.class; } @Override protected JpaRepository<NotificationEntity, UUID> getRepository() { return notificationRepository; } @Override public EntityType getEntityType() { return En...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\notification\JpaNotificationDao.java
1
请在Spring Boot框架中完成以下Java代码
public class ErpelDocumentExtensionType { @XmlElement(name = "Attachments") protected AttachmentsType attachments; /** * Gets the value of the attachments property. * * @return * possible object is * {@link AttachmentsType } * */ public AttachmentsType ...
} /** * Sets the value of the attachments property. * * @param value * allowed object is * {@link AttachmentsType } * */ public void setAttachments(AttachmentsType value) { this.attachments = value; } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ext\ErpelDocumentExtensionType.java
2
请完成以下Java代码
public List<Employee> getAllEmployeesUsingWrapperClass() { RestTemplate restTemplate = new RestTemplate(); EmployeeList response = restTemplate.getForObject( "http://localhost:8080/spring-rest/employees/v2", EmployeeList.class); L...
"http://localhost:8080/spring-rest/employees/", newEmployees, ResponseEntity.class); } public void createEmployeesUsingWrapperClass() { RestTemplate restTemplate = new RestTemplate(); List<Employee> newEmployees = new ArrayList<>(); newEmployees.add(new ...
repos\tutorials-master\spring-web-modules\spring-resttemplate-1\src\main\java\com\baeldung\resttemplate\lists\client\EmployeeClient.java
1
请在Spring Boot框架中完成以下Java代码
public String getRefundStatus() { return refundStatus; } public void setRefundStatus(String refundStatus) { this.refundStatus = refundStatus; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Ord...
return Objects.hash(amount, refundDate, refundId, refundReferenceId, refundStatus); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderRefund {\n"); sb.append(" amount: ").append(toIndentedString(amount)).append("\n"); sb.append(" refundDate: ").appen...
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\OrderRefund.java
2
请完成以下Java代码
public static void bulkDeleteHistoricCaseInstances(Collection<String> caseInstanceIds, CmmnEngineConfiguration cmmnEngineConfiguration) { HistoricCaseInstanceEntityManager historicCaseInstanceEntityManager = cmmnEngineConfiguration.getHistoricCaseInstanceEntityManager(); HistoricMilestoneInstanceEntity...
historicVariableInstanceEntityManager.bulkDeleteHistoricVariableInstancesByScopeIdsAndScopeType(caseInstanceIds, ScopeTypes.CMMN); TaskHelper.bulkDeleteHistoricTaskInstancesByCaseInstanceIds(caseInstanceIds, cmmnEngineConfiguration); historicCaseInstanceEntityManager.bulkDeleteHistoricCaseInstances(ca...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\history\CmmnHistoryHelper.java
1
请完成以下Java代码
private static final ArrayKey buildCacheKey(final Properties ctx) { return new ArrayKey( Env.getAD_Client_ID(ctx), Env.getAD_Role_ID(ctx), Env.getAD_User_ID(ctx), Env.getAD_Language(ctx)); } /** * Method used to compare if to contexts are considered to be equal from caching perspective. * Equa...
* @return true if given contexts shall be considered equal from caching perspective */ public static final boolean isSameCtx(final Properties ctx1, final Properties ctx2) { if (ctx1 == ctx2) { return true; } if (ctx1 == null || ctx2 == null) { return false; } return buildCacheKey(ctx1).equals(b...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\interceptor\CacheCtxParamDescriptor.java
1
请完成以下Java代码
public Class<? extends BaseElement> getHandledType() { return IntermediateCatchEvent.class; } @Override protected void executeParse(BpmnParse bpmnParse, IntermediateCatchEvent event) { ActivityImpl nestedActivity = null; EventDefinition eventDefinition = null; if (!event.ge...
nestedActivity.setAsync(event.isAsynchronous()); nestedActivity.setExclusive(!event.isNotExclusive()); // Catch event behavior is the same for all types nestedActivity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createIntermediateCatchEventActivityBehavior(event)); ...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\handler\IntermediateCatchEventParseHandler.java
1
请在Spring Boot框架中完成以下Java代码
public AuthorizationManagerAfterMethodInterceptor getObject() { AuthorizationManager<MethodInvocationResult> manager = this.manager; if (!this.observationRegistry.isNoop()) { manager = new ObservationAuthorizationManager<>(this.observationRegistry, this.manager); } AuthorizationManagerAfterMethodInterce...
@Override public SecurityContextHolderStrategy getObject() throws Exception { return SecurityContextHolder.getContextHolderStrategy(); } @Override public Class<?> getObjectType() { return SecurityContextHolderStrategy.class; } } static class ObservationRegistryFactory implements FactoryBean<Observa...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\method\MethodSecurityBeanDefinitionParser.java
2
请完成以下Java代码
private static ImmutableAttributeSet extractAttributeSet(@NonNull HUQRCode huQRCode) { final ImmutableList<HUQRCodeAttribute> huQRCodeAttributes = huQRCode.getAttributes(); if (huQRCodeAttributes.isEmpty()) { return ImmutableAttributeSet.EMPTY; } final ImmutableAttributeSet.Builder builder = ImmutableAtt...
{ return huProductStorages.get(0); } else { throw new AdempiereException("Multi product storage is not handled"); } } private DocTypeId getInventoryDocTypeId(@NonNull final ClientAndOrgId clientAndOrgId) { return docTypeDAO.getDocTypeId(DocTypeQuery.builder() .docBaseType(DocBaseType.MaterialPhy...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUQtyService.java
1
请完成以下Java代码
protected void checkInvalidDefinitionId(String definitionId) { ensureNotNull("Invalid case definition id", "caseDefinitionId", definitionId); } @Override protected void checkDefinitionFound(String definitionId, CaseDefinitionEntity definition) { ensureNotNull(CaseDefinitionNotFoundException.class, "no de...
ensureNotNull(CaseDefinitionNotFoundException.class, "no case definition deployed with key = '" + definitionKey + "', version = '" + definitionVersion + "'" + " and tenant-id = '" + tenantId + "'", "caseDefinition", definition); } @Override protected void checkInvalidDefinitionByKeyVersionTagAndTenantId(...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\deploy\cache\CaseDefinitionCache.java
1
请完成以下Java代码
public void logout(HttpServletRequest request, HttpServletResponse response, @Nullable Authentication authentication) { super.logout(request, response, authentication); if (authentication != null) { this.tokenRepository.removeUserTokens(authentication.getName()); } } protected String generateSeriesData()...
response); } public void setSeriesLength(int seriesLength) { this.seriesLength = seriesLength; } public void setTokenLength(int tokenLength) { this.tokenLength = tokenLength; } @Override public void setTokenValiditySeconds(int tokenValiditySeconds) { Assert.isTrue(tokenValiditySeconds > 0, "tokenValidit...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\rememberme\PersistentTokenBasedRememberMeServices.java
1
请完成以下Java代码
public void setHU_BestBeforeDate (final @Nullable java.sql.Timestamp HU_BestBeforeDate) { set_ValueNoCheck (COLUMNNAME_HU_BestBeforeDate, HU_BestBeforeDate); } @Override public java.sql.Timestamp getHU_BestBeforeDate() { return get_ValueAsTimestamp(COLUMNNAME_HU_BestBeforeDate); } @Override public void s...
@Override public java.sql.Timestamp getHU_ExpiredWarnDate() { return get_ValueAsTimestamp(COLUMNNAME_HU_ExpiredWarnDate); } @Override public void setM_HU_ID (final int M_HU_ID) { if (M_HU_ID < 1) set_ValueNoCheck (COLUMNNAME_M_HU_ID, null); else set_ValueNoCheck (COLUMNNAME_M_HU_ID, M_HU_ID); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_BestBefore_V.java
1
请在Spring Boot框架中完成以下Java代码
class TemplateEngineConfigurations { @Configuration(proxyBeanMethods = false) static class DefaultTemplateEngineConfiguration { @Bean @ConditionalOnMissingBean(ISpringTemplateEngine.class) SpringTemplateEngine templateEngine(ThymeleafProperties properties, ObjectProvider<ITemplateResolver> templateResolve...
@Bean @ConditionalOnMissingBean(ISpringWebFluxTemplateEngine.class) SpringWebFluxTemplateEngine templateEngine(ThymeleafProperties properties, ObjectProvider<ITemplateResolver> templateResolvers, ObjectProvider<IDialect> dialects) { SpringWebFluxTemplateEngine engine = new SpringWebFluxTemplateEngine(); e...
repos\spring-boot-4.0.1\module\spring-boot-thymeleaf\src\main\java\org\springframework\boot\thymeleaf\autoconfigure\TemplateEngineConfigurations.java
2
请在Spring Boot框架中完成以下Java代码
public static class LU { @NonNull @Getter(AccessLevel.NONE) I_M_HU hu; @NonNull TUsList tus; boolean isPreExistingLU; public static LU of(@NonNull final I_M_HU lu, @NonNull final TU... tus) { return builder().hu(lu).tus(TUsList.of(tus)).build(); } public static LU of(@NonNull final I_M_HU lu, @NonNu...
return list1; } if (list1.isEmpty()) { return list2; } else { final HashMap<HuId, LU> lusNew = new HashMap<>(); list1.forEach(lu -> lusNew.put(lu.getId(), lu)); list2.forEach(lu -> lusNew.compute(lu.getId(), (luId, existingLU) -> existingLU == null ? lu : existingLU.mergeWith(lu))); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\LUTUResult.java
2
请完成以下Java代码
public ImmutableList<I_PP_OrderCandidate_PP_Order> getPPOrderAllocations(@NonNull final PPOrderId ppOrderId) { return queryBL .createQueryBuilder(I_PP_OrderCandidate_PP_Order.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_PP_OrderCandidate_PP_Order.COLUMNNAME_PP_Order_ID, ppOrderId.getRepoId()) ...
final ManufacturingOrderQuery query = ManufacturingOrderQuery.builder() .bomVersionsId(bomVersionsId) .onlyDrafted(true) .build(); final IQueryBuilder<I_PP_Order> ppOrderQueryBuilder = toSqlQueryBuilder(query); //dev-note: make sure there are no material transactions already created final IQuery<I_P...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\impl\PPOrderDAO.java
1
请完成以下Java代码
public Set<DocumentPath> getReferencingDocumentPaths() { return ImmutableSet.of(); } /** * Always returns {@link I_M_PickingSlot#Table_Name} */ @Override public String getTableNameOrNull(@Nullable final DocumentId ignored) { return I_M_PickingSlot.Table_Name; } @Override public ViewId getParentViewId...
@Override public SqlViewRowsWhereClause getSqlWhereClause(final DocumentIdsSelection rowIds, final SqlOptions sqlOpts) { // TODO Auto-generated method stub return null; } @Override public <T> List<T> retrieveModelsByIds(final DocumentIdsSelection rowIds, final Class<T> modelClass) { throw new UnsupportedOp...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\PickingSlotView.java
1
请在Spring Boot框架中完成以下Java代码
public void configure(HttpSecurity http) throws Exception { // @formatter:off http .requestMatchers().antMatchers("/me") .and() .authorizeRequests() .antMatchers("/me").access("#oauth2.hasScope('read')"); // @formatter:on } /** * Id of the resou...
* * So suppose you have 2 APIs, then you can define 2 resource servers. * <ol> * <li>Client 1 has been configured for access to resourceid1, so he can * only access "api1" if the resource server configures the resourceid to * "api1".</li> * <li>Client 1 can't access resource server 2 since it has configure...
repos\spring-boot-microservices-master\auth-server\src\main\java\com\rohitghatol\microservice\auth\config\ResourceServerConfiguration.java
2
请完成以下Java代码
public void setDD_OrderLine(final org.eevolution.model.I_DD_OrderLine DD_OrderLine) { set_ValueFromPO(COLUMNNAME_DD_OrderLine_ID, org.eevolution.model.I_DD_OrderLine.class, DD_OrderLine); } @Override public void setDD_OrderLine_ID (final int DD_OrderLine_ID) { if (DD_OrderLine_ID < 1) set_ValueNoCheck (CO...
@Override public void setQtyDelivered (final BigDecimal QtyDelivered) { set_Value (COLUMNNAME_QtyDelivered, QtyDelivered); } @Override public BigDecimal getQtyDelivered() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyDelivered); return bd != null ? bd : BigDecimal.ZERO; } @Override publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_OrderLine_Alternative.java
1
请完成以下Java代码
public int getM_HU_PI_Item_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_PI_Item_ID); } @Override public void setQty (final @Nullable BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty);
return bd != null ? bd : BigDecimal.ZERO; } @Override public void setSnapshot_UUID (final java.lang.String Snapshot_UUID) { set_Value (COLUMNNAME_Snapshot_UUID, Snapshot_UUID); } @Override public java.lang.String getSnapshot_UUID() { return get_ValueAsString(COLUMNNAME_Snapshot_UUID); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Item_Snapshot.java
1
请完成以下Java代码
public void setEventType (java.lang.String EventType) { set_Value (COLUMNNAME_EventType, EventType); } /** Get Ereignisart. @return Ereignisart */ @Override public java.lang.String getEventType () { return (java.lang.String)get_Value(COLUMNNAME_EventType); } /** Set Kommentar/Hilfe. @param Help ...
public static final String RULETYPE_SQL = "Q"; /** Set Rule Type. @param RuleType Rule Type */ @Override public void setRuleType (java.lang.String RuleType) { set_Value (COLUMNNAME_RuleType, RuleType); } /** Get Rule Type. @return Rule Type */ @Override public java.lang.String getRuleType () { r...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Rule.java
1
请在Spring Boot框架中完成以下Java代码
protected void configure(HttpSecurity http) throws Exception { http.csrf().disable() //因为使用JWT,所以不需要HttpSession .sessionManagement().sessionCreationPolicy( SessionCreationPolicy.STATELESS).and() .authorizeRequests() //OPTIONS请求全部放行 ...
} @Bean public JwtTokenFilter authenticationTokenFilterBean() throws Exception { return new JwtTokenFilter(); } @Bean @Override public AuthenticationManager authenticationManagerBean() throws Exception { return super.authenticationManagerBean(); } }
repos\SpringBootLearning-master (1)\springboot-jwt\src\main\java\com\gf\config\SecurityConfig.java
2
请完成以下Java代码
public BigDecimal getQtyTU() { return Quantitys.toBigDecimalOrNull(olCandEffectiveValuesBL.getQtyItemCapacity_Effective(olCand)); } @Override public void setQtyTU(final BigDecimal qtyPacks) { values.setQtyTU(qtyPacks); } @Override public int getC_BPartner_ID() { final BPartnerId bpartnerId = olCandEffe...
{ olCand.setC_BPartner_Override_ID(partnerId); values.setBpartnerId(BPartnerId.ofRepoIdOrNull(partnerId)); } @Override public boolean isInDispute() { // order line has no IsInDispute flag return values.isInDispute(); } @Override public void setInDispute(final boolean inDispute) { values.setInDispute...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\OLCandHUPackingAware.java
1
请完成以下Java代码
public boolean isNoCache() { final Boolean noCache = noCacheRef.get(); return noCache != null && noCache; } @NonNull public IAutoCloseable temporaryDisableCache() { final Boolean noCachePrev = noCacheRef.get(); noCacheRef.set(Boolean.TRUE); return new IAutoCloseable() { boolean closed = false; ...
final boolean anyApplicationDictionaryTableNames = labels.stream().anyMatch(CacheLabel::isApplicationDictionaryTableName); if (!anyApplicationDictionaryTableNames) { return false; } final boolean anyNonApplicationDictionaryTableNames = labels.stream().anyMatch(label -> isNonApplicationDictionaryTableName(la...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\ThreadLocalCacheController.java
1
请完成以下Java代码
public boolean isInheritable() { return false; } /** * @return preference type (see X_AD_Role.PREFERENCETYPE_*) */ public String getPreferenceType() { return preferenceType; } /** * Show (Value) Preference Menu * * @return true if preference type is not {@link #NONE}. */ public boolean isShowP...
return this == ORGANIZATION; } public boolean isUser() { return this == USER; } /** * * @return true if this level allows user to view table record change log (i.e. this level is {@link #CLIENT}) */ public boolean canViewRecordChangeLog() { return isClient(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\UserPreferenceLevelConstraint.java
1
请在Spring Boot框架中完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public String getAction() { return action; } public void setAction(String action) { this.action = action; } public String getUserId() { return userId; } ...
return taskUrl; } public void setTaskUrl(String taskUrl) { this.taskUrl = taskUrl; } @JsonInclude(JsonInclude.Include.NON_NULL) public String getProcessInstanceUrl() { return processInstanceUrl; } public void setProcessInstanceUrl(String processInstanceUrl) { this....
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\engine\EventResponse.java
2
请在Spring Boot框架中完成以下Java代码
public void saveImage(Long bookId, File image) { try (InputStream imageInStream = new FileInputStream(image)) { jdbcTemplate.execute( "INSERT INTO book_image (book_id, filename, blob_image) VALUES (?, ?, ?)", new AbstractLobCreatingPreparedStatementCallback(...
InputStream blob_image_stream = lobHandler.getBlobAsBinaryStream(rs, "blob_image"); // byte array //Map<String, Object> results = new HashMap<>(); //byte[] blobBytes = lobHandler.getBlobAsBytes(rs, "blob_image"); //results....
repos\spring-boot-master\spring-jdbc\src\main\java\com\mkyong\repository\JdbcBookRepository.java
2
请完成以下Java代码
public Boolean getIsUseCommonJWorkManager() { return isUseCommonJWorkManager; } public void setIsUseCommonJWorkManager(Boolean isUseCommonJWorkManager) { this.isUseCommonJWorkManager = isUseCommonJWorkManager; } public String getCommonJWorkManagerName() { return commonJWorkManagerName; } publ...
} @Override public boolean equals(Object other) { if (other == null) { return false; } if (other == this) { return true; } if (!(other instanceof JcaExecutorServiceConnector)) { return false; } return true; } }
repos\camunda-bpm-platform-master\javaee\jobexecutor-ra\src\main\java\org\camunda\bpm\container\impl\threading\ra\JcaExecutorServiceConnector.java
1
请完成以下Java代码
public String getState() { return state; } public Date getCreateTime() { return createTime; } public Date getRemovalTime() { return removalTime; } public String getRootProcessInstanceId() { return rootProcessInstanceId; } public static HistoricVariableInstanceDto fromHistoricVariable...
dto.taskId = historicVariableInstance.getTaskId(); dto.tenantId = historicVariableInstance.getTenantId(); dto.state = historicVariableInstance.getState(); dto.createTime = historicVariableInstance.getCreateTime(); dto.removalTime = historicVariableInstance.getRemovalTime(); dto.rootProcessInstanceId...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricVariableInstanceDto.java
1
请在Spring Boot框架中完成以下Java代码
public class Book implements Serializable { private static final long serialVersionUID = 1L; @Id private Long id; private String title; private String isbn; private String genre; public Long getId() { return id; } public void setId(Long id) { this.id = id; } ...
} public void setIsbn(String isbn) { this.isbn = isbn; } public String getGenre() { return genre; } public void setGenre(String genre) { this.genre = genre; } @Override public String toString() { return "Book{" + "id=" + id + ", title=" + title ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootAvoidEntityInDtoViaConstructor\src\main\java\com\bookstore\entity\Book.java
2
请在Spring Boot框架中完成以下Java代码
public class ACLContext { @Autowired DataSource dataSource; @Bean public SpringCacheBasedAclCache aclCache() { final ConcurrentMapCache aclCache = new ConcurrentMapCache("acl_cache"); return new SpringCacheBasedAclCache(aclCache, permissionGrantingStrategy(), aclAuthorizationStrategy()...
@Bean public MethodSecurityExpressionHandler defaultMethodSecurityExpressionHandler() { DefaultMethodSecurityExpressionHandler expressionHandler = new DefaultMethodSecurityExpressionHandler(); AclPermissionEvaluator permissionEvaluator = new AclPermissionEvaluator(aclService()); expressionHa...
repos\tutorials-master\spring-security-modules\spring-security-acl\src\main\java\com\baeldung\acl\config\ACLContext.java
2
请完成以下Java代码
protected static DefaultDecisionRequirementsDiagramCanvas initDecisionRequirementsDiagramCanvas(DmnDefinition dmnDefinition, String imageType, String activityFontName, String labelFontName, String annotationFontName, ClassLoader customClassLoader) { // We need to calculate maximum values to know ho...
} public Map<Class<? extends NamedElement>, ActivityDrawInstruction> getElementDrawInstructions() { return elementDrawInstructions; } public void setElementDrawInstructions( Map<Class<? extends NamedElement>, ActivityDrawInstruction> elementDrawInstructions) { this.elementDrawI...
repos\flowable-engine-main\modules\flowable-dmn-image-generator\src\main\java\org\flowable\dmn\image\impl\DefaultDecisionRequirementsDiagramGenerator.java
1
请完成以下Java代码
private HttpMessageConverter<Object> createXmlHttpMessageConverter() { final MarshallingHttpMessageConverter xmlConverter = new MarshallingHttpMessageConverter(); final XStreamMarshaller xstreamMarshaller = new XStreamMarshaller(); xmlConverter.setMarshaller(xstreamMarshaller); xmlConve...
public FilterRegistrationBean<ShallowEtagHeaderFilter> shallowEtagHeaderFilter() { FilterRegistrationBean<ShallowEtagHeaderFilter> filterRegistrationBean = new FilterRegistrationBean<>(new ShallowEtagHeaderFilter()); filterRegistrationBean.addUrlPatterns("/foos/*"); filterRegistrationB...
repos\tutorials-master\spring-web-modules\spring-boot-rest\src\main\java\com\baeldung\spring\WebConfig.java
1
请完成以下Java代码
public boolean equals(Object obj) { if (this == obj) { return true; } if(obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final IdBook other = (IdBook) obj;
if (!Objects.equals(this.id, other.id)) { return false; } return true; } @Override public int hashCode() { int hash = 3; hash = 89 * hash + Objects.hashCode(this.id); return hash; } }
repos\Hibernate-SpringBoot-master\HibernateSpringBootLombokEqualsAndHashCode\src\main\java\com\app\IdBook.java
1
请完成以下Java代码
private long invalidateForRecordNoFail(final TableRecordReference recordRef) { return streamCaches() .mapToLong(cache -> invalidateNoFail(cache, recordRef)) .sum(); } private static long invalidateNoFail(@Nullable final CacheInterface cacheInstance) { try (final IAutoCloseable ignored = CacheMD...
} private static long invalidateNoFail(final CacheInterface cacheInstance, final TableRecordReference recordRef) { try (final IAutoCloseable ignored = CacheMDC.putCache(cacheInstance)) { return cacheInstance.resetForRecordId(recordRef); } catch (final Exception ex) { // log but don't fail ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\CacheMgt.java
1
请在Spring Boot框架中完成以下Java代码
public class SpringBootAdminWarApplication extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(SpringBootAdminWarApplication.class, args); } @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application; } ...
private final AdminServerProperties adminServer; public SecuritySecureConfig(AdminServerProperties adminServer) { this.adminServer = adminServer; } @Bean protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { SavedRequestAwareAuthenticationSuccessHandler successHandler = new Sav...
repos\spring-boot-admin-master\spring-boot-admin-samples\spring-boot-admin-sample-war\src\main\java\de\codecentric\boot\admin\sample\SpringBootAdminWarApplication.java
2
请完成以下Java代码
private long benchMarkMergeMethod() { long startTime = System.nanoTime(); IncrementMapValueWays im = new IncrementMapValueWays(); im.charFrequencyUsingMerge(getString()); long endTime = System.nanoTime(); return endTime - startTime; } private long benchMarkGetOrDefaultMe...
private String getString() { return "Once upon a time in a quaint village nestled between rolling hills and whispering forests, there lived a solitary storyteller named Elias. Elias was known for spinning tales that transported listeners to magical realms and awakened forgotten dreams.\n" ...
repos\tutorials-master\core-java-modules\core-java-collections-maps-7\src\main\java\com\baeldung\map\incrementmapkey\BenchmarkMapMethods.java
1
请完成以下Java代码
public void setCompany(CompanyType value) { this.company = value; } /** * Gets the value of the person property. * * @return * possible object is * {@link PersonType } * */ public PersonType getPerson() { return person; } /** * ...
return specialty; } /** * Sets the value of the specialty property. * * @param value * allowed object is * {@link String } * */ public void setSpecialty(String value) { this.specialty = value; } /** * Gets the value of the uidNumber pro...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\BillerAddressType.java
1
请完成以下Java代码
public void setRetryListeners(RetryListener... listeners) { Assert.noNullElements(listeners, "'listeners' cannot have null elements"); this.retryListeners.clear(); this.retryListeners.addAll(Arrays.asList(listeners)); } @Override public boolean isAckAfterHandle() { return this.ackAfterHandle; } @Override...
} @Override public void onPartitionsAssigned(Consumer<?, ?> consumer, Collection<TopicPartition> partitions, Runnable publishPause) { if (Boolean.TRUE.equals(this.retrying.get(Thread.currentThread()))) { consumer.pause(consumer.assignment()); publishPause.run(); } } private final class SeekAfterReco...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\FallbackBatchErrorHandler.java
1
请完成以下Java代码
protected ProcessPreconditionsResolution checkPreconditionsApplicable() { final DocumentIdsSelection selectedRowIds = getSelectedRowIds(); if (selectedRowIds.isEmpty()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } return ProcessPreconditionsResolution.accept() .withCaptionMap...
} private SqlViewRowsWhereClause getViewSqlWhereClause(@NonNull final DocumentIdsSelection rowIds) { final String invoiceCandidateTableName = I_C_Invoice_Candidate.Table_Name; return getView().getSqlWhereClause(rowIds, SqlOptions.usingTableName(invoiceCandidateTableName)); } protected abstract boolean isAppr...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\invoicecandidate\process\C_Invoice_Candidate_ProcessHelper.java
1
请在Spring Boot框架中完成以下Java代码
public class StudentVersioningController { @GetMapping("v1/student") public StudentV1 studentV1() { return new StudentV1("Bob Charlie"); } @GetMapping("v2/student") public StudentV2 studentV2() { return new StudentV2(new Name("Bob", "Charlie")); } @GetMapping(value = "/stu...
return new StudentV1("Bob Charlie"); } @GetMapping(value = "/student/header", headers = "X-API-VERSION=2") public StudentV2 headerV2() { return new StudentV2(new Name("Bob", "Charlie")); } @GetMapping(value = "/student/produces", produces = "application/vnd.company.app-v1+json") public...
repos\spring-boot-examples-master\spring-boot-2-rest-service-versioning\src\main\java\com\in28minutes\springboot\rest\example\versioning\StudentVersioningController.java
2
请完成以下Java代码
public de.metas.dataentry.model.I_DataEntry_Section getDataEntry_Section() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_DataEntry_Section_ID, de.metas.dataentry.model.I_DataEntry_Section.class); } @Override public void setDataEntry_Section(de.metas.dataentry.model.I_DataEntry_Section DataEntry_Secti...
/** Set Reihenfolge. @param SeqNo Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst */ @Override public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Reihenfolge. @return Zur Bestimmung der Reihenfolge der Einträge; die kleinste Z...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_DataEntry_Line.java
1
请在Spring Boot框架中完成以下Java代码
public ApplicationRunner runner1(ApplicationContext applicationContext) { return args -> { // tag::getBeans[] applicationContext.getBean(MyPojo.class, "one", "topic2"); applicationContext.getBean(MyPojo.class, "two", "topic3"); // end::getBeans[] }; } // tag::create[] private ConcurrentMessageLi...
.replicas(1) .build(), TopicBuilder.name("topic2") .partitions(10) .replicas(1) .build(), TopicBuilder.name("topic3") .partitions(10) .replicas(1) .build())...
repos\spring-kafka-main\spring-kafka-docs\src\main\java\org\springframework\kafka\jdocs\dynamic\Application.java
2
请在Spring Boot框架中完成以下Java代码
public class JsonRemittanceAdvice { @ApiModelProperty(dataType = "java.lang.String", value = "This translates to AD_Org_ID") @Nullable String orgCode; @ApiModelProperty(required = true, dataType = "java.lang.String", value = "This translates to Source_BPartner_ID") @NonNull String senderId; @ApiModelP...
@ApiModelProperty(required = true, dataType = "java.math.BigDecimal", value = "This translates as RemittanceAmt") @NonNull BigDecimal remittedAmountSum; @ApiModelProperty(required = true, dataType = "java.math.BigDecimal", value = "This translates as RemittanceAmt_Currency_ID") @NonNull String remitta...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-rest_api\src\main\java\de\metas\common\rest_api\v1\remittanceadvice\JsonRemittanceAdvice.java
2
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .add("lookupValues", lookupValues) .toString(); } @Override public LookupSource getLookupSourceType() { return lookupSourceType; } @Override public boolean isNumericKey() { return numericKey; } @Override public Set<String> g...
private Builder() { } public ListLookupDescriptor build() { return new ListLookupDescriptor(this); } public Builder setLookupSourceType(@NonNull final LookupSource lookupSourceType) { this.lookupSourceType = lookupSourceType; return this; } public Builder setLookupValues(final boolean nume...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\ListLookupDescriptor.java
1
请在Spring Boot框架中完成以下Java代码
public class ForkingComponent extends RecursiveAction { @Value("${jdbc.batch.size}") private int batchSize; @Autowired private JoiningComponent joiningComponent; @Autowired private ApplicationContext applicationContext; private final List<String> jsonList; public ForkingComponent(Li...
} private List<ForkingComponent> createSubtasks() { List<ForkingComponent> subtasks = new ArrayList<>(); int size = jsonList.size(); List<String> jsonListOne = jsonList.subList(0, (size + 1) / 2); List<String> jsonListTwo = jsonList.subList((size + 1) / 2, size); subtasks...
repos\Hibernate-SpringBoot-master\HibernateSpringBootBatchJsonFileForkJoin\src\main\java\com\citylots\forkjoin\ForkingComponent.java
2
请在Spring Boot框架中完成以下Java代码
protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.inMemoryAuthentication() .withUser("user").password("{noop}password").roles("USER") .and() .withUser("admin").password("{noop}password").roles("USER", "ADMIN"); } // Sec...
.and() .csrf().disable() .formLogin().disable(); } /*@Bean public UserDetailsService userDetailsService() { //ok for demo User.UserBuilder users = User.withDefaultPasswordEncoder(); InMemoryUserDetailsManager manager = new InMemoryUserDetailsManager(...
repos\spring-boot-master\spring-rest-security\src\main\java\com\mkyong\config\SpringSecurityConfig.java
2
请完成以下Java代码
public org.compiere.model.I_C_Country getC_Country() { return get_ValueAsPO(COLUMNNAME_C_Country_ID, org.compiere.model.I_C_Country.class); } @Override public void setC_Country(final org.compiere.model.I_C_Country C_Country) { set_ValueFromPO(COLUMNNAME_C_Country_ID, org.compiere.model.I_C_Country.class, C_Co...
set_ValueNoCheck (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setM_Product_TaxCategory_ID (final int M_Product_TaxCategory_ID) { if (M_Product_TaxCategory_ID < 1) set_ValueNoCheck (COLUMNNAM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_TaxCategory.java
1
请完成以下Java代码
public String getDatabaseType() { return databaseType; } public Map<String, String> getStatementMappings() { return statementMappings; } public void setStatementMappings(Map<String, String> statementMappings) { this.statementMappings = statementMappings; } public Map<Class< ? >, String> ge...
public void setDbHistoryUsed(boolean isDbHistoryUsed) { this.isDbHistoryUsed = isDbHistoryUsed; } public boolean isCmmnEnabled() { return cmmnEnabled; } public void setCmmnEnabled(boolean cmmnEnabled) { this.cmmnEnabled = cmmnEnabled; } public boolean isDmnEnabled() { return dmnEnabled; ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\sql\DbSqlSessionFactory.java
1
请完成以下Java代码
private TableCellEditor createTableCellEditor(final TableColumnInfo columnMetaInfo) { if (columnMetaInfo.isSelectionColumn()) { return new SelectionColumnCellEditor(); } return new AnnotatedTableCellEditor(columnMetaInfo); } /** * Synchronize changes from {@link TableColumnInfo} to {@link TableColumnE...
return; } running = true; try { final TableColumnInfo columnMetaInfo = (TableColumnInfo)evt.getSource(); final TableColumnExt columnExt = getTableColumnExt(); if (columnExt == null) { // ColumnExt reference expired: // * remove this listener because there is no point to have this...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\swing\table\AnnotatedTableColumnFactory.java
1
请完成以下Java代码
public String getRootProcessInstanceId() { return rootProcessInstanceId; } public Date getCreateTime() { return createTime; } public Date getEndTime() { return endTime; } public Date getRemovalTime() { return removalTime; } public String getIncidentType() { return incidentType; ...
public String getAnnotation() { return annotation; } public static HistoricIncidentDto fromHistoricIncident(HistoricIncident historicIncident) { HistoricIncidentDto dto = new HistoricIncidentDto(); dto.id = historicIncident.getId(); dto.processDefinitionKey = historicIncident.getProcessDefinitionK...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricIncidentDto.java
1
请完成以下Java代码
public void setRemote_Addr (String Remote_Addr) { set_ValueNoCheck (COLUMNNAME_Remote_Addr, Remote_Addr); } /** Get Remote Addr. @return Remote Address */ public String getRemote_Addr () { return (String)get_Value(COLUMNNAME_Remote_Addr); } /** Set Remote Host. @param Remote_Host Remote host Inf...
/** Get Sales Volume in 1.000. @return Total Volume of Sales in Thousands of Currency */ public int getSalesVolume () { Integer ii = (Integer)get_Value(COLUMNNAME_SalesVolume); if (ii == null) return 0; return ii.intValue(); } /** Set Start Implementation/Production. @param StartProductionDate ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Registration.java
1
请完成以下Java代码
public static boolean isStaffLevel(String name) { PositionLevelEnum position = getByName(name); return position != null && position.getType() == PositionType.STAFF; } /** * 根据职级名称判断是否为领导层级 * @param name 职级名称 * @return true-领导层级,false-非领导层级 */ public static boolean isLead...
} /** * 获取所有领导层级名称 * @return 领导层级名称列表 */ public static List<String> getLeaderLevelNames() { return Arrays.asList(CHAIRMAN.getName(), GENERAL_MANAGER.getName(), VICE_GENERAL_MANAGER.getName()); } /** * 获取所有职级名称(按等级排序) * @return 所有职级名称列表 */ public static List<St...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\constant\enums\PositionLevelEnum.java
1
请完成以下Java代码
public class DunningDocDocumentHandler implements DocumentHandler { @Override public String getSummary(@NonNull final DocumentTableFields docFields) { return extractDunningDoc(docFields).getDocumentNo(); } @Override public String getDocumentInfo(@NonNull final DocumentTableFields docFields) { return getSumm...
line.setProcessed(true); InterfaceWrapperHelper.save(line); } // // Delivery stop (https://github.com/metasfresh/metasfresh/issues/2499) dunningBL.makeDeliveryStopIfNeeded(dunningDocRecord); dunningDocRecord.setProcessed(true); return IDocument.STATUS_Completed; } @Override public void reactivateI...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\DunningDocDocumentHandler.java
1
请完成以下Java代码
public static final class SourceDocumentLine { @Nullable OrderLineId orderLineId; @NonNull SOTrx soTrx; @NonNull BPartnerId bpartnerId; @NonNull ProductId productId; @NonNull ProductCategoryId productCategoryId; @NonNull Money priceEntered; @lombok.Builder.Default @NonNull Percent dis...
ProductId productId; @NonNull SOTrx soTrx; } // // // // // public static class PricingConditionsRowsLoaderBuilder { public PricingConditionsRowData load() { return build().load(); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\view\PricingConditionsRowsLoader.java
1
请完成以下Java代码
public Builder registrationAccessToken(String registrationAccessToken) { return claim(OidcClientMetadataClaimNames.REGISTRATION_ACCESS_TOKEN, registrationAccessToken); } /** * Sets the {@code URL} of the Client Configuration Endpoint where the * Registration Access Token can be used, OPTIONAL. * @param...
@SuppressWarnings("unchecked") private void addClaimToClaimList(String name, String value) { Assert.hasText(name, "name cannot be empty"); Assert.notNull(value, "value cannot be null"); getClaims().computeIfAbsent(name, (k) -> new LinkedList<String>()); ((List<String>) getClaims().get(name)).add(value); ...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\OidcClientRegistration.java
1
请完成以下Java代码
public class ProcessDocumentsBySelection extends AbstractProcessDocumentsTemplate implements IProcessPrecondition { // services private final IQueryBL queryBL = Services.get(IQueryBL.class); public static final String PARAM_DocStatus = "DocStatus"; @Param(parameterName = PARAM_DocStatus) private DocStatus p_DocSt...
final String tableName = Check.assumeNotNull(getTableName(), "The process must be associated with a table!"); final IQueryBuilder<Object> queryBuilder = queryBL.createQueryBuilder(tableName) .addOnlyActiveRecordsFilter() .filter(getProcessInfo().getQueryFilterOrElseFalse()); if (p_DocStatus != null) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\process\ProcessDocumentsBySelection.java
1
请完成以下Java代码
private void processBlock(LineIterator iterator, CQLSSTableWriter writer, File outDir, Function<List<String>, List<Object>> function) { String currentLine; long linesProcessed = 0; while(iterator.hasNext()) { logLinesProcessed(linesProcessed++); currentLine = iterator.nex...
numeric.set(6, null); numeric.set(8, casted); castedOk++; return numeric; } } catch (Throwable th) { castErrors++; } processPartitions(values); return values; } private boolean isBlockFinished(String line)...
repos\thingsboard-master\tools\src\main\java\org\thingsboard\client\tools\migrator\PgCaMigrator.java
1
请完成以下Java代码
public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getCnname() { return cnname; } public void setCnname(String cnname) { this.cnname = cnname; } public String getUsername() { return username; } public String getPassword() { return password; } publ...
public String getSkill() { return skill; } public void setSkill(String skill) { this.skill = skill; } public Integer getDepartmentId() { return departmentId; } public void setDepartmentId(Integer departmentId) { this.departmentId = departmentId; } public Integer getLoginCount() { return loginCount; }...
repos\springBoot-master\springboot-shiro\src\main\java\com\us\bean\User.java
1
请完成以下Java代码
private static void transformIntoStream() { int[] anArray = new int[] {1, 2, 3, 4, 5}; IntStream aStream = Arrays.stream(anArray); Integer[] anotherArray = new Integer[] {1, 2, 3, 4, 5}; Stream<Integer> anotherStream = Arrays.stream(anotherArray, 2, 4); } private static void so...
Arrays.sort(anArray); int index = Arrays.binarySearch(anArray, 4); System.out.println("Found at index " + index); } private static void merge() { int[] anArray = new int[] {5, 2, 1, 4, 8}; int[] anotherArray = new int[] {10, 4, 9, 11, 2}; int[] resultArray = new int[anA...
repos\tutorials-master\core-java-modules\core-java-arrays-guides\src\main\java\com\baeldung\array\ArrayReferenceGuide.java
1
请完成以下Java代码
public @Nullable String getBeanName(Class<?> beanClass) { return (this.beanNameGenerator != null) ? this.beanNameGenerator.apply(beanClass) : null; } /** * Return the classes from all the specified configurations in the order that they * would be registered. * @param configurations the source configuration ...
* @param configurations the source configuration * @return the collated configurations * @since 3.4.0 */ public static List<Configurations> collate(Collection<Configurations> configurations) { LinkedList<Configurations> collated = new LinkedList<>(); for (Configurations configuration : sortConfigurations(con...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\annotation\Configurations.java
1
请完成以下Java代码
public static HistoricTaskInstanceDto fromHistoricTaskInstance(HistoricTaskInstance taskInstance) { HistoricTaskInstanceDto dto = new HistoricTaskInstanceDto(); dto.id = taskInstance.getId(); dto.processDefinitionKey = taskInstance.getProcessDefinitionKey(); dto.processDefinitionId = taskInstance.getP...
dto.duration = taskInstance.getDurationInMillis(); dto.taskDefinitionKey = taskInstance.getTaskDefinitionKey(); dto.priority = taskInstance.getPriority(); dto.due = taskInstance.getDueDate(); dto.parentTaskId = taskInstance.getParentTaskId(); dto.followUp = taskInstance.getFollowUpDate(); dto.te...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricTaskInstanceDto.java
1
请完成以下Java代码
public int hashCode() { int result = ObjectUtils.nullSafeHashCode(this.name); result = 31 * result + ObjectUtils.nullSafeHashCode(this.value); return result; } @Override public String toString() { return new ToStringCreator(this).append("name", this.name) .append("value", this.value) .append("origin",...
static @Nullable ConfigurationProperty of(ConfigurationPropertyName name, @Nullable OriginTrackedValue value) { if (value == null) { return null; } return new ConfigurationProperty(name, value.getValue(), value.getOrigin()); } @Contract("_, _, !null, _ -> !null") static @Nullable ConfigurationProperty of(@...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\source\ConfigurationProperty.java
1
请完成以下Java代码
public Optional<BPartnerLocation> extractShipToLocation() { final Predicate<BPartnerLocation> predicate = l -> l.getLocationType().getIsShipToOr(false); return createFilteredLocationStream(predicate).min(Comparator.comparing(l -> !l.getLocationType().getIsShipToDefaultOr(false))); } public Optional<BPartnerLoc...
public Optional<BPartnerBankAccount> getBankAccountByIBAN(@NonNull final String iban) { Check.assumeNotEmpty(iban, "iban is not empty"); return bankAccounts.stream() .filter(bankAccount -> iban.equals(bankAccount.getIban())) .findFirst(); } public void addCreditLimit(@NonNull final BPartnerCreditLimit ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\composite\BPartnerComposite.java
1
请在Spring Boot框架中完成以下Java代码
public void setAuthenticationRequestRepository( Saml2AuthenticationRequestRepository<AbstractSaml2AuthenticationRequest> authenticationRequestRepository) { Assert.notNull(authenticationRequestRepository, "authenticationRequestRepository cannot be null"); this.authenticationRequestRepository = authenticationReque...
if (encoded == null) { return null; } boolean isGet = HttpMethod.GET.matches(request.getMethod()); if (!this.shouldConvertGetRequests && isGet) { return null; } Saml2Utils.DecodingConfigurer decoding = Saml2Utils.withEncoded(encoded).requireBase64(true).inflate(isGet); try { return decoding.decode(...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\web\Saml2AuthenticationTokenConverter.java
2
请完成以下Java代码
private synchronized Path getFilePathOrNull() {return _path;} public static Path getMigrationScriptDirectory() { final Path migrationScriptsDirectory = _migrationScriptsDirectory; return migrationScriptsDirectory != null ? migrationScriptsDirectory : getDefaultMigrationScriptDirectory(); } private static Path...
{ if (sqlStatements == null || sqlStatements.isEmpty()) { return; } try { final Path path = getCreateFilePath(); FileUtil.writeString(path, sqlStatements, CHARSET, StandardOpenOption.CREATE, StandardOpenOption.APPEND); } catch (final IOException ex) { logger.error("Failed writing to {}:\n {...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\logger\MigrationScriptFileLogger.java
1
请完成以下Java代码
public URL transform(URL artifact) throws Exception { try { return new URL("bar", null, artifact.toString()); } catch (Exception e) { LOGGER.error("Unable to build bar bundle", e); return null; } } @Override public boolean canHandle(File artifact)...
if (m != null && m.getMainAttributes().getValue(new Attributes.Name(BUNDLE_SYMBOLICNAME)) != null && m.getMainAttributes().getValue(new Attributes.Name(BUNDLE_VERSION)) != null) { return false; } return true; } catch (Exception e) { return false; } fin...
repos\flowable-engine-main\modules\flowable-osgi\src\main\java\org\flowable\osgi\BarDeploymentListener.java
1
请完成以下Java代码
public I_M_InOutLine getM_InOutLine() { return get_ValueAsPO(COLUMNNAME_M_InOutLine_ID, I_M_InOutLine.class); } @Override public void setM_InOutLine(final I_M_InOutLine M_InOutLine) { set_ValueFromPO(COLUMNNAME_M_InOutLine_ID, I_M_InOutLine.class, M_InOutLine); } @Override public void setM_InOutLine_ID (f...
@Override public void setReversal(final I_M_InOut_Cost Reversal) { set_ValueFromPO(COLUMNNAME_Reversal_ID, I_M_InOut_Cost.class, Reversal); } @Override public void setReversal_ID (final int Reversal_ID) { if (Reversal_ID < 1) set_Value (COLUMNNAME_Reversal_ID, null); else set_Value (COLUMNNAME_Reve...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_InOut_Cost.java
1
请在Spring Boot框架中完成以下Java代码
public ConnectionString getConnectionString() { // protocol://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database.collection][?options]] if (this.properties.getUri() != null) { return new ConnectionString(this.properties.getUri()); } StringBuilder builder = new StringBuilder(getP...
} @Override public @Nullable SslBundle getSslBundle() { Ssl ssl = this.properties.getSsl(); if (!ssl.isEnabled()) { return null; } if (StringUtils.hasLength(ssl.getBundle())) { Assert.notNull(this.sslBundles, "SSL bundle name has been set but no SSL bundles found in context"); return this.sslBundles...
repos\spring-boot-4.0.1\module\spring-boot-mongodb\src\main\java\org\springframework\boot\mongodb\autoconfigure\PropertiesMongoConnectionDetails.java
2
请在Spring Boot框架中完成以下Java代码
protected CmmnExecution newCaseInstance() { CaseExecutionEntity caseInstance = new CaseExecutionEntity(); if (tenantId != null) { caseInstance.setTenantId(tenantId); } Context .getCommandContext() .getCaseExecutionManager() .insertCaseExecution(caseInstance); return c...
public String toString() { return "CaseDefinitionEntity["+id+"]"; } /** * Updates all modifiable fields from another case definition entity. * @param updatingCaseDefinition */ @Override public void updateModifiableFieldsFromEntity(CaseDefinitionEntity updatingCaseDefinition) { if (this.key.equ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\repository\CaseDefinitionEntity.java
2
请完成以下Java代码
public void logMethodCallBeforeExecution(JoinPoint joinPoint) { logger.info("Before Aspect - {} is called with arguments: {}" , joinPoint, joinPoint.getArgs());//WHAT } @After("com.in28minutes.learnspringaop.aopexample.aspects.CommonPointcutConfig.businessPackageConfig()") public void logMethodCallAfterExecu...
logger.info("AfterThrowing Aspect - {} has thrown an exception {}" , joinPoint, exception); } @AfterReturning( pointcut = "com.in28minutes.learnspringaop.aopexample.aspects.CommonPointcutConfig.dataPackageConfig()", returning = "resultValue" ) public void logMethodCallAfterSuccessfulExecution(JoinPoint join...
repos\master-spring-and-spring-boot-main\73-spring-aop\src\main\java\com\in28minutes\learnspringaop\aopexample\aspects\LoggingAspect.java
1
请完成以下Java代码
public void setStatecode(String value) { this.statecode = value; } /** * Gets the value of the countrycode property. * * @return * possible object is * {@link String } * */ public String getCountrycode() { if (countrycode == null) { ...
} } /** * Sets the value of the countrycode property. * * @param value * allowed object is * {@link String } * */ public void setCountrycode(String value) { this.countrycode = value; } }
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\ZipType.java
1
请完成以下Java代码
private ProcessPreconditionsResolution.ProcessCaptionMapper getCaptionMapper() { return processCaptionMapperHelper.getProcessCaptionMapperForNetAmountsFromQuery(retrieveQuery(false)); } @Override @RunOutOfTrx protected String doIt() throws Exception { final IQuery<I_C_Invoice_Candidate> query = retrieveQuery(...
private SqlViewRowsWhereClause getViewSqlWhereClause(@NonNull final DocumentIdsSelection rowIds) { final String invoiceCandidateTableName = I_C_Invoice_Candidate.Table_Name; return getView().getSqlWhereClause(rowIds, SqlOptions.usingTableName(invoiceCandidateTableName)); } protected abstract boolean isApproveF...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\invoicecandidate\process\C_Invoice_Candidate_ProcessHelper.java
1