instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void setItemType (final java.lang.String ItemType) { set_Value (COLUMNNAME_ItemType, ItemType); } @Override public java.lang.String getItemType() { return get_ValueAsString(COLUMNNAME_ItemType); } @Override public de.metas.handlingunits.model.I_M_HU_PackingMaterial getM_HU_PackingMaterial() { r...
} @Override public de.metas.handlingunits.model.I_M_HU_PI_Version getM_HU_PI_Version() { return get_ValueAsPO(COLUMNNAME_M_HU_PI_Version_ID, de.metas.handlingunits.model.I_M_HU_PI_Version.class); } @Override public void setM_HU_PI_Version(final de.metas.handlingunits.model.I_M_HU_PI_Version M_HU_PI_Version) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PI_Item.java
1
请在Spring Boot框架中完成以下Java代码
public NacosDataSource nacosDataSource(ObjectMapper objectMapper) { // Nacos 配置。这里先写死,推荐后面写到 application.yaml 配置文件中。 String serverAddress = "127.0.0.1:8848"; // Nacos 服务器地址 String namespace = ""; // Nacos 命名空间 String dataId = "demo-application-flow-rule"; // Nacos 配置集编号 // String ...
public List<FlowRule> convert(String value) { try { return Arrays.asList(objectMapper.readValue(value, FlowRule[].class)); } catch (JsonProcessingException e) { throw new RuntimeException(e); ...
repos\SpringBoot-Labs-master\lab-46\lab-46-sentinel-demo-nacos\src\main\java\cn\iocoder\springboot\lab46\sentineldemo\config\SentinelConfiguration.java
2
请完成以下Java代码
public String getPrincipal() { return principal; } public void setPrincipal(String principal) { this.principal = principal; } public Instant getAuditEventDate() { return auditEventDate; } public void setAuditEventDate(Instant auditEventDate) { this.auditEventDa...
return auditEventType; } public void setAuditEventType(String auditEventType) { this.auditEventType = auditEventType; } public Map<String, String> getData() { return data; } public void setData(Map<String, String> data) { this.data = data; } }
repos\tutorials-master\jhipster-modules\jhipster-uaa\gateway\src\main\java\com\baeldung\jhipster\gateway\domain\PersistentAuditEvent.java
1
请完成以下Java代码
public static Json fail() { return new Json(DEFAULT_OPER_VAL, false, DEFAULT_FAIL_CODE, DEFAULT_FAIL_MSG, null); } public static Json fail(String operate) { return new Json(operate, false, DEFAULT_FAIL_CODE, DEFAULT_FAIL_MSG, null); } public static Json fail(String operate, String message) { return new Json...
return this; } /** 设置操作结果的代码 */ public Json code(int code) { this.put(KEY_CODE, code); return this; } /** 设置操作结果的信息 */ public Json msg(String message) { this.put(KEY_MSG, message); return this; } /** 设置操作返回的数据 */ public Json data(Object dataVal) { this.put(KEY_DATA, dataVal); return this; } /...
repos\spring-boot-quick-master\quick-spring-shiro\src\main\java\com\shiro\vo\Json.java
1
请在Spring Boot框架中完成以下Java代码
public Builder singleLogoutServiceLocation(String singleLogoutServiceLocation) { return (Builder) super.singleLogoutServiceLocation(singleLogoutServiceLocation); } /** * {@inheritDoc} */ @Override public Builder singleLogoutServiceResponseLocation(String singleLogoutServiceResponseLocation) { retur...
public Builder singleLogoutServiceBinding(Saml2MessageBinding singleLogoutServiceBinding) { return (Builder) super.singleLogoutServiceBinding(singleLogoutServiceBinding); } /** * Build an * {@link org.springframework.security.saml2.provider.service.registration.OpenSamlAssertingPartyDetails} * @return ...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\registration\OpenSamlAssertingPartyDetails.java
2
请完成以下Java代码
public boolean add(E e) { return deque.add(e); } @Override public boolean remove(Object o) { return deque.remove(o); } @Override public boolean containsAll(Collection<?> c) { return deque.containsAll(c); } @Override public boolean addAll(Collection<? extend...
@Override public boolean removeAll(Collection<?> c) { return deque.removeAll(c); } @Override public boolean retainAll(Collection<?> c) { return deque.retainAll(c); } @Override public void clear() { deque.clear(); } }
repos\tutorials-master\core-java-modules\core-java-collections-4\src\main\java\com\baeldung\collections\dequestack\ArrayLifoStack.java
1
请完成以下Java代码
public class ProfileView { String username; String bio; String image; boolean following; public static ProfileView toUnfollowedProfileView(User userToMakeView) { return toProfileView(userToMakeView, false); } public static ProfileView toFollowedProfileView(User userToMakeView) {...
} public static ProfileView toProfileViewForViewer(User userToMakeView, User viewer) { var following = userToMakeView.isFollower(viewer); return toProfileView(userToMakeView, following); } private static ProfileView toProfileView(User userToMakeView, boolean following) { return new...
repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\user\dto\ProfileView.java
1
请完成以下Java代码
public I_C_ValidCombination getC_Receivable_A() throws RuntimeException { return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name) .getPO(getC_Receivable_Acct(), get_TrxName()); } /** Set Customer Receivables. @param C_Receivable_Acct Account for Customer Receivables */ pub...
.getPO(getC_Receivable_Services_Acct(), get_TrxName()); } /** Set Receivable Services. @param C_Receivable_Services_Acct Customer Accounts Receivables Services Account */ public void setC_Receivable_Services_Acct (int C_Receivable_Services_Acct) { set_Value (COLUMNNAME_C_Receivable_Services_Acct, Integer....
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_Customer_Acct.java
1
请在Spring Boot框架中完成以下Java代码
public Boolean getSuspended() { return suspended; } public void setSuspended(Boolean suspended) { this.suspended = suspended; } public Boolean getIncludeProcessVariables() { return includeProcessVariables; } public void setIncludeProcessVariables(Boolean includeProcess...
return tenantId; } public String getTenantIdLikeIgnoreCase() { return tenantIdLikeIgnoreCase; } public void setTenantIdLikeIgnoreCase(String tenantIdLikeIgnoreCase) { this.tenantIdLikeIgnoreCase = tenantIdLikeIgnoreCase; } public void setWithoutTenantId(Boolean withoutTena...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\ProcessInstanceQueryRequest.java
2
请完成以下Java代码
private static final void assertValidDatePattern(I_AD_Language language) { final String datePattern = language.getDatePattern(); if (Check.isEmpty(datePattern)) { return; // OK } if (datePattern.indexOf("MM") == -1) { throw new AdempiereException("@Error@ @DatePattern@ - No Month (MM)"); } if (...
throw new AdempiereException("@Error@ @DatePattern@ - No Year (yy)"); } final Locale locale = new Locale(language.getLanguageISO(), language.getCountryCode()); final SimpleDateFormat dateFormat = (SimpleDateFormat)DateFormat.getDateInstance(DateFormat.SHORT, locale); try { dateFormat.applyPattern(datePatt...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MLanguage.java
1
请完成以下Java代码
public void saveActionLog( @NonNull final SecurPharmLog log, @NonNull final SecurPharmProductId productId, @NonNull final SecurPharmActionResultId actionId) { final ImmutableList<SecurPharmLog> logs = ImmutableList.of(log); saveLogs(logs, productId, actionId); } private void saveLogs( @NonNull final...
record.setIsError(log.isError()); // // Request record.setRequestUrl(log.getRequestUrl()); record.setRequestMethod(log.getRequestMethod() != null ? log.getRequestMethod().name() : null); record.setRequestStartTime(TimeUtil.asTimestamp(log.getRequestTime())); // // Response record.setRequestEndTime(Tim...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\log\SecurPharmLogRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class LoginController { private Logger logger = LoggerFactory.getLogger(this.getClass()); @RequestMapping(value = "/login", method = RequestMethod.POST) public String login( @RequestParam(value = "username", required = true) String userName, @RequestParam(value = "password", ...
subject.login(token); } catch (AuthenticationException e) { e.printStackTrace(); // rediect.addFlashAttribute("errorText", "您的账号或密码输入错误!"); return "{\"Msg\":\"您的账号或密码输入错误\",\"state\":\"failed\"}"; } return "{\"Msg\":\"登陆成功\",\"state\":\"success\"}"; } ...
repos\springBoot-master\springboot-shiro\src\main\java\com\us\controller\LoginController.java
2
请完成以下Java代码
private static Object convertParameterToJson(@Nullable final Object value, @NonNull final String adLanguage) { if (value == null || Null.isNull(value)) { return "<null>"; } else if (value instanceof ITranslatableString) { return ((ITranslatableString)value).translate(adLanguage); } else if (value i...
{ if (value == null || Null.isNull(value)) { return "<null>"; } else if (value instanceof ITranslatableString) { return ((ITranslatableString)value).translate(adLanguage); } else if (value instanceof RepoIdAware) { return String.valueOf(((RepoIdAware)value).getRepoId()); } else if (value in...
repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\rest_api\utils\v2\JsonErrors.java
1
请完成以下Java代码
public IQueryFilter<I_PP_Order> getQualityInspectionFilter() { return qualityInspectionFilter; } @Override public Timestamp getDateOfProduction(final I_PP_Order ppOrder) { final Timestamp dateOfProduction; if (ppOrder.getDateDelivered() != null) { dateOfProduction = ppOrder.getDateDelivered(); } e...
public List<I_M_InOutLine> retrieveIssuedInOutLines(final I_PP_Order ppOrder) { // services final IPPOrderMInOutLineRetrievalService ppOrderMInOutLineRetrievalService = Services.get(IPPOrderMInOutLineRetrievalService.class); final IPPCostCollectorBL ppCostCollectorBL = Services.get(IPPCostCollectorBL.class); f...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\impl\MaterialTrackingPPOrderBL.java
1
请完成以下Java代码
public void trxLineProcessed(final IHUContext huContext, final I_M_HU_Trx_Line trxLine) { // nothing } @Override public void huParentChanged(final I_M_HU hu, final I_M_HU_Item parentHUItemOld) { // nothing } @Override public void afterTrxProcessed(final IReference<I_M_HU_Trx_Hdr> trxHdrRef, final List<I_M...
public void afterLoad(final IHUContext huContext, final List<IAllocationResult> loadResults) { // nothing; } @Override public void onUnloadLoadTransaction(final IHUContext huContext, final IHUTransactionCandidate unloadTrx, final IHUTransactionCandidate loadTrx) { // nothing } @Override public void onSpli...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\NullHUTrxListener.java
1
请在Spring Boot框架中完成以下Java代码
public String getExecutionId() { return executionId; } public void setExecutionId(String executionId) { this.executionId = executionId; } public String getInstanceId() { return instanceId; } public void setInstanceId(String instanceId) { this.instanceId = insta...
public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getDecisionKey() { return decisionKey; } public void setDecisionKey(String decisionKey) { this.decisionKey = decisionKey; } public String getDecisionName() { return decisionNam...
repos\flowable-engine-main\modules\flowable-dmn-rest\src\main\java\org\flowable\dmn\rest\service\api\history\HistoricDecisionExecutionResponse.java
2
请完成以下Java代码
public void setC_Invoice_Candidate_Term_ID (int C_Invoice_Candidate_Term_ID) { if (C_Invoice_Candidate_Term_ID < 1) set_Value (COLUMNNAME_C_Invoice_Candidate_Term_ID, null); else set_Value (COLUMNNAME_C_Invoice_Candidate_Term_ID, Integer.valueOf(C_Invoice_Candidate_Term_ID)); } /** Get Vertrag-Rechnungs...
@Override public void setIsAssignedQuantityIncludedInSum (boolean IsAssignedQuantityIncludedInSum) { set_Value (COLUMNNAME_IsAssignedQuantityIncludedInSum, Boolean.valueOf(IsAssignedQuantityIncludedInSum)); } /** Get Zugeordnete Menge wird in Summe einbez.. @return Zugeordnete Menge wird in Summe einbez. */ ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Invoice_Candidate_Assignment.java
1
请在Spring Boot框架中完成以下Java代码
protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler(); successHandler.setTargetUrlParameter("redirectTo"); successHandler.setDefaultTargetUrl(this.adminServer.path("/")); ...
return http.build(); } // Required to provide UserDetailsService for "remember functionality" @Bean public InMemoryUserDetailsManager userDetailsService(PasswordEncoder passwordEncoder) { UserDetails user = User.withUsername("user").password(passwordEncoder.encode("password")).roles("USER").build(); return ne...
repos\spring-boot-admin-master\spring-boot-admin-samples\spring-boot-admin-sample-servlet\src\main\java\de\codecentric\boot\admin\sample\SecuritySecureConfig.java
2
请完成以下Java代码
public Iterable<Path> getRootDirectories() { assertNotClosed(); return Collections.emptySet(); } @Override public Iterable<FileStore> getFileStores() { assertNotClosed(); return Collections.emptySet(); } @Override public Set<String> supportedFileAttributeViews() { assertNotClosed(); return SUPPORTED...
} @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } NestedFileSystem other = (NestedFileSystem) obj; return this.jarPath.equals(other.jarPath); } @Override public int hashCode() { return this.jarP...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\nio\file\NestedFileSystem.java
1
请完成以下Java代码
private final void debugCheckItemsValid() { if (!DEBUG) { return; } final PT parentModel = getParentModel(); final IContextAware ctx = createPlainContextAware(parentModel); final boolean instancesTrackerEnabled = POJOLookupMapInstancesTracker.ENABLED; POJOLookupMapInstancesTracker.ENABLED = false; ...
if (!Objects.equals(this.items, itemsRetrievedNow)) { final int itemsCount = this.items == null ? 0 : this.items.size(); final int itemsRetrievedNowCount = itemsRetrievedNow.size(); throw new AdempiereException("Loaded items and cached items does not match." + "\n Parent: " + parentModelRef.get() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\cache\AbstractModelListCacheLocal.java
1
请在Spring Boot框架中完成以下Java代码
public class App extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(App.class, args); } public static class ApplicationInitializer extends AbstractAnnotationConfigDispatcherServletInitializer { @Override protected Filter[] getS...
protected Class<?>[] getRootConfigClasses() { return null; } @Override protected Class<?>[] getServletConfigClasses() { return null; } @Override protected String[] getServletMappings() { return null; } } }
repos\tutorials-master\spring-security-modules\spring-security-core-2\src\main\java\com\baeldung\app\App.java
2
请完成以下Java代码
private void cancelRpcSubscription(TbCoapClientState state) { if (state.getRpc() != null) { clientsByToken.remove(state.getRpc().getToken()); CoapExchange exchange = state.getRpc().getExchange(); state.setRpc(null); transportService.process(state.getSession(), ...
new CoapResponseCodeCallback(exchange, CoAP.ResponseCode.DELETED, CoAP.ResponseCode.INTERNAL_SERVER_ERROR)); if (state.getRpc() == null) { closeAndCleanup(state); } } } private void closeAndCleanup(TbCoapClientState state) { transportService.process(state...
repos\thingsboard-master\common\transport\coap\src\main\java\org\thingsboard\server\transport\coap\client\DefaultCoapClientContext.java
1
请完成以下Java代码
default ET compile(final String expressionStr) { return compile(ExpressionContext.EMPTY, expressionStr); } /** * Compiles given string expression * * If the expression cannot be evaluated, returns the given default expression. * * This method does not throw any exception, but in case of error that er...
default ET compileOrDefault(final String expressionStr, final ET defaultExpression) { try { return compile(expressionStr); } catch (final Exception ex) { final Logger logger = LogManager.getLogger(getClass()); logger.warn("Failed parsing '{}'. Returning default expression: {}", expressionStr, defaul...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\IExpressionCompiler.java
1
请在Spring Boot框架中完成以下Java代码
public class DynamicSecurityMetadataSource implements FilterInvocationSecurityMetadataSource { private static Map<String, ConfigAttribute> configAttributeMap = null; @Autowired private DynamicSecurityService dynamicSecurityService; @PostConstruct public void loadDataSource() { configAttrib...
Iterator<String> iterator = configAttributeMap.keySet().iterator(); //获取访问该路径所需资源 while (iterator.hasNext()) { String pattern = iterator.next(); if (pathMatcher.match(pattern, path)) { configAttributes.add(configAttributeMap.get(pattern)); } } ...
repos\mall-master\mall-security\src\main\java\com\macro\mall\security\component\DynamicSecurityMetadataSource.java
2
请完成以下Java代码
public void onParameterChanged(String parameterName) { if (!WAREHOUSE_PARAM_NAME.equals(parameterName)) { return; } if (warehouseIdOrNull() == null) { locatorRepoId = 0; return; } locatorRepoId = warehouseBL.getOrCreateDefaultLocatorId(warehouseId()).getRepoId(); } @ProcessParamLookupValuesP...
protected void customizeParametersBuilder(@NonNull final CreateReceiptsParametersBuilder parametersBuilder) { final LocatorId locatorId = LocatorId.ofRepoIdOrNull(warehouseIdOrNull(), locatorRepoId); parametersBuilder.destinationLocatorIdOrNull(locatorId); } private WarehouseId warehouseId() { return Warehou...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_CreateReceipt_LocatorParams.java
1
请完成以下Java代码
static void setZeroesInFirstRow(int[][] matrix, int cols) { for (int j = 0; j < cols; j++) { matrix[0][j] = 0; } } static void setZeroesInFirstCol(int[][] matrix, int rows) { for (int i = 0; i < rows; i++) { matrix[i][0] = 0; } } static void setZ...
markZeroesInMatrix(matrix, rows, cols); setZeroesInRows(matrix, rows, cols); setZeroesInCols(matrix, rows, cols); if (firstRowZero) { setZeroesInFirstRow(matrix, cols); } if (firstColZero) { setZeroesInFirstCol(matrix, rows); } ...
repos\tutorials-master\core-java-modules\core-java-arrays-operations-advanced-2\src\main\java\com\baeldung\matrixtozero\SetMatrixToZero.java
1
请完成以下Java代码
public void setUOM (final java.lang.String UOM) { set_Value (COLUMNNAME_UOM, UOM); } @Override public java.lang.String getUOM() { return get_ValueAsString(COLUMNNAME_UOM); } @Override public void setValidFrom (final java.sql.Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); }
@Override public java.sql.Timestamp getValidFrom() { return get_ValueAsTimestamp(COLUMNNAME_ValidFrom); } @Override public void setValidTo (final java.sql.Timestamp ValidTo) { set_Value (COLUMNNAME_ValidTo, ValidTo); } @Override public java.sql.Timestamp getValidTo() { return get_ValueAsTimestamp(CO...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Campaign_Price.java
1
请完成以下Java代码
public void setPublishAuthorizationSuccess(boolean publishAuthorizationSuccess) { this.publishAuthorizationSuccess = publishAuthorizationSuccess; } /** * By rejecting public invocations (and setting this property to <tt>true</tt>), * essentially you are ensuring that every secure object invocation advised by ...
this.runAsManager = runAsManager; } public void setValidateConfigAttributes(boolean validateConfigAttributes) { this.validateConfigAttributes = validateConfigAttributes; } private void publishEvent(ApplicationEvent event) { if (this.eventPublisher != null) { this.eventPublisher.publishEvent(event); } } ...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\intercept\AbstractSecurityInterceptor.java
1
请完成以下Java代码
public int getRow() { return m_row; } // getRow /** * Get Column * @return col no */ public int getCol() { return m_col; } // getCol /** * Compares this object with the specified object for order. Returns a * negative integer, zero, or a positive integer as this object is less * than, ...
/** * Is Object Equal * @param o * @return true if equal */ public boolean equals(Object o) { if (o instanceof ALayoutConstraint) return compareTo(o) == 0; return false; } // equal /** * To String * @return info */ public String toString() { return "ALayoutConstraint [Row=" + m_row...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ALayoutConstraint.java
1
请在Spring Boot框架中完成以下Java代码
public class TransactionalService { private final Cache<String, Integer> transactionalCache; private static final String KEY = "key"; public TransactionalService(Cache<String, Integer> transactionalCache) { this.transactionalCache = transactionalCache; transactionalCache.put(KEY, 0); ...
e.printStackTrace(); return 0; } } public void startBackgroundBatch() { try { TransactionManager tm = transactionalCache.getAdvancedCache().getTransactionManager(); tm.begin(); transactionalCache.put(KEY, 1000); System.out.println("How...
repos\tutorials-master\libraries-data-2\src\main\java\com\baeldung\infinispan\service\TransactionalService.java
2
请在Spring Boot框架中完成以下Java代码
public class MaterialTrackingId implements RepoIdAware { int repoId; @JsonCreator public static MaterialTrackingId ofRepoId(final int repoId) { return new MaterialTrackingId(repoId); } public static MaterialTrackingId ofRepoIdOrNull(@Nullable final Integer repoId) { return repoId != null && repoId > 0 ? ne...
return TableRecordReference.of(I_M_Material_Tracking.Table_Name, getRepoId()); } public static int toRepoId(@Nullable final MaterialTrackingId materialTrackingId) { return materialTrackingId != null ? materialTrackingId.getRepoId() : -1; } @Override @JsonValue public int getRepoId() { return repoId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\MaterialTrackingId.java
2
请完成以下Java代码
public EsrAddressType getBank() { return bank; } /** * Sets the value of the bank property. * * @param value * allowed object is * {@link EsrAddressType } * */ public void setBank(EsrAddressType value) { this.bank = value; } /** ...
* allowed object is * {@link String } * */ public void setParticipantNumber(String value) { this.participantNumber = value; } /** * Gets the value of the referenceNumber property. * * @return * possible object is * {@link String } *...
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\Esr5Type.java
1
请完成以下Java代码
public I_C_UOM getC_UOM(final I_PP_MRP mrp) { Check.assumeNotNull(mrp, "mrp not null"); return Services.get(IProductBL.class).getStockUOM(mrp.getM_Product_ID()); } @Override public I_C_UOM getC_UOM(final I_PP_MRP_Alternative mrpAlternative) { Check.assumeNotNull(mrpAlternative, "mrpAlternative not null"); ...
} @Override public boolean isQtyOnHandInTransit(final I_PP_MRP mrpSupply) { Check.assumeNotNull(mrpSupply, "mrpSupply not null"); final String typeMRP = mrpSupply.getTypeMRP(); if (!X_PP_MRP.TYPEMRP_Supply.equals(typeMRP)) { return false; } final String orderType = mrpSupply.getOrderType(); retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\mrp\api\impl\MRPBL.java
1
请完成以下Java代码
public class QRPaymentStringDataProvider extends AbstractPaymentStringDataProvider { private static final IBPartnerDAO bpartnerDAO = Services.get(IBPartnerDAO.class); private static final ICurrencyDAO currencyDAO = Services.get(ICurrencyDAO.class); private static final IESRBPBankAccountDAO esrbpBankAccountDAO = Serv...
bpBankAccount.setC_Currency_ID(currency.getId().getRepoId()); bpBankAccount.setIsEsrAccount(true); // ..because we are creating this from an ESR/QRR string bpBankAccount.setIsACH(true); final String bPartnerName = bpartnerDAO.getBPartnerNameById(BPartnerId.ofRepoId(bpartnerId)); bpBankAccount.setA_Name(bPartner...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\api\impl\QRPaymentStringDataProvider.java
1
请完成以下Java代码
public String toJson() { return json; } @JsonCreator public static final MediaType fromJson(final String json) { final MediaType type = json2type.get(json); if (type == null) { throw new NoSuchElementException("Invalid media type '" + json + "'." + " Available media types are: " + Stream.of(values...
if(Check.isBlank(str)) { return ImmutableSet.of(); } final List<String> parts = Splitter.on(",") .trimResults() .omitEmptyStrings() .splitToList(str); return parts.stream() .map(MediaType::fromJson) .collect(ImmutableSet.toImmutableSet()); } private static final ImmutableMap<String, Me...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\MediaType.java
1
请在Spring Boot框架中完成以下Java代码
public class HistoricJobLogRestServiceImpl implements HistoricJobLogRestService { protected ObjectMapper objectMapper; protected ProcessEngine processEngine; public HistoricJobLogRestServiceImpl(ObjectMapper objectMapper, ProcessEngine processEngine) { this.objectMapper = objectMapper; this.processEngin...
public CountResultDto getHistoricJobLogsCount(UriInfo uriInfo) { HistoricJobLogQueryDto queryDto = new HistoricJobLogQueryDto(objectMapper, uriInfo.getQueryParameters()); return queryHistoricJobLogsCount(queryDto); } @Override public CountResultDto queryHistoricJobLogsCount(HistoricJobLogQueryDto queryDt...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\history\HistoricJobLogRestServiceImpl.java
2
请完成以下Java代码
public Long getOrderId() { return orderId; } public void setOrderId(Long orderId) { this.orderId = orderId; } public String getOrderSn() { return orderSn; } public void setOrderSn(String orderSn) { this.orderSn = orderSn; } @Override public String ...
sb.append(", couponId=").append(couponId); sb.append(", memberId=").append(memberId); sb.append(", couponCode=").append(couponCode); sb.append(", memberNickname=").append(memberNickname); sb.append(", getType=").append(getType); sb.append(", createTime=").append(createTime); ...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\SmsCouponHistory.java
1
请完成以下Java代码
public List<I_M_HU_PI_Item_Product> retrieveHUPIItemProductRecords( @NonNull final Properties ctx, @NonNull final ProductId productId, @Nullable final BPartnerId bpartnerId, final boolean includeVirtualItem) { final IHUPIItemProductDAO hupiItemProductDAO = Services.get(IHUPIItemProductDAO.class); final...
/** * Creates a string of the form "PI-Version-Name (Qty x Included-PI)", e.g. "Palette (20 x IFCO)". * * @param huPIItem may not be {@code null} * @return */ public String buildHUPIItemString(@NonNull final I_M_HU_PI_Item huPIItem) { final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlingUnitsD...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\util\WEBUI_ProcessHelper.java
1
请完成以下Java代码
protected void registerInterceptors(@NonNull final IModelValidationEngine engine) { // nothing on this level } /** * Called onInit to setup tab level callouts * * @param tabCalloutsRegistry */ protected void registerTabCallouts(final ITabCalloutFactory tabCalloutsRegistry) { // nothing on this level ...
private void setupMigrationScriptsLogger() { final Set<String> tableNames = getTableNamesToSkipOnMigrationScriptsLogging(); if (tableNames != null && !tableNames.isEmpty()) { final IMigrationLogger migrationLogger = Services.get(IMigrationLogger.class); migrationLogger.addTablesToIgnoreList(tableNames); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\modelvalidator\AbstractModuleInterceptor.java
1
请完成以下Java代码
public class CreditorReferenceType2 { @XmlElement(name = "CdOrPrtry", required = true) protected CreditorReferenceType1Choice cdOrPrtry; @XmlElement(name = "Issr") protected String issr; /** * Gets the value of the cdOrPrtry property. * * @return * possible object is ...
/** * Gets the value of the issr property. * * @return * possible object is * {@link String } * */ public String getIssr() { return issr; } /** * Sets the value of the issr property. * * @param value * allowed object is ...
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\CreditorReferenceType2.java
1
请完成以下Java代码
public class ClassDelegateHttpHandler extends AbstractClassDelegate implements HttpRequestHandler, HttpResponseHandler { private static final long serialVersionUID = 1L; public ClassDelegateHttpHandler(String className, List<FieldDeclaration> fieldDeclarations) { super(className, fieldDeclarations); ...
} else { throw new FlowableIllegalArgumentException(delegateInstance.getClass().getName() + " doesn't implement " + HttpRequestHandler.class); } } protected HttpResponseHandler getHttpResponseHandlerInstance() { Object delegateInstance = instantiateDelegate(className, fieldDeclarati...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\http\handler\ClassDelegateHttpHandler.java
1
请完成以下Java代码
public SseEmitter handleSse() { SseEmitter emitter = new SseEmitter(); nonBlockingService.execute(() -> { try { emitter.send(Constants.API_SSE_MSG + " @ " + new Date()); emitter.complete(); } catch (Exception ex) { System.out.print...
sseMvcExecutor.execute(() -> { try { for (int i = 0; true; i++) { SseEventBuilder event = SseEmitter.event() .data("SSE MVC - " + LocalTime.now() .toString()) .id(String.valueOf(i)) ...
repos\tutorials-master\spring-web-modules\spring-5-mvc\src\main\java\com\baeldung\web\SseEmitterController.java
1
请在Spring Boot框架中完成以下Java代码
class RAGChatbotConfiguration { private static final int MAX_RESULTS = 10; @Bean PromptTemplate promptTemplate( @Value("classpath:prompt-template.st") Resource promptTemplate ) throws IOException { String template = promptTemplate.getContentAsString(StandardCharsets.UTF_8); ret...
ChatModel chatModel, VectorStore vectorStore, PromptTemplate promptTemplate ) { return ChatClient .builder(chatModel) .defaultAdvisors( QuestionAnswerAdvisor .builder(vectorStore) .promptTemplate(promptTemplate) ...
repos\tutorials-master\spring-ai-modules\spring-ai-vector-stores\spring-ai-oracle\src\main\java\com\baeldung\springai\vectorstore\oracle\RAGChatbotConfiguration.java
2
请完成以下Java代码
public static BearerTokenError invalidRequest(String message) { try { return new BearerTokenError(BearerTokenErrorCodes.INVALID_REQUEST, HttpStatus.BAD_REQUEST, message, DEFAULT_URI); } catch (IllegalArgumentException ex) { // some third-party library error messages are not suitable for RFC 6750's /...
/** * Create a {@link BearerTokenError} caused by an invalid token * @param scope the scope attribute to use in the error * @return a {@link BearerTokenError} */ public static BearerTokenError insufficientScope(String message, String scope) { try { return new BearerTokenError(BearerTokenErrorCodes.INSUFFI...
repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\BearerTokenErrors.java
1
请完成以下Spring Boot application配置
#Stripe keys - REPLACE WITH ACTUAL KEYS stripe.keys.public=pk_test_XXXXXXXXXXXXXX stripe.keys.secret=sk_test_XXXXXXXXXXXXXX #Don't cache thymel
eaf files - FOR TEST PURPOSE ONLY spring.thymeleaf.cache=false
repos\springboot-demo-master\stripe\src\main\resources\application.properties
2
请完成以下Java代码
public void setPP_Order_Receipt_ID (final int PP_Order_Receipt_ID) { if (PP_Order_Receipt_ID < 1) set_ValueNoCheck (COLUMNNAME_PP_Order_Receipt_ID, null); else set_ValueNoCheck (COLUMNNAME_PP_Order_Receipt_ID, PP_Order_Receipt_ID); } @Override public int getPP_Order_Receipt_ID() { return get_ValueA...
public void setQualityInspectionCycle (final @Nullable java.lang.String QualityInspectionCycle) { set_ValueNoCheck (COLUMNNAME_QualityInspectionCycle, QualityInspectionCycle); } @Override public java.lang.String getQualityInspectionCycle() { return get_ValueAsString(COLUMNNAME_QualityInspectionCycle); } @...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_RV_M_Material_Tracking_HU_Details.java
1
请完成以下Java代码
public class EngineClientLogger extends ExternalTaskClientLogger { protected EngineClientException exceptionWhileReceivingResponse(HttpRequest httpRequest, RestException e) { return new EngineClientException(exceptionMessage( "001", "Request '{}' returned error: status code '{}' - message: {}", httpRequest...
protected <T> EngineClientException exceptionWhileDeserializingJsonObject(Class<T> responseDtoClass, Throwable t) { return new EngineClientException(exceptionMessage( "006", "Exception while deserializing json object to response dto class '{}'", responseDtoClass), t); } protected <D extends RequestDto> E...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\impl\EngineClientLogger.java
1
请在Spring Boot框架中完成以下Java代码
public class BookServiceImpl implements BookService { private static final AtomicLong counter = new AtomicLong(); /** * 使用集合模拟数据库 */ private static List<Book> books = new ArrayList<>( Arrays.asList( new Book(counter.incrementAndGet(), "book"))); // 模拟数据库,存储...
@Override public Book findById(Long id) { return BOOK_DB.get(id.toString()); } @Override public boolean exists(Book book) { return findByName(book.getName()) != null; } @Override public Book findByName(String name) { for (Book book : books) { if (book.g...
repos\springboot-learning-example-master\chapter-3-spring-boot-web\src\main\java\demo\springboot\service\impl\BookServiceImpl.java
2
请完成以下Java代码
private void process_PriceChangeEvent(final I_PMM_RfQResponse_ChangeEvent event) { updateC_RfQResponseLine(event); assertRfqResponseNotClosed(event); final I_C_RfQResponseLine rfqResponseLine = event.getC_RfQResponseLine(); final BigDecimal priceOld = rfqResponseLine.getPrice(); rfqResponseLine.setPrice(eve...
final String rfqResponseLine_uuid = event.getC_RfQResponseLine_UUID(); final int rfqReponseLineId = SyncUUIDs.getC_RfQResponseLine_ID(rfqResponseLine_uuid); event.setC_RfQResponseLine_ID(rfqReponseLineId); } private void assertRfqResponseNotClosed(final I_PMM_RfQResponse_ChangeEvent event) { final I_C_RfQResp...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\rfq\event\impl\PMMRfQResponseChangeEventTrxItemProcessor.java
1
请完成以下Java代码
public Iterator getPrefixes(String arg0) { return null; } @Override public String getPrefix(String arg0) { return null; } @Override public String getNamespaceURI(String arg0) { ...
short nodeType = child.getNodeType(); if (nodeType == Node.ELEMENT_NODE) clean(child); else if (nodeType == Node.TEXT_NODE) { String trimmedNodeVal = child.getNodeValue().trim(); if (trimmedNodeVal.length() == 0) node.removeChi...
repos\tutorials-master\xml-modules\xml\src\main\java\com\baeldung\xml\DefaultParser.java
1
请完成以下Java代码
public void setOwner(String owner) { activiti5Task.setOwner(owner); } @Override public void setAssignee(String assignee) { activiti5Task.setAssignee(assignee); } @Override public DelegationState getDelegationState() { return activiti5Task.getDelegationState(); } ...
@Override public void setTenantId(String tenantId) { activiti5Task.setTenantId(tenantId); } @Override public void setFormKey(String formKey) { activiti5Task.setFormKey(formKey); } @Override public boolean isSuspended() { return activiti5Task.isSuspended(); } }
repos\flowable-engine-main\modules\flowable5-compatibility\src\main\java\org\flowable\compatibility\wrapper\Flowable5TaskWrapper.java
1
请完成以下Java代码
public static void schedule(@NonNull final ShipmentSchedulesUpdateSchedulerRequest request) { _schedule(request); } private static void _schedule(@NonNull final ShipmentSchedulesUpdateSchedulerRequest request) { SCHEDULER.schedule(request); } private static final UpdateInvalidShipmentSchedulesScheduler // ...
try (final MDCCloseable ignored = ShipmentSchedulesMDC.putRevalidationId(selectionId)) { final ShipmentScheduleUpdateInvalidRequest request = ShipmentScheduleUpdateInvalidRequest.builder() .ctx(InterfaceWrapperHelper.getCtx(workpackage)) .selectionId(selectionId) .createMissingShipmentSchedules(fals...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\async\UpdateInvalidShipmentSchedulesWorkpackageProcessor.java
1
请完成以下Java代码
public void beforeApply(WeightConfig config) { if (publisher != null) { publisher.publishEvent(new WeightDefinedEvent(this, config)); } } @Override public Predicate<ServerWebExchange> apply(WeightConfig config) { return new GatewayPredicate() { @Override public boolean test(ServerWebExchange exchange...
return false; } @Override public Object getConfig() { return config; } @Override public String toString() { return String.format("Weight: %s %s", config.getGroup(), config.getWeight()); } }; } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\handler\predicate\WeightRoutePredicateFactory.java
1
请完成以下Java代码
public void setIsGenerated (final boolean IsGenerated) { set_ValueNoCheck (COLUMNNAME_IsGenerated, IsGenerated); } @Override public boolean isGenerated() { return get_ValueAsBoolean(COLUMNNAME_IsGenerated); } @Override public void setIsSplitAcctTrx (final boolean IsSplitAcctTrx) { set_Value (COLUMNNAM...
@Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } @Override public void setQty (final @Nullable BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_GL_JournalLine.java
1
请在Spring Boot框架中完成以下Java代码
public Response getDeploymentResourceData(String resourceId) { RepositoryService repositoryService = engine.getRepositoryService(); InputStream resourceAsStream = repositoryService.getResourceAsStreamById(deploymentId, resourceId); if (resourceAsStream != null) { DeploymentResourceDto resource = get...
} } if (filename == null) { filename = "data"; } if (mediaType == null) { mediaType = MediaType.APPLICATION_OCTET_STREAM; } return Response .ok(resourceAsStream, mediaType) .header("Content-Disposition", URLEncodingUtil.buildAttachmentValue(file...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\repository\impl\DeploymentResourcesResourceImpl.java
2
请完成以下Java代码
public class CoreJacksonModule extends SecurityJacksonModule { public CoreJacksonModule() { super(CoreJacksonModule.class.getName(), new Version(1, 0, 0, null, null, null)); } protected CoreJacksonModule(String name, Version version) { super(name, version); } @Override public void configurePolymorphicTypeV...
.allowIfSubType("java.util.Collections$EmptyMap") .allowIfSubType("java.util.Date") .allowIfSubType("java.util.Arrays$ArrayList") .allowIfSubType("java.util.Collections$UnmodifiableMap") .allowIfSubType("java.util.LinkedHashMap") .allowIfSubType("java.util.Collections$SingletonList") .allowIfSubType("...
repos\spring-security-main\core\src\main\java\org\springframework\security\jackson\CoreJacksonModule.java
1
请完成以下Java代码
public List<String> evaluateExpressionsAndExecuteIdsList(CommandContext commandContext) { validate(); evaluateExpressions(); return !hasExcludingConditions() ? executeIdsList(commandContext) : new ArrayList<>(); } public List<String> executeIdsList(CommandContext commandContext) { throw new Unsuppo...
} protected void checkMaxResultsLimit() { if (maxResultsLimitEnabled) { QueryMaxResultsLimitUtil.checkMaxResultsLimit(maxResults); } } public void enableMaxResultsLimit() { maxResultsLimitEnabled = true; } public void disableMaxResultsLimit() { maxResultsLimitEnabled = false; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\AbstractQuery.java
1
请在Spring Boot框架中完成以下Java代码
public class CacheConfig { /** * 配置默认的缓存管理器 */ @Primary @Bean("defaultCacheManager") public CacheManager cacheManager() { CaffeineCacheManager cacheManager = new CaffeineCacheManager(); cacheManager.setCaffeine(Caffeine.newBuilder() // 设置最后一次写入后经过固定时间过期. ...
/** * token放在本地缓存中 * 可以改造为放在redis中 */ @Bean("tokenCacheManager") public Cache<String, SessionUserInfo> caffeineCache() { return Caffeine.newBuilder() // 设置最后一次访问后经过固定时间过期. .expireAfterAccess(30L, TimeUnit.MINUTES) // 初始的缓存空间大小 ...
repos\SpringBoot-Shiro-Vue-master\back\src\main\java\com\heeexy\example\config\system\CacheConfig.java
2
请完成以下Java代码
public boolean isActive() { return isActive; } public String getInvolvedUser() { return involvedUser; } public void setInvolvedUser(String involvedUser) { this.involvedUser = involvedUser; } public Set<String> getProcessDefinitionIds() { return processDefinitio...
} public boolean isWithoutTenantId() { return withoutTenantId; } public String getName() { return name; } public String getNameLike() { return nameLike; } public void setName(String name) { this.name = name; } public void setNameLike(String nameLi...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\ExecutionQueryImpl.java
1
请完成以下Java代码
public boolean isObject() { return "Object".equals(javaCode); } public boolean isString() { return String.class.equals(typeClass); } public boolean isBoolean() { return boolean.class.equals(typeClass) || Boolean.class.equals(typeClass); } public boolean isInteger()
{ return int.class.equals(typeClass) || Integer.class.equals(typeClass); } public boolean isBigDecimal() { return java.math.BigDecimal.class.equals(typeClass); } public boolean isTimestamp() { return java.sql.Timestamp.class.equals(typeClass); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\modelgen\DataTypeInfo.java
1
请完成以下Java代码
public void setMktInfrstrctrTxId(String value) { this.mktInfrstrctrTxId = value; } /** * Gets the value of the prcgId property. * * @return * possible object is * {@link String } * */ public String getPrcgId() { return prcgId; } /** ...
* For example, to add a new item, do as follows: * <pre> * getPrtry().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link ProprietaryReference1 } * * */ public List<ProprietaryReference1> getPrtry() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\TransactionReferences3.java
1
请在Spring Boot框架中完成以下Java代码
public boolean setIsMember(String key, Object value) { return setOperations.isMember(key, value); } public long setAdd(String key, Object... values) { return setOperations.add(key, values); } public long setAdd(String key, long milliseconds, Object... values) { Long count = set...
public long listRightPushAll(String key, List<Object> value) { return listOperations.rightPushAll(key, value); } public boolean listRightPushAll(String key, List<Object> value, long milliseconds) { listOperations.rightPushAll(key, value); if (milliseconds > 0) { return expir...
repos\spring-boot-best-practice-master\spring-boot-redis\src\main\java\cn\javastack\springboot\redis\service\RedisOptService.java
2
请在Spring Boot框架中完成以下Java代码
public class RpAccountServiceImpl implements RpAccountService{ @Autowired private RpAccountDao rpAccountDao; @Override public void saveData(RpAccount rpAccount) { rpAccountDao.insert(rpAccount); } @Override public void updateData(RpAccount rpAccount) { rpAccountDao.update(rpAccount); } @Override publ...
} @Override public PageBean listPage(PageParam pageParam, RpAccount rpAccount) { Map<String, Object> paramMap = new HashMap<String, Object>(); paramMap.put("accountNo", rpAccount.getAccountNo()); return rpAccountDao.listPage(pageParam, paramMap); } @Override public RpAccount getDataByUserNo(String userNo)...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\service\impl\RpAccountServiceImpl.java
2
请在Spring Boot框架中完成以下Java代码
public IHUProductStorage getSingleHUProductStorage(@NonNull final HuId huId) { return handlingUnitsBL.getSingleHUProductStorage(huId); } public Quantity getProductQuantity(@NonNull final HuId huId, @NonNull ProductId productId) { return getHUProductStorage(huId, productId) .map(IHUProductStorage::getQty) ...
final IHUStorageFactory storageFactory = handlingUnitsBL.getStorageFactory(); return Optional.ofNullable(storageFactory.getStorage(hu).getProductStorageOrNull(productId)); } public void assetHUContainsProduct(@NonNull final HUQRCode huQRCode, @NonNull final ProductId productId) { final HuId huId = huQRCodesServ...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\external_services\hu\DistributionHUService.java
2
请完成以下Java代码
public UsernamePasswordAuthenticationToken deserialize(JsonParser jp, DeserializationContext ctxt) throws JacksonException { JsonNode jsonNode = ctxt.readTree(jp); boolean authenticated = readJsonNode(jsonNode, "authenticated").asBoolean(); JsonNode principalNode = readJsonNode(jsonNode, "principal"); Object...
} private Object getPrincipal(DeserializationContext ctxt, JsonNode principalNode) throws StreamReadException, DatabindException { if (principalNode.isObject()) { return ctxt.readTreeAsValue(principalNode, Object.class); } return principalNode.asString(); } private JsonNode readJsonNode(JsonNode jsonNo...
repos\spring-security-main\core\src\main\java\org\springframework\security\jackson\UsernamePasswordAuthenticationTokenDeserializer.java
1
请完成以下Java代码
public void addPropertyChangeListener(final PropertyChangeListener listener) { delegate.addPropertyChangeListener(listener); } public void removePropertyChangeListener(final PropertyChangeListener listener) { delegate.removePropertyChangeListener(listener); } public PropertyChangeListener[] getPropertyChang...
public void firePropertyChange(final String propertyName, final int oldValue, final int newValue) { final PropertyChangeEvent event = new PropertyChangeEvent(source, propertyName, oldValue, newValue); firePropertyChange(event); } public void firePropertyChange(final String propertyName, final boolean oldValue, ...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\beans\DelayedPropertyChangeSupport.java
1
请完成以下Java代码
public boolean canWrite(Class<?> clazz, @Nullable MediaType mediaType) { return this.delegate.canWrite(clazz, mediaType); } @Override public List<MediaType> getSupportedMediaTypes() { return this.delegate.getSupportedMediaTypes(); } @Override public List<MediaType> getSupportedMediaTypes(Class<?> cl...
@Override public T read(ResolvableType type, HttpInputMessage inputMessage, @Nullable Map<String, Object> hints) throws IOException, HttpMessageNotReadableException { return this.delegate.read(type.getType(), null, inputMessage); } @Override public boolean canWrite(ResolvableType targetType, Class<?> va...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\authentication\WebAuthnAuthenticationFilter.java
1
请完成以下Java代码
public static Optional<PaymentId> optionalOfRepoId(final int repoId) {return Optional.ofNullable(ofRepoIdOrNull(repoId));} public static int toRepoId(final PaymentId id) { return id != null ? id.getRepoId() : -1; } public static ImmutableSet<Integer> toIntSet(@NonNull final Collection<PaymentId> ids) { if (i...
int repoId; private PaymentId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_Payment_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } public static boolean equals(@Nullable PaymentId id1, @Nullable PaymentId id2) {return Objects.equals(id1, id2);} }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\payment\PaymentId.java
1
请完成以下Java代码
public class LoggerTrxItemExceptionHandler implements ITrxItemExceptionHandler { public static final LoggerTrxItemExceptionHandler instance = new LoggerTrxItemExceptionHandler(); private final transient Logger logger = LogManager.getLogger(getClass()); protected LoggerTrxItemExceptionHandler() { } @Override p...
public void onCompleteChunkError(final Throwable e) { logger.warn("Error while completing current chunk", e); } @Override public void onCommitChunkError(final Throwable e) { logger.info("Processor failed to commit current chunk => rollback transaction", e); } @Override public void afterCompleteChunkError(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\processor\api\LoggerTrxItemExceptionHandler.java
1
请完成以下Java代码
public boolean seeksAfterHandling() { return isSeekAfterError(); } @Override public boolean deliveryAttemptHeader() { return true; } @Override public boolean handleOne(Exception thrownException, ConsumerRecord<?, ?> record, Consumer<?, ?> consumer, MessageListenerContainer container) { try { return...
Runnable invokeListener) { return handle(thrownException, data, consumer, container, invokeListener); } @Override public void handleOtherException(Exception thrownException, Consumer<?, ?> consumer, MessageListenerContainer container, boolean batchListener) { if (thrownException instanceof SerializationExc...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\DefaultErrorHandler.java
1
请在Spring Boot框架中完成以下Java代码
public TopicBuilder assignReplicas(int partition, List<Integer> replicaList) { if (this.replicasAssignments == null) { this.replicasAssignments = new HashMap<>(); } this.replicasAssignments.put(partition, new ArrayList<>(replicaList)); return this; } /** * Set the configs. * @param configProps the con...
public NewTopic build() { NewTopic topic = this.replicasAssignments == null ? new NewTopic(this.name, this.partitions, this.replicas) : new NewTopic(this.name, this.replicasAssignments); if (!this.configs.isEmpty()) { topic.configs(this.configs); } return topic; } /** * Create a TopicBuilder wit...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\config\TopicBuilder.java
2
请完成以下Java代码
public boolean isHstsIncludeSubdomainsDisabled() { return hstsIncludeSubdomainsDisabled; } public void setHstsIncludeSubdomainsDisabled(boolean hstsIncludeSubdomainsDisabled) { this.hstsIncludeSubdomainsDisabled = hstsIncludeSubdomainsDisabled; } public String getHstsValue() { return hstsValue; ...
.add("xssProtectionOption=" + xssProtectionOption) .add("xssProtectionValue=" + xssProtectionValue) .add("contentSecurityPolicyDisabled=" + contentSecurityPolicyDisabled) .add("contentSecurityPolicyValue=" + contentSecurityPolicyValue) .add("contentTypeOptionsDisabled=" + contentTypeOptionsDis...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\HeaderSecurityProperties.java
1
请完成以下Java代码
public class Customer { @Id private String id; private Long storeId; private Long number; private String name; public Customer() { } public Customer(String name) { this.name = name; } public String getId() { return id; } public void setId(String id)...
return storeId; } public void setStoreId(Long storeId) { this.storeId = storeId; } public Long getNumber() { return number; } public void setNumber(Long number) { this.number = number; } public String getName() { return name; } public void set...
repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb-2\src\main\java\com\baeldung\boot\unique\field\data\Customer.java
1
请完成以下Java代码
public Sentry getSentry() { return sentryRefAttribute.getReferenceTargetElement(this); } public void setSentry(Sentry sentry) { sentryRefAttribute.setReferenceTargetElement(this, sentry); } public ExitCriterion getExitCriterion() { return exitCriterionRefAttribute.getReferenceTargetElement(this); ...
return new PlanItemOnPartImpl(instanceContext); } }); sourceRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SOURCE_REF) .idAttributeReference(PlanItem.class) .build(); exitCriterionRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_EXIT_CRITERION_REF) ...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\PlanItemOnPartImpl.java
1
请完成以下Java代码
public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Set Report Cube. @param PA_ReportCube_ID Define reporting cube for pre-calculation o...
/** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_ReportCube.java
1
请在Spring Boot框架中完成以下Java代码
public String getGithubRawContentUrl(String key, String path) { if (path == null) { return ""; } RepositorySettings settings = getRepository(key).getSettings(); return StringUtils.removeEnd(settings.getRepositoryUri(), ".git") + "/blob/" + settings.getDefaultBranch() + "/" + ...
listener.run(); } catch (Throwable e) { log.error("[{}] Failed to handle repository update", key, e); } } } private Path getRepoDirectory(RepositorySettings settings) { // using uri to define folder name in case repo url is changed String name = U...
repos\thingsboard-master\common\version-control\src\main\java\org\thingsboard\server\service\sync\DefaultGitSyncService.java
2
请完成以下Java代码
public String getAdminNickName() { return adminNickName; } public void setAdminNickName(String adminNickName) { this.adminNickName = adminNickName == null ? null : adminNickName.trim(); } public Byte getLocked() { return locked; } public void setLocked(Byte locked) { ...
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", adminId=").append(adminId); sb.append(", loginName=").append(loginName); ...
repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\entity\Admin.java
1
请完成以下Java代码
public int getI_Postal_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_I_Postal_ID); if (ii == null) return 0; return ii.intValue(); } /** Set PLZ. @param Postal Postleitzahl */ @Override public void setPostal (java.lang.String Postal) { set_Value (COLUMNNAME_Postal, Postal); } /** Get...
public java.lang.String getRegionName () { return (java.lang.String)get_Value(COLUMNNAME_RegionName); } /** Set Gültig ab. @param ValidFrom Gültig ab inklusiv (erster Tag) */ @Override public void setValidFrom (java.sql.Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); } /** Get...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Postal.java
1
请完成以下Java代码
public long getId() { return id; } public void setId(long id) { this.id = id; } public int getJobGroup() { return jobGroup; } public void setJobGroup(int jobGroup) { this.jobGroup = jobGroup; } public int getJobId() { return jobId; } public void setJobId(int jobId) { this.jobId = jobId; } ...
public String getTriggerMsg() { return triggerMsg; } public void setTriggerMsg(String triggerMsg) { this.triggerMsg = triggerMsg; } public Date getHandleTime() { return handleTime; } public void setHandleTime(Date handleTime) { this.handleTime = handleTime; } public int getHandleCode() { return ha...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\model\XxlJobLog.java
1
请在Spring Boot框架中完成以下Java代码
public void deleteByOrderId(@NonNull final OrderId orderId) {orderPayScheduleRepository.deleteByOrderId(orderId);} @Nullable OrderSchedulingContext extractContext(final @NotNull org.compiere.model.I_C_Order orderRecord) { final Money grandTotal = orderBL.getGrandTotal(orderRecord); if (grandTotal.isZero()) { ...
.orderDate(TimeUtil.asLocalDate(orderRecord.getDateOrdered())) .letterOfCreditDate(TimeUtil.asLocalDate(orderRecord.getLC_Date())) .billOfLadingDate(TimeUtil.asLocalDate(orderRecord.getBLDate())) .ETADate(TimeUtil.asLocalDate(orderRecord.getETA())) .invoiceDate(TimeUtil.asLocalDate(orderRecord.getInvoic...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\paymentschedule\service\OrderPayScheduleService.java
2
请完成以下Java代码
private void setRecords(final Collection<TableRecordReference> records) { _records = new HashSet<>(records); // Reset selection _selection_AD_Table_ID = null; _selection_pinstanceId = null; } public void addRecords(final Collection<TableRecordReference> records) { if (_records == null) { _records = ...
return _filters; } public AdTableId getSelection_AD_Table_ID() { return _selection_AD_Table_ID; } public PInstanceId getSelection_PInstanceId() { return _selection_pinstanceId; } public Iterator<TableRecordReference> getRecordsIterator() { return _records == null ? null : _records.iterator(); } pub...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\api\impl\LockRecords.java
1
请在Spring Boot框架中完成以下Java代码
public class ProductValueSequenceProvider implements ValueSequenceInfoProvider { private final CCache<ProductCategoryId, Integer> productCategoryId2AD_Sequence_ID = CCache.newCache(I_M_Product_Category.Table_Name, 10, CCache.EXPIREMINUTES_Never); @Override public ProviderResult computeValueInfo(@NonNull final Objec...
} if (productCategory.getM_Product_Category_Parent_ID() > 0) { final ProductCategoryId productCategoryParentId = ProductCategoryId.ofRepoId(productCategory.getM_Product_Category_Parent_ID()); // first, guard against a loop if (!seenIds.add(productCategoryParentId)) { // there is no AD_Sequence_ID ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\sequence\ProductValueSequenceProvider.java
2
请完成以下Java代码
public static WFActivityStatus computeActivityState(final PickingJob pickingJob) { return pickingJob.getPickFromHU().isPresent() ? WFActivityStatus.COMPLETED : WFActivityStatus.NOT_STARTED; } @Override public WFProcess setScannedBarcode(@NonNull final SetScannedBarcodeRequest request) { final HUQRCode qrCode ...
); } private HUQRCode parseHUQRCode(final String scannedCode) { final IHUQRCode huQRCode = huQRCodesService.parse(scannedCode); if (huQRCode instanceof HUQRCode) { return (HUQRCode)huQRCode; } else { throw new AdempiereException("Invalid HU QR code: " + scannedCode); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.picking.rest-api\src\main\java\de\metas\picking\workflow\handlers\activity_handlers\SetPickFromHUWFActivityHandler.java
1
请完成以下Java代码
public String toString() { return "MBPartnerLocation[ID=" + get_ID() + ",C_Location_ID=" + getC_Location_ID() + ",Name=" + getName() + "]"; } @Override protected boolean beforeSave(final boolean newRecord) { if (getC_Location_ID() <= 0) { throw new FillMandatoryException(COLUMNNAME_C_Location...
return true; } private static List<String> getOtherLocationNames( final int bpartnerId, final int bpartnerLocationIdToExclude) { return queryBL .createQueryBuilder(I_C_BPartner_Location.class) .addEqualsFilter(I_C_BPartner_Location.COLUMNNAME_C_BPartner_ID, bpartnerId) .addNotEqualsFilter(I_C_BP...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MBPartnerLocation.java
1
请完成以下Java代码
public Timestamp getDateDoc () { return (Timestamp)get_Value(COLUMNNAME_DateDoc); } public I_GL_JournalBatch getGL_JournalBatch() throws RuntimeException { return (I_GL_JournalBatch)MTable.get(getCtx(), I_GL_JournalBatch.Table_Name) .getPO(getGL_JournalBatch_ID(), get_TrxName()); } /** Set Journal Bat...
if (GL_JournalBatch_ID < 1) set_ValueNoCheck (COLUMNNAME_GL_JournalBatch_ID, null); else set_ValueNoCheck (COLUMNNAME_GL_JournalBatch_ID, Integer.valueOf(GL_JournalBatch_ID)); } /** Get Journal Batch. @return General Ledger Journal Batch */ public int getGL_JournalBatch_ID () { Integer ii = (Inte...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Recurring_Run.java
1
请完成以下Java代码
public FindPanelBuilder setEmbedded(final boolean embedded) { this.embedded = embedded; return this; } /** @return true if the find panel will be embedded in the window */ public boolean isEmbedded() { return this.embedded; } public FindPanelBuilder setHideStatusBar(boolean hideStatusBar) { this.hideS...
} public boolean isSearchPanelCollapsed() { return searchPanelCollapsed; } public FindPanelBuilder setMaxQueryRecordsPerTab(final int maxQueryRecordsPerTab) { this.maxQueryRecordsPerTab = maxQueryRecordsPerTab; return this; } public int getMaxQueryRecordsPerTab() { if (maxQueryRecordsPerTab != null) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\search\FindPanelBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public StatefulRetryInterceptorBuilder newMessageIdentifier(NewMessageIdentifier newMessageIdentifier) { this.newMessageIdentifier = newMessageIdentifier; return this; } @Override public StatefulRetryOperationsInterceptor build() { this.applyCommonSettings(this.factoryBean); if (this.messageKeyGenera...
extends RetryInterceptorBuilder<StatelessRetryInterceptorBuilder, StatelessRetryOperationsInterceptor> { private final StatelessRetryOperationsInterceptorFactoryBean factoryBean = new StatelessRetryOperationsInterceptorFactoryBean(); StatelessRetryInterceptorBuilder() { } @Override public StatelessRetr...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\config\RetryInterceptorBuilder.java
2
请完成以下Java代码
private PPOrderRouting getOrderRouting() { final PPOrderId orderId = PPOrderId.ofRepoId(getPP_Order_ID()); return Services.get(IPPOrderRoutingRepository.class).getByOrderId(orderId); } @Override public String toString() { return "MPPOrder[ID=" + get_ID() + "-DocumentNo=" + getDocumentNo() + ",IsSOTr...
.qtyMoved(activity.getQtyToDeliver()) .durationSetup(Duration.ZERO) .duration(Duration.ZERO) .build()); } } } private void createVariances() { final IPPCostCollectorBL ppCostCollectorBL = Services.get(IPPCostCollectorBL.class); // for (final I_PP_Order_BOMLine bomLine : getLines()) {...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\MPPOrder.java
1
请完成以下Spring Boot application配置
server: port: 8082 spring: application: name: mall-demo datasource: url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false username: root password: root thymeleaf: mode: HTML5 encoding: utf-8 servlet: content-typ...
mapper-locations: - classpath:mapper/*.xml - classpath*:com/**/mapper/*.xml logging: level: root: info com.macro.mall: debug host: mall: admin: http://localhost:8080
repos\mall-master\mall-demo\src\main\resources\application.yml
2
请完成以下Java代码
public String getCode() { return code; } /** * Sets the value of the code property. * * @param value * allowed object is * {@link String } * */ public void setCode(String value) { this.code = value; } /** * Gets the value of the...
} /** * Sets the value of the dateEnd property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDateEnd(XMLGregorianCalendar value) { this.dateEnd = value; } /** * Gets the value of the acid property...
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\CaseDetailType.java
1
请完成以下Java代码
private boolean isRedirectToFile() { return redirectDirName != null && !redirectDirName.isEmpty(); } public PrinterHWList createPrinterHW() { final List<PrinterHW> printerHWs = new ArrayList<>(); for (final PrintService printService : getPrintServices()) { final PrinterHW printerHW = new PrinterHW(); ...
printerHWMediaTray.setTrayNumber(trayNumber); // 04005: default media tray shall be first in the list if (mediaTray.equals(defaultMediaTray)) { printerHWMediaTrays.add(0, printerHWMediaTray); } else { printerHWMediaTrays.add(printerHWMediaTray); } } } printerHW...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.client\src\main\java\de\metas\printing\client\engine\PrintingEngine.java
1
请完成以下Java代码
public int getA_Start_Asset_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_A_Start_Asset_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Document Date. @param DateDoc Date of the Document */ public void setDateDoc (Timestamp DateDoc) { set_Value (COLUMNNAME_DateDoc, DateDoc...
} /** Set Processed. @param Processed The document has been processed */ public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); } /** Get Processed. @return The document has been processed */ public boolean isProcessed () { Object oo = get...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Depreciation_Forecast.java
1
请完成以下Java代码
public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) { return Optional.ofNullable(findDomainById(tenantId, new DomainId(entityId.getId()))); } @Override public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId entityId) { return FluentFuture....
return null; } List<OAuth2ClientInfo> clients = oauth2ClientDao.findByDomainId(domain.getUuidId()).stream() .map(OAuth2ClientInfo::new) .sorted(Comparator.comparing(OAuth2ClientInfo::getTitle)) .collect(Collectors.toList()); return new DomainInfo(d...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\domain\DomainServiceImpl.java
1
请完成以下Java代码
public void setES_FTS_Index_Queue_ID (final int ES_FTS_Index_Queue_ID) { if (ES_FTS_Index_Queue_ID < 1) set_ValueNoCheck (COLUMNNAME_ES_FTS_Index_Queue_ID, null); else set_ValueNoCheck (COLUMNNAME_ES_FTS_Index_Queue_ID, ES_FTS_Index_Queue_ID); } @Override public int getES_FTS_Index_Queue_ID() { ret...
set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } @Override public void setProcessingTag (final @Nullable java.lang.String ProcessingTag) { set_Value (COLUMNNAME_ProcessingTag, ProcessingTag); } @Override public ...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java-gen\de\metas\elasticsearch\model\X_ES_FTS_Index_Queue.java
1
请在Spring Boot框架中完成以下Java代码
public User login(String email, String password) { if (email == null || email.isBlank()) { throw new IllegalArgumentException("email is required."); } if (password == null || password.isBlank()) { throw new IllegalArgumentException("password is required."); } ...
* @param username users username * @param password users password * @param bio users bio * @param imageUrl users imageUrl * @return Returns the updated user */ public User updateUserDetails( UUID userId, String email, String username, String password, String bio, String imageUrl...
repos\realworld-java21-springboot3-main\module\core\src\main\java\io\zhc1\realworld\service\UserService.java
2
请完成以下Java代码
public class DefinitionsRootExport implements BpmnXMLConstants { /** default namespaces for definitions */ protected static final Set<String> defaultNamespaces = new HashSet<String>( asList( BPMN2_PREFIX, XSI_PREFIX, XSD_PREFIX, ACTIVITI_EXTENSIONS_PREFIX...
prefix, model.getNamespaces().get(prefix) ); } xtw.writeAttribute(TYPE_LANGUAGE_ATTRIBUTE, SCHEMA_NAMESPACE); xtw.writeAttribute(EXPRESSION_LANGUAGE_ATTRIBUTE, XPATH_NAMESPACE); if (StringUtils.isNotEmpty(model.getTargetNamespace())) { xtw.writeAtt...
repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\export\DefinitionsRootExport.java
1
请在Spring Boot框架中完成以下Java代码
public class PriceRepository { private static final Logger LOGGER = LoggerFactory.getLogger(PriceRepository.class); private final Map<Long, Price> priceMap = new HashMap<>(); public Price getPrice(Long productId){ LOGGER.info("Getting Price from Price Repo With Product Id {}", productId); ...
Price price3 = getPrice(100003L, 18.5, 2.0); priceMap.put(100003L, price3); Price price4 = getPrice(100004L, 18.5, 2.0); priceMap.put(100004L, price4); } private static Price getPrice(long productId, double priceAmount, double discount) { Price price = new Price(); pric...
repos\tutorials-master\spring-boot-modules\spring-boot-open-telemetry\spring-boot-open-telemetry2\src\main\java\com\baeldung\opentelemetry\repository\PriceRepository.java
2
请完成以下Java代码
public boolean isOpen() { boolean isOpen = delegate.isOpen(); log.info("[I236] isOpen: " + isOpen); return isOpen; } public EntityTransaction getTransaction() { log.info("[I240] getTransaction()"); return delegate.getTransaction(); } ...
} public EntityGraph<?> createEntityGraph(String graphName) { return delegate.createEntityGraph(graphName); } public EntityGraph<?> getEntityGraph(String graphName) { return delegate.getEntityGraph(graphName); } public <T> List<EntityGraph<? super T>> g...
repos\tutorials-master\apache-olingo\src\main\java\com\baeldung\examples\olingo2\CarsODataJPAServiceFactory.java
1
请在Spring Boot框架中完成以下Java代码
public InsuranceContractRequiredTemplates templateId(String templateId) { this.templateId = templateId; return this; } /** * Alberta-Id der Dokumentenvorlage - HIER FEHLT NOCH DIE API ZUM ABRUF für das Mapping /template * @return templateId **/ @Schema(example = "13e2a423-24e8-4844-b710-3d1e0ee...
Objects.equals(this.careType, insuranceContractRequiredTemplates.careType); } @Override public int hashCode() { return Objects.hash(templateId, careType); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InsuranceContractRequiredTemplates {\n"); ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\InsuranceContractRequiredTemplates.java
2
请完成以下Java代码
public java.sql.Timestamp getDatePromised() { return get_ValueAsTimestamp(COLUMNNAME_DatePromised); } @Override public void setRecord_ID (final int Record_ID) { if (Record_ID < 0) set_Value (COLUMNNAME_Record_ID, null); else set_Value (COLUMNNAME_Record_ID, Record_ID); } @Override public int ge...
return get_ValueAsInt(COLUMNNAME_Record_ID); } @Override public void setRemotePurchaseOrderId (final @Nullable java.lang.String RemotePurchaseOrderId) { set_Value (COLUMNNAME_RemotePurchaseOrderId, RemotePurchaseOrderId); } @Override public java.lang.String getRemotePurchaseOrderId() { return get_ValueAs...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java-gen\de\metas\purchasecandidate\model\X_C_PurchaseCandidate_Alloc.java
1