instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public abstract class TbSubscription<T> { /** Cache the hash code */ private transient int hash; // Default to 0. The hash code calculated for this object likely never be zero private final String serviceId; private final String sessionId; private final int subscriptionId; private final Tenant...
TbSubscription that = (TbSubscription) o; return subscriptionId == that.subscriptionId && sessionId.equals(that.sessionId) && tenantId.equals(that.tenantId) && entityId.equals(that.entityId) && type == that.type; } @Override public int...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\subscription\TbSubscription.java
1
请完成以下Java代码
class ForwardedTrustedProxiesCondition extends AllNestedConditions { public ForwardedTrustedProxiesCondition() { super(ConfigurationPhase.REGISTER_BEAN); } @ConditionalOnProperty(name = GatewayProperties.PREFIX + ".forwarded.enabled", matchIfMissing = true) static class OnPropertyEnabled { } @Conditi...
@Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { try { String property = context.getEnvironment().getProperty(PROPERTY); if (!StringUtils.hasText(property)) { return ConditionOutcome.noMatch(PROPERTY + " property is not set or is empty."); ...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\headers\TrustedProxies.java
1
请完成以下Java代码
public Map<String, Object> getCorrelationParameterValues() { return correlationParameterValues; } public boolean isDoNotUpdateToLatestVersionAutomatically() { return doNotUpdateToLatestVersionAutomatically; } public String getTenantId() { return tenantId; } @Override ...
return cmmnRuntimeService.registerCaseInstanceStartEventSubscription(this); } protected void checkValidInformation() { if (StringUtils.isEmpty(caseDefinitionKey)) { throw new FlowableIllegalArgumentException("The case definition must be provided using the key for the subscription to be regi...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CaseInstanceStartEventSubscriptionBuilderImpl.java
1
请完成以下Java代码
public class SampleUtilsTest { /** * 2个线程运行。 * 准备时间:1000ms * 运行时间: 2000ms * @throws InterruptedException if any */ @JunitPerfConfig(duration = 2000) public void junitPerfConfigTest() throws InterruptedException { System.out.println("junitPerfConfigTest"); Thread.sleep(200); } @JunitPerfConfig(warm...
for (long i = 0; i < Integer.MAX_VALUE; i++) { sum += i; } System.out.println(sum); } @JunitPerfConfig(duration = 5000) public void print2Test() { long sum = 0L; for (long i = 0; i < Integer.MAX_VALUE; i++) { sum += i; } System.out.println(sum); } }
repos\spring-boot-quick-master\quick-method-evaluate\src\main\java\com\method\evaluate\SampleUtilsTest.java
1
请完成以下Java代码
public void assertNotExcludedFromTransaction(@NonNull final SOTrx soTrx, @NonNull final ProductId productId, @NonNull final BPartnerId partnerId) { if (soTrx.isSales()) { assertNotExcludedFromSaleToCustomer(productId, partnerId); } else { assertNotExcludedFromPurchaseFromVendor(productId, partnerId); ...
record.setGTIN(gtin != null ? gtin.getAsString() : null); record.setEAN_CU(ean13 != null ? ean13.getAsString() : null); record.setUPC(gtin != null ? gtin.getAsString() : null); if (gtin != null) { record.setEAN13_ProductCode(null); } } @Override public void setProductCodeFieldsFromEAN13ProductCode(@No...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner_product\impl\BPartnerProductBL.java
1
请完成以下Java代码
public String getDescription() { return "*" + fileExtensionSuggestion; } @Override public boolean accept(final File f) { if (f.isDirectory()) { return true; } return f.getName().toLowerCase().endsWith(fileExtensionSuggestionLC); } }); } if (...
@Override public IClientUIInvoker invoke() { return new SwingClientUIInvoker(this); } @Override public IClientUIAsyncInvoker invokeAsync() { return new SwingClientUIAsyncInvoker(); } @Override public void showURL(final String url) { try { final URI uri = new URI(url); Desktop.getDesktop().bro...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\adempiere\form\swing\SwingClientUIInstance.java
1
请完成以下Java代码
public Map<String, Map<String, GraphicInfo>> getLabelLocationByDiagramIdMap() { return labelLocationByDiagramIdMap; } public Map<String, GraphicInfo> getLabelLocationByDiagramId(String diagramId) { return labelLocationByDiagramIdMap.get(diagramId); } public void addLabelGraphicInfo(Str...
decisionServiceDividerLocationByDiagramIdMap.get(diagramId).put(key, graphicInfoList); decisionServiceDividerLocationMap.put(key, graphicInfoList); } public String getExporter() { return exporter; } public void setExporter(String exporter) { this.exporter = exporter; } p...
repos\flowable-engine-main\modules\flowable-dmn-model\src\main\java\org\flowable\dmn\model\DmnDefinition.java
1
请完成以下Java代码
public void setCurrentVendor(final Boolean currentVendor) { this.currentVendor = currentVendor; currentVendorSet = true; } public void setExcludedFromSales(final Boolean excludedFromSales) { this.excludedFromSales = excludedFromSales; excludedFromSalesSet = true; } public void setExclusionFromSalesReas...
public void setUsedForVendor(final Boolean usedForVendor) { this.usedForVendor = usedForVendor; usedForVendorSet = true; } public void setExcludedFromPurchase(final Boolean excludedFromPurchase) { this.excludedFromPurchase = excludedFromPurchase; excludedFromPurchaseSet = true; } public void setExclusio...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-product\src\main\java\de\metas\common\product\v2\request\JsonRequestBPartnerProductUpsert.java
1
请在Spring Boot框架中完成以下Java代码
public class MaterialEventConfiguration { public static final String BEAN_NAME = "metasfreshEventBusService"; @Bean(name = BEAN_NAME) @Profile(Profiles.PROFILE_Test) public MetasfreshEventBusService createLocalMaterialEventService( @NonNull final MaterialEventConverter materialEventConverter, @NonNull final ...
@Bean(name = BEAN_NAME) @DependsOn(Adempiere.BEAN_NAME) @Profile(Profiles.PROFILE_NotTest) public MetasfreshEventBusService createDistributedMaterialEventService( @NonNull final MaterialEventConverter materialEventConverter, @NonNull final IEventBusFactory eventBusFactory, @NonNull final MaterialEventObserv...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\MaterialEventConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public void validateEvent(@NonNull final PurchaseCandidateUpdatedEvent event) { // nothing to do; the event was already validated on construction time } @Override public void handleEvent(@NonNull final PurchaseCandidateUpdatedEvent event) { handlePurchaseCandidateEvent(event); } @Override protected Candid...
return CandidatesQuery.builder() .businessCase(CandidateBusinessCase.PURCHASE) .type(CandidateType.SUPPLY) .purchaseDetailsQuery(purchaseDetailsQuery) .build(); } @Override protected CandidateBuilder updateBuilderFromEvent( @NonNull final CandidateBuilder candidateBuilder, @NonNull final Purch...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\purchasecandidate\PurchaseCandidateUpdatedHandler.java
2
请完成以下Java代码
public Iterator getPrefixes(String namespaceURI) { ensureNotNull("Namespace URI", namespaceURI); List<String> list = new ArrayList<String>(); if(namespaceURI.equals(XMLConstants.XML_NS_URI)) { list.add(XMLConstants.XML_NS_PREFIX); return Collections.unmodifiableList(list).iterator(); } ...
public void setNamespace(String prefix, String namespaceURI) { ensureNotNull("Prefix", prefix); ensureNotNull("Namespace URI", namespaceURI); namespaces.put(prefix, namespaceURI); } /** * Maps a map of prefix, uri pairs as namespaces. * * @param namespaces the map of namespaces * @throws I...
repos\camunda-bpm-platform-master\spin\dataformat-xml-dom\src\main\java\org\camunda\spin\impl\xml\dom\query\DomXPathNamespaceResolver.java
1
请完成以下Java代码
public boolean isShowColumnNamesForCaption() { return getData().isShowColumnNamesForCaption(); } public void setShowColumnNamesForCaption(final boolean showColumnNamesForCaption) { final InternalUserSessionData data = getData(); final boolean showColumnNamesForCaptionOld = data.isShowColumnNamesForCaption();...
/** * @deprecated avoid using this method; usually it's workaround-ish / quick and dirty fix */ @Deprecated public static ZoneId getTimeZoneOrSystemDefault() { final UserSession userSession = getCurrentOrNull(); return userSession != null ? userSession.getTimeZone() : SystemTime.zoneId(); } public boolean...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\session\UserSession.java
1
请完成以下Java代码
public List<Object> retrieveDownstreamNodes(final I_M_HU_Item node) { final String itemType = handlingUnitsBL.getItemType(node); if (X_M_HU_Item.ITEMTYPE_HandlingUnit.equals(itemType)) { final List<I_M_HU> includedHUs = handlingUnitsDAO.retrieveIncludedHUs(node); return new ArrayList<>(includedHUs); ...
} @Override public final Result afterIterate(final IHUItemStorage node) { return getActiveListener().afterHUItemStorage(node); } @Override public AbstractNodeIterator<?> getDownstreamNodeIterator(final IHUItemStorage node) { return null; } @Override public List<Object> retrieveDownstreamNod...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\AbstractHUIterator.java
1
请完成以下Java代码
private void createPickingCandidatesIfNeeded(final PackageableRow row) { final boolean existsPickingCandidates = pickingCandidateService.existsPickingCandidates(row.getShipmentScheduleIds()); if (!existsPickingCandidates) { // run in a different transaction so that the report can access it trxManager.runIn...
.setAD_PInstance(adPInstanceDAO.getById(pinstanceId)) .setReportLanguage(getProcessInfo().getReportLanguage()) .setJRDesiredOutputType(OutputType.PDF) .build(); final ReportsClient reportsClient = ReportsClient.get(); return reportsClient.report(jasperProcessInfo); } private PInstanceRequest createP...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\packageable\process\PackageablesView_PrintPicklist.java
1
请完成以下Java代码
public static Date toDate(LocalDate localDate) { return toDate(localDate.atTime(LocalTime.now(ZoneId.systemDefault()))); } /** * Date转 LocalDateTime * Jdk8 后 不推荐使用 {@link Date} Date * * @param date / * @return / */ public static LocalDateTime toLocalDateTime(Date date...
* @param localDateTime / * @return / */ public static LocalDateTime parseLocalDateTimeFormat(String localDateTime, String pattern) { DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern(pattern); return LocalDateTime.from(dateTimeFormatter.parse(localDateTime)); } /**...
repos\eladmin-master\eladmin-common\src\main\java\me\zhengjie\utils\DateUtil.java
1
请完成以下Java代码
public String toString() { final StringBuilder sb = new StringBuilder("GenericPO[") .append("TableName=").append(get_TableName()) .append(",ID=").append(get_ID()) .append("]"); return sb.toString(); } public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID"; public static final int AD_OR...
} @Override public final PO copy() { final GenericPO po = (GenericPO)super.copy(); po.tableName = this.tableName; po.tableID = this.tableID; return po; } } // GenericPO /** * Wrapper class to workaround the limit of PO constructor that doesn't take a tableName or * tableID parameter. Note that in the g...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\model\GenericPO.java
1
请完成以下Java代码
public class TokenExchangeGrantRequest extends AbstractOAuth2AuthorizationGrantRequest { private static final String ACCESS_TOKEN_TYPE_VALUE = "urn:ietf:params:oauth:token-type:access_token"; private static final String JWT_TOKEN_TYPE_VALUE = "urn:ietf:params:oauth:token-type:jwt"; private final OAuth2Token subje...
* @return the {@link OAuth2Token actor token} */ public OAuth2Token getActorToken() { return this.actorToken; } /** * Populate default parameters for the Token Exchange Grant. * @param grantRequest the authorization grant request * @return a {@link MultiValueMap} of the parameters used in the OAuth 2.0 Ac...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\endpoint\TokenExchangeGrantRequest.java
1
请完成以下Java代码
public static class InboundEventPayloadExtractorBuilderImpl implements InboundEventPayloadExtractorBuilder { protected InboundEventProcessingPipelineBuilderImpl inboundEventProcessingPipelineBuilder; public InboundEventPayloadExtractorBuilderImpl(InboundEventProcessingPipelineBuilderImpl inboundEventP...
public InboundEventTransformerBuilderImpl(InboundEventProcessingPipelineBuilderImpl inboundEventProcessingPipelineBuilder) { this.inboundEventProcessingPipelineBuilder = inboundEventProcessingPipelineBuilder; } @Override public InboundChannelModelBuilder transformer(String delegateE...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\model\InboundChannelDefinitionBuilderImpl.java
1
请完成以下Java代码
public void setCurrentWindow(@NonNull final AdWindowId windowId, @Nullable final String windowName) { this.currentWindowId = windowId; this._currentWindowName = windowName; } public void clearCurrentWindow() { this.currentWindowId = null; this._currentWindowName = null; } @Nullable public String getCur...
public void collectError(@NonNull final String errorMessage) { errors.add(JsonWindowsHealthCheckResponse.Entry.builder() .windowId(WindowId.of(currentWindowId)) .windowName(getCurrentWindowName()) .errorMessage(errorMessage) .build()); } public void collectError(@NonNull final Throwable exception)...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\health\ErrorsCollector.java
1
请完成以下Java代码
public void setPostal (final @Nullable java.lang.String Postal) { set_ValueNoCheck (COLUMNNAME_Postal, Postal); } @Override public java.lang.String getPostal() { return get_ValueAsString(COLUMNNAME_Postal); } @Override public void setPostal_Add (final @Nullable java.lang.String Postal_Add) { set_Value...
@Override public java.lang.String getRegionName() { return get_ValueAsString(COLUMNNAME_RegionName); } @Override public void setStreet (final @Nullable java.lang.String Street) { set_Value (COLUMNNAME_Street, Street); } @Override public java.lang.String getStreet() { return get_ValueAsString(COLUMNN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Location.java
1
请完成以下Java代码
public class Book { private long id; @NotBlank @Size(min = 0, max = 20) private String title; @NotBlank @Size(min = 0, max = 30) private String author; public long getId() { return id; } public void setId(long id) { this.id = id;
} public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } }
repos\tutorials-master\spring-boot-modules\spring-boot-springdoc\src\main\java\com\baeldung\springdoc\model\Book.java
1
请完成以下Java代码
public static UomId getCommonUomIdOfAll(@Nullable final CostAmountAndQty... values) { return UomId.getCommonUomIdOfAll(CostAmountAndQty::getUomId, "quantity", values); } public CurrencyId getCurrencyId() {return amt.getCurrencyId();} public UomId getUomId() {return qty.getUomId();} public boolean isZero() {re...
} public CostAmountAndQty add(@NonNull final CostAmountAndQty other) { if (other.isZero()) { return this; } else if (this.isZero()) { return other; } else { return of(this.amt.add(other.amt), this.qty.add(other.qty)); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\CostAmountAndQty.java
1
请完成以下Java代码
private static Set<AvailabilityRequest> createAvailabilityRequests(@NonNull final Map<TrackingId, PurchaseCandidatesGroup> purchaseCandidatesGroupsByTrackingId) { final ListMultimap<BPartnerId, AvailabilityRequestItem> requestItemsByVendorId = purchaseCandidatesGroupsByTrackingId .entrySet() .stream() .m...
return AvailabilityRequestItem.builder() .trackingId(trackingId) .productAndQuantity(productAndQuantity) .purchaseCandidateId(PurchaseCandidateId.getRepoIdOr(purchaseCandidatesGroup.getSinglePurchaseCandidateIdOrNull(), -1)) .salesOrderLineId(OrderAndLineId.getOrderLineRepoIdOr(purchaseCandidatesGroup.g...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\availability\AvailabilityCheckService.java
1
请完成以下Java代码
protected void convertElementToJson(ObjectNode propertiesNode, BaseElement baseElement) { // nothing to do } @Override protected BaseElement convertJsonToElement( JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap ) { MessageFlow flow = new ...
); if (sourceRef != null) { flow.setSourceRef(sourceRef); JsonNode targetNode = elementNode.get("target"); if (targetNode != null && !targetNode.isNull()) { String targetId = targetNode.get(EDITOR_SHAPE_ID).asText(); if (shapeMap.get(targetId) ...
repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\MessageFlowJsonConverter.java
1
请完成以下Java代码
public class ParallelGatewayActivityBehavior extends GatewayActivityBehavior { private static final long serialVersionUID = 1L; private static final Logger LOGGER = LoggerFactory.getLogger(ParallelGatewayActivityBehavior.class); @Override public void execute(DelegateExecution execution) { Act...
Context.getCommandContext().getHistoryManager().recordActivityEnd((ExecutionEntity) execution); if (nbrOfExecutionsJoined == nbrOfExecutionsToJoin) { // Fork if (LOGGER.isDebugEnabled()) { LOGGER.debug("parallel gateway '{}' activates: {} of {} joined", activity.getId(),...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\ParallelGatewayActivityBehavior.java
1
请完成以下Java代码
private Mono<Health> validate(Health.Builder builder) { builder.withDetail("database", this.connectionFactory.getMetadata().getName()); return (StringUtils.hasText(this.validationQuery)) ? validateWithQuery(builder) : validateWithConnectionValidation(builder); } private Mono<Health> validateWithQuery(Health....
} private Mono<Health> validateWithConnectionValidation(Health.Builder builder) { builder.withDetail("validationQuery", "validate(REMOTE)"); Mono<Boolean> connectionValidation = Mono.usingWhen(this.connectionFactory.create(), (connection) -> Mono.from(connection.validate(ValidationDepth.REMOTE)), Connection::...
repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\health\ConnectionFactoryHealthIndicator.java
1
请完成以下Java代码
public static String encodeMD5String(String str) { return encode(str, "MD5"); } /** * 用SHA算法进行加密 * * @param str * 需要加密的字符串 * @return SHA加密后的结果 */ public static String encodeSHAString(String str) { return encode(str, "SHA"); } /** * 用base64算法进行加密 * * @param str * 需要...
private static String encode(String str, String method) { MessageDigest mdInst = null; // 把密文转换成十六进制的字符串形式 // 单线程用StringBuilder,速度快 多线程用stringbuffer,安全 StringBuilder dstr = new StringBuilder(); try { // 获得MD5摘要算法的 MessageDigest对象 mdInst = MessageDigest.getInstance(method); // 使用指定的字节更新摘要 mdInst.up...
repos\roncoo-pay-master\roncoo-pay-common-core\src\main\java\com\roncoo\pay\common\core\utils\EncryptUtil.java
1
请完成以下Java代码
public class ModelApiResponse { public static final String JSON_PROPERTY_CODE = "code"; private Integer code; public static final String JSON_PROPERTY_TYPE = "type"; private String type; public static final String JSON_PROPERTY_MESSAGE = "message"; private String message; public ModelApiResponse code(...
if (o == null || getClass() != o.getClass()) { return false; } ModelApiResponse _apiResponse = (ModelApiResponse) o; return Objects.equals(this.code, _apiResponse.code) && Objects.equals(this.type, _apiResponse.type) && Objects.equals(this.message, _apiResponse.message); } @Overri...
repos\tutorials-master\spring-swagger-codegen-modules\spring-openapi-generator-api-client\src\main\java\com\baeldung\petstore\client\model\ModelApiResponse.java
1
请完成以下Java代码
public void dispose() { log.debug(""); super.dispose(); } // dispose /** * Return data as sorted Array - not implemented * @param mandatory mandatory * @param onlyValidated only validated * @param onlyActive only active * @param temporary force load for temporary display * @return null */ @O...
{ return I_M_AttributeSetInstance.Table_Name; } /** * Get underlying fully qualified Table.Column Name. * Used for VLookup.actionButton (Zoom) * @return column name */ @Override public String getColumnName() { return I_M_AttributeSetInstance.Table_Name + "." + I_M_AttributeSetInstance.COLUMNN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MPAttributeLookup.java
1
请完成以下Java代码
public Optional<GeographicalCoordinates> findBestCoordinates(final GeoCoordinatesRequest request) { final List<GeographicalCoordinates> coords = findAllCoordinates(request); if (coords.isEmpty()) { return Optional.empty(); } return Optional.of(coords.get(0)); } @NonNull private ImmutableList<Geograph...
//noinspection ConfusingArgumentToVarargsMethod logger.trace("Geocoding response from google: {}", results); if (results == null) { return ImmutableList.of(); } return Arrays.stream(results) .map(GoogleMapsGeocodingProviderImpl::toGeographicalCoordinates) .collect(GuavaCollectors.toImmutableList(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\geocoding\provider\googlemaps\GoogleMapsGeocodingProviderImpl.java
1
请在Spring Boot框架中完成以下Java代码
public String list(Model model,@RequestParam(value = "page", defaultValue = "0") Integer page, @RequestParam(value = "size", defaultValue = "6") Integer size) { Sort sort = new Sort(Sort.Direction.DESC, "id"); Pageable pageable = new PageRequest(page, size, sort); Page<Use...
model.addAttribute("user", user); return "user/userEdit"; } @RequestMapping("/edit") public String edit(@Valid UserParam userParam, BindingResult result,ModelMap model) { String errorMsg=""; if(result.hasErrors()) { List<ObjectError> list = result.getAllErrors(); ...
repos\spring-boot-leaning-master\1.x\第16课:综合实战用户管理系统\user-manage\src\main\java\com\neo\web\UserController.java
2
请完成以下Java代码
public String generateReferenceNo(@NonNull final Object sourceModel) { return generator.generateReferenceNo(sourceModel); } @Override public I_C_ReferenceNo_Type getType() { return type; } @Override public IReferenceNoGenerator getGenerator() { return generator; }
@Override public List<Integer> getAssignedTableIds() { return assignedTableIds; } @Override public String toString() { return "ReferenceNoGeneratorInstance [" + "type=" + (type == null ? null : type.getName()) + ", assignedTableIds=" + assignedTableIds + ", generator=" + generator + "]"; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.refid\src\main\java\de\metas\document\refid\api\impl\ReferenceNoGeneratorInstance.java
1
请完成以下Java代码
public abstract class FormDataImpl implements FormData, Serializable { private static final long serialVersionUID = 1L; protected String formKey; protected String deploymentId; protected List<FormProperty> formProperties = new ArrayList<>(); // getters and setters // /////////////////////////...
@Override public List<FormProperty> getFormProperties() { return formProperties; } public void setFormKey(String formKey) { this.formKey = formKey; } public void setDeploymentId(String deploymentId) { this.deploymentId = deploymentId; } public void setFormPropertie...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\form\FormDataImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class TBRedisClusterConfiguration extends TBRedisCacheConfiguration { @Value("${redis.cluster.nodes:}") private String clusterNodes; @Value("${redis.cluster.max-redirects:12}") private Integer maxRedirects; @Value("${redis.cluster.useDefaultPoolConfig:true}") private boolean useDefault...
clusterConfiguration.setPassword(password); return new JedisConnectionFactory(clusterConfiguration, buildClientConfig()); } private JedisClientConfiguration buildClientConfig() { JedisClientConfiguration.JedisClientConfigurationBuilder jedisClientConfigurationBuilder = JedisClientConfiguration....
repos\thingsboard-master\common\cache\src\main\java\org\thingsboard\server\cache\TBRedisClusterConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public void onSuccess(@Nullable Void tmp) { result.set(new ReclaimResult(unassignedCustomer)); } @Override public void onFailure(Throwable t) { result.setException(t); ...
} SettableFuture<Void> result = SettableFuture.create(); telemetryService.deleteAttributes(AttributesDeleteRequest.builder() .tenantId(device.getTenantId()) .entityId(device.getId()) .scope(AttributeScope.SERVER_SCOPE) .keys(Arrays.asList(C...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\device\ClaimDevicesServiceImpl.java
2
请完成以下Java代码
public void updatePaymentTermIdFromPaymentDiscount(@NonNull final I_C_OrderLine orderLineRecord, @NonNull final ICalloutField field) { updatePaymentTermId(orderLineRecord); } private void updatePaymentTermId(@NonNull final I_C_OrderLine orderLineRecord) { final PaymentTermId basePaymentTermId = Services.get(IO...
final PaymentTerm paymentTerm = paymentTermService.getById(paymentTermId); final Percent paymentDiscount = paymentTerm.getDiscount(); orderLineRecord.setPaymentDiscount(paymentDiscount.toBigDecimal()); } @CalloutMethod(skipIfCopying = true, columnNames = I_C_OrderLine.COLUMNNAME_IsManualPaymentTerm) public void...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\paymentterm\interceptor\C_OrderLine.java
1
请完成以下Java代码
public String getExternalTaskErrorDetails(String externalTaskId) { return commandExecutor.execute(new GetExternalTaskErrorDetailsCmd(externalTaskId)); } @Override public void setRetries(String externalTaskId, int retries) { setRetries(externalTaskId, retries, true); } @Override public void setRetr...
public Batch setRetriesAsync(List<String> externalTaskIds, ExternalTaskQuery externalTaskQuery, int retries) { return updateRetries() .externalTaskIds(externalTaskIds) .externalTaskQuery(externalTaskQuery) .setAsync(retries); } @Override public UpdateExternalTaskRetriesSelectBuilder u...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ExternalTaskServiceImpl.java
1
请完成以下Java代码
public String getBusinessKey(VariableScope variableScope) { if (businessKeyValueProvider == null) { return null; } Object result = businessKeyValueProvider.getValue(variableScope); if (result != null && !(result instanceof String)) { throw new ClassCastException("Cannot cast '"+result+"' t...
public List<CallableElementParameter> getOutputsLocal() { return outputsLocal; } public void addOutput(CallableElementParameter output) { outputs.add(output); } public void addOutputLocal(CallableElementParameter output) { outputsLocal.add(output); } public void addOutputs(List<CallableElemen...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\model\CallableElement.java
1
请完成以下Java代码
public void onAttributeUpdate(UUID sessionId, AttributeUpdateNotificationMsg msg) { log.trace("[{}] Received attributes update notification to device", sessionId); responseWriter.setResult(new ResponseEntity<>(JsonConverter.toJson(msg).toString(), HttpStatus.OK)); } @Override ...
log.trace("[{}] Received device deleted notification for device with id: {}",sessionId, deviceId); responseWriter.setResult(new ResponseEntity<>("Device was deleted!", HttpStatus.FORBIDDEN)); } } private static MediaType parseMediaType(String contentType) { try { return...
repos\thingsboard-master\common\transport\http\src\main\java\org\thingsboard\server\transport\http\DeviceApiController.java
1
请完成以下Java代码
public V put(K key, V value) { V oldValue = super.put(key, value); if (oldValue == null) { int number = this.size() - 1; numberToKey.put(number, key); keyToNumber.put(key, number); } return oldValue; } @Override publi...
} public V getRandomValue() { if (this.isEmpty()) { return null; } int randomNumber = ThreadLocalRandom.current().nextInt(this.size()); K randomKey = numberToKey.get(randomNumber); return this.get(randomKey); } private void removeFromTra...
repos\tutorials-master\core-java-modules\core-java-collections-maps-9\src\main\java\com\baeldung\map\randommapkey\RandomizedMap.java
1
请在Spring Boot框架中完成以下Java代码
public AllocationAmounts subtract(@NonNull final AllocationAmounts other) { return toBuilder() .payAmt(this.payAmt.subtract(other.payAmt)) .discountAmt(this.discountAmt.subtract(other.discountAmt)) .writeOffAmt(this.writeOffAmt.subtract(other.writeOffAmt)) .invoiceProcessingFee(this.invoiceProcessing...
} public Money getTotalAmt() { return payAmt.add(discountAmt).add(writeOffAmt).add(invoiceProcessingFee); } public boolean isZero() { return payAmt.signum() == 0 && discountAmt.signum() == 0 && writeOffAmt.signum() == 0 && invoiceProcessingFee.signum() == 0; } public AllocationAmounts toZero()...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\paymentallocation\service\AllocationAmounts.java
2
请在Spring Boot框架中完成以下Java代码
public Ssl getSsl() { return this.ssl; } public static class Ssl { /** * Whether to enable SSL support. If enabled, 'mail.(protocol).ssl.enable' * property is set to 'true'. */ private boolean enabled; /** * SSL bundle name. If set, 'mail.(protocol).ssl.socketFactory' property is set to * an...
public boolean isEnabled() { return this.enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } public @Nullable String getBundle() { return this.bundle; } public void setBundle(@Nullable String bundle) { this.bundle = bundle; } } }
repos\spring-boot-4.0.1\module\spring-boot-mail\src\main\java\org\springframework\boot\mail\autoconfigure\MailProperties.java
2
请在Spring Boot框架中完成以下Java代码
public CurrencyId getCurrencyId() { return getAmountsToAllocate().getCurrencyId(); } public void addAllocatedAmounts(@NonNull final AllocationAmounts amounts) { amountsAllocated = amountsAllocated.add(amounts); amountsToAllocate = amountsToAllocate.subtract(amounts); } public void moveRemainingOpenAmtToDi...
return amountsAllocated.getTotalAmt(); } public boolean isFullyAllocated() { return amountsToAllocate.getTotalAmt().isZero(); } public boolean isARC() { return isCreditMemo() && getSoTrx().isSales(); } public boolean isAPI() { return !isCreditMemo() && getSoTrx().isPurchase(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\paymentallocation\service\PayableDocument.java
2
请完成以下Java代码
public org.compiere.model.I_AD_Workflow getAD_Workflow() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_AD_Workflow_ID, org.compiere.model.I_AD_Workflow.class); } @Override public void setAD_Workflow(org.compiere.model.I_AD_Workflow AD_Workflow) { set_ValueFromPO(COLUMNNAME_AD_Workflow_ID, org.comp...
return ii.intValue(); } /** Set Lesen und Schreiben. @param IsReadWrite Field is read / write */ @Override public void setIsReadWrite (boolean IsReadWrite) { set_Value (COLUMNNAME_IsReadWrite, Boolean.valueOf(IsReadWrite)); } /** Get Lesen und Schreiben. @return Field is read / write */ @Overri...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Workflow_Access.java
1
请完成以下Java代码
public class ShipmentSchedulesMDC { public MDCCloseable putShipmentScheduleId(@NonNull final ShipmentScheduleId shipmentScheduleId) { return TableRecordMDC.putTableRecordReference(I_M_ShipmentSchedule.Table_Name, shipmentScheduleId); } public MDCCloseable putShipmentSchedule(@NonNull final I_M_ShipmentSchedule s...
public MDCCloseable putRevalidationId(@NonNull final PInstanceId selectionId) { return MDC.putCloseable("RevalidationId", Integer.toString(selectionId.getRepoId())); } /** * Remove shipment schedule ID from MDC just to add it back when the closable is closed. */ public IAutoCloseable removeCurrentShipmentSch...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\ShipmentSchedulesMDC.java
1
请在Spring Boot框架中完成以下Java代码
public PayModeEnum getPayModeEnum() { return payModeEnum; } public void setPayModeEnum(PayModeEnum payModeEnum) { this.payModeEnum = payModeEnum; } public String getTotalPrice() { return totalPrice; } public void setTotalPrice(String totalPrice) { this.totalPri...
public void setExpressNo(String expressNo) { this.expressNo = expressNo; } public UserEntity getBuyer() { return buyer; } public void setBuyer(UserEntity buyer) { this.buyer = buyer; } @Override public String toString() { return "OrdersEntity{" + ...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\order\OrdersEntity.java
2
请在Spring Boot框架中完成以下Java代码
public List<JsonDocument> getDocuments(Bucket bucket, Iterable<String> keys) { List<JsonDocument> docs = new ArrayList<>(); for (String key : keys) { JsonDocument doc = bucket.get(key); if (doc != null) { docs.add(doc); } } return docs;...
}); final List<JsonDocument> docs = new ArrayList<>(); try { asyncBulkGet.toBlocking().forEach(new Action1<JsonDocument>() { public void call(JsonDocument doc) { docs.add(doc); } }); } catch (Exception e) { ...
repos\tutorials-master\persistence-modules\couchbase\src\main\java\com\baeldung\couchbase\spring\service\ClusterServiceImpl.java
2
请完成以下Java代码
public void updateASI() { final Object sourceModel = getSourceModel(); final IAttributeSetInstanceAware asiAware = attributeSetInstanceAwareFactoryService.createOrNull(sourceModel); if (asiAware == null) { return; } if (asiAware.getM_Product_ID() <= 0) { return; } final AttributeId lotNoAttr...
if (ai != null) { // If it was set, just leave it as it is return; } attributeSetInstanceBL.getCreateAttributeInstance(asiId, lotNoAttributeId); } public LotNumberAttributeUpdater setSourceModel(final Object sourceModel) { this.sourceModel = sourceModel; return this; } private Object getSourceMo...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\org\adempiere\mm\attributes\api\impl\LotNumberAttributeUpdater.java
1
请完成以下Java代码
public int getCarrier_ShipmentOrder_ID() { return get_ValueAsInt(COLUMNNAME_Carrier_ShipmentOrder_ID); } @Override public void setCarrier_ShipmentOrder_Log_ID (final int Carrier_ShipmentOrder_Log_ID) { if (Carrier_ShipmentOrder_Log_ID < 1) set_ValueNoCheck (COLUMNNAME_Carrier_ShipmentOrder_Log_ID, null);...
return get_ValueAsString(COLUMNNAME_RequestID); } @Override public void setRequestMessage (final @Nullable java.lang.String RequestMessage) { set_Value (COLUMNNAME_RequestMessage, RequestMessage); } @Override public java.lang.String getRequestMessage() { return get_ValueAsString(COLUMNNAME_RequestMessage...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_ShipmentOrder_Log.java
1
请完成以下Java代码
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (request.getSession(false) != null) { response.sendRedirect(request.getContextPath() + "/user-check/home"); return; } String referer = (String) reques...
request.setAttribute("error", "invalid login"); UserCheckFilter.forward(request, response, "/login.jsp"); return; } user.getLogins() .add(new Date()); HttpSession session = request.getSession(); session.setAttribute("user", user); String ori...
repos\tutorials-master\web-modules\jakarta-servlets-2\src\main\java\com\baeldung\user\check\UserCheckLoginServlet.java
1
请完成以下Java代码
protected ViewLayout createViewLayout(final ViewLayoutKey key) { final ITranslatableString caption = getProcessCaption(WEBUI_BPartner_ProductsProposal_Launcher.class) .orElse(null); return ViewLayout.builder() .setWindowId(key.getWindowId()) .setCaption(caption) .addElementsFromViewRowClass(Produc...
} if (pricingSystemId == null) { throw new AdempiereException("@NotFound@ @M_PricingSystem_ID@"); } final ZonedDateTime today = SystemTime.asZonedDateTime(); final Set<PriceListVersionId> priceListVersionIds = priceListsRepo.retrievePriceListsCollectionByPricingSystemId(pricingSystemId) .filterAndStre...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\view\BPartnerProductsProposalViewFactory.java
1
请完成以下Java代码
public EnqueueDesadvResult enqueue(@NonNull final EnqueueDesadvRequest enqueueDesadvRequest) { final IWorkPackageQueue queue = workPackageQueueFactory.getQueueForEnqueuing(enqueueDesadvRequest.getCtx(), EDIWorkpackageProcessor.class); final ImmutableList.Builder<I_EDI_Desadv> skippedDesadvCollector = ImmutableLis...
@Nullable final PInstanceId pInstanceId, @NonNull final IWorkPackageQueue queue, @NonNull final I_EDI_Desadv desadv) { final String trxName = InterfaceWrapperHelper.getTrxName(desadv); queue .newWorkPackage() .setAD_PInstance_ID(pInstanceId) .bindToTrxName(trxName) .addElement(desadv) .b...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\export\enqueue\DesadvEnqueuer.java
1
请完成以下Spring Boot application配置
spring: application: name: demo-application # 应用名 management: endpoints: # Actuator HTTP 配置项,对应 WebEndpointProperties 配置类 web: exposure: include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点
。通过设置 * ,可以开放所有端点。 metrics: tags: # 通用标签 application: ${spring.application.name}
repos\SpringBoot-Labs-master\lab-36\lab-36-prometheus-demo\src\main\resources\application.yaml
2
请完成以下Java代码
private final void onClose() { if (isDisposed()) { return; } if (callback == null) { return; } callback.notificationClosed(item); } public void dispose() { setVisible(false); disposed = true; }
private boolean isDisposed() { return disposed; } /** * Fade away and dispose this notification item. */ public void fadeAwayAndDispose() { // NOTE: atm we are just disposing it. Maybe in future we will really implement a nice fade away behaviour. dispose(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\notifications\NotificationItemPanel.java
1
请完成以下Java代码
public void setC_Currency_ID (int C_Currency_ID) { if (C_Currency_ID < 1) set_Value (COLUMNNAME_C_Currency_ID, null); else set_Value (COLUMNNAME_C_Currency_ID, Integer.valueOf(C_Currency_ID)); } /** Get Currency. @return The Currency for this record */ public int getC_Currency_ID () { Integer ...
{ set_Value (COLUMNNAME_Description, Description); } /** Get Description. @return Optional short description of the record */ public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void se...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Cycle.java
1
请完成以下Java代码
public boolean isValidDPD() { return get_ValueAsBoolean(COLUMNNAME_IsValidDPD); } @Override public void setNonStdAddress (final boolean NonStdAddress) { set_Value (COLUMNNAME_NonStdAddress, NonStdAddress); } @Override public boolean isNonStdAddress() { return get_ValueAsBoolean(COLUMNNAME_NonStdAddre...
return get_ValueAsString(COLUMNNAME_Postal_Add); } @Override public void setRegionName (final @Nullable java.lang.String RegionName) { set_Value (COLUMNNAME_RegionName, RegionName); } @Override public java.lang.String getRegionName() { return get_ValueAsString(COLUMNNAME_RegionName); } @Override publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Postal.java
1
请在Spring Boot框架中完成以下Java代码
public JwtUserDto getUserCache(String userName) { // 转小写 userName = StringUtils.lowerCase(userName); if (StringUtils.isNotEmpty(userName)) { // 获取数据 return redisUtils.get(LoginProperties.cacheKey + userName, JwtUserDto.class); } return null; } /**...
long time = idleTime + RandomUtil.randomInt(900, 1800); redisUtils.set(LoginProperties.cacheKey + userName, user, time); } } /** * 清理用户缓存信息 * 用户信息变更时 * @param userName 用户名 */ @Async public void cleanUserCache(String userName) { // 转小写 userName = S...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\security\service\UserCacheManager.java
2
请在Spring Boot框架中完成以下Java代码
protected final String getLoginPage() { return this.loginPage; } /** * Gets the Authentication Entry Point * @return the Authentication Entry Point */ protected final AuthenticationEntryPoint getAuthenticationEntryPoint() { return this.authenticationEntryPoint; } /** * Gets the URL to submit an authe...
if (this.permitAll) { PermitAllSupport.permitAll(http, this.loginPage, this.loginProcessingUrl, this.failureUrl); } } /** * Sets the loginPage and updates the {@link AuthenticationEntryPoint}. * @param loginPage */ private void setLoginPage(String loginPage) { this.loginPage = loginPage; this.authent...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\AbstractAuthenticationFilterConfigurer.java
2
请完成以下Java代码
public int getColtIntList() { return coltList.get(getValue); } @Benchmark public int getFastUtilIntList() { return fastUtilList.getInt(getValue); } @Benchmark public boolean containsArrayList() { return arrayList.contains(getValue); } @Benchmark public bool...
} @Benchmark public boolean containsFastUtilIntList() { return fastUtilList.contains(getValue); } public static void main(String[] args) throws Exception { Options options = new OptionsBuilder() .include(PrimitivesListPerformance.class.getSimpleName()).threads(1) ...
repos\tutorials-master\core-java-modules\core-java-collections-list-3\src\main\java\com\baeldung\list\primitive\PrimitivesListPerformance.java
1
请完成以下Java代码
private PPOrderId createPickingOrderIfNeeded(@NonNull final I_C_OrderLine salesOrderLine) { final OrgId orgId = OrgId.ofRepoId(salesOrderLine.getAD_Org_ID()); final WarehouseId warehouseId = getWarehouseId(salesOrderLine); final ProductId productId = ProductId.ofRepoId(salesOrderLine.getM_Product_ID()); final ...
// .dateOrdered(SystemTime.asInstant()) .datePromised(TimeUtil.asInstant(salesOrderLine.getDatePromised())) .dateStartSchedule(SystemTime.asInstant()) // .salesOrderLineId(OrderLineId.ofRepoId(salesOrderLine.getC_OrderLine_ID())) .customerId(BPartnerId.ofRepoId(salesOrderLine.getC_BPartner_ID())...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\order\inoutcandidate\OrderLineShipmentScheduleHandler.java
1
请完成以下Java代码
public String getBPartnerAddress() { return delegate.getBPartnerAddress(); } @Override public void setBPartnerAddress(final String address) { delegate.setBPartnerAddress(address); } } @ToString private class ReceiptScheduleEffectiveDocumentLocation implements IDocumentLocationAdapter { privat...
} @Override public int getAD_User_ID() { return BPartnerContactId.toRepoId(getBPartnerContactID(delegate)); } @Override public void setAD_User_ID(final int AD_User_ID) { } @Override public String getBPartnerAddress() { return delegate.getBPartnerAddress_Override(); } @Override publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\ReceiptScheduleBL.java
1
请在Spring Boot框架中完成以下Java代码
public CalculatedFieldType getType() { return CalculatedFieldType.ALARM; } @Override public Output getOutput() { return null; } @JsonIgnore @Override public boolean requiresScheduledReevaluation() { return getAllRules().anyMatch(entry -> entry.getValue().requiresSch...
public boolean rulesEqual(AlarmCalculatedFieldConfiguration other, BiPredicate<AlarmRule, AlarmRule> equalityCheck) { List<Pair<AlarmSeverity, AlarmRule>> thisRules = this.getAllRules().toList(); List<Pair<AlarmSeverity, AlarmRule>> otherRules = other.getAllRules().toList(); return CollectionsUt...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\cf\configuration\AlarmCalculatedFieldConfiguration.java
2
请完成以下Java代码
public void onError(String params, Exception e) { try { if (e instanceof TimeoutException) { return; } processRemove.run(); } finally { callback.onError(params, e); } ...
} @Override public void removeUpdates(String endpoint) { currentModelConfigs.remove(endpoint); modelStore.remove(endpoint); } @PreDestroy private void destroy() { currentModelConfigs.values().forEach(model -> { if (model != null && !model.isEmpty()) { ...
repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\model\LwM2MModelConfigServiceImpl.java
1
请完成以下Java代码
public String getName() { return this.name; } public String getVersion() { return this.version; } } /** * Information about the Java Runtime Environment the application is running in. */ public static class JavaRuntimeEnvironmentInfo { private final String name; private final String version;...
/** * Information about the Java Virtual Machine the application is running in. */ public static class JavaVirtualMachineInfo { private final String name; private final String vendor; private final String version; public JavaVirtualMachineInfo() { this.name = System.getProperty("java.vm.name"); t...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\info\JavaInfo.java
1
请完成以下Java代码
public BigDecimal getTaxAmt() { return isAccountSignDR() ? glJournalLine.getDR_TaxAmt() : glJournalLine.getCR_TaxAmt(); } @Override public void setTaxAmt(final BigDecimal taxAmt) { if (isAccountSignDR()) { glJournalLine.setDR_TaxAmt(taxAmt); } else { glJournalLine.setCR_TaxAmt(taxAmt); } } ...
{ glJournalLine.setDR_TaxTotalAmt(totalAmt); } else { glJournalLine.setCR_TaxTotalAmt(totalAmt); } // // Update AmtSourceDr/Cr // NOTE: we are updating both sides because they shall be the SAME glJournalLine.setAmtSourceDr(totalAmt); glJournalLine.setAmtSourceCr(totalAmt); } @Override publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal\impl\GLJournalLineTaxAccountable.java
1
请完成以下Java代码
public void extractKeyParts(final CacheKeyBuilder keyBuilder, final Object targetObject, final Object[] params) { final Object modelObj = params[parameterIndex]; int id = -1; Exception errorException = null; if (modelObj != null) { try { id = InterfaceWrapperHelper.getId(modelObj); } catch (...
final CacheGetException ex = new CacheGetException("Invalid parameter type.") .addSuppressIfNotNull(errorException) .setTargetObject(targetObject) .setMethodArguments(params) .setInvalidParameter(parameterIndex, modelObj) .setAnnotation(CacheTrx.class); logger.warn("Invalid parameter. Skip c...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\interceptor\CacheModelIdParamDescriptor.java
1
请完成以下Java代码
protected boolean isEligible(final IDunningContext dunningContext, final IDunnableDoc dunnableDoc) { if (dunnableDoc.getOpenAmt().signum() == 0) { logger.info("Skip " + dunnableDoc + " because OpenAmt is ZERO"); return false; } if (dunnableDoc.isInDispute()) { logger.info("Skip " + dunnableDoc + " ...
{ // Document is not due yet => not eligible for dunning return false; } final int daysAfterDue = level.getDaysAfterDue().intValue(); if (dunnableDoc.getDaysDue() < daysAfterDue) { logger.info("Skip " + dunnableDoc + " because is not already due (DaysAfterDue:" + daysAfterDue + ")"); return false; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\spi\impl\AbstractDunnableSource.java
1
请完成以下Java代码
public Boolean isStrictMode() { return strictMode; } public void setStrictMode(Boolean strictMode) { this.strictMode = strictMode; } public Map<String, String> getInputVariableTypes() { return inputVariableTypes; } public void setInputVariableTypes(Map<String, String> ...
for (Map.Entry<String, Object> entry : inputVariables.entrySet()) { Object newValue = null; if (entry.getValue() == null) { // do nothing } else if (entry.getValue() instanceof Long) { newValue = Long.valueOf(((Long) entry.getValue...
repos\flowable-engine-main\modules\flowable-dmn-api\src\main\java\org\flowable\dmn\api\DecisionExecutionAuditContainer.java
1
请在Spring Boot框架中完成以下Java代码
public class LLMConfiguration { @Bean public VectorStore vectorStore(EmbeddingModel embeddingModel) { return SimpleVectorStore .builder(embeddingModel) .build(); } @Bean public ChatClient contentGenerator(ChatModel chatModel, VectorStore vectorStore) { retur...
.defaultOptions(OllamaOptions.builder() .model(evaluationModel) .build()) .modelManagementOptions(ModelManagementOptions.builder() .pullModelStrategy(PullModelStrategy.WHEN_MISSING) .build()) .build(); return ChatClient.buil...
repos\tutorials-master\spring-ai-modules\spring-ai-2\src\main\java\com\baeldung\springai\evaluator\LLMConfiguration.java
2
请完成以下Java代码
public String getOrgColumn () { return (String)get_Value(COLUMNNAME_OrgColumn); } /** Set Measure Calculation. @param PA_MeasureCalc_ID Calculation method for measuring performance */ public void setPA_MeasureCalc_ID (int PA_MeasureCalc_ID) { if (PA_MeasureCalc_ID < 1) set_ValueNoCheck (COLUMNNAM...
return (String)get_Value(COLUMNNAME_ProductColumn); } /** Set Sql SELECT. @param SelectClause SQL SELECT clause */ public void setSelectClause (String SelectClause) { set_Value (COLUMNNAME_SelectClause, SelectClause); } /** Get Sql SELECT. @return SQL SELECT clause */ public String getSelectClau...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_MeasureCalc.java
1
请完成以下Java代码
public double[] categorize(Document document) throws IllegalArgumentException, IllegalStateException { Integer category; Integer feature; Integer occurrences; Double logprob; double[] predictionScores = new double[model.catalog.length]; for (Map.Entry<Integer, Double...
//我们传入这些统计信息到特征选择算法中,得到特征与其分值 Map<Integer, Double> selectedFeatures = chiSquareFeatureExtractor.chi_square(featureData); //从统计数据中删掉无用的特征并重建特征映射表 int[][] featureCategoryJointCount = new int[selectedFeatures.size()][]; featureData.wordIdTrie = new BinTrie<Integer>(); String[] word...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\classifiers\NaiveBayesClassifier.java
1
请完成以下Java代码
public int size() { throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".size() is not supported."); } @Override public boolean isEmpty() { throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".isEmpty() is not supported."); } @Ove...
@Override public Set<String> keySet() { throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".keySet() is not supported."); } @Override public Collection<Object> values() { throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".values() i...
repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\ProcessVariableMap.java
1
请在Spring Boot框架中完成以下Java代码
public void setPRODUCTDESCCODE(String value) { this.productdesccode = value; } /** * Gets the value of the productdesctext property. * * @return * possible object is * {@link String } * */ public String getPRODUCTDESCTEXT() { return productde...
* * @param value * allowed object is * {@link String } * */ public void setPRODUCTDESCTYPE(String value) { this.productdesctype = value; } /** * Gets the value of the productdesclang property. * * @return * possible object is * ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DPRDE1.java
2
请完成以下Java代码
public GetProcessDefinitionsPayload restrictProcessDefQuery(SecurityPolicyAccess securityPolicyAccess) { return restrictQuery(processDefinitionRestrictionApplier, securityPolicyAccess); } private Set<String> definitionKeysAllowedForApplicationPolicy(SecurityPolicyAccess securityPolicyAccess) { ...
} return restrictionApplier.allowAll(); } public boolean canWrite(String processDefinitionKey) { return hasPermission(processDefinitionKey, SecurityPolicyAccess.WRITE, applicationName); } public boolean canRead(String processDefinitionKey) { return ( hasPermission(...
repos\Activiti-develop\activiti-core-common\activiti-spring-security-policies\src\main\java\org\activiti\core\common\spring\security\policies\ProcessSecurityPoliciesManagerImpl.java
1
请完成以下Java代码
protected String getModuleName(DeploymentUnit deploymentUnit) { try { // Try to get MODULE_IDENTIFIER first (for JBoss EAP 8 versions) Field moduleIdentifierField = Attachments.class.getDeclaredField(MODULE_IDENTIFIER); ModuleIdentifier identifier = deploymentUnit.getAttachment((AttachmentKey<Modu...
addSystemDependency(moduleLoader, moduleSpecification, MODULE_IDENTIFIER_CONNECT); addSystemDependency(moduleLoader, moduleSpecification, MODULE_IDENTIFIER_ENGINE_DMN); addSystemDependency(moduleLoader, moduleSpecification, MODULE_IDENTIFIER_GRAAL_JS, true); addSystemDependency(moduleLoader, moduleSpecifica...
repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\deployment\processor\ModuleDependencyProcessor.java
1
请完成以下Java代码
public String[][] getEdgeArray() { String[][] edge = new String[word.length + 1][word.length + 1]; for (CoNLLWord coNLLWord : word) { edge[coNLLWord.ID][coNLLWord.HEAD.ID] = coNLLWord.DEPREL; } return edge; } /** * 获取包含根节点在内的单词数组 * @return ...
}; } /** * 找出所有子节点 * @param word * @return */ public List<CoNLLWord> findChildren(CoNLLWord word) { List<CoNLLWord> result = new LinkedList<CoNLLWord>(); for (CoNLLWord other : this) { if (other.HEAD == word) result.add(other); ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dependency\CoNll\CoNLLSentence.java
1
请完成以下Java代码
public void setRecord_ID(final int Record_ID) { if (Record_ID < 0) { set_Value(COLUMNNAME_Record_ID, null); } else { set_Value(COLUMNNAME_Record_ID, Integer.valueOf(Record_ID)); } } /** * Get Datensatz-ID. * * @return Direct internal record ID */ @Override public int getRecord_ID() { ...
* Set Name der DB-Tabelle. * * @param TableName Name der DB-Tabelle */ @Override public void setTableName(final java.lang.String TableName) { throw new IllegalArgumentException("TableName is virtual column"); } /** * Get Name der DB-Tabelle. * * @return Name der DB-Tabelle */ @Override public ...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition_Workqueue.java
1
请完成以下Java代码
public int getM_Warehouse_ID() { return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID); } @Override public void setQtyOnHandStock (final @Nullable BigDecimal QtyOnHandStock) { set_Value (COLUMNNAME_QtyOnHandStock, QtyOnHandStock); } @Override public BigDecimal getQtyOnHandStock() { final BigDecimal bd = g...
@Override public void setQueryNo (final int QueryNo) { set_Value (COLUMNNAME_QueryNo, QueryNo); } @Override public int getQueryNo() { return get_ValueAsInt(COLUMNNAME_QueryNo); } @Override public void setStorageAttributesKey (final @Nullable String StorageAttributesKey) { set_Value (COLUMNNAME_Storag...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java-gen\de\metas\material\cockpit\model\X_MD_Available_For_Sales_QueryResult.java
1
请在Spring Boot框架中完成以下Java代码
public void delete(@PathVariable Integer id) { log.info("单个参数用 ApiImplicitParam"); } @PostMapping @ApiOperation(value = "添加用户(DONE)") public User post(@RequestBody User user) { log.info("如果是 POST PUT 这种带 @RequestBody 的可以不用写 @ApiImplicitParam"); return user; } @PostMappi...
return user; } @PutMapping("/{id}") @ApiOperation(value = "修改用户(DONE)") public void put(@PathVariable Long id, @RequestBody User user) { log.info("如果你不想写 @ApiImplicitParam 那么 swagger 也会使用默认的参数名作为描述信息 "); } @PostMapping("/{id}/file") @ApiOperation(value = "文件上传(DONE)") public St...
repos\spring-boot-demo-master\demo-swagger\src\main\java\com\xkcoding\swagger\controller\UserController.java
2
请完成以下Java代码
public ArrayList<Node<T>> getUpStream() { Node<T> currentNode = this; final ArrayList<Node<T>> upStream = new ArrayList<>(); upStream.add(currentNode); while (currentNode.parent != null) { upStream.add(currentNode.parent); currentNode = currentNode.parent; } return upStream; } /** * Tries ...
return currentNode; } else { final Iterator<Node<T>> iterator = currentNode.getChildren().iterator(); Node<T> requestedNode = null; while (requestedNode == null && iterator.hasNext()) { requestedNode = getNode_rec(iterator.next(), value); } return requestedNode; } } private void listA...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\Node.java
1
请完成以下Java代码
public class WEBUI_M_HU_ReturnToVendor extends HUEditorProcessTemplate implements IProcessPrecondition { private final ReturnsServiceFacade returnsServiceFacade = SpringContextHolder.instance.getBean(ReturnsServiceFacade.class); private List<I_M_HU> husToReturn = null; @Override protected ProcessPreconditionsReso...
if (husToReturn.isEmpty()) { throw new AdempiereException("@NoSelection@"); } final Timestamp movementDate = Env.getDate(getCtx()); returnsServiceFacade.createVendorReturnInOutForHUs(husToReturn, movementDate); return MSG_OK; } @Override protected void postProcess(final boolean success) { if (husTo...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_ReturnToVendor.java
1
请在Spring Boot框架中完成以下Java代码
public String getMpsExpectedSendingTime() { return mpsExpectedSendingTime; } /** * Sets the value of the mpsExpectedSendingTime property. * * @param value * allowed object is * {@link String } * */ public void setMpsExpectedSendingTime(String value) ...
* allowed object is * {@link Address } * */ public void setSender(Address value) { this.sender = value; } /** * Gets the value of the recipient property. * * @return * possible object is * {@link Address } * */ public ...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\GeneralShipmentData.java
2
请完成以下Java代码
protected int get_AccessLevel() { return accessLevel.intValue(); } /** Load Meta Data */ protected POInfo initPO (Properties ctx) { POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); return poi; } public String toString() { StringBuffer sb = new Strin...
if (ii == null) return 0; return ii.intValue(); } /** Set Workflow Node Asset. @param PP_WF_Node_Asset_ID Workflow Node Asset */ public void setPP_WF_Node_Asset_ID (int PP_WF_Node_Asset_ID) { if (PP_WF_Node_Asset_ID < 1) set_ValueNoCheck (COLUMNNAME_PP_WF_Node_Asset_ID, null); else set_ValueN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_WF_Node_Asset.java
1
请完成以下Java代码
private static final int toID(final Object idObj) { if (idObj == null) { return -1; } else if (idObj instanceof Number) { return ((Number)idObj).intValue(); } else { return -1; } } private void doConvert(final String reason) { // Reset setDescription(null); setQtyConv(null); fin...
final UOMConversionContext conversionCtx = UOMConversionContext.of(product); qtyConv = uomConversionBL.convertQty(conversionCtx, qty, uomFrom, uomTo); } else { qtyConv = uomConversionBL.convert(uomFrom, uomTo, qty).orElse(null); } setQtyConv(qtyConv); setDescription("Converted " + NumberU...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\uom\form\UOMConversionCheckFormPanel.java
1
请完成以下Java代码
public String getDescription() { return (String) getProperty("documentation"); } /** * @return all lane-sets defined on this process-instance. Returns an empty list if none are defined. */ public List<LaneSet> getLaneSets() { if(laneSets == null) { laneSets = new ArrayList<LaneSet>(); } ...
public boolean isScope() { return true; } public PvmScope getEventScope() { return null; } public ScopeImpl getFlowScope() { return null; } public PvmScope getLevelOfSubprocessScope() { return null; } @Override public boolean isSubProcessScope() { return true; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\process\ProcessDefinitionImpl.java
1
请在Spring Boot框架中完成以下Java代码
public Object visitPrimitiveAsBoolean(PrimitiveType type, String value) { return Boolean.parseBoolean(value); } @Override public Object visitPrimitiveAsByte(PrimitiveType type, String value) { return parseNumber(value, Byte::parseByte, type); } @Override public Object visitPrimitiveAsShort(Primitive...
} return value; } @Override public Object visitPrimitiveAsFloat(PrimitiveType type, String value) { return parseNumber(value, Float::parseFloat, type); } @Override public Object visitPrimitiveAsDouble(PrimitiveType type, String value) { return parseNumber(value, Double::parseDouble, type); } ...
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\ParameterPropertyDescriptor.java
2
请在Spring Boot框架中完成以下Java代码
public void download(List<DictDto> dictDtos, HttpServletResponse response) throws IOException { List<Map<String, Object>> list = new ArrayList<>(); for (DictDto dictDTO : dictDtos) { if(CollectionUtil.isNotEmpty(dictDTO.getDictDetails())){ for (DictDetailDto dictDetail : dict...
map.put("字典名称", dictDTO.getName()); map.put("字典描述", dictDTO.getDescription()); map.put("字典标签", null); map.put("字典值", null); map.put("创建日期", dictDTO.getCreateTime()); list.add(map); } } FileUtil.downloadExcel(list...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\service\impl\DictServiceImpl.java
2
请完成以下Java代码
public static void addLoggingData(String type, ObjectNode data, String engineType) { data.put(ID, idGenerator.getNextId()); data.put(TIMESTAMP, formatDate(new Date())); data.put("type", type); LoggingSession loggingSession = Context.getCommandContext().getSession(LoggingSession....
if (StringUtils.isNotEmpty(subScopeId)) { loggingNode.put("subScopeId", subScopeId); } loggingNode.put("scopeType", scopeType); return loggingNode; } public static String formatDate(Date date) { if (date != null) { SimpleDateFormat dateF...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\logging\LoggingSessionUtil.java
1
请完成以下Spring Boot application配置
spring: ai: anthropic: api-key: ${ANTHROPIC_API_KEY} chat: options: model: ${SECONDARY_LLM} tertiary-model: ${TERTIARY_LLM} open-ai: api-key: ${OPENAI_API
_KEY} chat: options: model: ${PRIMARY_LLM} temperature: 1
repos\tutorials-master\spring-ai-modules\spring-ai-multiple-llms\src\main\resources\application.yaml
2
请完成以下Java代码
public DOMSource getDomSource() { return new DOMSource(document); } public String registerNamespace(String namespaceUri) { synchronized(document) { DomElement rootElement = getRootElement(); if (rootElement != null) { return rootElement.registerNamespace(namespaceUri); } els...
} public DomDocument clone() { synchronized(document) { return new DomDocumentImpl((Document) document.cloneNode(true)); } } public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DomDocument...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\instance\DomDocumentImpl.java
1
请在Spring Boot框架中完成以下Java代码
public JwtAccessTokenConverter accessTokenConverter() { JwtAccessTokenConverter converter = new JwtAccessTokenConverter(); converter.setSigningKey("test-secret"); return converter; } /** * 设置token 由Jwt产生,不使用默认的透明令牌 */ @Bean public JwtTokenStore jwtTokenStore() { ...
} @Override public void configure(ClientDetailsServiceConfigurer clients) throws Exception { clients.inMemory() .withClient("clientapp") .secret("123") .scopes("read") //设置支持[密码模式、授权码模式、token刷新] .authorizedGrantTypes( ...
repos\SpringBootLearning-master (1)\springboot-security-oauth2-jwt\jwt-authserver\src\main\java\com\gf\config\OAuth2AuthorizationServer.java
2
请完成以下Java代码
protected Mono<Void> doNotify(InstanceEvent event, Instance instance) { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON); headers.add("X-Auth-Token", token); headers.add("X-User-Id", userId); return Mono.fromRunnable(() -> restTemplate.exchange(getUri(), HttpMethod.P...
public void setRoomId(String roomId) { this.roomId = roomId; } @Nullable public String getToken() { return token; } public void setToken(String token) { this.token = token; } @Nullable public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } }
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\RocketChatNotifier.java
1
请完成以下Java代码
public void setFormKey(String formKey) { this.formKey = formKey; } public String getSkipExpression() { return skipExpression; } public void setSkipExpression(String skipExpression) { this.skipExpression = skipExpression; } public String getAssignee() { return a...
public List<String> getCandidateUsers() { return candidateUsers; } public void setCandidateUsers(List<String> candidateUsers) { this.candidateUsers = candidateUsers; } public List<String> getCandidateGroups() { return candidateGroups; } public void setCandidateGroups(L...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\interceptor\CreateUserTaskBeforeContext.java
1
请完成以下Java代码
public class PrimitiveCollections { public static void main(String[] args) { int[] primitives = new int[] {5, 10, 0, 2, -8}; guavaPrimitives(primitives); intStream(primitives); TIntArrayList tList = new TIntArrayList(primitives); cern.colt.list.IntArrayList coltList = n...
IntStream stream = IntStream.of(5, 10, 0, 2, -8); IntStream newStream = IntStream.of(primitives); OptionalDouble average = stream.filter(i -> i > 0).average(); } private static void guavaPrimitives(int[] primitives) { ImmutableIntArray immutableIntArray = ImmutableIntArray.builder()...
repos\tutorials-master\core-java-modules\core-java-collections-list-3\src\main\java\com\baeldung\list\primitive\PrimitiveCollections.java
1
请完成以下Java代码
public static class Result { private final HandlerFunction<ServerResponse> handlerFunction; private final List<HandlerFilterFunction<ServerResponse, ServerResponse>> lowerPrecedenceFilters; private final List<HandlerFilterFunction<ServerResponse, ServerResponse>> higherPrecedenceFilters; public Result(Handl...
public HandlerFunction<ServerResponse> getHandlerFunction() { return handlerFunction; } public List<HandlerFilterFunction<ServerResponse, ServerResponse>> getLowerPrecedenceFilters() { return lowerPrecedenceFilters; } public List<HandlerFilterFunction<ServerResponse, ServerResponse>> getHigherPrecedence...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\handler\HandlerDiscoverer.java
1
请完成以下Java代码
public void setIsDefaultContact (final boolean IsDefaultContact) { set_Value (COLUMNNAME_IsDefaultContact, IsDefaultContact); } @Override public boolean isDefaultContact() { return get_ValueAsBoolean(COLUMNNAME_IsDefaultContact); } /** * IsInvoiceEmailEnabled AD_Reference_ID=319 * Reference name: _Ye...
public java.lang.String getLastname() { return get_ValueAsString(COLUMNNAME_Lastname); } @Override public void setPhone (final @Nullable java.lang.String Phone) { set_Value (COLUMNNAME_Phone, Phone); } @Override public java.lang.String getPhone() { return get_ValueAsString(COLUMNNAME_Phone); } @Ov...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Contact_QuickInput.java
1
请完成以下Java代码
private Map<String, String> resolveStatusCheckerNamesMapFromDubboHealthIndicatorProperties() { DubboHealthIndicatorProperties.Status status = dubboHealthIndicatorProperties.getStatus(); Map<String, String> statusCheckerNamesMap = new LinkedHashMap<>(); for (String statusName :...
Map<String, String> statusCheckerNamesMap = new LinkedHashMap<>(); for (Map.Entry<String, ProviderConfig> entry : providerConfigs.entrySet()) { String beanName = entry.getKey(); ProviderConfig providerConfig = entry.getValue(); Set<String> statusCheckerNames = getStatusCh...
repos\dubbo-spring-boot-project-master\dubbo-spring-boot-compatible\actuator\src\main\java\org\apache\dubbo\spring\boot\actuate\health\DubboHealthIndicator.java
1
请完成以下Java代码
public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } @Column(name = "last_name", nullable = false) public String getLastName() { return lastName; } public void setLastName(String lastName) { ...
return emailId; } public void setEmailId(String emailId) { this.emailId = emailId; } public Employee(){} public Employee(String firstName, String lastName, String emailId){ this.firstName = firstName; this.lastName = lastName; this.emailId = emailId; } }
repos\SpringBoot-Projects-FullStack-master\Part-4 Spring Boot REST API\SpringRestDB\src\main\java\spring\restdb\model\Employee.java
1
请完成以下Java代码
public class MReference extends X_AD_Reference { /** * */ private static final long serialVersionUID = 3298182955450711914L; public MReference(Properties ctx, int AD_Reference_ID, String trxName) { super(ctx, AD_Reference_ID, trxName); } public MReference(Properties ctx, ResultSet rs, String trxName) { ...
* @param referenceId * @param trxName * @return MRefTable * @deprecated Please consider using {@link ILookupDAO#retrieveTableRefInfo(int)} */ @Deprecated public static I_AD_Ref_Table retrieveRefTable(final Properties ctx, final int referenceId, final String trxName) { return Services.get(IQueryBL.class) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MReference.java
1
请在Spring Boot框架中完成以下Java代码
public static class Config { private @Nullable String fromHeader; private @Nullable String toHeader; public @Nullable String getFromHeader() { return this.fromHeader; } public Config setFromHeader(String fromHeader) { this.fromHeader = fromHeader; return this; } public @Nullable String getTo...
public Config setToHeader(String toHeader) { this.toHeader = toHeader; return this; } @Override public String toString() { // @formatter:off return new ToStringCreator(this) .append("fromHeader", fromHeader) .append("toHeader", toHeader) .toString(); // @formatter:on } } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\MapRequestHeaderGatewayFilterFactory.java
2