instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void setC_Period_ID (final int C_Period_ID) { if (C_Period_ID < 1) set_Value (COLUMNNAME_C_Period_ID, null); else set_Value (COLUMNNAME_C_Period_ID, C_Period_ID); } @Override public int getC_Period_ID() { return get_ValueAsInt(COLUMNNAME_C_Period_ID); } @Override public void setDatevAcct...
@Override public java.sql.Timestamp getExportDate() { return get_ValueAsTimestamp(COLUMNNAME_ExportDate); } /** * ExportType AD_Reference_ID=541172 * Reference name: DatevExportType */ public static final int EXPORTTYPE_AD_Reference_ID=541172; /** Payment = Payment */ public static final String EXPORT...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_DatevAcctExport.java
1
请完成以下Java代码
public final class JAXBConstants { private JAXBConstants() { super(); } /** * JAXB Contact Path */ public static final String JAXB_ContextPath = "de.metas.printing.esb.base.jaxb.generated"; public static final DynamicObjectFactory JAXB_ObjectFactory = new DynamicObjectFactory(new de.metas.printing.esb.base...
public static final String PRT_AD_PRINTER_HW_FORMAT_VERSION = "*"; public static final String PRT_AD_PRINTER_HW_MEDIA_SIZE_FORMAT_VERSION = "*"; public static final String PRT_AD_PRINTER_HW_MEDIA_TRAY_FORMAT_VERSION = "*"; /* * C_PRINT_PACKAGE Formats' Versions */ public static final String PRT_C_PRINT_PACKAGE...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.esb.base\src\main\java\de\metas\printing\esb\base\jaxb\JAXBConstants.java
1
请完成以下Java代码
public void warmUpCacheForHuIds(final Collection<HuId> huIds) { CollectionUtils.getAllOrLoad(husById, huIds, this::retrieveHUs); } private Map<HuId, I_M_HU> retrieveHUs(final Collection<HuId> huIds) { return Maps.uniqueIndex(handlingUnitsBL.getByIds(huIds), HUsLoadingCache::extractHUId); } public HuId getTo...
{ return huAttributesCache.computeIfAbsent(huId, this::retrieveHUAttributes); } private ImmutableAttributeSet retrieveHUAttributes(final HuId huId) { final I_M_HU hu = getHUById(huId); final IAttributeStorage attributes = attributesFactory.getAttributeStorage(hu); return ImmutableAttributeSet.createSubSet(a...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\plan\generator\pickFromHUs\HUsLoadingCache.java
1
请完成以下Java代码
public void setAD_Column_ID (final int AD_Column_ID) { if (AD_Column_ID < 1) set_Value (COLUMNNAME_AD_Column_ID, null); else set_Value (COLUMNNAME_AD_Column_ID, AD_Column_ID); } @Override public int getAD_Column_ID() { return get_ValueAsInt(COLUMNNAME_AD_Column_ID); } @Override public de.metas....
return get_ValueAsInt(COLUMNNAME_ES_FTS_Filter_ID); } @Override public void setES_FTS_Filter_JoinColumn_ID (final int ES_FTS_Filter_JoinColumn_ID) { if (ES_FTS_Filter_JoinColumn_ID < 1) set_ValueNoCheck (COLUMNNAME_ES_FTS_Filter_JoinColumn_ID, null); else set_ValueNoCheck (COLUMNNAME_ES_FTS_Filter_Join...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java-gen\de\metas\elasticsearch\model\X_ES_FTS_Filter_JoinColumn.java
1
请完成以下Java代码
public void handleBatch(Exception thrownException, @Nullable ConsumerRecords<?, ?> records, Consumer<?, ?> consumer, MessageListenerContainer container, Runnable invokeListener) { if (records == null || records.count() == 0) { this.logger.error(thrownException, "Called with no records; consumer exception"); ...
public void handleBatch(Exception thrownException, ConsumerRecords<?, ?> data, Consumer<?, ?> consumer, MessageListenerContainer container, Runnable invokeListener) { data.partitions() .stream() .collect( Collectors.toMap(tp -> tp, tp -> data.records(tp).get(0).offset(), (u, v) -> v, L...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\FallbackBatchErrorHandler.java
1
请完成以下Java代码
private boolean havePage(final int pageIndex) { if (pageIndex < 0 || pageIndex >= getNumberOfPages()) return false; return true; } // havePage /** * Print Copy * * @return true if copy */ public boolean isCopy() { return m_isCopy; } // isCopy /** * Set Copy * * @param isCopy if tru...
@Override public Reader getReaderForText() throws IOException { return null; } // getReaderForText /** * Obtains an input stream for extracting byte print data from this doc. * (Doc Interface) * * @return null * @throws IOException */ @Override public InputStream getStreamForBytes() throws IOExc...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\LayoutEngine.java
1
请完成以下Java代码
public class ASIViewRowAttributesProvider implements IViewRowAttributesProvider { public static ASIViewRowAttributesProvider newInstance(final ASIRepository asiRepository) { return new ASIViewRowAttributesProvider(asiRepository); } private final ASIRepository asiRepository; private final Map<DocumentId, ASIView...
private ASIViewRowAttributes createAttributes(final DocumentId asiDocumentId) { final AttributeSetInstanceId asiId = AttributeSetInstanceId.ofRepoIdOrNull(asiDocumentId.toInt()); if (asiId == null) { throw new AdempiereException("Invalid ASI document ID: " + asiDocumentId); } final ASIDocument asiDoc = a...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ASIViewRowAttributesProvider.java
1
请在Spring Boot框架中完成以下Java代码
public class Product { public Product(){} @Id //@GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; public Product(Long id, String productName, Double price, CustomerOrder customerOrder) { this.id = id; this.productName = productName; this.price = price; ...
return productName; } public void setProductName(String productName) { this.productName = productName; } public Double getPrice() { return price; } public void setPrice(Double price) { this.price = price; } public CustomerOrder getCustomerOrder() { ret...
repos\tutorials-master\persistence-modules\spring-data-jpa-repo-3\src\main\java\com\baeldung\spring\data\jpa\joinquery\entities\Product.java
2
请完成以下Java代码
public InventoryLine withCounting(@NonNull final InventoryLineCountRequest request) { final ArrayList<InventoryLineHU> newLineHUs = new ArrayList<>(inventoryLineHUs.size() + 1); boolean updated = false; boolean isSingleLineHUPlaceholder = inventoryLineHUs.size() == 1 && inventoryLineHUs.get(0).getId() == nu...
private static HUAggregationType computeHUAggregationType( @NonNull final List<InventoryLineHU> newInventoryLineHUs, @Nullable final HUAggregationType prevHUAggregationType) { return newInventoryLineHUs.size() > 1 ? HUAggregationType.MULTI_HU : prevHUAggregationType; } public boolean isEligibleForCounting()...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\InventoryLine.java
1
请完成以下Java代码
public int getKeepLogDays () { Integer ii = (Integer)get_Value(COLUMNNAME_KeepLogDays); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name...
return 0; return ii.intValue(); } /** 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...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_IMP_Processor.java
1
请完成以下Java代码
public static VariableValueDto fromTypedValue(TypedValue typedValue, boolean preferSerializedValue) { VariableValueDto dto = new VariableValueDto(); fromTypedValue(dto, typedValue, preferSerializedValue); return dto; } public static void fromTypedValue(VariableValueDto dto, TypedValue typedValue) { ...
public static VariableValueDto fromFormPart(String type, FormPart binaryDataFormPart) { VariableValueDto dto = new VariableValueDto(); dto.type = type; dto.value = binaryDataFormPart.getBinaryContent(); if (ValueType.FILE.getName().equals(fromRestApiTypeName(type))) { String contentType = binar...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\VariableValueDto.java
1
请完成以下Java代码
public void mergeDynamicData(InternalsImpl other) { this.commands = other.commands; this.metrics = other.metrics; } @Override public JdkImpl getJdk() { return jdk; } public void setJdk(JdkImpl jdk) { this.jdk = jdk; } @Override public Set<String> getCamundaIntegration() { return c...
this.camundaIntegration = camundaIntegration; } @Override public LicenseKeyDataImpl getLicenseKey() { return licenseKey; } public void setLicenseKey(LicenseKeyDataImpl licenseKey) { this.licenseKey = licenseKey; } @Override public Set<String> getWebapps() { return webapps; } public v...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\telemetry\dto\InternalsImpl.java
1
请完成以下Java代码
public String getSourceRef() { return sourceRef; } public void setSourceRef(String sourceRef) { this.sourceRef = sourceRef; } public String getTargetRef() { return targetRef; } public void setTargetRef(String targetRef) { this.targetRef = targetRef; } ...
} public List<Integer> getWaypoints() { return waypoints; } public void setWaypoints(List<Integer> waypoints) { this.waypoints = waypoints; } public String toString() { return sourceRef + " --> " + targetRef; } public SequenceFlow clone() { SequenceFlow cl...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\SequenceFlow.java
1
请在Spring Boot框架中完成以下Java代码
public class AppUser { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) private long id; private String name; @Column(unique = true) private String username; private String password; private boolean enabled = true; private Date lastLogin; public AppUser() { } ...
} public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } publi...
repos\tutorials-master\spring-security-modules\spring-security-web-boot-3\src\main\java\com\baeldung\relationships\models\AppUser.java
2
请完成以下Java代码
protected String doIt() { final PricingConditionsBreak pricingConditionsBreak = pricingConditionsRepo.changePricingConditionsBreak(createPricingConditionsBreakChangeRequest(getEditableRow())); patchEditableRow(PricingConditionsRowActions.saved(pricingConditionsBreak)); return MSG_OK; } @Override protected ...
final PricingConditionsBreak pricingConditionsBreak = row.getPricingConditionsBreak(); final PricingConditionsBreakId updateFromPricingConditionsBreakId = row.getCopiedFromPricingConditionsBreakId(); return preparePricingConditionsBreakChangeRequest(pricingConditionsBreak) .pricingConditionsId(pricingCondition...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\process\PricingConditionsView_SaveEditableRow.java
1
请完成以下Java代码
public abstract class AbstractTransactionEvent implements MaterialEvent { private final EventDescriptor eventDescriptor; private final MaterialDescriptor materialDescriptor; @JsonInclude(NON_NULL) private final MinMaxDescriptor minMaxDescriptor; private final Map<Integer, BigDecimal> receiptScheduleIds2Qtys; ...
// note: they are not yet persisted this.inventoryId = inventoryId; this.inventoryLineId = inventoryLineId; this.directMovementWarehouse = directMovementWarehouse; } /** * Never return {@code null}. */ public abstract BigDecimal getQuantity(); /** * Never return {@code null}. */ public abstract Bi...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\transactions\AbstractTransactionEvent.java
1
请在Spring Boot框架中完成以下Java代码
public class Product { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; @Column(name = "name") private String name; @Column(name = "description") private String description; @Column(name = "price") private BigDecimal price; @CreationTimestamp private Date createdAt; @Creation...
} public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public BigDecimal getPrice() { return price; } public void setPrice(BigDecimal price) { this.price = price...
repos\Spring-Boot-Advanced-Projects-main\springboot-crud-hibernate-example\src\main\java\net\alanbinu\springboot\model\Product.java
2
请完成以下Java代码
public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets a map that contains attrib...
* the map is keyed by the name of the attribute and * the value is the string value of the attribute. * * the map returned by this method is live, and you can add new attribute * by updating the map directly. Because of this design, there's no setter. * * * @return * alwa...
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\EncryptionPropertyType.java
1
请完成以下Java代码
public Object invoke(MethodInvocation invocation) throws Throwable { return tryConsume(invocation, this::ack, (mac, e) -> { try { int retryCount = tryGetRetryCountOrFail(mac, e); sendToNextRetryQueue(mac, retryCount); } catch (Throwable t) { ...
MessageProperties props = mac.message.getMessageProperties(); String xRetriedCountHeader = (String) props.getHeader("x-retried-count"); final int xRetriedCount = xRetriedCountHeader == null ? 0 : Integer.valueOf(xRetriedCountHeader); if (retryQueues.retriesExhausted(xRetriedCount)) { ...
repos\tutorials-master\messaging-modules\spring-amqp\src\main\java\com\baeldung\springamqp\exponentialbackoff\RetryQueuesInterceptor.java
1
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .omitNullValues() .add("warningMessage", warningMessage) .addValue(list.isEmpty() ? null : list) .toString(); } public Stream<DeviceAccessor> stream() { return list.stream(); } public Stream<DeviceAccessor> stream(final Wareh...
} public DeviceAccessor getByIdOrNull(final DeviceId id) { return byId.get(id); } /** * Convenient (fluent) method to consume the warningMessage if any. */ public void consumeWarningMessageIfAny(final Consumer<String> warningMessageConsumer) { warningMessage.ifPresent(warningMessageConsumer); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\accessor\DeviceAccessorsList.java
1
请完成以下Java代码
protected List<ProcessInstance> obtainProcessInstances(CommandContext commandContext) { ProcessInstanceQueryImpl query = new ProcessInstanceQueryImpl(); if (processInstanceId != null) { query.processInstanceId(processInstanceId); } else if (processDefinitionId != null) { query.processDefinitionI...
} else if (processDefinitionKey != null) { builder.byProcessDefinitionKey(processDefinitionKey); if (isProcessDefinitionTenantIdSet && processDefinitionTenantId != null) { return builder.processDefinitionTenantId(processDefinitionTenantId); } else if (isProcessDefinitionTenantIdSet) { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\AbstractSetProcessInstanceStateCmd.java
1
请完成以下Java代码
public ChildElementCollectionBuilder<T> maxOccurs(int i) { collection.setMaxOccurs(i); return this; } public ChildElementCollectionBuilder<T> minOccurs(int i) { collection.setMinOccurs(i); return this; } public ChildElementCollection<T> build() { return collection; } public <V extends...
return builder; } public <V extends ModelElementInstance> ElementReferenceCollectionBuilder<V, T> uriElementReferenceCollection(Class<V> referenceTargetType) { ChildElementCollectionImpl<T> collection = (ChildElementCollectionImpl<T>) build(); ElementReferenceCollectionBuilder<V,T> builder = new UriElement...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\type\child\ChildElementCollectionBuilderImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class EdqsConfig { @Value("${queue.edqs.partitions:12}") private int partitions; @Value("${service.edqs.label:}") private String label; @Value("#{'${queue.edqs.partitioning_strategy:tenant}'.toUpperCase()}") private EdqsPartitioningStrategy partitioningStrategy; @Value("${queue.edqs...
private int maxRequestTimeout; @Value("${queue.edqs.request_executor_size:50}") private int requestExecutorSize; @Value("${queue.edqs.versions_cache_ttl:60}") private int versionsCacheTtl; public String getLabel() { if (partitioningStrategy == EdqsPartitioningStrategy.NONE) { la...
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\edqs\EdqsConfig.java
2
请完成以下Java代码
void setReadWrite(final boolean readWrite) { this._isReadWrite = readWrite; } public boolean isReadWrite() { return Boolean.TRUE.equals(_isReadWrite); } private void setIsSOTrx(final boolean isSOTrx) { this._isSOTrx = isSOTrx; } public boolean isSOTrx() { return _isSOTrx; } public int getAD_...
} public int getWinHeight() { return WinHeight; } public String getWindowType() { return WindowType; } private int getBaseTable_ID() { return _BaseTable_ID; } boolean isLoadAllLanguages() { return loadAllLanguages; } boolean isApplyRolePermissions() { return applyRolePermissions; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\GridWindowVO.java
1
请完成以下Java代码
public Integer getId() { return id; } /** * 设置 主键ID. * * @param id 主键ID. */ public void setId(Integer id) { this.id = id; } /** * 获取 角色ID. * * @return 角色ID. */ public Integer getRoleId() { return roleId; } /** * 设置 角...
} /** * 获取 创建时间. * * @return 创建时间. */ public Date getCreatedTime() { return createdTime; } /** * 设置 创建时间. * * @param createdTime 创建时间. */ public void setCreatedTime(Date createdTime) { this.createdTime = createdTime; } /** * 获取 ...
repos\SpringBootBucket-master\springboot-jwt\src\main\java\com\xncoding\jwt\dao\domain\RolePermission.java
1
请完成以下Java代码
private void proxy() { URI uri = exchange.getRequest().getURI(); appendForwarded(uri); appendXForwarded(uri); } private void appendXForwarded(URI uri) { // Append the legacy headers if they were already added upstream String host = headers.getFirst("x-forwarded-host"); if (host == null) { return; } ...
hasBody = true; // even if it's null return body; } /** * Search for the request body if it was already deserialized using * <code>@RequestBody</code>. If it is not found then deserialize it in the same way * that it would have been for a <code>@RequestBody</code>. * @return the request body */ private ...
repos\spring-cloud-gateway-main\spring-cloud-gateway-proxyexchange-webflux\src\main\java\org\springframework\cloud\gateway\webflux\ProxyExchange.java
1
请完成以下Java代码
public Properties getCtx() { return InterfaceWrapperHelper.getCtx(model); } @Override public int get_ID() { return InterfaceWrapperHelper.getId(model); } @Override public int get_Table_ID() { return InterfaceWrapperHelper.getModelTableId(model); } @Override public String get_TrxName() { return I...
InterfaceWrapperHelper.setTrxName(model, trxName); } @Override public boolean isActive() { return model.isActive(); } @Override public Object getModel() { return getDocumentModel(); } @Override public Object getDocumentModel() { return model; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\DocumentWrapper.java
1
请完成以下Java代码
public static InvoiceDocBaseType ofSOTrxAndCreditMemo(@NonNull final SOTrx soTrx, final boolean creditMemo) { if (soTrx.isSales()) { return !creditMemo ? CustomerInvoice : CustomerCreditMemo; } else // purchase { return !creditMemo ? VendorInvoice : VendorCreditMemo; } } public static InvoiceDocBa...
*/ public boolean isAP() {return isPurchase();} public boolean isCustomerInvoice() { return this == CustomerInvoice; } public boolean isCustomerCreditMemo() { return this == CustomerCreditMemo; } public boolean isVendorCreditMemo() { return this == VendorCreditMemo; } public boolean isIncomingCash(...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\InvoiceDocBaseType.java
1
请完成以下Java代码
private void onClose(JarFile jarFile) { this.cache.remove(jarFile); } void clearCache() { this.cache.clear(); } /** * Internal cache. */ private static final class Cache { private final Map<JarFileUrlKey, JarFile> jarFileUrlToJarFile = new HashMap<>(); private final Map<JarFile, URL> jarFileToJarFi...
* they were already there */ boolean putIfAbsent(URL jarFileUrl, JarFile jarFile) { JarFileUrlKey urlKey = new JarFileUrlKey(jarFileUrl); synchronized (this) { JarFile cached = this.jarFileUrlToJarFile.get(urlKey); if (cached == null) { this.jarFileUrlToJarFile.put(urlKey, jarFile); this.ja...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\net\protocol\jar\UrlJarFiles.java
1
请完成以下Java代码
protected boolean isQtyProjectedSet() { return _qtyProjectedSet; } protected BigDecimal getQtyProjected() { return _qtyProjected; } @Override public final IQualityInspectionLineBuilder setC_UOM(final I_C_UOM uom) { _uom = uom; _uomSet = true; return this; } protected final I_C_UOM getC_UOM() { ...
private IHandlingUnitsInfo getHandlingUnitsInfoToSet() { if (_handlingUnitsInfoSet) { return _handlingUnitsInfo; } return null; } @Override public IQualityInspectionLineBuilder setHandlingUnitsInfo(final IHandlingUnitsInfo handlingUnitsInfo) { _handlingUnitsInfo = handlingUnitsInfo; _handlingUnits...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\QualityInspectionLineBuilder.java
1
请完成以下Java代码
public void exportToFile(@NonNull final File file) { try (final FileOutputStream out = new FileOutputStream(file)) { export(out); } catch (final IOException ex) { throw new AdempiereException("Failed exporting to " + file, ex); } } @Value private static final class CellStyleKey { public static...
private final int column; private final int displayType; private final boolean functionRow; private CellStyleKey( final String type, final int column, final int displayType, final boolean functionRow) { this.type = type; this.column = column; this.displayType = displayType; this.fun...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\excel\AbstractExcelExporter.java
1
请完成以下Java代码
public void paymentDeclined(String transactionId, String cause) { log.info("[I116] Payment declined: transactionId={}, cause={}", transactionId, cause); Workflow.await(() -> payment != null); payment = new PaymentAuthorization( payment.info(), PaymentStatus.DECLINED, ...
} @Override public Shipping getShipping() { return shipping; } @Override public PaymentAuthorization getPayment() { return payment; } @Override public RefundRequest getRefund() { return refund; } }
repos\tutorials-master\saas-modules\temporal\src\main\java\com\baeldung\temporal\workflows\sboot\order\workflow\OrderWorkflowImpl.java
1
请完成以下Java代码
public List<List<Node>> getNode_() { return node_; } public void setNode_(List<List<Node>> node_) { this.node_ = node_; } public List<Integer> getAnswer_() { return answer_; } public void setAnswer_(List<Integer> answer_) { this.answer_ = answer...
InputStreamReader isr = new InputStreamReader(fis, "UTF-8"); BufferedReader br = new BufferedReader(isr); while (true) { ReadStatus status = tagger.read(br); if (ReadStatus.ERROR == status) { System.err.println("rea...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\crfpp\TaggerImpl.java
1
请在Spring Boot框架中完成以下Java代码
public BigInteger getNetDays() { return netDays; } /** * Sets the value of the netDays property. * * @param value * allowed object is * {@link BigInteger } * */ public void setNetDays(BigInteger value) { this.netDays = value; } /** ...
* */ public void setSinglevat(BigDecimal value) { this.singlevat = value; } /** * Gets the value of the taxfree property. * * @return * possible object is * {@link String } * */ public String getTaxfree() { return taxfree; }...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDICctop120VType.java
2
请在Spring Boot框架中完成以下Java代码
public class Saml2Authentication extends AbstractAuthenticationToken { @Serial private static final long serialVersionUID = 405897702378720477L; private final Object principal; private final String saml2Response; /** * Construct a {@link Saml2Authentication} using the provided parameters * @param principal...
@Override public Object getCredentials() { return getSaml2Response(); } abstract static class Builder<B extends Builder<B>> extends AbstractAuthenticationBuilder<B> { private Object principal; String saml2Response; Builder(Saml2Authentication token) { super(token); this.principal = token.principal;...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\authentication\Saml2Authentication.java
2
请完成以下Java代码
public CmmnEngineConfiguration setCleanInstancesEndedAfterNumberOfDays(int cleanInstancesEndedAfterNumberOfDays) { return setCleanInstancesEndedAfter(Duration.ofDays(cleanInstancesEndedAfterNumberOfDays)); } public Duration getCleanInstancesEndedAfter() { return cleanInstancesEndedAfter; } ...
public CaseDefinitionLocalizationManager getCaseDefinitionLocalizationManager() { return caseDefinitionLocalizationManager; } public CmmnEngineConfiguration setCaseDefinitionLocalizationManager(CaseDefinitionLocalizationManager caseDefinitionLocalizationManager) { this.caseDefinitionLocalizatio...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\CmmnEngineConfiguration.java
1
请完成以下Java代码
public void setOneConfigurationPerPI(final boolean oneConfigurationPerPI) { this.oneConfigurationPerPI = oneConfigurationPerPI; } @Override public boolean isOneConfigurationPerPI() { return oneConfigurationPerPI; } @Override public boolean isAllowDifferentCapacities() { return allowDifferentCapacities;...
@Override public boolean isAllowAnyPartner() { return allowAnyPartner; } @Override public void setAllowAnyPartner(final boolean allowAnyPartner) { this.allowAnyPartner = allowAnyPartner; } @Override public int getM_Product_Packaging_ID() { return packagingProductId; } @Override public void setM_P...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUPIItemProductQuery.java
1
请完成以下Java代码
protected void applyFilters(UserQuery query) { if (id != null) { query.userId(id); } if(idIn != null) { query.userIdIn(idIn); } if (firstName != null) { query.userFirstName(firstName); } if (firstNameLike != null) { query.userFirstNameLike(firstNameLike); } if...
} @Override protected void applySortBy(UserQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) { if (sortBy.equals(SORT_BY_USER_ID_VALUE)) { query.orderByUserId(); } else if (sortBy.equals(SORT_BY_USER_FIRSTNAME_VALUE)) { query.orderByUserFirstName(); } else if...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\identity\UserQueryDto.java
1
请完成以下Java代码
public void ifDescriptionChanged(ProjectDescription current, BiConsumer<String, String> consumer) { if (!Objects.equals(this.original.getDescription(), current.getDescription())) { consumer.accept(this.original.getDescription(), current.getDescription()); } } /** * Calls the specified consumer if the {@code...
consumer.accept(this.original.getPackageName(), current.getPackageName()); } } /** * Calls the specified consumer if the {@code baseDirectory} is different on the * original source project description than the specified project description. * @param current the description to test against * @param consumer...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\project\ProjectDescriptionDiff.java
1
请完成以下Java代码
public class UserEvent implements Serializable { private final String userId; private final String eventType; private final long timestamp; private final Address address; public UserEvent(String userId, String eventType, long timestamp, Address address) { this.userId = userId; this....
return timestamp; } public Address getAddress() { return address; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof UserEvent)) return false; UserEvent userEvent = (UserEvent) o; return timestamp == userEvent.timest...
repos\tutorials-master\libraries-data-io-2\src\main\java\com\baeldung\apachefury\event\UserEvent.java
1
请完成以下Java代码
public class NonAlphaNumericChecker { /** * Checks for non-alphanumeric characters in any Unicode Script * @param str - String to check for special characters * @return true if special character found else false */ public static boolean isNonAlphanumericAnyLangScript(String str) { fo...
*/ public static boolean isNonAlphanumericInLangScript(String str, String script) { for (int i = 0; i < str.length(); i++) { char c = str.charAt(i); // script e.g., Character.UnicodeScript.of(c).toString().equalsIgnoreCase(Character.UnicodeScript.LATIN.toString()) if (!Ch...
repos\tutorials-master\core-java-modules\core-java-string-operations-6\src\main\java\com\baeldung\nonalphanumeric\NonAlphaNumericChecker.java
1
请完成以下Java代码
public String getAmtInWords (String amount) throws Exception { if (amount == null) return amount; // int numberOfCommas = 0; int numberOfPeriods = 0; StringBuffer sb = new StringBuffer (); int period = amount.lastIndexOf ('.'); numberOfPeriods = amount.replaceAll("[^\\.]","").length(); int comma = ...
} return sb.toString ().replaceAll(" ", " ").replaceAll("linh nghìn", "nghìn").replaceAll("linh triệu","triệu").replaceAll("linh tỉ","tỉ"); } // getAmtInWords /** * Test Print * @param amt amount */ private void print (String amt) { try { System.out.println(amt + " = " + getAmtInWords(amt)); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\AmtInWords_VI.java
1
请完成以下Java代码
final class DelimitedStringToArrayConverter implements ConditionalGenericConverter { private final ConversionService conversionService; DelimitedStringToArrayConverter(ConversionService conversionService) { Assert.notNull(conversionService, "'conversionService' must not be null"); this.conversionService = conve...
Delimiter delimiter = targetType.getAnnotation(Delimiter.class); String[] elements = getElements(source, (delimiter != null) ? delimiter.value() : ","); TypeDescriptor elementDescriptor = targetType.getElementTypeDescriptor(); Assert.state(elementDescriptor != null, "elementDescriptor is missing"); Object targe...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\convert\DelimitedStringToArrayConverter.java
1
请在Spring Boot框架中完成以下Java代码
public Injector<TransactionManager> getTransactionManagerInjector() { return transactionManagerInjector; } public Injector<DataSourceReferenceFactoryService> getDatasourceBinderServiceInjector() { return datasourceBinderServiceInjector; } public InjectedValue<MscRuntimeContainerJobExecutor> getMscRunt...
.setInitialMode(Mode.ACTIVE); if(processEngineConfiguration.isDefault()) { serviceBuilder.addAliases(ServiceNames.forDefaultProcessEngine()); } JBossCompatibilityExtension.addServerExecutorDependency(serviceBuilder, service.getExecutorInjector(), false); } public ProcessEngine getProcessEngine...
repos\camunda-bpm-platform-master\distro\wildfly26\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\MscManagedProcessEngineController.java
2
请完成以下Java代码
private void consolidate_FromLUs_ToNewLU(@NonNull final List<I_M_HU> fromLUs, @NonNull final HuPackingInstructionsId luPackingInstructionsId) { throw new UnsupportedOperationException(); // TODO } @SuppressWarnings("unused") private void consolidate_FromLUs_ToExistingLU(@NonNull final List<I_M_HU> fromLUs, @NonN...
final I_M_HU lu = huTransformService.tuToNewLU(firstTU, QtyTU.ONE, luPackingInstructionsId) .getSingleLURecord(); if (fromTUs.size() > 1) { final List<I_M_HU> remainingTUs = fromTUs.subList(1, fromTUs.size()); huTransformService.tusToExistingLU(remainingTUs, lu); } final HuId luId = HuId.ofRepoId(lu...
repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\job\commands\consolidate\ConsolidateCommand.java
1
请在Spring Boot框架中完成以下Java代码
ProblemDetail handleError(HttpServletRequest request, Throwable error, HttpStatus status, String reason) { String requestURI = request.getRequestURI(); StringBuffer requestURL = request.getRequestURL(); if (requestURL != null) { requestURI = requestURL.toString(); } ...
pd.setProperty("reason", reason); pd.setProperty("series", status.series()); pd.setProperty("rootCause", ExceptionUtils.getRootCause(error).toString()); pd.setProperty("trace", getTraceParent()); return pd; } String getTraceParent() { Span span = tracer.currentSpan(); ...
repos\spring-boot-web-application-sample-master\common\src\main\java\gt\common\config\CommonExceptionHandler.java
2
请在Spring Boot框架中完成以下Java代码
public class BPartnerId implements RepoIdAware { public final static BPartnerId NONE = BPartnerId.ofRepoId(Integer.MAX_VALUE); int repoId; public static BPartnerId ofRepoId(final int repoId) { return new BPartnerId(repoId); } @Nullable public static BPartnerId ofRepoIdOrNull(@Nullable final Integer repoId)...
return RepoIdAwares.ofObject(object, BPartnerId.class, BPartnerId::ofRepoId); } public static int toRepoId(@Nullable final BPartnerId bpartnerId) { return toRepoIdOr(bpartnerId, -1); } public static int toRepoIdOr(@Nullable final BPartnerId bpartnerId, final int defaultValue) { return bpartnerId != null ? b...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\BPartnerId.java
2
请完成以下Java代码
public HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceStartTime() { orderBy(HistoricActivityInstanceQueryProperty.START); return this; } @Override public HistoricActivityInstanceQuery orderByActivityId() { orderBy(HistoricActivityInstanceQueryProperty.ACTIVITY_ID);...
return processInstanceId; } public String getExecutionId() { return executionId; } public String getProcessDefinitionId() { return processDefinitionId; } public String getActivityId() { return activityId; } public String getActivityName() { return acti...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\HistoricActivityInstanceQueryImpl.java
1
请完成以下Java代码
public static final UnlockFailedException wrapIfNeeded(final Exception e) { if (e instanceof UnlockFailedException) { return (UnlockFailedException)e; } else { return new UnlockFailedException("Unlock failed: " + e.getLocalizedMessage(), e); } } public UnlockFailedException(String message) { su...
super.setSql(sql, sqlParams); return this; } public UnlockFailedException setRecordToLock(final TableRecordReference recordToLock) { super.setRecord(recordToLock); return this; } @Override public UnlockFailedException setParameter(@NonNull String name, Object value) { super.setParameter(name, value); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\exceptions\UnlockFailedException.java
1
请在Spring Boot框架中完成以下Java代码
public class BulkMoveDeadLetterJobsToHistoryJobsCmd implements Command<Void> { private static final Logger LOGGER = LoggerFactory.getLogger(BulkMoveDeadLetterJobsToHistoryJobsCmd.class); protected JobServiceConfiguration jobServiceConfiguration; protected Collection<String> deadLetterJobIds; protecte...
if (deadLetterJobIds == null) { throw new FlowableIllegalArgumentException("deadLetterJobIds are null"); } DeadLetterJobQueryImpl query = new DeadLetterJobQueryImpl(commandContext, jobServiceConfiguration); query.jobIds(deadLetterJobIds); List<Job> deadLetterJobs = jobService...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\cmd\BulkMoveDeadLetterJobsToHistoryJobsCmd.java
2
请在Spring Boot框架中完成以下Java代码
public BigDecimal getPlatIncome() { return platIncome; } public void setPlatIncome(BigDecimal platIncome) { this.platIncome = platIncome; } public BigDecimal getFeeRate() { return feeRate; } public void setFeeRate(BigDecimal feeRate) { this.feeRate = feeRate; } public BigDecimal getPlatCost() { re...
} public void setPaySuccessTime(Date paySuccessTime) { this.paySuccessTime = paySuccessTime; } public Date getCompleteTime() { return completeTime; } public void setCompleteTime(Date completeTime) { this.completeTime = completeTime; } public String getIsRefund() { return isRefund; } public void se...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckMistakeScratchPool.java
2
请完成以下Java代码
public TimerEntity createTimer(ExecutionEntity execution) { TimerEntity timer = super.createJobInstance(execution); scheduleTimer(timer); return timer; } protected void scheduleTimer(TimerEntity timer) { Context .getCommandContext() .getJobManager() .schedule(timer); } protec...
/** * @return all timeout listeners declared in the given scope */ public static Map<String, Map<String, TimerDeclarationImpl>> getTimeoutListenerDeclarationsForScope(PvmScope scope) { if (scope == null) { return Collections.emptyMap(); } Map<String, Map<String, TimerDeclarationImpl>> result ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\TimerDeclarationImpl.java
1
请完成以下Java代码
protected boolean tryAcquire(int arg) { // 获取锁有竞争所以需要使用CAS原子操作 if (compareAndSetState(0, 1)) { setExclusiveOwnerThread(Thread.currentThread()); return true; } return false; } @Override protected boolean tryRelease(i...
sync.release(0); } @Override public Condition newCondition() { return sync.newCondition(); } public static void main(String[] args) { MutexLock lock = new MutexLock(); final User user = new User(); for (int i = 0; i < 100; i++) { new Thread(() -> { ...
repos\spring-boot-student-master\spring-boot-student-concurrent\src\main\java\com\xiaolyuh\MutexLock.java
1
请完成以下Java代码
public String login() { return "login"; } @lombok.Data @lombok.Builder public static class Settings { private final String title; private final String brand; private final String loginIcon; private final String favicon; private final String faviconDanger; private final PollTimer pollTimer; p...
/** * Should the page shown as an iframe or open in a new window. */ private final boolean iframe; /** * A list of child views. */ private final List<ExternalView> children; public ExternalView(String label, String url, Integer order, boolean iframe, List<ExternalView> children) { Assert.hasTex...
repos\spring-boot-admin-master\spring-boot-admin-server-ui\src\main\java\de\codecentric\boot\admin\server\ui\web\UiController.java
1
请完成以下Java代码
public Builder setIsSOTrx(final boolean isSOTrx) { this.isSOTrx = isSOTrx; return this; } public boolean isSOTrx() { return isSOTrx; } public BPartnerId getBPartnerId() { return bpartnerId; } public Builder setBPartnerId(final BPartnerId bpartnerId) { this.bpartnerId = bpartnerId; ...
} public Builder setOpenAmt(final BigDecimal openAmt) { this._openAmt = openAmt; return this; } public BigDecimal getPayAmt() { final BigDecimal openAmt = getOpenAmt(); final BigDecimal discountAmt = getDiscountAmt(); return openAmt.subtract(discountAmt); } public BigDecimal getDiscountA...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\impl\PaySelectionLineCandidate.java
1
请完成以下Java代码
public class SerializableCloneableSingleton implements SingletonInterface, Serializable, Cloneable { private static final long serialVersionUID = -1917003064592196223L; private int state; private SerializableCloneableSingleton() { } private static class SingletonHolder { public static fi...
this.state++; } public int getState() { return state; } private Object readResolve() throws ObjectStreamException { return SingletonHolder.instance; } public Object cloneObject() throws CloneNotSupportedException { return this.clone(); } }
repos\tutorials-master\core-java-modules\core-java-lang-oop-modifiers-2\src\main\java\com\baeldung\staticsingletondifference\SerializableCloneableSingleton.java
1
请完成以下Java代码
public CsrfProperties getCsrf() { return csrf; } public void setCsrf(CsrfProperties csrf) { this.csrf = csrf; } public SessionCookieProperties getSessionCookie() { return sessionCookie; } public void setSessionCookie(SessionCookieProperties sessionCookie) { this.sessionCookie = sessio...
return auth; } public void setAuth(AuthenticationProperties authentication) { this.auth = authentication; } @Override public String toString() { return joinOn(this.getClass()) .add("indexRedirectEnabled=" + indexRedirectEnabled) .add("webjarClasspath='" + webjarClasspath + '\'') .a...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\WebappProperty.java
1
请完成以下Java代码
public String getProcessInstanceBusinessKeyLike() { return processInstanceBusinessKeyLike; } public Date getDueDate() { return dueDate; } public Date getDueBefore() { return dueBefore; } public Date getDueAfter() { return dueAfter; } public boolean isW...
public String getNameLikeIgnoreCase() { return nameLikeIgnoreCase; } public String getDescriptionLikeIgnoreCase() { return descriptionLikeIgnoreCase; } public String getAssigneeLikeIgnoreCase() { return assigneeLikeIgnoreCase; } public String getOwnerLikeIgnoreCase() {...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\TaskQueryImpl.java
1
请完成以下Java代码
public Date getCreationDate() { return creationDate; } public String getCandidateUser() { return candidateUser; } public String getCandidateGroup() { return candidateGroup; } public String getInvolvedUser() { return involvedUser; } public List<String> ...
public String getTaskNameLikeIgnoreCase() { return taskNameLikeIgnoreCase; } public String getTaskDescriptionLikeIgnoreCase() { return taskDescriptionLikeIgnoreCase; } public String getTaskOwnerLikeIgnoreCase() { return taskOwnerLikeIgnoreCase; } public String getTaskA...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\HistoricTaskInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class CourseResource { private final CourseJpaRepository courseRepository; public CourseResource(CourseJpaRepository courseRepository) { this.courseRepository = courseRepository; } @GetMapping public List<Course> getAllCourses(@PathVariable String username) { return courseR...
@PutMapping("/{id}") public ResponseEntity<Course> updateCourse(@PathVariable String username, @PathVariable long id, @RequestBody Course course) { course.setUsername(username); var updatedCourse = courseRe...
repos\spring-boot-examples-master\spring-boot-react-examples\spring-boot-react-jpa-hibernate-with-h2-full-stack\backend-spring-boot-react-jpa-hibernate-with-h2-full-stack\src\main\java\com\in28minutes\fullstack\springboot\jpa\hibernate\springbootjpahibernatewithh2fullstack\course\CourseResource.java
2
请完成以下Java代码
public Class<? extends EventLogEntryEntity> getManagedEntityClass() { return EventLogEntryEntityImpl.class; } @Override public EventLogEntryEntity create() { return new EventLogEntryEntityImpl(); } @Override @SuppressWarnings("unchecked") public List<EventLogEntry> findAllE...
params.put("startLogNr", startLogNr); if (pageSize > 0) { params.put("endLogNr", startLogNr + pageSize + 1); } return getDbSqlSession().selectList("selectEventLogEntries", params); } @Override @SuppressWarnings("unchecked") public List<EventLogEntry> findEventLogEntr...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisEventLogEntryDataManager.java
1
请完成以下Java代码
private boolean isInvalidType(MethodParameter parameter, @Nullable Object value) { if (value == null) { return false; } Class<?> typeToCheck = parameter.getParameterType(); boolean isParameterPublisher = Publisher.class.isAssignableFrom(parameter.getParameterType()); if (isParameterPublisher) { Resolvab...
/** * Obtains the specified {@link Annotation} on the specified {@link MethodParameter}. * @param parameter the {@link MethodParameter} to search for an {@link Annotation} * @return the {@link Annotation} that was found or null. */ private @Nullable CurrentSecurityContext findMethodAnnotation(MethodParameter p...
repos\spring-security-main\messaging\src\main\java\org\springframework\security\messaging\handler\invocation\reactive\CurrentSecurityContextArgumentResolver.java
1
请完成以下Java代码
public static MSLACriteria get (Properties ctx, int PA_SLA_Criteria_ID, String trxName) { Integer key = new Integer (PA_SLA_Criteria_ID); MSLACriteria retValue = (MSLACriteria) s_cache.get (key); if (retValue != null) return retValue; retValue = new MSLACriteria (ctx, PA_SLA_Criteria_ID, trxName); if (ret...
{ pstmt = null; } MSLAGoal[] retValue = new MSLAGoal[list.size ()]; list.toArray (retValue); return retValue; } // getGoals /** * Create New Instance of SLA Criteria * @return instanciated class * @throws Exception */ public SLACriteria newSLACriteriaInstance() throws Exception { if (getCl...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MSLACriteria.java
1
请在Spring Boot框架中完成以下Java代码
private PathPatternRequestMatcher.Builder constructRequestMatcherBuilder(ApplicationContext context) { PathPatternRequestMatcherBuilderFactoryBean requestMatcherBuilder = new PathPatternRequestMatcherBuilderFactoryBean(); requestMatcherBuilder.setApplicationContext(context); requestMatcherBuilder.setBeanFactory(c...
} /** * <p> * Match when the {@link HttpMethod} is {@code method} * </p> * <p> * If a specific {@link RequestMatcher} must be specified, use * {@link #requestMatchers(RequestMatcher...)} instead * </p> * @param method the {@link HttpMethod} to use or {@code null} for any * {@link HttpMethod}. * @r...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\AbstractRequestMatcherRegistry.java
2
请在Spring Boot框架中完成以下Java代码
public @Nullable String getApplicationKey() { return this.applicationKey; } public void setApplicationKey(@Nullable String applicationKey) { this.applicationKey = applicationKey; } public boolean isDescriptions() { return this.descriptions; } public void setDescriptions(boolean descriptions) { this.des...
return this.hostTag; } public void setHostTag(String hostTag) { this.hostTag = hostTag; } public String getUri() { return this.uri; } public void setUri(String uri) { this.uri = uri; } }
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\datadog\DatadogProperties.java
2
请完成以下Java代码
public void setIsManual (boolean IsManual) { set_Value (COLUMNNAME_IsManual, Boolean.valueOf(IsManual)); } /** Get Manuell. @return This is a manual process */ @Override public boolean isManual () { Object oo = get_Value(COLUMNNAME_IsManual); if (oo != null) { if (oo instanceof Boolean) { ...
public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Verarbeiten. @return Verarbeiten */ @Override public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_AllocationHdr.java
1
请完成以下Java代码
class ContextForAsyncProcessing { @Nullable PInstanceId adPInstanceId; @Default int parentAsyncBatchId = -1; } /** * Creates an instructions record for the given print job. * * @param userToPrintId the user for whom we shall actually do the printing. Note that if this user's printing config forwards ...
* @param copies number of copies to print (1 means one printout). */ I_C_Print_Job_Instructions createPrintJobInstructions( UserId userToPrintId, boolean createWithSpecificHostKey, I_C_Print_Job_Line firstLine, I_C_Print_Job_Line lastLine, int copies); String getSummary(I_C_Print_Job printJob); Li...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\api\IPrintJobBL.java
1
请完成以下Java代码
private static Language extractLanguage(final ProcessInfo pi) { // // Get Language from ProcessInfo, if any (08023) Language lang = pi.getReportLanguage(); if (lang != null) { return lang; } // task 09740 // In case the report is not linked to a window but it has C_BPartner_ID as parameter and it i...
// Get Organization Language if any (03040) if (null == lang) { lang = Services.get(ILanguageBL.class).getOrgLanguage(pi.getCtx(), pi.getAD_Org_ID()); } // If we got an Language already, return it if (null != lang) { return lang; } // // Fallback: get it from client context return Env.getLan...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\de.metas.report.jasper.client\src\main\java\de\metas\report\client\ReportsClient.java
1
请在Spring Boot框架中完成以下Java代码
public String getActivityFontName() { return activityFontName; } public void setActivityFontName(String activityFontName) { this.activityFontName = activityFontName; } public String getLabelFontName() { return labelFontName; } public void setLabelFontName(String labelFontName) { this.labelFontName = la...
public String getHistoryCleaningCycle() { return historyCleaningCycle; } public void setHistoryCleaningCycle(String historyCleaningCycle) { this.historyCleaningCycle = historyCleaningCycle; } @Deprecated @DeprecatedConfigurationProperty(replacement = "flowable.history-cleaning-after"...
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\FlowableProperties.java
2
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getPassword() { return password; } public void setPassword(String password) { t...
public void setNickname(String nickname) { this.nickname = nickname; } public String getRegTime() { return regTime; } public void setRegTime(String regTime) { this.regTime = regTime; } @Override public String toString() { return ToStringBuilder.reflectionToString(this); } }
repos\spring-boot-leaning-master\1.x\第09课:如何玩转 Redis\spring-boot-redis\src\main\java\com\neo\domain\User.java
1
请完成以下Java代码
public ObjectId getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSurname() { return surname; } public void setSurname(String surname) { this.surname = surnam...
this.age = age; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User book = (User) o; return Objects.equals(id, book.id); } @Override public int hashCode...
repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb\src\main\java\com\baeldung\multipledb\model\User.java
1
请在Spring Boot框架中完成以下Java代码
public CmmnDeploymentBuilder addCmmnModel(String resourceName, CmmnModel cmmnModel) { // TODO return null; } @Override public CmmnDeploymentBuilder name(String name) { deployment.setName(name); return this; } @Override public CmmnDeploymentBuilder category(Strin...
@Override public CmmnDeploymentBuilder parentDeploymentId(String parentDeploymentId) { deployment.setParentDeploymentId(parentDeploymentId); return this; } @Override public CmmnDeploymentBuilder enableDuplicateFiltering() { this.isDuplicateFilterEnabled = true; retur...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\repository\CmmnDeploymentBuilderImpl.java
2
请完成以下Java代码
public static ImmutableList<HURow> getHURowsFromIncludedRows(final PPOrderLinesView view) { return view.streamByIds(DocumentIdsSelection.ALL) .filter(row -> row.getType().isMainProduct() || row.isReceipt()) .flatMap(row -> row.getIncludedRows().stream()) .map(row -> toHURowOrNull(row)) .filter(Object...
public static void pickHU(@NonNull final PickRequest request) { pickingCandidateService.pickHU(request); } public static void processHUs(@NonNull final ProcessPickingRequest request) { pickingCandidateService.processForHUIds(request.getHuIds(), request.getShipmentScheduleId(), OnOverDe...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\util\WEBUI_PP_Order_ProcessHelper.java
1
请完成以下Java代码
public void setHelp (String Help) { set_Value (COLUMNNAME_Help, Help); } /** Get Comment/Help. @return Comment or Hint */ public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** Set RMA Type. @param M_RMAType_ID Return Material Authorization Type */ public void setM_RMATy...
/** Set Name. @param Name Alphanumeric identifier of the entity */ 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); } /** Get Record...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_RMAType.java
1
请在Spring Boot框架中完成以下Java代码
public class Post { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int id; @NotNull @Size(min = 10) @Column(columnDefinition = "longtext") private String post; @NotNull @Size(min = 5, max = 100) @Column(unique = true) private String title; @NotNull @ManyToOne(targetEntity = ...
public void setAuthor(User author) { this.author = author; } public Date getCreatedAt() { return createdAt; } public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } public Date getUpdatedAt() { return updatedAt; } public void setUpdat...
repos\tutorials-master\web-modules\vraptor\src\main\java\com\baeldung\models\Post.java
2
请完成以下Java代码
public void cleanTemplate(Integer ID) { cleanTemplate("" + ID); } /** * Clean Template cache for this ID * @param ID ID of template to clean */ public void cleanTemplate(String ID) { runURLRequest("Template", ID); } /** * Empty all Template Caches */ public void emptyTemplate() { runURLRequest...
* @param ID for container element to clean */ public void cleanContainerElement(String ID) { runURLRequest("ContainerElement", ID); } private void runURLRequest(String cache, String ID) { String thisURL = null; for(int i=0; i<cacheURLs.length; i++) { try { thisURL = "http://" + cacheURLs[i] + "/cach...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\cm\CacheHandler.java
1
请在Spring Boot框架中完成以下Java代码
public class SocialTokenGranter implements ITokenGranter { public static final String GRANT_TYPE = "social"; private static final Integer AUTH_SUCCESS_CODE = 2000; private final IUserClient userClient; private final SocialProperties socialProperties; @Override public UserInfo grant(TokenParameter tokenParamet...
if (authResponse.getCode() == AUTH_SUCCESS_CODE) { authUser = (AuthUser) authResponse.getData(); } else { throw new ServiceException("social grant failure, auth response is not success"); } // 组装数据 UserOauth userOauth = Objects.requireNonNull(BeanUtil.copyProperties(authUser, UserOauth.class)); userOau...
repos\SpringBlade-master\blade-auth\src\main\java\org\springblade\auth\granter\SocialTokenGranter.java
2
请在Spring Boot框架中完成以下Java代码
public class Repository { private String name; private URL url; private boolean releasesEnabled = true; private boolean snapshotsEnabled; public Repository() { } public Repository(String name, URL url) { this(name, url, true, false); } public Repository(String name, URL url, boolean releasesEnabled, b...
return false; } if (this.snapshotsEnabled != other.snapshotsEnabled) { return false; } if (this.url == null) { if (other.url != null) { return false; } } else if (!this.url.equals(other.url)) { return false; } return true; } @Override public int hashCode() { final int prime = 31; ...
repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\Repository.java
2
请完成以下Java代码
public void addDecompressor(String contentEncoding, MessagePostProcessor decompressor) { this.decompressors.put(contentEncoding, decompressor); } /** * Remove the decompressor for this encoding; content will not be decompressed even if the * {@link org.springframework.amqp.core.MessageProperties#SPRING_AUTO_DE...
if (encoding == null) { return message; } int delimAt = encoding.indexOf(':'); if (delimAt < 0) { delimAt = encoding.indexOf(','); } if (delimAt > 0) { encoding = encoding.substring(0, delimAt); } MessagePostProcessor decompressor = this.decompressors.get(encoding); if (decompressor != null) {...
repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\support\postprocessor\DelegatingDecompressingPostProcessor.java
1
请完成以下Java代码
public ResourceOptionsDto availableOperations(UriInfo context) { ResourceOptionsDto dto = new ResourceOptionsDto(); URI uri = context.getBaseUriBuilder() .path(relativeRootResourcePath) .path(AuthorizationRestService.PATH) .path(resourceId) .build(); dto.addReflexiveLink(u...
// utils ////////////////////////////////////////////////// protected Authorization getDbAuthorization() { Authorization dbAuthorization = authorizationService.createAuthorizationQuery() .authorizationId(resourceId) .singleResult(); if (dbAuthorization == null) { throw new InvalidRequestEx...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\authorization\impl\AuthorizationResourceImpl.java
1
请完成以下Java代码
public void setGL_Budget_ID (int GL_Budget_ID) { if (GL_Budget_ID < 1) set_Value (COLUMNNAME_GL_Budget_ID, null); else set_Value (COLUMNNAME_GL_Budget_ID, Integer.valueOf(GL_Budget_ID)); } /** Get Budget. @return General Ledger Budget */ public int getGL_Budget_ID () { Integer ii = (Integer)ge...
public boolean isBeforeApproval () { Object oo = get_Value(COLUMNNAME_IsBeforeApproval); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Name. @param Name Alphanumeric identifier of the entity */ pu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_GL_BudgetControl.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); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNam...
} /** Get Details. @return Details */ public String getTextDetails () { return (String)get_Value(COLUMNNAME_TextDetails); } /** Set Text Message. @param TextMsg Text Message */ public void setTextMsg (String TextMsg) { set_Value (COLUMNNAME_TextMsg, TextMsg); } /** Get Text Message. @retu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_Topic.java
1
请完成以下Java代码
public void onChangeCountryName(final I_C_Country country) { setCountryAttributeName(country); } @ModelChange(timings = ModelValidator.TYPE_BEFORE_DELETE) public void onDeleteCountry(final I_C_Country country) { setCountryAttributeAsActive(country, false); } private void setCountryAttributeAsActive(final I...
{ AddressDisplaySequence.ofNullable(country.getDisplaySequence()).assertValid(); AddressDisplaySequence.ofNullable(country.getDisplaySequenceLocal()).assertValid(); } private void setCountryAttributeName(@NonNull final I_C_Country country) { final AttributeListValue existingAttributeValue = getAttributeValue(...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\location\interceptor\C_Country.java
1
请完成以下Java代码
public void mouseReleased(final MouseEvent e) { } /** * Set Title * * @param title title */ @Override public void setTitle(String title) { if (title != null) { final int pos = title.indexOf('&'); if (pos != -1 && title.length() > pos) // We have a nemonic { final int mnemonic = title.toU...
/** * Action Listener * * @param e event */ @Override public void actionPerformed(final ActionEvent e) { if (ACTION_DISPOSE.equals(e.getActionCommand())) { Object source = e.getSource(); while (source != null) { if (source instanceof Window) { ((Window)source).dispose...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CDialog.java
1
请完成以下Java代码
public T handleResponse(ClassicHttpResponse response) throws IOException { final StatusLine statusLine = new StatusLine(response); final HttpEntity entity = response.getEntity(); if (statusLine.getStatusCode() >= 300) { try { RestException engineException = deserializeRespo...
} catch (IOException e) { throw LOG.exceptionWhileDeserializingJsonObject(responseClass, e); } finally { IoUtil.closeSilently(inputStream); } } protected ByteArrayEntity serializeRequest(RequestDto dto) { byte[] serializedRequest; try { serializedRequest = objectMapper.writeVa...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\impl\RequestExecutor.java
1
请完成以下Java代码
private static boolean isServletApplication() { for (String servletIndicatorClass : SERVLET_INDICATOR_CLASSES) { if (!ClassUtils.isPresent(servletIndicatorClass, null)) { return false; } } return true; } static class WebApplicationTypeRuntimeHints implements RuntimeHintsRegistrar { @Override pub...
} /** * Strategy that may be implemented by a module that can deduce the * {@link WebApplicationType}. * * @since 4.0.1 */ @FunctionalInterface public interface Deducer { /** * Deduce the web application type. * @return the deduced web application type or {@code null} */ @Nullable WebApplica...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\WebApplicationType.java
1
请在Spring Boot框架中完成以下Java代码
public class EDICctop000VType { @XmlElement(name = "C_BPartner_Location_ID") protected BigInteger cbPartnerLocationID; @XmlElement(name = "EDI_cctop_000_v_ID") protected BigInteger ediCctop000VID; @XmlElement(name = "GLN") protected String gln; /** * Gets the value of the cbPartnerLoc...
* @param value * allowed object is * {@link BigInteger } * */ public void setEDICctop000VID(BigInteger value) { this.ediCctop000VID = value; } /** * Gets the value of the gln property. * * @return * possible object is * {@link Strin...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDICctop000VType.java
2
请在Spring Boot框架中完成以下Java代码
public class VersioningPersonController { @GetMapping("/v1/person") public PersonV1 getFirstVersionOfPerson() { return new PersonV1("Bob Charlie"); } @GetMapping("/v2/person") public PersonV2 getSecondVersionOfPerson() { return new PersonV2(new Name("Bob", "Charlie")); } @GetMapping(path = "/person", para...
public PersonV1 getFirstVersionOfPersonRequestHeader() { return new PersonV1("Bob Charlie"); } @GetMapping(path = "/person/header", headers = "X-API-VERSION=2") public PersonV2 getSecondVersionOfPersonRequestHeader() { return new PersonV2(new Name("Bob", "Charlie")); } @GetMapping(path = "/person/accept", pr...
repos\master-spring-and-spring-boot-main\12-rest-api\src\main\java\com\in28minutes\rest\webservices\restfulwebservices\versioning\VersioningPersonController.java
2
请完成以下Java代码
public class HMMSegment extends CharacterBasedSegment { CharacterBasedGenerativeModel model; public HMMSegment() { this(HanLP.Config.HMMSegmentModelPath); } public HMMSegment(String modelPath) { model = GlobalObjectPool.get(modelPath); if (model != null) return; ...
if (i == tag.length) { break; } } if (i == tag.length) { termList.add(new Term(new String(sentence, begin, offset - begin), null)); } ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\HMM\HMMSegment.java
1
请完成以下Java代码
public void setEnvironment(Environment environment) { if (environment instanceof ConfigurableEnvironment) { this.environment = (ConfigurableEnvironment) environment; } } protected Map<String, Object> resolveBeanMetadata(final Object bean) { final Map<String, Object> beanMet...
} protected Map<String, ServiceBean> getServiceBeansMap() { return beansOfTypeIncludingAncestors(applicationContext, ServiceBean.class); } protected ReferenceAnnotationBeanPostProcessor getReferenceAnnotationBeanPostProcessor() { return applicationContext.getBean(BEAN_NAME, ReferenceAnnota...
repos\dubbo-spring-boot-project-master\dubbo-spring-boot-compatible\actuator\src\main\java\org\apache\dubbo\spring\boot\actuate\endpoint\metadata\AbstractDubboMetadata.java
1
请完成以下Java代码
private static Options createOptions() { final Options options = new Options(); // Help { final Option option = new Option("h", "Print this (h)elp message and exit"); option.setArgs(0); option.setArgName("Help"); option.setRequired(false); options.addOption(option); } { final Option option...
option.setRequired(false); options.addOption(option); } { final Option option = new Option("rabbitPassword", ""); option.setArgs(1); option.setArgName("RabbitMQ password"); option.setRequired(false); options.addOption(option); } return options; } @Builder @Value @ToString(exclude = { "db...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\CommandLineParser.java
1
请完成以下Java代码
public int getResultSetType() { return m_resultSetType; } /** * @return transaction name */ public String getTrxName() { return m_trxName; } public final void clearDebugSqlParams() { this.debugSqlParams = null; } public final void setDebugSqlParam(final int parameterIndex, final Object parameterV...
{ debugSqlParams = new TreeMap<>(); } debugSqlParams.put(parameterIndex, parameterValue); } public final Map<Integer, Object> getDebugSqlParams() { final Map<Integer, Object> debugSqlParams = this.debugSqlParams; return debugSqlParams == null ? ImmutableMap.of() : debugSqlParams; } public final Map<In...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\CStatementVO.java
1
请完成以下Java代码
public void setHUIterator(final IHUIterator iterator) { delegate.setHUIterator(iterator); } protected IHUIterator getHUIterator() { if (delegate instanceof HUIteratorListenerAdapter) { return ((HUIteratorListenerAdapter)delegate).getHUIterator(); } else { throw new AdempiereException("Cannot get ...
return delegate.beforeHUItem(item); } @Override public Result afterHUItem(final I_M_HU_Item item) { return delegate.afterHUItem(item); } @Override public Result beforeHUItemStorage(final IMutable<IHUItemStorage> itemStorage) { return delegate.beforeHUItemStorage(itemStorage); } @Override public Result...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\HUIteratorListenerDelegateAdapter.java
1
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { retu...
public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } @Override public String toString() { return new StringBuffer().append(getEmail()).to...
repos\tutorials-master\web-modules\spark-java\src\main\java\com\baeldung\sparkjava\User.java
1
请完成以下Java代码
private void processPartitions(List<Object> values) { String key = values.get(0) + "|" + values.get(1) + "|" + values.get(2) + "|" + values.get(3); partitions.add(key); } private void processBlock(LineIterator iterator, CQLSSTableWriter writer, File outDir, Function<List<String>, List<Object>> ...
List<Object> numeric = Lists.newArrayList(); numeric.addAll(values); numeric.set(6, null); numeric.set(8, casted); castedOk++; return numeric; } } catch (Throwable th) { castErrors++; } proce...
repos\thingsboard-master\tools\src\main\java\org\thingsboard\client\tools\migrator\PgCaMigrator.java
1
请完成以下Java代码
public void setMaxVolume(final BigDecimal MaxVolume) { set_Value(COLUMNNAME_MaxVolume, MaxVolume); } @Override public BigDecimal getMaxVolume() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_MaxVolume); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setMaxWeight(final BigDec...
set_Value(COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setName(final java.lang.String Name) { set_Value(COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_Va...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PackagingContainer.java
1
请完成以下Java代码
public String getAuthToken() { return authToken; } public void setAuthToken(String authToken) { this.authToken = authToken; } public String getMessagingSid() { return messagingSid; } public void setMessagingSid(String messagingSid) { this.messagingSid = messagi...
public class NewArticleNotification { @NotBlank(message = "Content SID must be configured") @Pattern(regexp = "^HX[0-9a-fA-F]{32}$", message = "Invalid content SID format") private String contentSid; public String getContentSid() { return contentSid; } publ...
repos\tutorials-master\saas-modules\twilio-whatsapp\src\main\java\com\baeldung\twilio\whatsapp\TwilioConfigurationProperties.java
1
请完成以下Java代码
public static class TransactionStateSynchronization implements Synchronization { protected final TransactionListener transactionListener; protected final TransactionState transactionState; private final CommandContext commandContext; public TransactionStateSynchronization( ...
if ( TransactionState.COMMITTING.equals(transactionState) || TransactionState.ROLLINGBACK.equals(transactionState) ) { transactionListener.execute(commandContext); } } public void afterCompletion(int status) { if (Statu...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cfg\jta\JtaTransactionContext.java
1
请在Spring Boot框架中完成以下Java代码
public class PickingJobId implements RepoIdAware { @JsonCreator public static PickingJobId ofRepoId(final int repoId) { return new PickingJobId(repoId); } @Nullable public static PickingJobId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new PickingJobId(repoId) : null; } public static int toRep...
} int repoId; private PickingJobId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "M_Picking_Job_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } public static boolean equals(@Nullable final PickingJobId id1, @Nullable final PickingJobId id2) {return Object...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJobId.java
2
请在Spring Boot框架中完成以下Java代码
public class OnEnabledPredicate extends OnEnabledComponent<RoutePredicateFactory<?>> { @Override protected String normalizeComponentName(Class<? extends RoutePredicateFactory<?>> predicateClass) { return "predicate." + NameUtils.normalizeRoutePredicateNameAsProperty(predicateClass); } @Override protected Class...
static class DefaultValue implements RoutePredicateFactory<Object> { @Override public Predicate<ServerWebExchange> apply(Consumer<Object> consumer) { throw new UnsupportedOperationException("class DefaultValue is never meant to be intantiated"); } @Override public Predicate<ServerWebExchange> apply(Objec...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\conditional\OnEnabledPredicate.java
2