instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public Date getUpdateTime() { return updateTime; } /** * Set the update time. * * @param updateTime the update time */ public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } /** * Get the disabled. * * @return the disabled ...
* @return the theme */ public String getTheme() { return theme; } /** * Set the theme. * * @param theme theme */ public void setTheme(String theme) { this.theme = theme; } /** * Get the checks if is ldap. * * @return the checks if is ldap...
repos\springBoot-master\springboot-mybatis\src\main\java\com\us\example\bean\User.java
1
请完成以下Java代码
public String getCommentBody() { return commentBody; } public void setCommentBody(String commentBody) { this.commentBody = commentBody == null ? null : commentBody.trim(); } public Byte getCommentStatus() { return commentStatus; } public void setCommentStatus(Byte comm...
public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["...
repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\entity\NewsComment.java
1
请完成以下Java代码
public static <T> T readValue(String jsonStr, Class<T> clazz) { try { return getInstance().readValue(jsonStr, clazz); } catch (JsonParseException e) { logger.error(e.getMessage(), e); } catch (JsonMappingException e) { logger.error(e.getMessage(), e); } catch (IOException e) { logger.error(e.getM...
* @param <T> * @return */ public static <T> T readValue(String jsonStr, Class<?> parametrized, Class<?>... parameterClasses) { try { JavaType javaType = getInstance().getTypeFactory().constructParametricType(parametrized, parameterClasses); return getInstance().readValue(jsonStr, javaType); } catch (Json...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\util\JacksonUtil.java
1
请完成以下Java代码
public Collection<Documentation> getDocumentations() { return documentationCollection.get(this); } public ExtensionElements getExtensionElements() { return extensionElementsChild.getChild(this); } public void setExtensionElements(ExtensionElements extensionElements) { extensionElementsChild.setChi...
Collection<Reference> references = new ArrayList<Reference>(); // we traverse all incoming references in reverse direction for (Reference<?> reference : idAttribute.getIncomingReferences()) { ModelElementType sourceElementType = reference.getReferenceSourceElementType(); Class<? extends ModelElemen...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\BaseElementImpl.java
1
请在Spring Boot框架中完成以下Java代码
private static String getMessage(PropertySource<?> propertySource, @Nullable ConfigDataResource location, String propertyName, @Nullable Origin origin) { StringBuilder message = new StringBuilder("Inactive property source '"); message.append(propertySource.getName()); if (location != null) { message.append(...
* Return the origin or the property or {@code null}. * @return the property origin */ public @Nullable Origin getOrigin() { return this.origin; } /** * Throw an {@link InactiveConfigDataAccessException} if the given * {@link ConfigDataEnvironmentContributor} contains the property. * @param contributor t...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\InactiveConfigDataAccessException.java
2
请完成以下Java代码
public boolean isCachable() { return true; } @Override public boolean isAbleToStore(Object value) { return value instanceof BpmnAggregation; } @Override public boolean isReadOnly() { return true; } @Override public void setValue(Object value, ValueFields va...
} } @Override public Object getValue(ValueFields valueFields) { CommandContext commandContext = Context.getCommandContext(); if (commandContext != null) { return BpmnAggregation.aggregateOverview(valueFields.getTextValue(), valueFields.getName(), commandContext); } else ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\variable\BpmnAggregatedVariableType.java
1
请完成以下Java代码
public class TimerScheduledListenerDelegate implements ActivitiEventListener { private List<BPMNElementEventListener<BPMNTimerScheduledEvent>> processRuntimeEventListeners; private ToTimerScheduledConverter converter; public TimerScheduledListenerDelegate( List<BPMNElementEventListener<BPMNTimerS...
public void onEvent(ActivitiEvent event) { converter .from(event) .ifPresent(convertedEvent -> { for (BPMNElementEventListener<BPMNTimerScheduledEvent> listener : processRuntimeEventListeners) { listener.onEvent(convertedEvent); } ...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\event\internal\TimerScheduledListenerDelegate.java
1
请完成以下Spring Boot application配置
quarkus.datasource.db-kind=h2 quarkus.datasource.jdbc.url=jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1 quarkus.datasource.username=sa quarkus.datasource.password=sa quarkus.hibernate
-orm.database.generation=drop-and-create quarkus.hibernate-orm.log.sql=true
repos\tutorials-master\quarkus-modules\quarkus-panache\src\main\resources\application.properties
2
请完成以下Java代码
public boolean isProcessed() { return false; } @Nullable @Override public DocumentPath getDocumentPath() { return null; } @Override public Set<String> getFieldNames() { return values.getFieldNames();
} @Override public ViewRowFieldNameAndJsonValues getFieldNameAndJsonValues() { return values.get(this); } @Override @NonNull public List<ProductionSimulationRow> getIncludedRows() { return includedRows; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\simulation\ProductionSimulationRow.java
1
请完成以下Java代码
public String getF_ISPUB() { return F_ISPUB; } public void setF_ISPUB(String f_ISPUB) { F_ISPUB = f_ISPUB; } public String getF_ALLOWADD() { return F_ALLOWADD; } public void setF_ALLOWADD(String f_ALLOWADD) { F_ALLOWADD = f_ALLOWADD; } public String ge...
public String getF_VERSION() { return F_VERSION; } public void setF_VERSION(String f_VERSION) { F_VERSION = f_VERSION; } public String getF_ISSTD() { return F_ISSTD; } public void setF_ISSTD(String f_ISSTD) { F_ISSTD = f_ISSTD; } public Timestamp getF_...
repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\common\vo\BscTollItem.java
1
请完成以下Java代码
public class OAuth2AuthorizationCodeRequestAuthenticationException extends OAuth2AuthenticationException { private final OAuth2AuthorizationCodeRequestAuthenticationToken authorizationCodeRequestAuthentication; /** * Constructs an {@code OAuth2AuthorizationCodeRequestAuthenticationException} using * the provide...
*/ public OAuth2AuthorizationCodeRequestAuthenticationException(OAuth2Error error, Throwable cause, @Nullable OAuth2AuthorizationCodeRequestAuthenticationToken authorizationCodeRequestAuthentication) { super(error, cause); this.authorizationCodeRequestAuthentication = authorizationCodeRequestAuthentication; } ...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2AuthorizationCodeRequestAuthenticationException.java
1
请完成以下Java代码
public boolean isRetriesLeft() { return retriesLeft; } public boolean isExecutable() { return executable; } public boolean isOnlyTimers() { return onlyTimers; } public boolean isOnlyMessages() { return onlyMessages; } public Date getDuedateHigherThan()...
public boolean isNoRetriesLeft() { return noRetriesLeft; } public String getTenantId() { return tenantId; } public String getTenantIdLike() { return tenantIdLike; } public boolean isWithoutTenantId() { return withoutTenantId; } }
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\JobQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class DelayedCallable implements Callable<String> { private String name; private long period; private CountDownLatch latch; public DelayedCallable(String name, long period, CountDownLatch latch) { this(name, period); this.latch = latch; } public DelayedCallable(String n...
try { Thread.sleep(period); if (latch != null) { latch.countDown(); } } catch (InterruptedException ex) { // handle exception ex.printStackTrace(); Thread.currentThread().interrupt(); } return name; } ...
repos\tutorials-master\core-java-modules\core-java-concurrency-basic-3\src\main\java\com\baeldung\concurrent\executorservice\DelayedCallable.java
2
请完成以下Java代码
public java.sql.Timestamp getSupplierApproval_Date() { return get_ValueAsTimestamp(COLUMNNAME_SupplierApproval_Date); } /** * SupplierApproval_Norm AD_Reference_ID=541363 * Reference name: SupplierApproval_Norm */ public static final int SUPPLIERAPPROVAL_NORM_AD_Reference_ID=541363; /** ISO 9100 Luftfah...
/** * SupplierApproval_Type AD_Reference_ID=541361 * Reference name: Supplier Approval Type */ public static final int SUPPLIERAPPROVAL_TYPE_AD_Reference_ID=541361; /** Customer = C */ public static final String SUPPLIERAPPROVAL_TYPE_Customer = "C"; /** Vendor = V */ public static final String SUPPLIERAPPRO...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_SupplierApproval.java
1
请完成以下Java代码
public void setIsSelfService (boolean IsSelfService) { set_Value (COLUMNNAME_IsSelfService, Boolean.valueOf(IsSelfService)); } /** Get Self-Service. @return This is a Self-Service entry or this entry can be changed via Self-Service */ public boolean isSelfService () { Object oo = get_Value(COLUMNNAME_Is...
/** Set Request Type. @param R_RequestType_ID Type of request (e.g. Inquiry, Complaint, ..) */ public void setR_RequestType_ID (int R_RequestType_ID) { if (R_RequestType_ID < 1) set_ValueNoCheck (COLUMNNAME_R_RequestType_ID, null); else set_ValueNoCheck (COLUMNNAME_R_RequestType_ID, Integer.valueO...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_RequestTypeUpdates.java
1
请完成以下Java代码
public class Order { private String transactionId; private List<String> orderItemIds; private Payment payment; public Order(String transactionId, List<String> orderItemIds, Payment payment) { this.transactionId = transactionId; this.orderItemIds = orderItemIds; this.payment =...
public void setTransactionId(String transactionId) { this.transactionId = transactionId; } public List<String> getOrderItemIds() { return orderItemIds; } public void setOrderItemIds(List<String> orderItemIds) { this.orderItemIds = orderItemIds; } public Payment getPaym...
repos\tutorials-master\mapstruct-3\src\main\java\com\baeldung\entity\Order.java
1
请完成以下Java代码
public void updateBPartnerLocation(final ContactPerson contactPerson, BPartnerLocationId bpLocationId) { contactPerson.toBuilder() .bpLocationId(bpLocationId) .build(); save(contactPerson); } public Set<ContactPerson> getByBPartnerLocationId(@NonNull final BPartnerLocationId bpLocationId) { return q...
} public Set<ContactPerson> getByUserId(@NonNull final UserId userId) { return queryBL .createQueryBuilder(I_MKTG_ContactPerson.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_MKTG_ContactPerson.COLUMN_AD_User_ID, userId.getRepoId()) .create() .stream() .map(ContactPersonRepository:...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\model\ContactPersonRepository.java
1
请完成以下Java代码
public VariableProvider variableProvider() { return new ContextVariableWrapper(variableContext); } }; Either either = feelEngine.evalExpression(expression, context); if (either instanceof Right) { Right right = (Right) either; return (T) right.value(); } else { Left l...
SpinValueMapperFactory spinValueMapperFactory = new SpinValueMapperFactory(); CustomValueMapper javaValueMapper = new JavaValueMapper(); CustomValueMapper spinValueMapper = spinValueMapperFactory.createInstance(); if (spinValueMapper != null) { return toScalaList(javaValueMapper, spinValueMapper); ...
repos\camunda-bpm-platform-master\engine-dmn\feel-scala\src\main\java\org\camunda\bpm\dmn\feel\impl\scala\ScalaFeelEngine.java
1
请完成以下Java代码
private CurrencyId getCurrencyIdByCurrencyISO(@NonNull final String currencyISO) { final CurrencyCode convertedToCurrencyCode = CurrencyCode.ofThreeLetterCode(currencyISO); return currencyRepository.getCurrencyIdByCurrencyCode(convertedToCurrencyCode); } @NonNull private BPartnerBankAccountId getBPartnerBankAc...
.build(); break; default: throw new AdempiereException("Invalid bpartnerIdentifier: " + bpartnerIdentifier); } return query; } @VisibleForTesting public String buildDocumentNo(@NonNull final DocTypeId docTypeId) { final IDocumentNoBuilderFactory documentNoFactory = Services.get(IDocumentNoBuilderF...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\remittanceadvice\impl\CreateRemittanceAdviceService.java
1
请在Spring Boot框架中完成以下Java代码
static BeanMetadataElement getClientRegistrationRepository(Element element) { String clientRegistrationRepositoryRef = element.getAttribute(ATT_CLIENT_REGISTRATION_REPOSITORY_REF); if (StringUtils.hasLength(clientRegistrationRepositoryRef)) { return new RuntimeBeanReference(clientRegistrationRepositoryRef); } ...
static BeanDefinition createDefaultAuthorizedClientRepository(BeanMetadataElement clientRegistrationRepository, BeanMetadataElement authorizedClientService) { if (authorizedClientService == null) { authorizedClientService = BeanDefinitionBuilder .rootBeanDefinition("org.springframework.security.oauth2.clien...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\http\OAuth2ClientBeanDefinitionParserUtils.java
2
请在Spring Boot框架中完成以下Java代码
public String getDocumentID() { return documentID; } /** * Sets the value of the documentID property. * * @param value * allowed object is * {@link String } * */ public void setDocumentID(String value) { this.documentID = value; } /*...
/** * Sets the value of the referenceDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setReferenceDate(XMLGregorianCalendar value) { this.referenceDate = value; } /** * An optional description ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\DocumentReferenceType.java
2
请在Spring Boot框架中完成以下Java代码
public class UserService { private final UserRepository userRepository; private final PasswordEncoder passwordEncoder; /** * Get user by id. * * @return Returns user */ public User getUser(UUID id) { return userRepository.findById(id).orElseThrow(() -> new NoSuchElementExcep...
* * @param email users email * @param password users password * @return Returns the logged-in user */ public User login(String email, String password) { if (email == null || email.isBlank()) { throw new IllegalArgumentException("email is required."); } if (pas...
repos\realworld-java21-springboot3-main\module\core\src\main\java\io\zhc1\realworld\service\UserService.java
2
请完成以下Java代码
public List<I_M_Package> retrievePackagesForShipment(final I_M_InOut shipment) { Check.assumeNotNull(shipment, "shipment not null"); return queryBL.createQueryBuilder(I_M_Package.class, shipment) .addEqualsFilter(org.compiere.model.I_M_Package.COLUMNNAME_M_InOut_ID, shipment.getM_InOut_ID()) .create() ...
final List<I_M_Package> mpackages = retrievePackages(hu, ITrx.TRXNAME_ThreadInherited); if (mpackages.isEmpty()) { return null; } else if (mpackages.size() > 1) { Check.errorIf(true, HUException.class, "More than one package was found for HU." + "\n@M_HU_ID@: {}" + "\n@M_Package_ID@: {}", hu, ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUPackageDAO.java
1
请完成以下Java代码
protected Object getProcessVariable(InjectionPoint ip) { String processVariableName = getVariableName(ip); if (logger.isLoggable(Level.FINE)) { logger.fine("Getting process variable '" + processVariableName + "' from ProcessInstance[" + businessProcess.getProcessInstanceId() + "]."); } return bu...
* @since 7.3 */ @Produces @ProcessVariableLocalTyped protected TypedValue getProcessVariableLocalTyped(InjectionPoint ip) { String processVariableName = getVariableLocalTypedName(ip); if (logger.isLoggable(Level.FINE)) { logger.fine("Getting local typed process variable '" + processVariableName ...
repos\camunda-bpm-platform-master\engine-cdi\core\src\main\java\org\camunda\bpm\engine\cdi\ProcessVariables.java
1
请完成以下Java代码
public String login() { return "login page."; } /** * 登录请求 * @param username * @return */ @RequestMapping("/login/submit") public String loginSubmit(@RequestParam("username") String username) { if (StringUtils.isNotBlank(username)) { httpSession.setAttrib...
@ResponseBody @RequestMapping("/index") public String index() { log.info("session id: {}", httpSession.getId()); return "index page."; } /** * 退出登录 * @return */ @RequestMapping("/logout") public String logout() { httpSession.invalidate(); return "/...
repos\spring-boot-best-practice-master\spring-boot-session\src\main\java\cn\javastack\springboot\session\IndexController.java
1
请在Spring Boot框架中完成以下Java代码
public static class LegacyVelocityConfiguration { @Bean @ConditionalOnMissingBean org.mybatis.scripting.velocity.Driver velocityLanguageDriver() { return new org.mybatis.scripting.velocity.Driver(); } } /** * Configuration class for mybatis-velocity 2.1.x or above. */ @Configuration(p...
@Bean @ConditionalOnMissingBean @ConfigurationProperties(CONFIGURATION_PROPERTY_PREFIX + ".thymeleaf") public ThymeleafLanguageDriverConfig thymeleafLanguageDriverConfig() { return ThymeleafLanguageDriverConfig.newInstance(); } // This class provides to avoid the https://github.com/spring-pro...
repos\spring-boot-starter-master\mybatis-spring-boot-autoconfigure\src\main\java\org\mybatis\spring\boot\autoconfigure\MybatisLanguageDriverAutoConfiguration.java
2
请完成以下Java代码
public abstract class AbstractRequestInvocation<T> implements ConnectorInvocation { protected T target; protected int currentIndex; protected List<ConnectorRequestInterceptor> interceptorChain; protected ConnectorRequest<?> request; protected AbstractRequestInvocation(T target, ConnectorRequest<?> reques...
public ConnectorRequest<?> getRequest() { return request; } public Object proceed() throws Exception { currentIndex++; if (interceptorChain.size() > currentIndex) { return interceptorChain.get(currentIndex).handleInvocation(this); } else { return invokeTarget(); } } public ab...
repos\camunda-bpm-platform-master\connect\core\src\main\java\org\camunda\connect\impl\AbstractRequestInvocation.java
1
请完成以下Spring Boot application配置
# Spring Boot application.properties to configure the Inline Caching Example Application spring.application.name=InlineCachingApplication spring.data.gemfire.cache.log-level=${gemfir
e.log-level:error} spring.jpa.hibernate.ddl-auto=none spring.jpa.show-sql=false
repos\spring-boot-data-geode-main\spring-geode-samples\caching\inline\src\main\resources\application.properties
2
请完成以下Java代码
public int getAPI_Request_Audit_ID() { return get_ValueAsInt(COLUMNNAME_API_Request_Audit_ID); } @Override public void setAPI_Response_Audit_ID (final int API_Response_Audit_ID) { if (API_Response_Audit_ID < 1) set_ValueNoCheck (COLUMNNAME_API_Response_Audit_ID, null); else set_ValueNoCheck (COLUMN...
{ return get_ValueAsString(COLUMNNAME_HttpCode); } @Override public void setHttpHeaders (final @Nullable java.lang.String HttpHeaders) { set_Value (COLUMNNAME_HttpHeaders, HttpHeaders); } @Override public java.lang.String getHttpHeaders() { return get_ValueAsString(COLUMNNAME_HttpHeaders); } @Overri...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_API_Response_Audit.java
1
请在Spring Boot框架中完成以下Java代码
public class SessionConfig { private static final Logger logger = LogManager.getLogger(SessionConfig.class); private static final String BEANNAME_SessionScheduledExecutorService = "sessionScheduledExecutorService"; @Value("${metasfresh.session.checkExpiredSessionsRateInMinutes:10}") private int checkExpiredSessio...
sessionRepository::purgeExpiredSessionsNoFail, // command, don't fail because on failure the task won't be re-scheduled so it's game over checkExpiredSessionsRateInMinutes, // initialDelay checkExpiredSessionsRateInMinutes, // period TimeUnit.MINUTES // timeUnit ); logger.info("Checking expired ses...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\session\SessionConfig.java
2
请完成以下Java代码
public OAuth2AccessToken getToken() { return token; } public void setToken(OAuth2AccessToken token) { this.token = token; } public void setUsername(String username) { this.username = username; } @Override public String getPassword() { return null; } ...
@Override public boolean isAccountNonLocked() { return true; } @Override public boolean isCredentialsNonExpired() { return true; } @Override public boolean isEnabled() { return true; } }
repos\tutorials-master\spring-security-modules\spring-security-legacy-oidc\src\main\java\com\baeldung\openid\oidc\OpenIdConnectUserDetails.java
1
请完成以下Java代码
public void setRequestMatcher(RequestMatcher requestMatcher) { Assert.notNull(requestMatcher, "requestMatcher cannot be null"); this.matcher = requestMatcher; } @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException...
* @param requestOptionsRepository the * {@link PublicKeyCredentialRequestOptionsRepository} to use. Cannot be null. */ public void setRequestOptionsRepository(PublicKeyCredentialRequestOptionsRepository requestOptionsRepository) { Assert.notNull(requestOptionsRepository, "requestOptionsRepository cannot be null"...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\authentication\PublicKeyCredentialRequestOptionsFilter.java
1
请完成以下Java代码
public class LoginParam { /** * 用户名 */ @ApiModelProperty(value = "用户名", name = "username", example = "admin", required = true) private String username; /** * 密码 */ @ApiModelProperty(value = "密码", name = "password", example = "123456", required = true) private String password;...
public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getAppid() { return appid; } public void setAppid(String appid) { this.appid = appid; } public String getImei() { ...
repos\SpringBootBucket-master\springboot-swagger2\src\main\java\com\xncoding\jwt\api\model\LoginParam.java
1
请完成以下Java代码
public I_M_HU_Item retrieveParentItem(final I_M_HU hu) { return getDelegate(hu).retrieveParentItem(hu); } @Override public void setParentItem(final I_M_HU hu, final I_M_HU_Item parentItem) { // TODO: shall we check if HU and parentItem have the same trxName getDelegate(hu).setParentItem(hu, parentItem); } ...
@Override public I_M_HU_Item createAggregateHUItem(@NonNull final I_M_HU hu) { return getDelegate(hu).createAggregateHUItem(hu); } @Override public I_M_HU_Item createChildHUItem(@NonNull final I_M_HU hu) { return getDelegate(hu).createChildHUItem(hu); } @Override public I_M_HU_Item retrieveAggregatedItem...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\CachedIfInTransactionHUAndItemsDAO.java
1
请完成以下Java代码
public final class CompositeTabCallout implements ITabCallout { public static final Builder builder() { return new Builder(); } private final List<ITabCallout> tabCallouts; private CompositeTabCallout(final List<ITabCallout> tabCallouts) { super(); this.tabCallouts = ImmutableList.copyOf(tabCallouts); } ...
} } @Override public void onRefreshAll(final ICalloutRecord calloutRecord) { for (final ITabCallout tabCallout : tabCallouts) { tabCallout.onRefreshAll(calloutRecord); } } @Override public void onAfterQuery(final ICalloutRecord calloutRecord) { for (final ITabCallout tabCallout : tabCallouts) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\ui\spi\impl\CompositeTabCallout.java
1
请完成以下Java代码
final class OriginTrackedFieldError extends FieldError implements OriginProvider { private final @Nullable Origin origin; private OriginTrackedFieldError(FieldError fieldError, @Nullable Origin origin) { super(fieldError.getObjectName(), fieldError.getField(), fieldError.getRejectedValue(), fieldError.isBindi...
@Override public String toString() { if (this.origin == null) { return super.toString(); } return super.toString() + "; origin " + this.origin; } @Contract("!null, _ -> !null") static @Nullable FieldError of(@Nullable FieldError fieldError, @Nullable Origin origin) { if (fieldError == null || origin == ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\bind\validation\OriginTrackedFieldError.java
1
请在Spring Boot框架中完成以下Java代码
public String getIndex() { return "comparison/index"; } @GetMapping("/login") public String showLoginPage() { return "comparison/login"; } @PostMapping("/login") public String doLogin(HttpServletRequest req, UserCredentials credentials, RedirectAttributes attr) { Subje...
Subject subject = SecurityUtils.getSubject(); subject.logout(); return "redirect:/"; } private void addUserAttributes(Model model) { Subject currentUser = SecurityUtils.getSubject(); String permission = ""; if (currentUser.hasRole("ADMIN")) { model.addAttrib...
repos\tutorials-master\security-modules\apache-shiro\src\main\java\com\baeldung\comparison\shiro\controllers\ShiroController.java
2
请完成以下Java代码
private String getResAccessUrl(StorePath storePath) { String fileUrl = FastDFSConstants.HTTP_PRODOCOL + "://" + FastDFSConstants.RES_HOST + "/" + storePath.getFullPath(); return fileUrl; } /** * 删除文件 * @param fileUrl 文件访问地址 * @return */ public void deleteFile(String file...
storageClient.deleteFile(storePath.getGroup(), storePath.getPath()); } catch (FdfsUnsupportStorePathException e) { log.warn(e.getMessage()); } } // 除了FastDFSClientWrapper类中用到的api,客户端提供的api还有很多,可根据自身的业务需求,将其它接口也添加到工具类中即可。 // 上传文件,并添加文件元数据 //StorePath uploadFile(InputStream in...
repos\springboot-demo-master\fastdfs\src\main\java\com\et\fastdfs\util\FastDFSClientWrapper.java
1
请完成以下Java代码
public ValueType getType() { return type; } public void setEncoding(String encoding) { this.encoding = encoding; } public void setEncoding(Charset encoding) { this.encoding = encoding.name(); } @Override public Charset getEncodingAsCharset() { if (encoding == null) { return null; ...
return value; } @Override public String toString() { return "FileValueImpl [mimeType=" + mimeType + ", filename=" + filename + ", type=" + type + ", isTransient=" + isTransient + "]"; } @Override public boolean isTransient() { return isTransient; } public void setTransient(boolean isTransient...
repos\camunda-bpm-platform-master\commons\typed-values\src\main\java\org\camunda\bpm\engine\variable\impl\value\FileValueImpl.java
1
请完成以下Java代码
public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } @Override public void setESR_Control_Amount (final BigDecimal ESR_Control_Amount) { set_Value (COLUMNNAME_ESR_Control_Amount, ESR_Control_Amount); } @Override public BigDecimal getESR_Control_Amount() { fin...
return get_ValueAsInt(COLUMNNAME_ESR_Import_ID); } @Override public void setFileName (final @Nullable java.lang.String FileName) { set_Value (COLUMNNAME_FileName, FileName); } @Override public java.lang.String getFileName() { return get_ValueAsString(COLUMNNAME_FileName); } @Override public void setH...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-gen\de\metas\payment\esr\model\X_ESR_ImportFile.java
1
请完成以下Spring Boot application配置
spring: application: name: demo-consumer # Spring 应用名 cloud: nacos: # Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类 discovery: server-addr: 127.0.0.1:8848 # Nacos 服务器地址 service: ${spring.appli
cation.name} # 注册到 Nacos 的服务名。默认值为 ${spring.application.name}。 server: port: 28080 # 服务器端口。默认为 8080
repos\SpringBoot-Labs-master\labx-01-spring-cloud-alibaba-nacos-discovery\labx-01-sca-nacos-discovery-demo01-consumer\src\main\resources\application.yaml
2
请完成以下Java代码
public static Set<Access> values() { return ALL_ACCESSES; } @NonNull String name; @NonNull String code; private Access(@NonNull final String name, final @NotNull String code) { Check.assumeNotEmpty(name, "name not empty"); this.name = name; this.code = code; } @Override public String toString() { ...
@Override @JsonValue public @NotNull String getCode() { return code; } public boolean isReadOnly() { return READ.equals(this); } public boolean isReadWrite() { return WRITE.equals(this); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\Access.java
1
请在Spring Boot框架中完成以下Java代码
public void setKeepAliveSeconds(int keepAliveSeconds) { AsyncExecutor.keepAliveSeconds = keepAliveSeconds; } @Value("${task.pool.queue-capacity}") public void setQueueCapacity(int queueCapacity) { AsyncExecutor.queueCapacity = queueCapacity; } /** * 自定义线程池,用法 @Async * @re...
new ThreadPoolExecutor.CallerRunsPolicy()); } /** * 自定义线程池,用法,注入到类中使用 * private ThreadPoolTaskExecutor taskExecutor; * @return ThreadPoolTaskExecutor */ @Bean("taskAsync") public ThreadPoolTaskExecutor taskAsync() { ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecuto...
repos\eladmin-master\eladmin-common\src\main\java\me\zhengjie\config\AsyncExecutor.java
2
请完成以下Java代码
public String getSummary() { final StringBuilder sb = new StringBuilder(); sb.append(getDocumentNo()); // - User sb.append(" - ").append(getUserName()); // : Total Lines = 123.00 sb.append(": ").append(Msg.translate(getCtx(), "TotalLines")).append("=").append(getTotalLines()); // - Description if (getD...
{ final I_M_PriceList pl = Services.get(IPriceListDAO.class).getById(getM_PriceList_ID()); return pl.getC_Currency_ID(); } /** * Get Document Approval Amount * * @return amount */ @Override public BigDecimal getApprovalAmt() { return getTotalLines(); } private String getUserName() { return Ser...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MRequisition.java
1
请完成以下Java代码
public class ClassLoaderFileURLStreamHandler extends URLStreamHandler { private final ClassLoaderFile file; public ClassLoaderFileURLStreamHandler(ClassLoaderFile file) { this.file = file; } @Override protected URLConnection openConnection(URL url) throws IOException { return new Connection(url); } priva...
public void connect() throws IOException { } @Override public InputStream getInputStream() throws IOException { byte[] contents = ClassLoaderFileURLStreamHandler.this.file.getContents(); Assert.state(contents != null, "'contents' must not be null"); return new ByteArrayInputStream(contents); } @Ove...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\restart\classloader\ClassLoaderFileURLStreamHandler.java
1
请完成以下Java代码
public OrderAndLineId execute() { final OrderAndLineId orderAndLineId = OrderAndLineId.ofNullable(orderCost.getOrderId(), orderCost.getCreatedOrderLineId()); final I_C_OrderLine orderLine = orderAndLineId != null ? orderBL.getLineById(orderAndLineId) : orderBL.createOrderLine(getOrder()); if (productId...
return OrderAndLineId.ofRepoIds(orderLine.getC_Order_ID(), orderLine.getC_OrderLine_ID()); } private I_C_Order getOrder() { if (_order == null) { _order = orderBL.getById(orderCost.getOrderId()); } return _order; } private Money convertToOrderCurrency(final Money amt) { final I_C_Order order = getO...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\CreateOrUpdateOrderLineFromOrderCostCommand.java
1
请完成以下Java代码
public Set<PickingSlotIdAndCaption> getPickingSlotIdAndCaptions(@NonNull final PickingSlotQuery query) { return pickingSlotDAO.retrievePickingSlotIdAndCaptions(query); } @Override public QRCodePDFResource createQRCodesPDF(@NonNull final Set<PickingSlotIdAndCaption> pickingSlotIdAndCaptions) { Check.assumeNotE...
{ return isAvailableForAnyBPartner(pickingSlotDAO.getById(pickingSlotId)); } @NonNull public I_M_PickingSlot getById(@NonNull final PickingSlotId pickingSlotId) { return pickingSlotDAO.getById(pickingSlotId); } @Override public boolean isPickingRackSystem(@NonNull final PickingSlotId pickingSlotId) { re...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\picking\api\impl\PickingSlotBL.java
1
请在Spring Boot框架中完成以下Java代码
private QueryBuilder createQueryBuilder(String keyword, String... fieldNames){ // 构造查询条件,使用标准分词器. return QueryBuilders.multiMatchQuery(keyword,fieldNames) // matchQuery(),单字段搜索 .analyzer("ik_max_word") .operator(Operator.OR); } /** * 构造高亮器 * @auther: z...
private List<Map<String,Object>> getHitList(SearchHits hits){ List<Map<String,Object>> list = new ArrayList<>(); Map<String,Object> map; for(SearchHit searchHit : hits){ map = new HashMap<>(); // 处理源数据 map.put("source",searchHit.getSourceAsMap()); ...
repos\springboot-demo-master\elasticsearch\src\main\java\demo\et59\elaticsearch\service\impl\BaseSearchServiceImpl.java
2
请完成以下Java代码
public class SponsorNoAutoCompleter extends FieldAutoCompleter { public SponsorNoAutoCompleter(JTextComponent comp) { super(comp); } @Override protected String getSelectSQL(String search, int caretPosition, List<Object> params) { if (caretPosition > 0 && caretPosition < search.length()) { search = n...
; params.add(searchSQL); // SponsorNo params.add(searchSQL); // Name // return sql; } @Override protected Object fetchUserObject(ResultSet rs) throws SQLException { int sponsorID = rs.getInt("C_Sponsor_ID"); String sponsorNo = rs.getString("SponsorNo"); String name = rs.getString("Name"); Spons...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\gui\search\SponsorNoAutoCompleter.java
1
请在Spring Boot框架中完成以下Java代码
public class EDIDocOutBoundLogService { private final IDocOutboundDAO docOutboundDAO = Services.get(IDocOutboundDAO.class); /** * @param recordReference if this in an {@link I_C_Invoice}, then set the {@code C_Doc_Outbound_Log.EDI_ExportStatus} of all referencing log records to the invoice's current status. * @r...
} final I_C_Invoice invoiceRecord = recordReference.getModel(I_C_Invoice.class); return invoiceRecord.getEDI_ExportStatus(); } public I_C_Doc_Outbound_Log retreiveById(@NonNull final DocOutboundLogId docOutboundLogId) { return load(docOutboundLogId, I_C_Doc_Outbound_Log.class); } public I_C_Invoice retre...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\api\EDIDocOutBoundLogService.java
2
请在Spring Boot框架中完成以下Java代码
public MobileApplication getById(@NonNull final MobileApplicationId id) { return applications.getById(id); } public void logout(@NonNull final IUserRolePermissions permissions) { final UserId userId = permissions.getUserId(); final MobileApplicationPermissions mobileApplicationPermissions = permissions.getMo...
}); } private boolean hasAccess(@NonNull final MobileApplicationId applicationId, @NonNull final MobileApplicationPermissions permissions) { final MobileApplicationRepoId repoId = applicationInfoRepository.getById(applicationId).getRepoId(); return permissions.isAllowAccess(repoId); } private boolean hasActi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\mobile\application\service\MobileApplicationService.java
2
请完成以下Java代码
public void updatePrinterTrayMatching(@NonNull final I_AD_Printer_Matching printerMatching) { final IPrintingDAO dao = Services.get(IPrintingDAO.class); final HardwarePrinterId printerID = HardwarePrinterId.ofRepoId(printerMatching.getAD_PrinterHW_ID()); final List<I_AD_PrinterHW_MediaTray> hwTrays = dao.retrie...
save(trayMatching); } } else { final I_AD_Printer printer = load(printerMatching.getAD_Printer_ID(), I_AD_Printer.class); Check.assumeNotNull(defaultHWTray, "{} has at least one tray", printer); Check.assume(!existingPrinterTrayMatchings.isEmpty(), "{} has at least one tray matching", printerMatching...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\api\impl\PrinterBL.java
1
请完成以下Java代码
public class ArticleTitle { @Column(nullable = false) private String title; @Column(nullable = false) private String slug; public static ArticleTitle of(String title) { return new ArticleTitle(title, slugFromTitle(title)); } private ArticleTitle(String title, String slug) { ...
public String getTitle() { return title; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ArticleTitle that = (ArticleTitle) o; return slug.equals(that.slug); } @Override ...
repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\article\ArticleTitle.java
1
请完成以下Java代码
Set<String> getColumnNames() { return map.keySet(); } @NonNull public Cell getCell(@NonNull final String columnName) { final Cell value = map.get(columnName); return value != null ? value : Cell.NULL; } public boolean isBlankColumn(final String columnName) { final Cell cell = getCell(columnName); re...
public void put(@NonNull final String columnName, @NonNull final Cell value) { map.put(columnName, value); } public void put(@NonNull final String columnName, @Nullable final Object valueObj) { map.put(columnName, Cell.ofNullable(valueObj)); } public void putAll(@NonNull final Map<String, ?> map) { map.f...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\text\tabular\Row.java
1
请完成以下Java代码
public String getRootProcessInstanceId() { return rootProcessInstanceId; } public void setRootProcessInstanceId(String rootProcessInstanceId) { this.rootProcessInstanceId = rootProcessInstanceId; } public void delete() { Context .getCommandContext() .getDbEntityManager() .delete(...
+ "[activityInstanceId=" + activityInstanceId + ", taskId=" + taskId + ", timestamp=" + timestamp + ", eventType=" + eventType + ", executionId=" + executionId + ", processDefinitionId=" + processDefinitionId + ", rootProcessInstanceId=" + rootProcessIns...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricDetailEventEntity.java
1
请完成以下Java代码
public final class QualityInvoiceLineGroupByTypeComparator implements Comparator<IQualityInvoiceLineGroup> { /** * Maps {@link QualityInvoiceLineGroupType} to it's sorting priority. */ private final Map<QualityInvoiceLineGroupType, Integer> type2index = new HashMap<>(); /** Index to be used when type was not fo...
private final boolean hasType(final QualityInvoiceLineGroupType type) { return type2index.containsKey(type); } /** * Remove from given lines those which their type is not specified in our list. * * NOTE: we assume the list is read-write. * * @param groups */ public void filter(final List<IQualityInvo...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\invoicing\QualityInvoiceLineGroupByTypeComparator.java
1
请在Spring Boot框架中完成以下Java代码
public ImmutableListMultimap<BPartnerId, I_C_BP_BankAccount> getAllByBPartnerIds(@NonNull final Collection<BPartnerId> bpartnerIds) { if (bpartnerIds.isEmpty()) { return ImmutableListMultimap.of(); } return queryBL.createQueryBuilderOutOfTrx(I_C_BP_BankAccount.class) .addInArrayFilter(I_C_BP_BankAccoun...
.collect(ImmutableList.toImmutableList()); } @NonNull private BPartnerBankAccount of(@NonNull final I_C_BP_BankAccount record) { return BPartnerBankAccount.builder() .id(BPartnerBankAccountId.ofRepoId(record.getC_BPartner_ID(), record.getC_BP_BankAccount_ID())) .currencyId(CurrencyId.ofRepoId(record.getC...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\impl\BPBankAccountDAO.java
2
请完成以下Java代码
private XMLPatientAddress createXmlPatientAddress(@NonNull final PatientAddressType patient) { final XMLPatientAddress.XMLPatientAddressBuilder patientAddressBuilder = XMLPatientAddress.builder(); if (patient.getPerson() != null) { patientAddressBuilder.person(createXmlPersonType(patient.getPerson())); } ...
private List<XmlError> createXmlErrors(@NonNull final List<ErrorType> error) { final ImmutableList.Builder<XmlError> errorsBuilder = ImmutableList.builder(); for (final ErrorType errorType : error) { final XmlError xmlError = XmlError .builder() .code(errorType.getCode()) .errorValue(errorType...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_response\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\response\Invoice440ToCrossVersionModelTool.java
1
请完成以下Java代码
public void setIsArchived (final boolean IsArchived) { set_Value (COLUMNNAME_IsArchived, IsArchived); } @Override public boolean isArchived() { return get_ValueAsBoolean(COLUMNNAME_IsArchived); } @Override public void setTimestamp (final @Nullable java.sql.Timestamp Timestamp) { set_Value (COLUMNNAME_...
@Override public java.lang.String getTitle() { return get_ValueAsString(COLUMNNAME_Title); } @Override public void setTitleShort (final @Nullable java.lang.String TitleShort) { set_Value (COLUMNNAME_TitleShort, TitleShort); } @Override public java.lang.String getTitleShort() { return get_ValueAsStri...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_C_BPartner_Alberta.java
1
请完成以下Java代码
protected String doIt() { final I_C_Location location = getSelectedLocationOrFirstAvailable(); final DocumentFilter filter = createAreaSearchFilter(location); final IView view = createViewWithFilter(filter); getResult().setWebuiViewToOpen( ProcessExecutionResult.WebuiViewToOpen.builder() .viewId(v...
private GeoLocationDocumentQuery createGeoLocationQuery(final I_C_Location location) { final CountryId countryId = CountryId.ofRepoId(location.getC_Country_ID()); final ITranslatableString countryName = countriesRepo.getCountryNameById(countryId); return GeoLocationDocumentQuery.builder() .country(IntegerLo...
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代码
public void assertNoHUAssignments(final org.eevolution.model.I_PP_Cost_Collector cc) { Services.get(IHUAssignmentDAO.class).assertNoHUAssignmentsForModel(cc); } /** * @return assigned top level HUs (i.e. the HUs which were assigned to original cost collector). */ @Override public List<I_M_HU> getTopLevelHUs...
// // Get the snapshot ID. // Make sure it exists, else we would not be able to restore the HUs. final String snapshotId = costCollector.getSnapshot_UUID(); if (Check.isEmpty(snapshotId, true)) { throw new HUException("@NotFound@ @Snapshot_UUID@ (" + costCollector + ")"); } final IContextAware context...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\impl\HUPPCostCollectorBL.java
1
请完成以下Java代码
static MetricsClientMeters newClientMetricsMeters(MeterRegistry registry) { MetricsClientMeters.Builder builder = MetricsClientMeters.newBuilder(); builder.setAttemptCounter(Counter.builder(CLIENT_ATTEMPT_STARTED) .description( "The total number of RPC attempts s...
.withRegistry(registry)); builder.setClientAttemptDuration(Timer.builder(CLIENT_ATTEMPT_DURATION) .description("Time taken to complete a client call attempt") .serviceLevelObjectives(DEFAULT_LATENCY_BUCKETS) .withRegistry(registry)); builder.setClientCal...
repos\grpc-spring-master\grpc-client-spring-boot-starter\src\main\java\net\devh\boot\grpc\client\metrics\MetricsClientInstruments.java
1
请完成以下Java代码
private I_M_Product getM_Product() { final IProductionMaterial productionMaterial = getProductionMaterialOrNull(); if (productionMaterial != null) { return productionMaterial.getM_Product(); } else { return null; // N/A } } @Override public final IQualityInspectionLineBuilder setQty(final BigDe...
else { final IProductionMaterial productionMaterial = getProductionMaterial(); return productionMaterial.getC_UOM(); } } @Override public final IQualityInspectionLineBuilder setPercentage(final BigDecimal percentage) { _percentage = percentage; return this; } private BigDecimal getPercentage() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\QualityInspectionLineBuilder.java
1
请完成以下Java代码
public static Set<ProductBOMId> ofRepoIds(final Collection<Integer> repoIds) { return repoIds.stream() .filter(repoId -> repoId != null && repoId > 0) .map(ProductBOMId::ofRepoId) .collect(ImmutableSet.toImmutableSet()); } public static int toRepoId(@Nullable final ProductBOMId id) { return id != n...
{ return Objects.equals(o1, o2); } private ProductBOMId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "PP_Product_BOM_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\eevolution\api\ProductBOMId.java
1
请完成以下Java代码
public boolean isClusterMode() { return clusterMode; } public FlowRuleEntity setClusterMode(boolean clusterMode) { this.clusterMode = clusterMode; return this; } public ClusterFlowConfig getClusterConfig() { return clusterConfig; } public FlowRuleEntity setClus...
flowRule.setCount(this.count); flowRule.setGrade(this.grade); flowRule.setResource(this.resource); flowRule.setLimitApp(this.limitApp); flowRule.setRefResource(this.refResource); flowRule.setStrategy(this.strategy); if (this.controlBehavior != null) { flowRule...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\rule\FlowRuleEntity.java
1
请完成以下Java代码
protected boolean beforeSave(boolean newRecord) { if (!isInstanceAttribute()) setIsInstanceAttribute(true); return true; } // beforeSave @Override protected boolean afterSave(boolean newRecord, boolean success) { // Set Instance Attribute if (!isInstanceAttribute()) { String sql = "UPDATE M_Att...
} // Reset Instance Attribute if (isInstanceAttribute()) { String sql = "UPDATE M_AttributeSet mas" + " SET IsInstanceAttribute='N' " + "WHERE M_AttributeSet_ID=" + getM_AttributeSet_ID() + " AND IsInstanceAttribute='Y'" + " AND NOT EXISTS (SELECT * FROM M_AttributeUse mau" + " INNER J...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MAttributeSet.java
1
请完成以下Java代码
public static List<String> usingOrElse(Optional<String> obj) { List<String> arrayList = new ArrayList<>(); arrayList.add(obj.orElse("Hello, World!")); return arrayList; } public static List<String> usingOrElseGet(Optional<String> obj) { List<String> arrayList = new ArrayList<>()...
} public static List<String> usingStreamFilter(Optional<String> obj) { List<String> arrayList = obj.filter(e -> e.startsWith("H")) .stream() .collect(Collectors.toList()); return arrayList; } public static List<String> usingStreamFlatMap(Optional<List<String>> obj) ...
repos\tutorials-master\core-java-modules\core-java-collections-conversions-3\src\main\java\com\baeldung\optionaltoarraylist\OptionalToArrayListConverter.java
1
请在Spring Boot框架中完成以下Java代码
public class HistoryServiceImpl extends ServiceImpl implements HistoryService { public HistoryServiceImpl(ProcessEngineConfigurationImpl processEngineConfiguration) { super(processEngineConfiguration); } public HistoricProcessInstanceQuery createHistoricProcessInstanceQuery() { return new ...
public void deleteHistoricProcessInstance(String processInstanceId) { commandExecutor.execute(new DeleteHistoricProcessInstanceCmd(processInstanceId)); } public NativeHistoricProcessInstanceQuery createNativeHistoricProcessInstanceQuery() { return new NativeHistoricProcessInstanceQueryImpl(comm...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\HistoryServiceImpl.java
2
请完成以下Java代码
public CaseFileItem getContext() { return contextRefAttribute.getReferenceTargetElement(this); } public void setContext(CaseFileItem caseFileItem) { contextRefAttribute.setReferenceTargetElement(this, caseFileItem); } public ConditionExpression getCondition() { return conditionChild.getChild(this)...
.instanceProvider(new ModelTypeInstanceProvider<RepetitionRule>() { public RepetitionRule newInstance(ModelTypeInstanceContext instanceContext) { return new RepetitionRuleImpl(instanceContext); } }); nameAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_NAME) .b...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\RepetitionRuleImpl.java
1
请完成以下Java代码
public BigDecimal getCUNetAmtNotApproved() { return _cuNetAmtNotApproved; } public BigDecimal getTotalNetAmt() { return _totalNetAmtApproved.add(_totalNetAmtNotApproved); } public BigDecimal getTotalNetAmt(final boolean isApprovedForInvoicing) { if (isApprovedForInvoicing) { return getTotalNetAmtApp...
final BigDecimal cuNetAmtNotApproved = getCUNetAmtNotApproved(); message.append(" - ").append("Ware ").append(getAmountFormatted(cuNetAmtNotApproved)); if (countTotalToRecompute > 0) { message.append(", @IsToRecompute@: "); message.append(countTotalToRecompute); } return message.toString(); } priva...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\invoicecandidate\ui\spi\impl\HUInvoiceCandidatesSelectionSummaryInfo.java
1
请完成以下Java代码
public String getCalledProcessInstanceId() { return calledProcessInstanceId; } public String getCalledCaseInstanceId() { return calledCaseInstanceId; } public String getAssignee() { return assignee; } public Date getStartTime() { return startTime; } public Date getEndTime() { ret...
return removalTime; } public String getRootProcessInstanceId() { return rootProcessInstanceId; } public static void fromHistoricActivityInstance(HistoricActivityInstanceDto dto, HistoricActivityInstance historicActivityInstance) { dto.id = historicAct...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricActivityInstanceDto.java
1
请完成以下Java代码
public class HistoryEventProcessor { /** * The {@link HistoryEventCreator} interface which is used to interchange the implementation * of the creation of different HistoryEvents. */ public static class HistoryEventCreator { /** * Creates the {@link HistoryEvent} with the help off the given *...
/** * Process an {@link HistoryEvent} and handle them directly after creation. * The {@link HistoryEvent} is created with the help of the given * {@link HistoryEventCreator} implementation. * * @param creator the creator is used to create the {@link HistoryEvent} which should be thrown */ public sta...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoryEventProcessor.java
1
请完成以下Java代码
private boolean update(@NonNull final IAttributeStorage huAttributes) { if (!huAttributes.hasAttribute(AttributeConstants.ATTR_MonthsUntilExpiry)) { return false; } final OptionalInt monthsUntilExpiry = computeMonthsUntilExpiry(huAttributes, today); final int monthsUntilExpiryOld = huAttributes.getValueA...
return OptionalInt.empty(); } final int monthsUntilExpiry = (int)ChronoUnit.MONTHS.between(today, bestBeforeDate); return OptionalInt.of(monthsUntilExpiry); } private IAttributeStorage getHUAttributes(@NonNull final HuId huId, @NonNull final IHUContext huContext) { final I_M_HU hu = handlingUnitsBL.getById...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\expiry\UpdateMonthsUntilExpiryCommand.java
1
请完成以下Java代码
public int size() { return elementArray.length; } public float dot(Vector other) { float ret = 0.0f; for (int i = 0; i < size(); ++i) { ret += elementArray[i] * other.elementArray[i]; } return ret; } public float norm() { ...
for (int i = 0; i < result.length; i++) { result[i] = elementArray[i] + other.elementArray[i]; } return new Vector(result); } public Vector addToSelf(Vector other) { for (int i = 0; i < elementArray.length; i++) { elementArray[i] = elementArra...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\Vector.java
1
请在Spring Boot框架中完成以下Java代码
public class BookstoreService { private final AuthorRepository authorRepository; private final BookRepository bookRepository; public BookstoreService(AuthorRepository authorRepository, BookRepository bookRepository) { this.authorRepository = authorRepository; this.bookRepositor...
// Fetch books and authors including authors that have no registered books and books with no registered authors (SQL) public List<AuthorNameBookTitle> fetchBooksAndAuthorsSql() { return bookRepository.findBooksAndAuthorsSql(); } // Fetch authors and books including authors that have no register...
repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoViaFullJoins\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public void failForMissingPricingConditions(final de.metas.adempiere.model.I_C_Order order) { final boolean mandatoryPricingConditions = isMandatoryPricingConditions(); if (!mandatoryPricingConditions) { return; } final List<I_C_OrderLine> orderLines = Services.get(IOrderDAO.class).retrieveOrderLines(ord...
return hasPricingConditions(orderLine) == HasPricingConditions.NO; } private HasPricingConditions hasPricingConditions(final I_C_OrderLine orderLine) { if (orderLine.isTempPricingConditions()) { return HasPricingConditions.TEMPORARY; } else if (orderLine.getM_DiscountSchemaBreak_ID() > 0) { return H...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\impl\OrderLinePricingConditions.java
1
请完成以下Java代码
private static TableRecordReference toTableRecordReference(final MatchInv matchInv) { return TableRecordReference.of(I_M_MatchInv.Table_Name, matchInv.getId()); } private void deleteFactAcct(final List<MatchInv> matchInvs) { for (final MatchInv matchInv : matchInvs) { if (matchInv.isPosted()) { MPe...
for (final MatchInv matchInv : matchInvs) { // Reposting is required if a M_MatchInv was created for a purchase invoice. // ... because we book the matched quantity on InventoryClearing and on Expense the not matched quantity if (matchInv.getSoTrx().isPurchase()) { costDetailService.voidAndDeleteForDo...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\interceptor\AcctMatchInvListener.java
1
请完成以下Java代码
public List<Address> getAddress() { return address; } public void setAddress(List<Address> address) { this.address = address; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } ...
return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public List<String> getPhoneNumbers() { return phoneNumbers; } public void setPhoneNumbers(List<String> phoneNumbers) { this.phoneNumbers = phoneNumbers; } }
repos\tutorials-master\jackson-modules\jackson-conversions\src\main\java\com\baeldung\jackson\xml\Person.java
1
请完成以下Java代码
public JobQuery withoutTenantId() { isTenantIdSet = true; this.tenantIds = null; return this; } public JobQuery includeJobsWithoutTenantId() { this.includeJobsWithoutTenantId = true; return this; } //sorting ////////////////////////////////////////// public JobQuery orderByJobDuedate() ...
.findDeploymentIdMappingsByQueryCriteria(this); } //getters ////////////////////////////////////////// public Set<String> getIds() { return ids; } public String getRootProcessInstanceId() { return rootProcessInstanceId; } public String getProcessInstanceId() { return processInstanceId; } ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\JobQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class RedisUtil { @Autowired private StringRedisTemplate stringRedisTemplate; /** * 分页获取指定格式key,使用 scan 命令代替 keys 命令,在大数据量的情况下可以提高查询效率 * * @param patternKey key格式 * @param currentPage 当前页码 * @param pageSize 每页条数 * @return 分页获取指定格式key */ public PageResult<St...
} /** * 删除 Redis 中的某个key * * @param key 键 */ public void delete(String key) { stringRedisTemplate.delete(key); } /** * 批量删除 Redis 中的某些key * * @param keys 键列表 */ public void delete(Collection<String> keys) { stringRedisTemplate.delete(keys); ...
repos\spring-boot-demo-master\demo-rbac-security\src\main\java\com\xkcoding\rbac\security\util\RedisUtil.java
2
请完成以下Java代码
public byte[] getCipherValue() { return cipherValue; } /** * Sets the value of the cipherValue property. * * @param value * allowed object is * byte[] */ public void setCipherValue(byte[] value) { this.cipherValue = value; } /** * Gets th...
* {@link CipherReferenceType } * */ public CipherReferenceType getCipherReference() { return cipherReference; } /** * Sets the value of the cipherReference property. * * @param value * allowed object is * {@link CipherReferenceType } * ...
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\CipherDataType.java
1
请完成以下Java代码
public class HeaderRoutePredicateFactory extends AbstractRoutePredicateFactory<HeaderRoutePredicateFactory.Config> { /** * Header key. */ public static final String HEADER_KEY = "header"; /** * Regexp key. */ public static final String REGEXP_KEY = "regexp"; public HeaderRoutePredicateFactory() { supe...
public Object getConfig() { return config; } @Override public String toString() { return String.format("Header: %s regexp=%s", config.header, config.regexp); } }; } public static class Config { @NotEmpty private @Nullable String header; private @Nullable String regexp; public @Nulla...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\handler\predicate\HeaderRoutePredicateFactory.java
1
请完成以下Java代码
/* package */final class HUItemsLocalCache extends AbstractModelListCacheLocal<I_M_HU, I_M_HU_Item> { private final transient IQueryBL queryBL = Services.get(IQueryBL.class); private static final String DYNATTR_Instance = HUItemsLocalCache.class.getName(); public static final HUItemsLocalCache getCreate(final I_M_...
final IQueryBuilder<I_M_HU_Item> queryBuilder = queryBL.createQueryBuilder(I_M_HU_Item.class, ctx) .addEqualsFilter(I_M_HU_Item.COLUMN_M_HU_ID, hu.getM_HU_ID()) .addOnlyActiveRecordsFilter(); final List<I_M_HU_Item> items = queryBuilder .create() .list() .stream() .peek(item -> item.setM_HU(h...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUItemsLocalCache.java
1
请完成以下Java代码
public final class ConstantQueryFilter<T> implements IQueryFilter<T>, ISqlQueryFilter { private static final ConstantQueryFilter<Object> TRUE = new ConstantQueryFilter<>(true); private static final ConstantQueryFilter<Object> FALSE = new ConstantQueryFilter<>(false); @SuppressWarnings("unchecked") public static <T...
{ return value ? SQL_TRUE : SQL_FALSE; } @Override public List<Object> getSqlParams(final Properties ctx) { return getSqlParams(); } public List<Object> getSqlParams() { return Collections.emptyList(); } @Override public boolean accept(final T model) { return value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\ConstantQueryFilter.java
1
请在Spring Boot框架中完成以下Java代码
public class PP_Product_BOM { private final PPOrderCandidateDAO ppOrderCandidateDAO; private final IProductBOMDAO productBOMDAO = Services.get(IProductBOMDAO.class); private final IAttributeSetInstanceBL asiBL = Services.get(IAttributeSetInstanceBL.class); private final IPPOrderDAO ppOrderDAO = Services.get(IPPOrd...
{ final ProductBOMId productBOMId = ProductBOMId.ofRepoId(productBOMRecord.getPP_Product_BOM_ID()); if (isBOMInUse(productBOMId)) { throw new AdempiereException("Product BOM is already in use (linked to a manufacturing order or candidate). It cannot be reactivated!") .appendParametersToMessage() .se...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\productioncandidate\model\interceptor\PP_Product_BOM.java
2
请完成以下Java代码
public void setIsDefaultSO (boolean IsDefaultSO) { set_Value (COLUMNNAME_IsDefaultSO, Boolean.valueOf(IsDefaultSO)); } /** Get Standard (Verkauf). @return Default value for sales transactions */ @Override public boolean isDefaultSO () { Object oo = get_Value(COLUMNNAME_IsDefaultSO); if (oo != null) ...
@param Name Alphanumeric identifier of the entity */ @Override public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLU...
repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java-gen\de\metas\aggregation\model\X_C_Aggregation.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } /** * AD_Language AD_Reference_ID=106 * Reference name: AD_Language */ public static final int AD_LANGUAGE_AD_Reference_ID=106; @Override public void setAD_Language (final java.la...
public void setDescription (final @Nullable java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } @Override public void setIsTranslated (final boolean IsTranslated) { s...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CostClassification_Category_Trl.java
1
请完成以下Java代码
private int getMinimalWarnIntervalInDays(@NonNull final AbstractHUAttributeStorage huAttributeStorage) { int expiryWarningLeadTimeDays = Integer.MAX_VALUE; final List<IHUProductStorage> productStorages = Services .get(IHandlingUnitsBL.class) .getStorageFactory() .getStorage(huAttributeStorage.getM_HU(...
currentDays = productDAO.getGuaranteeMonthsInDays(ProductId.ofRepoId(productRecord.getM_Product_ID())); } else { final ProductCategoryId productCategoryId = ProductCategoryId.ofRepoId(productRecord.getM_Product_Category_ID()); final I_M_Product_Category productCategoryRecord = productDAO.getProduc...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\expiry\ExpiredAttributeStorageListener.java
1
请完成以下Java代码
public class MarketDataSource implements Iterator<MarketData> { private final LinkedList<MarketData> dataQueue = new LinkedList<>(); public MarketDataSource() { // adding some test data into queue this.dataQueue.addAll(Arrays.asList(MarketData.builder() .amount(1) .market(M...
.currency(Currency.EUR) .build())); } @Override public boolean hasNext() { return !this.dataQueue.isEmpty(); } @Override public MarketData next() { final MarketData data = this.dataQueue.pop(); this.dataQueue.add(data); return data; } }
repos\tutorials-master\libraries-3\src\main\java\com\baeldung\sbe\MarketDataSource.java
1
请完成以下Java代码
public int getC_BPartner_ID() { return get_ValueAsInt(COLUMNNAME_C_BPartner_ID); } @Override public void setC_BPartner_Location_ID (final int C_BPartner_Location_ID) { if (C_BPartner_Location_ID < 1) set_Value (COLUMNNAME_C_BPartner_Location_ID, null); else set_Value (COLUMNNAME_C_BPartner_Location...
{ if (M_PickingSlot_ID < 1) set_ValueNoCheck (COLUMNNAME_M_PickingSlot_ID, null); else set_ValueNoCheck (COLUMNNAME_M_PickingSlot_ID, M_PickingSlot_ID); } @Override public int getM_PickingSlot_ID() { return get_ValueAsInt(COLUMNNAME_M_PickingSlot_ID); } @Override public void setM_Warehouse_ID (f...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\picking\model\X_M_PickingSlot.java
1
请完成以下Java代码
public String value() { return attributeNode.getValue(); } public SpinXmlAttribute value(String value) { if (value == null) { throw LOG.unableToSetAttributeValueToNull(namespace(), name()); } attributeNode.setValue(value); return this; } public SpinXmlElement remove() { Element o...
} catch (IOException e) { throw LOG.unableToWriteAttribute(this, e); } } public <C> C mapTo(Class<C> javaClass) { DataFormatMapper mapper = dataFormat.getMapper(); return mapper.mapInternalToJava(this, javaClass); } public <C> C mapTo(String javaClass) { DataFormatMapper mapper = dataFor...
repos\camunda-bpm-platform-master\spin\dataformat-xml-dom\src\main\java\org\camunda\spin\impl\xml\dom\DomXmlAttribute.java
1
请在Spring Boot框架中完成以下Java代码
public class CustomAccessDecisionManager implements AccessDecisionManager { /** * Override the decide method, in which it is judged whether the currently logged in user has the role information required for the current request URL. If not, an AccessDeniedException is thrown, otherwise nothing is done. *...
if (configAttribute.getAttribute().equals(authority.getAuthority())) { return; } } } throw new AccessDeniedException("no permission"); } @Override public boolean supports(ConfigAttribute attribute) { return true; } @Override...
repos\springboot-demo-master\security\src\main\java\com\et\security\config\CustomAccessDecisionManager.java
2
请完成以下Java代码
public class CacheKeyGenerator { /* for testing */ static final String KEY_SEPARATOR = ";"; private static final byte[] KEY_SEPARATOR_BYTES = KEY_SEPARATOR.getBytes(); private final ThreadLocal<MessageDigest> messageDigest; /* for testing */ static final List<KeyValueGenerator> DEFAULT_KEY_VALUE_GENERATORS = Li...
private Stream<KeyValueGenerator> getKeyValueGenerators(List<String> varyHeaders) { return Stream.concat(DEFAULT_KEY_VALUE_GENERATORS.stream(), varyHeaders.stream().sorted().map(header -> new HeaderKeyValueGenerator(header, ","))); } private byte[] generateRawKey(ServerHttpRequest request, List<String> varyHea...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\cache\keygenerator\CacheKeyGenerator.java
1
请完成以下Java代码
private static double div(int v1, int v2) { if (v2 == 0) return 0.0; return v1 / (double) v2; } /** * 安全除法 * @param v1 * @param v2 * @return */ private static double div(double v1, double v2) { if (v2 == 0) return 0.0; return v1 / v2; } ...
public void save(DataOutputStream out) throws Exception { out.writeDouble(l1); out.writeDouble(l2); out.writeDouble(l3); tf.save(out); } @Override public boolean load(ByteArray byteArray) { l1 = byteArray.nextDouble(); l2 = byteArray.nextDouble(); ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\trigram\CharacterBasedGenerativeModel.java
1
请完成以下Java代码
public void setConfidentialType (java.lang.String ConfidentialType) { set_Value (COLUMNNAME_ConfidentialType, ConfidentialType); } /** Get Vertraulichkeit. @return Type of Confidentiality */ @Override public java.lang.String getConfidentialType () { return (java.lang.String)get_Value(COLUMNNAME_Confid...
@return Type of moderation */ @Override public java.lang.String getModerationType () { return (java.lang.String)get_Value(COLUMNNAME_ModerationType); } /** Set Datensatz-ID. @param Record_ID Direct internal record ID */ @Override public void setRecord_ID (int Record_ID) { if (Record_ID < 0) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Chat.java
1
请完成以下Java代码
private void createLineFromCandidate(final I_C_Order newOrder, final SalesOrderLineCandidate candidate) { final ProductId productId = candidate.getBomProductId(); Check.assumeNotNull(productId, "Parameter productId is not null"); final BigDecimal price = candidate.getPrice(); final BigDecimal qty = candidate....
private ProductId bomProductId; private boolean addProductToPriceList; // // Quotation info: @NonNull private final GroupId quotationGroupId; @NonNull private final String quotationGroupName; @NonNull final OrgId orgId; @NonNull final ProductId quotationTemplateProductId; @NonNull final BigDe...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\order\createFrom\CreateSalesOrderAndBOMsFromQuotationCommand.java
1
请完成以下Java代码
public void complete(ExternalTask externalTask, Map<String, Object> variables) { complete(externalTask, variables, null); } @Override public void complete(ExternalTask externalTask, Map<String, Object> variables, Map<String, Object> localVariables) { complete(externalTask.getId(), variables, localVariab...
} @Override public void handleBpmnError(ExternalTask externalTask, String errorCode, String errorMessage) { handleBpmnError(externalTask, errorCode, errorMessage, null); } @Override public void handleBpmnError(ExternalTask externalTask, String errorCode, String errorMessage, Map<String, Object> variable...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\task\impl\ExternalTaskServiceImpl.java
1
请完成以下Java代码
public class ShipmentLineNoInfo { private static final Logger logger = LogManager.getLogger(ShipmentLineNoInfo.class); private final Map<InOutLineId, Integer> shipmentLineIdToLineNo = new HashMap<>(); private final Multimap<Integer, InOutLineId> lineNoToShipmentLineId = MultimapBuilder.hashKeys().arrayListValues()....
} public ImmutableList<InOutLineId> getShipmentLineIdsWithLineNoCollisions() { final ImmutableList.Builder<InOutLineId> result = ImmutableList.builder(); for (final Entry<Integer, Collection<InOutLineId>> entry : lineNoToShipmentLineId.asMap().entrySet()) { final Collection<InOutLineId> shipmentLineIds = e...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\spi\impl\ShipmentLineNoInfo.java
1
请在Spring Boot框架中完成以下Java代码
public class Girl { @Id @GeneratedValue private Integer id; private String cupSize; private Integer age; public Girl() { } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; }
public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public String getCupSize() { return cupSize; } public void setCupSize(String cupSize) { this.cupSize = cupSize; } }
repos\SpringBootLearning-master\firstspringboot-2h\src\main\java\com\forezp\Girl.java
2
请完成以下Java代码
public void afterNew(final I_DD_Order_Candidate record) { final DDOrderCandidateData data = toDDOrderCandidateData(record); final UserId userId = UserId.ofRepoId(record.getUpdatedBy()); materialEventService.enqueueEventAfterNextCommit(DDOrderCandidateCreatedEvent.of(data, userId)); } @ModelChange(timings = { ...
final DDOrderCandidateData data = toDDOrderCandidateData(record); final UserId userId = UserId.ofRepoId(record.getUpdatedBy()); materialEventService.enqueueEventAfterNextCommit(DDOrderCandidateDeletedEvent.of(data, userId)); } private DDOrderCandidateData toDDOrderCandidateData(final I_DD_Order_Candidate record)...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddordercandidate\material_dispo\interceptor\DD_Order_Candidate.java
1