instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public Optional<String> getUrl() {return getByPathAsString("page", "url");} public Optional<String> getUsername() {return getByPathAsString("user", "username");} public Optional<String> getCaption() {return getByPathAsString("caption");} public Optional<MobileApplicationId> getApplicationId() {return getByPathAsS...
} else { currentValue = value; } } return Optional.of(currentValue); } private static Optional<Object> getByKey(final Map<String, Object> map, final String key) { return map.entrySet() .stream() .filter(e -> e.getKey().equalsIgnoreCase(key)) .map(Map.Entry::getValue) .filter(Obje...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\serverRoot\de.metas.adempiere.adempiere.serverRoot.base\src\main\java\de\metas\server\ui_trace\rest\JsonUITraceEvent.java
1
请在Spring Boot框架中完成以下Java代码
public class JasyptEnvironmentChangeListener implements ApplicationListener<EnvironmentChangeEvent> { private Logger logger = LoggerFactory.getLogger(getClass()); // Environment 管理器,可以实现配置项的获取和修改 @Autowired private EnvironmentManager environmentManager; // Jasypt 加密器,可以对配置项进行加密和加密 @Autowired ...
if (!(valueObj instanceof String)) { continue; } String value = (String) valueObj; // 判断 value 是否为加密。如果是,则进行解密 if (value.startsWith("ENC(") && value.endsWith(")")) { value = encryptor.decrypt(StringUtils.substringBetween(value, "ENC(", ")")...
repos\SpringBoot-Labs-master\labx-05-spring-cloud-alibaba-nacos-config\labx-05-sca-nacos-config-demo-jasypt\src\main\java\cn\iocoder\springcloudalibaba\labx5\nacosdemo\listener\JasyptEnvironmentChangeListener.java
2
请完成以下Java代码
public boolean isPrincipalAuthenticated() { return !AnonymousAuthenticationToken.class.isAssignableFrom(this.principal.getClass()) && this.principal.isAuthenticated(); } @Override public Object getCredentials() { return ""; } /** * Returns the ID Token previously issued by the Provider to the Client an...
} /** * Returns the URI which the Client is requesting that the End-User's User Agent be * redirected to after a logout has been performed. * @return the URI which the Client is requesting that the End-User's User Agent be * redirected to after a logout has been performed */ @Nullable public String getPos...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\authentication\OidcLogoutAuthenticationToken.java
1
请在Spring Boot框架中完成以下Java代码
protected static void validateQueueName(String name) { validateQueueNameOrTopic(name, NAME); if (DataConstants.CF_QUEUE_NAME.equals(name) || DataConstants.CF_STATES_QUEUE_NAME.equals(name)) { throw new DataValidationException(String.format("The queue name '%s' is not allowed. This name is re...
throw new DataValidationException( String.format("Queue %s contains a character other than ASCII alphanumerics, '.', '_' and '-'!", fieldName)); } } public static boolean isValidDomain(String domainName) { if (domainName == null) { return false; } ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\service\DataValidator.java
2
请完成以下Java代码
protected void addResource(Object source, Map<String, byte[]> resourceMap, String resourceRootPath, String resourceName) { String resourcePath = (resourceRootPath == null ? "" : resourceRootPath).concat(resourceName); LOG.debugDiscoveredResource(resourcePath); InputStream inputStream = null; try { ...
} protected Enumeration<URL> loadClasspathResourceRoots(final ClassLoader classLoader, String strippedPaResourceRootPath) { Enumeration<URL> resourceRoots; try { resourceRoots = classLoader.getResources(strippedPaResourceRootPath); } catch (IOException e) { throw LOG.couldNotGetResource(s...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\deployment\scanning\ClassPathProcessApplicationScanner.java
1
请在Spring Boot框架中完成以下Java代码
public Job flowJob() { return jobBuilderFactory.get("flowJob") .start(flow()) .next(step3()) .end() .build(); } private Step step1() { return stepBuilderFactory.get("step1") .tasklet((stepContribution, chunkContext)...
return stepBuilderFactory.get("step3") .tasklet((stepContribution, chunkContext) -> { System.out.println("执行步骤三操作。。。"); return RepeatStatus.FINISHED; }).build(); } // 创建一个flow对象,包含若干个step private Flow flow() { return new FlowBu...
repos\SpringAll-master\67.spring-batch-start\src\main\java\cc\mrbird\batch\job\FlowJobDemo.java
2
请在Spring Boot框架中完成以下Java代码
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OrderMapping orderMapping = (OrderMapping) o; return Objects.equals(this.orderId, orderMapping.orderId) && Objects.equals(this.salesId, orderMappin...
sb.append(" updated: ").append(toIndentedString(updated)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { ret...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-orders-api\src\main\java\io\swagger\client\model\OrderMapping.java
2
请完成以下Java代码
protected Result getTargetVector() { final int words = vectorsReader.getNumWords(); final int size = vectorsReader.getSize(); String[] input = null; while ((input = nextWords(3, "Enter 3 words")) != null) { // linear search the input word in vocabulary ...
double len = 0; for (int j = 0; j < size; j++) { vec[j] = vectorsReader.getMatrixElement(bi[1], j) - vectorsReader.getMatrixElement(bi[0], j) + vectorsReader.getMatrixElement(bi[2], j); len += vec[j] * vec[j]; } len...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\WordAnalogy.java
1
请完成以下Java代码
public int hashCode() { Integer hashcode = this._hashcode; if (hashcode == null) { hashcode = this._hashcode = Objects.hash(valid, initialValue, reason, fieldName); } return hashcode; } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!(obj instanc...
public void throwIfInvalid() { if (isValid()) { return; } if (exception != null) { throw AdempiereException.wrapIfNeeded(exception); } else { throw new AdempiereException(reason != null ? reason : TranslatableStrings.anyLanguage("Invalid")); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentValidStatus.java
1
请完成以下Java代码
protected Response createResponse(List<MessageCorrelationResultDto> resultDtos, CorrelationMessageDto messageDto) { Response.ResponseBuilder response = Response.noContent(); if (messageDto.isResultEnabled()) { response = Response.ok(resultDtos, MediaType.APPLICATION_JSON); } return response.build(...
if (correlationKeys != null && !correlationKeys.isEmpty()) { for (Entry<String, Object> correlationKey : correlationKeys.entrySet()) { String name = correlationKey.getKey(); Object value = correlationKey.getValue(); builder.processInstanceVariableEquals(name, value); } } if...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\MessageRestServiceImpl.java
1
请完成以下Java代码
public class Product { private Integer id; private String name; private String description; private Map<String, Attribute> attributes; public Product(){ } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String...
} public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Map<String, Attribute> getAttributes() { return attrib...
repos\tutorials-master\graphql-modules\graphql-java\src\main\java\com\baeldung\graphqlreturnmap\entity\Product.java
1
请完成以下Java代码
public Mono<MultipleCommentsView> getComments(String slug, Optional<User> user) { return commentService.getComments(slug, user); } public Mono<ArticleView> favoriteArticle(String slug, User currentUser) { return articleRepository.findBySlug(slug) .map(article -> { ...
} private ArticleView updateArticle(UpdateArticleRequest request, User currentUser, Article article) { if (!article.isAuthor(currentUser)) { throw new InvalidRequestException("Article", "only author can update article"); } ofNullable(request.getBody()) .ifPresen...
repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\article\ArticleFacade.java
1
请完成以下Java代码
public String getCredentialType() { return credentialType; } public void setCredentialType(String credentialType) { this.credentialType = credentialType; } public String getCredentialId() { return credentialId; } public void setCredentialId(String credentialId) { ...
} public void setBackupEligible(Boolean backupEligible) { this.backupEligible = backupEligible; } public Boolean getBackupState() { return backupState; } public void setBackupState(Boolean backupState) { this.backupState = backupState; } public String getAttestati...
repos\tutorials-master\spring-security-modules\spring-security-passkey\src\main\java\com\baeldung\tutorials\passkey\domain\PasskeyCredential.java
1
请完成以下Java代码
public boolean intersects(@NonNull final AttributesKey attributesKey) { return parts.stream().anyMatch(attributesKey.parts::contains); } public String getValueByAttributeId(@NonNull final AttributeId attributeId) { for (final AttributesKeyPart part : parts) { if (part.getType() == AttributeKeyPartType.Att...
} public static boolean equals(@Nullable final AttributesKey k1, @Nullable final AttributesKey k2) { return Objects.equals(k1, k2); } @Override public int compareTo(@Nullable final AttributesKey o) { if (o == null) { return 1; // we assume that null is less than not-null } return this.getAsString()...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\commons\AttributesKey.java
1
请完成以下Java代码
private DocumentFilter getEffectiveFilter(final @NonNull CreateViewRequest request) { if (request.isUseAutoFilters()) { final InvoiceAndLineId invoiceAndLineId = getInvoiceLineId(request); final I_C_Invoice invoice = invoiceBL.getById(invoiceAndLineId.getInvoiceId()); final BPartnerId bpartnerId = BPartne...
return filterDescriptor; } @Override public InOutCostsView filterView( final @NonNull IView view, final @NonNull JSONFilterViewRequest filterViewRequest, final @NonNull Supplier<IViewsRepository> viewsRepo) { final InOutCostsView inOutCostsView = (InOutCostsView)view; return createView( CreateView...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\invoice\match_inout_costs\InOutCostsViewFactory.java
1
请完成以下Java代码
public void setIsInDispute (boolean IsInDispute) { set_Value (COLUMNNAME_IsInDispute, Boolean.valueOf(IsInDispute)); } /** Get In Dispute. @return Document is in dispute */ @Override public boolean isInDispute () { Object oo = get_Value(COLUMNNAME_IsInDispute); if (oo != null) { if (oo instanc...
/** Set Offener Betrag. @param OpenAmt Offener Betrag */ @Override public void setOpenAmt (java.math.BigDecimal OpenAmt) { set_Value (COLUMNNAME_OpenAmt, OpenAmt); } /** Get Offener Betrag. @return Offener Betrag */ @Override public java.math.BigDecimal getOpenAmt () { BigDecimal bd = (BigDecimal)...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java-gen\de\metas\dunning\model\X_C_Dunning_Candidate_Invoice_v1.java
1
请完成以下Java代码
protected void handleStartEvent(EventSubscriptionEntity eventSubscription, Map<String, Object> payload, String businessKey, CommandContext commandContext) { String processDefinitionId = eventSubscription.getConfiguration(); ensureNotNull("Configuration of signal start event subscription '" + eventSubscription.g...
@Override public void handleEvent(EventSubscriptionEntity eventSubscription, Object payload, Object payloadLocal, Object payloadToTriggeredScope, String businessKey, CommandContext command...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\event\SignalEventHandler.java
1
请完成以下Java代码
public void setAuthenticationConverter(AuthenticationConverter authenticationConverter) { Assert.notNull(authenticationConverter, "authenticationConverter cannot be null"); this.authenticationConverter = authenticationConverter; } /** * Sets the {@link AuthenticationSuccessHandler} used for handling an * {@l...
} private void sendPushedAuthorizationResponse(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException { OAuth2PushedAuthorizationRequestAuthenticationToken pushedAuthorizationRequestAuthentication = (OAuth2PushedAuthorizationRequestAuthenticationToken) authen...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\web\OAuth2PushedAuthorizationRequestEndpointFilter.java
1
请完成以下Java代码
public EventModelBuilder correlationParameter(String name, String type) { eventPayloadDefinitions.put(name, EventPayload.correlation(name, type)); return this; } @Override public EventModelBuilder payload(String name, String type) { eventPayloadDefinitions.put(name, new EventPayload...
.category(category) .parentDeploymentId(parentDeploymentId) .tenantId(deploymentTenantId) .deploy(); } protected EventModel buildEventModel() { EventModel eventModel = new EventModel(); if (StringUtils.isNotEmpty(key)) { eventModel.setKey(key); ...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\model\EventModelBuilderImpl.java
1
请完成以下Java代码
private static void addForecastLine(final I_M_Forecast forecastRecord, final @NotNull ForecastLineRequest request) { final I_M_ForecastLine forecastLineRecord = InterfaceWrapperHelper.newInstance(I_M_ForecastLine.class); forecastLineRecord.setM_Forecast_ID(forecastRecord.getM_Forecast_ID()); forecastLineRecord....
{ final I_M_Forecast forecast = InterfaceWrapperHelper.load(forecastId, I_M_Forecast.class); if (forecast == null) { throw new AdempiereException("@NotFound@: " + forecastId); } return forecast; } @Override public void save(@NonNull final I_M_Forecast forecastRecord) { saveRecord(forecastRecord); }...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\mforecast\impl\ForecastDAO.java
1
请完成以下Java代码
public class HttpStatusExchangeRejectedHandler implements ServerExchangeRejectedHandler { private static final Log logger = LogFactory.getLog(HttpStatusExchangeRejectedHandler.class); private final HttpStatus status; /** * Constructs an instance which uses {@code 400} as response code. */ public HttpStatusEx...
this.status = status; } @Override public Mono<Void> handle(ServerWebExchange exchange, ServerExchangeRejectedException serverExchangeRejectedException) { return Mono.fromRunnable(() -> { logger.debug( LogMessage.format("Rejecting request due to: %s", serverExchangeRejectedException.getMessage()), ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\firewall\HttpStatusExchangeRejectedHandler.java
1
请完成以下Java代码
private static FileType to(String fileType) { return FILE_TYPE_MAPPER.getOrDefault(fileType, OTHER); } /** * 查看文件类型(防止参数中存在.点号或者其他特殊字符,所以先抽取文件名,然后再获取文件类型) * * @param url url * @return 文件类型 */ public static FileType typeFromUrl(String url) { String nonPramStr = url.s...
String fileType = fileName.substring(fileName.lastIndexOf(".") + 1); String lowerCaseFileType = fileType.toLowerCase(); return FileType.to(lowerCaseFileType); } private final String instanceName; FileType(String instanceName) { this.instanceName = instanceName; } public St...
repos\kkFileView-master\server\src\main\java\cn\keking\model\FileType.java
1
请完成以下Java代码
public class MybatisByteArrayDataManager extends AbstractDataManager<ByteArrayEntity> implements ByteArrayDataManager { protected IdGenerator idGenerator; public MybatisByteArrayDataManager(IdGenerator idGenerator) { this.idGenerator = idGenerator; } @Override public ByteArrayEnti...
} @Override public void deleteByteArrayNoRevisionCheck(String byteArrayEntityId) { getDbSqlSession().delete("deleteByteArrayNoRevisionCheck", byteArrayEntityId, ByteArrayEntityImpl.class); } @Override public void bulkDeleteByteArraysNoRevisionCheck(List<String> byteArrayEntityIds) { ...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\persistence\entity\data\impl\MybatisByteArrayDataManager.java
1
请完成以下Java代码
public class DocumentLineInformation1 { @XmlElement(name = "Id", required = true) protected List<DocumentLineIdentification1> id; @XmlElement(name = "Desc") protected String desc; @XmlElement(name = "Amt") protected RemittanceAmount3 amt; /** * Gets the value of the id property. ...
* */ public void setDesc(String value) { this.desc = value; } /** * Gets the value of the amt property. * * @return * possible object is * {@link RemittanceAmount3 } * */ public RemittanceAmount3 getAmt() { return amt; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-xjc_camt054_001_06\de\metas\payment\camt054_001_06\DocumentLineInformation1.java
1
请在Spring Boot框架中完成以下Java代码
public Long getOperatorId() { return operatorId; } public void setOperatorId(Long operatorId) { this.operatorId = operatorId; } public String getOperatorName() { return operatorName; } public void setOperatorName(String operatorName) { this.operatorName = operatorName; } public String getOperateType...
public void setOperateType(String operateType) { this.operateType = operateType; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } }
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\entity\PmsOperatorLog.java
2
请完成以下Java代码
private Map<String, Object> getOtherProperties() { return otherProperties; } @JsonAnySetter private void putOtherProperty(final String name, final Object jsonValue) { otherProperties.put(name, jsonValue); } protected final JSONDocumentBase putDebugProperty(final String name, final Object jsonValue) { ot...
setFields(fields == null ? null : Maps.uniqueIndex(fields, JSONDocumentField::getField)); } @JsonIgnore protected final void setFields(final Map<String, JSONDocumentField> fieldsByName) { this.fieldsByName = fieldsByName; if (unboxPasswordFields && fieldsByName != null && !fieldsByName.isEmpty()) { field...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONDocumentBase.java
1
请完成以下Java代码
public class Result<T> implements Serializable { private static final long serialVersionUID = 1L; private int resultCode; private String message; private T data; public Result() { } public Result(int resultCode, String message) { this.resultCode = resultCode; this.message =...
} public void setData(T data) { this.data = data; } public Result failure(String code) { return new Result(500, "服务错误"); } @Override public String toString() { return "Result{" + "resultCode=" + resultCode + ", message='" + message + '\'...
repos\spring-boot-projects-main\SpringBoot入门案例源码\spring-boot-RESTful-api\src\main\java\cn\lanqiao\springboot3\common\Result.java
1
请完成以下Java代码
public static void main(String[] args) { new LambdaVariables().localVariableMultithreading(); } Supplier<Integer> incrementer(int start) { return () -> start; // can't modify start parameter inside the lambda } Supplier<Integer> incrementer() { return () -> start++; } ...
} /** * WARNING: always avoid this workaround!! */ public void workaroundMultithreading() { int[] holder = new int[] { 2 }; Runnable runnable = () -> System.out.println(IntStream .of(1, 2, 3) .map(val -> val + holder[0]) .sum()); new Thread(runna...
repos\tutorials-master\core-java-modules\core-java-lambdas-2\src\main\java\com\baeldung\lambdas\LambdaVariables.java
1
请完成以下Java代码
public void setRealizedLoss_Acct (int RealizedLoss_Acct) { set_Value (COLUMNNAME_RealizedLoss_Acct, Integer.valueOf(RealizedLoss_Acct)); } /** Get Realisierte Währungsverluste. @return Konto für realisierte Währungsverluste */ @Override public int getRealizedLoss_Acct () { Integer ii = (Integer)get_Val...
@Override public org.compiere.model.I_C_ValidCombination getUnrealizedLoss_A() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_UnrealizedLoss_Acct, org.compiere.model.I_C_ValidCombination.class); } @Override public void setUnrealizedLoss_A(org.compiere.model.I_C_ValidCombination UnrealizedLoss_A) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Currency_Acct.java
1
请完成以下Java代码
public boolean isSuccess() { return !isError(); } /** * @return action of given type; never returns null */ public <T extends ResultAction> T getAction(final Class<T> actionType) { final ResultAction action = getAction(); if (action == null) { throw new IllegalStateException("No action defined"); ...
public static class OpenIncludedViewAction implements ResultAction { @NonNull ViewId viewId; ViewProfileId profileId; } @lombok.Value(staticConstructor = "of") public static class CreateAndOpenIncludedViewAction implements ResultAction { @NonNull CreateViewRequest createViewRequest; } public static f...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\ProcessInstanceResult.java
1
请在Spring Boot框架中完成以下Java代码
public class Cause2PersistenceConfig { @Autowired private Environment env; public Cause2PersistenceConfig() { super(); } @Bean public LocalSessionFactoryBean sessionFactory() { final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean(); sessionFactory...
final HibernateTransactionManager txManager = new HibernateTransactionManager(); txManager.setSessionFactory(sessionFactory().getObject()); return txManager; } @Bean public PersistenceExceptionTranslationPostProcessor exceptionTranslation() { return new PersistenceExceptionTranslat...
repos\tutorials-master\spring-exceptions\src\main\java\com\baeldung\ex\mappingexception\spring\Cause2PersistenceConfig.java
2
请完成以下Java代码
public class PrincipalSid implements Sid { private final String principal; public PrincipalSid(String principal) { Assert.hasText(principal, "Principal required"); this.principal = principal; } public PrincipalSid(Authentication authentication) { Assert.notNull(authentication, "Authentication required"); ...
@Override public int hashCode() { return this.getPrincipal().hashCode(); } public String getPrincipal() { return this.principal; } @Override public String toString() { return "PrincipalSid[" + this.principal + "]"; } }
repos\spring-security-main\acl\src\main\java\org\springframework\security\acls\domain\PrincipalSid.java
1
请完成以下Java代码
public class Zoo { public Animal animal; public Zoo() { } public Zoo(final Animal animal) { this.animal = animal; } @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = As.PROPERTY, property = "type") @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "dog"), @JsonSubTyp...
} @JsonTypeName("cat") public static class Cat extends Animal { boolean likesCream; public int lives; public Cat() { } public Cat(final String name) { this.name = name; } } }
repos\tutorials-master\jackson-simple\src\main\java\com\baeldung\jackson\annotation\Zoo.java
1
请完成以下Java代码
public class BasicAuthProvider implements ClientRequestInterceptor { protected static final ExternalTaskClientLogger LOG = ExternalTaskClientLogger.CLIENT_LOGGER; protected String username; protected String password; public BasicAuthProvider(String username, String password) { if (username == null || pas...
public void intercept(ClientRequestContext requestContext) { String authToken = username + ":" + password; String encodedAuthToken = encodeToBase64(authToken); requestContext.addHeader(AUTHORIZATION, "Basic " + encodedAuthToken); } protected String encodeToBase64(String decodedString) { byte[] str...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\interceptor\auth\BasicAuthProvider.java
1
请在Spring Boot框架中完成以下Java代码
public String getVersionAttr() { if (versionAttr == null) { return "*"; } else { return versionAttr; } } /** * Sets the value of the versionAttr property. * * @param value * allowed object is * {@link String } * */...
* * @return * possible object is * {@link String } * */ public String getTrxNameAttr() { return trxNameAttr; } /** * Sets the value of the trxNameAttr property. * * @param value * allowed object is * {@link String } * ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDIExpCBPartnerProductVType.java
2
请完成以下Java代码
public void replace(final int offset, final int length, final String text, final AttributeSet attrs) throws BadLocationException { super.replace(offset, length, text, attrs); } /** * Caret Listener * @param e event */ @Override public void caretUpdate(CaretEvent e) { if(log.isTraceEnabled()) log.tr...
/** * Get Full Text * @return text */ private String getText() { String str = ""; try { str = getContent().getString(0, getContent().length() - 1); // cr at end } catch (Exception e) { str = ""; } return str; } private final void provideErrorFeedback() { UIManager.getLookAndFeel()...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\MDocDate.java
1
请在Spring Boot框架中完成以下Java代码
public void setBeanClassLoader(ClassLoader classLoader) { this.beanClassLoader = classLoader; } protected final List<String> filter(@Nullable Collection<String> classNames, ClassNameFilter classNameFilter, @Nullable ClassLoader classLoader) { if (CollectionUtils.isEmpty(classNames)) { return Collections.em...
@Override public boolean matches(String className, @Nullable ClassLoader classLoader) { return !isPresent(className, classLoader); } }; abstract boolean matches(String className, @Nullable ClassLoader classLoader); private static boolean isPresent(String className, @Nullable ClassLoader classLoader) ...
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\condition\FilteringSpringBootCondition.java
2
请完成以下Java代码
public static String initCap(final String in) { if (in == null || in.isEmpty()) { return in; } // boolean capitalize = true; final char[] data = in.toCharArray(); for (int i = 0; i < data.length; i++) { if (data[i] == ' ' || Character.isWhitespace(data[i])) { capitalize = true; } els...
int insertPosition = groupSize; while (insertPosition < result.length()) { result.insert(insertPosition, groupSeparator); insertPosition += groupSize + groupSeparator.length(); } return result.toString(); } public static Map<String, String> parseURLQueryString(@Nullable final String query) { final S...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\StringUtils.java
1
请完成以下Java代码
public void save(@NonNull final InvoiceAcct invoiceAcct) { // // Delete previous records queryBL.createQueryBuilder(I_C_Invoice_Acct.class) .addEqualsFilter(I_C_Invoice_Acct.COLUMNNAME_C_Invoice_ID, invoiceAcct.getInvoiceId()) .create() .delete(); // // Save new for (final InvoiceAcctRule rule...
} } private void updateRecordFromRule(@NonNull final I_C_Invoice_Acct record, @NonNull final InvoiceAcctRule from) { updateRecordFromRuleMatcher(record, from.getMatcher()); record.setC_ElementValue_ID(from.getElementValueId().getRepoId()); } private void updateRecordFromRuleMatcher(@NonNull final I_C_Invoice...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\acct\InvoiceAcctRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class C_User_Role { private final ITrxManager trxManager = Services.get(ITrxManager.class); private final IUserDAO userDAO = Services.get(IUserDAO.class); private final ExportBPartnerToRabbitMQService exportToRabbitMQService; private final UserRoleRepository userRoleRepository; public C_User_Role(@NonNull...
public void triggerSyncBPartnerWithExternalSystem(@NonNull final I_C_User_Role userRole) { final Set<BPartnerId> bpartnerIds = userRoleRepository.getAssignedUsers(UserRoleId.ofRepoId(userRole.getC_User_Role_ID())) .stream() .map(userDAO::getBPartnerIdByUserId) .collect(Collectors.toSet()); if (bpartne...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\rabbitmqhttp\interceptor\C_User_Role.java
2
请完成以下Java代码
public static DummyDeviceResponse generateRandomResponse() { final BigDecimal value = NumberUtils.randomBigDecimal(responseMinValue, responseMaxValue, 3); return new DummyDeviceResponse(value); } // // // // // private static class StaticStateHolder { private final HashMap<String, DeviceConfig> devices...
public synchronized @Nullable DeviceConfig removeDeviceByName(@NonNull final String deviceName) { final DeviceConfig existingDevice = devicesByName.remove(deviceName); if (existingDevice != null) { existingDevice.getAssignedAttributeCodes() .forEach(attributeCode -> devicesByAttributeCode.remove(at...
repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\dummy\DummyDeviceConfigPool.java
1
请完成以下Java代码
public boolean contains(String key) { return get(key) != null; } /** * 词典大小 * * @return */ public int size() { return trie.size(); } /** * 从一行词典条目创建值
* * @param params 第一个元素为键,请注意跳过 * @return */ protected abstract V createValue(String[] params); /** * 文本词典加载完毕的回调函数 * * @param map */ protected void onLoaded(TreeMap<String, V> map) { } }
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\common\CommonDictionary.java
1
请完成以下Java代码
public void setPrefix(String prefix) { Assert.notNull(prefix, "prefix cannot be null"); this.prefix = prefix; } /** * Whether to convert the authority value to upper case in the mapping. * @param convertToUpperCase defaults to {@code false} */ public void setConvertToUpperCase(boolean convertToUpperCase) ...
* @param convertToLowerCase defaults to {@code false} */ public void setConvertToLowerCase(boolean convertToLowerCase) { this.convertToLowerCase = convertToLowerCase; } /** * Sets a default authority to be assigned to all users * @param authority the name of the authority to be assigned to all users. */ ...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\authority\mapping\SimpleAuthorityMapper.java
1
请完成以下Java代码
public void deletePrivateAccess(final RemoveRecordPrivateAccessRequest request) { queryPrivateAccess(request.getPrincipal(), request.getRecordRef()) .create() .delete(); } private IQueryBuilder<I_AD_Private_Access> queryPrivateAccess( @NonNull final Principal principal, @NonNull final TableRecordRef...
.delete(); } @Override public void deleteUserOrgAssignmentByUserId(final UserId userId) { queryBL.createQueryBuilder(I_C_OrgAssignment.class) .addEqualsFilter(I_C_OrgAssignment.COLUMNNAME_AD_User_ID, userId) .create() .delete(); } @Value(staticConstructor = "of") private static class RoleOrgPermi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\impl\UserRolePermissionsDAO.java
1
请完成以下Java代码
public class SqlComposedKey { public static SqlComposedKey of( @NonNull final ImmutableSet<String> keyColumnNames, @NonNull final ImmutableMap<String, Object> values) { return new SqlComposedKey(keyColumnNames, values); } @Getter @NonNull private final ImmutableSet<String> keyColumnNames; @NonNull priva...
final Object value = getValue(keyColumnName); if (!sqlBuilder.isEmpty()) { sqlBuilder.append(", "); } sqlBuilder.append("?", value); } return sqlBuilder.build(); } public String getSqlWhereClauseById(@NonNull final String tableAlias) { final StringBuilder sql = new StringBuilder(); for (fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\sql\SqlComposedKey.java
1
请完成以下Java代码
public static final PricingConditionsBreakId ofOrNull(final int discountSchemaId, final int discountSchemaBreakId) { if (discountSchemaId > 0 && discountSchemaBreakId > 0) { return of(discountSchemaId, discountSchemaBreakId); } else { return null; } } public static final boolean matching(final Pri...
} } private final PricingConditionsId pricingConditionsId; private final int discountSchemaBreakId; private PricingConditionsBreakId(@NonNull final PricingConditionsId pricingConditionsId, final int discountSchemaBreakId) { Check.assumeGreaterThanZero(discountSchemaBreakId, "discountSchemaBreakId"); this.pr...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\PricingConditionsBreakId.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isDateChanged() { if (previousTime == null) { return true; } return !DateAndSeqNo.equals(previousTime, DateAndSeqNo.ofCandidate(candidate)); } @SuppressWarnings("BooleanMethodIsAlwaysInverted") public boolean isQtyChanged() { return getQtyDelta().signum() != 0; } // TODO figure out ...
/** * Convenience method that returns a new instance with negated candidate quantity and previousQty */ public CandidateSaveResult withNegatedQuantity() { return toBuilder() .candidate(candidate.withNegatedQuantity()) .previousQty(previousQty == null ? null : previousQty.negate()) .build(); } pub...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\CandidateSaveResult.java
2
请在Spring Boot框架中完成以下Java代码
public Notification getPersonalDeliveryNotification() { return personalDeliveryNotification; } /** * Sets the value of the personalDeliveryNotification property. * * @param value * allowed object is * {@link Notification } * */ public void setPersona...
public void setDelivery(Delivery value) { this.delivery = value; } /** * Gets the value of the invoiceAddress property. * * @return * possible object is * {@link Address } * */ public Address getInvoiceAddress() { return invoiceAddress; }...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\ProductAndServiceData.java
2
请完成以下Java代码
public BigDecimal getRate() { return rate; } /** * Sets the value of the rate property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setRate(BigDecimal value) { this.rate = value; } /** * Gets the ...
* Gets the value of the dtls property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the dtl...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\TaxAmount1.java
1
请完成以下Java代码
public org.compiere.model.I_C_BP_Group getCustomer_Group() { return get_ValueAsPO(COLUMNNAME_Customer_Group_ID, org.compiere.model.I_C_BP_Group.class); } @Override public void setCustomer_Group(final org.compiere.model.I_C_BP_Group Customer_Group) { set_ValueFromPO(COLUMNNAME_Customer_Group_ID, org.compiere.m...
if (M_Product_Category_ID < 1) set_Value (COLUMNNAME_M_Product_Category_ID, null); else set_Value (COLUMNNAME_M_Product_Category_ID, M_Product_Category_ID); } @Override public int getM_Product_Category_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_Category_ID); } @Override public void setPerce...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\commission\model\X_C_CommissionSettingsLine.java
1
请完成以下Java代码
public static BankStatementReconciliationView cast(final IView view) { return (BankStatementReconciliationView)view; } @Getter private final PaymentsToReconcileView paymentsToReconcileView; @Builder private BankStatementReconciliationView( @NonNull final ViewId bankStatementViewId, final BankStatementLi...
@Override public String getTableNameOrNull(final DocumentId documentId) { return null; } @Override public ViewId getIncludedViewId(final IViewRow row_NOTUSED) { return paymentsToReconcileView.getViewId(); } @Override protected BankStatementLineRows getRowsData() { return BankStatementLineRows.cast(sup...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bankstatement_reconciliation\BankStatementReconciliationView.java
1
请完成以下Java代码
private final ClientSetup getClientSetup() { if (_clientSetup == null) { _clientSetup = ClientSetup.newInstance(getCtx()); } return _clientSetup; } @Override protected void prepare() { try (final IAutoCloseable cacheFlagRestorer = CacheInterceptor.temporaryDisableCaching()) { final ClientSetup c...
// else if (PARAM_Phone.equalsIgnoreCase(name)) { clientSetup.setPhone(para.getParameterAsString()); } else if (PARAM_Fax.equalsIgnoreCase(name)) { clientSetup.setFax(para.getParameterAsString()); } else if (PARAM_EMail.equalsIgnoreCase(name)) { clientSetup.setEMail(para.g...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\setup\process\AD_Client_Setup.java
1
请完成以下Java代码
private void updateInvoiceCandidates() { updateInvoiceCandidateColumn(I_C_Invoice_Candidate.COLUMNNAME_Bill_Location_ID, oldBPLocationId, newBPLocationId); updateInvoiceCandidateColumn(I_C_Invoice_Candidate.COLUMNNAME_Bill_Location_Value_ID, oldLocationId, newLocationId); updateInvoiceCandidateColumn(I_C_Invoic...
final Collection<String> disallowedFlatrateStatuses = ImmutableSet.of(X_C_Flatrate_Term.CONTRACTSTATUS_Voided, X_C_Flatrate_Term.CONTRACTSTATUS_Quit); final ICompositeQueryUpdater<I_C_Flatrate_Term> queryUpdater = queryBL.createCompositeQueryUpdater(I_C_Flatrate_Term.class) .addSetColumnValue(columnName, newLocat...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\command\BPartnerLocationReplaceCommand.java
1
请在Spring Boot框架中完成以下Java代码
public FlushMode getFlushMode() { return this.flushMode; } public void setFlushMode(FlushMode flushMode) { this.flushMode = flushMode; } public SaveMode getSaveMode() { return this.saveMode; } public void setSaveMode(SaveMode saveMode) { this.saveMode = saveMode; } public @Nullable String getCleanup...
* enabled. */ NOTIFY_KEYSPACE_EVENTS, /** * No not attempt to apply any custom Redis configuration. */ NONE } /** * Type of Redis session repository to auto-configure. */ public enum RepositoryType { /** * Auto-configure a RedisSessionRepository or ReactiveRedisSessionRepository. */ ...
repos\spring-boot-4.0.1\module\spring-boot-session-data-redis\src\main\java\org\springframework\boot\session\data\redis\autoconfigure\SessionDataRedisProperties.java
2
请完成以下Java代码
public String getTextFormat() { return textFormatAttribute.getValue(this); } public void setTextFormat(String textFormat) { textFormatAttribute.setValue(this, textFormat); } public Text getText() { return textChild.getChild(this); } public void setText(Text text) { textChild.setChild(this...
.extendsType(Artifact.class) .instanceProvider(new ModelTypeInstanceProvider<TextAnnotation>() { public TextAnnotation newInstance(ModelTypeInstanceContext instanceContext) { return new TextAnnotationImpl(instanceContext); } }); textFormatAttribute = typeBuilder.stringAttribut...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\TextAnnotationImpl.java
1
请完成以下Java代码
public ProcessInstanceBuilder messageName(String messageName) { this.messageName = messageName; return this; } @Override public ProcessInstanceBuilder name(String processInstanceName) { this.processInstanceName = processInstanceName; return this; } @Override pub...
public String getProcessDefinitionId() { return processDefinitionId; } public String getProcessDefinitionKey() { return processDefinitionKey; } public String getMessageName() { return messageName; } public String getProcessInstanceName() { return processInstanc...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\runtime\ProcessInstanceBuilderImpl.java
1
请完成以下Java代码
public long size() { return rows.size(); } @Override public int getQueryLimit() { return -1; } @Override public boolean isQueryLimitHit() { return false; } @Override public ViewResult getPage( final int firstRow, final int pageLength, @NonNull final ViewRowsOrderBy orderBys) { final Lis...
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 UnsupportedOperationExce...
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代码
private Set<RuleChainId> updateRelatedRuleChains(TenantId tenantId, RuleChainId ruleChainId, Map<String, String> labelsMap) { Set<RuleChainId> updatedRuleChains = new HashSet<>(); List<RuleChainOutputLabelsUsage> usageList = getOutputLabelUsage(tenantId, ruleChainId); for (RuleChainOutputLabelsU...
relation.setType(newLabel); relationService.saveRelation(tenantId, relation); } } } private boolean isOutputRuleNode(RuleNode ruleNode) { return isRuleNode(ruleNode, TbRuleChainOutputNode.class); } private boolean isInputRuleNode(RuleNode ruleNode) { ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\rule\DefaultTbRuleChainService.java
2
请完成以下Java代码
public void logout() { userSession.assertLoggedIn(); final Login loginService = getLoginService(); destroyMFSession(loginService); } @PostMapping("/resetPassword") public void resetPasswordRequest(@RequestBody final JSONResetPasswordRequest request) { userSession.assertNotLoggedIn(); usersService.crea...
{ return imageService.getEmptyImage(); } return imageService.getWebuiImage(avatarId, maxWidth, maxHeight) .toResponseEntity(); } @PostMapping("/resetPassword/{token}") public JSONLoginAuthResponse resetPasswordComplete( @PathVariable("token") final String token, @RequestBody final JSONResetPasswor...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\login\LoginRestController.java
1
请在Spring Boot框架中完成以下Java代码
public void setReplicationModeAttr(ReplicationModeEnum value) { this.replicationModeAttr = value; } /** * Gets the value of the replicationTypeAttr property. * * @return * possible object is * {@link ReplicationTypeEnum } * */ public ReplicationTypeE...
/** * Sets the value of the sequenceNoAttr property. * * @param value * allowed object is * {@link BigInteger } * */ public void setSequenceNoAttr(BigInteger value) { this.sequenceNoAttr = value; } /** * Gets the value of the trxNameAttr propert...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDIExpCBPartnerProductVType.java
2
请完成以下Java代码
public final class AttributeSetDescriptor { public static final AttributeSetDescriptor NONE = AttributeSetDescriptor.builder() .attributeSetId(AttributeSetId.NONE) .name("NONE") .isInstanceAttribute(false) .mandatoryType(AttributeSetMandatoryType.NotMandatory) .attributes(ImmutableList.of()) .build()...
public Optional<AttributeSetAttribute> getByAttributeId(@NonNull final AttributeId attributeId) { return Optional.ofNullable(byId.get(attributeId)); } public OptionalBoolean getMandatoryOnReceipt(@NonNull final AttributeId attributeId) { return getByAttributeId(attributeId) .map(AttributeSetAttribute::getM...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\AttributeSetDescriptor.java
1
请完成以下Java代码
public class RuntimeReceiveMessagePayloadEventListener implements ReceiveMessagePayloadEventListener { private final RuntimeService runtimeService; private final ManagementService managementService; public RuntimeReceiveMessagePayloadEventListener( RuntimeService runtimeService, Managemen...
"Message subscription name '" + messageName + "' with correlation key '" + correlationKey + "' not found." ); } } static class FindMessageEventSubscription implements Command<EventSubscriptionEntity> { private final St...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\impl\RuntimeReceiveMessagePayloadEventListener.java
1
请在Spring Boot框架中完成以下Java代码
public void process(final Exchange exchange) { final PushBOMsRouteContext context = ProcessorHelper.getPropertyOrThrowError(exchange, GRSSignumConstants.ROUTE_PROPERTY_PUSH_BOMs_CONTEXT, PushBOMsRouteContext.class); if (Check.isBlank(context.getExportDirectoriesBasePath())) { exchange.getIn().setBody(null); ...
final JsonExternalReferenceTarget targetBPartner = JsonExternalReferenceTarget.ofTypeAndId(EXTERNAL_REF_TYPE_BPARTNER, bpartnerMetasfreshId); final JsonExternalReferenceTarget targetProduct = JsonExternalReferenceTarget.ofTypeAndId(EXTERNAL_REF_TYPE_PRODUCT, ExternalIdentifierFormat.asExternalIdentifier(jsonBOM.getPr...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\from_grs\bom\processor\ProductsAttachFileProcessor.java
2
请完成以下Java代码
private void cut() { } @Around("cut()") public Object around(ProceedingJoinPoint point) throws Throwable { Signature signature = point.getSignature(); MethodSignature methodSignature = null; if (!(signature instanceof MethodSignature)) { throw new IllegalArgumentExcept...
DataSourceContextHolder.setDataSourceType(DSEnum.DATA_SOURCE_CORE); log.debug("设置数据源为:dataSourceCore"); } try { return point.proceed(); } finally { log.debug("清空数据源信息!"); DataSourceContextHolder.clearDataSourceType(); } } /** ...
repos\SpringBootBucket-master\springboot-multisource\src\main\java\com\xncoding\pos\common\aop\MultiSourceExAop.java
1
请完成以下Java代码
protected void configureTenantCheck(QueryParameters query) { TenantCheck tenantCheck = query.getTenantCheck(); if (isTenantCheckEnabled()) { Authentication currentAuthentication = getCurrentAuthentication(); tenantCheck.setTenantCheckEnabled(true); tenantCheck.setAuthTenantIds(currentAuthent...
permCheck.setResource(resource); permCheck.setResourceIdQueryParam(queryParam); permCheck.setPermission(permission); query.getAuthCheck().addAtomicPermissionCheck(permCheck); } } protected boolean isPermissionDisabled(Permission permission) { List<String> disabledPermissions = getProcessE...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\cockpit\plugin\resource\AbstractCockpitPluginResource.java
1
请完成以下Java代码
public int getC_OrderTax_ID() { return get_ValueAsInt(COLUMNNAME_C_OrderTax_ID); } @Override public void setC_Tax_ID (final int C_Tax_ID) { if (C_Tax_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Tax_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Tax_ID, C_Tax_ID); } @Override public int getC_Tax_ID()...
@Override public boolean isWholeTax() { return get_ValueAsBoolean(COLUMNNAME_IsWholeTax); } @Override public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } @Ov...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_OrderTax.java
1
请完成以下Java代码
public Optional<ZonedDateTime> getCreatedValue(@NonNull final DataEntryFieldId fieldId) { return getCreatedUpdatedInfo(fieldId) .map(CreatedUpdatedInfo::getCreated); } public Optional<UserId> getCreatedByValue(@NonNull final DataEntryFieldId fieldId) { return getCreatedUpdatedInfo(fieldId) .map(Created...
public Optional<CreatedUpdatedInfo> getCreatedUpdatedInfo(@NonNull final DataEntryFieldId fieldId) { return getOptional(fieldId) .map(DataEntryRecordField::getCreatedUpdatedInfo); } public Optional<Object> getFieldValue(@NonNull final DataEntryFieldId fieldId) { return getOptional(fieldId) .map(DataEnt...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dataentry\data\DataEntryRecord.java
1
请在Spring Boot框架中完成以下Java代码
private void unmarkBillToDefaultContacts(final List<BPartnerContact> contacts) { for (final BPartnerContact contact : contacts) { final BPartnerContactType contactType = contact.getContactType(); if (contactType == null) { continue; } contactType.setBillToDefault(false); } } private void u...
private void unmarkShipToDefaultContacts(final List<BPartnerContact> contacts) { for (final BPartnerContact contact : contacts) { final BPartnerContactType contactType = contact.getContactType(); if (contactType == null) { continue; } contactType.setShipToDefault(false); } } private IPrici...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\service\OrgChangeCommand.java
2
请完成以下Java代码
public Optional<BPartnerLocationId> resolveBPartnerLocationExternalIdentifier(@NonNull final BPartnerId bPartnerId, @NonNull final OrgId orgId, @NonNull final ExternalIdentifier externalIdentifier) { return bPartnerMasterdataProvider.resolveBPartnerLocationExternalIdentifier(bPartnerId, orgId, externalIdentifier); ...
case VALUE: queryBuilder.value(paymentTerm.asValue()); break; default: throw new InvalidIdentifierException(paymentTerm); } final Optional<PaymentTermId> paymentTermId = paymentTermRepo.firstIdOnly(queryBuilder.build()); return paymentTermId.orElseThrow(() -> MissingResourceException.builder() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\ordercandidates\impl\MasterdataProvider.java
1
请在Spring Boot框架中完成以下Java代码
public class HardwareTrayId implements RepoIdAware { int repoId; @NonNull HardwarePrinterId printerId; public static HardwareTrayId cast(@Nullable final RepoIdAware repoIdAware) { return (HardwareTrayId)repoIdAware; } public static HardwareTrayId ofRepoId(@NonNull final HardwarePrinterId printerId, final in...
public static HardwareTrayId ofRepoIdOrNull( @Nullable final HardwarePrinterId printerId, final int trayId) { return printerId != null && trayId > 0 ? ofRepoId(printerId, trayId) : null; } private HardwareTrayId(@NonNull final HardwarePrinterId printerId, final int trayId) { this.repoId = Check.assumeGre...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\HardwareTrayId.java
2
请完成以下Java代码
public String getFirstName() { return firstName; } @Override public void setFirstName(String firstName) { this.firstName = firstName; } @Override public String getLastName() { return lastName; } @Override public void setLastName(String lastName) { t...
// Default constructor for Gson public StudentV2() { } public StudentV2(String firstName, String lastName, String major) { this.firstName = firstName; this.lastName = lastName; this.major = major; } @Override public boolean equals(Object o) { if (this == o) ...
repos\tutorials-master\json-modules\gson-2\src\main\java\com\baeldung\gson\multiplefields\StudentV2.java
1
请完成以下Java代码
public void setSourceRef(String sourceRef) { this.sourceRef = sourceRef; } public String getTargetRef() { return targetRef; } public void setTargetRef(String targetRef) { this.targetRef = targetRef; } public String getMessageRef() { return messageRef; } ...
} public MessageFlow clone() { MessageFlow clone = new MessageFlow(); clone.setValues(this); return clone; } public void setValues(MessageFlow otherFlow) { super.setValues(otherFlow); setName(otherFlow.getName()); setSourceRef(otherFlow.getSourceRef()); ...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\MessageFlow.java
1
请完成以下Java代码
public Object getValue(VariableScope variableScope) { return getValue(variableScope, null); } public Object getValue(VariableScope variableScope, BaseDelegateExecution contextExecution) { ELContext elContext = expressionManager.getElContext(variableScope); try { ExpressionGetInvocation invocation...
} public void setValue(Object value, VariableScope variableScope, BaseDelegateExecution contextExecution) { ELContext elContext = expressionManager.getElContext(variableScope); try { ExpressionSetInvocation invocation = new ExpressionSetInvocation(valueExpression, elContext, value, contextExecution); ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\el\JuelExpression.java
1
请在Spring Boot框架中完成以下Java代码
public class ADUIElementGroupNameFQ { @NonNull AdUIElementGroupId uiElementGroupId; String name; ADUIColumnNameFQ uiColumnName; boolean missing; public static ADUIElementGroupNameFQ missing(@NonNull final AdUIElementGroupId uiElementGroupId) { return builder().uiElementGroupId(uiElementGroupId).missing(true)...
{ final StringBuilder sb = new StringBuilder(); if (uiColumnName != null) { sb.append(uiColumnName.toShortString()); } if (sb.length() > 0) { sb.append(" -> "); } sb.append(name); return sb.toString(); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\validator\sql_migration_context_info\names\ADUIElementGroupNameFQ.java
2
请完成以下Java代码
private DocumentFilter createAreaSearchFilter(final I_C_Location location) { final DocumentEntityDescriptor entityDescriptor = documentCollection.getDocumentEntityDescriptor(getWindowId()); final GeoLocationDocumentQuery query = createGeoLocationQuery(location); return geoLocationDocumentService.createDocumentF...
private I_C_Location getSelectedLocationOrFirstAvailable() { final Set<Integer> bpLocationIds = getSelectedIncludedRecordIds(I_C_BPartner_Location.class); if (!bpLocationIds.isEmpty()) { // retrieve the selected location final LocationId locationId = bpartnersRepo.getBPartnerLocationAndCaptureIdInTrx(BPart...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\location\geocoding\process\C_BPartner_Window_AreaSearchProcess.java
1
请完成以下Java代码
private static Method getGroupsForUserMethod() { if (getGroupsForUser == null) { getGroupsForUser = getMethod("com.ibm.websphere.security.UserRegistry", "getGroupsForUser", new String[] { "java.lang.String" }); } return getGroupsForUser; } private static Method getSecurityNameMethod() { if (getSecuri...
return narrow; } // SEC-803 private static Class<?> getWSCredentialClass() { if (wsCredentialClass == null) { wsCredentialClass = getClass("com.ibm.websphere.security.cred.WSCredential"); } return wsCredentialClass; } private static Class<?> getClass(String className) { try { return Class.forName(c...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\preauth\websphere\DefaultWASUsernameAndGroupsExtractor.java
1
请完成以下Java代码
public User editUser(User forEdit) throws UserException { try { if (forEdit.getId() == null) throw new UserException("ID cannot be blank"); User toEdit = userMap.get(forEdit.getId()); if (toEdit == null) throw new UserException("User not foun...
} catch (Exception ex) { throw new UserException(ex.getMessage()); } } @Override public void deleteUser(String id) { userMap.remove(id); } @Override public boolean userExist(String id) { return userMap.containsKey(id); } }
repos\tutorials-master\web-modules\spark-java\src\main\java\com\baeldung\sparkjava\UserServiceMapImpl.java
1
请完成以下Java代码
public Date getCreateTime() { return createTime; } /** * Set the creates the time. * * @param createTime the creates the time */ public void setCreateTime(Date createTime) { this.createTime = createTime; } /** * Get the update by. * * @return the ...
*/ public Integer getDisabled() { return disabled; } /** * Set the disabled. * * @param disabled the disabled */ public void setDisabled(Integer disabled) { this.disabled = disabled; } /** * Get the theme. * * @return the theme */ pub...
repos\springBoot-master\springboot-mybatis\src\main\java\com\us\example\bean\User.java
1
请完成以下Java代码
public WFActivity getActivityById(@NonNull final WFActivityId id) { return getActivityByIdOptional(id) .orElseThrow(() -> new AdempiereException(NO_ACTIVITY_ERROR_MSG) .appendParametersToMessage() .setParameter("ID", id) .setParameter("WFProcess", this)); } @NonNull public Optional<WFActivi...
} private WFProcess withChangedActivityById(@NonNull final WFActivityId wfActivityId, @NonNull final UnaryOperator<WFActivity> remappingFunction) { return withChangedActivities(wfActivity -> wfActivity.getId().equals(wfActivityId) ? remappingFunction.apply(wfActivity) : wfActivity); } private WFProcess ...
repos\metasfresh-new_dawn_uat\backend\de.metas.workflow.rest-api\src\main\java\de\metas\workflow\rest_api\model\WFProcess.java
1
请在Spring Boot框架中完成以下Java代码
public class CustomerService { @Autowired private OrderClient orderClient; private List<Customer> customers = Arrays.asList( new Customer(1, "John", "Smith"), new Customer(2, "Deny", "Dominic")); @GetMapping public List<Customer> getAllCustomers() { return custom...
.filter(customer -> customer.getId() == id) .findFirst() .orElseThrow(IllegalArgumentException::new); } @PostMapping(value = "/order") public String sendOrder(@RequestBody Map<String, Object> body) { OrderDTO dto = new OrderDTO(); dto.setCustomerId((Integer...
repos\tutorials-master\spring-cloud-modules\spring-cloud-bootstrap\customer-service\src\main\java\com\baeldung\customerservice\CustomerService.java
2
请在Spring Boot框架中完成以下Java代码
public boolean configureMessageConverters(final List<MessageConverter> messageConverters) { final MappingJackson2MessageConverter jsonConverter = new MappingJackson2MessageConverter(); jsonConverter.setObjectMapper(JsonObjectMapperHolder.sharedJsonObjectMapper()); messageConverters.add(jsonConverter); return t...
{ logger.warn("Failed sending: message={}, channel={}, sent={}", message, channel, sent, ex); } } @Override public void afterReceiveCompletion(final Message<?> message, final @NonNull MessageChannel channel, final Exception ex) { if (ex != null) { logger.warn("Failed receiving: message={}, cha...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\serverRoot\de.metas.adempiere.adempiere.serverRoot.base\src\main\java\de\metas\server\config\WebsocketConfig.java
2
请完成以下Java代码
public List<String> getAuthenticatedGroupIds() { IdentityService identityService = processEngineConfiguration.getIdentityService(); Authentication currentAuthentication = identityService.getCurrentAuthentication(); if(currentAuthentication == null) { return null; } else { return currentAuthe...
} public void setCurrentJob(JobEntity currentJob) { this.currentJob = currentJob; } public boolean isRestrictUserOperationLogToAuthenticatedUsers() { return restrictUserOperationLogToAuthenticatedUsers; } public void setRestrictUserOperationLogToAuthenticatedUsers(boolean restrictUserOperationLogTo...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\interceptor\CommandContext.java
1
请在Spring Boot框架中完成以下Java代码
public class Application implements CommandLineRunner { private static final Logger LOGGER = (Logger) LoggerFactory.getLogger(Application.class); @Autowired private PersonRepository repository; @Autowired private DatabaseSeeder dbSeeder; public static void main(String[] args) { System...
Person newPerson = new Person("Franz", "Kafka"); Person result = repository.save(newPerson); LOGGER.info(result.toString()); LOGGER.info("@@ delete"); optionalPerson.ifPresent(person -> repository.delete(person)); LOGGER.info("@@ findAll() call..."); repository.findAll() ...
repos\tutorials-master\persistence-modules\spring-data-jdbc\src\main\java\com\baeldung\springdatajdbcintro\Application.java
2
请完成以下Java代码
public class PeriodStatus extends JavaProcess { /** Action */ private String p_PeriodAction = null; @Override protected void prepare() { final ProcessInfoParameter[] para = getParametersAsArray(); for (int i = 0; i < para.length; i++) { final String name = para[i].getParameterName(); if (para[i].getPa...
{ continue; } pc.setPeriodStatus(newPeriodStatus); pc.setPeriodAction(X_C_PeriodControl.PERIODACTION_NoAction); InterfaceWrapperHelper.save(pc); } return "@Ok@"; } @Override protected void postProcess(boolean success) { // // Reset caches CacheMgt.get().reset(I_C_PeriodControl.Table_Na...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\PeriodStatus.java
1
请完成以下Java代码
private void publishRfQClose(final I_C_RfQResponseLine rfqResponseLine) { // Create and collect the RfQ close event final boolean winnerKnown = true; final SyncRfQCloseEvent syncRfQCloseEvent = syncObjectsFactory.createSyncRfQCloseEvent(rfqResponseLine, winnerKnown); if (syncRfQCloseEvent != null) { syncR...
{ webuiPush.pushRfQCloseEvents(syncRfQCloseEventsCopy); } // Internally push the planned product supplies, to create the PMM_PurchaseCandidates serverSyncBL.reportProductSupplies(PutProductSuppliesRequest.of(syncProductSupplies)); } } private static <T> List<T> copyAndClear(final List<T> list) { i...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\rfq\PMMWebuiRfQResponsePublisherInstance.java
1
请完成以下Java代码
public class NoUnmappedLeafInstanceValidator implements MigratingActivityInstanceValidator, MigratingTransitionInstanceValidator, MigratingCompensationInstanceValidator { public void validate(MigratingActivityInstance migratingInstance, MigratingProcessInstance migratingProcessInstance, MigratingActivityInstan...
return hasNoInstruction(migratingInstance) && migratingInstance.getChildren().isEmpty(); } protected boolean isInvalid(MigratingEventScopeInstance migratingInstance) { return hasNoInstruction(migratingInstance.getEventSubscription()) && migratingInstance.getChildren().isEmpty(); } protected boolean isInva...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\validation\instance\NoUnmappedLeafInstanceValidator.java
1
请完成以下Java代码
public void setShipperRouteCodeName (final @Nullable java.lang.String ShipperRouteCodeName) { set_Value (COLUMNNAME_ShipperRouteCodeName, ShipperRouteCodeName); } @Override public java.lang.String getShipperRouteCodeName() { return get_ValueAsString(COLUMNNAME_ShipperRouteCodeName); } @Override public vo...
public java.lang.String getURL() { return get_ValueAsString(COLUMNNAME_URL); } @Override public void setURL3 (final @Nullable java.lang.String URL3) { set_Value (COLUMNNAME_URL3, URL3); } @Override public java.lang.String getURL3() { return get_ValueAsString(COLUMNNAME_URL3); } @Override public v...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_BPartner.java
1
请在Spring Boot框架中完成以下Java代码
static class GeodeGatewaySenderConfiguration { @Bean GatewaySenderFactoryBean customersByNameGatewaySender(Cache cache, @Value("${geode.distributed-system.remote.id:1}") int remoteDistributedSystemId) { GatewaySenderFactoryBean gatewaySender = new GatewaySenderFactoryBean(cache); gatewaySender.setPersi...
@Override public void configure(String beanName, PeerRegionFactoryBean<?, ?> regionBean) { if (CUSTOMERS_BY_NAME_REGION.equals(beanName)) { regionBean.setGatewaySenders(ArrayUtils.asArray(gatewaySender)); } } }; } } // end::gateway-sender-configuration[] // end::gateway-configuration[] ...
repos\spring-boot-data-geode-main\spring-geode-samples\caching\multi-site\src\main\java\example\app\caching\multisite\server\BootGeodeMultiSiteCachingServerApplication.java
2
请在Spring Boot框架中完成以下Java代码
public BackChannelLogoutConfigurer logoutHandler(LogoutHandler logoutHandler) { this.logoutHandler = (http) -> logoutHandler; return this; } void configure(B http) { LogoutHandler oidcLogout = this.logoutHandler.apply(http); LogoutHandler sessionLogout = new SecurityContextLogoutHandler(); LogoutCon...
private static final class EitherLogoutHandler implements LogoutHandler { private final LogoutHandler left; private final LogoutHandler right; EitherLogoutHandler(LogoutHandler left, LogoutHandler right) { this.left = left; this.right = right; } @Override public void logout(HttpServletRequ...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\oauth2\client\OidcLogoutConfigurer.java
2
请完成以下Java代码
public String[] getCaseActivityInstanceIds() { return caseActivityInstanceIds; } public String getCaseInstanceId() { return caseInstanceId; } public String getCaseDefinitionId() { return caseDefinitionId; } public String[] getCaseActivityIds() { return caseActivityIds; } public Strin...
public Boolean getEnded() { return ended; } public Integer getCaseActivityInstanceState() { return caseActivityInstanceState; } public Boolean isRequired() { return required; } public boolean isTenantIdSet() { return isTenantIdSet; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricCaseActivityInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class NettyServerProperties { /** * Connection timeout of the Netty channel. */ private @Nullable Duration connectionTimeout; /** * Maximum content length of an H2C upgrade request. */ private DataSize h2cMaxContentLength = DataSize.ofBytes(0); /** * Initial buffer size for HTTP request decodin...
} public DataSize getMaxInitialLineLength() { return this.maxInitialLineLength; } public void setMaxInitialLineLength(DataSize maxInitialLineLength) { this.maxInitialLineLength = maxInitialLineLength; } public @Nullable Integer getMaxKeepAliveRequests() { return this.maxKeepAliveRequests; } public void...
repos\spring-boot-4.0.1\module\spring-boot-reactor-netty\src\main\java\org\springframework\boot\reactor\netty\autoconfigure\NettyServerProperties.java
2
请完成以下Java代码
public PlatformTransactionManager getTransactionManager() { return transactionManager; } public void setTransactionManager(PlatformTransactionManager transactionManager) { this.transactionManager = transactionManager; } public String getDeploymentName() { return deploymentName;...
public String getDeploymentMode() { return deploymentMode; } public void setDeploymentMode(String deploymentMode) { this.deploymentMode = deploymentMode; } /** * Gets the {@link AutoDeploymentStrategy} for the provided mode. This method may be overridden to implement custom deploy...
repos\Activiti-develop\activiti-core\activiti-spring\src\main\java\org\activiti\spring\SpringProcessEngineConfiguration.java
1
请完成以下Java代码
public void remove() { throw new UnsupportedOperationException("Remove operation not supported."); } private Iterator<ET> getBufferIterator() { // Buffer iterator was not initialized yet, loading first page if (bufferIterator == null) { loadNextPage(); return bufferIterator; } // Buffer iterator...
* Sets buffer/page size, i.e. the number of rows to be loaded by this iterator at a time. * * @see IQuery#OPTION_GuaranteedIteratorRequired */ public void setBufferSize(final int bufferSize) { Check.assume(bufferSize > 0, "bufferSize > 0"); this.bufferSize = bufferSize; } public int getBufferSize() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\POBufferedIterator.java
1
请完成以下Java代码
private Throwable extractThrowable(final Object[] msgParameters) { if (msgParameters == null || msgParameters.length == 0) { return null; } final Object lastEntry = msgParameters[msgParameters.length - 1]; return lastEntry instanceof Throwable ? (Throwable)lastEntry : null; } private Object[] ...
return msgParameters; } final int newLen = msgParameters.length - 1; final Object[] msgParametersNew = new Object[newLen]; System.arraycopy(msgParameters, 0, msgParametersNew, 0, newLen); return msgParametersNew; } @Value public static class FormattedMsgWithAdIssueId { String formattedMessage; Optio...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\error\LoggableWithThrowableUtil.java
1
请完成以下Java代码
public void setEncodeHashAsBase64(boolean encodeHashAsBase64) { this.encodeHashAsBase64 = encodeHashAsBase64; } /** * Encodes the rawPass using a MessageDigest. If a salt is specified it will be merged * with the password before encoding. * @param rawPassword The plain text password * @return Hex string of...
* @param rawPassword plain text password * @param encodedPassword previously encoded password * @return true or false */ @Override protected boolean matchesNonNull(String rawPassword, String encodedPassword) { String salt = extractSalt(encodedPassword); String rawPasswordEncoded = digest(salt, rawPassword);...
repos\spring-security-main\crypto\src\main\java\org\springframework\security\crypto\password\Md4PasswordEncoder.java
1
请在Spring Boot框架中完成以下Java代码
public String url() { return obtain((properties) -> this.connectionDetails.getUrl(), OtlpConfig.super::url); } @Override public AggregationTemporality aggregationTemporality() { return obtain(OtlpMetricsProperties::getAggregationTemporality, OtlpConfig.super::aggregationTemporality); } @Override public Map<...
@Override public int maxScale() { return obtain(OtlpMetricsProperties::getMaxScale, OtlpConfig.super::maxScale); } @Override public int maxBucketCount() { return obtain(OtlpMetricsProperties::getMaxBucketCount, OtlpConfig.super::maxBucketCount); } @Override public TimeUnit baseTimeUnit() { return obtain(...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\otlp\OtlpMetricsPropertiesConfigAdapter.java
2
请完成以下Java代码
private static String extractLanguagePartFromTag(final String tag) { final int idx = tag.indexOf("-"); return idx > 0 ? tag.substring(0, idx) : null; } public static String toHttpLanguageTag(final String adLanguage) { return adLanguage.replace('_', '-').trim().toLowerCase(); } public boolean isBaseLanguag...
{ } public ADLanguageList build() { return new ADLanguageList(this); } public Builder addLanguage(@NonNull final String adLanguage, @NonNull final String caption, final boolean isBaseLanguage) { final ValueNamePair languageVNP = ValueNamePair.of(adLanguage, caption); languagesByADLanguage.put(adL...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\ADLanguageList.java
1
请完成以下Java代码
private void touch(String sessionKey) { this.redisOps.hasKey(sessionKey); } private String getSessionKey(String sessionId) { return this.namespace + ":sessions:" + sessionId; } /** * Set the namespace for the keys. * @param namespace the namespace */ public void setNamespace(String namespace) { Asser...
public void setClock(Clock clock) { Assert.notNull(clock, "clock cannot be null"); this.clock = clock; } /** * Configures how many sessions will be queried at a time to be cleaned up. Defaults * to 100. * @param cleanupCount how many sessions to be queried, must be bigger than 0. */ public void setClean...
repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\SortedSetRedisSessionExpirationStore.java
1
请完成以下Java代码
public class Sale { @Indexed(unique = true) private SaleId saleId; private Double value; public Sale() { } public Sale(SaleId saleId) { super(); this.saleId = saleId; } public SaleId getSaleId() {
return saleId; } public void setSaleId(SaleId saleId) { this.saleId = saleId; } public Double getValue() { return value; } public void setValue(Double value) { this.value = value; } }
repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb-2\src\main\java\com\baeldung\boot\unique\field\data\Sale.java
1
请在Spring Boot框架中完成以下Java代码
public List<BPartnerBankAccount> getBpartnerBankAccount(final BankAccountQuery query) { final IQueryBuilder<I_C_BP_BankAccount> queryBuilder = queryBL.createQueryBuilder(I_C_BP_BankAccount.class) .addOnlyActiveRecordsFilter() .orderByDescending(I_C_BP_BankAccount.COLUMNNAME_IsDefault); // DESC (Y, then N) ...
{ return BPartnerBankAccount.builder() .id(BPartnerBankAccountId.ofRepoId(record.getC_BPartner_ID(), record.getC_BP_BankAccount_ID())) .currencyId(CurrencyId.ofRepoId(record.getC_Currency_ID())) .active(record.isActive()) .orgMappingId(OrgMappingId.ofRepoIdOrNull(record.getAD_Org_Mapping_ID())) .i...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\impl\BPBankAccountDAO.java
2