instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public static Optional<WritableResource> asWritableResource(@Nullable Resource resource) { return Optional.ofNullable(resource) .filter(WritableResource.class::isInstance) .map(WritableResource.class::cast); } /** * Determines whether the given byte array is {@literal null} or {@literal empty}. * * @p...
* * @param resource {@link Resource} to evaluate. * @return a boolean value indicating whether the given {@link Resource} is writable. * @see org.springframework.core.io.WritableResource#isWritable() * @see org.springframework.core.io.WritableResource * @see org.springframework.core.io.Resource */ public s...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\io\support\ResourceUtils.java
1
请完成以下Java代码
public T findDeployedDefinitionByDeploymentAndKey(String deploymentId, String definitionKey) { T definition = getManager().findDefinitionByDeploymentAndKey(deploymentId, definitionKey); checkInvalidDefinitionByDeploymentAndKey(deploymentId, definitionKey, definition); definition = resolveDefinition(definiti...
public void clear() { cache.clear(); } public Cache<String, T> getCache() { return cache; } protected abstract AbstractResourceDefinitionManager<T> getManager(); protected abstract void checkInvalidDefinitionId(String definitionId); protected abstract void checkDefinitionFound(String definitionI...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\deploy\cache\ResourceDefinitionCache.java
1
请完成以下Java代码
public Criteria andParentCategoryNameNotIn(List<String> values) { addCriterion("parent_category_name not in", values, "parentCategoryName"); return (Criteria) this; } public Criteria andParentCategoryNameBetween(String value1, String value2) { addCriterion("parent_ca...
} protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.conditi...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\SmsCouponProductCategoryRelationExample.java
1
请完成以下Java代码
public Set<String> getServiceNames(ServiceType type) { String typeName = composeLocalName(type, "*"); ObjectName typeObjectName = getObjectName(typeName); Set<ObjectName> resultNames = getmBeanServer().queryNames(typeObjectName, null); Set<String> result= new HashSet<String>(); for (ObjectName objec...
} } return res; } public MBeanServer getmBeanServer() { if (mBeanServer == null) { synchronized (this) { if (mBeanServer == null) { mBeanServer = createOrLookupMbeanServer(); } } } return mBeanServer; } public void setmBeanServer(MBeanServer mBeanServ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\jmx\MBeanServiceContainer.java
1
请完成以下Java代码
public void setESR_ImportFile_ID (final int ESR_ImportFile_ID) { if (ESR_ImportFile_ID < 1) set_ValueNoCheck (COLUMNNAME_ESR_ImportFile_ID, null); else set_ValueNoCheck (COLUMNNAME_ESR_ImportFile_ID, ESR_ImportFile_ID); } @Override public int getESR_ImportFile_ID() { return get_ValueAsInt(COLUMNNAM...
} @Override public void setHash (final @Nullable java.lang.String Hash) { set_Value (COLUMNNAME_Hash, Hash); } @Override public java.lang.String getHash() { return get_ValueAsString(COLUMNNAME_Hash); } @Override public void setIsReceipt (final boolean IsReceipt) { set_Value (COLUMNNAME_IsReceipt, I...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-gen\de\metas\payment\esr\model\X_ESR_ImportFile.java
1
请完成以下Java代码
public OidcUserInfo getUserInfo() { return this.userInfo; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || this.getClass() != obj.getClass()) { return false; } if (!super.equals(obj)) { return false; } OidcUserAuthority that = (OidcUserAut...
@Override public int hashCode() { int result = super.hashCode(); result = 31 * result + this.getIdToken().hashCode(); result = 31 * result + ((this.getUserInfo() != null) ? this.getUserInfo().hashCode() : 0); return result; } static Map<String, Object> collectClaims(OidcIdToken idToken, OidcUserInfo userInf...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\user\OidcUserAuthority.java
1
请完成以下Java代码
public int getOverrides_Window_ID() { return get_ValueAsInt(COLUMNNAME_Overrides_Window_ID); } @Override public void setProcessing (final boolean Processing) { set_Value (COLUMNNAME_Processing, Processing); } @Override public boolean isProcessing() { return get_ValueAsBoolean(COLUMNNAME_Processing); ...
@Override public void setWinWidth (final int WinWidth) { set_Value (COLUMNNAME_WinWidth, WinWidth); } @Override public int getWinWidth() { return get_ValueAsInt(COLUMNNAME_WinWidth); } @Override public void setZoomIntoPriority (final int ZoomIntoPriority) { set_Value (COLUMNNAME_ZoomIntoPriority, Zoo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Window.java
1
请完成以下Java代码
public Response getDefaultResource() throws IOException { return Response.ok(readResource("default-resource.txt")).build(); } @GET @Path("/default-nested") @Produces(MediaType.TEXT_PLAIN) public Response getDefaultNestedResource() throws IOException { return Response.ok(readResource...
private String readResource(String resourcePath) throws IOException { LOGGER.info("Reading resource from path: {}", resourcePath); try (InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(resourcePath)) { if (in == null) { LOGGER.error("Resourc...
repos\tutorials-master\quarkus-modules\quarkus-resources\src\main\java\com\baeldung\quarkus\resources\ResourceAccessAPI.java
1
请完成以下Java代码
public static ShipmentAllocationBestBeforePolicy ofNullableCode(@Nullable final String code) { return code != null ? ofCode(code) : null; } public static Optional<ShipmentAllocationBestBeforePolicy> optionalOfNullableCode(@Nullable final String code) { return Optional.ofNullable(ofNullableCode(code)); } pub...
final LocalDate bestBefore2Effective = CoalesceUtil.coalesceNotNull(bestBefore2, LocalDate.MAX); return bestBefore1Effective.compareTo(bestBefore2Effective); } else if (this == Newest_First) { final LocalDate bestBefore1Effective = CoalesceUtil.coalesceNotNull(bestBefore1, LocalDate.MIN); final LocalDate...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\ShipmentAllocationBestBeforePolicy.java
1
请在Spring Boot框架中完成以下Java代码
public class MscManagedProcessApplication implements Service<MscManagedProcessApplication> { protected ProcessApplicationInfo processApplicationInfo; protected ProcessApplicationReference processApplicationReference; public MscManagedProcessApplication(ProcessApplicationInfo processApplicationInfo, ProcessAppli...
} @Override public void stop(StopContext context) { // Nothing to do } public ProcessApplicationInfo getProcessApplicationInfo() { return processApplicationInfo; } public ProcessApplicationReference getProcessApplicationReference() { return processApplicationReference; } }
repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\MscManagedProcessApplication.java
2
请完成以下Spring Boot application配置
# Make the application available at http://localhost:9000 server: port: 9000 # Configure the public key to use for verifying the incoming JWT tokens security: oauth2: resource: jwt: keyValue: | -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhiiifKv...
Kn7gFiIqP86vkJB47JZv8 T6P5RK7Rj06zoG45DMGWG3DQv6o1/Jm4IJQWj0AUD3bSHqzXkPr7qyMYvkE4kyMH 6aVAsAYMxilZFlJMv2b8N883gdi3LEeOJo8zZr5IWyyROfepdeOL7UkAXddAj+dL WQIDAQAB -----END PUBLIC KEY-----
repos\tutorials-master\spring-cloud-modules\spring-cloud-security\auth-resource\src\main\resources\application.yml
2
请在Spring Boot框架中完成以下Java代码
public class BizException extends RuntimeException { private static final long serialVersionUID = 1L; protected String errorCode; protected String errorMsg; public BizException() { super(); } public BizException(BaseErrorInfoInterface errorInfoInterface) { super(errorInfoInterface.getResultCode()); th...
} public String getErrorCode() { return errorCode; } public void setErrorCode(String errorCode) { this.errorCode = errorCode; } public String getErrorMsg() { return errorMsg; } public void setErrorMsg(String errorMsg) { this.errorMsg = errorMsg; } public String getMessage() { return errorMsg; ...
repos\springboot-demo-master\Exception\src\main\java\com\et\exception\config\BizException.java
2
请完成以下Java代码
public void setPP_Order(final org.eevolution.model.I_PP_Order PP_Order) { set_ValueFromPO(COLUMNNAME_PP_Order_ID, org.eevolution.model.I_PP_Order.class, PP_Order); } @Override public void setPP_Order_ID (final int PP_Order_ID) { if (PP_Order_ID < 1) set_ValueNoCheck (COLUMNNAME_PP_Order_ID, null); else ...
public BigDecimal getQtyBOM() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyBOM); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyOnHand (final @Nullable BigDecimal QtyOnHand) { set_ValueNoCheck (COLUMNNAME_QtyOnHand, QtyOnHand); } @Override public BigDecimal getQt...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_RV_PP_Order_BOMLine.java
1
请完成以下Java代码
public void setCopyVariablesFromHeader(String copyVariablesFromHeader) { this.copyVariablesFromHeader = copyVariablesFromHeader; } public boolean isCopyCamelBodyToBodyAsString() { return copyCamelBodyToBodyAsString; } public void setCopyCamelBodyToBodyAsString(boolean copyCamelBodyToBo...
return processInitiatorHeaderName; } public void setProcessInitiatorHeaderName(String processInitiatorHeaderName) { this.processInitiatorHeaderName = processInitiatorHeaderName; } @Override public boolean isLenientProperties() { return true; } public long getTimeout() { ...
repos\flowable-engine-main\modules\flowable-camel\src\main\java\org\flowable\camel\FlowableEndpoint.java
1
请完成以下Java代码
public String getMailServerHost() { return mailServerHost; } public void setMailServerHost(String mailServerHost) { this.mailServerHost = mailServerHost; } public int getMailServerPort() { return mailServerPort; } public void setMailServerPort(int mailServerPort) { ...
public String getMailServerPassword() { return mailServerPassword; } public void setMailServerPassword(String mailServerPassword) { this.mailServerPassword = mailServerPassword; } public boolean isMailServerUseSSL() { return mailServerUseSSL; } public void setMailServe...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\cfg\MailServerInfo.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public org.compiere.model.I_M_Shipper getM_Shipper() { return get_ValueAsPO(COLUMNNAME_M_Shipper_ID, org.compiere.model.I_M_Shipper.class); } @Override public void setM_Sh...
@Override public void setM_Shipper_RoutingCode_ID (final int M_Shipper_RoutingCode_ID) { if (M_Shipper_RoutingCode_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Shipper_RoutingCode_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Shipper_RoutingCode_ID, M_Shipper_RoutingCode_ID); } @Override public int getM_Sh...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Shipper_RoutingCode.java
1
请完成以下Java代码
public class DLM_Partition_Config_Add_TableRecord_Lines extends JavaProcess { @Param(parameterName = I_DLM_Partition_Config.COLUMNNAME_DLM_Partition_Config_ID, mandatory = true) private I_DLM_Partition_Config configDB; private final IPartitionerService partitionerService = Services.get(IPartitionerService.class); ...
return MSG_OK; } /** * From the given <code>descriptors</code> list, return those ones that reference of the lines of the given <code>config</code>. * * @param config * @param tableRecordReferences * @return */ @VisibleForTesting /* package */ List<TableRecordIdDescriptor> retainRelevantDescriptors(fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\process\DLM_Partition_Config_Add_TableRecord_Lines.java
1
请完成以下Java代码
public ActivityImpl getSource() { return source; } public void setDestination(ActivityImpl destination) { this.destination = destination; destination.getIncomingTransitions().add(this); } @Deprecated public void addExecutionListener(ExecutionListener executionListener) { super.addListener(Ex...
protected void setSource(ActivityImpl source) { this.source = source; } public PvmActivity getDestination() { return destination; } public List<Integer> getWaypoints() { return waypoints; } public void setWaypoints(List<Integer> waypoints) { this.waypoints = waypoints; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\process\TransitionImpl.java
1
请完成以下Java代码
public java.lang.String getPO_Name () { return (java.lang.String)get_Value(COLUMNNAME_PO_Name); } /** Set PO Print name. @param PO_PrintName Print name on PO Screens/Reports */ @Override public void setPO_PrintName (java.lang.String PO_PrintName) { set_Value (COLUMNNAME_PO_PrintName, PO_PrintName); ...
@param WEBUI_NameNew New record name */ @Override public void setWEBUI_NameNew (java.lang.String WEBUI_NameNew) { set_Value (COLUMNNAME_WEBUI_NameNew, WEBUI_NameNew); } /** Get New record name. @return New record name */ @Override public java.lang.String getWEBUI_NameNew () { return (java.lang.Strin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Element.java
1
请完成以下Java代码
public void iterateUsingListIterator(final List<String> list) { final ListIterator listIterator = list.listIterator(list.size()); while (listIterator.hasPrevious()) { System.out.println(listIterator.previous()); } } /** * Iterate using Java {@link Collections} API. ...
System.out.println(listIterator.next()); } } /** * Iterate using Guava {@link Lists} API. * * @param list the list */ public void iterateUsingGuava(final List<String> list) { final List<String> reversedList = Lists.reverse(list); for (final String item : reverse...
repos\tutorials-master\core-java-modules\core-java-collections-list-7\src\main\java\com\baeldung\list\ReverseIterator.java
1
请完成以下Java代码
public boolean applies(final IPricingContext pricingCtx, final IPricingResult result) { return true; } /** * Executes all rules that can be applied. * <p> * Please note that calculation won't stop after first rule that matched. */ @Override public void calculate(@NonNull final IPricingContext pricingCtx...
// Try applying it rule.calculate(pricingCtx, result); // // Add it to applied pricing rules list // FIXME: make sure the rule was really applied (i.e. calculated). Consider asking the calculate() to return a boolean if it really did some changes. // At the moment, there is no way to figure out tha...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\AggregatedPricingRule.java
1
请完成以下Java代码
public final boolean hasPaymentDocument() { return getC_Payment() != null || getC_CashLine() != null; } public final OrgId getPaymentOrgId() { final I_C_Payment payment = getC_Payment(); if (payment != null) { return OrgId.ofRepoId(payment.getAD_Org_ID()); } final I_C_CashLine cashLine = getC_CashL...
{ final I_C_Payment payment = getC_Payment(); if (payment != null) { return BPartnerLocationId.ofRepoIdOrNull(payment.getC_BPartner_ID(), payment.getC_BPartner_Location_ID()); } return getBPartnerLocationId(); } public boolean isPaymentReceipt() { Check.assumeNotNull(paymentReceipt, "payment documen...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocLine_Allocation.java
1
请在Spring Boot框架中完成以下Java代码
public class SAP_GLJournal { private final SAPGLJournalService glJournalService; public SAP_GLJournal(final SAPGLJournalService glJournalService) {this.glJournalService = glJournalService;} @Init public void init() { CopyRecordFactory.enableForTableName(I_SAP_GLJournal.Table_Name); } @ModelChange(timings = ...
final SAPGLJournalCurrencyConversionCtx conversionCtxOld = SAPGLJournalLoaderAndSaver.extractConversionCtx(InterfaceWrapperHelper.createOld(record, I_SAP_GLJournal.class)); return !SAPGLJournalCurrencyConversionCtx.equals(conversionCtx, conversionCtxOld); } @ModelChange(timings = { ModelValidator.TYPE_BEFORE_DELET...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\interceptor\SAP_GLJournal.java
2
请完成以下Java代码
public boolean isFailed() {return this == POSPaymentProcessingStatus.FAILED;} public boolean isCanceled() {return this == POSPaymentProcessingStatus.CANCELLED;} public boolean isDeleted() {return this == POSPaymentProcessingStatus.DELETED;} public boolean isAllowCheckout() { return isNew() || isCanceled() || i...
else if (isCanceled() || isFailed()) { return BooleanWithReason.TRUE; } else { return BooleanWithReason.falseBecause("Payments with status " + this + " cannot be deleted"); } } public boolean isAllowRefund() { return isSuccessful(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSPaymentProcessingStatus.java
1
请完成以下Java代码
public static void main(String[] args) throws Exception { WineQualityRegression wineQualityRegression = new WineQualityRegression(); wineQualityRegression.createDatasets(); wineQualityRegression.createTrainer(); wineQualityRegression.evaluateModels(); wineQualityRegression.saveM...
.getTrainerProvenance())); } public void evaluate(Model<Regressor> model, String datasetName, Dataset<Regressor> dataset) { log.info("Results for " + datasetName + "---------------------"); RegressionEvaluator evaluator = new RegressionEvaluator(); RegressionEvaluation evaluation = eval...
repos\tutorials-master\libraries-ai\src\main\java\com\baeldung\tribuo\WineQualityRegression.java
1
请完成以下Java代码
public boolean isStorno() { if (storno == null) { return false; } else { return storno; } } /** * Sets the value of the storno property. * * @param value * allowed object is * {@link Boolean } * */ public void ...
* allowed object is * {@link Boolean } * */ public void setCopy(Boolean value) { this.copy = value; } /** * Gets the value of the creditAdvice property. * * @return * possible object is * {@link Boolean } * */ public b...
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\PayloadType.java
1
请完成以下Java代码
public static final class CachesDescriptor implements OperationResponseBody { private final Map<String, CacheManagerDescriptor> cacheManagers; public CachesDescriptor(Map<String, CacheManagerDescriptor> cacheManagers) { this.cacheManagers = cacheManagers; } public Map<String, CacheManagerDescriptor> getCa...
/** * Description of a {@link Cache} entry. */ public static final class CacheEntryDescriptor extends CacheDescriptor { private final String name; private final String cacheManager; public CacheEntryDescriptor(Cache cache, String cacheManager) { super(cache.getNativeCache().getClass().getName()); th...
repos\spring-boot-4.0.1\module\spring-boot-cache\src\main\java\org\springframework\boot\cache\actuate\endpoint\CachesEndpoint.java
1
请完成以下Java代码
private static boolean _scheduleIfNotPostponed(final IContextAware ctxAware, @Nullable final AsyncBatchId asyncBatchId) { if (shipmentScheduleBL.allMissingSchedsWillBeCreatedLater()) { logger.debug("Not scheduling WP because IShipmentScheduleBL.allMissingSchedsWillBeCreatedLater() returned true: {}", CreateMiss...
final Properties ctx = InterfaceWrapperHelper.getCtx(workpackage); final Set<ShipmentScheduleId> shipmentScheduleIds = inOutCandHandlerBL.createMissingCandidates(ctx); // After shipment schedules where created, invalidate them because we want to make sure they are up2date. final IShipmentScheduleInvalidateBL in...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\async\CreateMissingShipmentSchedulesWorkpackageProcessor.java
1
请完成以下Spring Boot application配置
spring.mail.host=localhost spring.mail.port=8025 spring.thymeleaf.cache=false spring.thymeleaf.enabled=true spring.thymeleaf.prefix=classpath:/templates/ spring.thymeleaf.su
ffix=.html spring.jpa.properties.hibernate.globally_quoted_identifiers=true
repos\tutorials-master\spring-web-modules\spring-mvc-basics-3\src\main\resources\application.properties
2
请完成以下Java代码
public void clear() throws CacheException { redisTemplate.delete(cacheKey); } @Override public int size() { BoundHashOperations<String, K, V> hash = redisTemplate.boundHashOps(cacheKey); return hash.size().intValue(); } @Override publ...
@Override public Collection<V> values() { BoundHashOperations<String, K, V> hash = redisTemplate.boundHashOps(cacheKey); return hash.values(); } protected Object hashKey(K key) { //此处很重要,如果key是登录凭证,那么这是访问用户的授权缓存;将登录凭证转为user对象,返回user的id属性做为hash key,否则会以user对象做...
repos\springBoot-master\springboot-shiro2\src\main\java\cn\abel\rest\shiro\ShiroRedisCacheManager.java
1
请完成以下Java代码
public class Tea { static final int DEFAULT_TEA_POWDER = 1; // add 1 tbsp tea powder by default private String name; // mandatory private int milk; // ml private boolean herbs; // add herbs or don't private int sugar; // tbsp private int teaPowder; // tbsp public Tea(String name, int milk...
this(name, 0); } public String getName() { return name; } public int getMilk() { return milk; } public boolean isHerbs() { return herbs; } public int getSugar() { return sugar; } public int getTeaPowder() { return teaPowder; } ...
repos\tutorials-master\core-java-modules\core-java-lang-2\src\main\java\com\baeldung\defaultparams\Tea.java
1
请完成以下Java代码
protected Object execute(CommandContext commandContext, TaskEntity task) { if (isLocal) { if (variables != null) { for (String variableName : variables.keySet()) { task.setVariableLocal(variableName, variables.get(variableName), false); } ...
} // ACT-1887: Force an update of the task's revision to prevent // simultaneous inserts of the same variable. If not, duplicate variables may occur since optimistic // locking doesn't work on inserts task.forceUpdate(); return null; } @Override protected String get...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\SetTaskVariablesCmd.java
1
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .add("AD_Process_ID", adProcessId) .toString(); } public int getAD_Process_ID() { return adProcessId; } public String getCaption(final String adLanguage) { final ITranslatableString originalProcessCaption = getOriginalProcessCapti...
final String iconName; if (adProcess.getAD_Form_ID() > 0) { iconName = MTreeNode.getIconName(MTreeNode.TYPE_WINDOW); } else if (adProcess.getAD_Workflow_ID() > 0) { iconName = MTreeNode.getIconName(MTreeNode.TYPE_WORKFLOW); } else if (adProcess.isReport()) { iconName = MTreeNode.getIconName(MTr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ui\SwingRelatedProcessDescriptor.java
1
请完成以下Java代码
public String getBatchId() { return batchId; } public void setBatchId(String batchId) { this.batchId = batchId; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public Date getCompleteTime() ...
} else { if (RESULT_SUCCESS.equals(migrationPart.getResult())) { if (succesfulMigrationParts == null) { succesfulMigrationParts = new ArrayList<>(); } succesfulMigrationParts.add(migrationPart); } else { if (fai...
repos\flowable-engine-main\modules\flowable-cmmn-api\src\main\java\org\flowable\cmmn\api\migration\CaseInstanceBatchMigrationResult.java
1
请在Spring Boot框架中完成以下Java代码
public DataSourceProperties firstDataSourceProperties() { return new DataSourceProperties(); } @Primary @Bean(name = "configFlywayMySql") public FlywayDs1Properties firstFlywayProperties() { return new FlywayDs1Properties(); } @Primary @Bean(name = "dataSourceMySql") @C...
@Bean(name = "dataSourcePostgreSql") @ConfigurationProperties("app.datasource.ds2") public HikariDataSource secondDataSource(@Qualifier("configPostgreSql") DataSourceProperties properties) { return properties.initializeDataSourceBuilder().type(HikariDataSource.class) .build(); } ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootFlywayTwoVendors\src\main\java\com\bookstore\config\ConfigureDataSources.java
2
请完成以下Java代码
private Iterator<ET> getCreateIterator() { assertNotClosed(); if (_iterator == null) { final ILock lock = getOrAcquireLock(); final Object contextProvider = PlainContextAware.newWithThreadInheritedTrx(ctx); _iterator = queryBL.createQueryBuilder(eventTypeClass, contextProvider) .filter(lockManager...
@Override public void close() { // Mark this source as closed if (_closed.getAndSet(true)) { // already closed return; } // // Unlock all if (_lock != null) { _lock.close(); _lock = null; } // // Close iterator if (_iterator != null) { IteratorUtils.closeQuietly(_iterator); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\event\impl\EventSource.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonDeliveryOrderLineContents { @NonNull String shipmentOrderItemId; @NonNull JsonMoney unitPrice; @NonNull JsonMoney totalValue; @NonNull String productName; @NonNull String productValue; @NonNull BigDecimal totalWeightInKg; @NonNull JsonQuantity shippedQuantity; @JsonIgnore public Optional<Stri...
return Optional.of(getShippedQuantity().getUomCode()); case DeliveryMappingConstants.ATTRIBUTE_VALUE_PRODUCT_NAME: return Optional.of(getProductName()); case DeliveryMappingConstants.ATTRIBUTE_VALUE_SHIPMENT_ORDER_ITEM_ID: return Optional.of(getShipmentOrderItemId()); case DeliveryMappingConstants.ATTR...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-delivery\src\main\java\de\metas\common\delivery\v1\json\request\JsonDeliveryOrderLineContents.java
2
请完成以下Java代码
private static HUQRCodeGenerateRequest.Attribute toHUQRCodeGenerateRequestAttribute( final JsonQRCodesGenerateRequest.Attribute json, final IAttributeDAO attributeDAO) { final I_M_Attribute attribute = attributeDAO.retrieveAttributeByValue(json.getAttributeCode()); final AttributeId attributeId = AttributeId...
final LocalDate valueDate = StringUtils.trimBlankToOptional(json.getValue()).map(LocalDate::parse).orElse(null); return resultBuilder.valueDate(valueDate).build(); } @Override public HUQRCodeGenerateRequest.Attribute list() { final String listItemCode = json.getValue(); if (listIt...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.mobileui\src\main\java\de\metas\handlingunits\rest_api\JsonQRCodesGenerateRequestConverters.java
1
请完成以下Java代码
private void refresh() { final Object organization = orgField.getValue(); final Object locator = locatorField.getValue(); final Object product = productField.getValue(); final Object movementType = mtypeField.getValue(); final Timestamp movementDateFrom = dateFField.getValue(); final Timestamp movementDate...
public void zoom() { super.zoom(); // Zoom panel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); AWindow frame = new AWindow(); if (!frame.initWindow(adWindowId, query)) { panel.setCursor(Cursor.getDefaultCursor()); return; } AEnv.addToWindowManager(frame); AEnv.showCenterScreen(fr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\VTrxMaterial.java
1
请在Spring Boot框架中完成以下Java代码
private TbTimeSeriesSubscription createTsSub(EntityData entityData, int subIdx, boolean latestValues, long startTs, long endTs, Map<String, Long> keyStates, boolean resultToLatestValues) { log.trace("[{}][{}][{}] Creating time-series subscription for [{}] with keys: {}", serviceId, cmdId, subIdx, entityData.get...
if (latestValues && entityData.getLatest() != null) { Map<String, TsValue> currentValues = entityData.getLatest().get(keysType); if (currentValues != null) { currentValues.forEach((k, v) -> { if (subKeys.contains(new EntityKey(keysType, k))) { ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\subscription\TbAbstractDataSubCtx.java
2
请在Spring Boot框架中完成以下Java代码
public class PackingService implements IPackingService { /** * Cannot fully unload: hu. Result is: result */ private static final String ERR_CANNOT_FULLY_UNLOAD_RESULT = "@CannotFullyUnload@ {} @ResultIs@ {}"; @Override public void removeProductQtyFromHU( final Properties ctx, final I_M_HU hu, Packing...
SystemTime.asZonedDateTime(), schedule, // reference model false // forceQtyAllocation ); // // Allocation Destination final ShipmentScheduleQtyPickedProductStorage shipmentScheduleQtyPickedStorage = new ShipmentScheduleQtyPickedProductStorage(schedule); final IAllocationDestination destination = new...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\picking\service\impl\PackingService.java
2
请完成以下Java代码
public void setAccessTokenResponseClient( OAuth2AccessTokenResponseClient<JwtBearerGrantRequest> accessTokenResponseClient) { Assert.notNull(accessTokenResponseClient, "accessTokenResponseClient cannot be null"); this.accessTokenResponseClient = accessTokenResponseClient; } /** * Sets the resolver used for ...
Assert.notNull(clockSkew, "clockSkew cannot be null"); Assert.isTrue(clockSkew.getSeconds() >= 0, "clockSkew must be >= 0"); this.clockSkew = clockSkew; } /** * Sets the {@link Clock} used in {@link Instant#now(Clock)} when checking the access * token expiry. * @param clock the clock */ public void setC...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\JwtBearerOAuth2AuthorizedClientProvider.java
1
请在Spring Boot框架中完成以下Java代码
public PickingJobAggregationType getAggregationType(@Nullable final BPartnerId customerId, @NonNull PickingJobOptionsCollection pickingJobOptionsCollection) { return getPickingJobOption(customerId, pickingJobOptionsCollection, PickingJobOptions::getAggregationType, PickingJobAggregationType.DEFAULT); } @SuppressW...
final T option = extractOption.apply(defaultPickingJobOptions); if (option != null) { return option; } return defaultValue; } @NonNull public ImmutableSet<BPartnerId> getPickOnlyCustomerIds() { if (isAllowPickingAnyCustomer) { return ImmutableSet.of(); } return customerConfigs.getCustomerId...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\config\mobileui\MobileUIPickingUserProfile.java
2
请完成以下Java代码
protected String getStencilId(BaseElement baseElement) { return STENCIL_TASK_DECISION; } protected FlowElement convertJsonToElement( JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap ) { ServiceTask serviceTask = new ServiceTask(); serv...
} @Override protected void convertElementToJson(ObjectNode propertiesNode, BaseElement baseElement) {} @Override public void setDecisionTableMap(Map<String, String> decisionTableMap) { this.decisionTableMap = decisionTableMap; } protected void addExtensionAttributeToExtension(Extensio...
repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\DecisionTaskJsonConverter.java
1
请完成以下Java代码
protected List<Map<String, String>> collectActivityTrace() { List<Map<String, String>> activityTrace = new ArrayList<Map<String, String>>(); for (AtomicOperationInvocation atomicOperationInvocation : perfromedInvocations) { String activityId = atomicOperationInvocation.getActivityId(); if(activityId...
protected void writeInvocation(AtomicOperationInvocation invocation, StringWriter writer) { writer.write("\t"); writer.write(invocation.getActivityId()); writer.write(" ("); writer.write(invocation.getOperation().getCanonicalName()); writer.write(", "); writer.write(invocation.getExecution().toS...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\interceptor\BpmnStackTrace.java
1
请在Spring Boot框架中完成以下Java代码
private void processLabels(final List<Label> labelList, @NonNull final ImportIssueInfo.ImportIssueInfoBuilder importIssueInfoBuilder, @NonNull final OrgId orgId) { final ImmutableList<ProcessedLabel> processedLabels = labelService.processLabels(labelList); final List<IssueLabel> issueLabelList = new ArrayLi...
issueLabelList.add(IssueLabel.builder().value(label.getLabel()).orgId(orgId).build()); } importIssueInfoBuilder.budget(budget); importIssueInfoBuilder.estimation(estimation); importIssueInfoBuilder.roughEstimation(roughEstimation); importIssueInfoBuilder.issueLabels(ImmutableList.copyOf(issueLabelList)); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\github\GithubImporterService.java
2
请在Spring Boot框架中完成以下Java代码
public boolean isEnableChangeDetection() { return enableChangeDetection; } public void setEnableChangeDetection(boolean enableChangeDetection) { this.enableChangeDetection = enableChangeDetection; } public Duration getChangeDetectionInitialDelay() { return changeDetectionInitia...
public void setChangeDetectionDelay(Duration changeDetectionDelay) { this.changeDetectionDelay = changeDetectionDelay; } public boolean isEnabled() { return enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } public FlowableServlet getServlet...
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\eventregistry\FlowableEventRegistryProperties.java
2
请在Spring Boot框架中完成以下Java代码
final class Jsr250MethodSecurityConfiguration implements ImportAware, AopInfrastructureBean { private static final Pointcut pointcut = AuthorizationManagerBeforeMethodInterceptor.jsr250().getPointcut(); private final Jsr250AuthorizationManager authorizationManager = new Jsr250AuthorizationManager(); private final...
void setGrantedAuthorityDefaults(GrantedAuthorityDefaults defaults) { this.authorizationManager.setRolePrefix(defaults.getRolePrefix()); } @Autowired(required = false) void setRoleHierarchy(RoleHierarchy roleHierarchy) { AuthoritiesAuthorizationManager authoritiesAuthorizationManager = new AuthoritiesAuthorizat...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\method\configuration\Jsr250MethodSecurityConfiguration.java
2
请完成以下Java代码
public void setPA_Goal_ID (int PA_Goal_ID) { if (PA_Goal_ID < 1) set_ValueNoCheck (COLUMNNAME_PA_Goal_ID, null); else set_ValueNoCheck (COLUMNNAME_PA_Goal_ID, Integer.valueOf(PA_Goal_ID)); } /** Get Goal. @return Performance Goal */ public int getPA_Goal_ID () { Integer ii = (Integer)get_Value...
if (ii == null) return 0; return ii.intValue(); } /** Set Relative Weight. @param RelativeWeight Relative weight of this step (0 = ignored) */ public void setRelativeWeight (BigDecimal RelativeWeight) { set_Value (COLUMNNAME_RelativeWeight, RelativeWeight); } /** Get Relative Weight. @return R...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_Goal.java
1
请完成以下Java代码
public abstract class HistoryCleanupHandler implements TransactionListener { /** * Maximum allowed batch size. */ public final static int MAX_BATCH_SIZE = 500; protected HistoryCleanupJobHandlerConfiguration configuration; protected String jobId; protected CommandExecutor commandExecutor; public vo...
public HistoryCleanupHandler setCommandExecutor(CommandExecutor commandExecutor) { this.commandExecutor = commandExecutor; return this; } protected class HistoryCleanupHandlerCmd implements Command<Void> { @Override public Void execute(CommandContext commandContext) { Map<String, Long> repor...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\historycleanup\HistoryCleanupHandler.java
1
请完成以下Java代码
public String getCnname() { return cnname; } public void setCnname(String cnname) { this.cnname = cnname; } public String getUsername() { return username; } public String getPassword() { return password; } public void setPassword(String password) { ...
public void setHistoryPassword(String historyPassword) { this.historyPassword = historyPassword; } public Role getRole() { return role; } public void setRole(Role role) { this.role = role; } public Integer getRoleId() { return roleId; } public void set...
repos\springBoot-master\springboot-springSecurity4\src\main\java\com\yy\example\bean\User.java
1
请完成以下Java代码
public class IntegerListFilter { private List<Integer> jdkIntList; private MutableList<Integer> ecMutableList; private IntList ecIntList; private ExecutorService executor; @Setup public void setup() { PrimitiveIterator.OfInt iterator = new Random(1L).ints(-10000, 10000).iterator(); ...
return ecMutableList.select(i -> i % 5 == 0); } @Benchmark public List<Integer> jdkListParallel() { return jdkIntList.parallelStream().filter(i -> i % 5 == 0).collect(Collectors.toList()); } @Benchmark public MutableList<Integer> ecMutableListParallel() { return ecMutableList.a...
repos\tutorials-master\core-java-modules\core-java-11\src\main\java\com\baeldung\benchmark\IntegerListFilter.java
1
请完成以下Java代码
public void setReversalLine(final org.compiere.model.I_M_InventoryLine ReversalLine) { set_ValueFromPO(COLUMNNAME_ReversalLine_ID, org.compiere.model.I_M_InventoryLine.class, ReversalLine); } @Override public void setReversalLine_ID (final int ReversalLine_ID) { if (ReversalLine_ID < 1) set_Value (COLUMNN...
@Override public java.lang.String getUPC() { return get_ValueAsString(COLUMNNAME_UPC); } @Override public void setValue (final @Nullable java.lang.String Value) { throw new IllegalArgumentException ("Value is virtual column"); } @Override public java.lang.String getValue() { return get_ValueAsString(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_InventoryLine.java
1
请完成以下Java代码
public void setHasStartFormKey(boolean hasStartFormKey) { this.hasStartFormKey = hasStartFormKey; } public boolean isGraphicalNotationDefined() { return isGraphicalNotationDefined; } public boolean hasGraphicalNotation() { return isGraphicalNotationDefined; } public vo...
return engineVersion; } public void setEngineVersion(String engineVersion) { this.engineVersion = engineVersion; } public IOSpecification getIoSpecification() { return ioSpecification; } public void setIoSpecification(IOSpecification ioSpecification) { this.ioSpecifica...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ProcessDefinitionEntityImpl.java
1
请在Spring Boot框架中完成以下Java代码
public String getTenantIdLike() { return tenantIdLike; } @ApiParam("Only return jobs with a tenantId like the given value") public void setTenantIdLike(String tenantIdLike) { this.tenantIdLike = tenantIdLike; } public boolean isWithoutTenantId() { return withoutTenantId; ...
public boolean isUnlocked() { return unlocked; } @ApiParam("Only return jobs that are unlocked") public void setUnlocked(boolean unlocked) { this.unlocked = unlocked; } public boolean isWithoutScopeType() { return withoutScopeType; } @ApiParam("Only return jobs wit...
repos\flowable-engine-main\modules\flowable-external-job-rest\src\main\java\org\flowable\external\job\rest\service\api\query\ExternalWorkerJobQueryRequest.java
2
请在Spring Boot框架中完成以下Java代码
public void setBuyerEANCU(String value) { this.buyerEANCU = value; } /** * Gets the value of the supplierGTINCU property. * * @return * possible object is * {@link String } * */ public String getSupplierGTINCU() { return supplierGTINCU; }...
/** * Gets the value of the qtyEnteredInBPartnerUOM property. * * @return * possible object is * {@link BigDecimal } * */ public BigDecimal getQtyEnteredInBPartnerUOM() { return qtyEnteredInBPartnerUOM; } /** * Sets the value of the qtyEnteredIn...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDICctopInvoic500VType.java
2
请在Spring Boot框架中完成以下Java代码
private void reply(LocalRequestMetaData rpcRequest, TbMsg response) { DeferredResult<ResponseEntity> responseWriter = rpcRequest.responseWriter(); if (response == null) { logRuleEngineCall(rpcRequest, null, new TimeoutException("Processing timeout detected!")); responseWriter.set...
private void logRuleEngineCall(SecurityUser user, EntityId entityId, String request, TbMsg response, Throwable e) { auditLogService.logEntityAction( user.getTenantId(), user.getCustomerId(), user.getId(), user.getName(), entityId, ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\controller\RuleEngineController.java
2
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext context) { if (context.isNoSelection()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } if (context.isMoreThanOneSelected()) { return ProcessPreconditionsResolution.rejec...
} @Override protected String doIt() { final DhlShipmentOrderId shipmentOrderId = DhlShipmentOrderId.ofRepoIdOrNull(getRecord_ID()); if (shipmentOrderId == null) { return MSG_OK; } final DhlCustomDeliveryDataDetail dhlShipmentOrder = dhlShipmentOrderDAO.getByIdOrNull(shipmentOrderId); if (dhlShipmentO...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java\de\metas\shipper\gateway\dhl\process\DHL_ShipmentOrder_DhlLabel_Download.java
1
请完成以下Java代码
private static final File[] retrieveChildren(final IFileRef fileRef) { final File file = fileRef.getFile(); if (file == null) { return new File[] {}; } if (!file.isDirectory()) { return new File[] {}; } final File[] children = file.listFiles(); if (children == null) { return new File[] {...
final IScriptScanner childScanner = createScriptScanner(child); if (childScanner != null) { return childScanner; } } return null; } private IScriptScanner createScriptScanner(final File file) { final FileRef fileRef = new FileRef(this, rootFileRef, file); final IScriptScanner scanner = getScri...
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\scanner\impl\DirectoryScriptScanner.java
1
请完成以下Java代码
public <T> T newInstance(final Class<T> modelClass, final Object contextProvider) { final SaveDecoupledHUStorageDAO delegate = getDelegate(contextProvider); return delegate.newInstance(modelClass, contextProvider); } @Override public void initHUStorages(final I_M_HU hu) { final SaveDecoupledHUStorageDAO del...
return delegate.retrieveItemStorages(item); } @Override public I_M_HU_Item_Storage retrieveItemStorage(final I_M_HU_Item item, @NonNull final ProductId productId) { final SaveDecoupledHUStorageDAO delegate = getDelegate(item); return delegate.retrieveItemStorage(item, productId); } @Override public void sa...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\SaveOnCommitHUStorageDAO.java
1
请完成以下Java代码
public static PaymentId ofRepoId(final int repoId) {return new PaymentId(repoId);} @Nullable public static PaymentId ofRepoIdOrNull(final int repoId) {return repoId > 0 ? new PaymentId(repoId) : null;} public static Optional<PaymentId> optionalOfRepoId(final int repoId) {return Optional.ofNullable(ofRepoIdOrNull(r...
int repoId; private PaymentId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_Payment_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } public static boolean equals(@Nullable PaymentId id1, @Nullable PaymentId id2) {return Objects.equals(id1, id2);} }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\payment\PaymentId.java
1
请完成以下Java代码
protected String encodeNonNullPassword(String rawPassword) { String salt = getSalt(); return BCrypt.hashpw(rawPassword.toString(), salt); } private String getSalt() { if (this.random != null) { return BCrypt.gensalt(this.version.getVersion(), this.strength, this.random); } return BCrypt.gensalt(this.ver...
*/ public enum BCryptVersion { $2A("$2a"), $2Y("$2y"), $2B("$2b"); private final String version; BCryptVersion(String version) { this.version = version; } public String getVersion() { return this.version; } } }
repos\spring-security-main\crypto\src\main\java\org\springframework\security\crypto\bcrypt\BCryptPasswordEncoder.java
1
请完成以下Java代码
public static void handleExceptionWhenSendingEmail() { try { sendPlainTextEmail(); System.out.println("Email sent successfully!"); } catch (MailException e) { System.err.println("Error: " + e.getMessage()); } } public static void setCustomHeaderWhenSe...
.withPlainText("This is an email sending with delivery/read receipt.") .withDispositionNotificationTo(new Recipient("name", "address@domain.com", Message.RecipientType.TO)) .withReturnReceiptTo(new Recipient("name", "address@domain.com", Message.RecipientType.TO)) .buildEmail(); ...
repos\tutorials-master\libraries-io\src\main\java\com\baeldung\java\io\simplemail\SimpleMailExample.java
1
请完成以下Java代码
public org.compiere.model.I_C_DocType getC_DocType() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_C_DocType_ID, org.compiere.model.I_C_DocType.class); } @Override public void setC_DocType(org.compiere.model.I_C_DocType C_DocType) { set_ValueFromPO(COLUMNNAME_C_DocType_ID, org.compiere.model.I_C_D...
public void setDocNoSequence(org.compiere.model.I_AD_Sequence DocNoSequence) { set_ValueFromPO(COLUMNNAME_DocNoSequence_ID, org.compiere.model.I_AD_Sequence.class, DocNoSequence); } /** Set Nummernfolgen für Belege. @param DocNoSequence_ID Document sequence determines the numbering of documents */ @Overr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DocType_Sequence.java
1
请完成以下Java代码
public ResourceEntity createDiagramForProcessDefinition(ProcessDefinitionEntity processDefinition, BpmnParse bpmnParse) { if (StringUtils.isEmpty(processDefinition.getKey()) || StringUtils.isEmpty(processDefinition.getResourceName())) { throw new IllegalStateException("Provided process definition m...
} catch (Throwable t) { // if anything goes wrong, we don't store the image (the process will still be executable). LOGGER.warn("Error while generating process diagram, image will not be stored in repository", t); resource = null; } return resource; } protected Resource...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\deployer\ProcessDefinitionDiagramHelper.java
1
请完成以下Spring Boot application配置
spring: kafka: security: protocol: "SSL" bootstrap-servers: localhost:9093 ssl: trust-store-location: classpath:/client-certs/kafka.client.truststore.jks trust-store-password: password key-store-location: classpath:/client-certs/kafka.client.keystore.jks key-store-password: ...
e.kafka.common.serialization.StringDeserializer producer: key-deserializer: org.apache.kafka.common.serialization.StringDeserializer value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
repos\tutorials-master\spring-kafka\src\main\resources\application-ssl.yml
2
请完成以下Java代码
public class Msv3FaultInfo { @XmlElement(name = "ErrorCode", required = true) protected String errorCode; @XmlElement(name = "EndanwenderFehlertext", required = true) protected String endanwenderFehlertext; @XmlElement(name = "TechnischerFehlertext", required = true) protected String technische...
* * @param value * allowed object is * {@link String } * */ public void setEndanwenderFehlertext(String value) { this.endanwenderFehlertext = value; } /** * Gets the value of the technischerFehlertext property. * * @return * possible o...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\Msv3FaultInfo.java
1
请在Spring Boot框架中完成以下Java代码
public class User { @Id @GeneratedValue(strategy = GenerationType.AUTO) private long id; private long status; private String name; private String email; public User(){} public User(String name, String email) { this.name = name; this.email = email; } ...
public void setEmail(String email) { this.email = email; } public void setStatus(long status) { this.status = status; } public long getStatus() { return status; } @Override public String toString() { return "User{" + "id=" + id + ", name=" + name + ", email=" + email...
repos\tutorials-master\persistence-modules\spring-boot-persistence\src\main\java\com\baeldung\springbootdatasourceconfig\application\entities\User.java
2
请在Spring Boot框架中完成以下Java代码
public class CopyRecordService { @NonNull public PO copyRecord(@NonNull final CopyRecordRequest copyRecordRequest) { final TableRecordReference fromRecordRef = copyRecordRequest.getTableRecordReference(); final PO fromPO = fromRecordRef.getModel(PlainContextAware.newWithThreadInheritedTrx(), PO.class); final S...
.copyToNew(fromPO) .orElseThrow(() -> newCloneNotAllowedException(copyRecordRequest.getCustomErrorIfCloneNotAllowed(), tableName)); } private static AdempiereException newCloneNotAllowedException(@Nullable final AdMessageKey customErrorIfCloneNotAllowed, final @NonNull String tableName) { if (customErrorIfClo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\copy_with_details\CopyRecordService.java
2
请完成以下Java代码
default void afterTrxProcessed(IReference<I_M_HU_Trx_Hdr> trxHdrRef, List<I_M_HU_Trx_Line> trxLines) { // nothing } /** * Method called when a whole HU Load is completed. This default implementation does nothing. * * NOTE: this is the last method which is called, right before the final result is returned. ...
* @param huContext * @param unloadTrx * @param loadTrx */ default void onUnloadLoadTransaction(IHUContext huContext, IHUTransactionCandidate unloadTrx, IHUTransactionCandidate loadTrx) { // nothing } /** * Called when a split is performed. This default implementation does nothing. * * @param huContex...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\hutransaction\IHUTrxListener.java
1
请在Spring Boot框架中完成以下Java代码
protected static class CookieStoreConfiguration { /** * Creates a default {@link PerInstanceCookieStore} that should be used. * @return the cookie store */ @Bean @ConditionalOnMissingBean public PerInstanceCookieStore cookieStore() { return new JdkPerInstanceCookieStore(CookiePolicy.ACCEPT_ORIGINAL...
* @param publisher publisher of {@link InstanceEvent}s events * @param cookieStore the store to inform about deregistration of an * {@link de.codecentric.boot.admin.server.domain.entities.Instance} * @return a new trigger */ @Bean(initMethod = "start", destroyMethod = "stop") @ConditionalOnMissingBean ...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\config\AdminServerInstanceWebClientConfiguration.java
2
请完成以下Java代码
protected String getProcessDefinitionId(IdentityLinkEntity identityLink) { String processDefinitionId = null; if (identityLink.getProcessInstanceId() != null) { ExecutionEntity execution = processEngineConfiguration.getExecutionEntityManager().findById(identityLink.getProcessInstanceId()); ...
String processDefinitionId = null; if (ScopeTypes.BPMN.equals(entityLink.getScopeType()) && entityLink.getScopeId() != null) { ExecutionEntity execution = processEngineConfiguration.getExecutionEntityManager().findById(entityLink.getScopeId()); if (execution != null) { pr...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\history\DefaultHistoryConfigurationSettings.java
1
请完成以下Java代码
private BaeldungArticle latestArticle() { List<BaeldungArticle> articleList = website.getArticleList(); int latestArticleIndex = articleList.size() - 1; return articleList.get(latestArticleIndex); } public Baeldung getWebsite() { return website; }...
public static class BaeldungArticle { private String title; private String content; public void setTitle(String title) { this.title = title; } public String getTitle() { return this.title; } public void setContent(String content) { ...
repos\tutorials-master\xml-modules\xml\src\main\java\com\baeldung\sax\SaxParserMain.java
1
请完成以下Java代码
public String getTray() { return tray; } /** * @param tray the tray to set */ public void setTray(String tray) { this.tray = tray; } public int getPageFrom() { return pageFrom; } /** * @param pageFrom the pageFrom to set */ public void setPageFrom(int pageFrom) { this.pageFrom = pageFrom;...
if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PrintPackageInfo other = (PrintPackageInfo)obj; if (calX != other.calX) return false; if (calY != other.calY) return false; if (pageFrom != other.pageFrom) return false; if (pageT...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.api\src\main\java\de\metas\printing\esb\api\PrintPackageInfo.java
1
请完成以下Java代码
private static Quantity extractQtyInvoiced(final I_C_Invoice_Line_Alloc ila) { final UomId uomId = UomId.ofRepoIdOrNull(ila.getC_UOM_ID()); return uomId != null ? Quantitys.of(ila.getQtyInvoicedInUOM(), uomId) : null; } private RawData loadRawData() { final List<I_C_Invoice_Line_Alloc> ilaRecords ...
.createQueryBuilder(I_C_Invoice.class) .addOnlyActiveRecordsFilter() .addInArrayFilter(I_C_Invoice.COLUMN_C_Invoice_ID, invoiceRepoIds) .create() .list(); final ImmutableMap<Integer, I_C_Invoice> invoiceId2InvoiceRecord = Maps.uniqueIndex(invoiceRecords, I_C_Invoice::getC_Invoice_ID); return new R...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\internalbusinesslogic\InvoicedDataLoader.java
1
请完成以下Java代码
public int getRevisionNext() { return revision+1; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String get...
} } protected String encryptPassword(String password, String salt) { if (password == null) { return null; } else { String saltedPassword = saltPassword(password, salt); return Context.getProcessEngineConfiguration() .getPasswordManager() .encrypt(saltedPassword); } }...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\UserEntity.java
1
请完成以下Java代码
public void reportStringCompressed() { getCounter("stringsCompressed").increment(); } @Override public void reportStringUncompressed() { getCounter("stringsUncompressed").increment(); } private void checkTiming(TenantId tenantId, EntityCountQuery query, long timingNanos) { ...
} private StatsTimer getTimer(String name) { return timers.computeIfAbsent(name, __ -> statsFactory.createStatsTimer("edqsTimers", name)); } private StatsCounter getCounter(String name) { return counters.computeIfAbsent(name, __ -> statsFactory.createStatsCounter("edqsCounters", name)); ...
repos\thingsboard-master\common\edqs\src\main\java\org\thingsboard\server\edqs\stats\DefaultEdqsStatsService.java
1
请完成以下Java代码
public final class CrossOriginEmbedderPolicyServerHttpHeadersWriter implements ServerHttpHeadersWriter { public static final String EMBEDDER_POLICY = "Cross-Origin-Embedder-Policy"; private @Nullable ServerHttpHeadersWriter delegate; /** * Sets the {@link CrossOriginEmbedderPolicy} value to be used in the * {...
CREDENTIALLESS("credentialless"); private final String policy; CrossOriginEmbedderPolicy(String policy) { this.policy = policy; } public String getPolicy() { return this.policy; } } }
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\header\CrossOriginEmbedderPolicyServerHttpHeadersWriter.java
1
请完成以下Java代码
public class TelecomAddressType { @XmlElement(namespace = "http://www.forum-datenaustausch.ch/invoice", required = true) protected List<String> phone; @XmlElement(namespace = "http://www.forum-datenaustausch.ch/invoice") protected List<String> fax; /** * Gets the value of the phone property. ...
* not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the fax property. * * <p> * For example, to add a new item, do as follows: * <pre> * getFax().add(newItem);...
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\TelecomAddressType.java
1
请在Spring Boot框架中完成以下Java代码
public class DataScopeCache { private static final String SCOPE_CACHE_CODE = "dataScope:code:"; private static final String SCOPE_CACHE_CLASS = "dataScope:class:"; private static final String DEPT_CACHE_ANCESTORS = "dept:ancestors:"; private static IDataScopeClient dataScopeClient; private static IDataScopeClie...
dataScope = getDataScopeClient().getDataScopeByCode(code); CacheUtil.put(SYS_CACHE, SCOPE_CACHE_CODE, code, dataScope); } return StringUtil.isNotBlank(dataScope.getResourceCode()) ? dataScope : null; } /** * 获取部门子级 * * @param deptId 部门id * @return deptIds */ public static List<Long> getDeptAncestor...
repos\SpringBlade-master\blade-service-api\blade-scope-api\src\main\java\org\springblade\system\cache\DataScopeCache.java
2
请完成以下Java代码
public class DD_Order_Candidate_EnqueueToProcess extends ViewBasedProcessTemplate implements IProcessPrecondition { @NonNull private final IQueryBL queryBL = Services.get(IQueryBL.class); @NonNull private final DDOrderCandidateService ddOrderCandidateService = SpringContextHolder.instance.getBean(DDOrderCandidateServ...
final int count = queryBuilder .create() .setRequiredAccess(Access.READ) .createSelection(adPInstanceId); if (count <= 0) { throw new AdempiereException("@NoSelection@"); } return adPInstanceId; } protected IQueryBuilder<I_DD_Order_Candidate> selectionQueryBuilder() { final IQueryFilter<I_...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.webui\src\main\java\de\metas\distribution\webui\process\DD_Order_Candidate_EnqueueToProcess.java
1
请完成以下Java代码
public HUQueryBuilder setExcludeAfterPickingLocator(final boolean excludeAfterPickingLocator) { locators.setExcludeAfterPickingLocator(excludeAfterPickingLocator); return this; } @Override public HUQueryBuilder setIncludeAfterPickingLocator(final boolean includeAfterPickingLocator) { locators.setIncludeAfte...
{ _excludeReservedToOtherThanRef = documentRef; return this; } @Override public IHUQueryBuilder setExcludeReserved() { _excludeReserved = true; return this; } @Override public IHUQueryBuilder setIgnoreHUsScheduledInDDOrder(final boolean ignoreHUsScheduledInDDOrder) { this.ignoreHUsScheduledInDDOrder...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUQueryBuilder.java
1
请完成以下Java代码
public LDAPGroupCacheListener getLdapCacheListener() { return ldapCacheListener; } public void setLdapCacheListener(LDAPGroupCacheListener ldapCacheListener) { this.ldapCacheListener = ldapCacheListener; } // Helper classes //////////////////////////////////// static class LDAPGro...
public List<Group> getGroups() { return groups; } public void setGroups(List<Group> groups) { this.groups = groups; } } // Cache listeners. Currently not yet exposed (only programmatically for the // moment) // Experimental stuff! public static in...
repos\flowable-engine-main\modules\flowable-ldap\src\main\java\org\flowable\ldap\LDAPGroupCache.java
1
请完成以下Java代码
public String getZip() { return super.getZip(); } @Schema(description = "Phone number", example = "+1(415)777-7777") @Override public String getPhone() { return super.getPhone(); } @Schema(requiredMode = Schema.RequiredMode.REQUIRED, description = "Email", example = "example@co...
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Customer [title="); builder.append(title); builder.append(", tenantId="); builder.append(tenantId); builder.append(", additionalInfo="); builder.append(getAdditio...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\Customer.java
1
请完成以下Java代码
public void invalidateCandidatesFor(final Object model) { final I_M_InOut inout = InterfaceWrapperHelper.create(model, I_M_InOut.class); invalidateCandidatesForInOut(inout); invalidateFreightCostCandidateIfNeeded(inout); } private void invalidateFreightCostCandidateIfNeeded(final I_M_InOut inout) { final ...
@Override public void setOrderedData(final I_C_Invoice_Candidate ic) { throw new IllegalStateException("Not supported"); } @Override public void setDeliveredData(final I_C_Invoice_Candidate ic) { throw new IllegalStateException("Not supported"); } @Override public PriceAndTax calculatePriceAndTax(final I...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inout\invoicecandidate\M_InOut_Handler.java
1
请完成以下Java代码
public class GetRenderedTaskFormCmd implements Command<Object>, Serializable { private static final long serialVersionUID = 1L; protected String taskId; protected String formEngineName; public GetRenderedTaskFormCmd(String taskId, String formEngineName) { this.taskId = taskId; this.for...
if (taskFormHandler != null) { FormEngine formEngine = processEngineConfiguration.getFormEngines().get(formEngineName); if (formEngine == null) { throw new FlowableException("No formEngine '" + formEngineName + "' defined process engine configuration"); } ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\GetRenderedTaskFormCmd.java
1
请完成以下Java代码
final class LdapEncoder { private static final String[] NAME_ESCAPE_TABLE = new String[96]; static { // all below 0x20 (control chars) for (char c = 0; c < ' '; c++) { NAME_ESCAPE_TABLE[c] = "\\" + toTwoCharHex(c); } NAME_ESCAPE_TABLE['#'] = "\\#"; NAME_ESCAPE_TABLE[','] = "\\,"; NAME_ESCAPE_TABLE[';'...
int last = length - 1; for (int i = 0; i < length; i++) { char c = value.charAt(i); // space first or last if (c == ' ' && (i == 0 || i == last)) { encodedValue.append("\\ "); continue; } // check in table for escapes if (c < NAME_ESCAPE_TABLE.length) { String esc = NAME_ESCAPE_TABLE[c];...
repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\authentication\LdapEncoder.java
1
请完成以下Java代码
public void importRecord(@NonNull final BPartnerImportContext context) { final I_I_BPartner importRecord = context.getCurrentImportRecord(); if (importRecord.getAD_PrintFormat_ID() <= 0 && Check.isBlank(importRecord.getPrintFormat_DocBaseType())) { return; } final PrintFormatId printFormatId = PrintForma...
.adTableId(adTableId) .bPartnerLocationId(bPartnerLocationId) .bpartnerId(bPartnerId) .isExactMatch(true) .build(); BPPrintFormat bpPrintFormat = bPartnerPrintFormatRepository.getByQuery(bpPrintFormatQuery); if (bpPrintFormat == null) { bpPrintFormat = BPPrintFormat.builder() .adTableId(a...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\impexp\BPartnerPrintFormatImportHelper.java
1
请完成以下Java代码
public class BpmnModelInstanceCache extends ModelInstanceCache<BpmnModelInstance, ProcessDefinitionEntity> { public BpmnModelInstanceCache(CacheFactory factory, int cacheCapacity, ResourceDefinitionCache<ProcessDefinitionEntity> definitionCache) { super(factory, cacheCapacity, definitionCache); } @Override ...
protected void logRemoveEntryFromDeploymentCacheFailure(String definitionId, Exception e) { LOG.removeEntryFromDeploymentCacheFailure("process", definitionId, e); } @Override protected List<ProcessDefinition> getAllDefinitionsForDeployment(final String deploymentId) { final CommandContext commandContext ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\deploy\cache\BpmnModelInstanceCache.java
1
请完成以下Java代码
public boolean isLocked(final Class<?> modelClass, final int recordId, final LockOwner lockOwner) { return getLockDatabase().isLocked(modelClass, recordId, lockOwner); } @Override public boolean isLocked(final Object model) { return getLockDatabase().isLocked(model, LockOwner.ANY); } @Override public fina...
return getLockDatabase().getLockedRecordsQueryBuilder(modelClass, contextProvider); } @Override public int removeAutoCleanupLocks() { return getLockDatabase().removeAutoCleanupLocks(); } @Override public <T> List<T> retrieveAndLockMultipleRecords(@NonNull final IQuery<T> query, @NonNull final Class<T> clazz)...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\api\impl\LockManager.java
1
请完成以下Java代码
public PPOrderRef withPPOrderAndBOMLineId(@Nullable final PPOrderAndBOMLineId newPPOrderAndBOMLineId) { final PPOrderId ppOrderIdNew = newPPOrderAndBOMLineId != null ? newPPOrderAndBOMLineId.getPpOrderId() : null; final PPOrderBOMLineId lineIdNew = newPPOrderAndBOMLineId != null ? newPPOrderAndBOMLineId.getLineId(...
} else { return null; } } @Nullable public static PPOrderRef withPPOrderAndBOMLineId(@Nullable final PPOrderRef ppOrderRef, @Nullable final PPOrderAndBOMLineId newPPOrderAndBOMLineId) { if (ppOrderRef != null) { return ppOrderRef.withPPOrderAndBOMLineId(newPPOrderAndBOMLineId); } else if (newPP...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\pporder\PPOrderRef.java
1
请在Spring Boot框架中完成以下Java代码
protected String executeToStringTransform(JsonNode result) { if (result.isTextual()) { return result.asText(); } throw wrongResultType(result); } @Override protected JsonNode convertResult(Object result) { return JacksonUtil.toJsonNode(result != null ? result.toS...
} if (msgData.has(RuleNodeScriptFactory.MSG_TYPE)) { messageType = msgData.get(RuleNodeScriptFactory.MSG_TYPE).asText(); } String newData = data != null ? data : msg.getData(); TbMsgMetaData newMetadata = metadata != null ? new TbMsgMetaData(metadata) : msg.getMetaData().copy...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\script\RuleNodeJsScriptEngine.java
2
请在Spring Boot框架中完成以下Java代码
public Object buildTree(List<DeptDto> deptDtos) { Set<DeptDto> trees = new LinkedHashSet<>(); Set<DeptDto> depts= new LinkedHashSet<>(); List<String> deptNames = deptDtos.stream().map(DeptDto::getName).collect(Collectors.toList()); boolean isChild; for (DeptDto deptDTO : deptDtos...
} } private void updateSubCnt(Long deptId){ if(deptId != null){ int count = deptRepository.countByPid(deptId); deptRepository.updateSubCntById(count, deptId); } } private List<DeptDto> deduplication(List<DeptDto> list) { List<DeptDto> deptDtos = new Arra...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\service\impl\DeptServiceImpl.java
2
请完成以下Java代码
public String toString() { return "TrxCallableWithTrxName-wrapper[" + trxRunnable + "]"; } @Override public Void call(final String localTrxName) throws Exception { trxRunnable.run(localTrxName); return null; } @Override public Void call() throws Exception { throw new Illegal...
if (callable instanceof TrxCallable) { final TrxCallable<T> trxCallable = (TrxCallable<T>)callable; return trxCallable; } return new TrxCallableAdapter<T>() { @Override public String toString() { return "TrxCallableWrappers[" + callable + "]"; } @Override public T call() throws Exc...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\api\impl\TrxCallableWrappers.java
1
请完成以下Java代码
protected Optional<String> getSwiftCode() { return Optional.ofNullable(accountStatement2.getAcct().getSvcr()) .map(branchAndFinancialInstitutionIdentification4 -> branchAndFinancialInstitutionIdentification4.getFinInstnId().getBIC()) .filter(Check::isNotBlank); } @Override @NonNull protected Optional<St...
return accountStatement2.getBal() .stream() .filter(AccountStatement2Wrapper::isPRCDCashBalance) .findFirst(); } private static boolean isPRCDCashBalance(@NonNull final CashBalance3 cashBalance) { final BalanceType12Code balanceTypeCode = cashBalance.getTp().getCdOrPrtry().getCd(); return BalanceTy...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java\de\metas\banking\camt53\wrapper\v02\AccountStatement2Wrapper.java
1
请完成以下Java代码
private static String buildMessage(final I_M_PriceList_Version plv, final int productId) { final StringBuilder sb = new StringBuilder("@NotFound@ @M_ProductPrice_ID@"); // // Product final I_M_Product product = productId > 0 ? loadOutOfTrx(productId, I_M_Product.class) : null; sb.append("\n@M_Product_ID@: "...
final I_M_PriceList priceList = plv == null ? null : Services.get(IPriceListDAO.class).getById(PriceListId.ofRepoId(plv.getM_PriceList_ID())); sb.append("\n@M_PriceList_ID@: ").append(priceList == null ? "-" : priceList.getName()); // // Pricing System final PricingSystemId pricingSystemId = priceList != null ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\pricing\exceptions\ProductNotOnPriceListException.java
1
请完成以下Java代码
public void setStrategy(Integer strategy) { this.strategy = strategy; } public String getRefResource() { return refResource; } public void setRefResource(String refResource) { this.refResource = refResource; } public Integer getControlBehavior() { return contro...
@Override public Date getGmtCreate() { return gmtCreate; } public void setGmtCreate(Date gmtCreate) { this.gmtCreate = gmtCreate; } public Date getGmtModified() { return gmtModified; } public void setGmtModified(Date gmtModified) { this.gmtModified = gmtMod...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\rule\FlowRuleEntity.java
1
请在Spring Boot框架中完成以下Java代码
protected void applyToResource(ClassPathResource resource, RuntimeHints hints) { super.applyToResource(resource, hints); BpmnXMLConverter xmlConverter = new BpmnXMLConverter(); BpmnModel bpmnModel = xmlConverter.convertToBpmnModel(() -> { try { ret...
hints.reflection().registerType(TypeReference.of(beanClassName), MemberCategory.values()); logger.debug("Registering hint for bean name [{}] for service task {} in {}", beanName, serviceTask.getId(), resource); } else { logger.debug("No bea...
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\aot\process\FlowableProcessAutoDeployBeanFactoryInitializationAotProcessor.java
2
请完成以下Java代码
public class Interval { int start; int end; Interval(int start, int end) { this.start = start; this.end = end; } public void setEnd(int end) { this.end = end; } @Override public String toString() { return "Interval{" + "start=" + start + ", end=" + end ...
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Interval interval = (Interval) o; return start == interval.start && end == interval.end; } @Override public int hash...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-8\src\main\java\com\baeldung\algorithms\mergeintervals\Interval.java
1
请完成以下Java代码
public class SparkplugTopicService { private static final Map<String, SparkplugTopic> SPLIT_TOPIC_CACHE = new HashMap<>(); public static final String TOPIC_ROOT_SPB_V_1_0 = "spBv1.0"; public static final String TOPIC_ROOT_CERT_SP = "$sparkplug/certificates/"; public static final String TOPIC_SPLIT_REGE...
/** * all ID Element MUST be a UTF-8 string * and with the exception of the reserved characters of + (plus), / (forward slash). * Publish: $sparkplug/certificates/spBv1.0/G1/NBIRTH/E1 * Publish: spBv1.0/G1/NBIRTH/E1 * Publish: $sparkplug/certificates/spBv1.0/G1/DBIRTH/E1/D1 * Publish: spBv...
repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\util\sparkplug\SparkplugTopicService.java
1