instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class BeamElement implements Comparable<BeamElement> { public float score; public int index; public int action; public int label; public BeamElement(float score, int index, int action, int label) { this.score = score; this.index = index; this.action = action; ...
{ float diff = score - beamElement.score; if (diff > 0) return 2; if (diff < 0) return -2; if (index != beamElement.index) return beamElement.index - index; return beamElement.action - action; } @Override public boolean equals(Obje...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\perceptron\transition\configuration\BeamElement.java
2
请在Spring Boot框架中完成以下Java代码
public static class Shutdown { /** * Whether to accept further tasks after the application context close phase * has begun. */ private boolean acceptTasksAfterContextClose; public boolean isAcceptTasksAfterContextClose() { return this.acceptTasksAfterContextClose; } public void setAcce...
public @Nullable Duration getAwaitTerminationPeriod() { return this.awaitTerminationPeriod; } public void setAwaitTerminationPeriod(@Nullable Duration awaitTerminationPeriod) { this.awaitTerminationPeriod = awaitTerminationPeriod; } } /** * Determine when the task executor is to be created. * * @...
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\task\TaskExecutionProperties.java
2
请完成以下Java代码
public void setM_Product_ID (int M_Product_ID) { if (M_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Product. @return Product, Service, Item */ public int getM_Product_ID () { Integer ...
} return false; } /** Set Quantity Invoiced. @param ServiceLevelInvoiced Quantity of product or service invoiced */ public void setServiceLevelInvoiced (BigDecimal ServiceLevelInvoiced) { set_ValueNoCheck (COLUMNNAME_ServiceLevelInvoiced, ServiceLevelInvoiced); } /** Get Quantity Invoiced. @return...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ServiceLevel.java
1
请在Spring Boot框架中完成以下Java代码
public class Saml2PostAuthenticationRequest extends AbstractSaml2AuthenticationRequest { @Serial private static final long serialVersionUID = -6412064305715642123L; Saml2PostAuthenticationRequest(String samlRequest, String relayState, String authenticationRequestUri, String relyingPartyRegistrationId, String id...
private Builder(RelyingPartyRegistration registration) { super(registration); } /** * Constructs an immutable {@link Saml2PostAuthenticationRequest} object. * @return an immutable {@link Saml2PostAuthenticationRequest} object. */ public Saml2PostAuthenticationRequest build() { return new Saml2Post...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\authentication\Saml2PostAuthenticationRequest.java
2
请在Spring Boot框架中完成以下Java代码
public void setC_Currency_ID (final int C_Currency_ID) { if (C_Currency_ID < 1) set_Value (COLUMNNAME_C_Currency_ID, null); else set_Value (COLUMNNAME_C_Currency_ID, C_Currency_ID); } @Override public int getC_Currency_ID() { return get_ValueAsInt(COLUMNNAME_C_Currency_ID); } @Override public v...
} @Override public void setDateTrx (final java.sql.Timestamp DateTrx) { set_Value (COLUMNNAME_DateTrx, DateTrx); } @Override public java.sql.Timestamp getDateTrx() { return get_ValueAsTimestamp(COLUMNNAME_DateTrx); } @Override public void setDocumentNo (final java.lang.String DocumentNo) { set_Valu...
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java-gen\de\metas\pos\repository\model\X_C_POS_Journal.java
2
请完成以下Java代码
public Builder setDocumentDecorators(final ImmutableList<IDocumentDecorator> documentDecorators) { this.documentDecorators = documentDecorators; return this; } @Nullable public ImmutableList<IDocumentDecorator> getDocumentDecorators() { return this.documentDecorators; } public Builder setRefres...
{ return false; } return CopyRecordFactory.isEnabledForTableName(tableName.get()); } public DocumentQueryOrderByList getDefaultOrderBys() { return getFieldBuilders() .stream() .filter(DocumentFieldDescriptor.Builder::isDefaultOrderBy) .sorted(Ordering.natural().onResultOf(DocumentFie...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentEntityDescriptor.java
1
请在Spring Boot框架中完成以下Java代码
public Builder location(String location) { this.location = location; return this; } /** * Use this value for the relay state when sending the Logout Request to the * asserting party * * It should not be URL-encoded as this will be done when the response is sent * @param relayState the relay st...
/** * Use this strategy for converting parameters into an encoded query string. The * resulting query does not contain a leading question mark. * * In the event that you already have an encoded version that you want to use, you * can call this by doing {@code parameterEncoder((params) -> encodedValue)}. ...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\authentication\logout\Saml2LogoutResponse.java
2
请完成以下Java代码
private void createRecord(String text) { MADBoilerPlate.createSpoolRecord(getCtx(), getAD_Client_ID(), getPinstanceId(), text, get_TrxName()); } private boolean isJasperReport() { final String whereClause = I_AD_Process.COLUMNNAME_AD_Process_ID + "=?" + " AND " + I_AD_Process.COLUMNNAME_JasperReport + " IS...
{ ProcessInfo.builder() .setCtx(getCtx()) .setProcessCalledFrom(getProcessInfo().getProcessCalledFrom()) .setAD_Client_ID(getAD_Client_ID()) .setAD_User_ID(getAD_User_ID()) .setPInstanceId(getPinstanceId()) .setAD_Process_ID(0) .setTableName(I_T_BoilerPlate_Spool.Table_Name) // .bu...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\letters\report\AD_BoilerPlate_Report.java
1
请完成以下Java代码
private StagingData retrieveStagingData(@NonNull final String transactionId) { return cache.getOrLoad(transactionId, this::retrieveStagingData0); } @NonNull private StagingData retrieveStagingData0(@NonNull final String transactionId) { final I_M_ShipmentSchedule_ExportAudit exportAuditRecord = queryBL.create...
return new StagingData( Maps.uniqueIndex(exportAuditItemRecords, I_M_ShipmentSchedule_ExportAudit_Item::getM_ShipmentSchedule_ID), exportAuditRecord, exportAuditItemRecords); } @Value private static class StagingData { @NonNull ImmutableMap<Integer, I_M_ShipmentSchedule_ExportAudit_Item> schedIdToR...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\exportaudit\ShipmentScheduleAuditRepository.java
1
请完成以下Java代码
public final class Threads { private Threads() { } /** * Attempt to stop given thread. * * @param thread thread to be stopped. * @param timeoutMillis how many millis (maximum) to try stopping the thread; if ZERO it will try to stop infinitelly * @throws TimeoutException if thread could not be stopped in ...
// // If the thread is still alive we throw an timeout exception if (thread.isAlive()) { throw new TimeoutException("Failed to kill thread " + thread.getName() + " in " + timeoutMillis + "ms"); } } /** * Convenient method to set a thread name and also get the previous name. * * @param thread * @pa...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\concurrent\Threads.java
1
请在Spring Boot框架中完成以下Java代码
public class ViewRowIdsOrderedSelection { ViewId viewId; long size; DocumentQueryOrderByList orderBys; QueryLimit queryLimit; boolean queryLimitHit; @Nullable EmptyReason emptyReason; @Builder(toBuilder = true) private ViewRowIdsOrderedSelection( @NonNull final ViewId viewId, final long size, @Nulla...
&& size > 0 && size >= this.queryLimit.toInt(); } public static boolean equals(@Nullable final ViewRowIdsOrderedSelection s1, @Nullable final ViewRowIdsOrderedSelection s2) { return Objects.equals(s1, s2); } public WindowId getWindowId() { return getViewId().getWindowId(); } public String getSelectio...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewRowIdsOrderedSelection.java
2
请在Spring Boot框架中完成以下Java代码
public List<AppDefinition> executeList(CommandContext commandContext) { return CommandContextUtil.getAppDefinitionEntityManager(commandContext).findAppDefinitionsByQueryCriteria(this); } // getters //////////////////////////////////////////// public String getDeploymentId() { return deploy...
public String getCategoryLike() { return categoryLike; } public String getResourceName() { return resourceName; } public String getResourceNameLike() { return resourceNameLike; } public String getCategoryNotEquals() { return categoryNotEquals; } public...
repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\repository\AppDefinitionQueryImpl.java
2
请完成以下Java代码
public DocumentZoomIntoInfo getDocumentZoomInto(final int id) { final String tableName = fetcher.getLookupTableName() .orElseThrow(() -> new IllegalStateException("Failed converting id=" + id + " to " + DocumentZoomIntoInfo.class + " because the fetcher returned null tablename: " + fetcher)); return DocumentZo...
// Build the validation context final LookupDataSourceContext evalCtx = fetcher.newContextForFetchingById(idNormalized) .putFilterById(IdsToFilter.ofSingleValue(idNormalized)) .putShowInactive(true) .build(); // // Get the lookup value final LookupValue lookupValue = fetcher.retrieveLookupValueById...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\LookupDataSourceAdapter.java
1
请完成以下Java代码
public int getAD_User_ID() { return get_ValueAsInt(COLUMNNAME_AD_User_ID); } /** * Gender AD_Reference_ID=541317 * Reference name: Gender_List */ public static final int GENDER_AD_Reference_ID=541317; /** Unbekannt = 0 */ public static final String GENDER_Unbekannt = "0"; /** Weiblich = 1 */ public s...
/** Dipl. Psych. = 5 */ public static final String TITLE_DiplPsych = "5"; /** Dr. Dr. = 6 */ public static final String TITLE_DrDr = "6"; /** Dr. med. = 7 */ public static final String TITLE_DrMed = "7"; /** Prof. Dr. Dr. = 8 */ public static final String TITLE_ProfDrDr = "8"; /** Prof. = 9 */ public static fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_AD_User_Alberta.java
1
请在Spring Boot框架中完成以下Java代码
public class Client { @Id @Column(name = "client_id") private String clientId; @Column(name = "client_secret") private String clientSecret; @Column(name = "redirect_uri") private String redirectUri; @Column(name = "scope") private String scope; @Column(name = "authorized_grant_ty...
this.clientSecret = clientSecret; } public String getRedirectUri() { return redirectUri; } public void setRedirectUri(String redirectUri) { this.redirectUri = redirectUri; } public String getScope() { return scope; } public void setScope(String scope) { ...
repos\tutorials-master\security-modules\oauth2-framework-impl\oauth2-authorization-server\src\main\java\com\baeldung\oauth2\authorization\server\model\Client.java
2
请在Spring Boot框架中完成以下Java代码
public LocalContainerEntityManagerFactoryBean productEntityManager() { final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean(); em.setDataSource(productDataSource()); em.setPackagesToScan("com.baeldung.multipledb.model.product"); final HibernateJpa...
final DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(Preconditions.checkNotNull(env.getProperty("jdbc.driverClassName"))); dataSource.setUrl(Preconditions.checkNotNull(env.getProperty("product.jdbc.url"))); dataSource.setUsername(Preconditions.c...
repos\tutorials-master\persistence-modules\spring-data-jpa-enterprise\src\main\java\com\baeldung\multipledb\PersistenceProductConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public static BankCodeEnum getEnum(String enumName) { BankCodeEnum resultEnum = null; BankCodeEnum[] enumAry = BankCodeEnum.values(); for (int i = 0; i < enumAry.length; i++) { if (enumAry[i].name().equals...
return list; } /** * 取枚举的json字符串 * * @return */ public static String getJsonStr() { BankCodeEnum[] enums = BankCodeEnum.values(); StringBuffer jsonStr = new StringBuffer("["); for (BankCodeEnum senum : enums) { if (!"[".equals(jsonStr.toString())) { jsonStr.append(","); } jsonStr.append(...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\enums\BankCodeEnum.java
2
请完成以下Java代码
public List<I_M_HU> retrieveAvailableSourceHUs(@NonNull final PickingHUsQuery query) { final SourceHUsService sourceHuService = SourceHUsService.get(); return RetrieveAvailableHUsToPick.retrieveAvailableHUsToPick(query, sourceHuService::retrieveParentHusThatAreSourceHUs); } @Override @NonNull public List<I_M_...
final PickingHUsQuery query = PickingHUsQuery .builder() .onlyTopLevelHUs(request.isOnlyTopLevel()) .shipmentSchedule(schedule) .onlyIfAttributesMatchWithShipmentSchedules(request.isConsiderAttributes()) .build(); return retrieveAvailableHUIdsToPick(query); } public boolean clearPickingSlotQue...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\slot\impl\HUPickingSlotBL.java
1
请完成以下Java代码
public class NotificationBL implements INotificationBL { private static final Logger logger = LogManager.getLogger(NotificationBL.class); private final CompositeRecordTextProvider ctxProviders = new CompositeRecordTextProvider(); private NotificationSenderTemplate newNotificationSender() { final NotificationSend...
} catch (final Exception ex) { logger.warn("Failed sending notification: {}", request, ex); } } @Override public void addCtxProvider(final IRecordTextProvider ctxProvider) { ctxProviders.addCtxProvider(ctxProvider); } @Override public void setDefaultCtxProvider(final IRecordTextProvider defaultCtxPr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\notification\impl\NotificationBL.java
1
请完成以下Java代码
public ProductsToPickRow withQtyOverride(@Nullable final BigDecimal qtyOverrideBD) { final Quantity qtyOverride = qtyOverrideBD != null ? Quantity.of(qtyOverrideBD, qty.getUOM()) : null; return withQtyOverride(qtyOverride); } private ProductsToPickRow withQtyOverride(@Nullable final Quantity qtyOverrid...
} public boolean isEligibleForPicking() { return isEligibleForChangingPickStatus() && !isApproved() && pickStatus != null && pickStatus.isEligibleForPicking(); } public boolean isEligibleForRejectPicking() { return isEligibleForChangingPickStatus() && !isApproved() && pickStatus != null ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\rows\ProductsToPickRow.java
1
请完成以下Java代码
abstract class M_CostRevaluation_ProcessTemplate extends JavaProcess implements IProcessPrecondition { protected final CostRevaluationService costRevaluationService = SpringContextHolder.instance.getBean(CostRevaluationService.class); protected final ProcessPreconditionsResolution acceptIfDraft(final @NonNull IProce...
{ final CostRevaluationId costRevaluationId = getCostRevaluationId(context); return !costRevaluationService.hasActiveLines(costRevaluationId) ? ProcessPreconditionsResolution.accept() : ProcessPreconditionsResolution.rejectWithInternalReason("Active lines found"); } protected final CostRevaluationId getC...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costrevaluation\process\M_CostRevaluation_ProcessTemplate.java
1
请完成以下Java代码
public void setActionCommand (String actionCommand) { super.setActionCommand (actionCommand); if (getName() == null && actionCommand != null && actionCommand.length() > 0) setName(actionCommand); } // setActionCommand public boolean isSelectionNone() { final Object selectedItem = getSelectedItem(); if (...
public final ComboBoxAutoCompletion<E> enableAutoCompletion() { return ComboBoxAutoCompletion.enable(this); } /** * Disable autocompletion on this combobox. * * If the autocompletion was not enabled, this method does nothing. */ public final void disableAutoCompletion() { ComboBoxAutoCompletion.disa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CComboBox.java
1
请完成以下Java代码
private @NonNull Set<DDOrderCandidateId> getDDOrderCandidateIds(final @NonNull SupplyRequiredDecreasedEvent event) { final Candidate demandCandidate = candidateRepositoryRetrieval.retrieveById(CandidateId.ofRepoId(event.getSupplyRequiredDescriptor().getDemandCandidateId())); return candidateRepositoryWriteService....
} private Quantity doDecreaseQty(final DDOrderCandidate ddOrderCandidate, final Quantity remainingQtyToDistribute) { if (isCandidateEligibleForBeingDecreased(ddOrderCandidate)) { final Quantity qtyToDecrease = remainingQtyToDistribute.min(ddOrderCandidate.getQtyToProcess()); ddOrderCandidate.setQtyEntered(...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddordercandidate\material_dispo\DDOrderCandidateAdvisedEventCreator.java
1
请完成以下Java代码
public Long getId() { return this.id; } public String getName() { return this.name; } public List<User> getMembers() { return this.members; } public void setId(Long id) { this.id = id; } public void setName(String name) { this.name = name; ...
return true; } if (o == null || getClass() != o.getClass()) { return false; } Group group = (Group) o; return Objects.equals(id, group.id); } @Override public int hashCode() { return id != null ? id.hashCode() : 0; } public String toStr...
repos\tutorials-master\persistence-modules\spring-boot-persistence-2\src\main\java\com\baeldung\listvsset\eager\list\moderatedomain\Group.java
1
请完成以下Java代码
public class AnimalSolution { private final Object objLock1 = new Object(); private final Object objLock2 = new Object(); private String name; private String owner; public String getName() { return name; } public String getOwner() { return owner; } ...
public void setOwner(String owner) { synchronized(objLock2) { this.owner = owner; } } public AnimalSolution() { } public AnimalSolution(String name, String owner) { this.name = name; this.owner = owner; } }
repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-4\src\main\java\com\baeldung\synchronizationbadpractices\AnimalSolution.java
1
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(@NonNull final IProcessPreconditionsContext context) { if (context.isNoSelection()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } if (sysConfigBL.getBooleanValue(EDIWorkpackageProcessor.SYS_CONFIG_OneDesadvPerShipmen...
final IQueryBuilder<I_EDI_Desadv> queryBuilder = queryBL.createQueryBuilder(I_EDI_Desadv.class, getCtx(), get_TrxName()) .addOnlyActiveRecordsFilter() .addInArrayOrAllFilter(I_EDI_Desadv.COLUMNNAME_EDI_ExportStatus, X_EDI_Desadv.EDI_EXPORTSTATUS_Error, X_EDI_Desadv.EDI_EXPORTSTATUS_Pending) .filter(processQ...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\EDI_Desadv_EnqueueForExport.java
1
请完成以下Java代码
public BigDecimal getOutcome() { return outcome; } /** 平台账户出款金额 **/ public void setOutcome(BigDecimal outcome) { this.outcome = outcome; } /** 商户订单号 **/ public String getMerchantOrderNo() { return merchantOrderNo; } /** 商户订单号 **/ public void setMerchantOrderNo(String merchantOrderNo) { this.merchant...
public String getTransType() { return transType; } /** 交易类型 **/ public void setTransType(String transType) { this.transType = transType; } /** 交易时间 **/ public Date getTransDate() { return transDate; } /** 交易时间 **/ public void setTransDate(Date transDate) { this.transDate = transDate; } /** 银行(支付宝...
repos\roncoo-pay-master\roncoo-pay-app-reconciliation\src\main\java\com\roncoo\pay\app\reconciliation\vo\AlipayAccountLogVO.java
1
请完成以下Java代码
public double getTopSpeed() { return topSpeed; } public void setTopSpeed(double topSpeed) { this.topSpeed = topSpeed; } } public static class Truck extends Vehicle { @JsonIgnore private double payloadCapacity; public Truck() { }
public Truck(String make, String model, double payloadCapacity) { super(make, model); this.payloadCapacity = payloadCapacity; } public double getPayloadCapacity() { return payloadCapacity; } public void setPayloadCapacity(double payloadCapacity) { ...
repos\tutorials-master\jackson-modules\jackson-core\src\main\java\com\baeldung\jackson\inheritance\SubTypeConversionStructure.java
1
请完成以下Java代码
public void initialize(final ModelValidationEngine engine, final MClient client) { this.engine = engine; if (client != null) { m_AD_Client_ID = client.getAD_Client_ID(); } engine.addModelValidator(new C_ReferenceNo_Type(this), client); engine.addModelValidator(new C_ReferenceNo_Type_Table(this), client...
final Properties ctx = InterfaceWrapperHelper.getCtx(type); final IReferenceNoGeneratorInstance instance = Services.get(IReferenceNoBL.class).getReferenceNoGeneratorInstance(ctx, type); if (instance == null) { return; } final ReferenceNoGeneratorInstanceValidator validator = new ReferenceNoGeneratorInsta...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.refid\src\main\java\de\metas\document\refid\modelvalidator\Main.java
1
请完成以下Java代码
private static int readInBuffer(DataBlock dataBlock, long pos, ByteBuffer buffer, int maxLen, int minLen) throws IOException { buffer.clear(); if (buffer.remaining() > maxLen) { buffer.limit(maxLen); } int result = 0; while (result < minLen) { int count = dataBlock.read(buffer, pos); if (count <= ...
codePoint &= INITIAL_BYTE_BITMASK[codePointSize - 1]; for (int j = 1; j < codePointSize; j++) { codePoint = (codePoint << 6) + (bytes[i + j] & SUBSEQUENT_BYTE_BITMASK); } return codePoint; } /** * Supported compare types. */ private enum CompareType { MATCHES, MATCHES_ADDING_SLASH, STARTS_WITH } ...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\zip\ZipString.java
1
请在Spring Boot框架中完成以下Java代码
public class PickingSlotQRCode { @NonNull PickingSlotId pickingSlotId; @NonNull String caption; public static boolean equals(@Nullable final PickingSlotQRCode o1, @Nullable final PickingSlotQRCode o2) { return Objects.equals(o1, o2); } @Override @Deprecated public String toString() {return toGlobalQRCodeJso...
.caption(pickingSlotIdAndCaption.getCaption()) .build(); } public PrintableQRCode toPrintableQRCode() { return PrintableQRCode.builder() .qrCode(toGlobalQRCodeJsonString()) .bottomText(caption) .build(); } public JsonDisplayableQRCode toJsonDisplayableQRCode() { return toPrintableQRCode().to...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\picking\qrcode\PickingSlotQRCode.java
2
请完成以下Java代码
private List<Map<String, Object>> extractSearchResults(SearchResponse<ObjectNode> response) { List<Map<String, Object>> results = new ArrayList<>(); logger.info("Search completed. Total hits: {}", response.hits() .total() .value()); for (Hit<ObjectNode> hit : response.h...
return jsonNode.asText(); } else if (jsonNode.isInt()) { return jsonNode.asInt(); } else if (jsonNode.isLong()) { return jsonNode.asLong(); } else if (jsonNode.isDouble() || jsonNode.isFloat()) { return jsonNode.asDouble(); } else if (jsonNode.isBoolea...
repos\tutorials-master\persistence-modules\spring-data-elasticsearch-2\src\main\java\com\baeldung\wildcardsearch\ElasticsearchWildcardService.java
1
请在Spring Boot框架中完成以下Java代码
public class AdminServiceImpl implements AdminService { private static final Logger LOG = LoggerFactory.getLogger(AdminServiceImpl.class); private static final String SERVICE_PREFIX = "/services/admin"; private final HttpClient httpClient; private final ObjectMapper mapper; private String baseUri...
.build(); HttpResponse<String> response = httpClient.send(request, HttpResponse.BodyHandlers.ofString()); if (response.statusCode() != 200) { throw new ServiceException("Http status: " + response.statusCode()); } return mapper.readValue(response.body(), ne...
repos\spring-examples-java-17\spring-bank\bank-client\src\main\java\itx\examples\springbank\client\service\AdminServiceImpl.java
2
请完成以下Java代码
public Collection<I_C_Recurring> retrieveForToday(final int adClientId, final String trxName) { final List<MRecurring> recurrings = retrieveList(SQL_TODAY, new Object[] { adClientId }, MRecurring.class, trxName); return new ArrayList<>(recurrings); } /** * Executes the given sql (prepared) statement ...
while (rs.next()) { final T newPO = TableModelLoader.instance.retrieveModel(ctx, tableName, clazz, rs, trxName); result.add(newPO); } return result; } catch (SQLException e) { throw new DBException(e, sql, params); } finally { DB.close(rs, pstmt); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\document\impl\RecurringPA.java
1
请完成以下Java代码
public boolean addAll(int index, Collection<? extends E> c) { return false; } @Override public boolean removeAll(Collection<?> c) { return false; } @Override public boolean retainAll(Collection<?> c) { return false; } @Override public void clear() { } ...
@Override public E remove(int index) { return null; } @Override public int indexOf(Object o) { return 0; } @Override public int lastIndexOf(Object o) { return 0; } @Override public ListIterator<E> listIterator() { return null; } @Overri...
repos\tutorials-master\core-java-modules\core-java-collections-5\src\main\java\com\baeldung\customiterators\MyList.java
1
请完成以下Java代码
public void setLabel(String label) { labelAttribute.setValue(this, label); } public Description getDescription() { return descriptionChild.getChild(this); } public void setDescription(Description description) { descriptionChild.setChild(this, description); } public ExtensionElements getExtens...
.idAttribute() .build(); labelAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_LABEL) .build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); descriptionChild = sequenceBuilder.element(Description.class) .build(); extensionElementsChild = sequenceBuilder.element(Ex...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\DmnElementImpl.java
1
请完成以下Java代码
public void setEsrAttributes(Long value) { this.esrAttributes = value; } /** * Gets the value of the postAccount property. * * @return * possible object is * {@link String } * */ public String getPostAccount() { return postAccount; } ...
this.referenceNumber = value; } /** * Gets the value of the codingLine1 property. * * @return * possible object is * {@link String } * */ public String getCodingLine1() { return codingLine1; } /** * Sets the value of the codingLine1 pro...
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\EsrRedType.java
1
请完成以下Java代码
public java.lang.String getDescription () { return (java.lang.String)get_Value(COLUMNNAME_Description); } /** Set Merkmals-Wert. @param M_AttributeValue_ID Product Attribute Value */ @Override public void setM_AttributeValue_ID (int M_AttributeValue_ID) { if (M_AttributeValue_ID < 1) set_Value (...
return ii.intValue(); } /** Set Merkmals-Wert Nach. @param M_AttributeValue_To_ID Product Attribute Value To */ @Override public void setM_AttributeValue_To_ID (int M_AttributeValue_To_ID) { if (M_AttributeValue_To_ID < 1) set_Value (COLUMNNAME_M_AttributeValue_To_ID, null); else set_Value (CO...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeValue_Mapping.java
1
请完成以下Java代码
public class User { private String userId; private String name; private String email; private boolean active; public User(String userId, String name, String email) { this.userId = userId; this.name = name; this.email = email; } public User(String userId, String nam...
public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public boolean isActive() { return active; } public void setActive(boolean active) { th...
repos\tutorials-master\spring-reactive-modules\spring-webflux\src\main\java\com\baeldung\spring\convertmonoobject\User.java
1
请完成以下Java代码
public String read(OAuth2AuthenticationToken authenticationToken) { String url = remoteResourceServer + "/read"; return callResourceServer(authenticationToken, url); } @RequestMapping("/write") public String write(OAuth2AuthenticationToken authenticationToken) { String url = remoteR...
HttpHeaders headers = new HttpHeaders(); headers.add("Authorization", "Bearer " + oAuth2AccessToken.getTokenValue()); HttpEntity<String> entity = new HttpEntity<>("parameters", headers); ResponseEntity<String> responseEntity = null; String response = null; try { res...
repos\tutorials-master\security-modules\cloud-foundry-uaa\cf-uaa-oauth2-client\src\main\java\com\baeldung\cfuaa\oauth2\client\CFUAAOAuth2ClientController.java
1
请在Spring Boot框架中完成以下Java代码
public LineBuilder line(final String tableName) { final Optional<LineBuilder> existingLineBuilder = lineBuilders .stream() .filter(b -> tableName.equals(b.getTableName())) .findFirst(); if (existingLineBuilder.isPresent()) { return existingLineBuilder.get(); } setChanged(true); r...
{ assertLineTableNamesUnique(); final PartitionConfig partitionerConfig = new PartitionConfig(name, changed); partitionerConfig.setDLM_Partition_Config_ID(DLM_Partition_Config_ID); // first build the lines for (final PartitionerConfigLine.LineBuilder lineBuilder : lineBuilders) { final Partition...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\config\PartitionConfig.java
2
请完成以下Java代码
private ListMultimap<PickingSlotId, PickedHUEditorRow> retrievePickedHUsIndexedByPickingSlotId(@NonNull final List<PickingCandidate> pickingCandidates) { final ImmutableList<PickingCandidate> pickingCandidateToTakeIntoAccount = pickingCandidates.stream() .filter(pickingCandidate -> !pickingCandidate.isRejectedTo...
huIdsByPickingSlotId = Services.get(IHUPickingSlotDAO.class).retrieveAllHUIdsIndexedByPickingSlotId(pickingSlots); final HUEditorViewRepository huEditorRepo = getHUEditorViewRepository(); huEditorRepo.warmUp(ImmutableSet.copyOf(huIdsByPickingSlotId.values())); return huIdsByPickingSlotId .entries() .str...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\PickingHURowsRepository.java
1
请完成以下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 the value of the tp proper...
} /** * Sets the value of the issr property. * * @param value * allowed object is * {@link PartyType4Code } * */ public void setIssr(PartyType4Code value) { this.issr = value; } /** * Gets the value of the shrtNm property. * * @r...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\GenericIdentification32.java
1
请在Spring Boot框架中完成以下Java代码
public Discovery getDiscovery() { return this.discovery; } public static class Exposure { /** * Endpoint IDs that should be included or '*' for all. */ private Set<String> include = new LinkedHashSet<>(); /** * Endpoint IDs that should be excluded or '*' for all. */ private Set<String> exclud...
public void setExclude(Set<String> exclude) { this.exclude = exclude; } } public static class Discovery { /** * Whether the discovery page is enabled. */ private boolean enabled = true; public boolean isEnabled() { return this.enabled; } public void setEnabled(boolean enabled) { this.e...
repos\spring-boot-4.0.1\module\spring-boot-actuator-autoconfigure\src\main\java\org\springframework\boot\actuate\autoconfigure\endpoint\web\WebEndpointProperties.java
2
请在Spring Boot框架中完成以下Java代码
public UserStateEnum getUserStateEnum() { return userStateEnum; } public void setUserStateEnum(UserStateEnum userStateEnum) { this.userStateEnum = userStateEnum; } public RoleEntity getRoleEntity() { return roleEntity; } public void setRoleEntity(RoleEntity roleEntity)...
@Override public String toString() { return "UserEntity{" + "id='" + id + '\'' + ", username='" + username + '\'' + ", password='" + password + '\'' + ", phone='" + phone + '\'' + ", mail='" + mail + '\'' + ", li...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\user\UserEntity.java
2
请完成以下Java代码
public class PickingJobOptionsCollection { public static final PickingJobOptionsCollection EMPTY = new PickingJobOptionsCollection(ImmutableMap.of()); @NonNull private final ImmutableMap<PickingJobOptionsId, PickingJobOptions> byId; private PickingJobOptionsCollection(@NonNull final ImmutableMap<PickingJobOptionsI...
{ return GuavaCollectors.collectUsingMapAccumulator(PickingJobOptionsCollection::ofMap); } @NonNull public PickingJobOptions getById(@NotNull PickingJobOptionsId id) { final PickingJobOptions pickingJobOptions = byId.get(id); if (pickingJobOptions == null) { throw new AdempiereException("No picking job ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\config\mobileui\PickingJobOptionsCollection.java
1
请完成以下Java代码
public class DefaultDunnableSourceFactory implements IDunnableSourceFactory { private final Map<Class<? extends IDunnableSource>, IDunnableSource> dunnableSources = new HashMap<Class<? extends IDunnableSource>, IDunnableSource>(); @Override public List<IDunnableSource> getSources(IDunningContext context) { final...
throw new DunningException("Cannot create dunning source for " + sourceClass, e); } } @Override public void registerSource(Class<? extends IDunnableSource> clazz) { if (dunnableSources.containsKey(clazz)) { return; } final IDunnableSource source = createSource(clazz); dunnableSources.put(clazz, sou...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\DefaultDunnableSourceFactory.java
1
请在Spring Boot框架中完成以下Java代码
public PrescriptedArticleLine updated(OffsetDateTime updated) { this.updated = updated; return this; } /** * Der Zeitstempel der letzten Änderung * @return updated **/ @Schema(description = "Der Zeitstempel der letzten Änderung") public OffsetDateTime getUpdated() { return updated; } ...
@Override public int hashCode() { return Objects.hash(_id, orderedArticleLineId, articleId, pcn, productGroupName, quantity, unit, annotation, updated); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PrescriptedArticleLine {\n"); sb.append(...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-orders-api\src\main\java\io\swagger\client\model\PrescriptedArticleLine.java
2
请完成以下Java代码
final class HtmlTemplates { private HtmlTemplates() { } static Builder fromTemplate(String template) { return new Builder(template); } static final class Builder { private final String template; private final Map<String, String> values = new HashMap<>(); private Builder(String template) { this.tem...
return this; } /** * Render the template. All placeholders MUST have a corresponding value. If a * placeholder does not have a corresponding value, throws * {@link IllegalStateException}. * @return the rendered template */ String render() { String template = this.template; for (String key : ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\ui\HtmlTemplates.java
1
请完成以下Java代码
private Function<Health.Builder, Health.Builder> withDistributedSystemDetails() { return healthBuilder -> getGemFireCache() .map(GemFireCache::getDistributedSystem) .map(distributedSystem -> healthBuilder .withDetail("geode.distributed-system.member-count", toMemberCount(distributedSystem)) .withDetail...
private String toConnectedNoConnectedString(Boolean connected) { return Boolean.TRUE.equals(connected) ? "Connected" : "Not Connected"; } private int toMemberCount(DistributedSystem distributedSystem) { return CollectionUtils.nullSafeSize(distributedSystem.getAllOtherMembers()) + 1; } private String toString(...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-actuator\src\main\java\org\springframework\geode\boot\actuate\GeodeCacheHealthIndicator.java
1
请完成以下Java代码
protected ObjectNode links(ObjectNode parent, List<Type> types, String appUrl) { ObjectNode links = super.links(parent, types, appUrl); links.set("dependencies", dependenciesLink(appUrl)); parent.set("_links", links); return links; } @Override protected ObjectNode mapDependency(Dependency dependency) { Ob...
return versionRange.format(Format.V1).toRangeString(); } protected ObjectNode dependenciesLink(String appUrl) { String uri = (appUrl != null) ? appUrl + "/dependencies" : "/dependencies"; UriTemplate uriTemplate = UriTemplate.of(uri, getDependenciesVariables()); ObjectNode result = nodeFactory().objectNode(); ...
repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\mapper\InitializrMetadataV21JsonMapper.java
1
请完成以下Java代码
public int getDoc_User_ID() { if (m_AD_User_ID != 0) return m_AD_User_ID; if (getC_BPartner_ID() != 0) { final List<I_AD_User> users = Services.get(IBPartnerDAO.class).retrieveContacts(getCtx(), getC_BPartner_ID(), ITrx.TRXNAME_None); if (!users.isEmpty()) { m_AD_User_ID = users.get(0).getAD_User...
*/ @Override public int getC_Currency_ID() { final I_M_PriceList pl = Services.get(IPriceListDAO.class).getById(getM_PriceList_ID()); return pl.getC_Currency_ID(); } // getC_Currency_ID /** * Document Status is Complete or Closed * @return true if CO, CL or RE */ public boolean isComplete() { Strin...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MTimeExpense.java
1
请完成以下Java代码
List<Post> getAuthorPosts(String author) throws ExecutionException, InterruptedException { var postsResult = faunaClient.query(Map( Paginate( Join( Match(Index("posts_by_author"), Select(Value("ref"), Get(Match(Index("users_by_username"), V...
Obj( "data", Obj( "title", Value(title), "contents", Value(contents)) ) ) ).get(); } private Post parsePost(Value entry) { var author = entry.a...
repos\tutorials-master\persistence-modules\fauna\src\main\java\com\baeldung\faunablog\posts\PostsService.java
1
请完成以下Java代码
public static class ExecutionPlan { public int number = Integer.MAX_VALUE; public int length = 0; public NumberOfDigits numberOfDigits= new NumberOfDigits(); } @Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public void stringBasedSolut...
plan.length = plan.numberOfDigits.repeatedMultiplication(plan.number); } @Benchmark @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public void shiftOperators(ExecutionPlan plan) { plan.length = plan.numberOfDigits.shiftOperators(plan.number); } @Ben...
repos\tutorials-master\core-java-modules\core-java-numbers\src\main\java\com\baeldung\numberofdigits\Benchmarking.java
1
请在Spring Boot框架中完成以下Java代码
public OffsetDateTime getCreatedAt() { return createdAt; } public void setCreatedAt(OffsetDateTime createdAt) { this.createdAt = createdAt; } public Document updatedAt(OffsetDateTime updatedAt) { this.updatedAt = updatedAt; return this; } /** * Der Zeitstempel der letzten Änderung ...
Objects.equals(this.updatedBy, document.updatedBy) && Objects.equals(this.createdAt, document.createdAt) && Objects.equals(this.updatedAt, document.updatedAt); } @Override public int hashCode() { return Objects.hash(_id, name, patientId, therapyId, therapyTypeId, archived, createdBy, updatedB...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-document-api\src\main\java\io\swagger\client\model\Document.java
2
请完成以下Java代码
public String getOrderCode() { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); int a = (int)(Math.random() * 9000.0D) + 1000; System.out.println(a); Date date = new Date(); String str = sdf.format(date); String[] split = str.split("-"); String ...
: valueStr + values[i] + ","; } params.put(name, valueStr); } try { return AlipaySignature.rsaCheckV1(params, alipay.getPublicKey(), alipay.getCharset(), alipay.getSignType()); } catch (AlipayApiExce...
repos\eladmin-master\eladmin-tools\src\main\java\me\zhengjie\utils\AlipayUtils.java
1
请完成以下Java代码
final class MqttPendingUnsubscription { private final Promise<Void> future; private final String topic; @Getter(AccessLevel.NONE) private final RetransmissionHandler<MqttUnsubscribeMessage> retransmissionHandler; private MqttPendingUnsubscription( Promise<Void> future, Str...
Builder future(Promise<Void> future) { this.future = future; return this; } Builder topic(String topic) { this.topic = topic; return this; } Builder unsubscribeMessage(MqttUnsubscribeMessage unsubscribeMessage) { this.unsubscr...
repos\thingsboard-master\netty-mqtt\src\main\java\org\thingsboard\mqtt\MqttPendingUnsubscription.java
1
请完成以下Java代码
public class MAttributeInstance extends X_M_AttributeInstance { @SuppressWarnings("unused") public MAttributeInstance(Properties ctx, int id, String trxName) { super(ctx, id, trxName); } // MAttributeInstance @SuppressWarnings("unused") public MAttributeInstance(Properties ctx, ResultSet rs, String trxName)...
{ setValue("0"); return; } setValue(ValueNumber.toString()); } // setValueNumber /** * String Representation * * @return info */ @Override public String toString() { final String value = getValue(); return value == null ? "" : value; } // toString } // MAttributeInstance
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MAttributeInstance.java
1
请完成以下Java代码
public String getServiceId() { return delegate.getServiceId(); } @Override public String getHost() { return delegate.getHost(); } @Override public int getPort() { return delegate.getPort(); } @Override public boolean isSecure() { // TODO: move to map if ("https".equals(this.overrideScheme) || "wss...
} @Override public Map<String, String> getMetadata() { return delegate.getMetadata(); } @Override public String getScheme() { String scheme = delegate.getScheme(); if (scheme != null) { return scheme; } return this.overrideScheme; } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\support\DelegatingServiceInstance.java
1
请完成以下Java代码
public UomId getBomProductUOMId() { return UomId.ofRepoId(bomProductUOM.getC_UOM_ID()); } /** * @deprecated consider using {@link #computeQtyRequired(Quantity)} */ @Deprecated public Quantity computeQtyRequired(@NonNull final BigDecimal qtyOfFinishedGood) { return computeQtyRequired(Quantity.of(qtyOfFini...
} } @Deprecated public Quantity computeQtyOfFinishedGoodsForComponentQty(@NonNull final BigDecimal componentsQty) { return computeQtyOfFinishedGoodsForComponentQty(Quantity.of(componentsQty, uom)); } public Quantity computeQtyOfFinishedGoodsForComponentQty(@NonNull final Quantity componentsQty) { final Qua...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\eevolution\api\QtyCalculationsBOMLine.java
1
请完成以下Java代码
private WebuiHUTransformCommandResult action_SplitTU_To_ExistingLU(final HUEditorRow tuRow, final I_M_HU luHU, final QtyTU qtyTU) { newHUTransformation().tuToExistingLU(tuRow.getM_HU(), qtyTU, luHU); final HUEditorRowId tuRowId = tuRow.getHURowId(); return WebuiHUTransformCommandResult.builder() .huIdChang...
{ final IHandlingUnitsBL handlingUnitsBL = Services.get(IHandlingUnitsBL.class); // TODO: if qtyTU is the "maximum", then don't do anything, but show a user message final I_M_HU fromTU = tuRow.getM_HU(); final I_M_HU fromTopLevelHU = handlingUnitsBL.getTopLevelParent(fromTU); final List<I_M_HU> createdHUs =...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WebuiHUTransformCommand.java
1
请在Spring Boot框架中完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getGenre() { return genre; } public void setG...
this.genre = genre; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public Short getVersion() { return version; } }
repos\Hibernate-SpringBoot-master\HibernateSpringBootBatchInsertsJpaRepository\src\main\java\com\bookstore\entity\Author.java
2
请完成以下Java代码
protected String doIt() { final InventoryId inventoryId = InventoryId.ofRepoId(getRecord_ID()); final ProductsToProcess productsToProcess = getProductsToProcess(inventoryId).orElse(null); if (productsToProcess == null) { return MSG_OK; } process(productsToProcess); return MSG_OK; } private Option...
throw new AdempiereException("Invalid action: " + action); } } private Action getActionToRun(@NonNull final InventoryId inventoryId) { final DocStatus inventoryDocStatus = Services.get(IInventoryBL.class).getDocStatus(inventoryId); if (DocStatus.Completed.equals(inventoryDocStatus)) { return Action.DECOM...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\process\M_Inventory_SecurpharmActionRetry.java
1
请在Spring Boot框架中完成以下Java代码
public void setInstanceId(String instanceId) { this.instanceId = instanceId; } public String getScopeType() { return scopeType; } public void setScopeType(String scopeType) { this.scopeType = scopeType; } public Boolean getFailed() { return failed; } p...
public String getDecisionKey() { return decisionKey; } public void setDecisionKey(String decisionKey) { this.decisionKey = decisionKey; } public String getDecisionName() { return decisionName; } public void setDecisionName(String decisionName) { this.decisionNa...
repos\flowable-engine-main\modules\flowable-dmn-rest\src\main\java\org\flowable\dmn\rest\service\api\history\HistoricDecisionExecutionResponse.java
2
请完成以下Java代码
public static Document createDocumentFromString(final String str) throws ParserConfigurationException, SAXException, IOException { // path to file is global // String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage"; // String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";...
public static void writeDocument(final Writer writer, final Node node) { // Construct Transformer Factory and Transformer final TransformerFactory tranFactory = TransformerFactory.newInstance(); Transformer aTransformer; try { aTransformer = tranFactory.newTransformer(); } catch (final TransformerCon...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\process\rpl\XMLHelper.java
1
请完成以下Java代码
public AttachmentEntry withRemovedLinkedRecords(@NonNull final List<TableRecordReference> linkedRecordsToRemove) { final HashSet<TableRecordReference> linkedRecords = new HashSet<>(getLinkedRecords()); if (linkedRecords.removeAll(linkedRecordsToRemove)) { return toBuilder().clearLinkedRecords().linkedRecords(...
{ if (linkedRecord2AttachmentName == null) { return filename; } return CoalesceUtil.coalesceNotNull( linkedRecord2AttachmentName.get(tableRecordReference), filename); } public boolean hasLinkToRecord(@NonNull final TableRecordReference tableRecordReference) { return linkedRecords.contains(tab...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\attachments\AttachmentEntry.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isIncludeException() { return this.includeException; } public void setIncludeException(boolean includeException) { this.includeException = includeException; } public IncludeAttribute getIncludeStacktrace() { return this.includeStacktrace; } public void setIncludeStacktrace(IncludeAttribute...
/** * Add error attribute when the appropriate request parameter is not "false". */ ON_PARAM } public static class Whitelabel { /** * Whether to enable the default error page displayed in browsers in case of a * server error. */ private boolean enabled = true; public boolean isEnabled() { ...
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\web\ErrorProperties.java
2
请在Spring Boot框架中完成以下Java代码
public int hashCode() { return Objects.hash(convertedFromCurrency, convertedFromValue, currency, exchangeRate, value); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DisputeAmount {\n"); sb.append(" convertedFromCurrency: ").append(toIndentedString(conve...
return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\DisputeAmount.java
2
请完成以下Java代码
public String getAuthorizedClientRegistrationId() { return this.authorizedClientRegistrationId; } @Override public Builder<?> toBuilder() { return new Builder<>(this); } /** * A builder of {@link OAuth2AuthenticationToken} instances * * @since 7.0 */ public static class Builder<B extends Builder<B>>...
* Use this * {@link org.springframework.security.oauth2.client.registration.ClientRegistration} * {@code registrationId}. * @param authorizedClientRegistrationId the registration id to use * @return the {@link Builder} for further configurations * @see OAuth2AuthenticationToken#getAuthorizedClientRegistr...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\authentication\OAuth2AuthenticationToken.java
1
请在Spring Boot框架中完成以下Java代码
public static class Template { /** * Whether to ignore JDBC statement warnings (SQLWarning). When set to false, * throw an SQLWarningException instead. */ private boolean ignoreWarnings = true; /** * Number of rows that should be fetched from the database when more rows are * needed. Use -1 to us...
return this.fetchSize; } public void setFetchSize(int fetchSize) { this.fetchSize = fetchSize; } public int getMaxRows() { return this.maxRows; } public void setMaxRows(int maxRows) { this.maxRows = maxRows; } public @Nullable Duration getQueryTimeout() { return this.queryTimeout; } ...
repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\autoconfigure\JdbcProperties.java
2
请完成以下Java代码
public Double getWidth() { return width; } public void setWidth(Double width) { this.width = width; } public String getUom() { return uom; } public void setUom(String uom) { this.uom = uom; }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Size size = (Size) o; return Objects.equals(height, size.height) && Objects.equals(width, size.width) && Objects.equals(uom, size...
repos\tutorials-master\persistence-modules\spring-data-mongodb-2\src\main\java\com\baeldung\projection\model\Size.java
1
请在Spring Boot框架中完成以下Java代码
public class SecuredDirectChannel { @Bean(name = "startDirectChannel") @SecuredChannel(interceptor = "channelSecurityInterceptor", sendAccess = { "ROLE_VIEWER", "jane" }) public DirectChannel startDirectChannel() { return new DirectChannel(); } @ServiceActivator(inputChannel = "startDirect...
@SecuredChannel(interceptor = "channelSecurityInterceptor", sendAccess = { "ROLE_EDITOR" }) public DirectChannel endDirectChannel() { return new DirectChannel(); } @Autowired @Bean public ChannelSecurityInterceptor channelSecurityInterceptor(AuthenticationManager authenticationManager, Acce...
repos\tutorials-master\spring-integration\src\main\java\com\baeldung\si\security\SecuredDirectChannel.java
2
请完成以下Java代码
public void setMKTG_Platform_ID (int MKTG_Platform_ID) { if (MKTG_Platform_ID < 1) set_ValueNoCheck (COLUMNNAME_MKTG_Platform_ID, null); else set_ValueNoCheck (COLUMNNAME_MKTG_Platform_ID, Integer.valueOf(MKTG_Platform_ID)); } /** Get MKTG_Platform. @return MKTG_Platform */ @Override public int ge...
} /** Set Registered EMail. @param UserName Email of the responsible for the System */ @Override public void setUserName (java.lang.String UserName) { set_Value (COLUMNNAME_UserName, UserName); } /** Get Registered EMail. @return Email of the responsible for the System */ @Override public java....
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\cleverreach\src\main\java-gen\de\metas\marketing\cleverreach\model\X_MKTG_CleverReach_Config.java
1
请完成以下Java代码
public void setHUIterator(final IHUIterator iterator) { if (this.iterator != null && iterator != null && this.iterator != iterator) { throw new AdempiereException("Changing the iterator from " + this.iterator + " to " + iterator + " is not allowed for " + this + "." + " You need to explicitelly set it to n...
public Result beforeHUItem(final IMutable<I_M_HU_Item> item) { return getDefaultResult(); } @Override public Result afterHUItem(final I_M_HU_Item item) { return getDefaultResult(); } @Override public Result beforeHUItemStorage(final IMutable<IHUItemStorage> itemStorage) { return getDefaultResult(); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\HUIteratorListenerAdapter.java
1
请完成以下Java代码
public Builder setRetrieveAppsActionMsg(final boolean retrieveAppsActionMessage) { this.retrieveAppsActionMessage = retrieveAppsActionMessage; return this; } private boolean isIsRetrieveAppsActionMessage() { return retrieveAppsActionMessage; } public Builder setAccelerator(final KeyStroke acceler...
{ this.smallSize = smallSize; return this; } private boolean isSmallSize() { return smallSize; } /** * Advice the builder to set given {@link Insets} to action's button. * * @param buttonInsets * @see AbstractButton#setMargin(Insets) */ public Builder setButtonInsets(final Insets b...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\AppsAction.java
1
请完成以下Java代码
public void deleteParams(@NonNull final I_C_Queue_WorkPackage wp) { final QueueWorkPackageId workpackageId = QueueWorkPackageId.ofRepoId(wp.getC_Queue_WorkPackage_ID()); workpackageParamDAO.deleteWorkpackageParams(workpackageId); } @ModelChange(timings = ModelValidator.TYPE_BEFORE_DELETE) public void deleteLog...
{ if (wp.getC_Async_Batch_ID() <= 0) { return; } final String trxName = InterfaceWrapperHelper.getTrxName(wp); final AsyncBatchId asyncBatchId = AsyncBatchId.ofRepoId(wp.getC_Async_Batch_ID()); trxManager .getTrxListenerManager(trxName) .runAfterCommit(() -> processBatchInOwnTrx(asyncBatchId));...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\model\validator\C_Queue_WorkPackage.java
1
请完成以下Java代码
public void output(PrintWriter out) { boolean prettyPrint = getPrettyPrint(); int tabLevel = getTabLevel(); if (registry.size() == 0) { if ((prettyPrint && this instanceof Printable) && (tabLevel > 0)) putTabs(tabLevel, out); super.output(out); } else { if ((prettyPrint && this instanceof P...
/** * Allows all Elements the ability to be cloned. */ public Object clone() { try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(this); out.close(); ByteArrayInputStream bin = new ByteArrayInputStream(baos.toBy...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\ConcreteElement.java
1
请完成以下Java代码
private ShipmentScheduleDeletedEvent createDeletedEvent(@NonNull final I_M_ShipmentSchedule shipmentSchedule) { final MaterialDescriptor materialDescriptor = createMaterialDescriptor(shipmentSchedule); final BigDecimal qtyOrdered = shipmentScheduleEffectiveBL.computeQtyOrdered(shipmentSchedule); return Shipment...
.quantity(orderedQuantity.subtract(getDeliveredQtyFromHUs(shipmentSchedule))) .build(); } @NonNull private BigDecimal getDeliveredQtyFromHUs(@NonNull final I_M_ShipmentSchedule shipmentSchedule) { final List<I_M_ShipmentSchedule_QtyPicked> shipmentScheduleQtyPicked = shipmentScheduleAllocDAO .retrieveAll...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\material\interceptor\M_ShipmentSchedule_PostMaterialEvent.java
1
请在Spring Boot框架中完成以下Java代码
public Result<String> add(@RequestBody SysComment sysComment) { sysCommentService.save(sysComment); return Result.OK("添加成功!"); } /** * 编辑 * * @param sysComment * @return */ //@AutoLog(value = "系统评论回复表-编辑") @Operation(summary = "系统评论回复表-编辑") //@RequiresPermis...
if (sysComment == null) { return Result.error("未找到对应数据"); } return Result.OK(sysComment); } /** * 导出excel * * @param request * @param sysComment */ //@RequiresPermissions("org.jeecg.modules.demo:sys_comment:exportXls") @RequestMapping(value = "/expor...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysCommentController.java
2
请完成以下Java代码
public void setPrecision (final int Precision) { set_Value (COLUMNNAME_Precision, Precision); } @Override public int getPrecision() { return get_ValueAsInt(COLUMNNAME_Precision); } @Override public void setQty (final @Nullable java.lang.String Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override
public java.lang.String getQty() { return get_ValueAsString(COLUMNNAME_Qty); } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Ingredients.java
1
请完成以下Java代码
public List<OLCand> getByQuery(@NonNull final OLCandQuery olCandQuery) { final OLCandFactory olCandFactory = new OLCandFactory(); return toSqlQueryBuilder(olCandQuery) .create() .stream() .map(olCandFactory::toOLCand) .collect(ImmutableList.toImmutableList()); } private IQueryBuilder<I_C_OLCand...
queryBuilder.addEqualsFilter(I_C_OLCand.COLUMN_AD_InputDataSource_ID, inputDataSourceId); } if (olCandQuery.getExternalLineId() != null) { queryBuilder.addEqualsFilter(I_C_OLCand.COLUMNNAME_ExternalLineId, olCandQuery.getExternalLineId()); } if (olCandQuery.getOrgId() != null) { queryBuilder.addEquals...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\OLCandRepository.java
1
请在Spring Boot框架中完成以下Java代码
public int updateMoneyInfo(OmsMoneyInfoParam moneyInfoParam) { OmsOrder order = new OmsOrder(); order.setId(moneyInfoParam.getOrderId()); order.setFreightAmount(moneyInfoParam.getFreightAmount()); order.setDiscountAmount(moneyInfoParam.getDiscountAmount()); order.setModifyTime(ne...
OmsOrder order = new OmsOrder(); order.setId(id); order.setNote(note); order.setModifyTime(new Date()); int count = orderMapper.updateByPrimaryKeySelective(order); OmsOrderOperateHistory history = new OmsOrderOperateHistory(); history.setOrderId(id); history.setCr...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\OmsOrderServiceImpl.java
2
请完成以下Java代码
public Predicate<ServerWebExchange> apply(Config config) { return new GatewayPredicate() { @Override public boolean test(ServerWebExchange exchange) { String host; if (includePort) { host = exchange.getRequest().getHeaders().getFirst("Host"); } else { InetSocketAddress address = exchan...
return config; } @Override public String toString() { return String.format("Hosts: %s", config.getPatterns()); } }; } public static class Config { private List<String> patterns = new ArrayList<>(); public List<String> getPatterns() { return patterns; } public Config setPatterns(List<...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\handler\predicate\HostRoutePredicateFactory.java
1
请在Spring Boot框架中完成以下Java代码
public class SwaggerConfig extends WebMvcConfigurationSupport { // @Bean public Docket postsApi() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("com.urunov.mongodb.controller")) .paths(regex("/ap...
.description("\"Spring Boot REST API for Employee") .version("1.0.0") .license("Apache License Version 2.0") .licenseUrl("https://www.apache.org/licenses/LICENSE-2.0\"") .contact(new Contact("Urunov Hamdamboy", "https://github.com/urunov/", "myindexu@gamil...
repos\Spring-Boot-Advanced-Projects-main\SpringBoot-MongoDB-NoSQL-CRUD\src\main\java\com\urunov\mongodb\configSwag\SwaggerConfig.java
2
请完成以下Java代码
public int getC_DunningDoc_Line_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_DunningDoc_Line_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_C_DunningLevel getC_DunningLevel() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_C_DunningLevel...
{ set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); } /** Get Verarbeitet. @return Checkbox sagt aus, ob der Beleg verarbeitet wurde. */ @Override public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java-gen\de\metas\dunning\model\X_C_DunningDoc_Line.java
1
请完成以下Java代码
public Book setAuthor(String author) { this.author = author; return this; } public Publisher getPublisher() { return publisher; } public Book setPublisher(Publisher publisher) { this.publisher = publisher; return this; } public double getCost() { ...
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Book other = (Book) obj; if (author == null) { if (other.author != null) ...
repos\tutorials-master\persistence-modules\java-mongodb\src\main\java\com\baeldung\bsontojson\Book.java
1
请完成以下Java代码
public class StopExecutionFurtherCode { boolean shouldContinue = true; int performTask(int a, int b) { if (!shouldContinue) { System.exit(0); } return a + b; } void stop() { this.shouldContinue = false; } int calculateFactorial(int n) { if ...
statusCode = -1; break parser; // Stop parsing and exit the loop } System.out.println("Line processed."); } return statusCode; } void download(String fileUrl, String destinationPath) throws MalformedURLException, URISyntaxException { if (fileUrl =...
repos\tutorials-master\core-java-modules\core-java-lang-6\src\main\java\com\baeldung\stopexecution\StopExecutionFurtherCode.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setDescription (final @Nullable java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescrip...
{ if (Mobile_Application_Action_ID < 1) set_ValueNoCheck (COLUMNNAME_Mobile_Application_Action_ID, null); else set_ValueNoCheck (COLUMNNAME_Mobile_Application_Action_ID, Mobile_Application_Action_ID); } @Override public int getMobile_Application_Action_ID() { return get_ValueAsInt(COLUMNNAME_Mobile_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Mobile_Application_Action.java
1
请完成以下Java代码
protected POInfo initPO (Properties ctx) { POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); return poi; } public String toString() { StringBuffer sb = new StringBuffer ("X_M_PricingSystem[") .append(get_ID()).append("]"); return sb.toString(); } /** Se...
*/ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumerische Bezeichnung fuer diesen Eintrag */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\compiere\model\X_M_PricingSystem.java
1
请完成以下Java代码
public HttpSessionWrapper getSession() { return getSession(true); } @Override public String getRequestedSessionId() { if (this.requestedSessionId == null) { getRequestedSession(); } return this.requestedSessionId; } @Override public RequestDispatcher getRequestDispatcher(String path) { ...
SessionRepositoryRequestWrapper.this.requestedSessionInvalidated = true; setCurrentSession(null); clearRequestedSessionCache(); SessionRepositoryFilter.this.sessionRepository.deleteById(getId()); } } /** * Ensures session is committed before issuing an include. * * @since 1.3.4 */ pri...
repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\http\SessionRepositoryFilter.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable CacheControl toHttpCacheControl() { PropertyMapper map = PropertyMapper.get(); CacheControl control = createCacheControl(); map.from(this::getMustRevalidate).whenTrue().toCall(control::mustRevalidate); map.from(this::getNoTransform).whenTrue().toCall(control::noTransform); map....
return CacheControl.noCache(); } if (this.maxAge != null) { return CacheControl.maxAge(this.maxAge.getSeconds(), TimeUnit.SECONDS); } return CacheControl.empty(); } private boolean hasBeenCustomized() { return this.customized; } } } } }
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\web\WebProperties.java
2
请在Spring Boot框架中完成以下Java代码
public void setSubject(String value) { this.subject = value; } /** * Gets the value of the textFunctionCode property. * * @return * possible object is * {@link String } * */ public String getTextFunctionCod...
/** * Sets the value of the agencyCode property. * * @param value * allowed object is * {@link String } * */ public void setAgencyCode(String value) { this.agencyCode = value; } /** * Gets the valu...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\FreeTextType.java
2
请完成以下Java代码
public List<Execution> findExecutionsByNativeQuery( Map<String, Object> parameterMap, int firstResult, int maxResults ) { return getDbSqlSession().selectListWithRawParameter( "selectExecutionByNativeQuery", parameterMap, firstResult, ma...
params.put("tenantId", newTenantId); getDbSqlSession().update("updateExecutionTenantIdForDeployment", params); } @Override public void updateProcessInstanceLockTime(String processInstanceId, Date lockDate, Date expirationTime) { HashMap<String, Object> params = new HashMap<String, Object>()...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisExecutionDataManager.java
1
请完成以下Java代码
public TenantId getTenantId() { return tenantId; } public void setTenantId(TenantId tenantId) { this.tenantId = tenantId; } @Schema(description = "JSON object with Customer Id. Use 'assignAssetToCustomer' to change the Customer Id.", accessMode = Schema.AccessMode.READ_ONLY) public...
return super.getAdditionalInfo(); } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Asset [tenantId="); builder.append(tenantId); builder.append(", customerId="); builder.append(customerId); builder.append(", ...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\asset\Asset.java
1
请完成以下Java代码
public float cosine(Vector other) { return dot(other) / this.norm() / other.norm(); } public Vector minus(Vector other) { float[] result = new float[size()]; for (int i = 0; i < result.length; i++) { result[i] = elementArray[i] - other.elementArray[i]; ...
} /** * 自身归一化 * * @return */ public Vector normalize() { divideToSelf(norm()); return this; } public float[] getElementArray() { return elementArray; } public void setElementArray(float[] elementArray) { this.elementArray = eleme...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\Vector.java
1
请在Spring Boot框架中完成以下Java代码
public MSV3PeerAuthToken authTokenString(@Value("${msv3server.peer.authToken:}") final String authTokenStringValue) { if (authTokenStringValue == null || authTokenStringValue.trim().isEmpty()) { // a token is needed on the receiver side, even if it's not valid return MSV3PeerAuthToken.TOKEN_NOT_SET; } r...
if (requestAllDataOnStartup) { msv3ServerPeerService.requestAllUpdates(); } else if (requestConfigDataOnStartup) { msv3ServerPeerService.requestConfigUpdates(); } } catch (Exception ex) { logger.warn("Error while requesting ALL updates. Skipped.", ex); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server\src\main\java\de\metas\vertical\pharma\msv3\server\Application.java
2
请在Spring Boot框架中完成以下Java代码
public class QualityNoteId implements RepoIdAware { @JsonCreator public static QualityNoteId ofRepoId(final int repoId) { return new QualityNoteId(repoId); } public static QualityNoteId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new QualityNoteId(repoId) : null; } public static int toRepoId(@N...
} int repoId; private QualityNoteId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "M_QualityNote_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inout\QualityNoteId.java
2
请完成以下Java代码
public DtlsConnectorConfig dtlsConnectorConfig(Configuration configuration) throws UnknownHostException { DtlsConnectorConfig.Builder configBuilder = new DtlsConnectorConfig.Builder(configuration); configBuilder.setAddress(getInetSocketAddress()); SslCredentials sslCredentials = this.coapDtlsCre...
) ); configBuilder.setCertificateIdentityProvider(new SingleCertificateProvider(serverCredentials.getPrivateKey(), serverCredentials.getCertificateChain(), Collections.singletonList(CertificateType.X_509))); return configBuilder.build(); } private InetSocketAddress getIn...
repos\thingsboard-master\common\coap-server\src\main\java\org\thingsboard\server\coapserver\TbCoapDtlsSettings.java
1
请完成以下Java代码
public String toString() { return "%"; } }; public static final Operator MUL = new SimpleOperator() { @Override public Object apply(TypeConverter converter, Object o1, Object o2) { return NumberOperations.mul(converter, o1, o2); } @Override ...
private final AstNode left, right; public AstBinary(AstNode left, AstNode right, Operator operator) { this.left = left; this.right = right; this.operator = operator; } public Operator getOperator() { return operator; } @Override public Object eval(Bindings bind...
repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\tree\impl\ast\AstBinary.java
1
请在Spring Boot框架中完成以下Java代码
public class HistoricEntityLinkEntityManagerImpl extends AbstractServiceEngineEntityManager<EntityLinkServiceConfiguration, HistoricEntityLinkEntity, HistoricEntityLinkDataManager> implements HistoricEntityLinkEntityManager { public HistoricEntityLinkEntityManagerImpl(EntityLinkServiceConfiguration entityL...
@Override public void deleteHistoricEntityLinksByScopeIdAndScopeType(String scopeId, String scopeType) { dataManager.deleteHistoricEntityLinksByScopeIdAndType(scopeId, scopeType); } @Override public void deleteHistoricEntityLinksByScopeDefinitionIdAndScopeType(String scopeDefinitionId, Stri...
repos\flowable-engine-main\modules\flowable-entitylink-service\src\main\java\org\flowable\entitylink\service\impl\persistence\entity\HistoricEntityLinkEntityManagerImpl.java
2