instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setAD_Issue_ID (final int AD_Issue_ID) { if (AD_Issue_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_Issue_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_Issue...
else set_ValueNoCheck (COLUMNNAME_Document_Acct_Log_ID, Document_Acct_Log_ID); } @Override public int getDocument_Acct_Log_ID() { return get_ValueAsInt(COLUMNNAME_Document_Acct_Log_ID); } @Override public void setRecord_ID (final int Record_ID) { if (Record_ID < 0) set_ValueNoCheck (COLUMNNAME_Re...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Document_Acct_Log.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonRequestComposite { // TODO if an org is given, then verify whether the current user has access to the given org @ApiModelProperty(position = 10) @JsonInclude(Include.NON_NULL) String orgCode; @ApiModelProperty(position = 20) JsonRequestBPartner bpartner; @ApiModelProperty(value = "The location...
{ this.orgCode = orgCode; this.bpartner = bpartner; this.locations = locations; this.contacts = contacts; this.bankAccounts = bankAccounts; this.compositeAlbertaBPartner = compositeAlbertaBPartner; this.syncAdvise = syncAdvise; } @JsonIgnore public JsonRequestLocationUpsert getLocationsNotNull() { ...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v2\request\JsonRequestComposite.java
2
请完成以下Java代码
public List<TbActorId> filterChildren(TbActorId parent, Predicate<TbActorId> childFilter) { Set<TbActorId> children = parentChildMap.get(parent); if (children != null) { return children.stream().filter(childFilter).collect(Collectors.toList()); } else { return Collections...
mailbox.destroy(null); } } @Override public void stop() { dispatchers.values().forEach(dispatcher -> { dispatcher.getExecutor().shutdown(); try { dispatcher.getExecutor().awaitTermination(3, TimeUnit.SECONDS); } catch (InterruptedException...
repos\thingsboard-master\common\actor\src\main\java\org\thingsboard\server\actors\DefaultTbActorSystem.java
1
请完成以下Java代码
public String getBusinessKey() { return businessKey; } @CamundaQueryParam(value="businessKey") public void setBusinessKey(String businessKey) { this.businessKey = businessKey; } @CamundaQueryParam(value = "variables", converter = VariableListConverter.class) public void setVariables(List<VariableQ...
return values; } for (VariableQueryParameterDto variable : variables) { QueryVariableValue value = new QueryVariableValue( variable.getName(), resolveVariableValue(variable.getValue()), ConditionQueryParameterDto.getQueryOperator(variable.getOperator()), false); ...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\cockpit\impl\plugin\base\dto\query\ProcessDefinitionQueryDto.java
1
请完成以下Java代码
public boolean isUseForPartnerRequestWindow () { Object oo = get_Value(COLUMNNAME_IsUseForPartnerRequestWindow); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Name. @param Name Alphanumeric identifier...
if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_R_StatusCategory getR_StatusCategory() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_R_StatusCategory_ID, org.compiere.model.I_R_StatusCategory.class); } @Override public void setR_StatusCategory(org.com...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_RequestType.java
1
请在Spring Boot框架中完成以下Java代码
public class DeploymentResourceDto { protected String id; protected String name; protected String deploymentId; public DeploymentResourceDto() { } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public...
} public String getDeploymentId() { return deploymentId; } public void setDeploymentId(String deploymentId) { this.deploymentId = deploymentId; } public static DeploymentResourceDto fromResources(Resource resource) { DeploymentResourceDto dto = new DeploymentResourceDto(); dto.id = resource...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\repository\DeploymentResourceDto.java
2
请完成以下Java代码
public org.compiere.model.I_M_Product getM_ProductFreight() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_M_ProductFreight_ID, org.compiere.model.I_M_Product.class); } @Override public void setM_ProductFreight(org.compiere.model.I_M_Product M_ProductFreight) { set_ValueFromPO(COLUMNNAME_M_ProductF...
set_Value (COLUMNNAME_M_ProductFreight_ID, null); else set_Value (COLUMNNAME_M_ProductFreight_ID, Integer.valueOf(M_ProductFreight_ID)); } /** Get Produkt für Fracht. @return Produkt für Fracht */ @Override public int getM_ProductFreight_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_ProductFre...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ClientInfo.java
1
请在Spring Boot框架中完成以下Java代码
public class Book implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String title; private String isbn; @ManyToOne(fetch = FetchType.LAZY) @JoinColumns({ @JoinColumn( ...
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (getClass() != obj.getClass()) { return false; } return id != null && id.equals(((Book) obj).id); } @Override public int hashCode() { return 2021...
repos\Hibernate-SpringBoot-master\HibernateSpringBootCompositeKeyEmbeddable\src\main\java\com\bookstore\entity\Book.java
2
请完成以下Java代码
public boolean supports(Class<?> authentication) { return OAuth2AuthorizationCodeAuthenticationToken.class.isAssignableFrom(authentication); } /** * Sets the {@link SessionRegistry} used to track OpenID Connect sessions. * @param sessionRegistry the {@link SessionRegistry} used to track OpenID Connect * sess...
sessionInformation = sessions.get(0); if (sessions.size() > 1) { // Get the most recent session sessions = new ArrayList<>(sessions); sessions.sort(Comparator.comparing(SessionInformation::getLastRequest)); sessionInformation = sessions.get(sessions.size() - 1); } } } return sessionIn...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2AuthorizationCodeAuthenticationProvider.java
1
请完成以下Java代码
public void parsingElement(String elementType, String elementId) { logDebug("001", "Parsing element from type '{}' with id '{}'", elementType, elementId); } public void ignoringNonExecutableProcess(String elementId) { logInfo("002", "Ignoring non-executable process with id '{}'. Set the attribute isExecuta...
return new ProcessEngineException(exceptionMessage("009", "Error while parsing process. {}.", cause.getMessage()), cause); } public void exceptionWhileGeneratingProcessDiagram(Throwable t) { logError( "010", "Error while generating process diagram, image will not be stored in repository", t); ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\parser\BpmnParseLogger.java
1
请完成以下Java代码
private void updateProfitPriceActual(final I_C_OrderLine orderLineRecord) { final OrderLineRepository orderLineRepository = SpringContextHolder.instance.getBean(OrderLineRepository.class); final ProfitPriceActualFactory profitPriceActualFactory = SpringContextHolder.instance.getBean(ProfitPriceActualFactory.class)...
final IPricingResult pricingResult = pricingBL.calculatePrice(pricingCtx); if (!pricingResult.isCalculated()) { final I_C_OrderLine orderLine = request.getOrderLine(); throw new ProductNotOnPriceListException(pricingCtx, orderLine.getLine()) .setParameter("log", pricingResult.getLoggableMessages()); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\impl\OrderLinePriceCalculator.java
1
请完成以下Java代码
private I_PP_Order_Qty createReceiptCandidateOrNull( @NonNull final IHUContext huContext, @NonNull final I_M_HU hu) { final IHUProductStorage productStorage = retrieveProductStorage(huContext, hu); if (productStorage == null) { return null; } // Actually create and save the candidate final I_PP_O...
.topLevelHUId(HuId.ofRepoId(hu.getM_HU_ID())) .productId(productId) // .qtyToReceive(qtyPicked) // .build()); return candidate; } catch (final RuntimeException rte) { throw AdempiereException.wrapIfNeeded(rt...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\impl\hu_pporder_issue_producer\CreatePickedReceiptCommand.java
1
请完成以下Java代码
public void deleteDraftPickingCandidates(final List<PickingCandidate> draftCandidates) { draftCandidates.forEach(PickingCandidate::assertDraft); pickingCandidateRepository.deletePickingCandidates(draftCandidates); } public ADRefList getQtyRejectedReasons() { return adReferenceService.getRefListById(QtyReject...
@Override public void beforeReleasePickingSlot(final @NonNull ReleasePickingSlotRequest request) { final boolean clearedAllUnprocessedHUs = clearPickingSlot(request.getPickingSlotId(), request.isRemoveUnprocessedHUsFromSlot()); if (!clearedAllUnprocessedHUs) { throw new AdempiereException(DRAFTED_PICKING_CAN...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\PickingCandidateService.java
1
请完成以下Java代码
protected IHUItemStorage getHUItemStorage( @NonNull final I_M_HU_Item item, @NonNull final IAllocationRequest request) { final IHUContext huContext = request.getHuContext(); final IHUStorageFactory huStorageFactory = huContext.getHUStorageFactory(); return huStorageFactory.getStorage(item); } /** * Cr...
// // Create Allocation Result return AllocationUtils.createQtyAllocationResult( qtyToAllocate, qtyAllocated, Arrays.asList(trx), // trxs ImmutableList.of()); // attributeTrxs } /** * Create transaction candidate which when it will be processed it will change the storage quantity. * * @para...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\strategy\AbstractAllocationStrategy.java
1
请完成以下Java代码
protected void addResultToVariableContext(DmnDecisionResult evaluatedResult, VariableMap variableMap, DmnDecision evaluatedDecision) { List<Map<String, Object>> resultList = evaluatedResult.getResultList(); if (resultList.isEmpty()) { return; } else if (resultList.size() == 1 && !isDecisionTableWithC...
DmnDecisionEvaluationEventImpl decisionEvaluationEvent = new DmnDecisionEvaluationEventImpl(); long executedDecisionElements = 0L; for(DmnDecisionLogicEvaluationEvent evaluatedEvent: evaluatedEvents) { executedDecisionElements += evaluatedEvent.getExecutedDecisionElements(); rootEvaluatedEvent = ev...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DefaultDmnDecisionContext.java
1
请完成以下Java代码
public static WorkflowLaunchersFacetId ofId(@NonNull final WorkflowLaunchersFacetGroupId groupId, @NonNull final RepoIdAware id) { return ofString(groupId, String.valueOf(id.getRepoId())); } public static WorkflowLaunchersFacetId ofLocalDate(@NonNull final WorkflowLaunchersFacetGroupId groupId, @NonNull final Loc...
{ throw new AdempiereException("Cannot get Quantity from " + this); } return ImmutablePair.of(new BigDecimal(parts.get(0)), Integer.parseInt(parts.get(1))); } catch (AdempiereException ex) { throw ex; } catch (final Exception ex) { throw new AdempiereException("Cannot get Quantity from "...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\rest_workflows\facets\WorkflowLaunchersFacetId.java
1
请在Spring Boot框架中完成以下Java代码
public class SpringAsyncHistoryExecutor extends SpringAsyncExecutor { public SpringAsyncHistoryExecutor() { super(); init(); } public SpringAsyncHistoryExecutor(AsyncJobExecutorConfiguration configuration) { super(configuration); init(); } protected void init(...
setResetExpiredRunnableName("flowable-reset-expired-history-jobs"); } setAsyncRunnableExecutionExceptionHandler(new UnacquireAsyncHistoryJobExceptionHandler()); } @Override protected void initializeJobEntityManager() { if (jobEntityManager == null) { jobEntityManager...
repos\flowable-engine-main\modules\flowable-job-spring-service\src\main\java\org\flowable\spring\job\service\SpringAsyncHistoryExecutor.java
2
请完成以下Java代码
public int getGO_Shipper_Config_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_GO_Shipper_Config_ID); if (ii == null) return 0; return ii.intValue(); } /** Set GO URL. @param GO_URL GO URL */ @Override public void setGO_URL (java.lang.String GO_URL) { set_Value (COLUMNNAME_GO_URL, GO_URL); ...
public void setM_Shipper_ID (int M_Shipper_ID) { if (M_Shipper_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Shipper_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Shipper_ID, Integer.valueOf(M_Shipper_ID)); } /** Get Lieferweg. @return Methode oder Art der Warenlieferung */ @Override public int getM_Sh...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java-gen\de\metas\shipper\gateway\go\model\X_GO_Shipper_Config.java
1
请完成以下Java代码
public boolean hasNext() { if (fileRefs != null) { return fileRefs.hasNext(); } return scripts.hasNext(); } @Override public IScript next() { if (!hasNext()) { throw new NoSuchElementException(); } if (fileRefs != null) { return getScript(fileRefs.next());
} return scripts.next(); } private IScript getScript(final IFileRef fileRef) { final IScriptFactory scriptFactory = getScriptFactoryToUse(); return scriptFactory.createScript(fileRef); } @Override public String toString() { return "PlainListScriptScanner [fileRef=" + fileRefs + ", scripts= " + scripts...
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\scanner\impl\PlainListScriptScanner.java
1
请在Spring Boot框架中完成以下Java代码
public class SmsHomeRecommendSubjectController { @Autowired private SmsHomeRecommendSubjectService recommendSubjectService; @ApiOperation("添加首页专题推荐") @RequestMapping(value = "/create", method = RequestMethod.POST) @ResponseBody public CommonResult create(@RequestBody List<SmsHomeRecommendSubjec...
@ApiOperation("批量修改专题推荐状态") @RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateRecommendStatus(@RequestParam("ids") List<Long> ids, @RequestParam Integer recommendStatus) { int count = recommendSubjectService.updateRecommendStatus(...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\SmsHomeRecommendSubjectController.java
2
请完成以下Java代码
public ProcessInfo getProcessInfo() { return pi; } public void setProcessInfo(ProcessInfo pi) { this.pi = pi; } public boolean isSelectionActive() { return m_selectionActive; } public void setSelectionActive(boolean active) { m_selectionActive = active; } public ArrayList<Integer> getSelection() { ...
public void setReportEngineType(int reportEngineType) { this.reportEngineType = reportEngineType; } public MPrintFormat getPrintFormat() { return this.printFormat; } public void setPrintFormat(MPrintFormat printFormat) { this.printFormat = printFormat; } public String getAskPrintMsg() { return askPri...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\GenForm.java
1
请完成以下Java代码
private TableColumnModelListener getColumnModelListener() { if (columnModelListener == null) { columnModelListener = createColumnModelListener(); } return columnModelListener; } /** * Creates the listener to columnModel. Subclasses are free to roll their own. * <p> * Implementation note: this liste...
// not actually a change return; } // mark popup stalled because we want to have the same ordering there as we have in table column markPopupStaled(); } /** Tells listeners that a column was moved due to a margin change. */ @Override public void columnMarginChanged(ChangeEvent e) {...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CColumnControlButton.java
1
请在Spring Boot框架中完成以下Java代码
public class BatchConfiguration { @Bean @StepScope public ExpiresSoonMedicineReader expiresSoonMedicineReader(JdbcTemplate jdbcTemplate, @Value("#{jobParameters}") Map<String, Object> jobParameters) { ExpiresSoonMedicineReader medicineReader = new ExpiresSoonMedicineReader(jdbcTemplate); e...
.reader(expiresSoonMedicineReader) .processor(medicineProcessor) .writer(medicineWriter) .faultTolerant() .transactionManager(transactionManager) .build(); return new JobBuilder("medExpirationJob", jobRepository).incrementer(new RunIdIncrementer()) ...
repos\tutorials-master\spring-batch\src\main\java\com\baeldung\batchreaderproperties\BatchConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public class DetailDataRecordIdentifier { public static DetailDataRecordIdentifier createForShipmentSchedule( @NonNull final MainDataRecordIdentifier mainDataRecordIdentifier, final int shipmentScheduleId) { return new DetailDataRecordIdentifier(mainDataRecordIdentifier, shipmentScheduleId, 0); } public st...
this.mainDataRecordIdentifier = mainDataRecordIdentifier; final boolean shipmentScheduleIdSet = shipmentScheduleId > 0; final boolean receiptScheduleIdSet = receiptScheduleId > 0; Check.errorUnless(shipmentScheduleIdSet ^ receiptScheduleIdSet, "Either shipmentScheduleId or receipScheduleId (but not both!) ne...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\view\DetailDataRecordIdentifier.java
2
请完成以下Java代码
public void create(final BusinessRuleLogEntryRequest request) { final I_AD_BusinessRule_Log record = InterfaceWrapperHelper.newInstanceOutOfTrx(I_AD_BusinessRule_Log.class); record.setLevel(request.getLevel().toString()); record.setMsgText(request.getMessage()); record.setAD_Issue_ID(AdIssueId.toRepoId(request...
record.setAD_BusinessRule_Trigger_ID(BusinessRuleTriggerId.toRepoId(request.getTriggerId())); final TableRecordReference sourceRecordRef = request.getSourceRecordRef(); record.setSource_Table_ID(sourceRecordRef != null ? sourceRecordRef.getAD_Table_ID() : -1); record.setSource_Record_ID(sourceRecordRef != null ?...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\business_rule\log\BusinessRuleLogRepository.java
1
请在Spring Boot框架中完成以下Java代码
public static DeviceConfigException wrapIfNeeded(final Throwable throwable) { if (throwable == null) { return null; } final Throwable cause = extractCause(throwable); if (cause instanceof DeviceConfigException) { return (DeviceConfigException)cause; } else { final String msg = extractMessag...
} } private final boolean permanentFailure; public DeviceConfigException(final String msg) { super(msg); permanentFailure = false; } private DeviceConfigException(final String msg, final Throwable cause, final boolean permanentFailure) { super(msg, cause); this.permanentFailure = permanentFailure; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.device.adempiere\src\main\java\de\metas\device\config\DeviceConfigException.java
2
请完成以下Java代码
protected ExecutionEntity getExecutionFromContext() { if(Context.getCommandContext() != null) { BpmnExecutionContext executionContext = Context.getBpmnExecutionContext(); if(executionContext != null) { return executionContext.getExecution(); } } return null; } public Task getT...
return getScopedAssociation().getCachedVariablesLocal(); } public void flushVariableCache() { ensureCommandContextNotActive(); getScopedAssociation().flushVariableCache(); } protected void ensureCommandContextNotActive() { if(Context.getCommandContext() != null) { throw new ProcessEngineCdiE...
repos\camunda-bpm-platform-master\engine-cdi\core\src\main\java\org\camunda\bpm\engine\cdi\impl\context\DefaultContextAssociationManager.java
1
请在Spring Boot框架中完成以下Java代码
public void updatePost(@PathVariable("id") Long id, @RequestBody PostDto postDto) throws ParseException { if(!Objects.equals(id, postDto.getId())){ throw new IllegalArgumentException("IDs don't match"); } Post post = convertToEntity(postDto); postService.updatePost(post); ...
} private Post convertToEntity(PostDto postDto) throws ParseException { Post post = modelMapper.map(postDto, Post.class); post.setSubmissionDate(postDto.getSubmissionDateConverted( userService.getCurrentUser().getPreference().getTimezone())); if (postDto.getId() != null...
repos\tutorials-master\spring-web-modules\spring-boot-rest\src\main\java\com\baeldung\springpagination\controller\PostRestController.java
2
请完成以下Java代码
private ExecutionInput registerDataLoaders(ExecutionInput executionInput) { if (this.hasDataLoaderRegistrations == null) { this.hasDataLoaderRegistrations = initHasDataLoaderRegistrations(); } if (this.hasDataLoaderRegistrations) { GraphQLContext graphQLContext = executionInput.getGraphQLContext(); DataL...
} private boolean initHasDataLoaderRegistrations() { for (DataLoaderRegistrar registrar : this.dataLoaderRegistrars) { if (registrar.hasRegistrations()) { return true; } } return false; } private void applyDataLoaderRegistrars(DataLoaderRegistry registry, GraphQLContext graphQLContext) { this.dat...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\execution\DefaultExecutionGraphQlService.java
1
请在Spring Boot框架中完成以下Java代码
public class HigherInsurance { protected long amount; @XmlElement(required = true) protected String currency; /** * Gets the value of the amount property. * */ public long getAmount() { return amount; } /** * Sets the value of the amount property. * ...
* * @return * possible object is * {@link String } * */ public String getCurrency() { return currency; } /** * Sets the value of the currency property. * * @param value * allowed object is * {@link String } * */...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\HigherInsurance.java
2
请完成以下Java代码
public int getMatured_Product_ID() { return get_ValueAsInt(COLUMNNAME_Matured_Product_ID); } @Override public void setMaturityAge (final int MaturityAge) { set_Value (COLUMNNAME_MaturityAge, MaturityAge); } @Override public int getMaturityAge() { return get_ValueAsInt(COLUMNNAME_MaturityAge); } @O...
return get_ValueAsInt(COLUMNNAME_M_Maturing_Configuration_ID); } @Override public void setM_Maturing_Configuration_Line_ID (final int M_Maturing_Configuration_Line_ID) { if (M_Maturing_Configuration_Line_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Maturing_Configuration_Line_ID, null); else set_ValueNoCheck...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Maturing_Configuration_Line.java
1
请完成以下Java代码
private final String applyConvertMap(String sqlStatement) { // Error Checks if (sqlStatement.toUpperCase().indexOf("EXCEPTION WHEN") != -1) { String error = "Exception clause needs to be converted: " + sqlStatement; log.info(error); m_conversionError = error; return sqlStatement; } // Carlos R...
*/ protected ConvertMap getConvertMap() { return null; } /** * Convert single Statements. * - remove comments * - process FUNCTION/TRIGGER/PROCEDURE * - process Statement * @param sqlStatement * @return converted statement */ protected abstract List<String> convertStatement (String s...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\dbPort\Convert.java
1
请完成以下Java代码
public static PackageableList ofCollection(final Collection<Packageable> list) { return !list.isEmpty() ? new PackageableList(list) : EMPTY; } public static PackageableList of(final Packageable... arr) { return ofCollection(ImmutableList.copyOf(arr)); } public static Collector<Packageable, ?, PackageableLis...
if (values.isEmpty()) { return Optional.empty(); } else if (values.size() == 1) { return Optional.of(values.get(0)); } else { //throw new AdempiereException("More than one value were extracted (" + values + ") from " + list); return Optional.empty(); } } public Stream<PackageableList> gro...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\picking\api\PackageableList.java
1
请完成以下Java代码
public void removeOrder(final UUID id) { validateState(); final OrderItem orderItem = getOrderItem(id); orderItems.remove(orderItem); price = price.subtract(orderItem.getPrice()); } private OrderItem getOrderItem(final UUID id) { return orderItems.stream() ....
} public List<OrderItem> getOrderItems() { return Collections.unmodifiableList(orderItems); } @Override public int hashCode() { return Objects.hash(id, orderItems, price, status); } @Override public boolean equals(Object obj) { if (this == obj) return t...
repos\tutorials-master\patterns-modules\ddd\src\main\java\com\baeldung\dddhexagonalspring\domain\Order.java
1
请完成以下Java代码
private void assertJUnitMode() { if (!Adempiere.isUnitTestMode()) { throw new AdempiereException("JUnit mode is not active!"); } } public synchronized void clear() { map.clear(); } public synchronized <T> void registerJUnitBean(@NonNull final T beanImpl) { assertJUnitMode(); @SuppressWarnings("...
} private static <T> T castBean(final Object beanImpl, final Class<T> ignoredBeanType) { @SuppressWarnings("unchecked") final T beanImplCasted = (T)beanImpl; return beanImplCasted; } public synchronized <T> ImmutableList<T> getBeansOfTypeOrNull(@NonNull final Class<T> beanType) { assertJUnitMode(); List...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\JUnitBeansMap.java
1
请完成以下Java代码
public class StoredHtmlSrc extends MultiPartElement implements Printable { private static final long serialVersionUID = 50303119083373138L; /** Logger */ protected static Logger log = LogManager.getLogger(StoredHtmlSrc.class.getName()); /** * Load html-src (text) stored in JAR, e.g. to load a style-...
log.warn("failed to load html-src: " + srcLocation); return; } InputStreamReader ins; try { ins = new InputStreamReader(url.openStream()); BufferedReader bufferedReader = new BufferedReader( ins ); String cssLine; String result=""; while ((cssLine = bufferedReader.readLine()) != null) re...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\util\StoredHtmlSrc.java
1
请完成以下Spring Boot application配置
server.port=8088 #### kafka\u914D\u7F6E\u751F\u4EA7\u8005 begin #### #============== kafka =================== # \u6307\u5B9Akafka server\u7684\u5730\u5740\uFF0C\u96C6\u7FA4\u914D\u591A\u4E2A\uFF0C\u4E2D\u95F4\uFF0C\u9017\u53F7\u9694\u5F00 spring.kafka.bootstrap-servers=127.0.0.1:9092 #=============== provider ======...
producer.value-serializer=org.apache.kafka.common.serialization.StringSerializer #### kafka\u914D\u7F6E\u751F\u4EA7\u8005 end #### #### kafka\u914D\u7F6E\u6D88\u8D39\u8005 start #### # \u6307\u5B9A\u9ED8\u8BA4\u6D88\u8D39\u8005group id --> \u7531\u4E8E\u5728kafka\u4E2D\uFF0C\u540C\u4E00\u7EC4\u4E2D\u7684consumer\u4E...
repos\springboot-demo-master\kafka\src\main\resources\application.properties
2
请完成以下Java代码
public final class JoseHeaderNames { /** * {@code alg} - the algorithm header identifies the cryptographic algorithm used to * secure a JWS or JWE */ public static final String ALG = "alg"; /** * {@code jku} - the JWK Set URL header is a URI that refers to a resource for a set * of JSON-encoded public ke...
* base64url-encoded SHA-256 thumbprint (a.k.a. digest) of the DER encoding of the * X.509 certificate corresponding to the key used to digitally sign a JWS or encrypt * a JWE */ public static final String X5T_S256 = "x5t#S256"; /** * {@code typ} - the type header is used by JWS/JWE applications to declare th...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JoseHeaderNames.java
1
请在Spring Boot框架中完成以下Java代码
public ListenableFuture<EdqsResponse> processRequest(TenantId tenantId, CustomerId customerId, EdqsRequest request) { var requestMsg = ToEdqsMsg.newBuilder() .setTenantIdMSB(tenantId.getId().getMostSignificantBits()) .setTenantIdLSB(tenantId.getId().getLeastSignificantBits()) ...
return Futures.transform(resultFuture, msg -> { TransportProtos.EdqsResponseMsg responseMsg = msg.getValue().getResponseMsg(); return JacksonUtil.fromString(responseMsg.getValue(), EdqsResponse.class); }, MoreExecutors.directExecutor()); } @Override public boolean isSupporte...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\edqs\DefaultEdqsApiService.java
2
请完成以下Java代码
public static HuPackingInstructionsId ofRepoId(final int repoId) { if (repoId == TEMPLATE.repoId) { return TEMPLATE; } else if (repoId == VIRTUAL.repoId) { return VIRTUAL; } else { return new HuPackingInstructionsId(repoId); } } @Nullable public static HuPackingInstructionsId ofRepoIdOrN...
public static boolean isTemplateRepoId(final int repoId) { return repoId == TEMPLATE.repoId; } public boolean isVirtual() { return isVirtualRepoId(repoId); } public static boolean isVirtualRepoId(final int repoId) { return repoId == VIRTUAL.repoId; } public boolean isRealPackingInstructions() { re...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\handlingunits\HuPackingInstructionsId.java
1
请完成以下Java代码
public void setC_Queue_Processor_ID (int C_Queue_Processor_ID) { if (C_Queue_Processor_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Queue_Processor_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Queue_Processor_ID, Integer.valueOf(C_Queue_Processor_ID)); } /** Get Queue Processor Definition. @return Queue P...
{ Integer ii = (Integer)get_Value(COLUMNNAME_PoolSize); if (ii == null) return 0; return ii.intValue(); } /** * Priority AD_Reference_ID=154 * Reference name: _PriorityRule */ public static final int PRIORITY_AD_Reference_ID=154; /** High = 3 */ public static final String PRIORITY_High = "3"; /*...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Queue_Processor.java
1
请完成以下Java代码
public Integer substractBinaryNumber(Integer firstNum, Integer secondNum) { int onesComplement = Integer.valueOf(getOnesComplement(secondNum)); StringBuilder output = new StringBuilder(); int carry = 0; int temp; while (firstNum != 0 || onesComplement != 0) { temp ...
StringBuilder onesComplement = new StringBuilder(); while (num > 0) { int lastDigit = num % 10; if (lastDigit == 0) { onesComplement.append(1); } else { onesComplement.append(0); } num = num / 10; } retur...
repos\tutorials-master\core-java-modules\core-java-numbers-2\src\main\java\com\baeldung\binarynumbers\BinaryNumbers.java
1
请完成以下Java代码
private static OrgId getOrgId(final Login loginService, final UserId userId, final RoleId roleId, final ClientId clientId) { final Set<OrgId> orgIds = loginService.getAvailableOrgs(roleId, userId, clientId); final OrgId orgId; if (orgIds == null || orgIds.isEmpty()) { throw new AdempiereException("User is n...
{ if (role.isSystem()) { continue; } nonSysAdminRoles.add(role); } if (nonSysAdminRoles.size() == 1) { return nonSysAdminRoles.get(0); } else { throw new AdempiereException("Multiple roles are not supported. Make sure user has only one role assigned"); } } } @Non...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\authentication\AuthenticationRestController.java
1
请完成以下Java代码
private WFProcessHeaderProperties getAdditionalHeaderProperties( @NonNull final PickingJobLine line, @NonNull final PickingJobOptions options, @NonNull final HUCache huCache, @NonNull final JsonOpts opts) { final WFProcessHeaderProperties.WFProcessHeaderPropertiesBuilder builder = WFProcessHeaderProperti...
.filter(Optional::isPresent) .map(Optional::get) .collect(ImmutableSet.toImmutableSet()); cache.cacheHUs(huService.getByIds(huIds)); } @Value @Builder private static class HUCache { public static HUCache init(@NonNull Function<HuId, I_M_HU> loadHU) { return HUCache.builder() .loadHU(loadHU)...
repos\metasfresh-new_dawn_uat\backend\de.metas.picking.rest-api\src\main\java\de\metas\picking\workflow\handlers\activity_handlers\ActualPickingWFActivityHandler.java
1
请完成以下Java代码
public void setText (String mnemonicLabel) { String text = createMnemonic (mnemonicLabel); super.setText (text); if (text != null && getName() == null) setName(text); //workaround for focus accelerator issue if (getLabelFor() != null && getLabelFor() instanceof JTextComponent) { if ( m_savedMnemonic ...
((JTextComponent)getLabelFor()).setFocusAccelerator('\0'); } super.setLabelFor(c); if (c.getName() == null) c.setName(getName()); //workaround for focus accelerator issue if (c instanceof JTextComponent) { if (m_savedMnemonic > 0) { ((JTextComponent)c).setFocusAccelerator(m_savedMnemonic); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CLabel.java
1
请在Spring Boot框架中完成以下Java代码
public class UserController { @Autowired UserService userService; // 用户服务层 /** * 获取用户列表 * 处理 "/users" 的 GET 请求,用来获取用户列表 * 通过 @RequestParam 传递参数,进一步实现条件查询或者分页查询 */ @RequestMapping(method = RequestMethod.GET) public String getUserList(ModelMap map) { map.a...
public String getUser(@PathVariable Long id, ModelMap map) { map.addAttribute("user", userService.findById(id)); map.addAttribute("action", "update"); return "userForm"; } /** * 处理 "/users/{id}" 的 PUT 请求,用来更新 User 信息 * */ @RequestMapping(value = "/update", method = Re...
repos\springboot-learning-example-master\chapter-4-spring-boot-validating-form-input\src\main\java\spring\boot\core\web\UserController.java
2
请完成以下Java代码
public class KafkaBackoffException extends KafkaException { private static final long serialVersionUID = 1L; private final String listenerId; private final TopicPartition topicPartition; private final long dueTimestamp; /** * Constructor with data from the BackOff event. * * @param message the error mes...
public KafkaBackoffException(String message, TopicPartition topicPartition, String listenerId, long dueTimestamp) { super(message); this.listenerId = listenerId; this.topicPartition = topicPartition; this.dueTimestamp = dueTimestamp; } public String getListenerId() { return this.listenerId; } public Top...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\KafkaBackoffException.java
1
请在Spring Boot框架中完成以下Java代码
public class OrderUpdateReq extends AbsReq { /** 订单id(必填项) */ private String id; /** 订单状态 {@link com.gaoxi.enumeration.order.OrderStateEnum} */ private Integer orderStateCode; /** 物流单号 */ private String expressNo; /** 支付方式 {@link com.gaoxi.enumeration.order.PayModeEnum} */ private In...
this.payModeCode = payModeCode; } public String getTotalPrice() { return totalPrice; } public void setTotalPrice(String totalPrice) { this.totalPrice = totalPrice; } @Override public String toString() { return "OrderUpdateReq{" + "id='" + id + '\'' ...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\order\OrderUpdateReq.java
2
请完成以下Java代码
private void publishRefreshEvent(List<Signal<Route>> signals) { cache.put(CACHE_KEY, signals); Objects.requireNonNull(applicationEventPublisher, "ApplicationEventPublisher is required"); applicationEventPublisher.publishEvent(new RefreshRoutesResultEvent(this)); } private Flux<Route> getNonScopedRoutes(Refresh...
Objects.requireNonNull(applicationEventPublisher, "ApplicationEventPublisher is required"); applicationEventPublisher.publishEvent(new RefreshRoutesResultEvent(this, throwable)); } @Override public int getOrder() { return 0; } @Override public void setApplicationEventPublisher(ApplicationEventPublisher appl...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\route\CachingRouteLocator.java
1
请完成以下Java代码
public void setAD_User_Attribute_ID (final int AD_User_Attribute_ID) { if (AD_User_Attribute_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_User_Attribute_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_User_Attribute_ID, AD_User_Attribute_ID); } @Override public int getAD_User_Attribute_ID() { return get...
public static final String ATTRIBUTE_Delegate = "D"; /** Politician = P */ public static final String ATTRIBUTE_Politician = "P"; /** Rechtsberater = R */ public static final String ATTRIBUTE_Rechtsberater = "R"; /** Schätzer = S */ public static final String ATTRIBUTE_Schaetzer = "S"; /** Vorstand = V */ publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_Attribute.java
1
请完成以下Java代码
public class ADFormADValidator extends AbstractADValidator<I_AD_Form> { @Override public void validate(@NonNull final I_AD_Form form) { // In case of forms, this field may be empty if (Check.isBlank(form.getClassname())) { return; } Util.validateJavaClassname(form.getClassname(), null); } @Override ...
message.append("Error on ").append(form).append(" (IsActive=").append(form.isActive()).append("): "); } catch (final Exception e) { message.append("Error (InterfaceWrapperHelper exception: ").append(e.getLocalizedMessage()).append(") on ").append(violation.getItem()).append(": "); } message.append(violati...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\appdict\validation\spi\impl\ADFormADValidator.java
1
请完成以下Java代码
public OrgId getOrgIdByLocatorRepoId(final int locatorId) { return warehouseDAO.retrieveOrgIdByLocatorId(locatorId); } @Override @NonNull public ImmutableSet<LocatorId> getLocatorIdsOfTheSamePickingGroup(@NonNull final WarehouseId warehouseId) { final Set<WarehouseId> pickFromWarehouseIds = warehouseDAO.getW...
{ return ExplainedOptional.emptyBecause(DBMoreThanOneRecordsFoundException.MSG_QueryMoreThanOneRecordsFound); } else { final I_M_Locator locator = locators.get(0); return ExplainedOptional.of(LocatorQRCode.ofLocator(locator)); } } @Override public List<I_M_Locator> getActiveLocatorsByValue(final @N...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\warehouse\api\impl\WarehouseBL.java
1
请在Spring Boot框架中完成以下Java代码
public class ApiKeyDataValidator extends DataValidator<ApiKey> { private final ApiKeyDao apiKeyDao; private final TenantService tenantService; private final UserService userService; @Override protected void validateDataImpl(TenantId tenantId, ApiKey apiKey) { if (apiKey.getId() != null) { ...
throw new DataValidationException("API key should be assigned to user!"); } if (userService.findUserById(apiKey.getTenantId(), apiKey.getUserId()) == null) { throw new DataValidationException("API key reference a non-existent user!"); } } @Override protected ApiKey valid...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\service\validator\ApiKeyDataValidator.java
2
请完成以下Java代码
public Optional<Money> getProfitMinBasePrice(@NonNull final Collection<OrderAndLineId> orderAndLineIds) { if (orderAndLineIds.isEmpty()) { return Optional.empty(); } final ImmutableSet<Money> profitBasePrices = ordersRepo.getOrderLinesByIds(orderAndLineIds, I_C_OrderLine.class) .stream() .map(this:...
{ return Optional.empty(); } else { return profitBasePrices.stream().reduce(Money::min); } } private Money getProfitBasePrice(@NonNull final I_C_OrderLine orderLineRecord) { final CurrencyId currencyId = CurrencyId.ofRepoId(orderLineRecord.getC_Currency_ID()); return Money.of(orderLineRecord.getPr...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\grossprofit\OrderLineWithGrossProfitPriceRepository.java
1
请完成以下Java代码
public String getId() { return id; } @Override public I_M_HU getM_HU() { if (huItem == null) { return null; } return huItem.getM_HU(); } @Override public I_M_HU getVHU() { if (vhuItem == null) { return null; } return vhuItem.getM_HU(); } private I_M_HU getEffectiveHU() { final I...
} } @Override public void pair(final IHUTransactionCandidate counterpartTrx) { Check.errorUnless(counterpartTrx instanceof HUTransactionCandidate, "Param counterPartTrx needs to be a HUTransaction counterPartTrx={}", counterpartTrx); this.setCounterpart(counterpartTrx); // by casting to HUTransacti...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\hutransaction\impl\HUTransactionCandidate.java
1
请完成以下Java代码
public String toString() { // NOTE: we are making it translatable friendly because it's displayed in Preferences->Info->Role final int queryRecordsPerRole = getMaxQueryRecordsPerRole(); final int confirmQueryRecords = getConfirmQueryRecords(); return "WindowMaxQueryRecords[" + "@MaxQueryRecords@: " + query...
{ return maxQueryRecordsPerRole; } /** * Gets the maximum allowed records to be presented to user, without asking him to confirm/refine the initial query. * * @return maximum allowed records to be presented to user, without asking him to confirm/refine the initial query; always returns greater than zero. ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\WindowMaxQueryRecordsConstraint.java
1
请在Spring Boot框架中完成以下Java代码
public boolean set(final String key, Object value) { boolean result = false; try { ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue(); operations.set(key, value); result = true; } catch (Exception e) { e.printStackTrace(...
*/ @Override public boolean set(final String key, Object value, Long expireTime) { boolean result = false; try { ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue(); operations.set(key, value); redisTemplate.expire(key, expireTime, T...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Redis\src\main\java\com\gaoxi\redis\service\RedisServiceImpl.java
2
请完成以下Java代码
public DmnDeploymentQuery createDeploymentQuery() { return new DmnDeploymentQueryImpl(commandExecutor); } @Override public NativeDmnDeploymentQuery createNativeDeploymentQuery() { return new NativeDmnDeploymentQueryImpl(commandExecutor); } @Override public DmnDecision getDecisi...
public InputStream getDmnResource(String decisionId) { return commandExecutor.execute(new GetDeploymentDmnResourceCmd(decisionId)); } @Override public void setDecisionCategory(String decisionId, String category) { commandExecutor.execute(new SetDecisionTableCategoryCmd(decisionId, category)...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\DmnRepositoryServiceImpl.java
1
请完成以下Java代码
public BatchEntity findBatchById(String id) { return getDbEntityManager().selectById(BatchEntity.class, id); } public long findBatchCountByQueryCriteria(BatchQueryImpl batchQuery) { configureQuery(batchQuery); return (Long) getDbEntityManager().selectOne("selectBatchCountByQueryCriteria", batchQuery); ...
Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("batchId", batchId); parameters.put("suspensionState", suspensionState.getStateCode()); ListQueryParameterObject queryParameter = new ListQueryParameterObject(); queryParameter.setParameter(parameters); getDbEntityManag...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\BatchManager.java
1
请完成以下Java代码
private Optional<BigDecimal> extractWeightInKg(@NonNull final I_M_Package mpackage) { if (InterfaceWrapperHelper.isNull(mpackage, I_M_Package.COLUMNNAME_PackageWeight)) { return Optional.empty(); } final BigDecimal weightInKg = kgPrecision.round(mpackage.getPackageWeight()); // we assume it's in Kg retur...
{ return PackageDimensions.builder() .lengthInCM(mpackage.getLengthInCm()) .widthInCM(mpackage.getWidthInCm()) .heightInCM(mpackage.getHeightInCm()) .build(); } private ShipperGatewayId getShipperGatewayId(final ShipperId shipperId) { return shipperDAO.getShipperGatewayId(shipperId).orElseThrow(...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\ShipperGatewayFacade.java
1
请完成以下Java代码
public void setBackground (Color bg) { if (bg.equals(getBackground())) return; super.setBackground(bg); } // setBackground /** * Set Font to Bold * @param bold true bold false normal */ public void setFontBold (boolean bold) { Font font = getFont(); if (bold != font.isBold()) { font = ne...
@Override public void setLabelFor (Component c) { //reset old if any if (getLabelFor() != null && getLabelFor() instanceof JTextComponent) { ((JTextComponent)getLabelFor()).setFocusAccelerator('\0'); } super.setLabelFor(c); if (c.getName() == null) c.setName(getName()); //workaround for focus acce...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CLabel.java
1
请完成以下Java代码
public Builder<T> include(final T itemToInclude) { Check.assumeNotNull(itemToInclude, "itemToInclude not null"); final boolean added = includes.add(itemToInclude); // Reset last built, in case of change if (added) { lastBuilt = null; } return this; } public Builder<T> exclude(final T i...
{ return this; } final boolean added = excludes.add(itemToExclude); // Reset last built, in case of change if (added) { lastBuilt = null; } return this; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\IncludeExcludeListPredicate.java
1
请完成以下Java代码
private static CertificateFactory x509CertificateFactory() { try { return CertificateFactory.getInstance("X.509"); } catch (CertificateException ex) { throw new IllegalArgumentException(ex); } } private static List<String> readAllLines(InputStream source) { BufferedReader reader = new BufferedReader(...
private final CertificateFactory certificateFactory; X509CertificateDecoder(CertificateFactory certificateFactory) { this.certificateFactory = certificateFactory; } @Override public @NonNull RSAPublicKey convert(List<String> lines) { StringBuilder base64Encoded = new StringBuilder(); for (String line...
repos\spring-security-main\core\src\main\java\org\springframework\security\converter\RsaKeyConverters.java
1
请完成以下Spring Boot application配置
spring: security: user: name: "user" password: "password" boot: admin: client: username: "user" #These two are needed so that the client password: "password" #can register at the protected server api instance: metadata: user.name:
"user" #These two are needed so that the server user.password: "password" #can access the protected client endpoints
repos\spring-boot-admin-master\spring-boot-admin-samples\spring-boot-admin-sample-eureka\src\main\resources\application-secure.yml
2
请在Spring Boot框架中完成以下Java代码
public class CasSecuredApplication { private static final Logger logger = LoggerFactory.getLogger(CasSecuredApplication.class); public static void main(String... args) { SpringApplication.run(CasSecuredApplication.class, args); } @Bean public CasAuthenticationFilter casAuthenticationFilt...
s -> new User("casuser", "Mellon", true, true, true, true, AuthorityUtils.createAuthorityList("ROLE_ADMIN"))); //For Authentication with a Database-backed UserDetailsService //provider.setUserDetailsService(getUser()); provider.setKey("CAS_PROVIDER_LOCALHOST_8900"); return prov...
repos\tutorials-master\security-modules\cas\cas-secured-app\src\main\java\com\baeldung\cassecuredapp\CasSecuredApplication.java
2
请完成以下Java代码
public MFColor setGradientStartPoint(final int startPoint) { if (!isGradient()) { return this; } return toBuilder().gradientStartPoint(startPoint).build(); } public MFColor setGradientRepeatDistance(final int repeatDistance) { if (!isGradient()) { return this; } return toBuilder().gradientR...
if (!isLine() || color == null) { return this; } return toBuilder().lineBackColor(color).build(); } public MFColor setLineWidth(final float width) { if (!isLine()) { return this; } return toBuilder().lineWidth(width).build(); } public MFColor setLineDistance(final int distance) { if (!isL...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\util\MFColor.java
1
请完成以下Java代码
public String toString() { return "PlainContextAware[" // +", ctx="+ctx // don't print it... it's fucking too big + ", trxName=" + trxName + "]"; } @Override public int hashCode() { return new HashcodeBuilder() .append(ctx) .append(trxName) .toHashcode(); } @Override public boolean...
} @Override public Properties getCtx() { return ctx; } @Override public String getTrxName() { return trxName; } @Override public boolean isAllowThreadInherited() { return allowThreadInherited; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\model\PlainContextAware.java
1
请完成以下Java代码
public void add(String key) { tfDictionary.add(key); } public List<String> extractSuffixExtended(int length, int size) { return extractSuffix(length, size, true); } /** * 提取公共后缀 * @param length 公共后缀长度 * @param size 频率最高的前多少个公共后缀 * @param extend 长度是否拓展为从1到len...
{ List<Term> termList = StandardTokenizer.segment(key); if (termList.size() > length) { suffixTreeSet.add(combine(termList.subList(termList.size() - length, termList.size()))); if (extend) { for (int l = 1; l < lengt...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\CommonSuffixExtractor.java
1
请完成以下Java代码
public void setRemittanceAmt (final BigDecimal RemittanceAmt) { set_Value (COLUMNNAME_RemittanceAmt, RemittanceAmt); } @Override public BigDecimal getRemittanceAmt() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_RemittanceAmt); return bd != null ? bd : BigDecimal.ZERO; } @Override public voi...
} @Override public void setServiceFeeVatRate (final @Nullable BigDecimal ServiceFeeVatRate) { set_Value (COLUMNNAME_ServiceFeeVatRate, ServiceFeeVatRate); } @Override public BigDecimal getServiceFeeVatRate() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_ServiceFeeVatRate); return bd != null ?...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_RemittanceAdvice_Line.java
1
请完成以下Java代码
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 ID/ColumnName pair */ public KeyNam...
/** Get Period Type. @return Period Type */ public String getPeriodType () { return (String)get_Value(COLUMNNAME_PeriodType); } /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Period.java
1
请完成以下Java代码
public int getCollectedErrorsCount() { return errors.size(); } public void setCurrentWindow(@NonNull final AdWindowId windowId) { setCurrentWindow(windowId, null); } public void setCurrentWindow(@NonNull final DocumentEntityDescriptor entityDescriptor) { setCurrentWindow(entityDescriptor.getWindowId().to...
public void collectError(@NonNull final String errorMessage) { errors.add(JsonWindowsHealthCheckResponse.Entry.builder() .windowId(WindowId.of(currentWindowId)) .windowName(getCurrentWindowName()) .errorMessage(errorMessage) .build()); } public void collectError(@NonNull final Throwable exception)...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\health\ErrorsCollector.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() {
return email; } public void setEmail(String email) { this.email = email; } public String getDepartment() { return department; } public void setDepartment(String department) { this.department = department; } }
repos\tutorials-master\spring-core-4\src\main\java\com\baeldung\parametrizedtypereference\User.java
1
请完成以下Java代码
public class JsonObjectRestVariableConverter implements RestVariableConverter { protected ObjectMapper objectMapper; public JsonObjectRestVariableConverter(ObjectMapper objectMapper) { this.objectMapper = objectMapper; } @Override public String getRestTypeName() { return "...
return result.getValue(); } } return null; } @Override public void convertVariableValue(Object variableValue, EngineRestVariable result) { if (variableValue != null) { if (!(variableValue instanceof JsonNode)) { throw new FlowableIllegalArgume...
repos\flowable-engine-main\modules\flowable-common-rest\src\main\java\org\flowable\common\rest\variable\JsonObjectRestVariableConverter.java
1
请完成以下Java代码
public void setSource(DmnElement source) { sourceRef.setReferenceTargetElement(this, source); } public DmnElement getTarget() { return targetRef.getReferenceTargetElement(this); } public void setTarget(DmnElement target) { targetRef.setReferenceTargetElement(this, target); } public static voi...
.build(); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); sourceRef = sequenceBuilder.element(SourceRef.class) .required() .uriElementReference(DmnElement.class) .build(); targetRef = sequenceBuilder.element(TargetRef.class) .required() .uriElementReference(DmnElem...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\AssociationImpl.java
1
请完成以下Java代码
public CostPrice addToOwnCostPrice(@NonNull final CostAmount ownCostPriceToAdd) { if (ownCostPriceToAdd.isZero()) { return this; } return withOwnCostPrice(getOwnCostPrice().add(ownCostPriceToAdd)); } public CostPrice withOwnCostPrice(final CostAmount ownCostPrice) { return toBuilder().ownCostPrice(ow...
public CostAmount multiply(@NonNull final Quantity quantity) { if (!UomId.equals(uomId, quantity.getUomId())) { throw new AdempiereException("UOM does not match: " + this + ", " + quantity); } return toCostAmount().multiply(quantity); } public CostAmount multiply( @NonNull final Duration duration, ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\CostPrice.java
1
请完成以下Java代码
public String getState() { return state; } public void setState(String state) { this.state = state; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public String getRootProcessInstanceId() { return ...
public String toString() { return this.getClass().getSimpleName() + "[id=" + id + ", processDefinitionKey=" + processDefinitionKey + ", processDefinitionId=" + processDefinitionId + ", rootProcessInstanceId=" + rootProcessInstanceId + ", removalTime=" + removalTime + ", processIn...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricVariableInstanceEntity.java
1
请完成以下Java代码
public class FailedDeserializationInfo { private final String topic; private final @Nullable Headers headers; private final byte[] data; private final boolean isForKey; private final Exception exception; /** * Construct an instance with the contextual information. * @param topic topic associated with...
return this.topic; } public @Nullable Headers getHeaders() { return this.headers; } public byte[] getData() { return Arrays.copyOf(this.data, this.data.length); } public boolean isForKey() { return this.isForKey; } public Exception getException() { return this.exception; } @Override public Strin...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\FailedDeserializationInfo.java
1
请在Spring Boot框架中完成以下Java代码
public class JobConfiguration { private final static Logger LOGGER = Logger.getLogger(JobConfiguration.class.getName()); @Autowired private PlatformTransactionManager transactionManager; @Autowired private JobRepository jobRepository; @Bean public Job job1(Step step1, Step step2) { ...
}) .build(); } @Bean public Job job2(Step job2step1) { return new JobBuilder("job2", jobRepository).incrementer(new RunIdIncrementer()) .start(job2step1) .build(); } @Bean public Step job2step1() { return new StepBuilder("job2step1", jobRepos...
repos\tutorials-master\spring-cloud-modules\spring-cloud-task\springcloudtaskbatch\src\main\java\com\baeldung\task\JobConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public class AppDictionaryBL implements IAppDictionaryBL { // private final Logger log = CLogMgt.getLogger(getClass()); @Override public MTable getReferencedTable(Properties ctx, String tableName, String columnName) { final MTable table = MTable.get(ctx, tableName); return getReferencedTable(table, columnName...
String tableName = DisplayType.getTableName(dt); if (tableName != null) { return MTable.get(ctx, tableName); } // TableDir if (dt == DisplayType.TableDir || (dt == DisplayType.Search && referenceId <= 0)) { tableName = MQuery.getZoomTableName(columnName); return MTable.get(ctx, tableName); } //...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\service\AppDictionaryBL.java
2
请完成以下Java代码
public void setDescription (final @Nullable String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } @Override public void setExternalSystem_Outbound_Endpoint_ID (final int ExternalSystem_Outbou...
} /** * Type AD_Reference_ID=542016 * Reference name: ExternalSystem_Outbound_Endpoint_EndpointType */ public static final int TYPE_AD_Reference_ID=542016; /** HTTP = HTTP */ public static final String TYPE_HTTP = "HTTP"; /** SFTP = SFTP */ public static final String TYPE_SFTP = "SFTP"; /** FILE = FILE *...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Outbound_Endpoint.java
1
请完成以下Java代码
public void setRecord_ID (final int Record_ID) { if (Record_ID < 0) set_ValueNoCheck (COLUMNNAME_Record_ID, null); else set_ValueNoCheck (COLUMNNAME_Record_ID, Record_ID); } @Override public int getRecord_ID() { return get_ValueAsInt(COLUMNNAME_Record_ID); } /** * Status AD_Reference_ID=54201...
public static final String STATUS_Email_Failure = "Email_Failure"; @Override public void setStatus (final @Nullable java.lang.String Status) { set_ValueNoCheck (COLUMNNAME_Status, Status); } @Override public java.lang.String getStatus() { return get_ValueAsString(COLUMNNAME_Status); } @Override public ...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java-gen\de\metas\document\archive\model\X_C_Doc_Outbound_Log_Line.java
1
请在Spring Boot框架中完成以下Java代码
public class MilestoneRepository { private final IQueryBL queryBL = Services.get(IQueryBL.class); public void save(@NonNull final Milestone milestone) { final I_S_Milestone record = InterfaceWrapperHelper.loadOrNew(milestone.getMilestoneId(), I_S_Milestone.class); if (milestone.getDueDate() != null) { rec...
InterfaceWrapperHelper.saveRecord(record); milestone.setMilestoneId(MilestoneId.ofRepoId(record.getS_Milestone_ID())); } public boolean exists(@NonNull final MilestoneId milestoneId) { return queryBL .createQueryBuilder(I_S_Milestone.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_S_Milesto...
repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\milestone\MilestoneRepository.java
2
请在Spring Boot框架中完成以下Java代码
public class SecurityFilterProperties { /** * Order applied to the {@code SecurityFilterChain} that is used to configure basic * authentication for application endpoints. Create your own * {@code SecurityFilterChain} if you want to add your own authentication for all or * some of those endpoints. */ public...
} public void setOrder(int order) { this.order = order; } public Set<DispatcherType> getDispatcherTypes() { return this.dispatcherTypes; } public void setDispatcherTypes(Set<DispatcherType> dispatcherTypes) { this.dispatcherTypes = dispatcherTypes; } }
repos\spring-boot-4.0.1\module\spring-boot-security\src\main\java\org\springframework\boot\security\autoconfigure\web\servlet\SecurityFilterProperties.java
2
请在Spring Boot框架中完成以下Java代码
public String getWeight() { return weight; } public void setWeight(String weight) { this.weight = weight; } public CategoryEntity getTopCateEntity() { return topCateEntity; } public void setTopCateEntity(CategoryEntity topCateEntity) { this.topCateEntity = topC...
} public UserEntity getCompanyEntity() { return companyEntity; } public void setCompanyEntity(UserEntity companyEntity) { this.companyEntity = companyEntity; } public int getSales() { return sales; } public void setSales(int sales) { this.sales = sales; ...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\product\ProductEntity.java
2
请完成以下Java代码
private LookupDataSource getLookupDataSource(@NonNull final String fieldName) { if (PricingConditionsRow.FIELDNAME_PaymentTerm.equals(fieldName)) { return paymentTermLookup; } else if (PricingConditionsRow.FIELDNAME_BasePriceType.equals(fieldName)) { return priceTypeLookup; } else if (PricingCondit...
{ return temporaryPriceConditionsColorCache.getOrLoad(0, this::retrieveTemporaryPriceConditionsColor); } private String retrieveTemporaryPriceConditionsColor() { final ColorId temporaryPriceConditionsColorId = Services.get(IOrderLinePricingConditions.class).getTemporaryPriceConditionsColorId(); return toHexSt...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\view\PricingConditionsRowLookups.java
1
请完成以下Java代码
public void dump(String projectId) { this.stringAtomicReference.set(projectId); } public AtomicReference<String> getStringAtomicReference() { return stringAtomicReference; } } @Bean IntegrationFlow inboundProcess(FlowableInboundGateway inboundGateway) { ...
CommandLineRunner init( final AnalysingService analysingService, final RuntimeService runtimeService) { return new CommandLineRunner() { @Override public void run(String... strings) throws Exception { String integrationGatewayProcess = "integratio...
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-samples\flowable-spring-boot-sample-integration\src\main\java\flowable\Application.java
1
请完成以下Java代码
public EntityView findByTenantIdAndExternalId(UUID tenantId, UUID externalId) { return DaoUtil.getData(entityViewRepository.findByTenantIdAndExternalId(tenantId, externalId)); } @Override public PageData<EntityView> findByTenantId(UUID tenantId, PageLink pageLink) { return findEntityViewsBy...
public PageData<EntityView> findAllByTenantId(TenantId tenantId, PageLink pageLink) { return findByTenantId(tenantId.getId(), pageLink); } @Override public List<EntityViewFields> findNextBatch(UUID id, int batchSize) { return entityViewRepository.findNextBatch(id, Limit.of(batchSize)); ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\entityview\JpaEntityViewDao.java
1
请完成以下Java代码
public class DDOrderDropToCommand { @NonNull private final ITrxManager trxManager = Services.get(ITrxManager.class); @NonNull private final DDOrderLowLevelDAO ddOrderLowLevelDAO; @NonNull private final DDOrderMoveScheduleRepository ddOrderMoveScheduleRepository; @NonNull private final PPOrderSourceHUService ppOrder...
// generate movement InTransit -> DropTo Locator final LocatorId dropToLocatorId = this.dropToLocatorId != null ? this.dropToLocatorId : schedule.getDropToLocatorId(); final MovementId dropToMovementId = createDropToMovement(schedule, dropToLocatorId); // // update the schedule schedule.markAsDroppedTo(dropT...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\movement\schedule\commands\drop_to\DDOrderDropToCommand.java
1
请在Spring Boot框架中完成以下Java代码
ConfigDataResourceNotFoundException withLocation(ConfigDataLocation location) { return new ConfigDataResourceNotFoundException(this.resource, location, getCause()); } private static String getMessage(ConfigDataResource resource, @Nullable ConfigDataLocation location) { return String.format("Config data %s cannot...
} /** * Throw a {@link ConfigDataNotFoundException} if the specified {@link Resource} does * not exist. * @param resource the config data resource * @param resourceToCheck the resource to check */ public static void throwIfDoesNotExist(ConfigDataResource resource, Resource resourceToCheck) { throwIfNot(r...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\ConfigDataResourceNotFoundException.java
2
请完成以下Java代码
public String toString() { return ObjectUtils.toString(this); } public int getAD_Reference_ID() { return adReferenceId; } public String getName() { return name; } public List<ListItemInfo> getItems() { return items; } public static class Builder { private Integer adReferenceId; private Stri...
return new ListInfo(this); } public Builder setAD_Reference_ID(final int adReferenceId) { this.adReferenceId = adReferenceId; return this; } public Builder setName(String name) { this.name = name; return this; } public Builder addItem(final String value, final String name, final String va...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\modelgen\ListInfo.java
1
请完成以下Java代码
public boolean isSOTrx () { Object oo = get_Value(COLUMNNAME_IsSOTrx); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Zeile Nr.. @param Line Unique line for this document */ @Override public void ...
public void setTaxAmt (java.math.BigDecimal TaxAmt) { set_ValueNoCheck (COLUMNNAME_TaxAmt, TaxAmt); } /** Get Steuerbetrag. @return Tax Amount for a document */ @Override public java.math.BigDecimal getTaxAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TaxAmt); if (bd == null) return En...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_TaxDeclarationLine.java
1
请完成以下Java代码
public static PaymentRule ofCode(@NonNull final String code) { final PaymentRule type = typesByCode.get(code); if (type == null) { throw new AdempiereException("No " + PaymentRule.class + " found for code: " + code); } return type; } @Nullable public static String toCodeOrNull(@Nullable final PaymentR...
return this == Cash; } public boolean isCheck() { return this == Check; } public boolean isOnCredit() {return OnCredit.equals(this);} public boolean isPayPal() {return PayPal.equals(this);} public boolean isSettlement() {return Settlement.equals(this);} public boolean isDirectDebit() { return this == Di...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\payment\PaymentRule.java
1
请完成以下Java代码
public static PhoneNumber fromString(@NonNull final String phoneNoAsStr) { final List<String> parts = Splitter.on("-").splitToList(phoneNoAsStr.trim()); if (parts.size() != 3) { throw new IllegalArgumentException("Invalid PhoneNo string: " + phoneNoAsStr); } String countryCode = parts.get(0); if (count...
{ Check.assumeNotEmpty(countryCode, "countryCode is not empty"); Check.assumeNotEmpty(areaCode, "areaCode is not empty"); Check.assumeNotEmpty(phoneNumber, "phoneNumber is not empty"); this.countryCode = countryCode.trim(); this.areaCode = areaCode.trim(); this.phoneNumber = phoneNumber.trim(); } @Overr...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.spi\src\main\java\de\metas\shipper\gateway\spi\model\PhoneNumber.java
1
请完成以下Java代码
public class ProcessCandidateStarterGroupImpl extends ProcessCandidateStarterImpl implements ProcessCandidateStarterGroup { private String groupId; public ProcessCandidateStarterGroupImpl() {} public ProcessCandidateStarterGroupImpl(String processDefinitionId, String groupId) { super(proc...
return ( Objects.equals(groupId, that.groupId) && Objects.equals(getProcessDefinitionId(), that.getProcessDefinitionId()) ); } @Override public int hashCode() { return Objects.hash(getProcessDefinitionId(), groupId); } @Override public String getGroupId(...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\ProcessCandidateStarterGroupImpl.java
1
请完成以下Java代码
public class PmsCommentReplay implements Serializable { private Long id; private Long commentId; private String memberNickName; private String memberIcon; private String content; private Date createTime; @ApiModelProperty(value = "评论人员类型;0->会员;1->管理员") private Integer type; pr...
return content; } public void setContent(String content) { this.content = content; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Integer getType() { return type;...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsCommentReplay.java
1
请完成以下Java代码
public int getM_ChangeNotice_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_ChangeNotice_ID); if (ii == null) return 0; return ii.intValue(); } public I_M_Product getM_ProductBOM() throws RuntimeException { return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name) .getPO(getM_Produc...
set_Value (COLUMNNAME_M_ProductOperation_ID, Integer.valueOf(M_ProductOperation_ID)); } /** Get Product Operation. @return Product Manufacturing Operation */ public int getM_ProductOperation_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_ProductOperation_ID); if (ii == null) return 0; return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_BOMProduct.java
1
请在Spring Boot框架中完成以下Java代码
public List<String> getTerminatePlanItemDefinitionIds() { return terminatePlanItemDefinitionIds; } @ApiModelProperty(value = "plan item definition ids to be terminated") public void setTerminatePlanItemDefinitionIds(List<String> terminatePlanItemDefinitionIds) { this.terminatePlanItemDefini...
public Map<String, String> getChangePlanItemIdsWithDefinitionId() { return changePlanItemIdsWithDefinitionId; } @ApiModelProperty(value = "map an existing plan item id to new plan item id with the plan item definition id, this should not be necessary in general, but could be needed when plan item ids c...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\caze\ChangePlanItemStateRequest.java
2
请完成以下Java代码
public class CompensateEventDefinitionParseHandler extends AbstractBpmnParseHandler<CompensateEventDefinition> { private static final Logger LOGGER = LoggerFactory.getLogger(CompensateEventDefinitionParseHandler.class); @Override public Class<? extends BaseElement> getHandledType() { return Compen...
BoundaryEvent boundaryEvent = (BoundaryEvent) bpmnParse.getCurrentFlowElement(); boolean interrupting = boundaryEvent.isCancelActivity(); activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createBoundaryEventActivityBehavior(boundaryEvent, interrupting, activity)); ...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\handler\CompensateEventDefinitionParseHandler.java
1
请完成以下Java代码
public GenericEventListenerInstanceQuery elementId(String elementId) { innerQuery.planItemInstanceElementId(elementId); return this; } @Override public GenericEventListenerInstanceQuery planItemDefinitionId(String planItemDefinitionId) { innerQuery.planItemDefinitionId(planItemDefin...
@Override public GenericEventListenerInstanceQuery desc() { innerQuery.desc(); return this; } @Override public GenericEventListenerInstanceQuery orderBy(QueryProperty property) { innerQuery.orderBy(property); return this; } @Override public GenericEventListe...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\GenericEventListenerInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public ConfigureAction getConfigureAction() { return this.configureAction; } public void setConfigureAction(ConfigureAction configureAction) { this.configureAction = configureAction; } public RepositoryType getRepositoryType() { return this.repositoryType; } public void setRepositoryType(RepositoryType r...
} /** * Type of Redis session repository to auto-configure. */ public enum RepositoryType { /** * Auto-configure a RedisSessionRepository or ReactiveRedisSessionRepository. */ DEFAULT, /** * Auto-configure a RedisIndexedSessionRepository or * ReactiveRedisIndexedSessionRepository. */ IND...
repos\spring-boot-4.0.1\module\spring-boot-session-data-redis\src\main\java\org\springframework\boot\session\data\redis\autoconfigure\SessionDataRedisProperties.java
2