instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class LiquibaseConfiguration { private final Logger log = LoggerFactory.getLogger(LiquibaseConfiguration.class); private final Environment env; public LiquibaseConfiguration(Environment env) { this.env = env; } @Bean public SpringLiquibase liquibase(@Qualifier("taskExecutor")...
SpringLiquibase liquibase = new AsyncSpringLiquibase(taskExecutor, env); liquibase.setDataSource(dataSource); liquibase.setChangeLog("classpath:config/liquibase/master.xml"); liquibase.setContexts(liquibaseProperties.getContexts()); liquibase.setDefaultSchema(liquibaseProperties.getDefau...
repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\config\LiquibaseConfiguration.java
2
请完成以下Java代码
public class ChannelEventKeyDetection { protected String fixedValue; protected String jsonField; protected String jsonPointerExpression; protected String xmlXPathExpression; protected String delegateExpression; public String getFixedValue() { return fixedValue; } publi...
return jsonPointerExpression; } public void setJsonPointerExpression(String jsonPointerExpression) { this.jsonPointerExpression = jsonPointerExpression; } public String getXmlXPathExpression() { return xmlXPathExpression; } public void setXmlXPathExpression(String xmlXPath...
repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\ChannelEventKeyDetection.java
1
请完成以下Java代码
private final MutableComboBoxModel getDelegateToUse() { if (delegate == null) { return COMBOBOXMODEL_NULL; } return delegate; } public void setDelegate(final MutableComboBoxModel delegateNew) { if (this.delegate == delegateNew) { // nothing changed return; } // Unregister listeners on old...
public void setSelectedItem(Object anItem) { getDelegateToUse().setSelectedItem(anItem); } @Override public Object getSelectedItem() { return getDelegateToUse().getSelectedItem(); } @Override public void addElement(Object obj) { getDelegateToUse().addElement(obj); } @Override public void removeElem...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\MutableComboBoxModelProxy.java
1
请完成以下Java代码
public boolean getShouldPerformAuthorizatioCheck() { return isAuthorizationCheckEnabled && !isPermissionChecksEmpty(); } public void setShouldPerformAuthorizatioCheck(boolean shouldPerformAuthorizatioCheck) { this.shouldPerformAuthorizatioCheck = shouldPerformAuthorizatioCheck; } protected boolean isP...
public void addAtomicPermissionCheck(PermissionCheck permissionCheck) { permissionChecks.addAtomicCheck(permissionCheck); } public void setPermissionChecks(CompositePermissionCheck permissionChecks) { this.permissionChecks = permissionChecks; } public boolean isRevokeAuthorizationCheckEnabled() { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\AuthorizationCheck.java
1
请完成以下Java代码
public class GenerateDeliveryDays extends JavaProcess implements IProcessPrecondition { // // Services private final ITourBL tourBL = Services.get(ITourBL.class); @Param(parameterName = "DateFrom") private Timestamp p_DateFrom; @Param(parameterName = "DateTo") private Timestamp p_DateTo; private I_M_Tour p_to...
// // Create generator instance and configure it final IDeliveryDayGenerator generator = tourBL.createDeliveryDayGenerator(this); generator.setDateFrom(TimeUtil.asLocalDate(p_DateFrom)); generator.setDateTo(TimeUtil.asLocalDate(p_DateTo)); generator.setM_Tour(p_tour); // // Generate delivery days if (p...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\tourplanning\process\GenerateDeliveryDays.java
1
请完成以下Java代码
private ILockCommand toWorkPackageElementsLocker(final @NonNull DDOrderCandidateEnqueueRequest request) { final PInstanceId selectionId = request.getSelectionId(); final LockOwner lockOwner = LockOwner.newOwner(LOCK_OWNER_PREFIX, selectionId.getRepoId()); return lockManager .lock() .setOwner(lockOwner) ...
} } public static DDOrderCandidateEnqueueRequest extractRequest(@NonNull final IParams params) { final String jsonString = params.getParameterAsString(WP_PARAM_request); try { return JsonObjectMapperHolder.sharedJsonObjectMapper().readValue(jsonString, DDOrderCandidateEnqueueRequest.class); } catch (fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddordercandidate\async\DDOrderCandidateEnqueueService.java
1
请完成以下Java代码
public final class VATCodeMatchingRequest { public static final Builder builder() { return new Builder(); } private final int C_AcctSchema_ID; private final int C_Tax_ID; private final boolean isSOTrx; private final Date date; private VATCodeMatchingRequest(final Builder builder) { super(); C_AcctSche...
private Builder() { super(); } public VATCodeMatchingRequest build() { return new VATCodeMatchingRequest(this); } public Builder setC_AcctSchema_ID(final int C_AcctSchema_ID) { this.C_AcctSchema_ID = C_AcctSchema_ID; return this; } public Builder setC_Tax_ID(final int C_Tax_ID) { t...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\vatcode\VATCodeMatchingRequest.java
1
请完成以下Java代码
public String getFormKey() { return formKey; } public void setFormKey(String formKey) { this.formKey = formKey; } public boolean isSameDeployment() { return sameDeployment; } public void setSameDeployment(boolean sameDeployment) { this.sameDeployment = sameDepl...
public String getIncludeInStageOverview() { return includeInStageOverview; } public void setIncludeInStageOverview(String includeInStageOverview) { this.includeInStageOverview = includeInStageOverview; } @Override public List<Criterion> getExitCriteria() { return exitCriter...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\Stage.java
1
请完成以下Java代码
public String toString() { return "Product [name=" + name + ", price=" + price + ", sales=" + sales + "]"; } // getters and setters public String getName() { return name; } public void setName(String name) { this.name = name; } public double getPrice() { re...
} public void setPrice(double price) { this.price = price; } public int getSales() { return sales; } public void setSales(int sales) { this.sales = sales; } }
repos\tutorials-master\core-java-modules\core-java-lang-oop-generics-2\src\main\java\com\baeldung\generics\Product.java
1
请在Spring Boot框架中完成以下Java代码
protected GrantedAuthoritiesMapper grantedAuthoritiesMapper() { logger.debug("Registering OAuth2GrantedAuthoritiesMapper"); return new OAuth2GrantedAuthoritiesMapper(oAuth2Properties); } @Bean @ConditionalOnProperty(name = "sso-logout.enabled", havingValue = "true", prefix = OAuth2Properties.PREFIX) pr...
.requestMatchers(webappPath + "/api/**").authenticated() .anyRequest().permitAll() ) .addFilterAfter(authorizeTokenFilter, OAuth2AuthorizationRequestRedirectFilter.class) .anonymous(AbstractHttpConfigurer::disable) .oidcLogout(c -> c.backChannel(Customizer.withDefaults())) ...
repos\camunda-bpm-platform-master\spring-boot-starter\starter-security\src\main\java\org\camunda\bpm\spring\boot\starter\security\oauth2\CamundaSpringSecurityOAuth2AutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public class WebSessionServerCsrfTokenRepository implements ServerCsrfTokenRepository { private static final String DEFAULT_CSRF_PARAMETER_NAME = "_csrf"; private static final String DEFAULT_CSRF_HEADER_NAME = "X-CSRF-TOKEN"; private static final String DEFAULT_CSRF_TOKEN_ATTR_NAME = WebSessionServerCsrfTokenRepo...
/** * Sets the header name that the {@link CsrfToken} is expected to appear on and the * header that the response will contain the {@link CsrfToken}. * @param headerName the new header name to use */ public void setHeaderName(String headerName) { Assert.hasLength(headerName, "headerName cannot be null or emp...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\csrf\WebSessionServerCsrfTokenRepository.java
2
请完成以下Java代码
public void recycle() { entity = null; super.recycle(); } public DbEntity getEntity() { return entity; } public void setEntity(DbEntity dbEntity) { this.entityType = dbEntity.getClass(); this.entity = dbEntity; } public void setFlushRelevantEntityReferences(Set<String> flushRelevantEn...
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((entity == null) ? 0 : entity.hashCode()); result = prime * result + ((operationType == null) ? 0 : operationType.hashCode()); return result; } @Override public boolean equals(Object obj) { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\entitymanager\operation\DbEntityOperation.java
1
请完成以下Java代码
public static DebugProperties ofNullableMap(final Map<String, ?> map) { if (map == null || map.isEmpty()) { return EMPTY; } return new DebugProperties(ImmutableMap.copyOf(map)); } public boolean isEmpty() { return map.isEmpty(); } public Map<String, Object> toMap() { return map; } public Deb...
{ return this; } final LinkedHashMap<String, Object> newMap = new LinkedHashMap<>(map); if (propertyValue == null) { newMap.remove(propertyName); } else { newMap.put(propertyName, propertyValue); } return ofNullableMap(newMap); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\DebugProperties.java
1
请完成以下Java代码
private LeichMehlPluFileConfigGroup toLeichMehlPluFileConfigGroup(@NonNull final I_LeichMehl_PluFile_ConfigGroup configGroupRecord) { final LeichMehlPluFileConfigGroupId leichMehlPluFileConfigGroupId = LeichMehlPluFileConfigGroupId.ofRepoId(configGroupRecord.getLeichMehl_PluFile_ConfigGroup_ID()); final LeichMehlP...
} @NonNull private static ExternalSystemLeichMehlPluFileConfig toExternalSystemLeichMehlPluFileConfig(@NonNull final I_LeichMehl_PluFile_Config record) { return ExternalSystemLeichMehlPluFileConfig.builder() .id(ExternalSystemLeichMehlPluFileConfigId.ofRepoId(record.getLeichMehl_PluFile_Config_ID())) .lei...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\ExternalSystemLeichMehlConfigProductMappingRepository.java
1
请完成以下Java代码
public class OptimizedApproach { public static boolean areArraysEqual(int[][] arr1, int[][] arr2, double similarityThreshold, double samplingWeight) { if (arr1 == null || arr2 == null || arr1.length != arr2.length || arr1[0].length != arr2[0].length || samplingWeight <= 0 || samplingWeight > 1...
// Iterate through the arrays using the calculated step for (int i = 0; i < arr1.length; i += step) { for (int j = 0; j < arr1[0].length; j += step) { if (Math.abs(arr1[i][j] - arr2[i][j]) <= 1) { similarElements++; } checkedElement...
repos\tutorials-master\core-java-modules\core-java-arrays-operations-basic-2\src\main\java\com\baeldung\array\comparing2Darrays\OptimizedApproach.java
1
请完成以下Java代码
public void addRule(DecisionRule rule) { this.rules.add(rule); } public HitPolicy getHitPolicy() { return hitPolicy; } public void setHitPolicy(HitPolicy hitPolicy) { this.hitPolicy = hitPolicy; } public BuiltinAggregator getAggregation() { return aggregation; ...
} public DecisionTableOrientation getPreferredOrientation() { return preferredOrientation; } public void setPreferredOrientation(DecisionTableOrientation preferredOrientation) { this.preferredOrientation = preferredOrientation; } public String getOutputLabel() { return out...
repos\flowable-engine-main\modules\flowable-dmn-model\src\main\java\org\flowable\dmn\model\DecisionTable.java
1
请完成以下Java代码
public void setC_Job_ID (int C_Job_ID) { if (C_Job_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Job_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Job_ID, Integer.valueOf(C_Job_ID)); } /** Get Position. @return Job Position */ public int getC_Job_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_...
set_Value (COLUMNNAME_ValidFrom, ValidFrom); } /** Get Valid from. @return Valid from including this date (first day) */ public Timestamp getValidFrom () { return (Timestamp)get_Value(COLUMNNAME_ValidFrom); } /** Set Valid to. @param ValidTo Valid to including this date (last day) */ public voi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_JobAssignment.java
1
请在Spring Boot框架中完成以下Java代码
public class QtyDemandSupplyRepository { private final IQueryBL queryBL = Services.get(IQueryBL.class); @NonNull public ProductWithDemandSupplyCollection getByProductIds(@NonNull final Collection<ProductId> productIds) { if (productIds.isEmpty()) { return ProductWithDemandSupplyCollection.of(ImmutableMap.of...
} public QtyDemandQtySupply getById(@NonNull final QtyDemandQtySupplyId id) { final I_QtyDemand_QtySupply_V po = queryBL.createQueryBuilder(I_QtyDemand_QtySupply_V.class) .addEqualsFilter(I_QtyDemand_QtySupply_V.COLUMNNAME_QtyDemand_QtySupply_V_ID, id) .create() .firstOnly(I_QtyDemand_QtySupply_V.class...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\QtyDemandSupplyRepository.java
2
请完成以下Java代码
public int getM_AttributeValue_ID() { return get_ValueAsInt(COLUMNNAME_M_AttributeValue_ID); } @Override public void setRecord_Attribute_ID (final int Record_Attribute_ID) { if (Record_Attribute_ID < 1) set_ValueNoCheck (COLUMNNAME_Record_Attribute_ID, null); else set_ValueNoCheck (COLUMNNAME_Recor...
{ return get_ValueAsTimestamp(COLUMNNAME_ValueDate); } @Override public void setValueNumber (final @Nullable BigDecimal ValueNumber) { set_Value (COLUMNNAME_ValueNumber, ValueNumber); } @Override public BigDecimal getValueNumber() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_ValueNumber); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Record_Attribute.java
1
请完成以下Java代码
public void setAD_Printer_Tray_ID (int AD_Printer_Tray_ID) { if (AD_Printer_Tray_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_Printer_Tray_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_Printer_Tray_ID, Integer.valueOf(AD_Printer_Tray_ID)); } @Override public int getAD_Printer_Tray_ID() { return get_Va...
return (java.lang.String)get_Value(COLUMNNAME_Description); } @Override public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return (java.lang.String)get_Value(COLUMNNAME_Name); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_AD_Printer_Tray.java
1
请在Spring Boot框架中完成以下Java代码
public class DefaultProcessEngineConfiguration extends AbstractCamundaConfiguration implements CamundaProcessEngineConfiguration { @Autowired private Optional<IdGenerator> idGenerator; @Override public void preInit(SpringProcessEngineConfiguration configuration) { setProcessEngineName(configuration); ...
+ "if a custom processEngineName is already set: %s", processEngineName)); } processEngineName = CamundaBpmProperties.getUniqueName(camundaBpmProperties.UNIQUE_ENGINE_NAME_PREFIX); } configuration.setProcessEngineName(processEngineName); } else { logger.warn("Ignoring invalid proc...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\configuration\impl\DefaultProcessEngineConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
protected ServiceController<ProcessEngine> getProcessEngineServiceController(ServiceName processEngineServiceName) { ServiceController<ProcessEngine> serviceController = (ServiceController<ProcessEngine>) serviceContainer.getRequiredService(processEngineServiceName); return serviceController; } protected v...
*/ public void processEngineStopped(ProcessEngine processEngine) { processEngines.remove(processEngine); } @SuppressWarnings("unchecked") protected MscManagedProcessApplication getManagedProcessApplication(String name) { ServiceController<MscManagedProcessApplication> serviceController = (ServiceContro...
repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\MscRuntimeContainerDelegate.java
2
请完成以下Java代码
public String filterType() { return "pre"; } @Override public int filterOrder() { return 10; } @Override public boolean shouldFilter() { // specific APIs can be filtered out using // if (RequestContext.getCurrentContext().getRequest().getRequestURI().startsWith(...
return Bucket4j.configurationBuilder() .addLimit(Bandwidth.simple(rateLimitingProperties.getLimit(), Duration.ofSeconds(rateLimitingProperties.getDurationInSeconds()))) .build(); }; } /** * Create a Zuul response error when the API limit is excee...
repos\tutorials-master\jhipster-modules\jhipster-uaa\gateway\src\main\java\com\baeldung\jhipster\gateway\gateway\ratelimiting\RateLimitingFilter.java
1
请在Spring Boot框架中完成以下Java代码
public class SecurityConfig { @Autowired private OAuth2RestTemplate restTemplate; @Bean public WebSecurityCustomizer webSecurityCustomizer() { return (web) -> web.ignoring() .antMatchers("/resources/**"); } @Bean public OpenIdConnectFilter myFilter() { final Ope...
@Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.addFilterAfter(new OAuth2ClientContextFilter(), AbstractPreAuthenticatedProcessingFilter.class) .addFilterAfter(myFilter(), OAuth2ClientContextFilter.class) .httpBasic() .authenticatio...
repos\tutorials-master\spring-security-modules\spring-security-legacy-oidc\src\main\java\com\baeldung\openid\oidc\SecurityConfig.java
2
请完成以下Java代码
public Long wrongCountRecordsByTableName(String tableName) { try (Connection c = dataSource.getConnection(); PreparedStatement p = c.prepareStatement("select count(*) from ?")) { p.setString(1, tableName); ResultSet rs = p.executeQuery(); rs.next(); return rs.ge...
* Invalid placeholder usage example - JPA * * @param tableName * @return */ public Long wrongJpaCountRecordsByTableName(String tableName) { String jql = "select count(*) from :tableName"; TypedQuery<Long> q = em.createQuery(jql, Long.class) .setParameter("tableName...
repos\tutorials-master\security-modules\sql-injection-samples\src\main\java\com\baeldung\examples\security\sql\AccountDAO.java
1
请完成以下Java代码
public void copyPreliminaryValues (final org.compiere.model.I_C_Invoice from, final org.compiere.model.I_C_Invoice to) { // nothing to do } @Override public void copyValues(@NonNull final org.compiere.model.I_C_Invoice from, @NonNull final org.compiere.model.I_C_Invoice to) { final I_C_Invoice fromToUse = ...
} @Override public Class<org.compiere.model.I_C_Invoice> getSupportedItemsClass() { return org.compiere.model.I_C_Invoice.class; } @Override public IDocLineCopyHandler<org.compiere.model.I_C_InvoiceLine> getDocLineCopyHandler() { return Services.get(ICopyHandlerBL.class).getNullDocLineCopyHandler(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\spi\impl\EdiInvoiceCopyHandler.java
1
请完成以下Java代码
public static PPOrderQuantities ofQtyRequiredToProduce(@NonNull final Quantity qtyRequiredToProduce) { return builder().qtyRequiredToProduce(qtyRequiredToProduce).build(); } public Quantity getQtyRemainingToProduce() { return getQtyRequiredToProduce() .subtract(getQtyReceived()) .subtract(getQtyScrappe...
return toBuilder() .qtyRequiredToProduce(getQtyRequiredToProduce().toZero()) .build(); } public PPOrderQuantities convertQuantities(@NonNull final UnaryOperator<Quantity> converter) { return toBuilder() .qtyRequiredToProduce(converter.apply(getQtyRequiredToProduce())) .qtyRequiredToProduceBeforeCl...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\pporder\PPOrderQuantities.java
1
请完成以下Java代码
void addWriteMethod(Method writeMethod) { this.writeMethods.add(writeMethod); } } static final class BeanPropertiesStandalone extends BeanELResolver.BeanProperties { BeanPropertiesStandalone(Class<?> type) throws ELException { super(type); PropertyDescriptor...
name = pd.getName(); readMethod = pd.getReadMethod(); writeMethod = pd.getWriteMethod(); } @Override String getName() { return name; } @Override Method getReadMethod() { return readMethod; } @Override ...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\javax\el\BeanSupportStandalone.java
1
请完成以下Java代码
public void setDeliveryDate (final @Nullable java.sql.Timestamp DeliveryDate) { set_Value (COLUMNNAME_DeliveryDate, DeliveryDate); } @Override public java.sql.Timestamp getDeliveryDate() { return get_ValueAsTimestamp(COLUMNNAME_DeliveryDate); } @Override public void setIsDifferentInvoicingPartner (final b...
/** Brief = Brief */ public static final String ITEMNAME_Brief = "Brief"; /** Sofort-Druck PDF = Sofort-Druck PDF */ public static final String ITEMNAME_Sofort_DruckPDF = "Sofort-Druck PDF"; /** PDF = PDF */ public static final String ITEMNAME_PDF = "PDF"; /** Versand/Wareneingang = Versand/Wareneingang */ publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_C_Printing_Queue.java
1
请完成以下Java代码
public void setAD_Language (final java.lang.String AD_Language) { set_ValueNoCheck (COLUMNNAME_AD_Language, AD_Language); } @Override public java.lang.String getAD_Language() { return get_ValueAsString(COLUMNNAME_AD_Language); } @Override public void setDescription (final @Nullable java.lang.String Descr...
set_ValueNoCheck (COLUMNNAME_Mobile_Application_ID, null); else set_ValueNoCheck (COLUMNNAME_Mobile_Application_ID, Mobile_Application_ID); } @Override public int getMobile_Application_ID() { return get_ValueAsInt(COLUMNNAME_Mobile_Application_ID); } @Override public void setName (final java.lang.Stri...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Mobile_Application_Trl.java
1
请完成以下Java代码
private KeyNamePair retrieveBPartnerKNPById(@NonNull final BPartnerId bpartnerId) { final I_C_BPartner bpartner = bpartnerDAO.getByIdOutOfTrx(bpartnerId); return bpartner != null ? toKeyNamePair(bpartner) : null; } @Nullable @Override public AttributeValueId getAttributeValueIdOrNull(final Object valueKey) {...
private ImmutableList<KeyNamePair> retrieveVendorKeyNamePairs() { return bpartnerDAO.retrieveVendors(getMaxVendors()) .stream() .map(HUVendorBPartnerAttributeValuesProvider::toKeyNamePair) .sorted(Comparator.comparing(KeyNamePair::getName)) .collect(ImmutableList.toImmutableList()); } private stat...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\org\adempiere\mm\attributes\spi\impl\HUVendorBPartnerAttributeValuesProvider.java
1
请在Spring Boot框架中完成以下Java代码
boolean isMapKeyHints() { return (this.id != null && this.id.endsWith(KEY_SUFFIX)); } boolean isMapValueHints() { return (this.id != null && this.id.endsWith(VALUE_SUFFIX)); } String resolveId() { if (isMapKeyHints()) { return this.id.substring(0, this.id.length() - KEY_SUFFIX.length()); } if (isMapV...
String getId() { return this.id; } void setId(String id) { this.id = id; } List<ValueHint> getValueHints() { return this.valueHints; } List<ValueProvider> getValueProviders() { return this.valueProviders; } }
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-metadata\src\main\java\org\springframework\boot\configurationmetadata\ConfigurationMetadataHint.java
2
请完成以下Java代码
public static PPOrderRef ofPPOrderBOMLineId(@NonNull final RepoIdAware ppOrderId, final int ppOrderBOMLineId) { return ofPPOrderBOMLineId(ppOrderId.getRepoId(), ppOrderBOMLineId); } public static PPOrderRef ofPPOrderBOMLineId(final int ppOrderId, final int ppOrderBOMLineId) { return ofPPOrderBOMLineId(PPOrderI...
if (ppOrderRef != null) { return ppOrderRef.withPPOrderId(newPPOrderId); } else if (newPPOrderId != null) { return ofPPOrderId(newPPOrderId); } else { return null; } } @Nullable public static PPOrderRef withPPOrderAndBOMLineId(@Nullable final PPOrderRef ppOrderRef, @Nullable final PPOrderAn...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\pporder\PPOrderRef.java
1
请完成以下Java代码
protected void executeJob(String nextJobId, CommandExecutor commandExecutor, JobFailureCollector jobFailureCollector) { JobExecutionHandlerActivation jobHandlerActivation = ra.getJobHandlerActivation(); if(jobHandlerActivation == null) { // TODO: stop acquisition / only activate acquisition if MDB active?...
} } } protected void loadMethod() { try { method = JobExecutionHandler.class.getMethod("executeJob", new Class[] {String.class, CommandExecutor.class}); } catch (SecurityException e) { throw new RuntimeException("SecurityException while invoking getMethod() on class "+JobExecutionHandler.cl...
repos\camunda-bpm-platform-master\javaee\jobexecutor-ra\src\main\java\org\camunda\bpm\container\impl\threading\ra\inflow\JcaInflowExecuteJobsRunnable.java
1
请完成以下Java代码
public void loseWeight() { if (size == data.length) { return; } int[] newData = new int[size]; System.arraycopy(this.data, 0, newData, 0, size); this.data = newData; } public int size() { return this.size; } public int getLine...
size = byteArray.nextInt(); data = new int[size]; for (int i = 0; i < size; i++) { data[i] = byteArray.nextInt(); } linearExpandFactor = byteArray.nextInt(); exponentialExpanding = byteArray.nextBoolean(); exponentialExpandFactor = byteArray.nextDouble...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\trie\datrie\IntArrayList.java
1
请在Spring Boot框架中完成以下Java代码
public DeviceConfig.Builder setAssignedAttributeCodes(final Collection<AttributeCode> assignedAttributeCodes) { this.assignedAttributeCodes = assignedAttributeCodes; return this; } private ImmutableSet<AttributeCode> getAssignedAttributeCodes() { Check.assumeNotEmpty(assignedAttributeCodes, "assignedA...
return this; } @NonNull public DeviceConfig.Builder setBeforeHooksClassname(@NonNull final ImmutableList<String> beforeHooksClassname) { this.beforeHooksClassname = beforeHooksClassname; return this; } @NonNull private ImmutableList<String> getBeforeHooksClassname() { return Optional.ofNu...
repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\config\DeviceConfig.java
2
请完成以下Java代码
public void setPostingType (java.lang.String PostingType) { set_Value (COLUMNNAME_PostingType, PostingType); } /** Get Buchungsart. @return Die Art des gebuchten Betrages dieser Transaktion */ @Override public java.lang.String getPostingType () { return (java.lang.String)get_Value(COLUMNNAME_PostingTy...
/** Set Menge. @param Qty Menge */ @Override public void setQty (java.math.BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } /** Get Menge. @return Menge */ @Override public java.math.BigDecimal getQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty); if (bd == null) return...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Fact_Acct_Log.java
1
请在Spring Boot框架中完成以下Java代码
public CommonErrorHandler errorHandler(KafkaOperations<Object, Object> template) { return new DefaultErrorHandler( new DeadLetterPublishingRecoverer(template), new FixedBackOff(1000L, 2)); } @Bean public RecordMessageConverter converter() { JsonMessageConverter converter = new JsonMessageConverter(); Defa...
return new NewTopic("foos", 1, (short) 1); } @Bean public NewTopic bars() { return new NewTopic("bars", 1, (short) 1); } @Bean @Profile("default") // Don't run from test(s) public ApplicationRunner runner() { return args -> { System.out.println("Hit Enter to terminate..."); System.in.read(); }; } ...
repos\spring-kafka-main\samples\sample-02\src\main\java\com\example\Application.java
2
请完成以下Java代码
protected List<ConditionHandlerResult> evaluateConditionStartByProcessDefinitionId(CommandContext commandContext, ConditionSet conditionSet, String processDefinitionId) { DeploymentCache deploymentCache = commandContext.getProcessEngineConfiguration().getDeploymentCache(); ProcessDefinitionEntity processD...
return activities; } protected boolean isConditionStartEvent(EventSubscriptionDeclaration declaration) { return EventType.CONDITONAL.name().equals(declaration.getEventType()) && declaration.isStartEvent(); } protected boolean evaluateCondition(ConditionSet conditionSet, ActivityImpl activity) { Execut...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\runtime\DefaultConditionHandler.java
1
请在Spring Boot框架中完成以下Java代码
public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getType() {
return type; } public void setType(String type) { this.type = type; } public boolean isSaveProcessInstanceId() { return saveProcessInstanceId; } public void setSaveProcessInstanceId(boolean saveProcessInstanceId) { this.saveProcessInstanceId = saveProcessInstanceId; ...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\engine\CommentRequest.java
2
请在Spring Boot框架中完成以下Java代码
public class DataSourceConfig { /** * 创建 orders 数据源的配置对象 */ @Primary @Bean(name = "ordersDataSourceProperties") @ConfigurationProperties(prefix = "spring.datasource.orders") // 读取 spring.datasource.orders 配置到 DataSourceProperties 对象 public DataSourceProperties ordersDataSourceProperties()...
DataSourceProperties properties = this.usersDataSourceProperties(); // 创建 HikariDataSource 对象 return createHikariDataSource(properties); } private static HikariDataSource createHikariDataSource(DataSourceProperties properties) { // 创建 HikariDataSource 对象 HikariDataSource dataSo...
repos\SpringBoot-Labs-master\lab-19\lab-19-datasource-pool-hikaricp-multiple\src\main\java\cn\iocoder\springboot\lab19\datasourcepool\config\DataSourceConfig.java
2
请在Spring Boot框架中完成以下Java代码
public class MessageController { @Autowired private MessageRepository messageRepository; @GetMapping(value = "messages") public List<Message> list() { List<Message> messages = this.messageRepository.findAll(); return messages; } @PostMapping(value = "message") public Message create(Message message) { m...
@PatchMapping(value="/message/text") public Message patch(Message message) { Message messageResult=this.messageRepository.updateText(message); return messageResult; } @GetMapping(value = "message/{id}") public Message get(@PathVariable Long id) { Message message = this.messageRepository.findMessage(id); re...
repos\spring-boot-leaning-master\2.x_42_courses\第 2-8 课: Spring Boot 构建一个 RESTful Web 服务\spring-boot-web-restful\src\main\java\com\neo\controller\MessageController.java
2
请完成以下Java代码
protected ExecutionEntity resolveExecution(EventSubscriptionEntity context) { return context.getExecution(); } protected JobHandlerConfiguration resolveJobHandlerConfiguration(EventSubscriptionEntity context) { return new EventSubscriptionJobConfiguration(context.getId()); } @SuppressWarnings("uncheck...
/** * Assumes that an activity has at most one declaration of a certain eventType. */ public static EventSubscriptionJobDeclaration findDeclarationForSubscription(EventSubscriptionEntity eventSubscription) { List<EventSubscriptionJobDeclaration> declarations = getDeclarationsForActivity(eventSubscription.ge...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\EventSubscriptionJobDeclaration.java
1
请完成以下Java代码
public class HUJoinBL implements IHUJoinBL { @Override public void assignTradingUnitToLoadingUnit(final IHUContext huContext, final I_M_HU loadingUnit, final I_M_HU tradingUnit) throws NoCompatibleHUItemParentFoundException { // // Services final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlin...
continue; // Item not supported by this handling unit } // Assign HU to the luItem which we just found huTrxBL.setParentHU(huContext, luItem, tradingUnit); return; // we are done } // we did not find a compatible item for 'tradingUnit' to attach. // try if we can create one on the fly final I_M_HU...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\impl\HUJoinBL.java
1
请在Spring Boot框架中完成以下Java代码
public boolean exists(ResourcePatternResolver resolver) { Assert.notNull(resolver, "'resolver' must not be null"); if (resolver.getResource(this.path).exists()) { return true; } try { return anyExists(resolver); } catch (IOException ex) { return false; } } private boolean anyExists(ResourcePat...
Resource[] resources = resolver.getResources(searchPath); for (Resource resource : resources) { if (resource.exists()) { return true; } } } return false; } @Override public String toString() { return this.path; } }
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\template\TemplateLocation.java
2
请完成以下Java代码
static JavaType constructType(Object value) { TypeFactory typeFactory = TypeFactory.defaultInstance(); if (value instanceof Collection<?>) { Collection<?> collection = (Collection<?>) value; int size = collection.size(); if (size > 0) { Iterator<?> iterator = collection.iterator(); ...
return typeFactory.constructType(value.getClass()); } else { return TypeFactory.unknownType(); } } /** * Guess collection class. * * @param value collection. * @return class of th collection implementation. */ @SuppressWarnings({ "rawtypes", "unchecked" }) static Class<? extends ...
repos\camunda-bpm-platform-master\spin\dataformat-json-jackson\src\main\java\org\camunda\spin\impl\json\jackson\format\TypeHelper.java
1
请在Spring Boot框架中完成以下Java代码
public boolean put(TenantId tenantId, TenantProfileId profileId) { log.trace("[{}] put: {}", tenantId, profileId); TenantProfileId oldProfileId = tenantIds.get(tenantId); if (oldProfileId != null && !oldProfileId.equals(profileId)) { tenantProfileIds.computeIfAbsent(oldProfileId, id ...
TransportProtos.GetEntityProfileResponseMsg entityProfileMsg = transportService.getEntityProfile(msg); profile = ProtoUtils.fromProto(entityProfileMsg.getTenantProfile()); TenantProfile existingProfile = profiles.get(profile.getId()); if (existingProfile != nu...
repos\thingsboard-master\common\transport\transport-api\src\main\java\org\thingsboard\server\common\transport\service\DefaultTransportTenantProfileCache.java
2
请完成以下Java代码
public static <T> ValueRestriction<T> equalsToOrNull(@Nullable final T onlyValue) { return onlyValue != null ? new ValueRestriction<>(Type.EQUALS_TO_OR_NULL, onlyValue) : isNull(); } private enum Type { ANY, IS_NULL, NOT_NULL, EQUALS_TO, EQUALS_TO_OR_NULL } private static final ValueRestriction<Obje...
{ // do nothing return null; } @Override public Void valueIsNull() { queryBuilder.addEqualsFilter(columnName, null); return null; } @Override public Void valueIsNotNull() { queryBuilder.addNotNull(columnName); return null; } @Override public Void valueEqualsTo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dao\ValueRestriction.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 ...
* {@link Boolean } * */ public boolean isIfStornoFollowupInvoiceProbable() { if (ifStornoFollowupInvoiceProbable == null) { return true; } else { return ifStornoFollowupInvoiceProbable; } } /** * Sets the value of the ifStornoFollowupI...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\request\PayloadType.java
1
请在Spring Boot框架中完成以下Java代码
public class EsController { public static final String INDEX_JAVASTACK = "javastack"; private final ElasticsearchTemplate elasticsearchTemplate; private final UserRepository userRepository; @RequestMapping("/es/insert") public User insert(@RequestParam("name") String name, @RequestParam("sex") in...
Query query = new CriteriaQuery(Criteria.where("name").is(name)); return elasticsearchTemplate.searchOne(query, User.class, indexCoordinates).getContent(); } @RequestMapping("/es/repo/insert") public User repoInsert(@RequestParam("name") String name, @RequestParam("sex") int sex) { // 新增 ...
repos\spring-boot-best-practice-master\spring-boot-elasticsearch\src\main\java\cn\javastack\springboot\es\EsController.java
2
请完成以下Java代码
public final class CacheConstants { private CacheConstants() {} public static final String DEVICE_CREDENTIALS_CACHE = "deviceCredentials"; public static final String RELATIONS_CACHE = "relations"; public static final String DEVICE_CACHE = "devices"; public static final String SESSIONS_CACHE = "ses...
public static final String OTA_PACKAGE_CACHE = "otaPackages"; public static final String OTA_PACKAGE_DATA_CACHE = "otaPackagesData"; public static final String REPOSITORY_SETTINGS_CACHE = "repositorySettings"; public static final String AUTO_COMMIT_SETTINGS_CACHE = "autoCommitSettings"; public static fi...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\CacheConstants.java
1
请在Spring Boot框架中完成以下Java代码
protected void setOwner(TenantId tenantId, WidgetsBundle widgetsBundle, IdProvider idProvider) { widgetsBundle.setTenantId(tenantId); } @Override protected WidgetsBundle prepare(EntitiesImportCtx ctx, WidgetsBundle widgetsBundle, WidgetsBundle old, WidgetsBundleExportData exportData, IdProvider idP...
} WidgetsBundle savedWidgetsBundle = widgetsBundleService.saveWidgetsBundle(widgetsBundle); widgetTypeService.updateWidgetsBundleWidgetFqns(ctx.getTenantId(), savedWidgetsBundle.getId(), exportData.getFqns()); return savedWidgetsBundle; } @Override protected CompareResult compare(En...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\ie\importing\impl\WidgetsBundleImportService.java
2
请在Spring Boot框架中完成以下Java代码
public String attributes(ModelMap map) { // 更改 h1 内容 map.put("title", "Thymeleaf 标签演示"); // 更改 id、name、value map.put("th_id", "thymeleaf-input"); map.put("th_name", "thymeleaf-input"); map.put("th_value", "13"); // 更改 class、href map.put("th_class", "thymel...
@GetMapping("/test") public String test(ModelMap map) { map.put("title", "Thymeleaf 语法测试"); map.put("testString", "玩转 Spring Boot"); map.put("bool", true); map.put("testArray", new Integer[]{2023,2024,2025,2026}); map.put("testList", Arrays.asList("Spring","Spring Boot","Thym...
repos\spring-boot-projects-main\玩转SpringBoot系列案例源码\spring-boot-web-thymeleaf-syntax\src\main\java\cn\lanqiao\springboot3\controller\ThymeleafController.java
2
请完成以下Java代码
public V get(char[] key) { return get(new String(key)); } public V get(String key) { int id = exactMatchSearch(key); if (id == -1) return null; return valueArray[id]; } @Override public V[] getValueArray(V[] a) { return valueArray; } /**...
@Override public void putAll(Map<? extends String, ? extends V> m) { throw new UnsupportedOperationException("双数组不支持增量式插入"); } @Override public void clear() { throw new UnsupportedOperationException("双数组不支持"); } @Override public Set<String> keySet() { th...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\DartMap.java
1
请在Spring Boot框架中完成以下Java代码
public class Xrech4H { @XmlElement(name = "HEADER", required = true) protected HEADERXrech header; @XmlElement(name = "TRAILR", required = true) protected TRAILR trailr; /** * Gets the value of the header property. * * @return * possible object is * {@link HEADERX...
* @return * possible object is * {@link TRAILR } * */ public TRAILR getTRAILR() { return trailr; } /** * Sets the value of the trailr property. * * @param value * allowed object is * {@link TRAILR } * */ public vo...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_invoic\de\metas\edi\esb\jaxb\stepcom\invoic\Xrech4H.java
2
请完成以下Java代码
public int getC_ChargeType_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_ChargeType_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Description. @param Description Optional short description of the record */ public void setDescription (String Description) { set_Value (CO...
Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ChargeType.java
1
请完成以下Java代码
private <T extends PO> List<T> retrieveList(final String sql, final Object[] params, final Class<T> clazz, final String trxName) { PreparedStatement pstmt = null; ResultSet rs = null; try { pstmt = DB.prepareStatement(sql, trxName); DB.setParameters(pstmt, params); rs = pstmt.executeQuery(); fi...
final T newPO = TableModelLoader.instance.retrieveModel(ctx, tableName, clazz, rs, trxName); result.add(newPO); } return result; } catch (SQLException e) { throw new DBException(e, sql, params); } finally { DB.close(rs, pstmt); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\document\impl\RecurringPA.java
1
请完成以下Java代码
private Sign getAmountSign() { Check.assumeNotNull(_amountSign, "amountSign not null"); return _amountSign; } public GLDistributionBuilder setQtyToDistribute(final BigDecimal qtyToDistribute) { _qtyToDistribute = qtyToDistribute; return this; } private BigDecimal getQtyToDistribute() { Check.assumeN...
} public GLDistributionBuilder setAccountDimension(final AccountDimension accountDimension) { _accountDimension = accountDimension; return this; } private AccountDimension getAccountDimension() { Check.assumeNotNull(_accountDimension, "_accountDimension not null"); return _accountDimension; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gldistribution\GLDistributionBuilder.java
1
请完成以下Java代码
public float similarity(String what, String with) { Vector A = query(what); if (A == null) return -1f; Vector B = query(with); if (B == null) return -1f; return A.cosineForUnitVector(B); } public Segment getSegment() { return segment; } public vo...
*/ public boolean isFilterEnabled() { return filter; } /** * 激活/关闭停用词过滤器 * * @param filter */ public void enableFilter(boolean filter) { this.filter = filter; } }
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\DocVectorModel.java
1
请完成以下Java代码
public void setEntityType (java.lang.String EntityType) { set_Value (COLUMNNAME_EntityType, EntityType); } /** Get Entitäts-Art. @return Dictionary Entity Type; Determines ownership and synchronization */ @Override public java.lang.String getEntityType () { return (java.lang.String)get_Value(COLUMNNAM...
{ return (java.lang.String)get_Value(COLUMNNAME_Name); } /** * Type AD_Reference_ID=540533 * Reference name: C_Aggregation_Attribute_Type */ public static final int TYPE_AD_Reference_ID=540533; /** Attribute = A */ public static final String TYPE_Attribute = "A"; /** Set Art. @param Type Type of Va...
repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java-gen\de\metas\aggregation\model\X_C_Aggregation_Attribute.java
1
请在Spring Boot框架中完成以下Java代码
public HistoricTaskLogEntryQuery from(Date fromDate) { this.fromDate = fromDate; return this; } @Override public HistoricTaskLogEntryQuery to(Date toDate) { this.toDate = toDate; return this; } @Override public HistoricTaskLogEntryQuery tenantId(String t...
public String getScopeType() { return scopeType; } public Date getFromDate() { return fromDate; } public Date getToDate() { return toDate; } public String getTenantId() { return tenantId; } public long getFromLogNumber() { return fromLogNumber;...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\HistoricTaskLogEntryQueryImpl.java
2
请完成以下Java代码
public final void addQtysToInvoice(@NonNull final StockQtyAndUOMQty qtysToInvoiceToAdd) { final StockQtyAndUOMQty qtysToInvoiceOld = getQtysToInvoice(); final StockQtyAndUOMQty qtysToInvoiceNew; if (qtysToInvoiceOld == null) { qtysToInvoiceNew = qtysToInvoiceToAdd; } else { qtysToInvoiceNew = qtysT...
public int getLineNo() { return lineNo; } @Override public void setLineNo(final int lineNo) { this.lineNo = lineNo; } @Override public void setInvoiceLineAttributes(@NonNull final List<IInvoiceLineAttribute> invoiceLineAttributes) { this.invoiceLineAttributes = ImmutableList.copyOf(invoiceLineAttribute...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceLineImpl.java
1
请完成以下Java代码
public class UmsAdmin implements Serializable { private Long id; private String username; private String password; @ApiModelProperty(value = "头像") private String icon; @ApiModelProperty(value = "邮箱") private String email; @ApiModelProperty(value = "昵称") private String nickName; ...
return nickName; } public void setNickName(String nickName) { this.nickName = nickName; } public String getNote() { return note; } public void setNote(String note) { this.note = note; } public Date getCreateTime() { return createTime; } public...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsAdmin.java
1
请完成以下Java代码
public boolean isLiteralText() { return node.isLiteralText(); } @Override public ValueReference getValueReference(ELContext context) { return node.getValueReference(bindings, context); } /** * Answer <code>true</code> if this could be used as an lvalue. * This is the case...
return (getStructuralId().equals(other.getStructuralId()) && bindings.equals(other.bindings)); } return false; } @Override public int hashCode() { return getStructuralId().hashCode(); } @Override public String toString() { return "TreeValueExpression(" + expr + ...
repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\TreeValueExpression.java
1
请完成以下Java代码
public ExternalTaskHandler getExternalTaskHandler() { return externalTaskHandler; } @Override public List<String> getVariableNames() { return subscriptionConfiguration.getVariableNames(); } @Override public boolean isLocalVariables() { return subscriptionConfiguration.getLocalVariables(); } ...
return subscriptionConfiguration.getProcessDefinitionVersionTag(); } @Override public Map<String, Object> getProcessVariables() { return subscriptionConfiguration.getProcessVariables(); } @Override public boolean isWithoutTenantId() { return subscriptionConfiguration.getWithoutTenantId(); } @...
repos\camunda-bpm-platform-master\spring-boot-starter\starter-client\spring\src\main\java\org\camunda\bpm\client\spring\impl\subscription\SpringTopicSubscriptionImpl.java
1
请完成以下Java代码
public PrivateKey getPrivateKey(Resource resource, KeyFormat format) { byte[] keyBytes = getResourceBytes(resource); if (format == KeyFormat.PEM) { keyBytes = decodePem(keyBytes, PRIVATE_KEY_HEADER, PRIVATE_KEY_FOOTER); } PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(key...
* @return an array of {@link byte} objects */ @SneakyThrows public byte[] encrypt(byte[] msg, PublicKey key) { final Cipher cipher = Cipher.getInstance("RSA"); cipher.init(Cipher.ENCRYPT_MODE, key); return cipher.doFinal(msg); } /** * <p>decrypt.</p> * * @par...
repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\util\AsymmetricCryptography.java
1
请完成以下Java代码
public class ProductXML { @XmlAttribute private long productNumber = 0; @PrimaryKey private String name = null; private Double price = 0.0; public ProductXML() { this.productNumber = 0; this.name = null; this.price = 0.0; } public ProductXML(long productNumber,...
public String getName() { return name; } public void setName(String name) { this.name = name; } public Double getPrice() { return price; } public void setPrice(Double price) { this.price = price; } }
repos\tutorials-master\libraries-data-db-2\src\main\java\com\baeldung\libraries\jdo\ProductXML.java
1
请完成以下Java代码
public Set<Entry<String, ClassLoaderFile>> getFileEntries() { return Collections.unmodifiableSet(this.filesByName.entrySet()); } /** * An individual source directory that is being managed by the collection. */ public static class SourceDirectory implements Serializable { @Serial private static final long...
this.files.remove(name); } protected final @Nullable ClassLoaderFile get(String name) { return this.files.get(name); } /** * Return the name of the source directory. * @return the name of the source directory */ public String getName() { return this.name; } /** * Return all {@link Cla...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\restart\classloader\ClassLoaderFiles.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable Set<String> getExclude() { return this.exclude; } public void setExclude(@Nullable Set<String> exclude) { this.exclude = exclude; } @Override public @Nullable Show getShowDetails() { return this.showDetails; } public void setShowDetails(@Nullable Show showDetails) { this.sh...
/** * Health logging properties. */ public static class Logging { /** * Threshold after which a warning will be logged for slow health indicators. */ private Duration slowIndicatorThreshold = Duration.ofSeconds(10); public Duration getSlowIndicatorThreshold() { return this.slowIndicatorThreshold; ...
repos\spring-boot-4.0.1\module\spring-boot-health\src\main\java\org\springframework\boot\health\autoconfigure\actuate\endpoint\HealthEndpointProperties.java
2
请完成以下Java代码
public void setGuaranteeDaysMin (final int GuaranteeDaysMin) { set_ValueNoCheck (COLUMNNAME_GuaranteeDaysMin, GuaranteeDaysMin); } @Override public int getGuaranteeDaysMin() { return get_ValueAsInt(COLUMNNAME_GuaranteeDaysMin); } @Override public void setHU_BestBeforeDate (final @Nullable java.sql.Timest...
return get_ValueAsString(COLUMNNAME_HU_Expired); } @Override public void setHU_ExpiredWarnDate (final @Nullable java.sql.Timestamp HU_ExpiredWarnDate) { set_ValueNoCheck (COLUMNNAME_HU_ExpiredWarnDate, HU_ExpiredWarnDate); } @Override public java.sql.Timestamp getHU_ExpiredWarnDate() { return get_ValueAs...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_BestBefore_V.java
1
请完成以下Java代码
public final class HeaderUtil { private static final Logger log = LoggerFactory.getLogger(HeaderUtil.class); private static final String APPLICATION_NAME = "bookstoreApp"; private HeaderUtil() { } public static HttpHeaders createAlert(String message, String param) { HttpHeaders headers =...
return createAlert("A " + entityName + " is updated with identifier " + param, param); } public static HttpHeaders createEntityDeletionAlert(String entityName, String param) { return createAlert("A " + entityName + " is deleted with identifier " + param, param); } public static HttpHeaders cre...
repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\web\rest\util\HeaderUtil.java
1
请完成以下Java代码
protected String doIt() throws Exception { final IQueryFilter<I_C_OLCand> queryFilter = getProcessInfo().getQueryFilterOrElseFalse(); final IQueryBuilder<I_C_OLCand> queryBuilder = queryBL.createQueryBuilder(I_C_OLCand.class, getCtx(), get_TrxName()) .addEqualsFilter(I_C_OLCand.COLUMNNAME_Processed, false) //...
if (olCand.isError()) { candidatesWithError++; } InterfaceWrapperHelper.save(olCand); } return msgBL.getMsg(getCtx(), OLCandValidatorService.MSG_ERRORS_FOUND, new Object[] { candidatesWithError }); } finally { olCandValidatorService.setValidationProcessInProgress(false); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\process\C_OLCand_Validate_Selected.java
1
请完成以下Java代码
public KeyName[] getLowCardinalityKeyNames() { return TemplateLowCardinalityTags.values(); } }; /** * Low cardinality tags. */ public enum TemplateLowCardinalityTags implements KeyName { /** * Bean name of the template. */ BEAN_NAME { @Override public String asString() { return "spri...
} } /** * Default {@link RabbitTemplateObservationConvention} for Rabbit template key values. */ public static class DefaultRabbitTemplateObservationConvention implements RabbitTemplateObservationConvention { /** * A singleton instance of the convention. */ public static final DefaultRabbitTemplate...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\support\micrometer\RabbitTemplateObservation.java
1
请完成以下Java代码
public void setRemark(String value) { this.remark = value; } /** * Gets the value of the recordId property. * * @return * possible object is * {@link Integer } * */ public Integer getRecordId() { return recordId; } /** * Sets th...
*/ public void setCostUnit(String value) { this.costUnit = value; } /** * Gets the value of the status property. * */ public int getStatus() { return status; } /** * Sets the value of the status property. * */ public void setStatus(int 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\ValidationResultType.java
1
请完成以下Java代码
private String getProperty(final String propertyName, final String defaultValue) { if (properties == null) { throw new IllegalStateException("Settings were not configured"); } return properties.getProperty(propertyName, defaultValue); } public String getDbName() { return getProperty(PROP_DB_NAME, "me...
@Override public String toString() { final HashMap<Object, Object> result = new HashMap<>(properties); result.put(PROP_DB_PASSWORD, "******"); return result.toString(); } public DBConnectionSettings toDBConnectionSettings() { return DBConnectionSettings.builder() .dbHostname(getDbHostname()) .dbPo...
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.cli\src\main\java\de\metas\migration\cli\rollout_migrate\DBConnectionSettingProperties.java
1
请在Spring Boot框架中完成以下Java代码
public DeploymentBuilder tenantId(String tenantId) { deployment.setTenantId(tenantId); return this; } public DeploymentBuilder enableDuplicateFiltering() { this.isDuplicateFilterEnabled = true; return this; } public DeploymentBuilder activateProcessDefinitionsOn(Date da...
public DeploymentEntity getDeployment() { return deployment; } public boolean isProcessValidationEnabled() { return isProcessValidationEnabled; } public boolean isBpmn20XsdValidationEnabled() { return isBpmn20XsdValidationEnabled; } public boolean isDuplicateFilterEnab...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\repository\DeploymentBuilderImpl.java
2
请完成以下Java代码
public PlanItem getSource() { return sourceRefAttribute.getReferenceTargetElement(this); } public void setSource(PlanItem source) { sourceRefAttribute.setReferenceTargetElement(this, source); } public PlanItemTransition getStandardEvent() { PlanItemTransitionStandardEvent child = standardEventChil...
}); sourceRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SOURCE_REF) .idAttributeReference(PlanItem.class) .build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); standardEventChild = sequenceBuilder.element(PlanItemTransitionStandardEvent.class) .build(); ...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\PlanItemStartTriggerImpl.java
1
请完成以下Java代码
public class FlowableComponent extends DefaultComponent { protected IdentityService identityService; protected RuntimeService runtimeService; protected RepositoryService repositoryService; protected ManagementService managementService; protected boolean copyVariablesToProperties; protected...
if (returnVars != null && returnVars.size() > 0) { ae.getReturnVarMap().putAll(returnVars); } return ae; } public boolean isCopyVariablesToProperties() { return copyVariablesToProperties; } public void setCopyVariablesToProperties(boolean copyVariablesToProperties)...
repos\flowable-engine-main\modules\flowable-camel\src\main\java\org\flowable\camel\FlowableComponent.java
1
请完成以下Java代码
public static String getDefaultCodeset() { return codeset; } /** position of tag relative to start and end. */ public static int getDefaultPosition() { return position; } /** Default value to set case type */ public static int getDefaultCaseType() { return case_type; }
public static char getDefaultStartTag() { return start_tag; } public static char getDefaultEndTag() { return end_tag; } /** Should we print html in a more readable format? */ public static boolean getDefaultPrettyPrint() { return pretty_print; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\ECSDefaults.java
1
请完成以下Java代码
public String getId() { return id; } public AppClusterClientStateWrapVO setId(String id) { this.id = id; return this; } public String getIp() { return ip; } public AppClusterClientStateWrapVO setIp(String ip) { this.ip = ip; return this; } ...
public Integer getCommandPort() { return commandPort; } public AppClusterClientStateWrapVO setCommandPort(Integer commandPort) { this.commandPort = commandPort; return this; } @Override public String toString() { return "AppClusterClientStateWrapVO{" + "...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\cluster\state\AppClusterClientStateWrapVO.java
1
请在Spring Boot框架中完成以下Java代码
public DeploymentBuilder activateProcessDefinitionsOn(Date date) { this.processDefinitionsActivationDate = date; return this; } @Override public DeploymentBuilder deploymentProperty(String propertyKey, Object propertyValue) { deploymentProperties.put(propertyKey, propertyValue); ...
public boolean isBpmn20XsdValidationEnabled() { return isBpmn20XsdValidationEnabled; } public boolean isDuplicateFilterEnabled() { return isDuplicateFilterEnabled; } public Date getProcessDefinitionsActivationDate() { return processDefinitionsActivationDate; } public M...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\repository\DeploymentBuilderImpl.java
2
请完成以下Java代码
public void setSerNo (String SerNo) { set_ValueNoCheck (COLUMNNAME_SerNo, SerNo); } /** Get Serial No. @return Product Serial Number */ public String getSerNo () { return (String)get_Value(COLUMNNAME_SerNo); } /** Set Details. @param TextDetails Details */ public void setTextDetails (String Tex...
{ Integer ii = (Integer)get_Value(COLUMNNAME_UseLifeYears); if (ii == null) return 0; return ii.intValue(); } /** Set Use units. @param UseUnits Currently used units of the assets */ public void setUseUnits (int UseUnits) { set_Value (COLUMNNAME_UseUnits, Integer.valueOf(UseUnits)); } /** Ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Change.java
1
请在Spring Boot框架中完成以下Java代码
public class StoreController { private final StoreService storeService; private final Javers javers; public StoreController(StoreService customerService, Javers javers) { this.storeService = customerService; this.javers = javers; } @PostMapping("/stores/{storeId}/products/random") ...
@GetMapping("/products/snapshots") public String getProductSnapshots() { QueryBuilder jqlQuery = QueryBuilder.byClass(Product.class); List<CdoSnapshot> snapshots = javers.findSnapshots(jqlQuery.build()); return javers.getJsonConverter().toJson(snapshots); } @GetMapping("/stores/{sto...
repos\tutorials-master\spring-boot-modules\spring-boot-data-2\src\main\java\com\baeldung\javers\web\StoreController.java
2
请完成以下Java代码
public class ProductPlanningSchema { @Nullable private ProductPlanningSchemaId id; @NonNull private final ProductPlanningSchemaSelector selector; @NonNull private final OrgId orgId; @Nullable private final ResourceId plantId; @Nullable private final WarehouseId warehouseId; private final boolean attribu...
@Nullable private final Boolean manufactured; private final boolean createPlan; private final boolean completeGeneratedDocuments; private final boolean pickDirectlyIfFeasible; @Nullable private final PPRoutingId routingId; // @Nullable private final DistributionNetworkId distributionNetworkId; @NonNull pr...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\ProductPlanningSchema.java
1
请完成以下Java代码
public String getParentCaseActivityInstanceId() { return parentCaseActivityInstanceId; } public void setParentCaseActivityInstanceId(String parentCaseActivityInstanceId) { this.parentCaseActivityInstanceId = parentCaseActivityInstanceId; } public String getTaskId() { return taskId; } public v...
public boolean isAvailable() { return caseActivityInstanceState == AVAILABLE.getStateCode(); } public boolean isEnabled() { return caseActivityInstanceState == ENABLED.getStateCode(); } public boolean isDisabled() { return caseActivityInstanceState == DISABLED.getStateCode(); } public boolean...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricCaseActivityInstanceEventEntity.java
1
请完成以下Java代码
protected ProductsProposalRowsLoader createRowsLoaderFromRecord(final TableRecordReference recordRef) { final IBPartnerDAO bpartnersRepo = Services.get(IBPartnerDAO.class); final IPriceListDAO priceListsRepo = Services.get(IPriceListDAO.class); recordRef.assertTableName(I_C_BPartner.Table_Name); final BPartne...
throw new AdempiereException("@NotFound@ @M_PricingSystem_ID@"); } final ZonedDateTime today = SystemTime.asZonedDateTime(); final Set<PriceListVersionId> priceListVersionIds = priceListsRepo.retrievePriceListsCollectionByPricingSystemId(pricingSystemId) .filterAndStreamIds(countryIds) .map(priceListId -...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\view\BPartnerProductsProposalViewFactory.java
1
请完成以下Java代码
public Mono<Void> writeHttpHeaders(ServerWebExchange exchange) { return this.delegate.writeHttpHeaders(exchange); } /** * Sets the value of the X-XSS-PROTECTION header. Defaults to * {@link HeaderValue#DISABLED} * <p> * If {@link HeaderValue#DISABLED}, will specify that X-XSS-Protection is disabled. * Fo...
* @author Daniel Garnier-Moiroux * @since 5.8 */ public enum HeaderValue { DISABLED("0"), ENABLED("1"), ENABLED_MODE_BLOCK("1; mode=block"); private final String value; HeaderValue(String value) { this.value = value; } @Override public String toString() { return this.value; } } private ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\header\XXssProtectionServerHttpHeadersWriter.java
1
请在Spring Boot框架中完成以下Java代码
public AdminUser selectById(Long id) { return adminUserDao.getAdminUserById(id); } @Override public AdminUser selectByUserName(String userName) { return adminUserDao.getAdminUserByUserName(userName); } @Override public int save(AdminUser user) { //密码加密 user.setP...
@Override public int updatePassword(AdminUser user) { return adminUserDao.updateUserPassword(user.getId(), MD5Util.MD5Encode(user.getPassword(), "UTF-8")); } @Override public int deleteBatch(Integer[] ids) { return adminUserDao.deleteBatch(ids); } @Override public AdminUser...
repos\spring-boot-projects-main\SpringBoot前后端分离实战项目源码\spring-boot-project-front-end&back-end\src\main\java\cn\lanqiao\springboot3\service\impl\AdminUserServiceImpl.java
2
请在Spring Boot框架中完成以下Java代码
public class SpelRegex { @Value("#{100 matches '\\d+' }") private boolean validNumericStringResult; @Value("#{'100fghdjf' matches '\\d+' }") private boolean invalidNumericStringResult; @Value("#{'valid alphabetic string' matches '[a-zA-Z\\s]+' }") private boolean validAlphabeticStringResult; ...
} public boolean isValidFormatOfHorsePower() { return validFormatOfHorsePower; } public void setValidFormatOfHorsePower(boolean validFormatOfHorsePower) { this.validFormatOfHorsePower = validFormatOfHorsePower; } @Override public String toString() { return "SpelRegex{"...
repos\tutorials-master\spring-spel\src\main\java\com\baeldung\spring\spel\examples\SpelRegex.java
2
请完成以下Java代码
public void setC_Queue_WorkPackage_Log_ID (int C_Queue_WorkPackage_Log_ID) { if (C_Queue_WorkPackage_Log_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Queue_WorkPackage_Log_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Queue_WorkPackage_Log_ID, Integer.valueOf(C_Queue_WorkPackage_Log_ID)); } /** Get Workpacka...
@Override public void setMsgText (java.lang.String MsgText) { set_ValueNoCheck (COLUMNNAME_MsgText, MsgText); } /** Get Message Text. @return Textual Informational, Menu or Error Message */ @Override public java.lang.String getMsgText () { return (java.lang.String)get_Value(COLUMNNAME_MsgText); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Queue_WorkPackage_Log.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setCarrier_Product_ID (final int Carrier_Product_ID) { if (Carrier_Product_ID < 1) set_Value (COLUMNNAME_Carrier_Product_ID, null); else set_Value (COLUM...
return get_ValueAsInt(COLUMNNAME_C_Workplace_Carrier_Product_ID); } @Override public void setC_Workplace_ID (final int C_Workplace_ID) { if (C_Workplace_ID < 1) set_Value (COLUMNNAME_C_Workplace_ID, null); else set_Value (COLUMNNAME_C_Workplace_ID, C_Workplace_ID); } @Override public int getC_Workp...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Workplace_Carrier_Product.java
1
请完成以下Spring Boot application配置
server: port: 7002 spring: application: name: jeecg-demo cloud: nacos: config: server-addr: @config.server-addr@ group: @config.group@ namespace: @config.namespace@ username: @config.username@ password: @config.password@ discovery: server-addr...
space@ username: @config.username@ password: @config.password@ config: import: - optional:nacos:jeecg.yaml - optional:nacos:jeecg-@profile.name@.yaml
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-demo-cloud-start\src\main\resources\application.yml
2
请完成以下Java代码
public void removeInOutFromBalance(final I_M_InOut inout) { final IMaterialBalanceDetailDAO materialBalanceDetailDAO = Services.get(IMaterialBalanceDetailDAO.class); materialBalanceDetailDAO.deleteBalanceDetailsForInOut(inout); } @Override public List<I_M_Material_Balance_Detail> retrieveBalanceDetailsForInO...
final IQueryBuilder<I_M_Material_Balance_Detail> queryBuilder = queryBL.createQueryBuilder(I_M_Material_Balance_Detail.class) .filterByClientId() .addOnlyActiveRecordsFilter(); if (config != null) { queryBuilder.addEqualsFilter(I_M_Material_Balance_Detail.COLUMNNAME_M_Material_Balance_Config_ID, config....
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inout\api\impl\MaterialBalanceDetailDAO.java
1
请在Spring Boot框架中完成以下Java代码
public Builder setCtx(final Properties ctx) { this.ctx = ctx; return this; } public Builder setAD_Process_ID(final AdProcessId AD_Process_ID) { this.AD_Process_ID = AD_Process_ID; return this; } public Builder setPInstanceId(final PInstanceId pinstanceId) { this.pinstanceId = pinstanceId;...
public Builder setApplySecuritySettings(final boolean applySecuritySettings) { this.applySecuritySettings = applySecuritySettings; return this; } private ImmutableList<ProcessInfoParameter> getProcessInfoParameters() { return Services.get(IADPInstanceDAO.class).retrieveProcessInfoParameters(pinstanceI...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\server\ReportContext.java
2
请完成以下Java代码
public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setP...
@Override public void setQtyEntered (final BigDecimal QtyEntered) { set_Value (COLUMNNAME_QtyEntered, QtyEntered); } @Override public BigDecimal getQtyEntered() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyEntered); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQt...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_CallOrderSummary.java
1
请在Spring Boot框架中完成以下Java代码
public OtaPackageInfo saveOtaPackageData(OtaPackageInfo otaPackageInfo, String checksum, ChecksumAlgorithm checksumAlgorithm, byte[] data, String filename, String contentType, User user) throws ThingsboardException { ActionType actionType = ActionType.UPDATED; ...
} } @Override public void delete(OtaPackageInfo otaPackageInfo, User user) throws ThingsboardException { ActionType actionType = ActionType.DELETED; TenantId tenantId = otaPackageInfo.getTenantId(); OtaPackageId otaPackageId = otaPackageInfo.getId(); try { otaPac...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\entitiy\ota\DefaultTbOtaPackageService.java
2
请完成以下Java代码
public class X_C_OLCand_Paypal extends org.compiere.model.PO implements I_C_OLCand_Paypal, org.compiere.model.I_Persistent { private static final long serialVersionUID = 865508190L; /** Standard Constructor */ public X_C_OLCand_Paypal (final Properties ctx, final int C_OLCand_Paypal_ID, @Nullable final Stri...
@Override public int getC_OLCand_Paypal_ID() { return get_ValueAsInt(COLUMNNAME_C_OLCand_Paypal_ID); } @Override public void setPayPal_Token (final @Nullable java.lang.String PayPal_Token) { set_Value (COLUMNNAME_PayPal_Token, PayPal_Token); } @Override public java.lang.String getPayPal_Token() { re...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java-gen\de\metas\payment\paypal\model\X_C_OLCand_Paypal.java
1
请在Spring Boot框架中完成以下Java代码
public ImmutableSet<BPartnerRelatedRecordId> getRecords(final @NonNull PARENT_ID parentId) { return queryRecords(parentId) .stream() .map(this::extractRecordId) .distinct() .collect(ImmutableSet.toImmutableSet()); } // see also: de.metas.ui.web.window.model.sql.SqlDocumentsRepository.saveLabels p...
.stream() .collect(GuavaCollectors.toHashMapByKey(this::extractRecordId)); for (final BPartnerRelatedRecordId recordId : recordIdsSet) { final T existingRecord = existingRecords.remove(recordId); if (existingRecord == null) { createNewRecord(parentId, recordId); } } deleteRecords(existingR...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\attributes\related\service\adapter\RelatedRecordsAdapter.java
2
请完成以下Java代码
protected InstanceBuilder<T> getThis() { return this; } @Override protected void validate() { Objects.requireNonNull(this.instance, "instance may not be null"); } @Override protected T doBind() { T toBind = getTargetObject(this.instance); Bindable<T> bindable = Bindable.ofInstance(toBind); ...
Map<String, Object> normalizedProperties = new HashMap<>(); this.properties.forEach(normalizedProperties::put); return normalizedProperties; } protected abstract T doBind(); public T bind() { validate(); Assert.hasText(this.name, "name may not be empty"); Assert.isTrue(this.properties != null || ...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\support\ConfigurationService.java
1
请完成以下Java代码
public java.lang.String getProjInvoiceRule() { return get_ValueAsString(COLUMNNAME_ProjInvoiceRule); } @Override public void setQty (final @Nullable BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty);...
} @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } @Override public void setStartDate (final @Nullable java.sql.Timestamp StartDate) { set_Value (COLUMNNAME_StartDate, StartDate); } @Override public java.sql.Timestamp getStartDate() { return get_ValueAsTimestamp(COLUMNN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ProjectPhase.java
1