instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
private void createJsonStock(@NonNull final Exchange exchange) { final ExportStockRouteContext exportStockRouteContext = exchange.getProperty(ROUTE_PROPERTY_EXPORT_STOCK_CONTEXT, ExportStockRouteContext.class); final BigDecimal stockBD = exportStockRouteContext.getJsonAvailableForSales() .getStock() .setS...
.shopwareClient(shopwareClient) .jsonAvailableForSales(jsonAvailableForSales) .build(); exchange.setProperty(ROUTE_PROPERTY_EXPORT_STOCK_CONTEXT, exportStockRouteContext); } @NonNull private JsonAvailableForSales getJsonAvailableForSales(@NonNull final JsonExternalSystemRequest request) { try { r...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\stock\ExportStockRouteBuilder.java
2
请完成以下Java代码
public String toString() { final BigDecimal price = pricingResult == null ? null : pricingResult.getPriceStd(); return "QualityInvoiceLine [" + "product=" + (product == null ? null : product.getName()) + ", productName=" + productName + ", percentage=" + percentage + ", qty=" + qty + ", uom=" +...
return Quantity.of(qty, uom); } public void setQty(@NonNull final Quantity qty) { this.qty = qty.toBigDecimal(); this.uom = qty.getUOM(); } @Override public IPricingResult getPrice() { return pricingResult; } public void setPrice(final IPricingResult price) { pricingResult = price; } @Override ...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\invoicing\impl\QualityInvoiceLine.java
1
请在Spring Boot框架中完成以下Java代码
public String getURL() { return url; } /** * Sets the value of the url property. * * @param value * allowed object is * {@link String } * */ public void setURL(String value) { this.url = value; } /** * A URL to the logo of the i...
/** * Indicates whether an amount of 0 shall be shown or not. * * @return * possible object is * {@link Boolean } * */ public Boolean isSuppressZero() { return suppressZero; } /** * Sets the value of the suppressZero property. * * @pa...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\PresentationDetailsType.java
2
请完成以下Java代码
public BigDecimal getQtyOnHand() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyOnHand); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyRequiered (final @Nullable BigDecimal QtyRequiered) { set_ValueNoCheck (COLUMNNAME_QtyRequiered, QtyRequiered); } @Override publi...
return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyReserved (final @Nullable BigDecimal QtyReserved) { set_ValueNoCheck (COLUMNNAME_QtyReserved, QtyReserved); } @Override public BigDecimal getQtyReserved() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyReserved); retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_RV_PP_Order_BOMLine.java
1
请完成以下Java代码
public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public DmnTypeDefinition getTypeDefinition() { return typeDefinition; }
public void setTypeDefinition(DmnTypeDefinition typeDefinition) { this.typeDefinition = typeDefinition; } @Override public String toString() { return "DmnVariableImpl{" + "id='" + id + '\'' + ", name='" + name + '\'' + ", typeDefinition=" + typeDefinition + '}'; } }
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnVariableImpl.java
1
请在Spring Boot框架中完成以下Java代码
public RouteLocator routes(RouteLocatorBuilder builder) { return builder.routes() .route("modify_request_body", r -> r.path("/post") .filters(f -> f.modifyRequestBody(String.class, Hello.class, MediaType.APPLICATION_JSON_VALUE, (exchange, s) -> Mono.just(new Hello(s.toUpperCa...
String message; public Hello() { } public Hello(String message) { this.message = message; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } } }
repos\tutorials-master\spring-cloud-modules\spring-cloud-gateway-2\src\main\java\com\baeldung\springcloudgateway\webfilters\config\ModifyBodyRouteConfig.java
2
请完成以下Java代码
private String buildStringRepresentation() { final StringBuilder sb = new StringBuilder(); sb.append(accountConceptualName != null ? accountConceptualName.getAsString() : "-"); sb.append("#").append(tableName); sb.append("#").append(Math.max(recordId, 0)); if (lineId > 0) { sb.append("#").append(lineId)...
return I_C_Payment.Table_Name.equals(tableName) ? PaymentId.optionalOfRepoId(recordId) : Optional.empty(); } public Optional<BankStatementId> getBankStatementId() { return I_C_BankStatement.Table_Name.equals(tableName) ? BankStatementId.optionalOfRepoId(recordId) : Optional.empty(); } public Op...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\open_items\FAOpenItemKey.java
1
请完成以下Java代码
public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!getClass().equals(obj.getClass())) { return false; } final EffectiveValuesEvaluatee other = (EffectiveValuesEvaluatee)obj; return values.equals(other.values)...
@Override public boolean has_Variable(final String variableName) { return values.containsKey(variableName); } @Override public String get_ValueOldAsString(final String variableName) { // TODO Auto-generated method stub return null; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\CachedStringExpression.java
1
请完成以下Java代码
private void putToQueue(TopicPartitionInfo tpi, TbMsg newMsg, TbQueueCallback callbackWrapper) { ToRuleEngineMsg toQueueMsg = ToRuleEngineMsg.newBuilder() .setTenantIdMSB(tenantId.getId().getMostSignificantBits()) .setTenantIdLSB(tenantId.getId().getLeastSignificantBits()) ...
private void pushMsgToNode(RuleNodeCtx nodeCtx, TbMsg msg, String fromRelationType) { if (nodeCtx != null) { var tbCtx = new DefaultTbContext(systemContext, ruleChainName, nodeCtx); nodeCtx.getSelfActor().tell(new RuleChainToRuleNodeMsg(tbCtx, msg, fromRelationType)); } else { ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\actors\ruleChain\RuleChainActorMessageProcessor.java
1
请完成以下Java代码
protected final Context getContext() { return this.context; } /** * Internal class used to supply the aggregate and cache the value. * * @param <T> the aggregate type */ protected static class AggregateSupplier<T> { private final Supplier<T> supplier; private @Nullable T supplied; public Aggregat...
this.supplier = supplier; } public T get() { if (this.supplied == null) { this.supplied = this.supplier.get(); } return this.supplied; } public boolean wasSupplied() { return this.supplied != null; } } }
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\bind\AggregateBinder.java
1
请完成以下Java代码
public final JComponent getComponent() { return findPanel; } @Override public boolean isExpanded() { return expanded; } @Override public void setExpanded(final boolean expanded) { if (this.expanded == expanded) { return; } this.expanded = expanded; findPanel.setVisible(expanded); findPan...
@Override public boolean requestFocusInWindow() { return findPanel.requestFocusInWindow(); } private final synchronized PropertyChangeSupport getPropertyChangeSupport() { if (_pcs == null) { _pcs = new PropertyChangeSupport(this); } return _pcs; } @Override public void runOnExpandedStateChange(f...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindPanelContainer_EmbeddedPanel.java
1
请完成以下Java代码
public boolean isNewDunningDoc(I_C_Dunning_Candidate candidate) { Result finalResult = null; for (IDunningAggregator agg : dunningAggregators) { final Result result = agg.isNewDunningDoc(candidate); if (result == Result.I_FUCKING_DONT_CARE) { continue; } if (result == null) { finalResu...
continue; } if (result == null) { finalResult = result; } if (!Util.same(result, finalResult)) { throw new DunningException("Confusing verdict for aggregators: " + dunningAggregators); } } if (finalResult == null) { finalResult = defaultDunningAggregator.isNewDunningDocLine(cand...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\CompositeDunningAggregator.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setC_OrderLine_ID (final int C_OrderLine_ID) { if (C_OrderLine_ID < 1) set_ValueNoCheck (COLUMNNAME_C_OrderLine_ID, null); else set_ValueNoCheck (COLUMNN...
@Override public void setM_InOut_ID (final int M_InOut_ID) { if (M_InOut_ID < 1) set_Value (COLUMNNAME_M_InOut_ID, null); else set_Value (COLUMNNAME_M_InOut_ID, M_InOut_ID); } @Override public int getM_InOut_ID() { return get_ValueAsInt(COLUMNNAME_M_InOut_ID); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_M_InOut_Overdelivery_C_OrderLine_v.java
1
请完成以下Java代码
public class Item { private UUID id; private String title; private List<Person> authors = new ArrayList<>(); private float price; public Item(){} public Item(String title, Author author) { this.id = UUID.randomUUID(); this.title = title; this.authors.add(author); }...
public void setTitle(String title) { this.title = title; } public List<Person> getAuthors() { return authors; } public void setAuthors(List<Person> authors) { this.authors = authors; } public float getPrice() { return price; } public void setPrice(floa...
repos\tutorials-master\video-tutorials\jackson-annotations-video\src\main\java\com\baeldung\jacksonannotation\deserialization\jsondeserialize\Item.java
1
请在Spring Boot框架中完成以下Java代码
public Thread getAsyncJobAcquisitionThread() { return asyncJobAcquisitionThread; } public void setAsyncJobAcquisitionThread(Thread asyncJobAcquisitionThread) { this.asyncJobAcquisitionThread = asyncJobAcquisitionThread; } public Thread getResetExpiredJobThread() { return resetE...
public void setUnlockOwnedJobs(boolean unlockOwnedJobs) { configuration.setUnlockOwnedJobs(unlockOwnedJobs); } @Override public AsyncTaskExecutor getTaskExecutor() { return taskExecutor; } @Override public void setTaskExecutor(AsyncTaskExecutor taskExecutor) { this.task...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\asyncexecutor\DefaultAsyncJobExecutor.java
2
请完成以下Java代码
public class ResourceDocumentSource implements DocumentSource { /** * The default file extensions, ".graphql" and ".gql". */ public static final List<String> FILE_EXTENSIONS = Arrays.asList(".graphql", ".gql"); private final List<Resource> locations; private final List<String> extensions; /** * Default...
@Override public Mono<String> getDocument(String name) { return Flux.fromIterable(this.locations) .flatMapIterable((location) -> getCandidateResources(name, location)) .filter(Resource::exists) .next() .map(this::resourceToString) .switchIfEmpty(Mono.fromRunnable(() -> { throw new IllegalSta...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\support\ResourceDocumentSource.java
1
请完成以下Java代码
public void setOrg(OrgLawType value) { this.org = value; } /** * Gets the value of the treatment property. * * @return * possible object is * {@link TreatmentType } * */ public TreatmentType getTreatment() { return treatment; } /** ...
*/ public String getRoleTitle() { return roleTitle; } /** * Sets the value of the roleTitle property. * * @param value * allowed object is * {@link String } * */ public void setRoleTitle(String value) { this.roleTitle = value; } ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\BodyType.java
1
请完成以下Java代码
private String computeDefaultValue_Line(final I_AD_Table table, final I_AD_Column column) { if (table.isView()) {return null;} if (!Check.isBlank(column.getColumnSQL())) {return null;} final String columnName = column.getColumnName(); final String tableName = table.getTableName(); final ImmutableSet<String...
parentColumnNames.forEach(parentColumnName -> { if (sqlWhereClause.length() > 0) { sqlWhereClause.append(" AND "); } sqlWhereClause.append("t.").append(parentColumnName).append("=@").append(parentColumnName).append("@"); }); return "@SQL=" + "SELECT CEILING(COALESCE(MAX(t." + columnName + "), 0...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\column\callout\AD_Column.java
1
请完成以下Java代码
public class ConnectCoreLogger extends ConnectLogger { public void closingResponse(CloseableConnectorResponse response) { logDebug("001", "Closing closeable connector response '{}'", response); } public void successfullyClosedResponse(CloseableConnectorResponse response) { logDebug("002", "Successfully ...
logInfo("004", "Discovered provider for connector id '{}' and class '{}': '{}'", connectorId, connectorInstance.getClass().getName(), provider.getClass().getName()); } } public ConnectorException multipleConnectorProvidersFound(String connectorId) { return new ConnectorException(exceptionMessage("0...
repos\camunda-bpm-platform-master\connect\core\src\main\java\org\camunda\connect\impl\ConnectCoreLogger.java
1
请完成以下Java代码
public void setM_Shipper(final org.compiere.model.I_M_Shipper M_Shipper) { set_ValueFromPO(COLUMNNAME_M_Shipper_ID, org.compiere.model.I_M_Shipper.class, M_Shipper); } @Override public void setM_Shipper_ID (final int M_Shipper_ID) { if (M_Shipper_ID < 1) set_Value (COLUMNNAME_M_Shipper_ID, null); else ...
} @Override public void setPriorityNo (final int PriorityNo) { set_Value (COLUMNNAME_PriorityNo, PriorityNo); } @Override public int getPriorityNo() { return get_ValueAsInt(COLUMNNAME_PriorityNo); } @Override public void setTransfertTime (final @Nullable BigDecimal TransfertTime) { set_Value (COLUM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_NetworkDistributionLine.java
1
请在Spring Boot框架中完成以下Java代码
public long getPingInterval() { return this.pingInterval; } public void setPingInterval(long pingInterval) { this.pingInterval = pingInterval; } public boolean isPrSingleHopEnabled() { return this.prSingleHopEnabled; } public void setPrSingleHopEnabled(boolean prSingleHopEnabled) { this.prSingleHopEnab...
public int getSocketBufferSize() { return this.socketBufferSize; } public void setSocketBufferSize(int socketBufferSize) { this.socketBufferSize = socketBufferSize; } public int getStatisticInterval() { return this.statisticInterval; } public void setStatisticInterval(int statisticInterval) { this.stat...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\PoolProperties.java
2
请完成以下Java代码
public class PriorityJobScheduler { private ExecutorService priorityJobPoolExecutor; private ExecutorService priorityJobScheduler = Executors.newSingleThreadExecutor(); private PriorityBlockingQueue<Job> priorityQueue; public PriorityJobScheduler(Integer poolSize, Integer queueSize) { p...
return priorityQueue.size(); } protected void close(ExecutorService scheduler) { scheduler.shutdown(); try { if (!scheduler.awaitTermination(5, TimeUnit.SECONDS)) { scheduler.shutdownNow(); } } catch (InterruptedException e) { schedule...
repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-2\src\main\java\com\baeldung\concurrent\prioritytaskexecution\PriorityJobScheduler.java
1
请完成以下Java代码
public static void merge() { HashMap<String, Product> productsByName = new HashMap<>(); Product eBike2 = new Product("E-Bike", "A bike with a battery"); eBike2.getTags().add("sport"); productsByName.merge("E-Bike", eBike2, Product::addTagsOfOtherProduct); //Prior to Java 8: ...
productsByName.compute("E-Bike", (k,v) -> { if(v != null) { return v.addTagsOfOtherProduct(eBike2); } else { return eBike2; } }); //Prior to Java 8: if(productsByName.containsKey("E-Bike")) { productsByName.get("E-B...
repos\tutorials-master\core-java-modules\core-java-collections-maps\src\main\java\com\baeldung\map\hashmapguide\Product.java
1
请完成以下Java代码
private boolean hasSelector(OperationParameter parameter) { return parameter.getAnnotation(Selector.class) != null; } private String dashName(OperationParameter parameter) { return "-" + parameter.getName(); } private boolean getBlocking(OperationMethod method) { return !REACTIVE_STREAMS_PRESENT || !Publish...
return this.blocking; } @Override public WebOperationRequestPredicate getRequestPredicate() { return this.requestPredicate; } @Override protected void appendFields(ToStringCreator creator) { creator.append("id", this.id) .append("blocking", this.blocking) .append("requestPredicate", this.requestPredic...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\web\annotation\DiscoveredWebOperation.java
1
请完成以下Java代码
protected void createDocumentLine(final IPackingMaterialDocumentLine pmLine) { final OrderLinePackingMaterialDocumentLine orderLinePMLine = toImpl(pmLine); final I_C_OrderLine pmOrderLine = orderLinePMLine.getC_OrderLine(); // qtyOrdered is in the product's UOM whereas QtyEntered is in the order line's UOM. The...
} @Override protected void linkSourceToDocumentLine(final IPackingMaterialDocumentLineSource source, final IPackingMaterialDocumentLine pmLine) { final OrderLinePackingMaterialDocumentLineSource orderLineSource = toImpl(source); final OrderLinePackingMaterialDocumentLine orderLinePMLine = toImpl(pmLine); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\order\api\impl\OrderPackingMaterialDocumentLinesBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public Deployment deploy(String bpmnFileUrl) { Deployment deploy = createDeployment().addClasspathResource(bpmnFileUrl).deploy(); return deploy; } @Override public Deployment deploy(String url, String pngUrl) { Deployment deploy = createDeployment().addClasspathResource(url).addCla...
.deploy(); } @Override public ProcessDefinition queryByProcessDefinitionKey(String processDefinitionKey) { ProcessDefinition processDefinition = createProcessDefinitionQuery() .processDefinitionKey(processDefinitionKey) .active().singleResult(); ...
repos\spring-boot-quick-master\quick-flowable\src\main\java\com\quick\flowable\service\handler\ProcessHandler.java
2
请完成以下Java代码
public static ByteArrayFileStream createByteArrayFileStream(FileInputStream fileInputStream) throws IOException { FileChannel channel = fileInputStream.getChannel(); long size = channel.size(); int bufferSize = (int) Math.min(1048576, size); ByteBuffer byteBuffer = ByteBuffer.allocat...
if (readBytes == availableBytes) { fileChannel.close(); fileChannel = null; } assert readBytes > 0 : "已到达文件尾部!"; byteBuffer.flip(); byte[] bytes = byteBuffer.array(); System.arraycopy(...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\io\ByteArrayFileStream.java
1
请在Spring Boot框架中完成以下Java代码
public String getTypeName() { return TYPE_NAME; } @Override public boolean isCachable() { return true; } @Override public Object getValue(ValueFields valueFields) { return valueFields.getBytes(); } @Override public void setValue(Object value, ValueFields va...
return; } byte[] bytes = (byte[]) value; lengthVerifier.verifyLength(bytes.length, valueFields, this); valueFields.setBytes((byte[]) value); } @Override public boolean isAbleToStore(Object value) { if (value == null) { return true; } ret...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\ByteArrayType.java
2
请完成以下Java代码
public String getViewId() { return viewId; } @Override @Deprecated public String toString() { return toJson(); } @JsonValue public String toJson() { return viewId; } public String getPart(final int index) { return parts.get(index); } public int getPartAsInt(final int index) { try { fi...
return parts.get(1); } /** * @return other parts (those which come after viewId part) */ @JsonIgnore // IMPORTANT: for some reason, without this annotation the json deserialization does not work even if we have toJson() method annotated with @JsonValue public ImmutableList<String> getOtherParts() { return p...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewId.java
1
请完成以下Java代码
public String getTableName() { return gridTab.getTableName(); } @Override public <T> T getSelectedModel(final Class<T> modelClass) { return gridTab.getModel(modelClass); } @Override public <T> List<T> getSelectedModels(final Class<T> modelClass) { // backward compatibility return streamS...
return Stream.of(getSelectedModel(modelClass)); } @Override public int getSingleSelectedRecordId() { return gridTab.getRecord_ID(); } @Override public SelectionSize getSelectionSize() { // backward compatibility return SelectionSize.ofSize(1); } @Override public <T> IQueryFilter<T> g...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\GridTab.java
1
请完成以下Java代码
public String uploadFile(String content, String fileExtension) { byte[] buff = content.getBytes(Charset.forName("UTF-8")); ByteArrayInputStream stream = new ByteArrayInputStream(buff); StorePath storePath = storageClient.uploadFile(stream,buff.length, fileExtension,null); return getResAc...
try { StorePath storePath = StorePath.praseFromUrl(fileUrl); storageClient.deleteFile(storePath.getGroup(), storePath.getPath()); } catch (FdfsUnsupportStorePathException e) { log.warn(e.getMessage()); } } // 除了FastDFSClientWrapper类中用到的api,客户端提供的api还有很多,可根据自身...
repos\springboot-demo-master\fastdfs\src\main\java\com\et\fastdfs\util\FastDFSClientWrapper.java
1
请在Spring Boot框架中完成以下Java代码
public void setOrderStateTimeList(List<OrderStateTimeEntity> orderStateTimeList) { this.orderStateTimeList = orderStateTimeList; } public PayModeEnum getPayModeEnum() { return payModeEnum; } public void setPayModeEnum(PayModeEnum payModeEnum) { this.payModeEnum = payModeEnum; ...
} public String getExpressNo() { return expressNo; } public void setExpressNo(String expressNo) { this.expressNo = expressNo; } public UserEntity getBuyer() { return buyer; } public void setBuyer(UserEntity buyer) { this.buyer = buyer; } @Override...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\order\OrdersEntity.java
2
请在Spring Boot框架中完成以下Java代码
private String updateTo(final IParams params) { String toTmp = ""; if (!params.hasParameter(I_C_BPartner.COLUMNNAME_C_BPartner_ID)) { throw new IllegalArgumentException("Process instance doesn't contain a business partner as parameter"); } // find the C_BPartner_ID parameter final int bpartnerId = par...
public String getExportFilePrefix() { return exportFilePrefix; } @Override public I_AD_User getFrom() { return from; } /** * @return <code>null</code> */ @Override public String getMessage() { return MESSAGE; } /** * @return the title of the process */ @Override public String getSubject()...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\compiere\report\email\service\impl\BPartnerEmailParams.java
2
请完成以下Java代码
public static void removeBpmnOverrideContext() { bpmnOverrideContextThreadLocal.remove(); } protected static ObjectNode getProcessDefinitionInfoNode(String processDefinitionId) { Map<String, ObjectNode> bpmnOverrideMap = getBpmnOverrideContext(); if (!bpmnOverrideMap.containsKey(process...
if (bpmnOverrideMap == null) { bpmnOverrideMap = new HashMap<String, ObjectNode>(); bpmnOverrideContextThreadLocal.set(bpmnOverrideMap); } bpmnOverrideMap.put(id, infoNode); } public static class ResourceBundleControl extends ResourceBundle.Control { @Override ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\context\Context.java
1
请完成以下Java代码
public SequenceFlow newInstance(ModelTypeInstanceContext instanceContext) { return new SequenceFlowImpl(instanceContext); } }); sourceRefAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_SOURCE_REF) .required() .idAttributeReference(FlowNode.class) .build(); targ...
sourceRefAttribute.setReferenceTargetElement(this, source); } public FlowNode getTarget() { return targetRefAttribute.getReferenceTargetElement(this); } public void setTarget(FlowNode target) { targetRefAttribute.setReferenceTargetElement(this, target); } public boolean isImmediate() { return...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\SequenceFlowImpl.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult delete(@RequestParam("ids") List<Long> ids) { int count = homeBrandService.delete(ids); if (count > 0) { return CommonResult.success(count); } return CommonResult.failed(); } @ApiOperation("批量修改推荐品牌状态") @RequestMapping(value = "/update/recomme...
} return CommonResult.failed(); } @ApiOperation("分页查询推荐品牌") @RequestMapping(value = "/list", method = RequestMethod.GET) @ResponseBody public CommonResult<CommonPage<SmsHomeBrand>> list(@RequestParam(value = "brandName", required = false) String brandName, ...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\SmsHomeBrandController.java
2
请完成以下Java代码
public void setDateAcct (java.sql.Timestamp DateAcct) { throw new IllegalArgumentException ("DateAcct is virtual column"); } /** Get Buchungsdatum. @return Accounting Date */ @Override public java.sql.Timestamp getDateAcct () { return (java.sql.Timestamp)get_Value(COLUMNNAME_DateAcct); } /** Set Besc...
@Override public void setFact_Acct_ID (int Fact_Acct_ID) { if (Fact_Acct_ID < 1) set_ValueNoCheck (COLUMNNAME_Fact_Acct_ID, null); else set_ValueNoCheck (COLUMNNAME_Fact_Acct_ID, Integer.valueOf(Fact_Acct_ID)); } /** Get Accounting Fact. @return Accounting Fact */ @Override public int getFact_Acc...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_TaxDeclarationAcct.java
1
请在Spring Boot框架中完成以下Java代码
public abstract class PathBasedTemplateAvailabilityProvider implements TemplateAvailabilityProvider { private final String className; private final Class<TemplateAvailabilityProperties> propertiesClass; private final String propertyPrefix; @SuppressWarnings("unchecked") public PathBasedTemplateAvailabilityProv...
private String prefix; private String suffix; protected TemplateAvailabilityProperties(String prefix, String suffix) { this.prefix = prefix; this.suffix = suffix; } protected abstract List<String> getLoaderPath(); public String getPrefix() { return this.prefix; } public void setPrefix(String...
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\template\PathBasedTemplateAvailabilityProvider.java
2
请完成以下Java代码
public class StandardServices implements IAddOn { @Override public void beforeConnection() { // Services related to inOut Services.registerService(IReplenishForFutureQty.class, new ReplenishForFutureQty()); // Services related to invoice Services.registerService(IInvoiceBL.class, new InvoiceBL()); Servic...
Services.registerService(IParameterBL.class, new ParameterBL()); Services.registerService(ICalendarDAO.class, new CalendarDAO()); Services.registerService(IPOService.class, new POService()); Services.registerService(IPriceListDAO.class, new PriceListDAO()); Services.registerService(ISweepTableBL.class, new Swe...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\addon\standard\StandardServices.java
1
请完成以下Java代码
public void setTargetWeight (final BigDecimal TargetWeight) { set_Value (COLUMNNAME_TargetWeight, TargetWeight); } @Override public BigDecimal getTargetWeight() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_TargetWeight); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setT...
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Tolerance_Perc); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setWeightChecksRequired (final int WeightChecksRequired) { set_Value (COLUMNNAME_WeightChecksRequired, WeightChecksRequired); } @Override public int getWeightChecksRequi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Order_Weighting_Run.java
1
请在Spring Boot框架中完成以下Java代码
public class Employee implements Serializable { @Id @Column(name = "employee_id") @GeneratedValue(strategy = GenerationType.IDENTITY) private Long employeeId; @Column(name = "first_name") private String firstName; @Column(name = "last_name") private String lastName; @ManyToMany(ca...
public Long getEmployeeId() { return employeeId; } public void setEmployeeId(Long employeeId) { this.employeeId = employeeId; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } ...
repos\tutorials-master\persistence-modules\hibernate-mapping\src\main\java\com\baeldung\hibernate\manytomany\model\Employee.java
2
请完成以下Java代码
public Stream<ImpDataLine> streamDataLines(final Resource resource) { final AtomicInteger nextLineNo = new AtomicInteger(1); return streamSourceLines(resource) .skip(skipFirstNRows) .map(lineStr -> createImpDataLine(lineStr, nextLineNo)); } private Stream<String> streamSourceLines(final Resource resour...
return Util.readBytes(resource.getInputStream()); } catch (final IOException ex) { throw new AdempiereException("Failed reading resource: " + resource, ex); } } private ImpDataLine createImpDataLine(final String lineStr, final AtomicInteger nextLineNo) { try { return ImpDataLine.builder() .fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\parser\ImpDataParser.java
1
请完成以下Java代码
public class ClaimTaskCmd implements Command<Void>, Serializable { private static final long serialVersionUID = 1L; protected String taskId; protected String userId; public ClaimTaskCmd(String taskId, String userId) { this.taskId = taskId; this.userId = userId; } public Void execute(CommandConte...
} else { task.setAssignee(userId); } } else { // Task should be assigned to no one task.setAssignee(null); } task.triggerUpdateEvent(); task.logUserOperation(UserOperationLogEntry.OPERATION_TYPE_CLAIM); return null; } protected void checkClaimTask(TaskEntity task, Com...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\ClaimTaskCmd.java
1
请完成以下Java代码
public Object eval(ScriptContext ctx) throws ScriptException { return evaluateExpression(valueExpression, ctx); } } /** * ValueMapper that uses the ScriptContext to get variable values or value expressions. * */ private class ScriptContextVariableMapper extends VariableMapper ...
*/ private class ScriptContextFunctionMapper extends FunctionMapper { private ScriptContext scriptContext; ScriptContextFunctionMapper(ScriptContext ctx) { this.scriptContext = ctx; } private String getFullFunctionName(String prefix, String localName) { ret...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\scripting\JuelScriptEngine.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setMobileUI_HUManager_ID (final int MobileUI_HUManager_ID) { if (MobileUI_HUManager_ID < 1) set_ValueNoCheck (COLUMNNAME_MobileUI_HUManager_ID, null); else ...
{ return get_ValueAsInt(COLUMNNAME_MobileUI_HUManager_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); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MobileUI_HUManager.java
1
请完成以下Java代码
public void setUseSuspenseBalancing (boolean UseSuspenseBalancing) { set_Value (COLUMNNAME_UseSuspenseBalancing, Boolean.valueOf(UseSuspenseBalancing)); } /** Get doppelte Buchführung. @return Verwendet doppelte Buchführung über Zwischenkonto bei manuellen Buchungen. */ @Override public boolean isUseSuspen...
} /** Get CpD-Fehlerkonto verwenden. @return CpD-Fehlerkonto verwenden */ @Override public boolean isUseSuspenseError () { Object oo = get_Value(COLUMNNAME_UseSuspenseError); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_AcctSchema_GL.java
1
请完成以下Java代码
public T execute(CommandContext commandContext) { if (taskId == null) { throw new ActivitiIllegalArgumentException("taskId is null"); } TaskEntity task = commandContext.getTaskEntityManager().findById(taskId); if (task == null) { throw new ActivitiObjectNotFound...
return execute(commandContext, task); } /** * Subclasses must implement in this method their normal command logic. The provided task is ensured to be active. */ protected abstract T execute(CommandContext commandContext, TaskEntity task); /** * Subclasses can override this method to pro...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\NeedsActiveTaskCmd.java
1
请完成以下Java代码
public boolean isEmpty() {return queuesById.isEmpty();} public Set<PickingSlotId> getPickingSlotIds() {return queuesById.keySet();} public OptionalInt getCountHUs(@NonNull final PickingSlotId pickingSlotId) { final PickingSlotQueueSummary queue = queuesById.get(pickingSlotId); return queue != null ? OptionalIn...
int countHUs = 0; for (final PickingSlotId pickingSlotId : pickingSlotIds) { final PickingSlotQueueSummary queue = queuesById.get(pickingSlotId); if (queue == null) { return OptionalInt.empty(); } countHUs += queue.getCountHUs(); } return OptionalInt.of(countHUs); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\slot\PickingSlotQueuesSummary.java
1
请完成以下Java代码
public class PreparedStatementInClause { public static ResultSet populateParamsWithStringBuilder(Connection connection, List<Integer> ids) throws SQLException { StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < ids.size(); i++) { stringBuilder.append("?,"); ...
PreparedStatement preparedStatement = connection.prepareStatement(sql); for (int i = 1; i <= ids.size(); i++) { preparedStatement.setInt(i, ids.get(i - 1)); } return preparedStatement.executeQuery(); } public static ResultSet populateParamsWithArray(Connection connection, Li...
repos\tutorials-master\persistence-modules\core-java-persistence-3\src\main\java\preparedstatementinclause\PreparedStatementInClause.java
1
请完成以下Java代码
private static I_C_SubscriptionProgress retrieveFirstPauseRecordSearchBackwards(final I_C_SubscriptionProgress firstSp) { final SubscriptionProgressQuery query = SubscriptionProgressQuery.endingRightBefore(firstSp) .includedContractStatus(X_C_SubscriptionProgress.CONTRACTSTATUS_DeliveryPause) .build(); fin...
if (pauseRecord.getM_ShipmentSchedule_ID() > 0) { Services.get(IShipmentScheduleBL.class).openShipmentSchedule(InterfaceWrapperHelper.load(pauseRecord.getM_ShipmentSchedule_ID(), I_M_ShipmentSchedule.class)); } } subtractFromSeqNoAndSave(pauseRecord, seqNoOffset); } return seqNoOffset; } priva...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\subscription\impl\subscriptioncommands\RemovePauses.java
1
请完成以下Java代码
public void setProcessInstanceId(String processInstanceId) { this.processInstanceId = processInstanceId; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getContentId() { return contentId; } publ...
} public void setContent(ByteArrayEntity content) { this.content = content; } public void setUserId(String userId) { this.userId = userId; } public String getUserId() { return userId; } public Date getTime() { return time; } public void setTime(Da...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\AttachmentEntityImpl.java
1
请完成以下Java代码
public static <T> ValueRestriction<T> equalsTo(@NonNull final T onlyValue) { return new ValueRestriction<>(Type.EQUALS_TO, onlyValue); } public static <T> ValueRestriction<T> equalsToOrNull(@Nullable final T onlyValue) { return onlyValue != null ? new ValueRestriction<>(Type.EQUALS_TO_OR_NULL, onlyValue) ...
public <RecordType> void appendFilter(@NonNull final IQueryBuilder<RecordType> queryBuilder, @NonNull final String columnName) { map(new CaseMappingFunction<T, Void>() { @Override public Void anyValue() { // do nothing return null; } @Override public Void valueIsNull() { queryBui...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dao\ValueRestriction.java
1
请在Spring Boot框架中完成以下Java代码
public class DashboardController { @RequestMapping(value = "/welcome", method = RequestMethod.GET) public ModelAndView welcome(){ ModelAndView model = new ModelAndView(); model.setViewName("welcome"); return model; } private List getUsers() { User user = new User(); ...
user1.setEmail("amitsingh@yahoo.com"); user1.setName("Amit Singh"); user1.setAddress("Chennai, Tamilnadu"); User user2 = new User(); user2.setEmail("bipulkumar@gmail.com"); user2.setName("Bipul Kumar"); user2.setAddress("Bangalore, Karnataka"); User user3 = new ...
repos\Spring-Boot-Advanced-Projects-main\Springboot integrated with JSP\SpringJSPUpdate\src\main\java\spring\jsp\DashboardController.java
2
请完成以下Java代码
String getEnvironmentName_FromEnvironmentVariables() { return environmentName; } @GetMapping("/java_home_and_environment") String getJavaHomeAndEnvironmentName_FromEnvironmentVariables() { return javaHomeAndEnvironmentName; } @GetMapping("non_existent_property") String getNonex...
String getBaeldungPresentation_FromValue() { return baeldungPresentation; } @GetMapping("baeldung_presentation_from_environment") String getBaeldungPresentation_FromEnvironment() { return environment.getProperty("baeldung.presentation"); } @GetMapping("baeldung_configuration_proper...
repos\tutorials-master\spring-boot-modules\spring-boot-properties\src\main\java\com\baeldung\envvariables\MyController.java
1
请在Spring Boot框架中完成以下Java代码
public Login createLogin() { return new Login(); } /** * Create an instance of {@link JAXBElement }{@code <}{@link GetAuth }{@code >} * * @param value * Java instance representing xml element's value. * @return * the new instance of {@link JAXBElement }{@code <}{@...
return new JAXBElement<GetAuthResponse>(_GetAuthResponse_QNAME, GetAuthResponse.class, null, value); } /** * Create an instance of {@link JAXBElement }{@code <}{@link LoginException }{@code >} * * @param value * Java instance representing xml element's value. * @return * ...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\ws\loginservice\v2_0\types\ObjectFactory.java
2
请完成以下Java代码
private JSONDashboardItemDataChangedEvent toJson(final UserDashboardItemDataResponse itemData, final KPIJsonOptions jsonOpts) { final JsonKPIDataResult jsonData = JsonKPIDataResult.of(itemData, jsonOpts); return JSONDashboardItemDataChangedEvent.of(itemData.getDashboardId(), itemData.getItemId(), jsonData); } p...
} public ImmutableList<UserDashboardItemDataResponse> getChangesFromOldVersion(@Nullable final Result oldResult) { if (oldResult == null) { return toList(); } final ImmutableList.Builder<UserDashboardItemDataResponse> resultEffective = ImmutableList.builder(); for (final Map.Entry<UserDashboard...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dashboard\websocket\UserDashboardWebsocketProducer.java
1
请完成以下Java代码
public boolean writeData(List<Object[]> products, OutputType outputType, String outputPath) { try (Writer outputWriter = new OutputStreamWriter(new FileOutputStream(new File(outputPath)), "UTF-8")) { switch (outputType) { case CSV: { CsvWriter writer = new CsvWriter(outpu...
FixedWidthFields fieldLengths = new FixedWidthFields(8, 30, 10); FixedWidthWriterSettings settings = new FixedWidthWriterSettings(fieldLengths); settings.setHeaders("product_no", "description", "unit_price"); settings.setRowWriterProcessor(rowProcessor); FixedWidthWriter ...
repos\tutorials-master\libraries-data-2\src\main\java\com\baeldung\univocity\OutputService.java
1
请在Spring Boot框架中完成以下Java代码
public String getProtocol() { return this.protocol; } public void setProtocol(String protocol) { this.protocol = protocol; } public Charset getDefaultEncoding() { return this.defaultEncoding; } public void setDefaultEncoding(Charset defaultEncoding) { this.defaultEncoding = defaultEncoding; } public...
* <p> * Note that the STARTTLS command can use the corresponding SSLSocketFactory, even * if the 'mail.(protocol).ssl.enable' property is not set. */ private @Nullable String bundle; public boolean isEnabled() { return this.enabled; } public void setEnabled(boolean enabled) { this.enabled = ena...
repos\spring-boot-4.0.1\module\spring-boot-mail\src\main\java\org\springframework\boot\mail\autoconfigure\MailProperties.java
2
请完成以下Java代码
public class UserNotAuthorizedException extends AdempiereException { public UserNotAuthorizedException() { super("Not authorized"); } public UserNotAuthorizedException(@NonNull final String message) { super(message); } public UserNotAuthorizedException(@Nullable final Throwable cause) { super(buildMsg(c...
} private static String buildMsg(@Nullable final Throwable cause) { final StringBuilder msg = new StringBuilder(); msg.append("Token not authorized."); // NOTE: don't include token in message because it might be a security issue if (cause != null) { msg.append(" Cause: ").append(extractMessage(cause));...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\UserNotAuthorizedException.java
1
请完成以下Java代码
public void addUrlMappings(String... urlMappings) { Assert.notNull(urlMappings, "'urlMappings' must not be null"); this.urlMappings.addAll(Arrays.asList(urlMappings)); } /** * Sets the {@code loadOnStartup} priority. See * {@link ServletRegistration.Dynamic#setLoadOnStartup} for details. * @param loadOnSta...
/** * Configure registration settings. Subclasses can override this method to perform * additional configuration if required. * @param registration the registration */ @Override protected void configure(ServletRegistration.Dynamic registration) { super.configure(registration); String[] urlMapping = String...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\ServletRegistrationBean.java
1
请完成以下Java代码
public Quantity getQty() { return huStorage.getQuantity(getProductId(), getC_UOM()); } @Override public final Quantity getQty(final I_C_UOM uom) { final UOMConversionContext conversionCtx = UOMConversionContext.of(getProductId()); final IUOMConversionBL uomConversionBL = Services.get(IUOMConversionBL.class...
{ return false; } @Override public void markStaled() { // nothing, so far, itemStorage is always database coupled, no in memory values } @Override public boolean isEmpty() { return huStorage.isEmpty(getProductId()); } @Override public I_M_HU getM_HU() { return huStorage.getM_HU(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\HUProductStorage.java
1
请完成以下Java代码
public final class OidcClientRegistrationAuthenticationConverter implements AuthenticationConverter { private final HttpMessageConverter<OidcClientRegistration> clientRegistrationHttpMessageConverter = new OidcClientRegistrationHttpMessageConverter(); @Override public Authentication convert(HttpServletRequest requ...
} return new OidcClientRegistrationAuthenticationToken(principal, clientRegistration); } MultiValueMap<String, String> parameters = OAuth2EndpointUtils.getQueryParameters(request); // client_id (REQUIRED) String clientId = parameters.getFirst(OAuth2ParameterNames.CLIENT_ID); if (!StringUtils.hasText(clie...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\web\authentication\OidcClientRegistrationAuthenticationConverter.java
1
请在Spring Boot框架中完成以下Java代码
public String getTaskId() { return taskId; } public void setTaskId(String taskId) { this.taskId = taskId; } public String getTaskUrl() { return taskUrl; } public void setTaskUrl(String taskUrl) { this.taskUrl = taskUrl; } public String getProcessInstan...
return processInstanceId; } public void setProcessInstanceId(String processInstanceId) { this.processInstanceId = processInstanceId; } public String getProcessInstanceUrl() { return processInstanceUrl; } public void setProcessInstanceUrl(String processInstanceUrl) { th...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\engine\CommentResponse.java
2
请完成以下Java代码
public org.compiere.model.I_M_DiscountSchema_Calculated_Surcharge getM_DiscountSchema_Calculated_Surcharge() { return get_ValueAsPO(COLUMNNAME_M_DiscountSchema_Calculated_Surcharge_ID, org.compiere.model.I_M_DiscountSchema_Calculated_Surcharge.class); } @Override public void setM_DiscountSchema_Calculated_Surcha...
public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setProcessing (final boolean Processing) { set_Value (COLUMNNAME_Processing, Processing); } @Override public boolean isProcessing() { return get_ValueAsBoolean(COLUMNNAME_Processing); } @Override...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DiscountSchema.java
1
请完成以下Java代码
default URL getIssuer() { return this.getClaimAsURL(JwtClaimNames.ISS); } /** * Returns the Subject {@code (sub)} claim which identifies the principal that is the * subject of the JWT. * @return the Subject identifier */ default String getSubject() { return this.getClaimAsString(JwtClaimNames.SUB); } ...
default Instant getNotBefore() { return this.getClaimAsInstant(JwtClaimNames.NBF); } /** * Returns the Issued at {@code (iat)} claim which identifies the time at which the * JWT was issued. * @return the Issued at claim which identifies the time at which the JWT was issued */ default Instant getIssuedAt()...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JwtClaimAccessor.java
1
请完成以下Java代码
public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { log.error("Exception in {}.{}() with cause = {}", joinPoint.getSignature().getDeclaringTypeName(), joinPoint.getSignature().getName(), e.getCause() != null? e.getCause() : "NULL"); } /** * Advice that logs when a ...
joinPoint.getSignature().getName(), Arrays.toString(joinPoint.getArgs())); } try { Object result = joinPoint.proceed(); if (log.isDebugEnabled()) { log.debug("Exit: {}.{}() with result = {}", joinPoint.getSignature().getDeclaringTypeName(), joi...
repos\Spring-Boot-Advanced-Projects-main\springboot2-springaop-example\src\main\java\net\alanbinu\springboot2\springboot2jpacrudexample\aspect\LoggingAspect.java
1
请完成以下Java代码
public final I_M_HU_PI_Attribute getM_HU_PI_Attribute() { return huPIAttribute; } @Override public final I_C_UOM getC_UOM() { final int uomId = huPIAttribute.getC_UOM_ID(); if (uomId > 0) { return Services.get(IUOMDAO.class).getById(uomId); } else { // fallback to M_Attribute's UOM return s...
} @Override public final boolean isMandatory() { return huPIAttribute.isMandatory(); } @Override public final int getDisplaySeqNo() { final int seqNo = huPIAttribute.getSeqNo(); if (seqNo > 0) { return seqNo; } // Fallback: if SeqNo was not set, return max int (i.e. show them last) return Int...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\AbstractHUAttributeValue.java
1
请完成以下Java代码
@Nullable String getErrorReport() { Map<String, List<PropertyMigration>> content = getContent(LegacyProperties::getUnsupported); if (content.isEmpty()) { return null; } StringBuilder report = new StringBuilder(); report.append(String .format("%nThe use of configuration keys that are no longer supported ...
} /** * Register a new property source. * @param name the name of the property source * @param properties the {@link PropertyMigration} instances */ void add(String name, List<PropertyMigration> properties) { this.content.put(name, new LegacyProperties(properties)); } private static class LegacyProperti...
repos\spring-boot-4.0.1\core\spring-boot-properties-migrator\src\main\java\org\springframework\boot\context\properties\migrator\PropertiesMigrationReport.java
1
请完成以下Java代码
public void setUser2(final org.compiere.model.I_C_ElementValue User2) { set_ValueFromPO(COLUMNNAME_User2_ID, org.compiere.model.I_C_ElementValue.class, User2); } @Override public void setUser2_ID (final int User2_ID) { if (User2_ID < 1) set_Value (COLUMNNAME_User2_ID, null); else set_Value (COLUMNNA...
{ set_Value (COLUMNNAME_UserElementString6, UserElementString6); } @Override public java.lang.String getUserElementString6() { return get_ValueAsString(COLUMNNAME_UserElementString6); } @Override public void setUserElementString7 (final @Nullable java.lang.String UserElementString7) { set_Value (COLUMN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_InvoiceLine.java
1
请完成以下Java代码
public final class VRowIDRenderer implements TableCellRenderer { /** * Constructor */ public VRowIDRenderer(boolean enableSelection) { m_select = enableSelection; } // VRowIDRenderer private boolean m_select = false; private JButton m_button = new JButton(); private JCheckBox m_check = null; /** * E...
*/ public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { if (m_select) { if (m_check == null) m_check = new JCheckBox(); Object[] data = (Object[])value; if (data == null || data[1] == null) m_check.setSelected(fa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VRowIDRenderer.java
1
请完成以下Java代码
public boolean hasOddId() { return id % 2 != 0; } public boolean equals(final Object o) { if (o == this) return true; if (!(o instanceof Employee)) return false; final Employee other = (Employee) o; if (!other.canEqual((Object) this)) return false; if (this.getId...
return true; } public int hashCode() { final int PRIME = 59; int result = 1; result = result * PRIME + this.getId(); result = result * PRIME + this.getAge(); result = result * PRIME + (this.hasOddId() ? 79 : 97); final Object $name = this.getName(); resul...
repos\tutorials-master\lombok-modules\lombok\src\main\java\com\baeldung\lombok\equalsandhashcode\include\methodlevel\EmployeeDelomboked.java
1
请完成以下Java代码
public class DataStore extends BaseElement { protected String name; protected String dataState; protected String itemSubjectRef; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDataState() { retu...
return itemSubjectRef; } public void setItemSubjectRef(String itemSubjectRef) { this.itemSubjectRef = itemSubjectRef; } public DataStore clone() { DataStore clone = new DataStore(); clone.setValues(this); return clone; } public void setValues(DataStore otherEle...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\DataStore.java
1
请完成以下Java代码
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } ProcessDefinitionImpl that = (ProcessDefinitionImpl) o; ...
return ( "ProcessDefinition{" + "id='" + id + '\'' + ", name='" + name + '\'' + ", key='" + key + '\'' + ", description='" + description + '\'' + ", for...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\ProcessDefinitionImpl.java
1
请完成以下Java代码
public class Fact { @Position(0) private String element; @Position(1) private String place; public Fact(String element, String place) { this.element = element; this.place = place; } public String getElement() { return element; } public void setElement(Str...
} @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Fact other = (Fact) obj; if (element == null) { if (other.element ...
repos\tutorials-master\drools\src\main\java\com\baeldung\drools\model\Fact.java
1
请完成以下Java代码
private DestinationTopic.Type getDestinationTopicType(Long backOffValue) { return this.isSameIntervalReuse && hasDuplicates(backOffValue) ? Type.REUSABLE_RETRY_TOPIC : Type.RETRY; } private int reusableTopicAttempts() { if (this.isSameIntervalReuse && this.backOffValues.size() > 1) { // Assuming that duplicat...
} private String joinWithRetrySuffix(long parameter) { return String.join("-", this.destinationTopicSuffixes.getRetrySuffix(), String.valueOf(parameter)); } public static class DestinationTopicSuffixes { private final String retryTopicSuffix; private final String dltSuffix; public DestinationTopicSuffix...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\DestinationTopicPropertiesFactory.java
1
请完成以下Java代码
public int getM_Product_Category_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_Category_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_M_Product getM_Product() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_M_Product_ID, org.comp...
set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Produkt. @return Produkt, Leistung, Artikel */ @Override public int getM_Product_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); if (ii == null) return 0; return ii.intValue(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQ_TopicSubscriberOnly.java
1
请完成以下Java代码
public String getCustomPropertiesResolverImplementation() { return customPropertiesResolverImplementation; } public void setCustomPropertiesResolverImplementation(String customPropertiesResolverImplementation) { this.customPropertiesResolverImplementation = customPropertiesResolverImplementatio...
} public void setValues(ActivitiListener otherListener) { setEvent(otherListener.getEvent()); setImplementation(otherListener.getImplementation()); setImplementationType(otherListener.getImplementationType()); fieldExtensions = new ArrayList<FieldExtension>(); if (otherList...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\ActivitiListener.java
1
请完成以下Java代码
public TbMsgBuilder data(String data) { this.data = data; return this; } public TbMsgBuilder ruleChainId(RuleChainId ruleChainId) { this.ruleChainId = ruleChainId; return this; } public TbMsgBuilder ruleNodeId(RuleNodeId ruleNodeId) { ...
this.ctx = ctx; return this; } public TbMsgBuilder callback(TbMsgCallback callback) { this.callback = callback; return this; } public TbMsg build() { return new TbMsg(queueName, id, ts, internalType, type, originator, customerId, metaData...
repos\thingsboard-master\common\message\src\main\java\org\thingsboard\server\common\msg\TbMsg.java
1
请在Spring Boot框架中完成以下Java代码
static final class DefaultCodecCustomizer implements CodecCustomizer, Ordered { private final boolean logRequestDetails; private final @Nullable DataSize maxInMemorySize; DefaultCodecCustomizer(boolean logRequestDetails, @Nullable DataSize maxInMemorySize) { this.logRequestDetails = logRequestDetails; ...
static class NoJacksonOrJackson2Preferred extends AnyNestedCondition { NoJacksonOrJackson2Preferred() { super(ConfigurationPhase.PARSE_CONFIGURATION); } @ConditionalOnMissingClass("tools.jackson.databind.json.JsonMapper") static class NoJackson { } @ConditionalOnProperty(name = "spring.http.codecs.pr...
repos\spring-boot-4.0.1\module\spring-boot-http-codec\src\main\java\org\springframework\boot\http\codec\autoconfigure\CodecsAutoConfiguration.java
2
请完成以下Java代码
public String toString() { StringBuilder strb = new StringBuilder(); strb.append("[Validation set: '").append(validatorSetName).append("' | Problem: '").append(problem).append("'] : "); strb.append(defaultDescription); strb.append(" - [Extra info : "); boolean extraInfoAlreadyPre...
} strb.append("id = ").append(itemId).append(" | "); extraInfoAlreadyPresent = true; } if (itemName != null) { if (extraInfoAlreadyPresent) { strb.append(" | "); } strb.append("name = ").append(itemName).append(" | "); ...
repos\flowable-engine-main\modules\flowable-case-validation\src\main\java\org\flowable\cmmn\validation\validator\ValidationEntry.java
1
请完成以下Java代码
public final class BearerTokenErrors { private static final BearerTokenError DEFAULT_INVALID_REQUEST = invalidRequest("Invalid request"); private static final BearerTokenError DEFAULT_INVALID_TOKEN = invalidToken("Invalid token"); private static final BearerTokenError DEFAULT_INSUFFICIENT_SCOPE = insufficientScop...
* @param message a description of the error * @return a {@link BearerTokenError} */ public static BearerTokenError invalidToken(String message) { try { return new BearerTokenError(BearerTokenErrorCodes.INVALID_TOKEN, HttpStatus.UNAUTHORIZED, message, DEFAULT_URI); } catch (IllegalArgumentException ex...
repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\BearerTokenErrors.java
1
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .add("field", fieldName) .add("class", classRef) .toString(); } public Field getField() { // Get if not expired { final WeakReference<Field> weakRef = fieldRef.get(); final Field field = weakRef != null ? weakRef.get() : nul...
// Load the class try { final Class<?> clazz = classRef.getReferencedClass(); final Field fieldNew = clazz.getDeclaredField(fieldName); fieldRef.set(new WeakReference<>(fieldNew)); return fieldNew; } catch (final Exception ex) { throw new IllegalStateException("Cannot load expired field: " + c...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\reflect\FieldReference.java
1
请完成以下Java代码
public void saveMovie() { EntityManager em = HibernateOperations.getEntityManager(); em.getTransaction() .begin(); Movie movie = new Movie(); movie.setId(1L); movie.setMovieName("The Godfather"); movie.setReleaseYear(1972); movie.setLanguage("English")...
*/ public Movie getMovie(Long movieId) { EntityManager em = HibernateOperations.getEntityManager(); Movie movie = em.find(Movie.class, Long.valueOf(movieId)); return movie; } /** * Method to illustrate the usage of merge() function. */ public void mergeMovie() { ...
repos\tutorials-master\persistence-modules\hibernate5\src\main\java\com\baeldung\hibernate\operations\HibernateOperations.java
1
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public byte[] getBytes() { return bytes; } public void setBytes(byte[] bytes) { this.bytes ...
} public void setTenantId(String tenantId) { this.tenantId = tenantId; } public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.creat...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ResourceEntity.java
1
请完成以下Java代码
public class CalledProcessInstanceDto extends ProcessInstanceDto { protected String processDefinitionId; protected String processDefinitionKey; protected String processDefinitionName; protected List<IncidentStatisticsDto> incidents; protected String callActivityInstanceId; protected String callActivityId;...
public String getProcessDefinitionKey() { return processDefinitionKey; } public String getProcessDefinitionName() { return processDefinitionName; } public List<IncidentStatisticsDto> getIncidents() { return incidents; } public void setIncidents(List<IncidentStatisticsDto> incidents) { thi...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\cockpit\impl\plugin\base\dto\CalledProcessInstanceDto.java
1
请完成以下Java代码
public class LiquibaseDatatypes { public static void main(String[] args) { List<LiquibaseDataType> dataTypes = getDataTypes(); List<AbstractJdbcDatabase> databases = getDatabases(); for (LiquibaseDataType dataTypeInstance : dataTypes) { try { LiquibaseDataType da...
new NVarcharType(), new ClobType(), new CurrencyType(), new UUIDType()); } private static List<AbstractJdbcDatabase> getDatabases() { return List.of( new MySQLDatabase(), new SQLiteDatabase(), new H2Database(), new PostgresDatabase()...
repos\tutorials-master\persistence-modules\liquibase\src\main\java\com\baeldung\liquibase\utility\LiquibaseDatatypes.java
1
请完成以下Java代码
public void deployResources(String deploymentNameHint, Resource[] resources, RepositoryService repositoryService) { DeploymentBuilder deploymentBuilder = repositoryService .createDeployment() .enableDuplicateFiltering() .name(deploymentNameHint); int validProcessCoun...
"The following resource wasn't included in the deployment since it is invalid:\n{}", resourceName ); } } deploymentBuilder = loadApplicationUpgradeContext(deploymentBuilder); if (validProcessCount != 0) { deploymentBuilder.deploy(); ...
repos\Activiti-develop\activiti-core\activiti-spring\src\main\java\org\activiti\spring\autodeployment\FailOnNoProcessAutoDeploymentStrategy.java
1
请完成以下Java代码
public class FileValueMapper extends AbstractTypedValueMapper<FileValue> { protected EngineClient engineClient; public FileValueMapper(EngineClient engineClient) { super(FILE); this.engineClient = engineClient; } public FileValue convertToTypedValue(UntypedValueImpl untypedValue) { throw new Unsu...
if (fileValue.getMimeType() != null) { valueInfo.put(VALUE_INFO_FILE_MIME_TYPE, fileValue.getMimeType()); } typedValueField.setValueInfo(valueInfo); byte[] bytes = ((FileValueImpl) fileValue).getByteArray(); if (bytes != null) { typedValueField.setValue(Base64.encodeBase64String(bytes)); ...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\variable\impl\mapper\FileValueMapper.java
1
请完成以下Java代码
public static int compareLevel(String name1, String name2) { PositionLevelEnum pos1 = getByName(name1); PositionLevelEnum pos2 = getByName(name2); if (pos1 == null || pos2 == null) { return 0; } // 等级数字越小代表职级越高 return pos2.getLevel() - pos1.getLevel(); }...
return Arrays.asList(CHAIRMAN.getName(), GENERAL_MANAGER.getName(), VICE_GENERAL_MANAGER.getName()); } /** * 获取所有职级名称(按等级排序) * @return 所有职级名称列表 */ public static List<String> getAllPositionNames() { return Arrays.asList( CHAIRMAN.getName(), GENERAL_MANAGER.getName(), V...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\constant\enums\PositionLevelEnum.java
1
请完成以下Java代码
public String getVariableId() { return variableId; } public String getVariableName() { return variableName; } public String[] getVariableNames() { return variableNames; } public String getVariableNameLike() { return variableNameLike; } public String[] getExecutionIds() { return e...
return caseInstanceIds; } public String[] getTaskIds() { return taskIds; } public String[] getBatchIds() { return batchIds; } public String[] getVariableScopeIds() { return variableScopeIds; } public String[] getActivityInstanceIds() { return activityInstanceIds; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\VariableInstanceQueryImpl.java
1
请完成以下Java代码
public String getSKU () { return (String)get_Value(COLUMNNAME_SKU); } /** Set Symbol. @param UOMSymbol Symbol for a Unit of Measure */ public void setUOMSymbol (String UOMSymbol) { set_ValueNoCheck (COLUMNNAME_UOMSymbol, UOMSymbol); } /** Get Symbol. @return Symbol for a Unit of Measure */ p...
{ set_ValueNoCheck (COLUMNNAME_Value, Value); } /** Get Search Key. @return Search key for the record in the format required - must be unique */ public String getValue () { return (String)get_Value(COLUMNNAME_Value); } /** Set Warehouse. @param WarehouseName Warehouse Name */ public void setW...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_RV_WarehousePrice.java
1
请完成以下Java代码
public void setSektionNo (final @Nullable java.lang.String SektionNo) { set_Value (COLUMNNAME_SektionNo, SektionNo); } @Override public java.lang.String getSektionNo() { return get_ValueAsString(COLUMNNAME_SektionNo); } /** * Type AD_Reference_ID=541287 * Reference name: ESR_Type */ public static ...
public static final String TYPE_ESR = "ISR Reference"; /** SCOR = SCOR Reference */ public static final String TYPE_SCOR = "SCOR"; @Override public void setType (final java.lang.String Type) { set_Value (COLUMNNAME_Type, Type); } @Override public java.lang.String getType() { return get_ValueAsString(COLU...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-gen\de\metas\payment\esr\model\X_ESR_ImportLine.java
1
请完成以下Java代码
public int getC_Invoice_ID() { return get_ValueAsInt(COLUMNNAME_C_Invoice_ID); } @Override public void setEDI_cctop_120_v_ID (final int EDI_cctop_120_v_ID) { if (EDI_cctop_120_v_ID < 1) set_ValueNoCheck (COLUMNNAME_EDI_cctop_120_v_ID, null); else set_ValueNoCheck (COLUMNNAME_EDI_cctop_120_v_ID, EDI...
@Override public void setNetDays (final int NetDays) { set_Value (COLUMNNAME_NetDays, NetDays); } @Override public int getNetDays() { return get_ValueAsInt(COLUMNNAME_NetDays); } @Override public void setsinglevat (final @Nullable BigDecimal singlevat) { set_Value (COLUMNNAME_singlevat, singlevat); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_cctop_120_v.java
1
请完成以下Java代码
public String eq(ModelMap map) { map.addAttribute("name", "neo"); map.addAttribute("age", 30); map.addAttribute("flag", "yes"); return "eq"; } @RequestMapping("/switch") public String switchcase(ModelMap map) { map.addAttribute("sex", "woman"); return "switch...
map.addAttribute("users", getUserList()); map.addAttribute("count", 12); map.addAttribute("date", new Date()); return "utility"; } private List<User> getUserList(){ List<User> list=new ArrayList<User>(); User user1=new User("大牛",12,"123456"); User user2=new User(...
repos\spring-boot-leaning-master\2.x_42_courses\第 2-4 课 模板引擎 Thymeleaf 高阶用法\spring-boot-thymeleaf\src\main\java\com\neo\web\ExampleController.java
1
请在Spring Boot框架中完成以下Java代码
public class DefaultNativeAssetRepository extends AbstractNativeRepository implements NativeAssetRepository { private final String COUNT_QUERY = "SELECT count(id) FROM asset;"; public DefaultNativeAssetRepository(NamedParameterJdbcTemplate jdbcTemplate, TransactionTemplate transactionTemplate) { super...
public PageData<ProfileEntityIdInfo> findProfileEntityIdInfosByTenantId(UUID tenantId, Pageable pageable) { String PROFILE_ASSET_ID_INFO_QUERY = String.format("SELECT tenant_id as tenantId, customer_id as customerId, asset_profile_id as profileId, id as id FROM asset WHERE tenant_id = '%s' ORDER BY created_time...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\device\DefaultNativeAssetRepository.java
2
请完成以下Java代码
public void removeBottomCategory(BottomCategory bottomCategory) { bottomCategory.setMiddleCategory(null); bottomCategories.remove(bottomCategory); } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { ...
public void setTopCategory(TopCategory topCategory) { this.topCategory = topCategory; } @Override public int hashCode() { return 2018; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Mid...
repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoSqlResultSetMapping\src\main\java\com\app\entity\MiddleCategory.java
1
请完成以下Java代码
protected void validate() { super.validate(); Assert.notNull(getClaims().get(OidcProviderMetadataClaimNames.JWKS_URI), "jwksUri cannot be null"); Assert.notNull(getClaims().get(OidcProviderMetadataClaimNames.SUBJECT_TYPES_SUPPORTED), "subjectTypes cannot be null"); Assert.isInstanceOf(List.class, getCl...
((List<String>) getClaims().get(name)).add(value); } @SuppressWarnings("unchecked") private void acceptClaimValues(String name, Consumer<List<String>> valuesConsumer) { Assert.hasText(name, "name cannot be empty"); Assert.notNull(valuesConsumer, "valuesConsumer cannot be null"); getClaims().computeIfAbs...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\OidcProviderConfiguration.java
1
请完成以下Java代码
protected void prepare() { for (ProcessInfoParameter para : getParametersAsArray()) { final String name = para.getParameterName(); if (para.getParameter() == null) { continue; } else if (name.equals(PARAM_AD_User_ID)) { p_AD_User_ID = para.getParameterAsInt(); } } } @Override pro...
} return "Count: " + cnt; } /** * check if the TreeBar already exists */ private boolean existsAlready(final int AD_User_ID, final int Node_ID) { final String whereClause = I_AD_TreeBar.COLUMNNAME_AD_User_ID + " = ? AND " + I_AD_TreeBar.COLUMNNAME_Node_ID + " = ?"; return new TypedSqlQu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\process\AD_User_CopyFavoritesPanel.java
1
请完成以下Java代码
public static String normalizeFilterFactoryName(Class<? extends GatewayFilterFactory> clazz) { return removeGarbage(clazz.getSimpleName().replace(GatewayFilterFactory.class.getSimpleName(), "")); } public static String normalizeGlobalFilterName(Class<? extends GlobalFilter> clazz) { return removeGarbage(clazz.ge...
matcher.appendReplacement(stringBuffer, matcher.group(1)); } } return stringBuffer.toString().toLowerCase(Locale.ROOT); } private static String removeGarbage(String s) { int garbageIdx = s.indexOf("$Mockito"); if (garbageIdx > 0) { return s.substring(0, garbageIdx); } return s; } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\support\NameUtils.java
1
请完成以下Java代码
public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) return ...
*/ public void setSalesRep_ID (int SalesRep_ID) { if (SalesRep_ID < 1) set_Value (COLUMNNAME_SalesRep_ID, null); else set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID)); } /** Get Sales Representative. @return Sales Representative or Company Agent */ public int getSalesRep_ID () {...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_InvoiceBatch.java
1