instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public int mergeTable(final String TableName, final String ColumnName, final int from_ID, final int to_ID) { log.debug(TableName + "." + ColumnName + " - From=" + from_ID + ",To=" + to_ID); String sql = "UPDATE " + TableName + " SET " + ColumnName + "=" + to_ID + " WHERE " + ColumnName + "=" + from_ID; b...
else if (ColumnName.equals(AD_USER_ID)) { } else if (ColumnName.equals(C_BPARTNER_ID)) { // task FRESH-152 : Refactor final I_C_BPartner partner = InterfaceWrapperHelper.create(Env.getCtx(), to_ID, I_C_BPartner.class, ITrx.TRXNAME_None); if (partner != null) { final MPayment[] payments = MPay...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\Merge.java
1
请在Spring Boot框架中完成以下Java代码
public class BookstoreService { private final AuthorRepository authorRepository; private final BookRepository bookRepository; private final PaperbackRepository paperbackRepository; private final EbookRepository ebookRepository; public BookstoreService(AuthorRepository authorRepository, ...
@Transactional(readOnly = true) public void fetchBookByTitle() { Book book = bookRepository.findByTitle("The book of swords"); System.out.println(book); Paperback paperback = paperbackRepository.findByTitle("The beatles anthology"); System.out.println(paperback); Ebook eboo...
repos\Hibernate-SpringBoot-master\HibernateSpringBootJoinTableRepositoryInheritance\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
protected ExecutionEntity resolveExecution(BatchJobContext context) { return null; } @Override protected MessageEntity newJobInstance(BatchJobContext context) { return new MessageEntity(); } @Override protected JobHandlerConfiguration resolveJobHandlerConfiguration(BatchJobContext context) { r...
} @Override public ParameterValueProvider getJobPriorityProvider() { long batchJobPriority = Context.getProcessEngineConfiguration() .getBatchJobPriority(); return new ConstantValueProvider(batchJobPriority); } @Override public MessageEntity reconfigure(BatchJobContext context, MessageEntity...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\BatchJobDeclaration.java
1
请完成以下Java代码
public OptionalBoolean ifUnknown(@NonNull final OptionalBoolean other) { return isPresent() ? this : other; } @NonNull public OptionalBoolean ifUnknown(@NonNull final Supplier<OptionalBoolean> otherSupplier) { return isPresent() ? this : otherSupplier.get(); } @JsonValue @Nullable public Boolean toBoolea...
{ action.accept(true); } else if (this == FALSE) { action.accept(false); } } public void ifTrue(@NonNull final Runnable action) { if (this == TRUE) { action.run(); } } public <U> Optional<U> map(@NonNull final BooleanFunction<? extends U> mapper) { return isPresent() ? Optional.ofNullab...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\OptionalBoolean.java
1
请完成以下Java代码
public class ProcessSuspendedListenerDelegate implements ActivitiEventListener { private List<ProcessRuntimeEventListener<ProcessSuspendedEvent>> processRuntimeEventListeners; private ToProcessSuspendedConverter processSuspendedConverter; public ProcessSuspendedListenerDelegate( List<ProcessRunti...
processSuspendedConverter .from((ActivitiEntityEvent) event) .ifPresent(convertedEvent -> { for (ProcessRuntimeEventListener<ProcessSuspendedEvent> listener : processRuntimeEventListeners) { listener.onEvent(convertedEvent); ...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\event\internal\ProcessSuspendedListenerDelegate.java
1
请完成以下Java代码
public void setPerson(List<KeyValuePair> person) { this.person = person; } public static class KeyValuePair { private String key; private Object value; public KeyValuePair() { } public KeyValuePair(String key, Object value) { this.key = key; ...
} public void setKey(String key) { this.key = key; } public Object getValue() { return value; } public void setValue(Object value) { this.value = value; } } }
repos\tutorials-master\jackson-modules\jackson-conversions-3\src\main\java\com\baeldung\jackson\specifictype\dtos\PersonDTO.java
1
请完成以下Java代码
protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { /* * 当没有使用缓存的时候,不断刷新页面的话,这个代码会不断执行, * 当其实没有必要每次都重新设置权限信息,所以我们需要放到缓存中进行管理; * 当放到缓存中时,这样的话,doGetAuthorizationInfo就只会执行一次了, * 缓存过期之后会再次执行。 */ _logger.info("权限配置-->MyShiroRealm.d...
return authorizationInfo; } /** * 设置认证加密方式 */ @Override public void setCredentialsMatcher(CredentialsMatcher credentialsMatcher) { HashedCredentialsMatcher md5CredentialsMatcher = new HashedCredentialsMatcher(); md5CredentialsMatcher.setHashAlgorithmName(ShiroKit.HASH_ALGORITH...
repos\SpringBootBucket-master\springboot-shiro\src\main\java\com\xncoding\pos\shiro\MyShiroRealm.java
1
请完成以下Java代码
public String getDecisionKey() { return decisionKey; } public void setDecisionKey(String decisionKey) { this.decisionKey = decisionKey; } public String getDecisionId() { return decisionId; } public void setDecisionId(String decisionId) { this.decisionId = decision...
this.tenantId = tenantId; } public boolean isFallbackToDefaultTenant() { return fallbackToDefaultTenant; } public void setFallbackToDefaultTenant(boolean fallbackToDefaultTenant) { this.fallbackToDefaultTenant = fallbackToDefaultTenant; } public boolean isForceDMN11() { r...
repos\flowable-engine-main\modules\flowable-dmn-api\src\main\java\org\flowable\dmn\api\ExecuteDecisionContext.java
1
请完成以下Java代码
public SingleAmqpConnectionFactory setConnectionOptions(ConnectionOptions connectionOptions) { this.connectionOptions = connectionOptions.clone(); return this; } @Override public Connection getConnection() { Connection connectionToReturn = this.connection; if (connectionToReturn == null) { this.instanceL...
finally { this.instanceLock.unlock(); } } return connectionToReturn; } @Override public void destroy() { Connection connectionToClose = this.connection; if (connectionToClose != null) { connectionToClose.close(); this.connection = null; } } }
repos\spring-amqp-main\spring-amqp-client\src\main\java\org\springframework\amqp\client\SingleAmqpConnectionFactory.java
1
请在Spring Boot框架中完成以下Java代码
public MonetaryAmountType getAdjustmentMonetaryAmount() { return adjustmentMonetaryAmount; } /** * Sets the value of the adjustmentMonetaryAmount property. * * @param value * allowed object is * {@link MonetaryAmountType } * */ public void setAdjustm...
*/ public TaxType getTax() { return tax; } /** * Sets the value of the tax property. * * @param value * allowed object is * {@link TaxType } * */ public void setTax(TaxType value) { this.tax = value; } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\AdjustmentType.java
2
请完成以下Java代码
public Timer createTimer(String key, String... tags) { Timer.Builder timerBuilder = Timer.builder(key) .tags(tags) .publishPercentiles(); if (timerPercentiles != null && timerPercentiles.length > 0) { timerBuilder.publishPercentiles(timerPercentiles); ...
return tags; } private static class StubCounter implements Counter { @Override public void increment(double amount) { } @Override public double count() { return 0; } @Override public Id getId() { return null; } ...
repos\thingsboard-master\common\stats\src\main\java\org\thingsboard\server\common\stats\DefaultStatsFactory.java
1
请在Spring Boot框架中完成以下Java代码
public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("index"); } /** * Static resource locations including themes */ @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandl...
return resolver; } /** * Configuration for async thread bean * * More: https://docs.spring.io/autorepo/docs/spring-framework/5.0.3.RELEASE/javadoc-api/org/springframework/scheduling/SchedulingTaskExecutor.html */ @Bean public Executor asyncExecutor() { ThreadPoolTaskExecutor...
repos\tutorials-master\ethereum\src\main\java\com\baeldung\web3j\config\AppConfig.java
2
请完成以下Java代码
protected void dispatchJobCanceledEvents(ExecutionEntity activityExecution) { if (activityExecution != null) { List<JobEntity> jobs = activityExecution.getJobs(); for (JobEntity job : jobs) { if (Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) { ...
/** * Actual implementation of leaving an activity. * @param execution The current execution context * @param checkConditions Whether or not to check conditions before determining whether or not to take a transition. * @param throwExceptionIfExecutionStuck If true, an {@link ActivitiException} will ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\BpmnActivityBehavior.java
1
请完成以下Java代码
public I_M_Product getM_Product() throws RuntimeException { return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name) .getPO(getM_Product_ID(), get_TrxName()); } /** Set Product. @param M_Product_ID Product, Service, Item */ public void setM_Product_ID (int M_Product_ID) { if (M_Product_ID...
{ set_Value (COLUMNNAME_Qty, Qty); } /** Get Quantity. @return Quantity */ public BigDecimal getQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); if (bd == null) return Env.ZERO; return bd; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_LandedCostAllocation.java
1
请完成以下Java代码
public ImmutableList<WebuiPickHUResult> setPackingInstruction(final List<ProductsToPickRow> selectedRows, final PackToSpec packToSpec) { final Map<PickingCandidateId, DocumentId> rowIdsByPickingCandidateId = streamRowsEligibleForPacking(selectedRows) .collect(ImmutableMap.toImmutableMap(ProductsToPickRow::getPic...
@NonNull private Stream<ProductsToPickRow> streamRowsEligibleForPicking(final List<ProductsToPickRow> selectedRows) { return selectedRows .stream() .filter(ProductsToPickRow::isEligibleForPicking); } private PickRequest createPickRequest(final ProductsToPickRow row) { final PickingConfigV2 pickingConf...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\rows\ProductsToPickRowsService.java
1
请完成以下Java代码
private void initReader() throws Exception { ClassLoader classLoader = this .getClass() .getClassLoader(); if (file == null) file = new File(classLoader .getResource(fileName) .getFile()); if (fileReader == null) fileReader = new FileReader(file); ...
} catch (IOException e) { logger.error("Error while closing writer."); } } public void closeReader() { try { CSVReader.close(); fileReader.close(); } catch (IOException e) { logger.error("Error while closing reader."); } } }
repos\tutorials-master\spring-batch\src\main\java\com\baeldung\taskletsvschunks\utils\FileUtils.java
1
请完成以下Java代码
public static String email(String email) { if (oConvertUtils.isEmpty(email)) { return ""; } int index = email.indexOf("@"); if (index <= 1){ return email; } String begin = email.substring(0, 1); String end = email.substring(index); ...
*/ public static String formatLeft(String str, int reservedLength){ int len = str.length(); String show = str.substring(len-reservedLength); String stars = String.join("", Collections.nCopies(len-reservedLength, "*")); return stars + show; } /** * 将中间的格式化成* * @para...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\desensitization\util\SensitiveInfoUtil.java
1
请完成以下Java代码
public void setLoadOnStartup(int loadOnStartup) { this.loadOnStartup = loadOnStartup; } /** * Set the {@link MultipartConfigElement multi-part configuration}. * @param multipartConfig the multipart configuration to set or {@code null} */ public void setMultipartConfig(@Nullable MultipartConfigElement multip...
protected void configure(ServletRegistration.Dynamic registration) { super.configure(registration); String[] urlMapping = StringUtils.toStringArray(this.urlMappings); if (urlMapping.length == 0 && this.alwaysMapUrl) { urlMapping = DEFAULT_MAPPINGS; } if (!ObjectUtils.isEmpty(urlMapping)) { registration....
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\ServletRegistrationBean.java
1
请完成以下Java代码
void uncloseIt() { if (getStatus() != PPOrderRoutingActivityStatus.CLOSED) { logger.warn("Only Closed activities can be unclosed - {}", this); return; } changeStatusTo(PPOrderRoutingActivityStatus.IN_PROGRESS); } void voidIt() { if (getStatus() == PPOrderRoutingActivityStatus.VOIDED) { logger...
setSetupTimeRequired(Duration.ZERO); setDurationRequired(Duration.ZERO); } public void completeIt() { changeStatusTo(PPOrderRoutingActivityStatus.COMPLETED); if (getDateFinish() == null) { setDateFinish(SystemTime.asInstant()); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\PPOrderRoutingActivity.java
1
请完成以下Java代码
public class AD_Role { public static final AD_Role instance = new AD_Role(); private AD_Role() { super(); } @Init public void init(final IModelValidationEngine engine) { CopyRecordFactory.enableForTableName(I_AD_Role.Table_Name); final IModelCacheService cachingService = Services.get(IModelCacheService....
{ // Add Role to SuperUser roleDAO.createUserRoleAssignmentIfMissing(UserId.METASFRESH, roleId); // Add Role to User which created this record final UserId createdByUserId = UserId.ofRepoId(role.getCreatedBy()); if (!createdByUserId.equals(UserId.METASFRESH)) { roleDAO.createUserRoleAssignmentIfM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\model\interceptor\AD_Role.java
1
请在Spring Boot框架中完成以下Java代码
public AthenaClient athenaClient() { return AthenaClient.builder() .credentialsProvider(constructCredentials()) .build(); } @Bean public QueryExecutionContext queryExecutionContext() { final var database = awsConfigurationProperties.getAthena().getDatabas...
public ResultConfiguration resultConfiguration() { final var outputLocation = awsConfigurationProperties.getAthena().getS3OutputLocation(); return ResultConfiguration.builder() .outputLocation(outputLocation) .build(); } private StaticCredentialsProvider construc...
repos\tutorials-master\aws-modules\amazon-athena\src\main\java\com\baeldung\athena\configuration\AmazonAthenaConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public Date getBirth() { return birth; } public void setBirth(Date birth) { this.birth = birth; } public Map<String, Object> getMap() { return map; } public void setMap(Map<String, Object> map) { this.map = map; } public List<Object> getList() { ...
sb.append( "\"lastName\":\"" ) .append( lastName ).append( '\"' ); sb.append( ",\"age\":" ) .append( age ); sb.append( ",\"boss\":" ) .append( boss ); sb.append( ",\"birth\":\"" ) .append( birth ).append( '\"' ); sb.append( ...
repos\SpringBootLearning-master (1)\springboot-config\src\main\java\com\gf\entity\Person.java
2
请在Spring Boot框架中完成以下Java代码
public void start(StartContext context) throws StartException { MscRuntimeContainerDelegate runtimeContainerDelegate = runtimeContainerDelegateSupplier.get(); runtimeContainerDelegate.processEngineStarted(processEngine); createProcessEngineJndiBinding(context); } protected void createProcessEngineJndi...
bindingService = BindingUtil.createJndiBindings(context.getChildTarget(), processEngineServiceBindingServiceName, jndiName, managedReferenceFactory); // log info message LOGG.info("jndi binding for process engine " + processEngine.getName() + " is " + jndiName); } protected void removeProcessEngineJndiBin...
repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\MscManagedProcessEngine.java
2
请完成以下Java代码
public void setDescription (String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Description. @return Optional short description of the record */ public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set Expense. @param Expense Expense...
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set PostingType. @param PostingType The type of posted amount for the transaction */ public void setPostingType (String PostingType) { set_Value (COLUMNNAME_PostingType, PostingType)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Depreciation_Exp.java
1
请完成以下Java代码
public Duration getKeepAlive() { return keepAlive; } public void setKeepAlive(Duration keepAlive) { this.keepAlive = keepAlive; } public int getQueueSize() { return queueSize; } public void setQueueSize(int queueSize) { this.queueSize = queueSize; } pu...
public Duration getAwaitTerminationPeriod() { return awaitTerminationPeriod; } public void setAwaitTerminationPeriod(Duration awaitTerminationPeriod) { this.awaitTerminationPeriod = awaitTerminationPeriod; } public String getThreadPoolNamingPattern() { return threadPoolNamingPa...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\async\AsyncTaskExecutorConfiguration.java
1
请完成以下Java代码
public class PricingUtil { @NonNull public static IEditablePricingContext copyCtxOverridePriceListAndRefObject( @NonNull final IPricingContext pricingCtx, @NonNull final I_M_PriceList priceList) { final IEditablePricingContext newPricingContext = pricingCtx.copy(); newPricingContext.setReferencedObject(nu...
@Nullable public static I_M_PriceList retrievePriceListForConditionsAndCountry( @NonNull final CountryId countryId, @NonNull final PricingSystemId pricingSystemId, @NonNull final SOTrx soTrx) { return Services.get(IQueryBL.class) .createQueryBuilder(I_M_PriceList.class) .addOnlyActiveRecordsFilter(...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\pricing\PricingUtil.java
1
请完成以下Java代码
public abstract class BaseDataWithAdditionalInfo<I extends UUIDBased> extends BaseData<I> implements HasAdditionalInfo { @NoXss private transient JsonNode additionalInfo; @JsonIgnore private byte[] additionalInfoBytes; public BaseDataWithAdditionalInfo() { super(); } public BaseDa...
public int hashCode() { return Objects.hash(super.hashCode(), additionalInfoBytes); } public static JsonNode getJson(Supplier<JsonNode> jsonData, Supplier<byte[]> binaryData) { JsonNode json = jsonData.get(); if (json != null) { return json; } else { byte...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\BaseDataWithAdditionalInfo.java
1
请完成以下Java代码
public void windowOpened(final WindowEvent e) { // // Disable frame (make new frame behave like a modal frame) parentFrame.setFocusable(false); parentFrame.setEnabled(false); } @Override public void windowActivated(final WindowEvent e) { windowGainedFocus(e); } @Override pu...
{ return; } modalFrame.toFront(); modalFrame.repaint(); }); } @Override public void windowLostFocus(final WindowEvent e) { // nothing } }); if (modalFrame instanceof CFrame) { addToWindowManager(modalFrame); } showCenterWindow(parentFrame, modalFrame); } /**...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\AEnv.java
1
请完成以下Java代码
public final IHUProducerAllocationDestination setIsHUPlanningReceiptOwnerPM(boolean isHUPlanningReceiptOwnerPM) { this._isHUPlanningReceiptOwnerPM = isHUPlanningReceiptOwnerPM; return this; } public final boolean isHUPlanningReceiptOwnerPM() { return _isHUPlanningReceiptOwnerPM; } /** * Sets this produc...
if (hu == null) { return; // shall not happen } currentHUCursor.closeCurrent(); // close the current position of this cursor // since _createdNonAggregateHUs is just a subset of _createdHUs, we don't know if 'hu' was in there to start with. All we care is that it's not in _createdNonAggregateHUs after this...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\AbstractProducerDestination.java
1
请完成以下Java代码
public class Point { private final double x; private final double y; public Point(double x, double y) { this.x = x; this.y = y; } public double getX() { return x; } public double getY() { return y; } @Override public String toString() {
return "Point{" + "x=" + x + ", y=" + y + '}'; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Point point = (Point) o; return Double.compare(...
repos\tutorials-master\core-java-modules\core-java-lang-math-5\src\main\java\com\baeldung\storingXYcoordinates\Point.java
1
请完成以下Java代码
public java.lang.String getEntityType () { return (java.lang.String)get_Value(COLUMNNAME_EntityType); } /** Set Kommentar/Hilfe. @param Help Comment or Hint */ @Override public void setHelp (java.lang.String Help) { set_Value (COLUMNNAME_Help, Help); } /** Get Kommentar/Hilfe. @return Comment o...
public void setModal (boolean Modal) { set_Value (COLUMNNAME_Modal, Boolean.valueOf(Modal)); } /** Get Is Modal. @return Is Modal */ @Override public boolean isModal () { Object oo = get_Value(COLUMNNAME_Modal); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Form.java
1
请完成以下Java代码
void deleteLast() { --_size; } /** * 重设大小 * @param size 大小 */ void resize(int size) { if (size > _capacity) { resizeBuf(size); } _size = size; } /** * 重设大小,并且在末尾加一个值 * @param size 大小 * @param value 值 */ ...
} else { capacity = 1; while (capacity < size) { capacity <<= 1; } } byte[] buf = new byte[capacity]; if (_size > 0) { System.arraycopy(_buf, 0, buf, 0, _size); } _buf = buf; ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\AutoBytePool.java
1
请在Spring Boot框架中完成以下Java代码
public class EdgeDataValidator extends DataValidator<Edge> { private final EdgeDao edgeDao; private final TenantService tenantService; private final CustomerDao customerDao; @Override protected void validateCreate(TenantId tenantId, Edge edge) { validateNumberOfEntitiesPerTenant(tenantId, ...
throw new DataValidationException("Edge routing key should be specified!"); } if (edge.getTenantId() == null) { throw new DataValidationException("Edge should be assigned to tenant!"); } else { if (!tenantService.tenantExists(edge.getTenantId())) { throw n...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\service\validator\EdgeDataValidator.java
2
请在Spring Boot框架中完成以下Java代码
public class CreditCard { @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "credit_card_id_seq") @SequenceGenerator(name = "credit_card_id_seq", sequenceName = "credit_card_id_seq", allocationSize = 1) private Long id; private String cardNumber; private String expiryDate; ...
return expiryDate; } public void setExpiryDate(String expiryDate) { this.expiryDate = expiryDate; } public CreditCard() { } @Override public String toString() { return "CreditCard{" + "id=" + id + ", cardNumber='" + cardNumber + '\'' + ", expiryDate='" + expiryDate + '\'' ...
repos\tutorials-master\persistence-modules\spring-data-jpa-query-2\src\main\java\com\baeldung\upsert\CreditCard.java
2
请完成以下Java代码
public String getA_Insurance_Co () { return (String)get_Value(COLUMNNAME_A_Insurance_Co); } /** Set Insured Value. @param A_Ins_Value Insured Value */ public void setA_Ins_Value (BigDecimal A_Ins_Value) { set_Value (COLUMNNAME_A_Ins_Value, A_Ins_Value); } /** Get Insured Value. @return Insured Value...
} /** Set Replacement Costs. @param A_Replace_Cost Replacement Costs */ public void setA_Replace_Cost (BigDecimal A_Replace_Cost) { set_Value (COLUMNNAME_A_Replace_Cost, A_Replace_Cost); } /** Get Replacement Costs. @return Replacement Costs */ public BigDecimal getA_Replace_Cost () { BigDecimal b...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Info_Ins.java
1
请完成以下Java代码
public void updateActivity(final I_C_OrderLine orderLine) { if (InterfaceWrapperHelper.isCopy(orderLine)) { // let the activity be copied from the source. return; } final ActivityId groupActivityId = getGroupActivityId(orderLine); orderLine.setC_Activity_ID(ActivityId.toRepoId(groupActivityId)); ...
if (orderLineDimension == null) { //nothing to do return; } dimensionService.updateRecord(orderLine, orderLineDimension.withActivityId(productActivityId)); } private ActivityId getGroupActivityId(final I_C_OrderLine orderLine) { if (orderLine.getC_Order_CompensationGroup_ID() <= 0) { return nul...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\activity\model\validator\C_OrderLine.java
1
请完成以下Java代码
public ExternalTaskRestService getExternalTaskRestService() { return super.getExternalTaskRestService(null); } @Path(MigrationRestService.PATH) public MigrationRestService getMigrationRestService() { return super.getMigrationRestService(null); } @Path(ModificationRestService.PATH) public Modificat...
@Path(VersionRestService.PATH) public VersionRestService getVersionRestService() { return super.getVersionRestService(null); } @Path(SchemaLogRestService.PATH) public SchemaLogRestService getSchemaLogRestService() { return super.getSchemaLogRestService(null); } @Path(EventSubscriptionRestService.P...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\DefaultProcessEngineRestServiceImpl.java
1
请完成以下Java代码
public String getName() { return this.name; } /** * Return the return type. * @return the return type */ public String getReturnType() { return this.returnType; } /** * Return the value. * @return the value */ public Object getValue() { return this.value; } /** * Return whether this field...
public Builder modifiers(int modifiers) { this.modifiers = modifiers; return this; } /** * Sets the value. * @param value the value * @return this for method chaining */ public Builder value(Object value) { this.value = value; this.initialized = true; return this; } /** * Sets ...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\java\JavaFieldDeclaration.java
1
请完成以下Java代码
public abstract class AbstractValueJasyptMojo extends AbstractJasyptMojo { /** * The decrypted property suffix */ @Parameter(property = "jasypt.plugin.value") private String value = null; @Override void run(EncryptionService encryptionService, ConfigurableApplicationContext context, Stri...
} /** * Run the encryption task. * * @param encryptionService the service for encryption * @param value the value to operate on * @param encryptPrefix encryption prefix * @param encryptSuffix encryption suffix * @param decryptPrefix decryption prefix ...
repos\jasypt-spring-boot-master\jasypt-maven-plugin\src\main\java\com\ulisesbocchio\jasyptmavenplugin\mojo\AbstractValueJasyptMojo.java
1
请完成以下Spring Boot application配置
#spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration #security.user.password=password #security.oauth2.c
lient.client-id=client #security.oauth2.client.client-secret=secret
repos\tutorials-master\spring-boot-modules\spring-boot-security\src\main\resources\application.properties
2
请完成以下Java代码
public java.lang.String getTrxType () { return (java.lang.String)get_Value(COLUMNNAME_TrxType); } /** Set Prüfziffer. @param VoiceAuthCode Voice Authorization Code from credit card company */ @Override public void setVoiceAuthCode (java.lang.String VoiceAuthCode) { set_Value (COLUMNNAME_VoiceAuthCod...
{ set_Value (COLUMNNAME_WriteOffAmt, WriteOffAmt); } /** Get Write-off Amount. @return Amount to write-off */ @Override public java.math.BigDecimal getWriteOffAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WriteOffAmt); if (bd == null) { return Env.ZERO; } return bd; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Payment.java
1
请完成以下Java代码
public void setInOutLine (MInOutLine line) { setM_InOutLine_ID(line.getM_InOutLine_ID()); setTargetQty(line.getMovementQty()); // Confirmations in Storage UOM setConfirmedQty (getTargetQty()); // suggestion m_line = line; } // setInOutLine /** * Get Shipment Line * @return line */ public MInOutLin...
{ line.setConfirmedQty(getConfirmedQty()); } return line.save(get_TrxName()); } // processConfirmation /** * Is Fully Confirmed * @return true if Target = Confirmed qty */ public boolean isFullyConfirmed() { return getTargetQty().compareTo(getConfirmedQty()) == 0; } // isFullyConfirmed /*...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MInOutLineConfirm.java
1
请在Spring Boot框架中完成以下Java代码
public void addToTheEnd() { ShoppingCart cart = shoppingCartRepository.findByOwner("Mark Juno"); cart.getBooks().add("The last day"); } @Transactional public void addInTheMiddle() { ShoppingCart cart = shoppingCartRepository.findByOwner("Mark Juno"); cart.getBooks().add(ca...
@Transactional public void removeLast() { ShoppingCart cart = shoppingCartRepository.findByOwner("Mark Juno"); cart.getBooks().remove(cart.getBooks().size() - 1); } @Transactional public void removeMiddle() { ShoppingCart cart = shoppingCartRepository.findByOwner("Mark Juno"); ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootElementCollectionNoOrderColumn\src\main\java\com\bookstore\service\ShoppingCartService.java
2
请完成以下Java代码
public TaxInformation4 getTaxRmt() { return taxRmt; } /** * Sets the value of the taxRmt property. * * @param value * allowed object is * {@link TaxInformation4 } * */ public void setTaxRmt(TaxInformation4 value) { this.taxRmt = value; } ...
public void setGrnshmtRmt(Garnishment1 value) { this.grnshmtRmt = value; } /** * Gets the value of the addtlRmtInf property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list w...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-xjc_camt054_001_06\de\metas\payment\camt054_001_06\StructuredRemittanceInformation13.java
1
请在Spring Boot框架中完成以下Java代码
public class Post { @Id @GeneratedValue private Long id; private String title; private String content; @ManyToOne(fetch = FetchType.LAZY) private Person author; public Post() { } public Post(String title, String content, Person author) { this.title = title; ...
} public Person getAuthor() { return author; } public void setAuthor(Person author) { this.author = author; } @Override public String toString() { return "Post{" + "id=" + id + ", title='" + title + '\'' + ", content='" +...
repos\tutorials-master\persistence-modules\blaze-persistence\src\main\java\com\baeldung\model\Post.java
2
请完成以下Java代码
public void onFailure(Throwable t) { log.error("Failed to submit Housekeeper task", t); } }; } @Override public void submitTask(HousekeeperTask task) { HousekeeperTaskType taskType = task.getTaskType(); if (config.getDisabledTaskTypes().contains(taskType)...
* using msg key as entity id so that msgs related to certain entity are pushed to same partition, * e.g. on tenant deletion (entity id is tenant id), we need to clean up tenant entities in certain order * */ try { producer.send(submitTpi, new TbProtoQueueMsg<>(task.getEntityId().ge...
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\housekeeper\DefaultHousekeeperClient.java
1
请完成以下Java代码
public String getEmail() { return email; } public void setEmail(final String email) { this.email = email; } public Integer getStatus() { return status; } public void setStatus(Integer status) { this.status = status; } public int getAge() { retu...
} @Override public String toString() { return "User [name=" + name + ", id=" + id + "]"; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; User user = (User) o; return id == u...
repos\tutorials-master\persistence-modules\spring-data-jpa-simple\src\main\java\com\baeldung\jpa\query\model\User.java
1
请完成以下Java代码
public List<TableRecordIdDescriptor> retrieveAllTableRecordIdReferences() { return retrieveTableRecordIdReferences(null); } private ImmutableList<TableRecordIdDescriptor> retrieveTableRecordIdReferences(@Nullable final String onlyTableName) { final POInfoMap poInfoMap = POInfo.getPOInfoMap(); final Immutabl...
return result.build(); } /** * This method executes the equivalent of the following query: * <p> * {@code SELECT DISTINCT(<p_id_columnname>) FROM <p_tablename> WHERE COALESCE(<p_id_columnname>,0)!=0} * <p> * ...just faster. * <p> * See <a href="https://github.com/metasfresh/metasfresh/issues/3389">http...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\table\api\impl\TableRecordIdDAO.java
1
请完成以下Java代码
public String toString() { StringBuffer sb = new StringBuffer ("X_T_BoilerPlate_Spool[") .append(get_ID()).append("]"); return sb.toString(); } /** Set Process Instance. @param AD_PInstance_ID Instance of the process */ @Override public void setAD_PInstance_ID (int AD_PInstance_I...
/** Set Sequence. @param SeqNo Method of ordering records; lowest number comes first */ @Override public void setSeqNo (int SeqNo) { set_ValueNoCheck (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Sequence. @return Method of ordering records; lowest number comes first */ @Override public i...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\letters\model\X_T_BoilerPlate_Spool.java
1
请完成以下Java代码
public String getType() { return TYPE; } public void execute(BatchMonitorJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) { String batchId = configuration.getBatchId(); BatchEntity batch = commandContext.getBatchManager().findBatchById(configur...
public String getBatchId() { return batchId; } @Override public String toCanonicalString() { return batchId; } } public void onDelete(BatchMonitorJobConfiguration configuration, JobEntity jobEntity) { // do nothing } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\BatchMonitorJobHandler.java
1
请完成以下Java代码
public SslContext initSslContext() { try { SslContextBuilder builder = SslContextBuilder.forClient(); if (StringUtils.hasLength(caCert)) { builder.trustManager(createAndInitTrustManagerFactory()); } if (StringUtils.hasLength(cert) && StringUtils.ha...
protected KeyStore loadKeyStore() throws Exception { List<X509Certificate> certificates = SslUtil.readCertFile(this.cert); PrivateKey privateKey = SslUtil.readPrivateKey(this.privateKey, password); KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); keyStore.load(null);...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\credentials\CertPemCredentials.java
1
请完成以下Java代码
public void setXssProtectionValue(String xssProtectionValue) { this.xssProtectionValue = xssProtectionValue; } public boolean isContentSecurityPolicyDisabled() { return contentSecurityPolicyDisabled; } public void setContentSecurityPolicyDisabled(boolean contentSecurityPolicyDisabled) { this.conte...
return hstsValue; } public void setHstsValue(String hstsValue) { this.hstsValue = hstsValue; } public String getHstsMaxAge() { return hstsMaxAge; } public void setHstsMaxAge(String hstsMaxAge) { this.hstsMaxAge = hstsMaxAge; } @Override public String toString() { StringJoiner joine...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\HeaderSecurityProperties.java
1
请完成以下Java代码
private static ADProcessName retrieve(final ResultSet rs) throws SQLException { return ADProcessName.builder() .value(rs.getString(PREFIX + "Value")) .classname(rs.getString(PREFIX + "Classname")) .build(); } } public static final class ADElementName_Loader { public static String retrieveCol...
adElementId); } } public static final class ADMessageName_Loader { public static String retrieveValue(@NonNull final AdMessageId adMessageId) { return DB.getSQLValueStringEx(ITrx.TRXNAME_ThreadInherited, "SELECT Value FROM AD_Message WHERE AD_Message_ID=?", adMessageId); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\validator\sql_migration_context_info\names\Names.java
1
请完成以下Spring Boot application配置
spring.mvc.pathmatch.matching-strategy=ant_path_matcher springdoc.swagger-ui.path=/swagger-ui.html management.endpoints.enabled-by-default=false management.endpoint.info.enabled=false # Local app server port server.port=8081 # Playground # Obtain key and secret by logging into https://play.orkes.io/ # and navigati...
ring.jpa.database-platform=com.springboot.sqlite.SQLDialect spring.jpa.hibernate.ddl-auto=update spring.datasource.url=jdbc:sqlite:food_delivery.db spring.datasource.driver-class-name = org.sqlite.JDBC spring.datasource.username=admin spring.datasource.password=admin
repos\tutorials-master\microservices-modules\saga-pattern\src\main\resources\application.properties
2
请完成以下Java代码
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } VersionRange other = (VersionRange) obj; if (this.higherInclusive != other.higherInclusive) { return false; } if (this.higherVersio...
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (this.higherInclusive ? 1231 : 1237); result = prime * result + ((this.higherVersion == null) ? 0 : this.higherVersion.hashCode()); result = prime * result + (this.lowerInclusive ? 1231 : 1237); result = prime...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\version\VersionRange.java
1
请完成以下Java代码
public class DefaultAutoDeploymentStrategy extends AbstractAutoDeploymentStrategy { /** * The deployment mode this strategy handles. */ public static final String DEPLOYMENT_MODE = "default"; public DefaultAutoDeploymentStrategy(ApplicationUpgradeContextService applicationUpgradeContextService) ...
DeploymentBuilder deploymentBuilder = repositoryService .createDeployment() .enableDuplicateFiltering() .name(deploymentNameHint); for (final Resource resource : resources) { final String resourceName = determineResourceName(resource); deploymentBuil...
repos\Activiti-develop\activiti-core\activiti-spring\src\main\java\org\activiti\spring\autodeployment\DefaultAutoDeploymentStrategy.java
1
请完成以下Java代码
public class C_Invoice_Candidate_Assign_MaterialTracking extends JavaProcess implements IProcessPrecondition { private final MaterialTrackingInvoiceCandService invoiceCandService = SpringContextHolder.instance.getBean(MaterialTrackingInvoiceCandService.class); private final IQueryBL queryBL = Services.get(IQueryBL.cl...
invoiceCandService.unlinkMaterialTrackings(ics, p_isClearAggregationKeyOverride); } else { invoiceCandService.linkMaterialTrackings(ics, materialTrackingId); } return MSG_OK; } private List<I_C_Invoice_Candidate> getSelectedInvoiceCandidates() { final IQueryFilter<I_C_Invoice_Candidate> selectedPart...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\process\C_Invoice_Candidate_Assign_MaterialTracking.java
1
请完成以下Java代码
public String getValue() { return this.value; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } WebServerNamespace other = (WebServerNamespace) obj; return this.value.equals(other.value); } @Ove...
if (!ClassUtils.isPresent(WEB_SERVER_CONTEXT_CLASS, null)) { return SERVER; } return from(WebServerApplicationContext.getServerNamespace(context)); } /** * Factory method to create a new {@link WebServerNamespace} from a value. If the * value is empty or {@code null} then {@link #SERVER} is returned. * ...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\web\WebServerNamespace.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(final Long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(final String title) { this.title = title; } public String getContent() { return content; }...
return false; } final Article article = (Article) o; if (!Objects.equals(id, article.id)) { return false; } if (!Objects.equals(title, article.title)) { return false; } if (!Objects.equals(content, article.content)) { return f...
repos\tutorials-master\persistence-modules\spring-data-jpa-query-3\src\main\java\com\baeldung\spring\data\jpa\spel\entity\Article.java
1
请完成以下Java代码
final class RepositoryUtils { private RepositoryUtils() { } @SuppressWarnings("unchecked") static <T> Class<T> getDomainType(Object executor) { return (Class<T>) getRepositoryMetadata(executor).getDomainType(); } static RepositoryMetadata getRepositoryMetadata(Object executor) { Assert.isInstanceOf(Reposi...
static CursorStrategy<ScrollPosition> defaultCursorStrategy() { return CursorStrategy.withEncoder(new ScrollPositionCursorStrategy(), CursorEncoder.base64()); } static int defaultScrollCount() { return 20; } static Function<Boolean, ScrollPosition> defaultScrollPosition() { return (forward) -> ScrollPositio...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\data\query\RepositoryUtils.java
1
请在Spring Boot框架中完成以下Java代码
public Map<String, String> resourceAttributes() { Map<String, String> resourceAttributes = new LinkedHashMap<>(); new OpenTelemetryResourceAttributes(this.environment, this.openTelemetryProperties.getResourceAttributes()) .applyTo(resourceAttributes::put); return Collections.unmodifiableMap(resourceAttributes)...
@Override public TimeUnit baseTimeUnit() { return obtain(OtlpMetricsProperties::getBaseTimeUnit, OtlpConfig.super::baseTimeUnit); } private <V> Getter<OtlpMetricsProperties, Map<String, V>> perMeter(Getter<Meter, V> getter) { return (properties) -> { if (CollectionUtils.isEmpty(properties.getMeter())) { ...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\otlp\OtlpMetricsPropertiesConfigAdapter.java
2
请完成以下Java代码
public final class GlobalQRCodeType { public static GlobalQRCodeType ofString(@NonNull final String code) { final String codeNorm = StringUtils.trimBlankToNull(code); if (codeNorm == null) { throw Check.mkEx("Invalid global QR code type: `" + code + "`"); } return interner.intern(new GlobalQRCodeType(co...
@Deprecated public String toString() { return toJson(); } @JsonValue public String toJson() { return code; } public static boolean equals(@Nullable final GlobalQRCodeType type1, @Nullable final GlobalQRCodeType type2) { return Objects.equals(type1, type2); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.global_qrcode.api\src\main\java\de\metas\global_qrcodes\GlobalQRCodeType.java
1
请完成以下Java代码
public static void equalsOperator() { Bson filter = eq("userName", "Jack"); FindIterable<Document> documents = collection.find(filter); printResult(documents); } public static void notEqualOperator() { Bson filter = ne("userName", "Jack"); FindIterable<Document> documen...
Bson filter = exists("type"); FindIterable<Document> documents = collection.find(filter); printResult(documents); } public static void regexOperator() { Bson filter = regex("userName", "a"); FindIterable<Document> documents = collection.find(filter); printResult(docume...
repos\tutorials-master\persistence-modules\java-mongodb\src\main\java\com\baeldung\mongo\filter\FilterOperation.java
1
请完成以下Java代码
public int getAttempts() { return attempts; } public void setAttempts(int attempts) { this.attempts = attempts; } public void encryptPassword() { if (newPassword != null) { salt = generateSalt(); setDbPassword(encryptPassword(newPassword, salt)); } } protected String encryptPa...
.generateSalt(); } public boolean checkPasswordAgainstPolicy() { PasswordPolicyResult result = Context.getProcessEngineConfiguration() .getIdentityService() .checkPasswordAgainstPolicy(newPassword, this); return result.isValid(); } public boolean hasNewPassword() { return newPassword...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\UserEntity.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isRequireAuthentication() { return this.requireAuthentication; } public void setRequireAuthentication(boolean requireAuthentication) { this.requireAuthentication = requireAuthentication; } public String getTruststore() { return this.truststore; } public void setTruststore(String truststore...
return this.cluster; } public void setCluster(String cluster) { this.cluster = cluster; } public String getDefaultAlias() { return this.defaultAlias; } public void setDefaultAlias(String defaultAlias) { this.defaultAlias = defaultAlias; } public String getGateway() { return this.gateway;...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\SslProperties.java
2
请完成以下Java代码
public static void findOneAndReplace() { Document replaceDocument = new Document(); replaceDocument.append("student_id", 8764) .append("student_name", "Paul Starc") .append("address", "Hostel 4") .append("age", 18) .append("roll_no", 199406); Docu...
setup(); // // Update a document using updateOne method // updateOne(); // // Update documents using updateMany method // updateMany(); // // replace a document using replaceOne method // replaceOne(); // ...
repos\tutorials-master\persistence-modules\java-mongodb\src\main\java\com\baeldung\mongo\update\UpdateFields.java
1
请完成以下Java代码
public class ItemDefinitionImpl extends NamedElementImpl implements ItemDefinition { protected static Attribute<String> typeLanguageAttribute; protected static Attribute<Boolean> isCollectionAttribute; protected static ChildElement<TypeRef> typeRefChild; protected static ChildElement<AllowedValues> allowedVal...
.instanceProvider(new ModelTypeInstanceProvider<ItemDefinition>() { public ItemDefinition newInstance(ModelTypeInstanceContext instanceContext) { return new ItemDefinitionImpl(instanceContext); } }); typeLanguageAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_TYPE_LANGUAGE) ...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\ItemDefinitionImpl.java
1
请完成以下Java代码
public String getImplementation() { return implementation; } public void setImplementation(String implementation) { this.implementation = implementation; } public String getImplementationType() { return implementationType; } public void setImplementationType(String imp...
public ServiceTask clone() { ServiceTask clone = new ServiceTask(); clone.setValues(this); return clone; } public void setValues(ServiceTask otherElement) { super.setValues(otherElement); setImplementation(otherElement.getImplementation()); setImplementationType(...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\ServiceTask.java
1
请完成以下Java代码
public Integer getSalary() { return salary; } public void setSalary(Integer salary) { this.salary = salary; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDepartment() {
return department; } public void setDepartment(String department) { this.department = department; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } }
repos\tutorials-master\spring-cloud-modules\spring-cloud-functions-azure\src\main\java\com\baeldung\azure\functions\entity\Employee.java
1
请在Spring Boot框架中完成以下Java代码
public static void validateMetaDataFieldsAndConnections(RuleChainMetaData ruleChainMetaData) { ConstraintValidator.validateFields(ruleChainMetaData); if (CollectionUtils.isNotEmpty(ruleChainMetaData.getConnections())) { validateCircles(ruleChainMetaData.getConnections()); } } ...
throw new DataValidationException("Can't create the relation to yourself."); } connectionsMap .computeIfAbsent(nodeConnection.getFromIndex(), from -> new HashSet<>()) .add(nodeConnection.getToIndex()); } connectionsMap.keySet().forEach(key ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\service\validator\RuleChainDataValidator.java
2
请完成以下Java代码
public class PvmAtomicOperationDeleteCascade implements PvmAtomicOperation { public boolean isAsync(PvmExecutionImpl execution) { return false; } public boolean isAsyncCapable() { return false; } public void execute(PvmExecutionImpl execution) { PvmExecutionImpl nextLeaf; do { nextLea...
} while (!nextLeaf.isDeleteRoot()); } protected PvmExecutionImpl findNextLeaf(PvmExecutionImpl execution) { if (execution.hasChildren()) { return findNextLeaf(execution.getExecutions().get(0)); } return execution; } protected PvmExecutionImpl getDeleteRoot(PvmExecutionImpl execution) { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\operation\PvmAtomicOperationDeleteCascade.java
1
请完成以下Java代码
public boolean hasError(ClientHttpResponse response) throws IOException { return this.defaultErrorHandler.hasError(response); } @Override public void handleError(URI url, HttpMethod method, ClientHttpResponse response) throws IOException { if (HttpStatus.BAD_REQUEST.value() != response.getStatusCode().value()) ...
return BearerTokenError.parse(wwwAuthenticateHeader); } catch (Exception ex) { return null; } } /** * Sets the {@link HttpMessageConverter} for an OAuth 2.0 Error. * @param oauth2ErrorConverter A {@link HttpMessageConverter} for an * {@link OAuth2Error OAuth 2.0 Error}. * @since 5.7 */ public fin...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\http\OAuth2ErrorResponseErrorHandler.java
1
请完成以下Java代码
public class C_Invoice_Candidate_BillBPartner_FacetCollector extends SingleFacetCategoryCollectorTemplate<I_C_Invoice_Candidate> { public C_Invoice_Candidate_BillBPartner_FacetCollector() { super(FacetCategory.builder() .setDisplayNameAndTranslate(I_C_Invoice_Candidate.COLUMNNAME_Bill_BPartner_ID) .setColla...
private IFacet<I_C_Invoice_Candidate> createFacet(final Map<String, Object> row) { final IFacetCategory facetCategoryBPartners = getFacetCategory(); final int bpartnerId = (int)row.get(I_C_BPartner.COLUMNNAME_C_BPartner_ID); final String bpartnerName = new StringBuilder() .append(row.get(I_C_BPartner.COLUMN...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\facet\impl\C_Invoice_Candidate_BillBPartner_FacetCollector.java
1
请完成以下Java代码
public class URIDemo { private final Logger logger = LoggerFactory.getLogger(URIDemo.class); String URISTRING = "https://wordpress.org:443/support/topic/page-jumps-within-wordpress/?replies=3#post-2278484"; // parsed locator String URISCHEME = "https"; String URISCHEMESPECIFIC; String URIHOST =...
public String testURIAsNew(String URIString) { // creating URI object try { uri = new URI(URIString); } catch (URISyntaxException e) { logger.info("URISyntaxException thrown: " + e.getMessage()); e.printStackTrace(); throw new IllegalArgumentExcept...
repos\tutorials-master\core-java-modules\core-java-networking-5\src\main\java\com\baeldung\networking\uriurl\URIDemo.java
1
请完成以下Java代码
public List<JobEntity> findExpiredJobs(Page page) { Date now = getClock().getCurrentTime(); return getDbSqlSession().selectList("selectExpiredJobs", now, page); } @Override @SuppressWarnings("unchecked") public List<Job> findJobsByQueryCriteria(JobQueryImpl jobQuery, Page page) { ...
@Override public void updateJobTenantIdForDeployment(String deploymentId, String newTenantId) { HashMap<String, Object> params = new HashMap<String, Object>(); params.put("deploymentId", deploymentId); params.put("tenantId", newTenantId); getDbSqlSession().update("updateJobTenantIdFo...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisJobDataManager.java
1
请完成以下Java代码
public String getCode() { return code; } /** * Sets the value of the code property. * * @param value * allowed object is * {@link String } * */ public void setCode(String value) { this.code = value; } /** * Gets the value of the...
public String getText() { return text; } /** * Sets the value of the text property. * * @param value * allowed object is * {@link String } * */ public void setText(String value) { this.text = value; } }
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\response\NotificationType.java
1
请在Spring Boot框架中完成以下Java代码
public int hashCode() { return Objects.hash(_id, patientId, patientBirthday, orderId, prescriptionType, creationDate, deliveryDate, startDate, endDate, accountingMonths, doctorId, pharmacyId, therapyId, therapyTypeIds, prescriptedArticleLines, createdBy, annotation, archived, timestamp, updated); } @Override ...
sb.append(" annotation: ").append(toIndentedString(annotation)).append("\n"); sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); sb.append(" updated: ").append(toIndentedString(updated)).append("\n...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-orders-api\src\main\java\io\swagger\client\model\PrescriptionRequest.java
2
请在Spring Boot框架中完成以下Java代码
public AlarmComment saveAlarmComment(Alarm alarm, AlarmComment alarmComment, User user) throws ThingsboardException { ActionType actionType = alarmComment.getId() == null ? ActionType.ADDED_COMMENT : ActionType.UPDATED_COMMENT; if (user != null) { alarmComment.setUserId(user.getId()); ...
public void deleteAlarmComment(Alarm alarm, AlarmComment alarmComment, User user) throws ThingsboardException { if (alarmComment.getType() == AlarmCommentType.OTHER) { alarmComment.setType(AlarmCommentType.SYSTEM); alarmComment.setUserId(null); alarmComment.setComment(Jackson...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\entitiy\alarm\DefaultTbAlarmCommentService.java
2
请完成以下Java代码
public EntityType getEntityType() { return EntityType.ASSET_PROFILE; } @Override public List<EntityInfo> findAssetProfileNamesByTenantId(TenantId tenantId, boolean activeOnly) { log.trace("Executing findAssetProfileNamesByTenantId, tenantId [{}]", tenantId); validateId(tenantId, id ...
@Override protected PageData<AssetProfile> findEntities(TenantId tenantId, TenantId id, PageLink pageLink) { return assetProfileDao.findAssetProfiles(id, pageLink); } @Override protected void removeEntity(TenantId tenantId, AssetProfil...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\asset\AssetProfileServiceImpl.java
1
请完成以下Java代码
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CaseFileItem.class, CMMN_ELEMENT_CASE_FILE_ITEM) .namespaceUri(CMMN11_NS) .extendsType(CmmnElement.class) .instanceProvider(new ModelTypeInstanceProvider<CaseFileItem>(...
.namespace(CMMN10_NS) .idAttributeReference(CaseFileItem.class) .build(); sourceRefCollection = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SOURCE_REFS) .idAttributeReferenceCollection(CaseFileItem.class, CmmnAttributeElementReferenceCollection.class) .build(); targetRefCollecti...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CaseFileItemImpl.java
1
请完成以下Java代码
public ETag getETag() { return etag; } public String getImageName() { return adImage.getFilename(); } public String getContentType() { return adImage.getContentType(); } public byte[] getImageData() { return adImage.getScaledImageData(maxWidth, maxHeight); } public ClientId getAdClientId() { ...
public OrgId getAdOrgId() { return adImage.getClientAndOrgId().getOrgId(); } public AdImageId getAdImageId() { return adImage.getId(); } public ResponseEntity<byte[]> toResponseEntity() { return toResponseEntity(ResponseEntity.status(HttpStatus.OK)); } public ResponseEntity<byte[]> toResponseEntity(@N...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\upload\WebuiImage.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable String getDatabasePlatform() { return this.databasePlatform; } public void setDatabasePlatform(@Nullable String databasePlatform) { this.databasePlatform = databasePlatform; } public @Nullable Database getDatabase() { return this.database; } public void setDatabase(@Nullable Database dat...
public void setGenerateDdl(boolean generateDdl) { this.generateDdl = generateDdl; } public boolean isShowSql() { return this.showSql; } public void setShowSql(boolean showSql) { this.showSql = showSql; } public @Nullable Boolean getOpenInView() { return this.openInView; } public void setOpenInView(@...
repos\spring-boot-4.0.1\module\spring-boot-jpa\src\main\java\org\springframework\boot\jpa\autoconfigure\JpaProperties.java
2
请完成以下Java代码
public void setQtyInternalUse(final BigDecimal QtyInternalUse) { super.setQtyInternalUse(adjustQtyToUOMPrecision(QtyInternalUse)); } // setQtyInternalUse /** * String Representation * * @return info */ @Override public String toString() { final StringBuilder sb = new StringBuilder("MInventoryLine[");...
if (getC_Charge_ID() <= 0) { inventoryBL.setDefaultInternalChargeId(this); } } else if (INVENTORYTYPE_ChargeAccount.equals(getInventoryType())) { if (getC_Charge_ID() <= 0) { throw new FillMandatoryException(COLUMNNAME_C_Charge_ID); } } else if (getC_Charge_ID() > 0) { setC_Charge_...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MInventoryLine.java
1
请完成以下Java代码
public Notification findNotificationById(TenantId tenantId, NotificationId notificationId) { return notificationDao.findById(tenantId, notificationId.getId()); } @Override public boolean markNotificationAsRead(TenantId tenantId, UserId recipientId, NotificationId notificationId) { return no...
@Override public int countUnreadNotificationsByRecipientId(TenantId tenantId, NotificationDeliveryMethod deliveryMethod, UserId recipientId) { return notificationDao.countUnreadByDeliveryMethodAndRecipientId(tenantId, deliveryMethod, recipientId); } @Override public boolean deleteNotification(T...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\notification\DefaultNotificationService.java
1
请完成以下Java代码
public void setInvoicableQtyBasedOn (final java.lang.String InvoicableQtyBasedOn) { set_Value (COLUMNNAME_InvoicableQtyBasedOn, InvoicableQtyBasedOn); } @Override public java.lang.String getInvoicableQtyBasedOn() { return get_ValueAsString(COLUMNNAME_InvoicableQtyBasedOn); } @Override public void setM_Pr...
} @Override public BigDecimal getPriceList() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PriceList); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setPriceStd (final BigDecimal PriceStd) { set_Value (COLUMNNAME_PriceStd, PriceStd); } @Override public BigDecimal getPr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Campaign_Price.java
1
请完成以下Java代码
public java.lang.String getI_ErrorMsg () { return (java.lang.String)get_Value(COLUMNNAME_I_ErrorMsg); } /** * I_IsImported AD_Reference_ID=540745 * Reference name: I_IsImported */ public static final int I_ISIMPORTED_AD_Reference_ID=540745; /** NotImported = N */ public static final String I_ISIMPORTED...
} /** Set Datensatz-ID. @param Record_ID Direct internal record ID */ @Override public void setRecord_ID (int Record_ID) { if (Record_ID < 0) set_ValueNoCheck (COLUMNNAME_Record_ID, null); else set_ValueNoCheck (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID)); } /** Get Datensatz-ID. @re...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_I_DataEntry_Record.java
1
请完成以下Java代码
public CommandExecutor getCommandExecutor() { return commandExecutor; } public CommandContext getCommandContext() { return commandContext; } public String getProcessInstanceId() { return processInstanceId; } public List<AbstractProcessInstanceModificationCommand> getModificationOperations() {...
} public String getModificationReason() { return modificationReason; } public void setModificationReason(String modificationReason) { this.modificationReason = modificationReason; } public String getAnnotation() { return annotation; } public void setAnnotationInternal(String annotation) { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessInstanceModificationBuilderImpl.java
1
请完成以下Java代码
public boolean hasInactiveValues() { return this.hasInactiveValues; } @Override public boolean isAllLoaded() { return allLoaded; } @Override public boolean isDirty() { return wasInterrupted; } private final String normalizeKey(final Object key) { return key == null ? null : key.toString(); } @...
{ final String keyStr = normalizeKey(key); return values.containsKey(keyStr); } @Override public NamePair getByKey(Object key) { final String keyStr = normalizeKey(key); return values.get(keyStr); } @Override public Collection<NamePair> getValues() { return values.values(); } @Override public in...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\MLookupLoader.java
1
请在Spring Boot框架中完成以下Java代码
public String getType() { return type; } /** * 操作员类型 * * @return */ public void setType(String type) { this.type = type; } /** * 盐 * * @return */ public String getsalt() { return salt; } /** * 盐 * * @param salt */ public void setsalt(String salt) { this.salt = salt;
} /** * 认证加密的盐 * * @return */ public String getCredentialsSalt() { return loginName + salt; } public PmsOperator() { } }
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\entity\PmsOperator.java
2
请在Spring Boot框架中完成以下Java代码
private OAuth2AuthorizedClientProvider getTokenExchangeAuthorizedClientProvider( Collection<OAuth2AuthorizedClientProvider> authorizedClientProviders) { TokenExchangeOAuth2AuthorizedClientProvider authorizedClientProvider = getAuthorizedClientProviderByType( authorizedClientProviders, TokenExchangeOAuth2Author...
authorizedClientProvider = providerClass.cast(current); } } return authorizedClientProvider; } private static void assertAuthorizedClientProviderIsNull(OAuth2AuthorizedClientProvider authorizedClientProvider) { if (authorizedClientProvider != null) { // @formatter:off throw new BeanInitializationExcep...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\http\OAuth2AuthorizedClientManagerRegistrar.java
2
请完成以下Java代码
public List<EncryptionPropertyType> getEncryptionProperty() { if (encryptionProperty == null) { encryptionProperty = new ArrayList<EncryptionPropertyType>(); } return this.encryptionProperty; } /** * Gets the value of the id property. * * @return * p...
return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } }
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\EncryptionPropertiesType.java
1
请完成以下Java代码
public double getColWidth () { return m_width; } // getColWidth /** * @param width The column width in pixels. */ public void setColWidth (double width) { m_width = width; } // getColWidth /** * @return Returns the height in pixels. */ public double getColHeight() { return m_height; } // getHe...
{ MGoal goal = getGoal(); query = MQuery.getEqualQuery("PA_Measure_ID", goal.getPA_Measure_ID()); } else if (getMeasureCalc() != null) // Document { MMeasureCalc mc = getMeasureCalc(); query = mc.getQuery(mGoal.getRestrictions(false), getMeasureDisplay(), getDate(), Env.getUserRolePermission...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\adempiere\apps\graph\GraphColumn.java
1
请完成以下Java代码
protected String resolveJobHandlerType(S context) { return jobHandlerType; } protected abstract JobHandlerConfiguration resolveJobHandlerConfiguration(S context); protected boolean resolveExclusive(S context) { return exclusive; } protected int resolveRetries(S context) { return Context.getProc...
public void setActivity(ActivityImpl activity) { this.activity = activity; } public ProcessDefinitionImpl getProcessDefinition() { if (activity != null) { return activity.getProcessDefinition(); } else { return null; } } public String getJobConfiguration() { return jobConfi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\JobDeclaration.java
1
请完成以下Java代码
public Flux<ServerSentEvent<Instance>> instanceStream(@PathVariable String id) { return Flux.from(eventStore) .filter((event) -> event.getInstance().equals(InstanceId.of(id))) .flatMap((event) -> registry.getInstance(event.getInstance())) .map((event) -> ServerSentEvent.builder(event).build()) .mergeWith(...
* <ul> * <li>Interval: 10 seconds</li> * <li>Format: SSE comment-only event</li> * <li>Applies to: All event stream endpoints (e.g., /instances/events, * /instances/{id} with Accept: text/event-stream)</li> * </ul> * </p> * @param <T> the type of event data (unused for ping) * @return flux of ServerSent...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\web\InstancesController.java
1
请完成以下Java代码
public boolean isEnum() { return getParent().isEnum(); } @Override public Object getField(String fieldName) { return getParent().getField(fieldName); } @Override public List<String> getFieldNames() { return getParent().getFieldNames(); } @Override public boolean isIdentityField...
public boolean hasField(String fieldName) { return getParent().hasField(fieldName); } }; } /** * Determines whether the given {@link String field name} is a {@link PropertyDescriptor property} * on the underlying, target {@link Object}. * * @param fieldName {@link String} containing the name of the ...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\pdx\ObjectPdxInstanceAdapter.java
1
请在Spring Boot框架中完成以下Java代码
protected void configureCaseDefinitionQuery(CaseDefinitionQueryImpl query) { getTenantManager().configureQuery(query); } protected ListQueryParameterObject configureParameterizedQuery(Object parameter) { return getTenantManager().configureQuery(parameter); } @Override public CaseDefinitionEntity fin...
@Override public CaseDefinitionEntity findDefinitionByKeyVersionTagAndTenantId(String definitionKey, String definitionVersionTag, String tenantId) { throw new UnsupportedOperationException("Currently finding case definition by version tag and tenant is not implemented."); } @Override public CaseDefinitionE...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\repository\CaseDefinitionManager.java
2
请在Spring Boot框架中完成以下Java代码
public ShiroFilterFactoryBean shiroFilterFactoryBean(@Qualifier("securityManager") DefaultWebSecurityManager defaultWebSecurityManager, @Qualifier("rcCaptchaValidateFilter") RcCaptchaValidateFilter rcCaptchaValidateFilter) { ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean(); s...
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(@Qualifier("securityManager") DefaultWebSecurityManager defaultWebSecurityManager){ AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor = new AuthorizationAttributeSourceAdvisor(); authorizationAttribut...
repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\config\ShiroConfig.java
2
请完成以下Java代码
public void processWithManualCommit() { Properties props = new Properties(); props.put("bootstrap.servers", bootstrapServers); props.put("group.id", "manual-commit-group"); props.put("enable.auto.commit", "false"); props.put("max.poll.records", "10"); props.put("key.deser...
if (!records.isEmpty()) { consumer.commitSync(); logger.info("Committed {} records", records.count()); } } consumer.close(); } private void processOrder(ConsumerRecord<String, String> record) { // simulate order processing logger.info...
repos\tutorials-master\apache-kafka-3\src\main\java\com\baeldung\kafka\partitions\KafkaMultiplePartitionsDemo.java
1
请完成以下Java代码
public void setResult(String result) { this.result = result; } public String getProcessInstanceId() { return processInstanceId; } public void setProcessInstanceId(String processInstanceId) { this.processInstanceId = processInstanceId; } public String getSourceProcessDe...
} public String getMigrationMessage() { return migrationMessage; } public void setMigrationMessage(String migrationMessage) { this.migrationMessage = migrationMessage; } public String getMigrationStacktrace() { return migrationStacktrace; } public void setMigratio...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\migration\ProcessInstanceBatchMigrationPartResult.java
1
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public int getAge() {
return age; } public void setAge(int age) { this.age = age; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } }
repos\tutorials-master\spring-boot-modules\spring-boot-mvc\src\main\java\com\baeldung\springvalidation\domain\UserAccount.java
1