instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class BankStatementLineReference { @NonNull BankStatementAndLineAndRefId id; OrgId orgId; int lineNo; @NonNull BPartnerId bpartnerId; @NonNull PaymentId paymentId; @Nullable InvoiceId invoiceId;
@NonNull Money trxAmt; public BankStatementId getBankStatementId() { return getId().getBankStatementId(); } public BankStatementLineId getBankStatementLineId() { return getId().getBankStatementLineId(); } public BankStatementLineRefId getBankStatementLineRefId() { return getId().getBankStatementLineRe...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\BankStatementLineReference.java
2
请完成以下Java代码
public DirContextOperations searchForUser(String username) { logger.trace(LogMessage.of(() -> "Searching for user '" + username + "', with " + this)); SpringSecurityLdapTemplate template = new SpringSecurityLdapTemplate(this.contextSource); template.setSearchControls(this.searchControls); try { DirContextOpe...
/** * The time to wait before the search fails; the default is zero, meaning forever. * @param searchTimeLimit the time limit for the search (in milliseconds). */ public void setSearchTimeLimit(int searchTimeLimit) { this.searchControls.setTimeLimit(searchTimeLimit); } /** * Specifies the attributes that ...
repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\search\FilterBasedLdapUserSearch.java
1
请完成以下Java代码
public RawMaterialsIssueLine withSteps(final ImmutableList<RawMaterialsIssueStep> stepsNew) { return !Objects.equals(this.steps, stepsNew) ? toBuilder().steps(stepsNew).build() : this; } public boolean containsRawMaterialsIssueStep(final PPOrderIssueScheduleId issueScheduleId) { return steps.stream().a...
} @NonNull public Quantity getQtyLeftToIssue() { return qtyToIssue.subtract(qtyIssued); } public boolean isAllowManualIssue() { return !issueMethod.isIssueOnlyForReceived(); } public boolean isIssueOnlyForReceived() {return issueMethod.isIssueOnlyForReceived();} }
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\model\RawMaterialsIssueLine.java
1
请在Spring Boot框架中完成以下Java代码
public class ColumnConverter implements ColumnConverterReactive { private final ConversionService conversionService; private final R2dbcCustomConversions conversions; public ColumnConverter(R2dbcCustomConversions conversions, R2dbcConverter r2dbcConverter) { this.conversionService = r2dbcConverter...
return (T) Enum.valueOf((Class<Enum>) target, value.toString()); } return conversionService.convert(value, target); } /** * Convert a value from the {@link Row} to a type - throws an exception, if it's impossible. * @param row which contains the column values. * @param target cl...
repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\repository\rowmapper\ColumnConverter.java
2
请在Spring Boot框架中完成以下Java代码
public String getFormKey() { return formKey; } public void setFormKey(String formKey) { this.formKey = formKey; } @ApiModelProperty(example = "2") public String getDeploymentId() { return deploymentId; } public void setDeploymentId(String deploymentId) { th...
public String getTaskId() { return taskId; } public void setTaskId(String taskId) { this.taskId = taskId; } @ApiModelProperty(example = "http://localhost:8182/runtime/task/6") public String getTaskUrl() { return taskUrl; } public void setTaskUrl(String taskUrl) { ...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\form\FormDataResponse.java
2
请完成以下Java代码
public PageData<AlarmCommentInfo> findAlarmComments(TenantId tenantId, AlarmId alarmId, PageLink pageLink) { log.trace("Executing findAlarmComments by alarmId [{}]", alarmId); return alarmCommentDao.findAlarmComments(tenantId, alarmId, pageLink); } @Override public ListenableFuture<AlarmCom...
private AlarmComment updateAlarmComment(TenantId tenantId, AlarmComment newAlarmComment) { log.debug("Update Alarm comment : {}", newAlarmComment); AlarmComment existing = alarmCommentDao.findAlarmCommentById(tenantId, newAlarmComment.getId().getId()); if (existing != null) { if (ne...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\alarm\BaseAlarmCommentService.java
1
请完成以下Java代码
public void updatePOReferenceOnSalesOrder(@NonNull final I_C_OLCand olCand) { final IQueryBuilder<I_C_Order> updateOrdersQuery = queryBL .createQueryBuilder(I_C_Order_Line_Alloc.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_C_Order_Line_Alloc.COLUMN_C_OLCand_ID, olCand.getC_OLCand_ID()) .an...
I_C_OLCand.COLUMNNAME_C_BPartner_ID }) public void validateSalesRep(final I_C_OLCand cand) { final BPartnerId bPartnerId = BPartnerId.ofRepoId(CoalesceUtil.firstGreaterThanZero(cand.getBill_BPartner_ID(), cand.getC_BPartner_ID())); final BPartnerId salesRepId = BPartnerId.ofRepoIdOrNull(cand.getC_BPartner_SalesRe...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\modelvalidator\C_OLCand.java
1
请完成以下Java代码
private List<PackageLabels> createDeliveryPackageLabels(final Label goLabels) { return goLabels.getSendung() .stream() .map(goPackageLabels -> createPackageLabels(goPackageLabels)) .collect(ImmutableList.toImmutableList()); } private PackageLabels createPackageLabels(final Label.Sendung goPackageLabel...
.build()) .label(PackageLabel.builder() .type(GOPackageLabelType.DIN_A6_ROUTER_LABEL_ZEBRA) .fileName(GOPackageLabelType.DIN_A6_ROUTER_LABEL_ZEBRA.toString()) .contentType(PackageLabel.CONTENTTYPE_PDF) .labelData(pdfs.getRouterlabelZebra()) .build()) .build(); } @Override publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java\de\metas\shipper\gateway\go\GOClient.java
1
请在Spring Boot框架中完成以下Java代码
public class Tag { @GeneratedValue(strategy = IDENTITY) @Id private Long id; @Column(name = "value", unique = true, nullable = false) private String value; public Tag(String value) { this.value = value; } protected Tag() { } @Override public String toString() {
return value; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; var tag = (Tag) o; return value.equals(tag.value); } @Override public int hashCode() { return Objects.hash(...
repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\article\tag\Tag.java
2
请完成以下Java代码
class MatchResult { private final boolean match; private final @Nullable Map<String, Object> variables; private MatchResult(boolean match, @Nullable Map<String, Object> variables) { this.match = match; this.variables = variables; } public boolean isMatch() { return this.match; } /** * Get...
return match(Collections.emptyMap()); } /** * * Creates an instance of {@link MatchResult} that is a match with the specified * variables * @param variables * @return */ public static Mono<MatchResult> match(Map<String, ? extends Object> variables) { MatchResult result = new MatchResult(true...
repos\spring-security-main\rsocket\src\main\java\org\springframework\security\rsocket\util\matcher\PayloadExchangeMatcher.java
1
请完成以下Java代码
public void setProduct (String Product) { set_Value (COLUMNNAME_Product, Product); } /** Get Product. @return Product */ public String getProduct () { return (String)get_Value(COLUMNNAME_Product); } /** Set Quantity. @param Qty Quantity */ public void setQty (BigDecimal Qty) { set_Value (C...
public int getW_Basket_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_W_Basket_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Basket Line. @param W_BasketLine_ID Web Basket Line */ public void setW_BasketLine_ID (int W_BasketLine_ID) { if (W_BasketLine_ID < 1) set_Valu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_BasketLine.java
1
请完成以下Java代码
public class X_M_PromotionGroup extends PO implements I_M_PromotionGroup, I_Persistent { /** * */ private static final long serialVersionUID = 20090915L; /** Standard Constructor */ public X_M_PromotionGroup (Properties ctx, int M_PromotionGroup_ID, String trxName) { super (ctx, M_PromotionGr...
/** Get Description. @return Optional short description of the record */ public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set Promotion Group. @param M_PromotionGroup_ID Promotion Group */ public void setM_PromotionGroup_ID (int M_PromotionGroup_ID) { if (M_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionGroup.java
1
请在Spring Boot框架中完成以下Java代码
public PageData<NotificationRuleInfo> getNotificationRules(@Parameter(description = PAGE_SIZE_DESCRIPTION, required = true) @RequestParam int pageSize, @Parameter(description = PAGE_NUMBER_DESCR...
@ApiOperation(value = "Delete notification rule (deleteNotificationRule)", notes = "Deletes notification rule by id.\n" + "Cancels all related scheduled notification requests (e.g. due to escalation table)" + SYSTEM_OR_TENANT_AUTHORITY_PARAGRAPH) @DeleteMapping("/...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\controller\NotificationRuleController.java
2
请完成以下Java代码
public void checkDeleteTaskMetrics() { } @Override public void checkReadSchemaLog() { } // helper ////////////////////////////////////////////////// protected TenantManager getTenantManager() { return Context.getCommandContext().getTenantManager(); } protected ProcessDefinitionEntity findLatestP...
} protected DecisionDefinitionEntity findLatestDecisionDefinitionById(String decisionDefinitionId) { return Context.getCommandContext().getDecisionDefinitionManager().findDecisionDefinitionById(decisionDefinitionId); } protected ExecutionEntity findExecutionById(String processInstanceId) { return Contex...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\multitenancy\TenantCommandChecker.java
1
请完成以下Java代码
public class X_AD_Attribute_Value extends PO implements I_AD_Attribute_Value, I_Persistent { /** * */ private static final long serialVersionUID = 20090915L; /** Standard Constructor */ public X_AD_Attribute_Value (Properties ctx, int AD_Attribute_Value_ID, String trxName) { super (ctx, AD_At...
} /** Set V_Date. @param V_Date V_Date */ public void setV_Date (Timestamp V_Date) { set_Value (COLUMNNAME_V_Date, V_Date); } /** Get V_Date. @return V_Date */ public Timestamp getV_Date () { return (Timestamp)get_Value(COLUMNNAME_V_Date); } /** Set V_Number. @param V_Number V_Number */ pu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Attribute_Value.java
1
请在Spring Boot框架中完成以下Java代码
Sampler braveSampler() { return Sampler.create(this.tracingProperties.getSampling().getProbability()); } @Bean @ConditionalOnMissingBean(io.micrometer.tracing.Tracer.class) BraveTracer braveTracerBridge(brave.Tracer tracer, CurrentTraceContext currentTraceContext) { return new BraveTracer(tracer, new BraveCurr...
} @Bean @ConditionalOnMissingBean(SpanCustomizer.class) CurrentSpanCustomizer currentSpanCustomizer(Tracing tracing) { return CurrentSpanCustomizer.create(tracing); } @Bean @ConditionalOnMissingBean(io.micrometer.tracing.SpanCustomizer.class) BraveSpanCustomizer braveSpanCustomizer(SpanCustomizer spanCustomi...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing-brave\src\main\java\org\springframework\boot\micrometer\tracing\brave\autoconfigure\BraveAutoConfiguration.java
2
请完成以下Java代码
public void setValue(ModelElementInstance modelElement, T value, boolean withReferenceUpdate) { String xmlValue = convertModelValueToXmlValue(value); if(namespaceUri == null) { modelElement.setAttributeValue(attributeName, xmlValue, isIdAttribute, withReferenceUpdate); } else { mod...
} /** * @return the attributeName */ public String getAttributeName() { return attributeName; } /** * @param attributeName the attributeName to set */ public void setAttributeName(String attributeName) { this.attributeName = attributeName; } public void removeAttribute(ModelElementI...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\type\attribute\AttributeImpl.java
1
请完成以下Java代码
public boolean isHeader() { return header; } public void setHeader(boolean header) { this.header = header; } public static EventPayload header(String name, String type) { EventPayload payload = new EventPayload(name, type); payload.setHeader(true); return pa...
EventPayload payload = new EventPayload(); payload.name = name; payload.setFullPayload(true); return payload; } @JsonInclude(JsonInclude.Include.NON_DEFAULT) public boolean isMetaParameter() { return metaParameter; } public void setMetaParameter(boolean metaParamete...
repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\EventPayload.java
1
请完成以下Java代码
private void assertApplicationAccess() { final MobileApplicationPermissions permissions = Env.getUserRolePermissions().getMobileApplicationPermissions(); mobileApplicationService.assertAccess(distributionMobileApplication.getApplicationId(), permissions); } @GetMapping("/hu/byScannedCode") public @NonNull Json...
@PostMapping("/job/{wfProcessId}/complete") public WFProcess complete(@PathVariable("wfProcessId") final String wfProcessIdStr) { assertApplicationAccess(); return distributionMobileApplication.complete(WFProcessId.ofString(wfProcessIdStr), getLoggedUserId()); } @PostMapping("/print/materialInTransitReport") ...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\rest_api\DistributionRestController.java
1
请完成以下Java代码
protected void prepare() { ProcessInfoParameter[] para = getParametersAsArray(); for (int i = 0; i < para.length; i++) { String name = para[i].getParameterName(); if (para[i].getParameter() == null) ; else if (name.equals("AD_Role_ID")) p_AD_Role_ID = para[i].getParameterAsInt(); else if (nam...
Services.get(IRoleDAO.class).retrieveAllRolesWithAutoMaintenance() .stream() .filter(role -> isRoleMatchingClientId(role, clientId)) .forEach(role -> updateRole(role)); } private static boolean isRoleMatchingClientId(final Role role, final ClientId clientId) { if (clientId == null) { return true;...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\RoleAccessUpdate.java
1
请在Spring Boot框架中完成以下Java代码
public class PrintDataRequestHandler { public JsonPrintingDataResponse createResponse(@NonNull final ImmutableList<PrintingData> dataList) { final List<JsonPrintingData> jsonPrintingDataList = new ArrayList<>(); for(final PrintingData data : dataList) { final List<JsonPrintingSegment> jsonPrintingSegments = ...
} final JsonPrintingData jsonPrintingData = JsonPrintingData.builder() .base64Data(Base64.getEncoder().encodeToString(data.getData())) .printingQueueId(data.getPrintingQueueItemId().getRepoId()) .documentFileName(data.getDocumentFileName()) .segments(jsonPrintingSegments) .build(); jsonPr...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.rest-api-impl\src\main\java\de\metas\printing\rest\v2\PrintDataRequestHandler.java
2
请完成以下Java代码
public void setM_FreightCost_ID (int M_FreightCost_ID) { if (M_FreightCost_ID < 1) set_ValueNoCheck (COLUMNNAME_M_FreightCost_ID, null); else set_ValueNoCheck (COLUMNNAME_M_FreightCost_ID, Integer.valueOf(M_FreightCost_ID)); } /** Get Frachtkostenpauschale. @return Frachtkostenpauschale */ public i...
/** Set Lieferweg. @param M_Shipper_ID Methode oder Art der Warenlieferung */ public void setM_Shipper_ID (int M_Shipper_ID) { if (M_Shipper_ID < 1) set_Value (COLUMNNAME_M_Shipper_ID, null); else set_Value (COLUMNNAME_M_Shipper_ID, Integer.valueOf(M_Shipper_ID)); } /** Get Lieferweg. @return...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\model\X_M_FreightCostShipper.java
1
请完成以下Java代码
public <T> IQueryFilter<T> getNotLockedFilter(@NonNull String modelTableName, @NonNull String joinColumnNameFQ) { return getLockDatabase().getNotLockedFilter(modelTableName, joinColumnNameFQ); } @Override public <T> IQueryBuilder<T> getLockedRecordsQueryBuilder(final Class<T> modelClass, final Object contextProv...
public <T> IQuery<T> addNotLockedClause(final IQuery<T> query) { return getLockDatabase().addNotLockedClause(query); } @Override public ExistingLockInfo getLockInfo(final TableRecordReference tableRecordReference, final LockOwner lockOwner) { return getLockDatabase().getLockInfo(tableRecordReference, lockOwne...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\api\impl\LockManager.java
1
请完成以下Java代码
public String getAttndntLang() { return attndntLang; } /** * Sets the value of the attndntLang property. * * @param value * allowed object is * {@link String } * */ public void setAttndntLang(String value) { this.attndntLang = value; } ...
public void setFllbckInd(Boolean value) { this.fllbckInd = value; } /** * Gets the value of the authntcnMtd property. * * @return * possible object is * {@link CardholderAuthentication2 } * */ public CardholderAuthentication2 getAuthntcnMtd() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-xjc_camt054_001_06\de\metas\payment\camt054_001_06\PaymentContext3.java
1
请完成以下Java代码
public void execute(DelegateExecution execution) { ActivityExecution activityExecution = (ActivityExecution) execution; PvmActivity activity = activityExecution.getActivity(); ActivityImpl initialActivity = (ActivityImpl) activity.getProperty(BpmnParse.PROPERTYNAME_INITIAL); if (initial...
@Override public void lastExecutionEnded(ActivityExecution execution) { ScopeUtil.createEventScopeExecution((ExecutionEntity) execution); // remove the template-defined data object variables Map<String, Object> dataObjectVars = ((ActivityImpl) execution.getActivity()).getVariables(); ...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\SubProcessActivityBehavior.java
1
请完成以下Java代码
public Capacity getCapacity( @NonNull final I_M_HU_Item huItem, final ProductId productId, final I_C_UOM uom, final ZonedDateTime date) { final I_M_HU_PI_Item_Product itemDefProduct = huPIItemProductDAO.retrievePIMaterialItemProduct(huItem, productId, date); if (itemDefProduct == null) { final boo...
public boolean isValidItemProduct(final I_M_HU_PI_Item_Product itemDefProduct) { Check.assumeNotNull(itemDefProduct, "Error: Null record"); // item which allows any product should have infinite capacity and no product assigned if (itemDefProduct.isAllowAnyProduct() && (itemDefProduct.getM_Product_ID() > 0 || !is...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUCapacityBL.java
1
请完成以下Java代码
public void postConstruct() { final AdWindowId quickInputAdWindowId = bpartnerLocationQuickInputService.getNewBPartnerLocationWindowId().orElse(null); if (quickInputAdWindowId != null) { newRecordDescriptorsProvider.addNewRecordDescriptor( NewRecordDescriptor.of( I_C_BPartner_Location.Table_Name, ...
template.setIsHandOverLocation(true); } } @NonNull private BPartnerId getBPartnerId(final NewRecordDescriptor.ProcessNewRecordDocumentRequest request) { if (request.getTriggeringDocumentPath() == null) { throw new AdempiereException("Unknown triggering path"); } if (request.getTriggeringField() == nul...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bpartner\quickinput\BPartnerLocationQuickInputConfiguration.java
1
请完成以下Java代码
public final class ColumnSql { public static final ColumnSql SQL_NULL = ofSql("NULL", null); private static final CtxName CTX_JoinTableNameOrAliasIncludingDot = CtxNames.ofNameAndDefaultValue("JoinTableNameOrAliasIncludingDot", null); @NonNull private final IStringExpression sqlExpression; @Nullable private final ...
{ String sqlBuilt = this._sqlBuilt; if (sqlBuilt == null) { final String joinTableNameOrAliasIncludingDot = joinTableNameOrAlias != null ? joinTableNameOrAlias + "." : ""; final Evaluatee2 evalCtx = Evaluatees.ofSingleton(CTX_JoinTableNameOrAliasIncludingDot.toStringWithoutMarkers(), joinTableNameOrAliasInc...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\column\ColumnSql.java
1
请在Spring Boot框架中完成以下Java代码
public class Application implements CommandLineRunner { private Logger logger = LoggerFactory.getLogger(Application.class); @Resource(name = "ordersDataSource") private DataSource ordersDataSource; @Resource(name = "usersDataSource") private DataSource usersDataSource; public static void mai...
try (Connection conn = ordersDataSource.getConnection()) { // 这里,可以做点什么 logger.info("[run][ordersDataSource 获得连接:{}]", conn); } catch (SQLException e) { throw new RuntimeException(e); } // users 数据源 try (Connection conn = usersDataSource.getConnection...
repos\SpringBoot-Labs-master\lab-19\lab-19-datasource-pool-hikaricp-multiple\src\main\java\cn\iocoder\springboot\lab19\datasourcepool\Application.java
2
请完成以下Java代码
public String usingContains(Model model) { model.addAttribute("myList", getColors()); model.addAttribute("others", getOtherColors()); return "lists/contains"; } @GetMapping("/size") public String usingSize(Model model) { model.addAttribute("myList", getColors()); ret...
} private List<String> getColors() { List<String> colors = new ArrayList<>(); colors.add("green"); colors.add("yellow"); colors.add("red"); colors.add("blue"); return colors; } private List<String> getOtherColors() { List<String> colors = new ArrayLi...
repos\tutorials-master\spring-web-modules\spring-thymeleaf-2\src\main\java\com\baeldung\thymeleaf\lists\ListsController.java
1
请在Spring Boot框架中完成以下Java代码
public class DocumentPostingLogService { @NonNull private final IErrorManager errorManager = Services.get(IErrorManager.class); @NonNull private final DocumentPostingLogRepository repository; public void logEnqueued(@NonNull final Collection<DocumentPostRequest> postRequests) { repository.create( postRequest...
repository.create( DocumentPostingLogRequest.builderFrom(postRequest) .type(DocumentPostingLogRequestType.PostingOK) .build() ); } public void logPostingError(@NonNull final DocumentPostRequest postRequest, @NonNull final AdempiereException metasfreshException) { final AdIssueId adIssueId = erro...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\posting\log\DocumentPostingLogService.java
2
请完成以下Java代码
public boolean hasStatus2xx() { return getStatusCode() / 100 == HttpStatus.OK.series().value(); } public boolean isJson() { return contentType != null && contentType.includes(MediaType.APPLICATION_JSON); } public String getBodyAsString() { if (body == null) { return null; } else if (isJson()) ...
catch (JsonProcessingException e) { throw AdempiereException.wrapIfNeeded(e); } } else if (body instanceof String) { return (String)body; } else if (body instanceof byte[]) { return new String((byte[])body, charset); } else { return body.toString(); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\audit\dto\ApiResponse.java
1
请完成以下Java代码
public void setTimesDunned (int TimesDunned) { set_Value (COLUMNNAME_TimesDunned, Integer.valueOf(TimesDunned)); } /** Get Times Dunned. @return Number of times dunned previously */ public int getTimesDunned () { Integer ii = (Integer)get_Value(COLUMNNAME_TimesDunned); if (ii == null) return 0; ...
public void setTotalAmt (BigDecimal TotalAmt) { set_Value (COLUMNNAME_TotalAmt, TotalAmt); } /** Get Total Amount. @return Total Amount */ public BigDecimal getTotalAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalAmt); if (bd == null) return Env.ZERO; return bd; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DunningRunLine.java
1
请完成以下Java代码
public void handle(ModelInterpretationContext intercon, Model model) throws ModelHandlerException { SpringProfileModel profileModel = (SpringProfileModel) model; if (!acceptsProfiles(intercon, profileModel)) { model.deepMarkAsSkipped(); } } private boolean acceptsProfiles(ModelInterpretationContext ic, Spri...
catch (ScanException ex) { throw new RuntimeException(ex); } } return this.environment.acceptsProfiles(Profiles.of(profileNames)); } // The array has no nulls in it, but StringUtils.trimArrayElements return // @Nullable String[] @SuppressWarnings("NullAway") private String[] trimArrayElements(String[] ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\logback\SpringProfileModelHandler.java
1
请完成以下Spring Boot application配置
# Don't try to create DataSouce when running tests which don't need a DataSource spring.autoconfigure.exclude=\ org.springframework.cloud.aws.autoconfigure.jdbc.AmazonRdsDatabaseAutoConfiguration,\ org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration cloud.aws.region.auto=true # Load instance pr...
edentials.instanceProfile=true # Disable auto cloud formation cloud.aws.stack.auto=false # Disable web environment spring.main.web-environment=false
repos\tutorials-master\spring-cloud-modules\spring-cloud-aws\src\main\resources\application-instance-profile.properties
2
请完成以下Java代码
public Product getProductById(final ProductId productId) { return productsCache.computeIfAbsent(productId, this::retrieveProductById); } public Product retrieveProductById(@NonNull final ProductId productId) { return productRepository.getById(productId); } public Map<ProductId, Product> retrieveProductsById...
private void warmUpUOMs(final Collection<UomId> uomIds) { if (uomIds.isEmpty()) { return; } CollectionUtils.getAllOrLoad(uomsCache, uomIds, this::retrieveUOMsByIds); } private Map<UomId, I_C_UOM> retrieveUOMsByIds(final Collection<UomId> uomIds) { final List<I_C_UOM> uoms = uomDAO.getByIds(uomIds); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\MaterialCockpitRowCache.java
1
请完成以下Java代码
public List<HistoricCaseInstance> findWithVariablesByQueryCriteria(HistoricCaseInstanceQueryImpl historicCaseInstanceQuery) { setSafeInValueLists(historicCaseInstanceQuery); return getDbSqlSession().selectList("selectHistoricCaseInstancesWithVariablesByQueryCriteria", historicCaseInstanceQuery, getManag...
public void bulkDeleteHistoricCaseInstances(Collection<String> caseInstanceIds) { getDbSqlSession().delete("bulkDeleteHistoricCaseInstancesByIds", createSafeInValuesList(caseInstanceIds), getManagedEntityClass()); } protected void setSafeInValueLists(HistoricCaseInstanceQueryImpl caseInstanceQuery) { ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\data\impl\MybatisHistoricCaseInstanceDataManagerImpl.java
1
请在Spring Boot框架中完成以下Java代码
public Date getCreateTime() { return createTime; } @Override public void setCreateTime(Date createTime) { this.createTime = createTime; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("IdentityLinkEntity[id=").append(id);...
if (taskId != null) { sb.append(", taskId=").append(taskId); } if (processInstanceId != null) { sb.append(", processInstanceId=").append(processInstanceId); } if (scopeId != null) { sb.append(", scopeId=").append(scopeId); } if (scopeTy...
repos\flowable-engine-main\modules\flowable-identitylink-service\src\main\java\org\flowable\identitylink\service\impl\persistence\entity\HistoricIdentityLinkEntityImpl.java
2
请完成以下Java代码
public static BytesEncryptor standard(CharSequence password, CharSequence salt) { return new AesBytesEncryptor(password.toString(), salt, KeyGenerators.secureRandom(16)); } /** * Creates a text encryptor that uses "stronger" password-based encryption. Encrypted * text is hex-encoded. * @param password the pa...
*/ public static TextEncryptor noOpText() { return NoOpTextEncryptor.INSTANCE; } private static final class NoOpTextEncryptor implements TextEncryptor { static final TextEncryptor INSTANCE = new NoOpTextEncryptor(); @Override public String encrypt(String text) { return text; } @Override public S...
repos\spring-security-main\crypto\src\main\java\org\springframework\security\crypto\encrypt\Encryptors.java
1
请完成以下Java代码
public class X_C_DocType_PrintOptions extends org.compiere.model.PO implements I_C_DocType_PrintOptions, org.compiere.model.I_Persistent { private static final long serialVersionUID = -67888006L; /** Standard Constructor */ public X_C_DocType_PrintOptions (final Properties ctx, final int C_DocType_PrintOpti...
/** Print = P */ public static final String DOCUMENTFLAVOR_Print = "P"; @Override public void setDocumentFlavor (final java.lang.String DocumentFlavor) { set_Value (COLUMNNAME_DocumentFlavor, DocumentFlavor); } @Override public java.lang.String getDocumentFlavor() { return get_ValueAsString(COLUMNNAME_Doc...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DocType_PrintOptions.java
1
请完成以下Java代码
public class HalIdentityLink extends HalResource<HalIdentityLink> { public final static HalRelation REL_GROUP = HalRelation.build("group", GroupRestService.class, UriBuilder.fromPath(GroupRestService.PATH).path("{id}")); public final static HalRelation REL_USER = HalRelation.build("user", UserRestService.class, Ur...
halIdentityLink.linker.createLink(REL_TASK, identityLink.getTaskId()); return halIdentityLink; } public String getType() { return type; } public String getUserId() { return userId; } public String getGroupId() { return groupId; } public String getTaskId() { return taskId; } }
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\hal\identitylink\HalIdentityLink.java
1
请完成以下Java代码
public Integer getWidth() { return 17; } @Override public Integer getHeight() { return 15; } @Override public String getAnchorValue() { return null; } @Override public String getFillValue() { return "#585858"; } @Override public String ...
} @Override public void drawIcon(int imageX, int imageY, int iconPadding, ProcessDiagramSVGGraphics2D svgGenerator) { Element gTag = svgGenerator.getDOMFactory().createElementNS(null, SVGGraphics2D.SVG_G_TAG); gTag.setAttributeNS(null, "transform", "translate(" + (imageX - 7) + "," + (imageY - ...
repos\Activiti-develop\activiti-core\activiti-image-generator\src\main\java\org\activiti\image\impl\icon\LinkThrowIconType.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isEnableSafeXml() { return enableSafeXml; } public void setEnableSafeXml(boolean enableSafeXml) { this.enableSafeXml = enableSafeXml; } public boolean isEventRegistryStartProcessInstanceAsync() { return eventRegistryStartProcessInstanceAsync; } publi...
public Duration getEventRegistryUniqueProcessInstanceStartLockTime() { return eventRegistryUniqueProcessInstanceStartLockTime; } public void setEventRegistryUniqueProcessInstanceStartLockTime(Duration eventRegistryUniqueProcessInstanceStartLockTime) { this.eventRegistryUniqueProcessInstanceStar...
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\process\FlowableProcessProperties.java
2
请完成以下Java代码
protected void customizeBeforeOpen(final FormFrame formFrame) { // nothing on this level } /** @return the {@link Frame} in which this action was executed or <code>null</code> if not available. */ protected final Frame getCallingFrame() { final GridField gridField = getContext().getEditor().getField(); if (...
{ final IContextMenuActionContext context = getContext(); Check.assumeNotNull(context, "context not null"); final Properties ctx = context.getCtx(); // Check if user has access to Payment Allocation form final int adFormId = getAD_Form_ID(); final Boolean formAccess = Env.getUserRolePermissions().checkForm...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\OpenFormContextMenuAction.java
1
请完成以下Java代码
private static Converter<Object, ?> getConverter(TypeDescriptor targetDescriptor) { return (source) -> CONVERSION_SERVICE.convert(source, OBJECT_TYPE_DESCRIPTOR, targetDescriptor); } private static Instant convertInstant(Object source) { if (source == null) { return null; } Instant result = (Instant) CONV...
} return (String) CONVERSION_SERVICE.convert(source, OBJECT_TYPE_DESCRIPTOR, STRING_TYPE_DESCRIPTOR); } @Override public Map<String, Object> convert(Map<String, Object> claims) { Assert.notNull(claims, "claims cannot be null"); Map<String, Object> mappedClaims = new HashMap<>(claims); for (Map.Entry<String,...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\MappedJwtClaimSetConverter.java
1
请完成以下Java代码
private CurrencyPrecision extractPrecision(@NonNull final I_C_InvoiceLine invoiceLine) { final IPriceListBL priceListBL = Services.get(IPriceListBL.class); if (invoiceLine.getC_Invoice_ID() <= 0) { return null; } final I_C_Invoice invoice = invoiceLine.getC_Invoice(); return priceListBL.getPricePrecisi...
} final I_C_OrderLine ol = invoiceLine.getC_OrderLine(); invoiceLine.setM_Product_ID(ol.getM_Product_ID()); } @CalloutMethod(columnNames = { I_C_InvoiceLine.COLUMNNAME_C_OrderLine_ID }) public void setIsPackagingMaterial(final I_C_InvoiceLine invoiceLine, final ICalloutField field) { if (InterfaceWrapperHel...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\callout\C_InvoiceLine.java
1
请完成以下Java代码
public boolean saveTxtTo(String path) { if (dictionaryMaker.saveTxtTo(path + ".txt")) { if (nGramDictionaryMaker.saveTxtTo(path)) { return true; } } return false; } /** * 处理语料,准备词典 */ public void compute(List...
} /** * 训练 * @param corpus 语料库路径 */ public void train(String corpus) { CorpusLoader.walk(corpus, new CorpusLoader.Handler() { @Override public void handle(Document document) { List<List<Word>> simpleSentenceList = document.g...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\CommonDictionaryMaker.java
1
请在Spring Boot框架中完成以下Java代码
public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String getPassword() { return this.password; } public void setPassword(String password) { if (!StringUtils.hasLength(password)) { return; } this.passwordGenerated = false; ...
} public List<String> getRoles() { return this.roles; } public void setRoles(List<String> roles) { this.roles = new ArrayList<>(roles); } public boolean isPasswordGenerated() { return this.passwordGenerated; } } }
repos\spring-boot-4.0.1\module\spring-boot-security\src\main\java\org\springframework\boot\security\autoconfigure\SecurityProperties.java
2
请完成以下Java代码
public abstract class EnumUtils { /** * Parse the bounded value into ValuedEnum * * @param clz * @param value * @return */ public static <T extends ValuedEnum<V>, V> T parse(Class<T> clz, V value) { Assert.notNull(clz, "clz can not be null"); if (value == null) { ...
/** * Null-safe valueOf function * * @param <T> * @param enumType * @param name * @return */ public static <T extends Enum<T>> T valueOf(Class<T> enumType, String name) { if (name == null) { return null; } return Enum.valueOf(enumType, name); ...
repos\Spring-Boot-In-Action-master\id-spring-boot-starter\src\main\java\com\baidu\fsg\uid\utils\EnumUtils.java
1
请在Spring Boot框架中完成以下Java代码
void init() { jdbcTemplate.setResultsMapCaseInsensitive(true); } public List<AuthorDto> fetchNicknameAndAgeByGenre() { SimpleJdbcCall simpleJdbcCall = new SimpleJdbcCall(jdbcTemplate) .withProcedureName("FETCH_NICKNAME_AND_AGE_BY_GENRE") .returningResultSet("Auth...
Map<String, Object> authors = simpleJdbcCall.execute(Map.of("p_genre", "Anthology")); return (List<Author>) authors.get("AuthorResultSet"); } public AuthorDto fetchNicknameAndAgeById() { SimpleJdbcCall simpleJdbcCall = new SimpleJdbcCall(jdbcTemplate) .withProcedureName("FETCH_...
repos\Hibernate-SpringBoot-master\HibernateSpringBootCallStoredProcedureJdbcTemplateBeanPropertyRowMapper\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
protected void applyConfigurators(Map<String, DataFormat<?>> dataFormats, ClassLoader classloader) { applyConfigurators(dataFormats, classloader, Collections.EMPTY_LIST); } protected void applyConfigurators(Map<String, DataFormat<?>> dataFormats, ClassLoader classloader, ...
protected void applyConfigurator(Map<String, DataFormat<?>> dataFormats, DataFormatConfigurator configurator) { for (DataFormat<?> dataFormat : dataFormats.values()) { if (configurator.getDataFormatClass().isAssignableFrom(dataFormat.getClass())) { configurator.configure(dataFormat); } } }...
repos\camunda-bpm-platform-master\spin\core\src\main\java\org\camunda\spin\DataFormats.java
1
请完成以下Java代码
public static String toCamelCaseBySplittingUsingStreams(String text, String delimiter) { if (text == null || text.isEmpty()) { return text; } String[] words = text.split(delimiter); //Convert the first word to lowercase and then every //other word to Title Case. ...
builder.setCharAt(0, Character.toLowerCase(text.charAt(0))); return builder.toString(); } public static String toCamelCaseUsingGuava(String text, String delimiter) { String toUpperUnderscore = text.toUpperCase().replaceAll(delimiter, "_"); return CaseFormat.UPPER_UNDERSCORE.to(CaseForma...
repos\tutorials-master\core-java-modules\core-java-string-conversions\src\main\java\com\baeldung\stringtocamelcase\StringToCamelCase.java
1
请完成以下Java代码
public void setIsExcludeAlreadyExported (final boolean IsExcludeAlreadyExported) { set_Value (COLUMNNAME_IsExcludeAlreadyExported, IsExcludeAlreadyExported); } @Override public boolean isExcludeAlreadyExported() { return get_ValueAsBoolean(COLUMNNAME_IsExcludeAlreadyExported); } @Override public void set...
public java.lang.String getIsSOTrx() { return get_ValueAsString(COLUMNNAME_IsSOTrx); } @Override public void setIsSwitchCreditMemo (final boolean IsSwitchCreditMemo) { set_Value (COLUMNNAME_IsSwitchCreditMemo, IsSwitchCreditMemo); } @Override public boolean isSwitchCreditMemo() { return get_ValueAsBo...
repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java-gen\de\metas\datev\model\X_DATEV_Export.java
1
请完成以下Java代码
public Quantity getQtyToShip(final I_DD_OrderLine_Or_Alternative ddOrderLineOrAlt) { return ddOrderLowLevelService.getQtyToShip(ddOrderLineOrAlt); } public void assignToResponsible(@NonNull final I_DD_Order ddOrder, @NonNull final UserId responsibleId) { final UserId currentResponsibleId = extractCurrentRespon...
{ ddOrderMoveScheduleService.removeNotStarted(ddOrderId); } private void unassignFromResponsibleAndSave(final I_DD_Order ddOrder) { ddOrder.setAD_User_Responsible_ID(-1); save(ddOrder); } public Set<ProductId> getProductIdsByDDOrderIds(final Collection<DDOrderId> ddOrderIds) { return ddOrderLowLevelDAO....
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\DDOrderService.java
1
请完成以下Java代码
public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public List<Phone> getPhones() { return phones; }
public void setPhones(List<Phone> phones) { this.phones = phones; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Employee)) { return false; } Employee user = (Employee) o; retur...
repos\tutorials-master\persistence-modules\spring-data-jpa-enterprise-2\src\main\java\com\baeldung\elementcollection\model\Employee.java
1
请完成以下Java代码
protected void provideRemovalTime(CommandContext commandContext) { for (Entry<Resources, Supplier<HistoryEvent>> resourceEntry : getHistoricInstanceResources(commandContext)) { Resources resource = resourceEntry.getKey(); if (isResourceEqualTo(resource)) { Supplier<HistoryEvent> history...
if (isNullOrAny(historicProcessInstanceId)) { return null; } return commandContext.getHistoricProcessInstanceManager() .findHistoricProcessInstance(historicProcessInstanceId); } protected HistoryEvent getHistoricTaskInstance(CommandContext commandContext) { String historicTaskInstanceId ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SaveAuthorizationCmd.java
1
请完成以下Java代码
public void deleteProcessDefinitionInfo(String processDefinitionId) { ProcessDefinitionInfoEntity processDefinitionInfo = findProcessDefinitionInfoByProcessDefinitionId(processDefinitionId); if (processDefinitionInfo != null) { getDbSqlSession().delete(processDefinitionInfo); del...
} public void deleteInfoJson(ProcessDefinitionInfoEntity processDefinitionInfo) { if (processDefinitionInfo.getInfoJsonId() != null) { ByteArrayRef ref = new ByteArrayRef(processDefinitionInfo.getInfoJsonId()); ref.delete(); } } public ProcessDefinitionInfoEntity fi...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ProcessDefinitionInfoEntityManager.java
1
请在Spring Boot框架中完成以下Java代码
public PlatformTransactionManager jpaTransactionManager() { final JpaTransactionManager transactionManager = new JpaTransactionManager(); transactionManager.setEntityManagerFactory(entityManagerFactory().getObject()); return transactionManager; } @Bean public PersistenceExceptionTra...
@Bean public IBarDao barHibernateDao() { return new BarDao(); } @Bean public IBarAuditableDao barHibernateAuditableDao() { return new BarAuditableDao(); } @Bean public IFooDao fooHibernateDao() { return new FooDao(); } @Bean public IFooAuditableDao fooH...
repos\tutorials-master\persistence-modules\spring-data-jpa-query\src\main\java\com\baeldung\hibernate\audit\PersistenceConfig.java
2
请在Spring Boot框架中完成以下Java代码
public MethodInvokingFactoryBean methodInvokingFactoryBean() { MethodInvokingFactoryBean factoryBean = new MethodInvokingFactoryBean(); factoryBean.setStaticMethod("org.apache.shiro.SecurityUtils.setSecurityManager"); factoryBean.setArguments(securityManager()); return factoryBean; }...
return advisorAutoProxyCreator; } /** * 开启shiro aop注解支持. * 使用代理方式;所以需要开启代码支持; * 需要aspectj支持 * * @param securityManager * @return */ @Bean public AuthorizationAttributeSourceAdvisor authorizationAttributeSourceAdvisor(SecurityManager securityManager) { Authoriz...
repos\springBoot-master\springboot-shiro2\src\main\java\cn\abel\rest\shiro\ShiroConfig.java
2
请完成以下Java代码
protected ServletRegistration.Dynamic addRegistration(String description, ServletContext servletContext) { String name = getServletName(); return servletContext.addServlet(name, this.servlet); } /** * Configure registration settings. Subclasses can override this method to perform * additional configuration i...
} } /** * Returns the servlet name that will be registered. * @return the servlet name */ public String getServletName() { return getOrDeduceName(this.servlet); } @Override public String toString() { return getServletName() + " urls=" + getUrlMappings(); } }
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\ServletRegistrationBean.java
1
请完成以下Java代码
public Mono<User> getUser(int id) { return webClient.get() .uri("/user/{id}", id) .retrieve() .bodyToMono(User.class); } public Mono<Item> getItem(int id) { return webClient.get() .uri("/item/{id}", id) .retrieve() .bodyToM...
public Flux<User> fetchUsers(List<Integer> userIds) { return Flux.fromIterable(userIds) .flatMap(this::getUser); } public Flux<User> fetchUserAndOtherUser(int id) { return Flux.merge(getUser(id), getOtherUser(id)); } public Mono<UserWithItem> fetchUserAndItem(int userId, in...
repos\tutorials-master\spring-reactive-modules\spring-reactive-client\src\main\java\com\baeldung\reactive\webclient\simultaneous\Client.java
1
请完成以下Java代码
public String toString() { return getCode(); } @JsonValue public String getCode() { return code; } public boolean isApproved() { return APPROVED.equals(this); } public PaymentReservationStatus toPaymentReservationStatus() { if (this == CREATED) { return PaymentReservationStatus.WAITING_PAYER_...
else if (this == APPROVED) { return PaymentReservationStatus.APPROVED_BY_PAYER; } else if (this == COMPLETED) { return PaymentReservationStatus.COMPLETED; } else if (this == REMOTE_DELETED) { return PaymentReservationStatus.WAITING_PAYER_APPROVAL; } else { throw new AdempiereException("C...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java\de\metas\payment\paypal\client\PayPalOrderStatus.java
1
请在Spring Boot框架中完成以下Java代码
public class ClientEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private Long id; @Column(name = "firstname") private String firstName; @Column(name = "lastname") private String lastName; @OneToOne(cascade = {CascadeType.ALL}) @JoinColu...
} public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public AccountEntity getAccount() { return account; } ...
repos\spring-examples-java-17\spring-bank\bank-server\src\main\java\itx\examples\springbank\server\repository\model\ClientEntity.java
2
请完成以下Java代码
public void setAD_Role_ID (int AD_Role_ID) { if (AD_Role_ID < 0) set_Value (COLUMNNAME_AD_Role_ID, null); else set_Value (COLUMNNAME_AD_Role_ID, Integer.valueOf(AD_Role_ID)); } /** Get Rolle. @return Responsibility Role */ @Override public int getAD_Role_ID () { Integer ii = (Integer)get_Valu...
@param AD_User_ID User within the system - Internal or Business Partner Contact */ @Override public void setAD_User_ID (int AD_User_ID) { if (AD_User_ID < 0) set_Value (COLUMNNAME_AD_User_ID, null); else set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); } /** Get Ansprechpartner. ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_AuthToken.java
1
请完成以下Java代码
protected ScopeImpl getScope(InterpretableExecution execution) { return execution.getProcessDefinition(); } @Override protected String getEventName() { return org.activiti.engine.impl.pvm.PvmEvent.EVENTNAME_END; } @Override protected void eventNotificationsCompleted(Interpretab...
// and trigger execution afterwards if (superExecution != null) { superExecution.setSubProcessInstance(null); try { subProcessActivityBehavior.completed(superExecution); } catch (RuntimeException e) { LOGGER.error("Error while completing sub pr...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\pvm\runtime\AtomicOperationProcessEnd.java
1
请完成以下Java代码
public String getScopeActivityInstanceId() { return scopeActivityInstanceId; } public void setScopeActivityInstanceId(String scopeActivityInstanceId) { this.scopeActivityInstanceId = scopeActivityInstanceId; } public void setInitial(Boolean isInitial) { this.isInitial = isInitial; } public Boole...
+ ", textValue=" + textValue + ", textValue2=" + textValue2 + ", byteArrayId=" + byteArrayId + ", activityInstanceId=" + activityInstanceId + ", scopeActivityInstanceId=" + scopeActivityInstanceId + ", eventType=" + eventType + ", executionId=" + executi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricVariableUpdateEventEntity.java
1
请完成以下Java代码
private void readWebSocketFrame() throws IOException { try { Frame frame = Frame.read(this.inputStream); if (frame.getType() == Frame.Type.PING) { writeWebSocketFrame(new Frame(Frame.Type.PONG)); } else if (frame.getType() == Frame.Type.CLOSE) { throw new ConnectionClosedException(); } else ...
private String getWebsocketAcceptResponse() throws NoSuchAlgorithmException { Matcher matcher = WEBSOCKET_KEY_PATTERN.matcher(this.header); Assert.state(matcher.find(), "No Sec-WebSocket-Key"); String response = matcher.group(1).trim() + WEBSOCKET_GUID; MessageDigest messageDigest = MessageDigest.getInstance("S...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\livereload\Connection.java
1
请完成以下Java代码
public class ApiUsageState extends BaseData<ApiUsageStateId> implements HasTenantId, HasVersion { private static final long serialVersionUID = 8250339805336035966L; private TenantId tenantId; private EntityId entityId; private ApiUsageStateValue transportState; private ApiUsageStateValue dbStorage...
public boolean isDbStorageEnabled() { return !ApiUsageStateValue.DISABLED.equals(dbStorageState); } public boolean isJsExecEnabled() { return !ApiUsageStateValue.DISABLED.equals(jsExecState); } public boolean isTbelExecEnabled() { return !ApiUsageStateValue.DISABLED.equals(tbel...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\ApiUsageState.java
1
请完成以下Java代码
public void setId(String id) { this.id = id; } public String getId() { return id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getX() { return x; } public void setX(int x) { this.x = x; } p...
return width; } public void setWidth(int width) { this.width = width; } public int getHeight() { return height; } public void setHeight(int height) { this.height = height; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\process\ParticipantProcess.java
1
请完成以下Java代码
public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getContent() { return content; } public void setContent(String content) { this.content = content; }
public Person getAuthor() { return author; } public void setAuthor(Person author) { this.author = author; } @Override public String toString() { return "Post{" + "id=" + id + ", title='" + title + '\'' + ", content='" + conten...
repos\tutorials-master\persistence-modules\blaze-persistence\src\main\java\com\baeldung\model\Post.java
1
请完成以下Java代码
public Double getQps() { return qps; } public void setQps(Double qps) { this.qps = qps; } public Double getHighestCpuUsage() { return highestCpuUsage; } public void setHighestCpuUsage(Double highestCpuUsage) { this.highestCpuUsage = highestCpuUsage; } ...
} public Date getGmtModified() { return gmtModified; } public void setGmtModified(Date gmtModified) { this.gmtModified = gmtModified; } @Override public SystemRule toRule() { SystemRule rule = new SystemRule(); rule.setHighestSystemLoad(highestSystemLoad); ...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\rule\SystemRuleEntity.java
1
请在Spring Boot框架中完成以下Java代码
public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/**").addResourceLocations("classpath:/resources/"); } @Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/").setViewName("forward:/index.htm...
WebCallbackManager.setUrlCleaner(url -> { if (StringUtil.isEmpty(url)) { return url; } if (suffixSet.stream().anyMatch(url::endsWith)) { return null; } return url; }); } @Bean public FilterRegistrationBean a...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\config\WebConfig.java
2
请完成以下Java代码
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Employee employee = (Employee) o; if (!id.equals(employee.id)) return false; return name.equals(employee.name); } @Override public int hashCode...
} @Override public String toString() { return "Employee{" + "id=" + id + ", name='" + name + '\'' + '}'; } @Override public int compareTo(Employee employee) { return (int)(this.id - employee.getId()); } }
repos\tutorials-master\core-java-modules\core-java-collections-maps\src\main\java\com\baeldung\map\sort\Employee.java
1
请完成以下Java代码
public static class LongValueImpl extends PrimitiveTypeValueImpl<Long> implements LongValue { private static final long serialVersionUID = 1L; public LongValueImpl(Long value) { super(value, ValueType.LONG); } public LongValueImpl(Long value, boolean isTransient) { this(value); this...
} } public static class NumberValueImpl extends PrimitiveTypeValueImpl<Number> implements NumberValue { private static final long serialVersionUID = 1L; public NumberValueImpl(Number value) { super(value, ValueType.NUMBER); } public NumberValueImpl(Number value, boolean isTransient) { ...
repos\camunda-bpm-platform-master\commons\typed-values\src\main\java\org\camunda\bpm\engine\variable\impl\value\PrimitiveTypeValueImpl.java
1
请完成以下Java代码
public Builder setDocumentNo(final String documentNo) { this.documentNo = documentNo; return this; } public Builder setBPartnerName(final String bPartnerName) { BPartnerName = bPartnerName; return this; } public Builder setPaymentDate(final Date paymentDate) { this.paymentDate = paymentDa...
this.payAmt = payAmt; return this; } public Builder setPayAmtConv(final BigDecimal payAmtConv) { this.payAmtConv = payAmtConv; return this; } public Builder setC_BPartner_ID(final int C_BPartner_ID) { this.C_BPartner_ID = C_BPartner_ID; return this; } public Builder setOpenAmtConv(fina...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.swingui\src\main\java\de\metas\banking\payment\paymentallocation\model\PaymentRow.java
1
请完成以下Java代码
public void setM_InOutLineConfirm_ID (int M_InOutLineConfirm_ID) { if (M_InOutLineConfirm_ID < 1) set_Value (COLUMNNAME_M_InOutLineConfirm_ID, null); else set_Value (COLUMNNAME_M_InOutLineConfirm_ID, Integer.valueOf(M_InOutLineConfirm_ID)); } /** Get Ship/Receipt Confirmation Line. @return Material Sh...
return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Scrapped Quantity. @param ScrappedQty The Quantity scrapped due to QA issues */ public void setScrappedQty (BigDecimal ScrappedQty) { set_Value (COLUMNNAME_ScrappedQty, ScrappedQty); } /** Get Scrapped Quanti...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_InOutLineConfirm.java
1
请完成以下Java代码
public void on(ProductCountDecrementedEvent event) { orders.computeIfPresent(event.getOrderId(), (orderId, order) -> { order.decrementProductInstance(event.getProductId()); emitUpdate(order); return order; }); } @EventHandler public void on(ProductRemoved...
.map(o -> Optional.ofNullable(o.getProducts() .get(query.getProductId())) .orElse(0)) .reduce(0, Integer::sum); } @QueryHandler public Order handle(OrderUpdatesQuery query) { return orders.get(query.getOrderId()); } private void emitUpdate(Order order) {...
repos\tutorials-master\patterns-modules\axon\src\main\java\com\baeldung\axon\querymodel\InMemoryOrdersEventHandler.java
1
请在Spring Boot框架中完成以下Java代码
public class Author implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private int age; private String name; @Convert(converter = GenreTypeConverter.class) @Column(columnDefinition = "TIN...
this.name = name; } public GenreType getGenre() { return genre; } public void setGenre(GenreType genre) { this.genre = genre; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } @Override public String toS...
repos\Hibernate-SpringBoot-master\HibernateSpringBootEnumAttributeConverter\src\main\java\com\bookstore\entity\Author.java
2
请完成以下Java代码
public void mouseWheelMoved(final MouseWheelEvent e) { // If event is not eligible, try to forward it to parent scroll pane if (!isEligibleForWheelScrolling(e)) { if (forwardEventToParentScrollPane(e)) { // event was forwarded, stop here return; } } delegate.mouseWheelMoved(e); ...
{ final JScrollPane parent = getParentScrollPane(scrollpane); if (parent == null) { return false; } parent.dispatchEvent(cloneEvent(parent, e)); return true; } /** @return The parent scroll pane, or null if there is no parent. */ private JScrollPane getParentScrollPane(final JScrollPane sc...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\AdempiereScrollPaneUI.java
1
请完成以下Java代码
public static Date getDateBefore(Date date, int day) { Calendar now = Calendar.getInstance(); now.setTime(date); now.set(Calendar.DATE, now.get(Calendar.DATE) - day); return now.getTime(); } /** * 获取当前月第一天 * * @return Date * @throws ParseException */ ...
* 获取当前周第一天 * * @return Date * @throws ParseException */ public static Date getWeekFirstDate(){ Calendar cal = Calendar.getInstance(); cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.MINUTE, 0); cal.set(Cal...
repos\springBoot-master\abel-util\src\main\java\cn\abel\utils\DateTimeUtils.java
1
请在Spring Boot框架中完成以下Java代码
public class AggregationId implements RepoIdAware { @JsonCreator public static AggregationId ofRepoId(final int repoId) { return new AggregationId(repoId); } @Nullable public static AggregationId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new AggregationId(repoId) : null; } int repoId;
private AggregationId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_Aggregation_ID"); } @JsonValue @Override public int getRepoId() { return repoId; } public static int toRepoId(@Nullable final AggregationId id) { return id != null ? id.getRepoId() : -1; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java\de\metas\aggregation\api\AggregationId.java
2
请在Spring Boot框架中完成以下Java代码
JvmGcMetrics jvmGcMetrics() { return new JvmGcMetrics(); } @Bean @ConditionalOnMissingBean JvmHeapPressureMetrics jvmHeapPressureMetrics() { return new JvmHeapPressureMetrics(); } @Bean @ConditionalOnMissingBean JvmMemoryMetrics jvmMemoryMetrics() { return new JvmMemoryMetrics(); } @Bean @Conditiona...
@Configuration(proxyBeanMethods = false) @ConditionalOnClass(name = VIRTUAL_THREAD_METRICS_CLASS) static class VirtualThreadMetricsConfiguration { @Bean @ConditionalOnMissingBean(type = VIRTUAL_THREAD_METRICS_CLASS) @ImportRuntimeHints(VirtualThreadMetricsRuntimeHintsRegistrar.class) MeterBinder virtualThrea...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\jvm\JvmMetricsAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public void saveMobileSession(@RequestBody MobileSessionInfo sessionInfo, @RequestHeader(MOBILE_TOKEN_HEADER) String mobileToken, @AuthenticationPrincipal SecurityUser user) { userService.saveMobileSession(user.getTenantId(), user.getId(), mobi...
return filterUsersByReadPermission(users); } private List<User> filterUsersByReadPermission(List<User> users) { return users.stream().filter(user -> { try { return accessControlService.hasPermission(getCurrentUser(), Resource.USER, Operation.READ, user.getId(), user); ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\controller\UserController.java
2
请完成以下Java代码
public GroupMatcher createPredicate(final I_C_CompensationGroup_SchemaLine schemaLine, final List<I_C_CompensationGroup_SchemaLine> allSchemaLines) { final Optional<I_C_CompensationGroup_SchemaLine> nextSchemaLine = getNextLine(schemaLine, allSchemaLines); final BigDecimal valueMin = CoalesceUtil.coalesce(schemaL...
} } return Optional.empty(); } @ToString private static final class RevenueRangeGroupMatcher implements GroupMatcher { private final Range<BigDecimal> range; public RevenueRangeGroupMatcher(@NonNull final Range<BigDecimal> range) { this.range = range; } @Override public boolean isMatching(fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\compensationGroup\GroupMatcherFactory_RevenueBreaks.java
1
请完成以下Java代码
public class Train extends AbstractTrainer { @Override protected void localUsage() { paramDesc("-input <file>", "Use text data from <file> to train the model"); System.err.printf("\nExamples:\n"); System.err.printf("java %s -input corpus.txt -output vectors.txt -size 200 -window 5 -...
if ((i = argPos("-input", args)) >= 0) config.setInputFile(args[i + 1]); Word2VecTraining w2v = new Word2VecTraining(config); System.err.printf("Starting training using text file %s\nthreads = %d, iter = %d\n", config.getInputFile(), config.getNumThre...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\Train.java
1
请完成以下Java代码
public String getValueAsString() { return value != null ? value.toString() : null; } public Boolean getValueAsBoolean(final Boolean defaultValue) { return DisplayType.toBoolean(value, defaultValue); } public int getValueAsInteger(final int defaultValueIfNull) { if (value == null) { return defaultVal...
throw new AdempiereException("Cannot convert value to int list").setParameter("event", this); } } public <ET extends Enum<ET>> ET getValueAsEnum(final Class<ET> enumType) { if (value == null) { return null; } if (enumType.isAssignableFrom(value.getClass())) { @SuppressWarnings("unchecked") fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONPatchEvent.java
1
请完成以下Java代码
public void forEachAffectedHU(@Nullable final LU lu, final @NonNull LUTUCUConsumer consumer) { list.forEach(tu -> tu.forEachAffectedHU(lu, consumer)); } } // // // ---------------------------------------------------------------------------------- // // @Value @Builder(toBuilder = true) public static c...
return builder() .hu(this.hu) .isPreExistingLU(this.isPreExistingLU && other.isPreExistingLU) .tus(this.tus.mergeWith(other.tus)) .build(); } private static List<LU> mergeLists(final List<LU> list1, final List<LU> list2) { if (list2.isEmpty()) { return list1; } if (list1.isEmp...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\LUTUResult.java
1
请完成以下Java代码
public int compareTo(@NonNull final QtyTU other) { return this.intValue - other.intValue; } public int compareTo(@NonNull final BigDecimal other) { return this.intValue - other.intValueExact(); } public boolean isGreaterThan(@NonNull final QtyTU other) {return compareTo(other) > 0;} public boolean isZero(...
{ return this.intValue <= other.intValue ? this : other; } public Quantity computeQtyCUsPerTUUsingTotalQty(@NonNull final Quantity qtyCUsTotal) { if (isZero()) { throw new AdempiereException("Cannot determine Qty CUs/TU when QtyTU is zero of total CUs " + qtyCUsTotal); } else if (isOne()) { return...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\QtyTU.java
1
请在Spring Boot框架中完成以下Java代码
public class DataLoaderService { private static final Logger logger = LoggerFactory.getLogger(DataLoaderService.class); @Value("classpath:/data/Employee_Handbook.pdf") private Resource pdfResource; @Autowired private VectorStore vectorStore; public void load() { PagePdfDocumentReader ...
public void deleteAll(String keyPattern) { JedisPooled jedisPooled = ((RedisVectorStore)vectorStore).getJedis(); ScanParams scanParams = new ScanParams().match(keyPattern); String cursor = scanParams.SCAN_POINTER_START; do { ScanResult<String> scanResult = jedisPooled.scan(cu...
repos\tutorials-master\spring-ai-modules\spring-ai-2\src\main\java\com\baeldung\airag\service\DataLoaderService.java
2
请完成以下Spring Boot application配置
spring: application: name: user-service # 应用名 cloud: nacos: # Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类 discovery: server-addr: 127.0.0.1:8848 # Nacos 服务器地址 grpc: # gRPC 服务器配置,对应 GrpcS
erverProperties 配置类 server: port: 0 # gRPC Server 随机端口 server: port: 0 # Web Server 随机端口
repos\SpringBoot-Labs-master\labx-30-spring-cloud-grpc\labx-30-grpc-cloud\labx-30-grpc-cloud-user-service\src\main\resources\application.yml
2
请完成以下Java代码
public String getWEBUI_NameNew() { return webuiNameNew; } public void setWEBUI_NameNewBreadcrumb(final String webuiNameNewBreadcrumb) { this.webuiNameNewBreadcrumb = webuiNameNewBreadcrumb; } public String getWEBUI_NameNewBreadcrumb() { return webuiNameNewBreadcrumb; } /**
* @param mainTableName table name of main tab or null */ public void setMainTableName(String mainTableName) { this.mainTableName = mainTableName; } /** * @return table name of main tab or null */ public String getMainTableName() { return mainTableName; } } // MTreeNode
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MTreeNode.java
1
请完成以下Java代码
boolean empty() { return (_size == 0); } int size() { return _size; } void clear() { resize(0); _buf = null; _size = 0; _capacity = 0; } void add(int value) { if (_size == _capacity) { resizeBuf(_size ...
} private void resizeBuf(int size) { int capacity; if (size >= _capacity * 2) { capacity = size; } else { capacity = 1; while (capacity < size) { capacity <<= 1; } } int[]...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\AutoIntPool.java
1
请完成以下Java代码
public FlowNode getTarget() { return targetRefAttribute.getReferenceTargetElement(this); } public void setTarget(FlowNode target) { targetRefAttribute.setReferenceTargetElement(this, target); } public boolean isImmediate() { return isImmediateAttribute.getValue(this); } public void setImmedia...
return conditionExpressionCollection.getChild(this); } public void setConditionExpression(ConditionExpression conditionExpression) { conditionExpressionCollection.setChild(this, conditionExpression); } public void removeConditionExpression() { conditionExpressionCollection.removeChild(this); } pu...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\SequenceFlowImpl.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setC_Phase_ID (final int C_Phase_ID) { if (C_Phase_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Phase_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Phase_ID, ...
@Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Phase.java
1
请在Spring Boot框架中完成以下Java代码
public String[] getTopics() { return this.topics; } public void setTopics(String[] topics) { this.topics = topics; } public String getClusterPassword() { return this.clusterPassword; } public void setClusterPassword(String clusterPassword) { this.clusterPassword = clusterPassword; this.def...
/** * Creates the minimal transport parameters for an embedded transport * configuration. * @return the transport parameters * @see TransportConstants#SERVER_ID_PROP_NAME */ public Map<String, Object> generateTransportParameters() { Map<String, Object> parameters = new HashMap<>(); parameters.put...
repos\spring-boot-4.0.1\module\spring-boot-artemis\src\main\java\org\springframework\boot\artemis\autoconfigure\ArtemisProperties.java
2
请完成以下Java代码
public void fromCrossVersionRequest(@NonNull final XmlRequest xRequest, @NonNull final OutputStream outputStream) { final JAXBElement<RequestType> jaxbType = Invoice440FromCrossVersionModelTool.INSTANCE.fromCrossVersionModel(xRequest); JaxbUtil.marshal( jaxbType, RequestType.class, INVOICE_440_REQUEST...
@Override public String getXsdName() { return INVOICE_440_REQUEST_XSD; } @Override public XmlVersion getVersion() { return XmlVersion.v440; } @VisibleForTesting public void setUsePrettyPrint(final boolean usePrettyPrint) { this.usePrettyPrint = usePrettyPrint; } }
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\Invoice440RequestConversionService.java
1
请完成以下Java代码
protected List<Decision> determineDecisionExecutionOrder(List<Decision> allDecisions) { List<Decision> order = new ArrayList<>(); LinkedList<Decision> sortDecisions = new LinkedList<>(); Map<String, Decision> decisionsById = new HashMap<>(); Map<String, Boolean> visited = new HashMap<>(...
// Mark the current node as visited visited.replace(decisionId, true); // We reuse the algorithm on all adjacent nodes to the current node for (InformationRequirement requiredDecision : decisions.get(decisionId).getRequiredDecisions()) { if (!visited.get(requiredDecision.getRequired...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\agenda\operation\ExecuteDecisionServiceOperation.java
1
请完成以下Java代码
public String getAttachedToRefId() { return attachedToRefId; } public void setAttachedToRefId(String attachedToRefId) { this.attachedToRefId = attachedToRefId; } public boolean isEntryCriterion() { return isEntryCriterion; } public void setEntryCriterion(boolean isEntryCr...
public void setIncomingAssociations(List<Association> incomingAssociations) { this.incomingAssociations = incomingAssociations; } @Override public void addOutgoingAssociation(Association association) { this.outgoingAssociations.add(association); } @Override public List<Associatio...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\Criterion.java
1
请完成以下Java代码
public boolean isSingleProductWithQtyEqualsTo(@NonNull final I_M_HU hu, @NonNull final ProductId productId, @NonNull final Quantity qty) { return getStorage(hu).isSingleProductWithQtyEqualsTo(productId, qty); } @Override public boolean isSingleProductStorageMatching(@NonNull final I_M_HU hu, @NonNull final Produ...
public IHUProductStorage getProductStorage(@NonNull final I_M_HU hu, @NonNull ProductId productId) { return getStorage(hu).getProductStorage(productId); } @Override public @NonNull ImmutableMap<HuId, Set<ProductId>> getHUProductIds(@NonNull final List<I_M_HU> hus) { final Map<HuId, Set<ProductId>> huId2Produc...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\DefaultHUStorageFactory.java
1
请完成以下Java代码
public long getId() { return id; } public void setId(long id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() {
return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } @Override public String toString() { return String.format( "Customer[id=%d, firstName='%s', lastName='%s']", id, firstName, lastName); } // getters & s...
repos\spring-boot-quick-master\quick-jdbc\src\main\java\com\quick\jdbc\entity\Customer.java
1