instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class Cockpit { /** * The {@link CockpitRuntimeDelegate} is an delegate that will be * initialized by bootstrapping camunda cockpit with an specific * instance */ protected static CockpitRuntimeDelegate COCKPIT_RUNTIME_DELEGATE; /** * Returns a configured {@link QueryService} to execute cu...
return getRuntimeDelegate().getProcessEngine(processEngineName); } /** * Returns an instance of {@link CockpitRuntimeDelegate} * * @return */ public static CockpitRuntimeDelegate getRuntimeDelegate() { return COCKPIT_RUNTIME_DELEGATE; } /** * A setter to set the {@link CockpitRuntimeDeleg...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\cockpit\Cockpit.java
1
请在Spring Boot框架中完成以下Java代码
private void applyReaderBuilderCustomizers(List<ReaderBuilderCustomizer<?>> customizers, ReaderBuilder<?> builder) { LambdaSafe.callbacks(ReaderBuilderCustomizer.class, customizers, builder) .invoke((customizer) -> customizer.customize(builder)); } @Bean @ConditionalOnMissingBean(name = "pulsarReaderContainerF...
this.propertiesMapper.customizeReaderContainerProperties(readerContainerProperties); DefaultPulsarReaderContainerFactory<?> containerFactory = new DefaultPulsarReaderContainerFactory<>( pulsarReaderFactory, readerContainerProperties); containerFactoryCustomizers.customize(containerFactory); return containerFa...
repos\spring-boot-4.0.1\module\spring-boot-pulsar\src\main\java\org\springframework\boot\pulsar\autoconfigure\PulsarAutoConfiguration.java
2
请完成以下Java代码
public EventRegistryEngine getObject() throws Exception { configureExternallyManagedTransactions(); if (eventEngineConfiguration.getBeans() == null) { eventEngineConfiguration.setBeans(new SpringBeanFactoryProxyMap(applicationContext)); } this.eventRegistryEngine = ...
@Override public Class<EventRegistryEngine> getObjectType() { return EventRegistryEngine.class; } @Override public boolean isSingleton() { return true; } public EventRegistryEngineConfiguration getEventEngineConfiguration() { return eventEngineConfiguration; } ...
repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\EventRegistryFactoryBean.java
1
请完成以下Java代码
private static String getErrorMessage(Long currentRequestSize, Long maxSize) { return String.format(ERROR, getReadableByteCount(currentRequestSize), getReadableByteCount(maxSize)); } private static String getReadableByteCount(long bytes) { int unit = 1000; if (bytes < unit) { return bytes + " B"; } int ...
@Override public String toString() { return filterToStringCreator(RequestSizeGatewayFilterFactory.this) .append("max", requestSizeConfig.getMaxSize()) .toString(); } }; } public static class RequestSizeConfig { // TODO: use boot data size type private DataSize maxSize = DataSize.ofBytes(50...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RequestSizeGatewayFilterFactory.java
1
请完成以下Java代码
public void setM_Nutrition_Fact_ID (int M_Nutrition_Fact_ID) { if (M_Nutrition_Fact_ID < 1) set_Value (COLUMNNAME_M_Nutrition_Fact_ID, null); else set_Value (COLUMNNAME_M_Nutrition_Fact_ID, Integer.valueOf(M_Nutrition_Fact_ID)); } /** Get Nutrition Fact. @return Nutrition Fact */ @Override public ...
/** Set Product Nutrition. @param M_Product_Nutrition_ID Product Nutrition */ @Override public void setM_Product_Nutrition_ID (int M_Product_Nutrition_ID) { if (M_Product_Nutrition_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_Nutrition_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Product_Nutritio...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Nutrition.java
1
请完成以下Java代码
public List<I_AD_User_SortPref_Line> retrieveConferenceSortPreferenceLines(final Properties ctx, final String action, final int recordId) { final I_AD_User_SortPref_Hdr hdr = retrieveConferenceSortPreferenceHdr(ctx, action, recordId); return retrieveSortPreferenceLines(hdr); } @Override public List<I_AD_User_S...
final IQueryBL queryBL = Services.get(IQueryBL.class); int count = 0; final List<I_AD_User_SortPref_Line> linesToDelete = retrieveSortPreferenceLines(hdr); for (final I_AD_User_SortPref_Line line : linesToDelete) { final int countProductLinesDeleted = queryBL.createQueryBuilder(I_AD_User_SortPref_Line_Prod...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\api\impl\UserSortPrefDAO.java
1
请完成以下Java代码
public I_AD_ReplicationTable getAD_ReplicationTable() throws RuntimeException { return (I_AD_ReplicationTable)MTable.get(getCtx(), I_AD_ReplicationTable.Table_Name) .getPO(getAD_ReplicationTable_ID(), get_TrxName()); } /** Set Replication Table. @param AD_ReplicationTable_ID Data Replication Strategy Ta...
set_Value (COLUMNNAME_IsReplicated, Boolean.valueOf(IsReplicated)); } /** Get Replicated. @return The data is successfully replicated */ public boolean isReplicated () { Object oo = get_Value(COLUMNNAME_IsReplicated); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanV...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Replication_Log.java
1
请完成以下Java代码
public static DateTruncQueryFilterModifier forTruncString(final String trunc) { if (TimeUtil.TRUNC_DAY.equals(trunc)) { return DAY; } else if (TimeUtil.TRUNC_WEEK.equals(trunc)) { return WEEK; } else if (TimeUtil.TRUNC_MONTH.equals(trunc)) { return MONTH; } else if (TimeUtil.TRUNC_YEAR.equ...
// * using functions is not INDEX friendly at all and if we have an index on this date column, the index won't be used final String columnSqlNew = "TRUNC(" + columnName + ", " + DB.TO_STRING(truncSql) + ")"; return columnSqlNew; } @Override public String getValueSql(final Object value, final List<Object> param...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\DateTruncQueryFilterModifier.java
1
请完成以下Java代码
public void setLastReceiptDate (java.sql.Timestamp LastReceiptDate) { set_ValueNoCheck (COLUMNNAME_LastReceiptDate, LastReceiptDate); } /** Get Letzter Wareneingang. @return Letzter Wareneingang */ @Override public java.sql.Timestamp getLastReceiptDate () { return (java.sql.Timestamp)get_Value(COLUMNNAM...
@param M_Product_ID Produkt, Leistung, Artikel */ @Override 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 Produkt. @return Produk...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Product_Stats_InOut_Online_v.java
1
请完成以下Java代码
public class ZkTest { private static final String address = "127.0.0.1:2181"; private static final int session_timeout = 5000; private static final CountDownLatch cout = new CountDownLatch(1); private static Stat stat=new Stat(); public static void main(String[] args) throws IOException, Interrup...
System.out.println("--------zk开始连接."); } } } }); cout.await(); //创建节点 String path="/test"; String create = zk.create(path, "fzp".getBytes(), ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); System.out.pr...
repos\SpringBootLearning-master\version2.x\springboot-zk-demo\src\main\java\io\github\forezp\springbootzkdemo\ZkTest.java
1
请完成以下Java代码
public String getWhereClause(MTree_Base tree) { return null; } @Override public void setParent_ID(MTree_Base tree, int nodeId, int parentId, String trxName) { final MTable table = MTable.get(tree.getCtx(), tree.getAD_Table_ID()); if (I_M_Product_Category.Table_Name.equals(table.getTableName())) { fi...
{ return I_M_Product_Category.COLUMNNAME_M_Product_Category_Parent_ID; } @Override public MTreeNode getNodeInfo(GridTab gridTab) { MTreeNode info = super.getNodeInfo(gridTab); info.setAllowsChildren(true); // we always allow children because IsSummary field will be automatically // maintained return info...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\product\tree\spi\impl\MProductCategoryTreeSupport.java
1
请完成以下Java代码
public Color getColor (int percent) { int AD_PrintColor_ID = 0; if (percent <= getMark1Percent() || getMark2Percent() == 0) AD_PrintColor_ID = getAD_PrintColor1_ID(); else if (percent <= getMark2Percent() || getMark3Percent() == 0) AD_PrintColor_ID = getAD_PrintColor2_ID(); else if (percent <= getMark3Pe...
return Color.black; // MPrintColor pc = MPrintColor.get(getCtx(), AD_PrintColor_ID); if (pc != null) return pc.getColor(); return Color.black; } // getColor /** * String Representation * @return info */ public String toString () { StringBuffer sb = new StringBuffer ("MColorSchema["); sb.appen...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MColorSchema.java
1
请在Spring Boot框架中完成以下Java代码
public final class DefaultProfileUtil { private static final String SPRING_PROFILE_DEFAULT = "spring.profiles.default"; private DefaultProfileUtil() { } /** * Set a default to use when no profile is configured. * * @param app the Spring application */ public static void addDef...
app.setDefaultProperties(defProperties); } /** * Get the profiles that are applied else get default profiles. * * @param env spring environment * @return profiles */ public static String[] getActiveProfiles(Environment env) { String[] profiles = env.getActiveProfiles(); ...
repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\config\DefaultProfileUtil.java
2
请完成以下Java代码
public void setC_UOM_ID (final int C_UOM_ID) { if (C_UOM_ID < 1) set_Value (COLUMNNAME_C_UOM_ID, null); else set_Value (COLUMNNAME_C_UOM_ID, C_UOM_ID); } @Override public int getC_UOM_ID() { return get_ValueAsInt(COLUMNNAME_C_UOM_ID); } /** * DisposeReason AD_Reference_ID=541422 * Reference...
@Override public int getM_HU_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_ID); } @Override public void setM_Inventory_Candidate_ID (final int M_Inventory_Candidate_ID) { if (M_Inventory_Candidate_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Inventory_Candidate_ID, null); else set_ValueNoCheck (COLUMNNAM...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_Inventory_Candidate.java
1
请完成以下Java代码
public Operation newInstance(ModelTypeInstanceContext instanceContext) { return new OperationImpl(instanceContext); } }); nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME) .required() .build(); implementationRefAttribute = typeBuilder.stringAttribute(BPMN_ELE...
public void setName(String name) { nameAttribute.setValue(this, name); } public String getImplementationRef() { return implementationRefAttribute.getValue(this); } public void setImplementationRef(String implementationRef) { implementationRefAttribute.setValue(this, implementationRef); } publ...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\OperationImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class DistributionProductService { private final IProductBL productBL = Services.get(IProductBL.class); public ProductInfo getProductInfo(@NonNull final ProductId productId) { return ProductInfo.builder() .productId(productId) .caption(productBL.getProductNameTrl(productId)) .build(); } publ...
{ ProductId productId = null; final GTIN gtin = GTIN.ofScannedCode(scannedProductCode).orElse(null); if (gtin != null) { productId = productBL.getProductIdByGTIN(gtin).orElse(null); } if (productId == null) { throw new AdempiereException("No product found for scanned product code: " + scannedProduc...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\external_services\product\DistributionProductService.java
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO (Properties ctx) { org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName()); return poi; } @Override public org.compiere.model.I_C_DocType getC_DocType() throws RuntimeException { return get_ValueAsPO(COLUMN...
if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_AD_Sequence getDocNoSequence() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_DocNoSequence_ID, org.compiere.model.I_AD_Sequence.class); } @Override public void setDocNoSequence(org.compiere.model.I_AD_Se...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DocType_Sequence.java
1
请在Spring Boot框架中完成以下Java代码
public BulkUpdateByQueryResult bulkUpdateByQuery( @NonNull final SumUpTransactionQuery query, boolean isForceSendingChangeEvents, @NonNull final UnaryOperator<SumUpTransaction> updater) { trxManager.assertThreadInheritedTrxNotExists(); final AtomicInteger countOK = new AtomicInteger(0); final AtomicInt...
} catch (final Exception ex) { countError.incrementAndGet(); logger.warn("Failed updating transaction {}", record.getSUMUP_ClientTransactionId(), ex); } }); return BulkUpdateByQueryResult.builder() .countOK(countOK.get()) .countError(countError.get()) .build(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java\de\metas\payment\sumup\repository\SumUpTransactionRepository.java
2
请在Spring Boot框架中完成以下Java代码
private Message messagePostProcess(final Message message) { if (msv3PeerAuthToken != null) { message.getMessageProperties().getHeaders().put(MSV3PeerAuthToken.NAME, msv3PeerAuthToken.toJson()); } return message; } public void requestAllUpdates() { convertAndSend(RabbitMQConfig.QUEUENAME_MSV3ServerReq...
{ convertAndSend(RabbitMQConfig.QUEUENAME_UserChangedEvents, MSV3UserChangedBatchEvent.builder() .event(event) .build()); } public void publishStockAvailabilityUpdatedEvent(@NonNull final MSV3StockAvailabilityUpdatedEvent event) { convertAndSend(RabbitMQConfig.QUEUENAME_StockAvailabilityUpdatedEvent, ev...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer\src\main\java\de\metas\vertical\pharma\msv3\server\peer\service\MSV3ServerPeerService.java
2
请完成以下Java代码
public class X_C_Workplace_Carrier_Product extends org.compiere.model.PO implements I_C_Workplace_Carrier_Product, org.compiere.model.I_Persistent { private static final long serialVersionUID = 535687672L; /** Standard Constructor */ public X_C_Workplace_Carrier_Product (final Properties ctx, final int C_Wo...
} @Override public void setC_Workplace_Carrier_Product_ID (final int C_Workplace_Carrier_Product_ID) { if (C_Workplace_Carrier_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Workplace_Carrier_Product_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Workplace_Carrier_Product_ID, C_Workplace_Carrier_Product...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Workplace_Carrier_Product.java
1
请在Spring Boot框架中完成以下Java代码
public PickingJobScheduleCollection list(@NonNull final PickingJobScheduleQuery query) { return pickingJobScheduleRepository.list(query); } public Stream<PickingJobSchedule> stream(@NonNull final PickingJobScheduleQuery query) { return pickingJobScheduleRepository.stream(query); } public void markAsProcesse...
final Quantity qtyScheduledForPicking = pickingJobShipmentScheduleService.getQtyScheduledForPicking(shipmentSchedule); return qtyToDeliver.subtract(qtyScheduledForPicking); } public void autoAssign(@NonNull final PickingJobScheduleAutoAssignRequest request) { PickingJobScheduleAutoAssignCommand.builder() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job_schedule\service\PickingJobScheduleService.java
2
请完成以下Java代码
private LookupValuesList getTargetExportStatusLookupValues(final LookupDataSourceContext context) { final I_EDI_Desadv desadv = desadvDAO.retrieveById(EDIDesadvId.ofRepoId(getRecord_ID())); final EDIExportStatus fromExportStatus = EDIExportStatus.ofCode(desadv.getEDI_ExportStatus()); return ChangeEDI_ExportSta...
return ChangeEDI_ExportStatusHelper.computeParameterDefaultValue(fromExportStatus); } @Override protected String doIt() throws Exception { final EDIExportStatus targetExportStatus = EDIExportStatus.ofCode(p_TargetExportStatus); final boolean isProcessed = ChangeEDI_ExportStatusHelper.computeIsProcessedByTarget...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\edi_desadv\ChangeEDI_ExportStatus_EDI_Desadv_SingleView.java
1
请完成以下Java代码
public long executeCount(CommandContext commandContext) { provideHistoryCleanupStrategy(commandContext); checkQueryOk(); return commandContext .getHistoricProcessInstanceManager() .findCleanableHistoricProcessInstancesReportCountByCriteria(this); } @Override public List<CleanableHist...
public boolean isTenantIdSet() { return isTenantIdSet; } public boolean isCompact() { return isCompact; } protected void provideHistoryCleanupStrategy(CommandContext commandContext) { String historyCleanupStrategy = commandContext.getProcessEngineConfiguration() .getHistoryCleanupStrategy();...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\CleanableHistoricProcessInstanceReportImpl.java
1
请在Spring Boot框架中完成以下Java代码
public Map<TopicPartition, Long> computeLags( Map<TopicPartition, Long> consumerGrpOffsets, Map<TopicPartition, Long> producerOffsets) { Map<TopicPartition, Long> lags = new HashMap<>(); for (Map.Entry<TopicPartition, Long> entry : consumerGrpOffsets.entrySet()) { Long producerOffs...
private KafkaConsumer<String, String> getKafkaConsumer( String bootstrapServerConfig) { Properties properties = new Properties(); properties.setProperty( ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapServerConfig); properties.setProperty( ConsumerConfig.KE...
repos\tutorials-master\spring-kafka-2\src\main\java\com\baeldung\spring\kafka\monitoring\service\LagAnalyzerService.java
2
请完成以下Java代码
public void setA_Asset_Info_Lic_ID (int A_Asset_Info_Lic_ID) { if (A_Asset_Info_Lic_ID < 1) set_ValueNoCheck (COLUMNNAME_A_Asset_Info_Lic_ID, null); else set_ValueNoCheck (COLUMNNAME_A_Asset_Info_Lic_ID, Integer.valueOf(A_Asset_Info_Lic_ID)); } /** Get A_Asset_Info_Lic_ID. @return A_Asset_Info_Lic_ID ...
{ return (String)get_Value(COLUMNNAME_A_License_No); } /** Set Policy Renewal Date. @param A_Renewal_Date Policy Renewal Date */ public void setA_Renewal_Date (Timestamp A_Renewal_Date) { set_Value (COLUMNNAME_A_Renewal_Date, A_Renewal_Date); } /** Get Policy Renewal Date. @return Policy Renewal Date ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Info_Lic.java
1
请完成以下Java代码
protected Boolean initialValue() { return super.initialValue(); } }; public boolean booleanValue() { final Boolean value = threadLocal.get(); return value == null ? false : value.booleanValue(); } /** * Enables the flag and returns an {@link IAutoCloseable} which restores the flag status. * * @...
// Return an auto-closeable which will put it back return new IAutoCloseable() { private volatile boolean closed = false; @Override public void close() { if (closed) { return; } // restore the old value threadLocal.set(valueOld); closed = true; } }; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\concurrent\AutoClosableThreadLocalBoolean.java
1
请完成以下Java代码
public class DBConvertUtil { protected final static Logger logger = LoggerFactory.getLogger(DBConvertUtil.class); private static final DateFormat DATE_TIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd"); /** * ...
if (length == 0) { return StringUtils.isBlank(value) ? null : Long.parseLong(value); } } return StringUtils.isBlank(value) ? null : Double.parseDouble(value); } else if (mysqlType.startsWith("datetime") || mysqlType.startsWith("time...
repos\spring-boot-leaning-master\2.x_data\3-3 使用 canal 将业务数据从 Mysql 同步到 MongoDB\spring-boot-canal-mongodb\src\main\java\com\neo\util\DBConvertUtil.java
1
请完成以下Java代码
public String isAuthenticated(HttpServletRequest request) { log.debug("REST request to check if the current user is authenticated"); return request.getRemoteUser(); } public String createToken(Authentication authentication, boolean rememberMe) { String authorities = authentication.getAu...
JWTToken(String idToken) { this.idToken = idToken; } @JsonProperty("id_token") String getIdToken() { return idToken; } void setIdToken(String idToken) { this.idToken = idToken; } } }
repos\tutorials-master\jhipster-8-modules\jhipster-8-monolithic\src\main\java\com\baeldung\jhipster8\web\rest\AuthenticateController.java
1
请完成以下Java代码
public MDistributionListLine[] getLines() { ArrayList<MDistributionListLine> list = new ArrayList<MDistributionListLine>(); BigDecimal ratioTotal = Env.ZERO; // String sql = "SELECT * FROM M_DistributionListLine WHERE M_DistributionList_ID=?"; PreparedStatement pstmt = null; try { pstmt = DB.prepareSt...
pstmt.close (); pstmt = null; } catch (Exception e) { pstmt = null; } // Update Ratio if (ratioTotal.compareTo(getRatioTotal()) != 0) { log.info("getLines - Set RatioTotal from " + getRatioTotal() + " to " + ratioTotal); setRatioTotal(ratioTotal); save(); } MDistributionListLine[] re...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MDistributionList.java
1
请完成以下Java代码
public class AvroSchemaBuilder { //@formatter:off static Schema clientIdentifierSchema() { return SchemaBuilder.record("ClientIdentifier") .namespace("com.baeldung.avro.model") .fields() .requiredString("hostName") .requiredString("ipAddress") .endRecor...
.array() .items() .stringType() .arrayDefault(emptyList()) .name("active") .type() .enumeration("Active") .symbols("YES", "NO") .noDefault() .endRecord(); } //@formatter:on }
repos\tutorials-master\apache-libraries\src\main\java\com\baeldung\apache\avro\util\AvroSchemaBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public AppDeploymentBuilder addBytes(String resourceName, byte[] bytes) { if (bytes == null) { throw new FlowableException("bytes array is null"); } AppResourceEntity resource = resourceEntityManager.create(); resource.setName(resourceName); resource.setBytes(bytes);...
} @Override public AppDeploymentBuilder tenantId(String tenantId) { deployment.setTenantId(tenantId); return this; } @Override public AppDeploymentBuilder enableDuplicateFiltering() { this.isDuplicateFilterEnabled = true; return this; } @Override public...
repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\repository\AppDeploymentBuilderImpl.java
2
请完成以下Spring Boot application配置
# 默认激活dev配置 spring: profiles: active: "dev" --- spring: config: activate: on-profile: "dev" name: dev.didispace.com --- spring: config: activate: on-profile: "test" name: test.didispa
ce.com --- spring: config: activate: on-profile: "prod" name: prod.didispace.com
repos\SpringBoot-Learning-master\2.x\chapter1-2\src\main\resources\application.yaml
2
请完成以下Java代码
public class StartProgressTaskCmd extends NeedsActiveTaskCmd<Void> { private static final long serialVersionUID = 1L; protected String userId; public StartProgressTaskCmd(String taskId, String userId) { super(taskId); this.userId = userId; } @Override protected Void execute(C...
HistoricTaskService historicTaskService = cmmnEngineConfiguration.getTaskServiceConfiguration().getHistoricTaskService(); historicTaskService.recordTaskInfoChange(task, updateTime, cmmnEngineConfiguration); if (cmmnEngineConfiguration.getHumanTaskStateInterceptor() != null) { cmmnEn...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\StartProgressTaskCmd.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable String getProfile() { return this.reference.getProfile(); } boolean isEmptyDirectory() { return this.emptyDirectory; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } StandardCo...
} catch (IOException ex) { // Ignore } } return this.resource.toString(); } private @Nullable File getUnderlyingFile(Resource resource) { try { if (resource instanceof ClassPathResource || resource instanceof FileSystemResource || resource instanceof FileUrlResource) { return resource.get...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\StandardConfigDataResource.java
2
请完成以下Java代码
public static String writeLineByLineExample() throws Exception { Path path = Helpers.fileOutOnePath(); return CsvWriterExamples.writeLineByLine(Helpers.fourColumnCsvString(), path); } public static String writeAllLinesExample() throws Exception { Path path = Helpers.fileOutAllPath(); ...
Path path = Helpers.fileOutBeanPath(); return BeanExamples.writeCsvFromBean(path); } public static void main(String[] args) { try { simplePositionBeanExample(); namedColumnBeanExample(); writeCsvFromBeanExample(); readLineByLineExample(); ...
repos\tutorials-master\libraries-data-io\src\main\java\com\baeldung\libraries\opencsv\Application.java
1
请完成以下Java代码
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) { String name = Objects.requireNonNull(config.getName(), "name must not be null"); String replacement = Objects.requireNonNull(config.getReplacement(), "replacement must not be null"); ServerHttpRequest req = exchange.getRequest...
public String toString() { String name = Objects.requireNonNull(config.getName(), "name must not be null"); String replacement = Objects.requireNonNull(config.getReplacement(), "replacement must not be null"); return filterToStringCreator(RewriteRequestParameterGatewayFilterFactory.this).append(name, replac...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RewriteRequestParameterGatewayFilterFactory.java
1
请在Spring Boot框架中完成以下Java代码
public void setEmbeddedValueResolver(StringValueResolver resolver) { this.embeddedValueResolver = resolver; } @Override public void setImportMetadata(AnnotationMetadata importMetadata) { Map<String, Object> attributeMap = importMetadata .getAnnotationAttributes(EnableRedisWebSession.class.getName()); Annot...
: new JdkSerializationRedisSerializer(this.classLoader); RedisSerializationContext<String, Object> serializationContext = RedisSerializationContext .<String, Object>newSerializationContext(defaultSerializer) .key(keySerializer) .hashKey(keySerializer) .build(); return new ReactiveRedisTemplate<>(this.re...
repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\config\annotation\web\server\RedisWebSessionConfiguration.java
2
请完成以下Java代码
public void save() { final FactTrxStrategy factTrxLinesStrategy = getFactTrxLinesStrategyEffective(); if (factTrxLinesStrategy != null) { factTrxLinesStrategy .createFactTrxLines(m_lines) .forEach(this::saveNew); } else { m_lines.forEach(this::saveNew); } } private void saveNew(FactLin...
// Case: no debit lines, no credit lines else if (factTrxLines.getType() == FactTrxLinesType.EmptyOrZero) { // nothing to do } else { throw new AdempiereException("Unknown type: " + factTrxLines.getType()); } // // also save the zero lines, if they are here factTrxLines.forEachZeroLine(this::sa...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Fact.java
1
请在Spring Boot框架中完成以下Java代码
public InsuranceContractQuantity getQuantity() { return quantity; } public void setQuantity(InsuranceContractQuantity quantity) { this.quantity = quantity; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getC...
sb.append("class InsuranceContractMaximumAmountForProductGroups {\n"); sb.append(" productGroupId: ").append(toIndentedString(productGroupId)).append("\n"); sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\InsuranceContractMaximumAmountForProductGroups.java
2
请完成以下Java代码
public Integer getDefaultStatus() { return defaultStatus; } public void setDefaultStatus(Integer defaultStatus) { this.defaultStatus = defaultStatus; } public String getPostCode() { return postCode; } public void setPostCode(String postCode) { this.postCode = p...
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", memberId=").append(memberId); sb.append(",...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsMemberReceiveAddress.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonDistributionJobLine { @NonNull DistributionJobLineId lineId; @NonNull String caption; @NonNull String productId; @NonNull String productName; @NonNull String uom; @NonNull BigDecimal qtyToMove; // // Pick From @NonNull JsonLocatorInfo pickFromLocator; // // Drop To @NonNull JsonLocatorInf...
.caption(productName) .productId(line.getProduct().getProductId().getAsString()) .productName(productName) .uom(line.getQtyToMove().getUOMSymbol()) .qtyToMove(line.getQtyToMove().toBigDecimal()) .pickFromLocator(JsonLocatorInfo.of(line.getPickFromLocator())) .dropToLocator(JsonLocatorInfo.of(lin...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\rest_api\json\JsonDistributionJobLine.java
2
请完成以下Java代码
public static DmnResourceEntityManager getResourceEntityManager() { return getResourceEntityManager(getCommandContext()); } public static DmnResourceEntityManager getResourceEntityManager(CommandContext commandContext) { return getDmnEngineConfiguration(commandContext).getResourceEntityMana...
} public static DmnRepositoryService getDmnRepositoryService() { return getDmnRepositoryService(getCommandContext()); } public static DmnRepositoryService getDmnRepositoryService(CommandContext commandContext) { return getDmnEngineConfiguration(commandContext).getDmnRepositoryServi...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\util\CommandContextUtil.java
1
请完成以下Java代码
public boolean isOK() { return error == null; } public boolean isError() { return error != null; } public ResultType getResult() { if (result == null) { throw toException(); } return result; } public ErrorType getError() { if (error == null) { throw new AdempiereException("Not an erro...
public AdempiereException toException() { if (error == null) { throw new AdempiereException("Not an error response: " + this); } if (errorCause != null) { return AdempiereException.wrapIfNeeded(errorCause) .setParameter("error", error); } else { return new AdempiereException(error.toStri...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java\de\metas\payment\paypal\PayPalClientResponse.java
1
请完成以下Java代码
public void run() { if (!X_AD_Scheduler.SCHEDULETYPE_CronSchedulingPattern.equals(m_model.getScheduleType())) { super.run(); return; } final String cronPattern = m_model.getCronPattern(); if (Check.isNotBlank(cronPattern) && SchedulingPattern.validate(cronPattern)) { cronScheduler = new it.sauron...
cronScheduler.start(); while (true) { if (!sleep()) { cronScheduler.stop(); break; } else if (!cronScheduler.isStarted()) { break; } } } else { super.run(); } } } // Scheduler
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\serverRoot\de.metas.adempiere.adempiere.serverRoot.base\src\main\java-legacy\org\compiere\server\Scheduler.java
1
请完成以下Java代码
public void setProcessed (boolean Processed) { 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) ...
/** WAITING_PAYER_APPROVAL = W */ public static final String STATUS_WAITING_PAYER_APPROVAL = "W"; /** APPROVED = A */ public static final String STATUS_APPROVED = "A"; /** VOIDED = V */ public static final String STATUS_VOIDED = "V"; /** COMPLETED = C */ public static final String STATUS_COMPLETED = "C"; /** Se...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Payment_Reservation.java
1
请在Spring Boot框架中完成以下Java代码
public class EvaluatorOptimizerWorkflow { private final CodeReviewClient codeReviewClient; static final ParameterizedTypeReference<Map<String, String>> mapClass = new ParameterizedTypeReference<>() {}; public EvaluatorOptimizerWorkflow(CodeReviewClient codeReviewClient) { this.codeReviewClient = c...
Map<String, String> response = responseSpec.entity(mapClass); System.out.println("PR REVIEW OUTCOME: " + response); return response; } private Map<String, String> evaluate(Map<String, String> latestSuggestions, String task) { String request = EVALUATE_PROPOSED_IMPROVEMENTS_PROMPT + ...
repos\tutorials-master\spring-ai-modules\spring-ai-agentic-patterns\src\main\java\com\baeldung\springai\agenticpatterns\workflows\evaluator\EvaluatorOptimizerWorkflow.java
2
请在Spring Boot框架中完成以下Java代码
public List<HistoricVariableInstanceEntity> findHistoricalVariableInstancesByTaskId(String taskId) { return dataManager.findHistoricVariableInstancesByTaskId(taskId); } @Override public List<HistoricVariableInstanceEntity> findHistoricalVariableInstancesByScopeIdAndScopeType(String scopeId, String ...
} @Override public void deleteHistoricVariableInstancesForNonExistingProcessInstances() { dataManager.deleteHistoricVariableInstancesForNonExistingProcessInstances(); } @Override public void deleteHistoricVariableInstancesForNonExistingCaseInstances() { dataManager.deleteHistor...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\persistence\entity\HistoricVariableInstanceEntityManagerImpl.java
2
请在Spring Boot框架中完成以下Java代码
public Mono<User> updateUser(String id, User user) { return this.userDao.findById(id) .flatMap(u -> { u.setName(user.getName()); u.setAge(user.getAge()); u.setDescription(user.getDescription()); return this.userDao.s...
public Mono<Long> getUserByConditionCount(User user) { Query query = getQuery(user); return template.count(query, User.class); } private Query getQuery(User user) { Query query = new Query(); Criteria criteria = new Criteria(); if (!StringUtils.isEmpty(user.getName())) ...
repos\SpringAll-master\58.Spring-Boot-WebFlux-crud\src\main\java\com\example\webflux\service\UserService.java
2
请完成以下Java代码
public ResponseEntity<JsonResponseContactList> retrieveContactsSince( @ApiParam(value = SINCE_DOC, allowEmptyValue = true) // @RequestParam(name = "since", required = false) // @Nullable final Long epochTimestampMillis, @ApiParam(value = NEXT_DOC, allowEmptyValue = true) // @RequestParam(name = "next",...
for (final JsonRequestContactUpsertItem requestItem : contacts.getRequestItems()) { final JsonResponseUpsertItem responseItem = persister.persist( IdentifierString.of(requestItem.getContactIdentifier()), requestItem.getContact(), syncAdvise); response.responseItem(responseItem); } return new ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\bpartner\ContactRestController.java
1
请完成以下Java代码
public org.compiere.model.I_AD_Table getDLM_Referencing_Table() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_DLM_Referencing_Table_ID, org.compiere.model.I_AD_Table.class); } @Override public void setDLM_Referencing_Table(final org.compiere.model.I_AD_Table DLM_Referencing_Table) { set_ValueFromP...
* Set DLM aktiviert. * * @param IsDLM * Die Datensätze einer Tabelle mit aktiviertem DLM können vom System unterschiedlichen DLM-Levels zugeordnet werden */ @Override public void setIsDLM(final boolean IsDLM) { throw new IllegalArgumentException("IsDLM is virtual column"); } /** * Get DLM ...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition_Config_Line.java
1
请在Spring Boot框架中完成以下Java代码
private Instant getDateTrx() {return _dateTrx;} @NonNull private Instant getDateAcct() { final Instant invoiceDateAcct = getInvoice().getDateAcct().toInstant(); final Instant inoutDateAcct = getInOut().getDateAcct().toInstant(); return invoiceDateAcct.isAfter(inoutDateAcct) ? invoiceDateAcct : inoutDateAcct; ...
} private ProductId getProductId() { final I_M_InOutLine inoutLine = getInOutLine(); final ProductId inoutLineProductId = ProductId.ofRepoId(inoutLine.getM_Product_ID()); // // Make sure M_Product_ID matches if (getType().isMaterial()) { final I_C_InvoiceLine invoiceLine = getInvoiceLine(); final ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\matchinv\service\MatchInvBuilder.java
2
请完成以下Java代码
public class Bird extends Animal { private boolean walks; public Bird() { super("bird"); } public Bird(String name, boolean walks) { super(name); setWalks(walks); } public Bird(String name) { super(name); } @Override public String eats() {
return "grains"; } @Override protected String getSound() { return "chaps"; } public boolean walks() { return walks; } public void setWalks(boolean walks) { this.walks = walks; } }
repos\tutorials-master\core-java-modules\core-java-11-2\src\main\java\com\baeldung\reflection\Bird.java
1
请完成以下Java代码
public java.lang.String getExternalSystemValue() { return get_ValueAsString(COLUMNNAME_ExternalSystemValue); } @Override public void setIsAutoSendCustomers (final boolean IsAutoSendCustomers) { set_Value (COLUMNNAME_IsAutoSendCustomers, IsAutoSendCustomers); } @Override public boolean isAutoSendCustomers...
{ return get_ValueAsBoolean(COLUMNNAME_IsSyncHUsOnMaterialReceipt); } @Override public void setIsSyncHUsOnProductionReceipt (final boolean IsSyncHUsOnProductionReceipt) { set_Value (COLUMNNAME_IsSyncHUsOnProductionReceipt, IsSyncHUsOnProductionReceipt); } @Override public boolean isSyncHUsOnProductionRecei...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_GRSSignum.java
1
请完成以下Java代码
public void setName(String name) { this.name = name; } public Integer getChargeType() { return chargeType; } public void setChargeType(Integer chargeType) { this.chargeType = chargeType; } public BigDecimal getFirstWeight() { return firstWeight; } publ...
public String getDest() { return dest; } public void setDest(String dest) { this.dest = dest; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ")....
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsFeightTemplate.java
1
请完成以下Spring Boot application配置
# Spring Boot main application.properties for Multi-Site (WAN) Caching Example spring.profiles.group.server-site1=locator-manager,gateway-receiver,gateway-sender spring.p
rofiles.group.server-site2=locator-manager,gateway-receiver,gateway-sender
repos\spring-boot-data-geode-main\spring-geode-samples\caching\multi-site\src\main\resources\application.properties
2
请完成以下Java代码
public final class WebServerNamespace { private static final String WEB_SERVER_CONTEXT_CLASS = "org.springframework.boot.web.server.context.WebServerApplicationContext"; /** * {@link WebServerNamespace} that represents the main server. */ public static final WebServerNamespace SERVER = new WebServerNamespace("...
public int hashCode() { return this.value.hashCode(); } @Override public String toString() { return this.value; } /** * Factory method to create a new {@link WebServerNamespace} from a value. If the * context is {@code null} or not a web server context then {@link #SERVER} is * returned. * @param con...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\web\WebServerNamespace.java
1
请在Spring Boot框架中完成以下Java代码
public String getPropertyName() { return this.propertyName; } /** * Return the origin or the property or {@code null}. * @return the property origin */ public @Nullable Origin getOrigin() { return this.origin; } /** * Throw an {@link InactiveConfigDataAccessException} if the given * {@link ConfigDa...
* @param name the name to check */ static void throwIfPropertyFound(ConfigDataEnvironmentContributor contributor, ConfigurationPropertyName name) { ConfigurationPropertySource source = contributor.getConfigurationPropertySource(); ConfigurationProperty property = (source != null) ? source.getConfigurationPropert...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\InactiveConfigDataAccessException.java
2
请完成以下Java代码
public final String getText() { if (editor == null) { return null; } final Object value = editor.getValue(); if (value == null) { return null; } return value.toString(); } @Override public Object getParameterValue(final int index, final boolean returnValueTo) { final Object field; if (...
final CEditor editor = (CEditor)field; return editor.getValue(); } else { throw new AdempiereException("Component type not supported - " + field); } } /** * Method called when one of the parameter fields changed */ protected void onFieldChanged() { // parent.executeQuery(); we don't want to que...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\search\AbstractInfoQueryCriteriaGeneral.java
1
请完成以下Java代码
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) { return null; } @Override public Class<?> getType(ELContext context, Object base, Object property) { return resolve(context, base, property) ? Object.class : null; } @Override public Objec...
/** * Set property value * * @param property * property name * @param value * property value */ public void setProperty(String property, Object value) { map.put(property, value); } /** * Test property * * @param property *...
repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\util\RootPropertyResolver.java
1
请在Spring Boot框架中完成以下Java代码
public void setHeartbeatInterval(@Nullable Duration heartbeatInterval) { this.heartbeatInterval = heartbeatInterval; } } public static class Controlconnection { /** * Timeout to use for control queries. */ private @Nullable Duration timeout; public @Nullable Duration getTimeout() { return this...
public @Nullable Integer getMaxRequestsPerSecond() { return this.maxRequestsPerSecond; } public void setMaxRequestsPerSecond(@Nullable Integer maxRequestsPerSecond) { this.maxRequestsPerSecond = maxRequestsPerSecond; } public @Nullable Duration getDrainInterval() { return this.drainInterval; } p...
repos\spring-boot-4.0.1\module\spring-boot-cassandra\src\main\java\org\springframework\boot\cassandra\autoconfigure\CassandraProperties.java
2
请完成以下Java代码
private Optional<Resource[]> retrieveResources() throws IOException { Optional<Resource[]> resources = Optional.empty(); Resource connectorRootPath = resourceLoader.getResource(connectorRoot); if (connectorRootPath.exists()) { return Optional.ofNullable(resourceLoader.getResources(c...
protected void validate(List<ConnectorDefinition> connectorDefinitions) { if (!connectorDefinitions.isEmpty()) { Set<String> processedNames = new HashSet<>(); for (ConnectorDefinition connectorDefinition : connectorDefinitions) { String name = connectorDefinition.getName...
repos\Activiti-develop\activiti-core-common\activiti-spring-connector\src\main\java\org\activiti\core\common\spring\connector\ConnectorDefinitionService.java
1
请完成以下Java代码
public Store where(Condition condition) { return new Store(getQualifiedName(), aliased() ? this : null, null, condition); } /** * Create an inline derived table from this table */ @Override public Store where(Collection<? extends Condition> conditions) { return where(DSL.and(c...
public Store where(@Stringly.SQL String condition) { return where(DSL.condition(condition)); } /** * Create an inline derived table from this table */ @Override @PlainSQL public Store where(@Stringly.SQL String condition, Object... binds) { return where(DSL.condition(condi...
repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\jointables\public_\tables\Store.java
1
请完成以下Java代码
public String getNormalName() { return "AI model"; } }, API_KEY(44); @Getter private final int protoNumber; // Corresponds to EntityTypeProto @Getter private final String tableName; @Getter private final String normalName = StringUtils.capitalize(Strings.CS.removeSta...
this.protoNumber = protoNumber; this.tableName = tableName; } public boolean isOneOf(EntityType... types) { if (types == null) { return false; } for (EntityType type : types) { if (this == type) { return true; } } ...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\EntityType.java
1
请在Spring Boot框架中完成以下Java代码
public boolean determineQosEnabled() { if (this.qosEnabled != null) { return this.qosEnabled; } return (getDeliveryMode() != null || getPriority() != null || getTimeToLive() != null); } public @Nullable Boolean getQosEnabled() { return this.qosEnabled; } public void setQosEnabled(@Nullable Boo...
} public boolean isTransacted() { return this.transacted; } public void setTransacted(boolean transacted) { this.transacted = transacted; } } } public enum DeliveryMode { /** * Does not require that the message be logged to stable storage. This is the * lowest-overhead delivery mod...
repos\spring-boot-4.0.1\module\spring-boot-jms\src\main\java\org\springframework\boot\jms\autoconfigure\JmsProperties.java
2
请完成以下Java代码
public class AbstractStartCaseInstanceBeforeContext { protected String businessKey; protected String businessStatus; protected String caseInstanceName; protected Map<String, Object> variables; protected Case caseModel; protected CaseDefinition caseDefinition; protected CmmnModel cmmnModel; ...
} public Case getCaseModel() { return caseModel; } public void setCaseModel(Case caseModel) { this.caseModel = caseModel; } public CaseDefinition getCaseDefinition() { return caseDefinition; } public void setCaseDefinition(CaseDefinition caseDefinition) { ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\interceptor\AbstractStartCaseInstanceBeforeContext.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable String getBundle() { return this.bundle; } public void setBundle(@Nullable String bundle) { this.bundle = bundle; } } public static class Timeouts { /** * Bucket connect timeout. */ private Duration connect = Duration.ofSeconds(10); /** * Bucket disconnect timeout. ...
} public void setDisconnect(Duration disconnect) { this.disconnect = disconnect; } public Duration getKeyValue() { return this.keyValue; } public void setKeyValue(Duration keyValue) { this.keyValue = keyValue; } public Duration getKeyValueDurable() { return this.keyValueDurable; } pub...
repos\spring-boot-4.0.1\module\spring-boot-couchbase\src\main\java\org\springframework\boot\couchbase\autoconfigure\CouchbaseProperties.java
2
请在Spring Boot框架中完成以下Java代码
public class DemoController { @Autowired private OrderProperties orderProperties; /** * 测试 @ConfigurationProperties 注解的配置属性类 */ @GetMapping("/test01") public OrderProperties test01() { return orderProperties; } @Value(value = "${order.pay-timeout-seconds}") private I...
/** * 测试 @Value 注解的属性 */ @GetMapping("/test02") public Map<String, Object> test02() { return new JSONObject().fluentPut("payTimeoutSeconds", payTimeoutSeconds) .fluentPut("createFrequencySeconds", createFrequencySeconds); } private Logger logger = LoggerFactory.getLogg...
repos\SpringBoot-Labs-master\labx-05-spring-cloud-alibaba-nacos-config\labx-05-sca-nacos-config-auto-refresh\src\main\java\cn\iocoder\springcloudalibaba\labx5\nacosdemo\controller\DemoController.java
2
请完成以下Java代码
public class JaasSubjectHolder implements Serializable { private static final long serialVersionUID = 8174713761131577405L; private Subject jaasSubject; private String username; private Map<String, byte[]> savedTokens = new HashMap<String, byte[]>(); public JaasSubjectHolder(Subject jaasSubject) { this.jaas...
public String getUsername() { return this.username; } public Subject getJaasSubject() { return this.jaasSubject; } public void addToken(String targetService, byte[] outToken) { this.savedTokens.put(targetService, outToken); } public byte[] getToken(String principalName) { return this.savedTokens.get(pr...
repos\spring-security-main\kerberos\kerberos-core\src\main\java\org\springframework\security\kerberos\authentication\JaasSubjectHolder.java
1
请完成以下Java代码
public ResponseEntity<PageResult<JobDto>> queryJob(JobQueryCriteria criteria, Pageable pageable){ return new ResponseEntity<>(jobService.queryAll(criteria, pageable),HttpStatus.OK); } @Log("新增岗位") @ApiOperation("新增岗位") @PostMapping @PreAuthorize("@el.check('job:add')") public ResponseEn...
jobService.update(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @Log("删除岗位") @ApiOperation("删除岗位") @DeleteMapping @PreAuthorize("@el.check('job:del')") public ResponseEntity<Object> deleteJob(@RequestBody Set<Long> ids){ // 验证是否被用户关联 jobService.verifi...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\rest\JobController.java
1
请完成以下Java代码
static final class BeanPropertiesStandalone extends BeanELResolver.BeanProperties { BeanPropertiesStandalone(Class<?> type) throws ELException { super(type); PropertyDescriptor[] pds = getPropertyDescriptors(this.type); for (PropertyDescriptor pd : pds) { thi...
private final Method readMethod; private final Method writeMethod; BeanPropertyStandalone(Class<?> owner, PropertyDescriptor pd) { super(owner, pd.getType()); name = pd.getName(); readMethod = pd.getReadMethod(); writeMethod = pd.getWriteMethod(); ...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\javax\el\BeanSupportStandalone.java
1
请在Spring Boot框架中完成以下Java代码
public class Group { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; @OneToOne private User administrator; @OneToMany(mappedBy = "id") private Set<User> users = new HashSet<>(); public void addUser(User user) { users.add(user); ...
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 User getAdministrator() { return administrator; } public ...
repos\tutorials-master\persistence-modules\spring-data-jpa-repo-4\src\main\java\com\baeldung\spring\data\persistence\findvsget\entity\Group.java
2
请完成以下Java代码
protected DataBuffer wrap(ByteBuf byteBuf, ServerHttpResponse response) { DataBufferFactory bufferFactory = response.bufferFactory(); if (bufferFactory instanceof NettyDataBufferFactory) { NettyDataBufferFactory factory = (NettyDataBufferFactory) bufferFactory; return factory.wrap(byteBuf); } // MockServe...
} // TODO: use framework if possible private boolean isStreamingMediaType(@Nullable MediaType contentType) { if (contentType != null) { for (int i = 0; i < streamingMediaTypes.size(); i++) { if (streamingMediaTypes.get(i).isCompatibleWith(contentType)) { return true; } } } return false; } ...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\NettyWriteResponseFilter.java
1
请在Spring Boot框架中完成以下Java代码
public void setQUANTITY(String value) { this.quantity = value; } /** * Gets the value of the measurementunit property. * * @return * possible object is * {@link String } * */ public String getMEASUREMENTUNIT() { return measurementunit; } ...
* possible object is * {@link String } * */ public String getDATE3() { return date3; } /** * Sets the value of the date3 property. * * @param value * allowed object is * {@link String } * */ public void setDATE3(String...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DPLQU1.java
2
请完成以下Java代码
public void setCostingMethod (final java.lang.String CostingMethod) { set_Value (COLUMNNAME_CostingMethod, CostingMethod); } @Override public java.lang.String getCostingMethod() { return get_ValueAsString(COLUMNNAME_CostingMethod); } @Override public void setDescription (final @Nullable java.lang.String ...
return get_ValueAsBoolean(COLUMNNAME_IsCalculated); } @Override public void setM_CostElement_ID (final int M_CostElement_ID) { if (M_CostElement_ID < 1) set_ValueNoCheck (COLUMNNAME_M_CostElement_ID, null); else set_ValueNoCheck (COLUMNNAME_M_CostElement_ID, M_CostElement_ID); } @Override public in...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_CostElement.java
1
请完成以下Java代码
public String getId() { return null; } @Override public void setId(String id) {} @Override public boolean isInserted() { return false; } @Override public void setInserted(boolean inserted) {} @Override public boolean isUpdated() { return false; } ...
@Override public void setName(String name) {} @Override public void setProcessInstanceId(String processInstanceId) {} @Override public void setExecutionId(String executionId) {} @Override public Object getValue() { return variableValue; } @Override public void setValu...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\TransientVariableInstance.java
1
请完成以下Java代码
public void changeState() { if (runtimeService == null) { throw new FlowableException("CmmnRuntimeService cannot be null, Obtain your builder instance from the CmmnRuntimeService to access this feature"); } runtimeService.changePlanItemState(this); } public String getCaseIns...
return changePlanItemIds; } public Set<ChangePlanItemIdWithDefinitionIdMapping> getChangePlanItemIdsWithDefinitionId() { return changePlanItemIdsWithDefinitionId; } public Set<ChangePlanItemDefinitionWithNewTargetIdsMapping> getChangePlanItemDefinitionWithNewTargetIds() { retur...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\ChangePlanItemStateBuilderImpl.java
1
请在Spring Boot框架中完成以下Java代码
public String getAuthToken() { return authToken; } /** * Sets the value of the authToken property. * * @param value * allowed object is * {@link String } * */ public void setAuthToken(String value) { this.authToken = value; } /** ...
* {@link String } * */ public String getDepot() { return depot; } /** * Sets the value of the depot property. * * @param value * allowed object is * {@link String } * */ public void setDepot(String value) { this.depot =...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\ws\loginservice\v2_0\types\Login.java
2
请完成以下Java代码
public BigDecimal getA_Purchase_Option_Credit_Per () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Purchase_Option_Credit_Per); if (bd == null) return Env.ZERO; return bd; } /** Set Option Purchase Price. @param A_Purchase_Price Option Purchase Price */ public void setA_Purchase_Price (BigDec...
{ Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Text Message. @param TextMsg Text Message */ public void setTextMsg (String TextMsg) { set_Value (COLUMNNAME_TextMsg, TextMsg); } /** Get Text Message. @return Text Messag...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Info_Fin.java
1
请完成以下Java代码
public void setProcessDefinitionIdIn(String[] processDefinitionIdIn) { this.processDefinitionIdIn = processDefinitionIdIn; } public String[] getProcessInstanceIdIn() { return processInstanceIdIn; } @CamundaQueryParam(value="processInstanceIdIn", converter = StringArrayConverter.class) public void se...
} @CamundaQueryParam(value="activityIdIn", converter = StringArrayConverter.class) public void setActivityIdIn(String[] activityIdIn) { this.activityIdIn = activityIdIn; } protected boolean isValidSortByValue(String value) { return VALID_SORT_BY_VALUES.contains(value); } protected String getOrder...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\cockpit\impl\plugin\base\dto\query\IncidentQueryDto.java
1
请完成以下Java代码
public class GitHubExample { static final HttpTransport HTTP_TRANSPORT = new NetHttpTransport(); // static final HttpTransport HTTP_TRANSPORT = new ApacheHttpTransport(); static final JsonFactory JSON_FACTORY = new JacksonFactory(); // static final JsonFactory JSON_FACTORY = new GsonFactory(); priv...
request = requestFactory.buildGetRequest(url); ExecutorService executor = Executors.newSingleThreadExecutor(); Future<HttpResponse> responseFuture = request.executeAsync(executor); User eugen = responseFuture.get().parseAs(User.class); System.out.println(eugen); executor.shutdown...
repos\tutorials-master\libraries-http-2\src\main\java\com\baeldung\googlehttpclientguide\GitHubExample.java
1
请在Spring Boot框架中完成以下Java代码
public String getDefaultVersion() { return defaultVersion; } public void setDefaultVersion(String defaultVersion) { this.defaultVersion = defaultVersion; } public boolean isDetectSupportedVersions() { return detectSupportedVersions; } public void setDetectSupportedVersions(boolean detectSupportedVersions...
public boolean isRequired() { return required; } public void setRequired(boolean required) { this.required = required; } public List<String> getSupportedVersions() { return supportedVersions; } public void setSupportedVersions(List<String> supportedVersions) { this.supportedVersions = supportedVersions...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\VersionProperties.java
2
请完成以下Java代码
public String refreshHeadToken(String oldToken) { if(StrUtil.isEmpty(oldToken)){ return null; } String token = oldToken.substring(tokenHead.length()); if(StrUtil.isEmpty(token)){ return null; } //token校验不通过 Claims claims = getClaimsFromToke...
} /** * 判断token在指定时间内是否刚刚刷新过 * @param token 原token * @param time 指定时间(秒) */ private boolean tokenRefreshJustBefore(String token, int time) { Claims claims = getClaimsFromToken(token); Date created = claims.get(CLAIM_KEY_CREATED, Date.class); Date refreshDate = new Da...
repos\mall-master\mall-security\src\main\java\com\macro\mall\security\util\JwtTokenUtil.java
1
请完成以下Java代码
public static SessionFactory getSessionFactoryByProperties(Properties properties) throws IOException { ServiceRegistry serviceRegistry = configureServiceRegistry(properties); return makeSessionFactory(serviceRegistry); } private static SessionFactory makeSessionFactory(ServiceRegistry serviceRe...
return configureServiceRegistry(getProperties()); } private static ServiceRegistry configureServiceRegistry(Properties properties) throws IOException { return new StandardServiceRegistryBuilder().applySettings(properties) .build(); } public static Properties getProperties() thr...
repos\tutorials-master\persistence-modules\hibernate-enterprise\src\main\java\com\baeldung\hibernate\HibernateUtil.java
1
请完成以下Java代码
public void setId(Integer value) { set(0, value); } /** * Getter for <code>public.Book.id</code>. */ public Integer getId() { return (Integer) get(0); } /** * Setter for <code>public.Book.author_id</code>. */ public void setAuthorId(Integer value) { ...
// ------------------------------------------------------------------------- // Primary key information // ------------------------------------------------------------------------- @Override public Record1<Integer> key() { return (Record1) super.key(); } // ----------------------------...
repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\jointables\public_\tables\records\BookRecord.java
1
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .omitNullValues() .add("sentMsg", sentMsg) .add("sentConnectionError", sentConnectionError) .add("messageId", messageId) .toString(); } @JsonIgnore public boolean isSentOK() { return Util.same(sentMsg, SENT_OK); } public...
public void throwIfNotOK(@Nullable final Consumer<EMailSendException> exceptionDecorator) { if (!isSentOK()) { final EMailSendException exception = new EMailSendException(this); if (exceptionDecorator != null) { exceptionDecorator.accept(exception); } throw exception; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\email\EMailSentStatus.java
1
请完成以下Java代码
public static LMQRCode fromGlobalQRCode(final GlobalQRCode globalQRCode) { if (!isHandled(globalQRCode)) { throw new AdempiereException("Invalid Leich und Mehl QR Code") .setParameter("globalQRCode", globalQRCode); // avoid adding it to error message, it might be quite long } final GlobalQRCodeVersion...
{ // NOTE to dev: keep in sync with huQRCodes.js, parseQRCodePayload_LeichMehl_v1 try { final List<String> parts = SPLITTER.splitToList(globalQRCode.getPayloadAsJson()); return LMQRCode.builder() .code(globalQRCode) .weightInKg(new BigDecimal(parts.get(0))) .bestBeforeDate(parts.size() >= 2 ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\leich_und_mehl\LMQRCodeParser.java
1
请完成以下Java代码
public String toString() { final String permissionsName = getClass().getSimpleName(); final Collection<MobileApplicationPermission> permissionsList = byMobileApplicationId.values(); final StringBuilder sb = new StringBuilder(); sb.append(permissionsName).append(": "); if (permissionsList.isEmpty()) { s...
return sb.toString(); } public boolean isAllowAccess(@NonNull final MobileApplicationRepoId mobileApplicationId) { final MobileApplicationPermission permission = byMobileApplicationId.get(mobileApplicationId); return permission != null && permission.isAllowAccess(); } public boolean isAllowAction(@NonNull fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\mobile_application\MobileApplicationPermissions.java
1
请完成以下Java代码
public class DefaultTaskFormHandler extends DefaultFormHandler implements TaskFormHandler { public TaskFormData createTaskForm(TaskEntity task) { TaskFormDataImpl taskFormData = new TaskFormDataImpl(); TaskDefinition taskDefinition = task.getTaskDefinition(); FormDefinition formDefinition = taskDefinit...
if(camundaFormDefinitionBinding.equals(FORM_REF_BINDING_VERSION) && camundaFormDefinitionVersion != null) { Object formRefVersionValue = camundaFormDefinitionVersion.getValue(task); if(formRefVersionValue != null) { ref.setVersion(Integer.parseInt((String)formRefVersionValue)); ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\form\handler\DefaultTaskFormHandler.java
1
请完成以下Java代码
public MqttQoS getQos() { return qos; } public Builder setQos(MqttQoS qos) { if(qos == null){ throw new NullPointerException("qos"); } this.qos = qos; return this; } public MqttLastWill build(){ ret...
} @Override public int hashCode() { int result = topic.hashCode(); result = 31 * result + message.hashCode(); result = 31 * result + (retain ? 1 : 0); result = 31 * result + qos.hashCode(); return result; } @Override public String toString() { final ...
repos\thingsboard-master\netty-mqtt\src\main\java\org\thingsboard\mqtt\MqttLastWill.java
1
请完成以下Java代码
class ValueAndUomSQLRowLoader implements SQLRowLoader { @NonNull private final KPIField valueField; @Nullable private final KPIField uomField; ValueAndUomSQLRowLoader(final List<KPIField> fields) { this.uomField = extractUOMField(fields); this.valueField = extractValueField(fields, uomField); } @Nullable p...
for (final KPIField field : fields) { if (!excludeFieldsList.contains(field)) { return field; } } throw new AdempiereException("Cannot determine value field: " + fields); } @Override public void loadRowToResult(@NonNull final KPIDataResult.Builder data, final @NonNull ResultSet rs) throws SQLExc...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\kpi\data\sql\ValueAndUomSQLRowLoader.java
1
请完成以下Java代码
public Execution getExecution() { return associationManager.getExecution(); } /** * @see #getExecution() */ public String getExecutionId() { Execution e = getExecution(); return e != null ? e.getId() : null; } /** * Returns the {@link ProcessInstance} currently associated or 'null' *...
} // internal implementation ////////////////////////////////////////////////////////// protected void assertExecutionAssociated() { if (associationManager.getExecution() == null) { throw new ProcessEngineCdiException("No execution associated. Call busniessProcess.associateExecutionById() or businessPro...
repos\camunda-bpm-platform-master\engine-cdi\core\src\main\java\org\camunda\bpm\engine\cdi\BusinessProcess.java
1
请完成以下Java代码
public int getAge() { return age; } public void setAge(int age) { this.age = age; } @PrePersist private void prePersist() { logger.info("@PrePersist callback ..."); } @PreUpdate private void preUpdate() { logger.info("@PreUpdate callback ..."); } ...
logger.info("@PostLoad callback ..."); } @PostPersist private void postPersist() { logger.info("@PostPersist callback ..."); } @PostUpdate private void postUpdate() { logger.info("@PostUpdate callback ..."); } @PostRemove private void postRemove() { logger....
repos\Hibernate-SpringBoot-master\HibernateSpringBootJpaCallbacks\src\main\java\com\bookstore\entity\Author.java
1
请完成以下Java代码
public class DeleteTimerJobCmd implements Command<Object>, Serializable { private static final Logger log = LoggerFactory.getLogger(DeleteTimerJobCmd.class); private static final long serialVersionUID = 1L; protected String timerJobId; public DeleteTimerJobCmd(String timerJobId) { this.timerJ...
log.debug("Deleting job {}", timerJobId); } TimerJobEntity job = commandContext.getTimerJobEntityManager().findById(timerJobId); if (job == null) { throw new ActivitiObjectNotFoundException("No timer job found with id '" + timerJobId + "'", Job.class); } // We need ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\DeleteTimerJobCmd.java
1
请完成以下Java代码
public class MAssetChange extends X_A_Asset_Change { /** * */ private static final long serialVersionUID = 5906751299228645904L; /** * Default Constructor * @param ctx context * @param M_InventoryLine_ID line */ public MAssetChange (Properties ctx, int A_Asset_Change_ID, String trxName) { super (c...
*/ public MAssetChange (Properties ctx, ResultSet rs, String trxName) { super (ctx, rs, trxName); } // MInventoryLine /** * Before Save * @param newRecord new * @return true */ protected boolean beforeSave (boolean newRecord) { if (getA_Reval_Cal_Method() == null) setA_Reval_Cal_Method("DFT");...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MAssetChange.java
1
请完成以下Java代码
public Object getTransientVariable(String variableName) { if (transientVariabes != null && transientVariabes.containsKey(variableName)) { return transientVariabes.get(variableName).getValue(); } VariableScopeImpl parentScope = getParentVariableScope(); if (parentScope != nul...
if (transientVariabes != null && transientVariabes.containsKey(variableName)) { removeTransientVariableLocal(variableName); return; } VariableScopeImpl parentVariableScope = getParentVariableScope(); if (parentVariableScope != null) { parentVariableScope.remov...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\VariableScopeImpl.java
1
请完成以下Java代码
public OAuth2AccessToken sendRefreshGrant(String refreshTokenValue) { MultiValueMap<String, String> params = new LinkedMultiValueMap<>(); params.add("grant_type", "refresh_token"); params.add("refresh_token", refreshTokenValue); HttpHeaders headers = new HttpHeaders(); addAuthent...
protected String getClientId() { String clientId = oAuth2Properties.getWebClientConfiguration().getClientId(); if (clientId == null) { throw new InvalidClientException("no client-id configured in application properties"); } return clientId; } /** * Returns the c...
repos\tutorials-master\jhipster-modules\jhipster-uaa\gateway\src\main\java\com\baeldung\jhipster\gateway\security\oauth2\OAuth2TokenEndpointClientAdapter.java
1
请在Spring Boot框架中完成以下Java代码
public static class ContainedPackagingItems { @XmlValue protected BigDecimal value; @XmlAttribute(name = "Unit", namespace = "http://erpel.at/schemas/1p0/documents") protected String unit; @XmlAttribute(name = "SupplierUnit", namespace = "http://erpel.at/sche...
/** * Packaging unit type used by the supplier. If customer's and supplier's packaging unit type is different this should be used for suppliers's packaging unit type. * * @return * possible object is * {@link String } * ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ConsignmentPackagingSequenceType.java
2
请在Spring Boot框架中完成以下Java代码
public class ChainWorkflow { private final OpsClient opsClient; public ChainWorkflow(OpsClient opsClient) { this.opsClient = opsClient; } public String opsPipeline(String userInput) { String response = userInput; System.out.printf("User input: [%s]\n", response); for ...
// Call the ops client with the new request and get the new response. ChatClient.ChatClientRequestSpec requestSpec = opsClient.prompt(request); ChatClient.CallResponseSpec responseSpec = requestSpec.call(); response = responseSpec.content(); System.out.printf("OUTCOME: %s...
repos\tutorials-master\spring-ai-modules\spring-ai-agentic-patterns\src\main\java\com\baeldung\springai\agenticpatterns\workflows\chain\ChainWorkflow.java
2
请完成以下Java代码
public static class Stop { /** * Command used to stop Docker Compose. */ private StopCommand command = StopCommand.STOP; /** * Timeout for stopping Docker Compose. Use '0' for forced stop. */ private Duration timeout = Duration.ofSeconds(10); /** * Arguments to pass to the stop command. *...
} public Duration getTimeout() { return this.timeout; } public void setTimeout(Duration timeout) { this.timeout = timeout; } public Tcp getTcp() { return this.tcp; } /** * Readiness wait strategies. */ public enum Wait { /** * Always perform readiness checks. */ ALWAYS,...
repos\spring-boot-4.0.1\core\spring-boot-docker-compose\src\main\java\org\springframework\boot\docker\compose\lifecycle\DockerComposeProperties.java
1
请在Spring Boot框架中完成以下Java代码
public DataSource dataSource2() { final DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("com.mysql.cj.jdbc.Driver"); dataSource.setUrl(env.getProperty("mysql.url")); dataSource.setUsername(env.getProperty("mysql.user") != null ? env.getP...
hibernateProperties.setProperty("hibernate.hbm2ddl.auto", env.getProperty("mysql-hibernate.hbm2ddl.auto")); hibernateProperties.setProperty("hibernate.dialect", env.getProperty("mysql-hibernate.dialect")); hibernateProperties.setProperty("hibernate.show_sql", env.getProperty("mysql-hibernate.show_sql") ...
repos\tutorials-master\spring-boot-modules\spring-boot-autoconfiguration\src\main\java\com\baeldung\autoconfiguration\MySQLAutoconfiguration.java
2