instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | private List<OperationParameter> getOperationParameters(Parameter[] parameters, @Nullable String[] names) {
List<OperationParameter> operationParameters = new ArrayList<>(parameters.length);
for (int i = 0; i < names.length; i++) {
String name = names[i];
Assert.state(name != null, "'name' must not be null");... | public OperationParameter get(int index) {
return this.operationParameters.get(index);
}
@Override
public Iterator<OperationParameter> iterator() {
return this.operationParameters.iterator();
}
@Override
public Stream<OperationParameter> stream() {
return this.operationParameters.stream();
}
} | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\invoke\reflect\OperationMethodParameters.java | 1 |
请完成以下Java代码 | protected void customizeHUEditorView(@NonNull final HUEditorViewBuilder huViewBuilder)
{
huViewBuilder
.addAdditionalRelatedProcessDescriptor(createProcessDescriptor(de.metas.ui.web.picking.husToPick.process.WEBUI_Picking_HUEditor_PickHU.class))
.addAdditionalRelatedProcessDescriptor(createProcessDescriptor(... | final CreateViewRequest.Builder filterViewBuilder = CreateViewRequest.filterViewBuilder(view, filterViewRequest);
if (view instanceof HUEditorView)
{
final HUEditorView huEditorView = HUEditorView.cast(view);
filterViewBuilder.setParameters(huEditorView.getParameters());
final ViewId parentViewId = huEdi... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\husToPick\HUsToPickViewFactory.java | 1 |
请完成以下Java代码 | public String getUPC ()
{
return (String)get_Value(COLUMNNAME_UPC);
}
/** Set Partner Category.
@param VendorCategory
Product Category of the Business Partner
*/
public void setVendorCategory (String VendorCategory)
{
set_Value (COLUMNNAME_VendorCategory, VendorCategory);
}
/** Get Partner Categor... | /** Set Partner Product Key.
@param VendorProductNo
Product Key of the Business Partner
*/
public void setVendorProductNo (String VendorProductNo)
{
set_Value (COLUMNNAME_VendorProductNo, VendorProductNo);
}
/** Get Partner Product Key.
@return Product Key of the Business Partner
*/
public String g... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_PO.java | 1 |
请完成以下Java代码 | public class DefaultHistoryTaskManager implements InternalHistoryTaskManager {
protected ProcessEngineConfigurationImpl processEngineConfiguration;
public DefaultHistoryTaskManager(ProcessEngineConfigurationImpl processEngineConfiguration) {
this.processEngineConfiguration = processEngineConfigura... | CommandContextUtil.getHistoryManager().recordTaskCreated(taskEntity, null);
}
@Override
public void recordHistoryUserTaskLog(HistoricTaskLogEntryBuilder taskLogEntryBuilder) {
CommandContextUtil.getHistoryManager().recordHistoricUserTaskLogEntry(taskLogEntryBuilder);
}
@Override
public... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\history\DefaultHistoryTaskManager.java | 1 |
请完成以下Java代码 | public BigDecimal getAvailableAmount(final PaymentId paymentId)
{
Adempiere.assertUnitTestMode();
final I_C_Payment payment = getById(paymentId);
return payment.getPayAmt();
}
@Override
public BigDecimal getAllocatedAmt(final PaymentId paymentId)
{
final I_C_Payment payment = getById(paymentId);
return... | ClientId.ofRepoId(line.getAD_Client_ID()),
OrgId.ofRepoId(line.getAD_Org_ID()));
sum = sum.add(lineAmtConv);
}
else
{
sum = sum.add(lineAmt);
}
}
return sum;
}
@Override
public void updateDiscountAndPayment(final I_C_Payment payment, final int c_Invoice_ID, final I_C_DocType c_DocType... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\api\impl\PlainPaymentDAO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PaymentToAllocate
{
@NonNull
PaymentId paymentId;
@NonNull
ClientAndOrgId clientAndOrgId;
@NonNull
String documentNo;
@NonNull
BPartnerId bpartnerId;
@NonNull
LocalDate dateTrx; | @NonNull
LocalDate dateAcct;
@NonNull
PaymentAmtMultiplier paymentAmtMultiplier;
@NonNull
Amount payAmt;
@NonNull
Amount openAmt;
@NonNull
PaymentDirection paymentDirection;
@NonNull
PaymentCurrencyContext paymentCurrencyContext;
} | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\paymentallocation\PaymentToAllocate.java | 2 |
请完成以下Java代码 | public ManufacturingJob withCurrentScaleDevice(@Nullable final DeviceId currentScaleDeviceId)
{
return !DeviceId.equals(this.currentScaleDeviceId, currentScaleDeviceId)
? toBuilder().currentScaleDeviceId(currentScaleDeviceId).build()
: this;
}
@NonNull
public LocalDate getDateStartScheduleAsLocalDate()
... | final ImmutableList<ManufacturingJobActivity> updatedActivities = activities
.stream()
.map(activity -> activity.withChangedRawMaterialsIssue(mapper))
.collect(ImmutableList.toImmutableList());
return withActivities(updatedActivities);
}
public Stream<RawMaterialsIssueLine> streamRawMaterialsIssueLine... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\model\ManufacturingJob.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MessageController {
@MessageMapping("MyDestination")
public Mono<String> message(Mono<String> input) {
return input.doOnNext(msg -> System.out.println("Request is:" + msg + ",Request!"))
.map(msg -> msg + ",Response!");
}
@MessageMapping("Counter")
public Flux<Stri... | @MessageMapping("channel")
public Flux<String> channel(Flux<String> input) {
return input.doOnNext(i -> {
System.out.println("Received message is : " + i);
})
.map(m -> m.toUpperCase())
.doOnNext(r -> {
System.out.println("RESPONSE IS :" + ... | repos\tutorials-master\spring-reactive-modules\spring-6-rsocket\src\main\java\com\baeldung\rsocket\responder\MessageController.java | 2 |
请完成以下Java代码 | public class MethodsToInitializeLinkedList {
/**
* Initialize an Empty List
*/
public void initializeEmptyList() {
LinkedList<String> linkedList=new LinkedList<String>();
linkedList.addFirst("one");
linkedList.add("two");
linkedList.add("three");
System.out.... | /**
* Initialize a List from a Collection
*/
public void initializeListFromCollection() {
ArrayList<Integer> arrayList=new ArrayList<Integer>(3);
arrayList.add(Integer.valueOf(1));
arrayList.add(Integer.valueOf(2));
arrayList.add(Integer.valueOf(3));
LinkedList<... | repos\tutorials-master\core-java-modules\core-java-collections-list-2\src\main\java\com\baeldung\linkedlist\MethodsToInitializeLinkedList.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getServiceValue()
{
return "LocalFileSyncProducts";
}
@Override
public String getExternalSystemTypeCode()
{
return PCM_SYSTEM_NAME;
}
@Override
public String getEnableCommand()
{
return START_PRODUCT_SYNC_LOCAL_FILE_ROUTE;
} | @Override
public String getDisableCommand()
{
return STOP_PRODUCT_SYNC_LOCAL_FILE_ROUTE;
}
@NonNull
public String getStartProductRouteId()
{
return getExternalSystemTypeCode() + "-" + getEnableCommand();
}
@NonNull
public String getStopProductRouteId()
{
return getExternalSystemTypeCode() + "-" + getD... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-pcm-file-import\src\main\java\de\metas\camel\externalsystems\pcm\product\LocalFileProductSyncServicePCMRouteBuilder.java | 2 |
请完成以下Java代码 | public Salary nullSafeGet(ResultSet rs, int position, SharedSessionContractImplementor session, Object owner) throws SQLException {
Salary salary = new Salary();
String salaryValue = rs.getString(position);
salary.setAmount(Long.parseLong(salaryValue.split(" ")[1]));
salary.setCurrenc... | public Serializable disassemble(Salary value) {
return deepCopy(value);
}
@Override
public Salary assemble(Serializable cached, Object owner) {
return deepCopy((Salary) cached);
}
@Override
public Salary replace(Salary detached, Salary managed, Object owner) {
return de... | repos\tutorials-master\persistence-modules\hibernate-annotations\src\main\java\com\baeldung\hibernate\customtypes\SalaryType.java | 1 |
请完成以下Java代码 | public final class WidgetsBundleWidgetEntity implements ToData<WidgetsBundleWidget> {
@Id
@Column(name = "widgets_bundle_id", columnDefinition = "uuid")
private UUID widgetsBundleId;
@Id
@Column(name = "widget_type_id", columnDefinition = "uuid")
private UUID widgetTypeId;
@Column(name = ... | public WidgetsBundleWidgetEntity(UUID widgetsBundleId, UUID widgetTypeId, int widgetTypeOrder) {
this.widgetsBundleId = widgetsBundleId;
this.widgetTypeId = widgetTypeId;
this.widgetTypeOrder = widgetTypeOrder;
}
@Override
public WidgetsBundleWidget toData() {
WidgetsBundleW... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\WidgetsBundleWidgetEntity.java | 1 |
请完成以下Java代码 | public static SOTrx ofBoolean(@Nullable final Boolean isSOTrx)
{
return ofNullableBoolean(isSOTrx);
}
@Nullable
public static SOTrx ofNullableBoolean(@Nullable final Boolean isSOTrx)
{
return isSOTrx != null ? ofBooleanNotNull(isSOTrx) : null;
}
@NonNull
public static SOTrx ofBooleanNotNull(@NonNull final... | return this == SALES;
}
public boolean isPurchase()
{
return this == PURCHASE;
}
/**
* @return true if AP (Account Payable), aka Purchase
*/
public boolean isAP() {return isPurchase();}
public SOTrx invert()
{
return isSales() ? PURCHASE : SALES;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\lang\SOTrx.java | 1 |
请完成以下Java代码 | public WorkingTime estimateWorkingTimePerOneUnit(final PPRoutingActivity activity)
{
final I_C_UOM uomEach = Services.get(IUOMDAO.class).getEachUOM();
return estimateWorkingTime(activity, Quantity.of(1, uomEach));
}
private WorkingTime estimateWorkingTime(@NonNull final PPRoutingActivity activity, @NonNull fina... | .plus(activity.getWaitingTime())
.plus(activity.getMovingTime());
// Get OverlapUnits - number of units that must be completed before they are moved the next activity
final int overlapUnits = Integer.max(activity.getOverlapUnits(), 0);
final int batchUnits = Integer.max(intQty - overlapUnits, 0);
fi... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\impl\DefaultRoutingServiceImpl.java | 1 |
请完成以下Java代码 | public ResponseEntity<JsonResponseUpsert> putProductPriceByPriceListIdentifier(
@ApiParam(required = true, value = PRICE_LIST_IDENTIFIER)
@PathVariable("priceListIdentifier")
@NonNull final String priceListIdentifier,
@RequestBody @NonNull final JsonRequestProductPriceUpsert request)
{
final JsonRespons... | public ResponseEntity<?> productPriceSearch(
@PathVariable("orgCode") @Nullable final String orgCode,
@RequestBody @NonNull final JsonRequestProductPriceQuery request)
{
try
{
final JsonResponseProductPriceQuery result = productPriceRestService.productPriceSearch(request, orgCode);
return ResponseEnti... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\pricing\PricesRestController.java | 1 |
请完成以下Java代码 | public class AExport
{
private static final Logger log = LogManager.getLogger(AExport.class);
private int m_WindowNo = 0;
public AExport(final APanel parent)
{
m_WindowNo = parent.getWindowNo();
//
final JFileChooser chooser = new JFileChooser();
final Set<String> fileExtensions = ExcelFormats.getFileExt... | {
if(fileExtensions.contains(fileExtension))
{
createXLS(outFile, parent.getCurrentTab());
}
else
{
ADialog.error(m_WindowNo, parent, "FileInvalidExtension");
}
}
catch (Exception e)
{
ADialog.error(m_WindowNo, parent, "Error", e.getLocalizedMessage());
if (LogManager.isLevelFinest... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\AExport.java | 1 |
请完成以下Java代码 | public class PersonWithAddress {
private Integer id;
private String name;
private List<Address> address;
public PersonWithAddress(Integer id, String name, List<Address> address) {
this.id = id;
this.name = name;
this.address = address;
}
public Integer getId() {
... | }
public void setId(Integer id) {
this.id = id;
}
public void setName(String name) {
this.name = name;
}
public List<Address> getAddress() {
return address;
}
public void setAddress(List<Address> address) {
this.address = address;
}
} | repos\tutorials-master\libraries-3\src\main\java\com\baeldung\javers\PersonWithAddress.java | 1 |
请完成以下Java代码 | public String toString() {
return "Book{" +
"id=" + id +
", title='" + title + '\'' +
", price=" + price +
", publishDate=" + publishDate +
'}';
}
public Long getId() {
return id;
}
public void setId(Long i... | return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public LocalDate getPublishDate() {
return publishDate;
}
public void setPublishDate(LocalDate publishDate) {
this.publishDate = publishDate;
}
} | repos\spring-boot-master\spring-boot-commandlinerunner\src\main\java\com\mkyong\book\Book.java | 1 |
请完成以下Java代码 | public Long getOneMinuteBlock() {
return oneMinuteBlock;
}
public void setOneMinuteBlock(Long oneMinuteBlock) {
this.oneMinuteBlock = oneMinuteBlock;
}
public Long getOneMinuteException() {
return oneMinuteException;
}
public void setOneMinuteException(Long oneMinuteEx... | this.oneMinuteTotal = oneMinuteTotal;
}
public boolean isVisible() {
return visible;
}
public void setVisible(boolean visible) {
this.visible = visible;
}
public List<ResourceTreeNode> getChildren() {
return children;
}
public void setChildren(List<ResourceTre... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\ResourceTreeNode.java | 1 |
请完成以下Java代码 | public int getC_Phonecall_Schema_Version_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Phonecall_Schema_Version_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Anruf Planung Version Position.
@param C_Phonecall_Schema_Version_Line_ID Anruf Planung Version Position */
@Override
... | /** Set Erreichbar von.
@param PhonecallTimeMin Erreichbar von */
@Override
public void setPhonecallTimeMin (java.sql.Timestamp PhonecallTimeMin)
{
set_Value (COLUMNNAME_PhonecallTimeMin, PhonecallTimeMin);
}
/** Get Erreichbar von.
@return Erreichbar von */
@Override
public java.sql.Timestamp getPhon... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Phonecall_Schema_Version_Line.java | 1 |
请完成以下Java代码 | public String getSessionId() {
return this.sessionId;
}
/**
* Returns the client identifier the ID Token was issued to.
* @return the client identifier
*/
@Nullable
public String getClientId() {
return this.clientId;
}
/**
* Returns the URI which the Client is requesting that the End-User's User Age... | */
@Nullable
public String getPostLogoutRedirectUri() {
return this.postLogoutRedirectUri;
}
/**
* Returns the opaque value used by the Client to maintain state between the logout
* request and the callback to the {@link #getPostLogoutRedirectUri()}.
* @return the opaque value used by the Client to maintai... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\authentication\OidcLogoutAuthenticationToken.java | 1 |
请完成以下Java代码 | public class DelegateExpressionHttpHandler implements HttpRequestHandler, HttpResponseHandler {
protected Expression expression;
protected final List<FieldDeclaration> fieldDeclarations;
public DelegateExpressionHttpHandler(Expression expression, List<FieldDeclaration> fieldDeclarations) {
this.ex... | @Override
public void handleHttpResponse(VariableContainer execution, HttpResponse httpResponse) {
Object delegate = DelegateExpressionUtil.resolveDelegateExpression(expression, execution, fieldDeclarations);
if (delegate instanceof HttpResponseHandler) {
CommandContextUtil.getProcessEng... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\http\handler\DelegateExpressionHttpHandler.java | 1 |
请完成以下Java代码 | public String toString() {
return name;
}
@Override
public void appendStructure(StringBuilder b, Bindings bindings) {
b.append(bindings != null && bindings.isFunctionBound(index) ? "<fn>" : name);
params.appendStructure(b, bindings);
}
public int getIndex() {
return... | public int getParamCount() {
return params.getCardinality();
}
protected AstNode getParam(int i) {
return params.getChild(i);
}
public int getCardinality() {
return 1;
}
public AstNode getChild(int i) {
return i == 0 ? params : null;
}
} | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\tree\impl\ast\AstFunction.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Cart {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
@ManyToOne
@JoinColumn(name="customer_id")
private User customer;
// @ManyToMany
// @JoinTable(
// joinColumns = @JoinColumn(name = "cart_id"),
// inverseJoinColumns = @JoinColu... | // return products;
// }
// public List<Product> getProductsByUser(int customer_id ) {
// List<Product> userProducts = new ArrayList<Product>();
// for (Product product : products) {
// if (product.getCustomer().getId() == customer_id) {
// userProducts.add(product)... | repos\E-commerce-project-springBoot-master2\JtProject\src\main\java\com\jtspringproject\JtSpringProject\models\Cart.java | 2 |
请完成以下Java代码 | public IAttributeStorage getParentAttributeStorage()
{
return NullAttributeStorage.instance;
}
/**
* Always returns an empty collection.
*/
@Override
public final List<IAttributeStorage> getChildAttributeStorages(boolean loadIfNeeded_IGNORED)
{
return ImmutableList.of();
}
@Override
protected void to... | throw new UnsupportedOperationException("Child attribute storages are not supported for " + this);
}
/**
* Method not supported.
*
* @throws UnsupportedOperationException
*/
@Override
protected IAttributeStorage removeChildAttributeStorage(final IAttributeStorage childAttributeStorage)
{
throw new Unsup... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\ASIAttributeStorage.java | 1 |
请完成以下Java代码 | public GatewayFilter apply(Config config) {
return new GatewayFilter() {
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
return chain.filter(exchange)
.then(Mono.fromRunnable(() -> dedupe(exchange.getResponse().getHeaders(), config)));
}
@Override
pu... | headers.set(name, values.get(values.size() - 1));
break;
case RETAIN_UNIQUE:
headers.put(name, new ArrayList<>(new LinkedHashSet<>(values)));
break;
default:
break;
}
}
public static class Config extends AbstractGatewayFilterFactory.NameConfig {
private Strategy strategy = Strategy.RETAIN_... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\DedupeResponseHeaderGatewayFilterFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void process(@NonNull final Exchange exchange)
{
final ExportPPOrderRouteContext context = ProcessorHelper.getPropertyOrThrowError(exchange, ROUTE_PROPERTY_EXPORT_PP_ORDER_CONTEXT, ExportPPOrderRouteContext.class);
final String content = updatePluFile(context);
final DispatchMessageRequest request = Dis... | }
catch (final Exception e)
{
throw new RuntimeCamelException(e);
}
}
@NonNull
private JsonPluFileAudit updateDocument(
@NonNull final Document pluDocument,
@NonNull final Path filepath,
@NonNull final ExportPPOrderRouteContext context) throws TransformerException
{
final FileUpdater fileUpdate... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-leichundmehl\src\main\java\de\metas\camel\externalsystems\leichundmehl\to_leichundmehl\pporder\processor\ReadPluFileProcessor.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public PPOrderQuantities getQuantities(@NonNull final I_PP_Order order) {return ppOrderBOMBL.getQuantities(order);}
public OrderBOMLineQuantities getQuantities(@NonNull final I_PP_Order_BOMLine orderBOMLine) {return ppOrderBOMBL.getQuantities(orderBOMLine);}
public ImmutableListMultimap<PPOrderBOMLineId, PPOrderIss... | {
final ImmutableList<LocatorInfo> sourceLocatorList = getSourceLocatorIds(ppOrderId)
.stream()
.map(locatorId -> {
final String caption = getLocatorName(locatorId);
return LocatorInfo.builder()
.id(locatorId)
.caption(caption)
.qrCode(LocatorQRCode.builder()
.locatorI... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\ManufacturingJobLoaderAndSaverSupportingServices.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean insertExternalWorkerJobEntity(ExternalWorkerJobEntity jobEntity) {
return doInsert(jobEntity, true);
}
@Override
public void insert(ExternalWorkerJobEntity jobEntity, boolean fireCreateEvent) {
doInsert(jobEntity, fireCreateEvent);
}
protected boolean doInsert(Extern... | @Override
public List<ExternalWorkerJob> findJobsByQueryCriteria(ExternalWorkerJobQueryImpl jobQuery) {
return dataManager.findJobsByQueryCriteria(jobQuery);
}
@Override
public long findJobCountByQueryCriteria(ExternalWorkerJobQueryImpl jobQuery) {
return dataManager.findJobCountByQuery... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\ExternalWorkerJobEntityManagerImpl.java | 2 |
请完成以下Java代码 | public String getEditorSourceValueId() {
return editorSourceValueId;
}
public void setEditorSourceValueId(String editorSourceValueId) {
this.editorSourceValueId = editorSourceValueId;
}
public String getEditorSourceExtraValueId() {
return editorSourceExtraValueId;
}
pu... | @Override
public String getTenantId() {
return tenantId;
}
@Override
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
@Override
public boolean hasEditorSource() {
return this.editorSourceValueId != null;
}
@Override
public boolean ... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ModelEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BookstoreController {
private final BookstoreService bookstoreService;
public BookstoreController(BookstoreService bookstoreService) {
this.bookstoreService = bookstoreService;
}
@GetMapping("/page/{page}/{size}")
public Page<Author> fetchPageOfAuthorsWithBooksByGenre(
... | return bookstoreService.fetchListOfAuthorsWithBooksByGenre(page, size);
}
@GetMapping("/page/eg/{page}/{size}")
public Page<Author> fetchPageOfAuthorsWithBooksByGenreEntityGraph(
@PathVariable int page, @PathVariable int size) {
return bookstoreService.fetchPageOfAuthorsWithBooksBy... | repos\Hibernate-SpringBoot-master\HibernateSpringBootHHH000104\src\main\java\com\bookstore\controller\BookstoreController.java | 2 |
请完成以下Java代码 | public String fileUploadForm(Model model) {
return "fileDownloadView";
}
// Using ResponseEntity<InputStreamResource>
@GetMapping("/download1")
public ResponseEntity<InputStreamResource> downloadFile1() throws IOException {
File file = new File(FILE_PATH);
InputStreamResource r... | @GetMapping("/download3")
public void downloadFile3(HttpServletResponse response) throws IOException{
File file = new File(FILE_PATH);
response.setContentType("application/pdf");
response.setHeader("Content-Disposition", "attachment; filename=" + file.getName());
BufferedInputStream... | repos\SpringBoot-Projects-FullStack-master\Part-1 Spring Boot Basic Fund Projects\SpringBootSourceCode\SpringDownloadFiles\src\main\java\spring\basic\FileDownloadController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean canRead(Type type, @Nullable Class<?> contextClass, @Nullable MediaType mediaType) {
return this.smartConverter.canRead(ResolvableType.forType(type), mediaType);
}
@Override
public T read(Type type, @Nullable Class<?> contextClass, HttpInputMessage inputMessage)
throws IOException, HttpMessageNo... | @Override
public List<MediaType> getSupportedMediaTypes() {
return this.smartConverter.getSupportedMediaTypes();
}
@Override
public T read(Class<? extends T> clazz, HttpInputMessage inputMessage)
throws IOException, HttpMessageNotReadableException {
return this.smartConverter.read(clazz, inputMessage);
}
... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\web\server\GenericHttpMessageConverterAdapter.java | 2 |
请完成以下Java代码 | public SetRemovalTimeToHistoricProcessInstancesBuilder calculatedRemovalTime() {
ensureNull(BadUserRequestException.class, "The removal time modes are mutually exclusive","mode", mode);
this.mode = Mode.CALCULATED_REMOVAL_TIME;
return this;
}
@Override
public SetRemovalTimeToHistoricProcessInstances... | return removalTime;
}
public Mode getMode() {
return mode;
}
public boolean isHierarchical() {
return isHierarchical;
}
public boolean isUpdateInChunks() {
return updateInChunks;
}
public Integer getChunkSize() {
return chunkSize;
}
public static enum Mode
{
CALCULATED_REM... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\SetRemovalTimeToHistoricProcessInstancesBuilderImpl.java | 1 |
请完成以下Java代码 | public int getBatchJobsPerSeed() {
return batchJobsPerSeed;
}
public int getInvocationsPerBatchJob() {
return invocationsPerBatchJob;
}
public String getSeedJobDefinitionId() {
return seedJobDefinitionId;
}
public String getMonitorJobDefinitionId() {
return monitorJobDefinitionId;
}
... | }
public static BatchDto fromBatch(Batch batch) {
BatchDto dto = new BatchDto();
dto.id = batch.getId();
dto.type = batch.getType();
dto.totalJobs = batch.getTotalJobs();
dto.jobsCreated = batch.getJobsCreated();
dto.batchJobsPerSeed = batch.getBatchJobsPerSeed();
dto.invocationsPerBatchJ... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\batch\BatchDto.java | 1 |
请完成以下Java代码 | public abstract class AbstractDataPoint implements DataPoint {
@Getter
private final long ts;
@Override
public String getStr() {
throw new RuntimeException(NOT_SUPPORTED);
}
@Override
public long getLong() {
throw new RuntimeException(NOT_SUPPORTED);
}
@Override
... | @Override
public String getJson() {
throw new RuntimeException(NOT_SUPPORTED);
}
public String toString() {
return valueToString();
}
@Override
public int compareTo(DataPoint dataPoint) {
return StringUtils.compareIgnoreCase(valueToString(), dataPoint.valueToString());
... | repos\thingsboard-master\common\edqs\src\main\java\org\thingsboard\server\edqs\data\dp\AbstractDataPoint.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ESRPaymentInfo implements CustomInvoicePayload
{
@NonNull
String participantNumber;
@NonNull
String referenceNumber;
@NonNull
String codingLine;
@Nullable
String companyName;
@Nullable
PersonInfo personInfo;
@Nullable
AddressInfo addressInfo;
private ESRPaymentInfo(
@NonNull final Str... | @NonNull final String codingLine,
@Nullable final String companyName,
@Nullable final PersonInfo personInfo,
@Nullable final AddressInfo addressInfo)
{
this.participantNumber = participantNumber;
this.referenceNumber = referenceNumber;
this.codingLine = codingLine;
this.companyName = companyName;
th... | repos\metasfresh-new_dawn_uat\backend\de.metas.invoice_gateway.spi\src\main\java\de\metas\invoice_gateway\spi\esr\model\ESRPaymentInfo.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class HomeProperties {
/**
* 省份
*/
private String province;
/**
* 城市
*/
private String city;
/**
* 描述
*/
private String desc;
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.pro... | }
public void setDesc(String desc) {
this.desc = desc;
}
@Override
public String toString() {
return "HomeProperties{" +
"province='" + province + '\'' +
", city='" + city + '\'' +
", desc='" + desc + '\'' +
'}';
}
} | repos\springboot-learning-example-master\springboot-properties\src\main\java\org\spring\springboot\property\HomeProperties.java | 2 |
请完成以下Java代码 | public void setUsername(String username) {
this.username = username;
}
@Override
public String getPassword() {
return null;
}
@Override
public boolean isAccountNonExpired() {
return true;
}
@Override | public boolean isAccountNonLocked() {
return true;
}
@Override
public boolean isCredentialsNonExpired() {
return true;
}
@Override
public boolean isEnabled() {
return true;
}
} | repos\tutorials-master\spring-security-modules\spring-security-legacy-oidc\src\main\java\com\baeldung\openid\oidc\OpenIdConnectUserDetails.java | 1 |
请完成以下Java代码 | double cosine(SparseVector vec1, SparseVector vec2)
{
double norm1 = vec1.norm();
double norm2 = vec2.norm();
double result = 0.0f;
if (norm1 == 0 && norm2 == 0)
{
return result;
}
else
{
double prod = inner_product(vec1, vec2);... | // double jaccard(const Vector &vec1, const Vector &vec2)
//{
// double norm1 = vec1.norm();
// double norm2 = vec2.norm();
// double prod = inner_product(vec1, vec2);
// double denom = norm1 + norm2 - prod;
// double result = 0.0;
// if (!denom)
// {
// return result;
// }
// else
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\cluster\SparseVector.java | 1 |
请完成以下Java代码 | public String getXMLElementName() {
return CmmnXmlConstants.ELEMENT_DOCUMENTATION;
}
@Override
public boolean hasChildElements() {
return false;
}
@Override
protected CmmnElement convert(XMLStreamReader xtr, ConversionHelper conversionHelper) {
try {
Str... | }
String documentation = xtr.getElementText();
if (StringUtils.isNotEmpty(documentation)) {
conversionHelper.getCurrentCmmnElement().setDocumentation(documentation);
conversionHelper.getCurrentCmmnElement().setDocumentationTextFormat(textFormat);
... | repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\DocumentationXmlConverter.java | 1 |
请完成以下Java代码 | public void setNestedProcessDefinitionId(String nestedProcessDefinitionId) {
this.nestedProcessDefinitionId = nestedProcessDefinitionId;
}
@Override
public String getNestedProcessDefinitionId() {
return nestedProcessDefinitionId;
}
public void setNestedProcessInstanceId(String nest... | @Override
public String toString() {
return (
"ProcessStartedEventImpl{" +
super.toString() +
"nestedProcessDefinitionId='" +
nestedProcessDefinitionId +
'\'' +
", nestedProcessInstanceId='" +
nestedProcessInstanceId +
... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\event\impl\ProcessStartedEventImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void addResultAttachements(@NonNull final CreditScore creditScore, @NonNull final TransactionResultId transactionResultId)
{
final CreditScoreRequestLogData requestLogData = creditScore.getRequestLogData();
if (requestLogData.getRequestData() != null)
{
final AttachmentEntryCreateRequest requestDataAt... | .fromByteArray(
MessageFormat.format("Response_{0}", requestLogData.getCustomerTransactionID()),
requestLogData.getResponseData().getBytes(StandardCharsets.UTF_8));
attachmentEntryService.createNewAttachment(
TableRecordReference.of(I_CS_Transaction_Result.Table_Name, transactionResultId),
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.creditscore\base\src\main\java\de\metas\vertical\creditscore\base\spi\service\TransactionResultService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Scheduler scheduler(Trigger trigger, JobDetail job, SchedulerFactoryBean factory) throws SchedulerException {
logger.debug("Getting a handle to the Scheduler");
Scheduler scheduler = factory.getScheduler();
scheduler.scheduleJob(job, trigger);
logger.debug("Starting Scheduler thr... | return propertiesFactoryBean.getObject();
}
@Bean
public JobDetail jobDetail() {
return newJob().ofType(SampleJob.class).storeDurably().withIdentity(JobKey.jobKey("Qrtz_Job_Detail")).withDescription("Invoke Sample Job service...").build();
}
@Bean
public Trigger trigger(JobDetail job)... | repos\tutorials-master\spring-quartz\src\main\java\org\baeldung\springquartz\basics\scheduler\QrtzScheduler.java | 2 |
请完成以下Java代码 | public String getExecutionId() {
return executionId;
}
public String getId() {
return id;
}
public Date getLockExpirationTime() {
return lockExpirationTime;
}
public Date getCreateTime() {
return createTime;
}
public String getProcessDefinitionId() {
return processDefinitionId;
}
... | public String getBusinessKey() {
return businessKey;
}
public static ExternalTaskDto fromExternalTask(ExternalTask task) {
ExternalTaskDto dto = new ExternalTaskDto();
dto.activityId = task.getActivityId();
dto.activityInstanceId = task.getActivityInstanceId();
dto.errorMessage = task.getErrorM... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\externaltask\ExternalTaskDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private String getDefaultPort() {
try (ServerSocket serverSocket = new ServerSocket(DEFAULT_PORT)) {
return String.valueOf(serverSocket.getLocalPort());
}
catch (IOException ex) {
return RANDOM_PORT;
}
}
private static class EmbeddedLdapServerConfigBean implements ApplicationContextAware {
private A... | int port = getPort();
String providerUrl = "ldap://127.0.0.1:" + port + "/" + suffix;
return new DefaultSpringSecurityContextSource(providerUrl);
}
private int getPort() {
if (unboundIdPresent) {
UnboundIdContainer unboundIdContainer = this.applicationContext.getBean(UnboundIdContainer.class);
ret... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\ldap\LdapServerBeanDefinitionParser.java | 2 |
请完成以下Java代码 | public class DeleteImportDataProcess extends ViewBasedProcessTemplate implements IProcessPrecondition
{
private final DataImportService dataImportService = SpringContextHolder.instance.getBean(DataImportService.class);
@Param(parameterName = "ImportDeleteMode", mandatory = true)
@Getter
private ImportDataDeleteMod... | return "@Deleted@ " + deletedCount;
}
@Override
protected void postProcess(final boolean success)
{
invalidateView();
}
private Optional<SqlViewRowsWhereClause> getSelectionSqlWhereClause()
{
final DocumentIdsSelection rowIds = getSelectedRowIds();
if (rowIds.isEmpty())
{
throw new AdempiereExceptio... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\impexp\DeleteImportDataProcess.java | 1 |
请完成以下Java代码 | public class JobUtil {
public static JobEntity createJob(ExecutionEntity execution, String jobHandlerType, ProcessEngineConfigurationImpl processEngineConfiguration) {
return createJob(execution, execution.getCurrentFlowElement(), jobHandlerType, processEngineConfiguration);
}
public static JobEnt... | ExtensionElement jobCategoryElement = jobCategoryElements.get(0);
if (StringUtils.isNotEmpty(jobCategoryElement.getElementText())) {
Expression categoryExpression = processEngineConfiguration.getExpressionManager().createExpression(jobCategoryElement.getElementText());
Object... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\util\JobUtil.java | 1 |
请完成以下Java代码 | public void updateQtyCU(final I_C_OrderLine orderLine, final ICalloutField field)
{
final IHUPackingAware packingAware = new OrderLineHUPackingAware(orderLine);
setQtuCUFromQtyTU(packingAware);
packingAwareBL.setQtyLUFromQtyTU(packingAware);
// Update lineNetAmt, because QtyEnteredCU changed : see task 06727
... | final IHUPackingAware packingAware = new OrderLineHUPackingAware(orderLine);
packingAwareBL.setQtyTUFromQtyLU(packingAware);
updateQtyCU(orderLine, field);
}
@CalloutMethod(columnNames = { I_C_OrderLine.COLUMNNAME_C_BPartner_ID
, I_C_OrderLine.COLUMNNAME_QtyEntered
, I_C_OrderLine.COLUMNNAME_M_HU_PI_Item_P... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\callout\C_OrderLine.java | 1 |
请完成以下Java代码 | public JsonObject toJsonObject(QueryOrderingProperty property) {
JsonObject jsonObject = JsonUtil.createObject();
JsonUtil.addField(jsonObject, RELATION, property.getRelation());
QueryProperty queryProperty = property.getQueryProperty();
if (queryProperty != null) {
JsonUtil.addField(jsonObject,... | String propertyName = JsonUtil.getString(jsonObject, QUERY_PROPERTY);
String propertyFunction = null;
if (jsonObject.has(QUERY_PROPERTY_FUNCTION)) {
propertyFunction = JsonUtil.getString(jsonObject, QUERY_PROPERTY_FUNCTION);
}
QueryProperty queryProperty = new QueryPropertyImpl(property... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\json\JsonQueryOrderingPropertyConverter.java | 1 |
请完成以下Java代码 | public static List<TsKvEntry> toTimeseries(Map<String, List<JsonNode>> timeseries) {
if (!CollectionUtils.isEmpty(timeseries)) {
List<TsKvEntry> result = new ArrayList<>();
timeseries.forEach((key, values) ->
result.addAll(values.stream().map(ts -> {
... | } else {
throw new RuntimeException(CAN_T_PARSE_VALUE + value);
}
} else {
return new JsonDataEntry(key, value.toString());
}
}
private static KvEntry parseNumericValue(String key, JsonNode value) {
if (value.isFloatingPointNumber()) {
... | repos\thingsboard-master\rest-client\src\main\java\org\thingsboard\rest\client\utils\RestJsonConverter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getPayWayCode() {
return payWayCode;
}
public void setPayWayCode(String payWayCode) {
this.payWayCode = payWayCode == null ? null : payWayCode.trim();
}
public String getPayWayName() {
return payWayName;
}
public void setPayWayName(String payWayName) {
this.payWayName = payWayName == null... | public Short getRefundTimes() {
return refundTimes;
}
public void setRefundTimes(Short refundTimes) {
this.refundTimes = refundTimes;
}
public BigDecimal getSuccessRefundAmount() {
return successRefundAmount;
}
public void setSuccessRefundAmount(BigDecimal successRefundAmount) {
this.successRefundAmoun... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckMistakeScratchPool.java | 2 |
请完成以下Java代码 | public class ValidationResultsCollectorImpl implements ValidationResultCollector {
protected ModelElementInstance currentElement;
protected Map<ModelElementInstance, List<ValidationResult>> collectedResults = new HashMap<ModelElementInstance, List<ValidationResult>>();
protected int errorCount = 0;
protected... | public void setCurrentElement(ModelElementInstance currentElement) {
this.currentElement = currentElement;
}
public ValidationResults getResults() {
return new ModelValidationResultsImpl(collectedResults, errorCount, warningCount);
}
protected List<ValidationResult> resultsForCurrentElement() {
Li... | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\validation\ValidationResultsCollectorImpl.java | 1 |
请完成以下Java代码 | public IHUAssignmentBuilder setVHU(final I_M_HU vhu)
{
this.vhu = vhu;
return this;
}
@Override
public IHUAssignmentBuilder setQty(final BigDecimal qty)
{
this.qty = qty;
return this;
}
@Override
public IHUAssignmentBuilder setIsTransferPackingMaterials(final boolean isTransferPackingMaterials)
{
t... | @Override
public IHUAssignmentBuilder setAssignmentRecordToUpdate(@NonNull final I_M_HU_Assignment assignmentRecord)
{
this.assignment = assignmentRecord;
return updateFromRecord(assignmentRecord);
}
private IHUAssignmentBuilder updateFromRecord(final I_M_HU_Assignment assignmentRecord)
{
setTopLevelHU(assi... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUAssignmentBuilder.java | 1 |
请完成以下Java代码 | public class InstanceWebClient {
public static final String ATTRIBUTE_INSTANCE = "instance";
private final WebClient webClient;
protected InstanceWebClient(WebClient webClient) {
this.webClient = webClient;
}
public WebClient instance(Mono<Instance> instance) {
return this.webClient.mutate().filters((filte... | public Builder() {
this(WebClient.builder());
}
public Builder(WebClient.Builder webClientBuilder) {
this.webClientBuilder = webClientBuilder;
}
protected Builder(Builder other) {
this.filters = new ArrayList<>(other.filters);
this.webClientBuilder = other.webClientBuilder.clone();
}
public B... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\web\client\InstanceWebClient.java | 1 |
请完成以下Java代码 | public int conversion(LocalDate birthDate){
return Period.between(birthDate, LocalDate.now()).getYears();
}
// constructors
public UserDto() {
super();
}
public UserDto(long id, String username, int age) {
super();
this.id = id;
this.username = user... | this.username = username;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return "UserDto [id=" + id + ", username=" + username + ", age=" + age + "]";
}
} | repos\tutorials-master\libraries-data-2\src\main\java\com\baeldung\jmapper\UserDto.java | 1 |
请完成以下Java代码 | public Map<String, VariableInstance> execute(CommandContext commandContext) {
// Verify existence of execution
if (executionId == null) {
throw new FlowableIllegalArgumentException("executionId is null");
}
ExecutionEntity execution = commandContext.getExecutionEntityManage... | variables = execution.getVariableInstances();
}
} else {
// Fetch specific collection of variables
if (isLocal) {
variables = execution.getVariableInstancesLocal(variableNames, false);
} else {
variables = execution.getVariableInst... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\cmd\GetExecutionVariableInstancesCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Mono<AuthorizationDecision> toDecision(ClientResponse response) {
if (!response.statusCode()
.is2xxSuccessful()) {
return Mono.just(new AuthorizationDecision(false));
}
return response.bodyToMono(ObjectNode.class)
.map(node -> {
boolea... | .put("principal", a.getName())
.put("authorities", a.getAuthorities()
.stream()
.map(GrantedAuthority::getAuthority)
.collect(Collectors.toList()))
.put("uri", context.getExchange()
.g... | repos\tutorials-master\spring-security-modules\spring-security-opa\src\main\java\com\baeldung\security\opa\config\SecurityConfiguration.java | 2 |
请完成以下Java代码 | public void setSocketTimeout(Duration socketTimeout) {
setSocketTimeout(Math.toIntExact(socketTimeout.toMillis()));
}
public FlowableHttpClient getHttpClient() {
return httpClient;
}
public void setHttpClient(FlowableHttpClient httpClient) {
this.httpClient = httpClient;
... | }
}
public boolean isDefaultParallelInSameTransaction() {
return defaultParallelInSameTransaction;
}
public void setDefaultParallelInSameTransaction(boolean defaultParallelInSameTransaction) {
this.defaultParallelInSameTransaction = defaultParallelInSameTransaction;
}
public v... | repos\flowable-engine-main\modules\flowable-http-common\src\main\java\org\flowable\http\common\impl\HttpClientConfig.java | 1 |
请完成以下Java代码 | public class Personne {
private String nom;
private String surnom;
private int age;
public Personne(String nom, String surnom, int age) {
this.nom = nom;
this.surnom = surnom;
this.age = age;
}
public String getNom() {
return nom;
}
public void setNom(String nom) {
this.nom = nom;
}
public Strin... | public void setSurnom(String surnom) {
this.surnom = surnom;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return "Personne [nom=" + nom + ", surnom=" + surnom + ", age=" + age
+ "]";
}
} | repos\tutorials-master\orika\src\main\java\com\baeldung\orika\Personne.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class KairosProperties extends StepRegistryProperties {
/**
* URI of the KairosDB server.
*/
private String uri = "http://localhost:8080/api/v1/datapoints";
/**
* Login user of the KairosDB server.
*/
private @Nullable String userName;
/**
* Login password of the KairosDB server.
*/
private ... | public void setUri(String uri) {
this.uri = uri;
}
public @Nullable String getUserName() {
return this.userName;
}
public void setUserName(@Nullable String userName) {
this.userName = userName;
}
public @Nullable String getPassword() {
return this.password;
}
public void setPassword(@Nullable String... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\kairos\KairosProperties.java | 2 |
请完成以下Java代码 | public DmnDeploymentQueryImpl decisionKey(String key) {
if (key == null) {
throw new FlowableIllegalArgumentException("key is null");
}
this.decisionKey = key;
return this;
}
@Override
public DmnDeploymentQueryImpl decisionKeyLike(String keyLike) {
if (ke... | // getters ////////////////////////////////////////////////////////
public String getDeploymentId() {
return deploymentId;
}
public String getName() {
return name;
}
public String getNameLike() {
return nameLike;
}
public String getCategory() {
return cate... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\DmnDeploymentQueryImpl.java | 1 |
请完成以下Java代码 | private void onParameterChanged_ActionTUToNewLUs(final String parameterName)
{
@SuppressWarnings("ConstantConditions") // at this point i don't think the HU can be null.
final BigDecimal realTUQty = huTransformService.getMaximumQtyTU(getSingleSelectedRow().getM_HU()).toBigDecimal();
if (PARAM_Action.equals(para... | .stream()
.map(handlingUnitsDAO::getById)
.collect(ImmutableList.toImmutableList());
huMovementBL.moveHUsToWarehouse(createdHUs, moveToWarehouseId);
}
}
private void setShowWarehouseFlag()
{
this.showWarehouse = newParametersFiller().getShowWarehouseFlag();
if (!this.showWarehouse)
{
this.... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_Transform.java | 1 |
请完成以下Java代码 | public class C_Invoice_Candidate_TabCallout extends TabCalloutAdapter implements IStatefulTabCallout
{
private FacetExecutor<I_C_Invoice_Candidate> gridTabFacetExecutor;
/**
* Action: Approve for invoicing (selected invoice candidates)
*/
private IC_ApproveForInvoicing_Action action_ApproveForInvoicing = null;
... | @Override
public void onAfterQuery(final ICalloutRecord calloutRecord)
{
updateFacets(calloutRecord);
}
@Override
public void onRefreshAll(final ICalloutRecord calloutRecord)
{
// NOTE: we are not updating the facets on refresh all because following case would fail:
// Case: user is pressing the "Refresh" ... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\callout\C_Invoice_Candidate_TabCallout.java | 1 |
请完成以下Java代码 | private static Object normalizeSingleArgumentBeforeFormat(@Nullable final Object arg, final String adLanguage)
{
if (arg == null)
{
return null;
}
else if (arg instanceof ITranslatableString)
{
return ((ITranslatableString)arg).translate(adLanguage);
}
else if (arg instanceof Amount)
{
return ... | private static String normalizeSingleArgumentBeforeFormat_Iterable(
@NonNull final Iterable<Object> iterable,
final String adLanguage)
{
final StringBuilder result = new StringBuilder();
for (final Object item : iterable)
{
String itemNormStr;
try
{
final Object itemNormObj = normalizeSingleA... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\MessageFormatter.java | 1 |
请完成以下Java代码 | public void addResolver(HandlerMethodArgumentResolver resolver) {
this.argumentResolvers.add(resolver);
}
/**
* Return a read-only list with the contained resolvers, or an empty list.
*/
public List<HandlerMethodArgumentResolver> getResolvers() {
return Collections.unmodifiableList(this.argumentResolvers);
... | return resolver.resolveArgument(parameter, environment);
}
/**
* Find a registered {@link HandlerMethodArgumentResolver} that supports
* the given method parameter.
* @param parameter the method parameter
*/
public @Nullable HandlerMethodArgumentResolver getArgumentResolver(MethodParameter parameter) {
re... | repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\data\method\HandlerMethodArgumentResolverComposite.java | 1 |
请完成以下Java代码 | public int getCM_Media_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_CM_Media_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_CM_Media_Server getCM_Media_Server() throws RuntimeException
{
return (I_CM_Media_Server)MTable.get(getCtx(), I_CM_Media_Server.Table_Name)
.getPO(ge... | Entity is deployed
*/
public void setIsDeployed (boolean IsDeployed)
{
set_Value (COLUMNNAME_IsDeployed, Boolean.valueOf(IsDeployed));
}
/** Get Deployed.
@return Entity is deployed
*/
public boolean isDeployed ()
{
Object oo = get_Value(COLUMNNAME_IsDeployed);
if (oo != null)
{
if (oo inst... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_MediaDeploy.java | 1 |
请完成以下Java代码 | static Access extractPermission(final I_AD_User_Record_Access record)
{
return Access.ofCode(record.getAccess());
}
private static ImmutableSet<RecordAccessId> extractIds(final Collection<I_AD_User_Record_Access> accessRecords)
{
return accessRecords.stream()
.map(RecordAccessService::extractId)
.colle... | return configs
.getByRoleId(roleId)
.isTableHandled(tableName);
}
public boolean hasRecordPermission(
@NonNull final UserId userId,
@NonNull final RoleId roleId,
@NonNull final TableRecordReference recordRef,
@NonNull final Access permission)
{
if (!isApplyUserGroupRecordAccess(roleId, recordR... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\record_access\RecordAccessService.java | 1 |
请完成以下Java代码 | public Object setVariableLocal(String variableName, Object value) {
return null;
}
@Override
public void setVariablesLocal(Map<String, ? extends Object> variables) {
}
@Override
public boolean isEventScope() {
return isEventScope;
}
@Override
public void setEventSc... | }
@Override
public Object getTransientVariableLocal(String variableName) {
throw new UnsupportedOperationException();
}
@Override
public Map<String, Object> getTransientVariablesLocal() {
throw new UnsupportedOperationException();
}
@Override
public Object getTransient... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\pvm\runtime\ExecutionImpl.java | 1 |
请完成以下Java代码 | public void setGroupProductBOMId(@NonNull final GroupId groupId, @NonNull final ProductBOMId bomId)
{
final I_C_Order_CompensationGroup groupRecord = retrieveGroupRecord(groupId);
groupRecord.setPP_Product_BOM_ID(bomId.getRepoId());
saveRecord(groupRecord);
}
@Nullable
public GroupTemplateId getGroupTemplate... | final @NonNull RetrieveOrCreateGroupRequest request)
{
final I_C_OrderLine orderLine = orderLineBL.createOrderLine(targetOrder);
final ProductId productId = from.getProductId();
orderLine.setM_Product_ID(productId.getRepoId());
orderLine.setM_AttributeSetInstance_ID(AttributeSetInstanceId.NONE.getRepoId());
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\compensationGroup\OrderGroupRepository.java | 1 |
请完成以下Java代码 | public boolean doCatch(Throwable e) throws Throwable
{
exception = e;
throw e;
}
@Override
public void doFinally()
{
if (ExecutionResult.Ignored == executionResult)
{
// do nothing
return;
}
setExecutionStatus();
InterfaceWrapperHelper.save(step);
}
/**
* After step execution, sets Error... | }
else
{
throw new AdempiereException("Unknown action: " + action);
}
}
else if (executionResult == ExecutionResult.Skipped)
{
step.setStatusCode(X_AD_MigrationStep.STATUSCODE_Unapplied);
}
else
{
throw new AdempiereException("Unknown execution result: " + executionResult);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\MigrationStepExecutorRunnable.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public Integer getProductCount() {
return pr... | this.keywords = keywords;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getC... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProductCategory.java | 1 |
请完成以下Java代码 | public void setExportStatus (final java.lang.String ExportStatus)
{
set_Value (COLUMNNAME_ExportStatus, ExportStatus);
}
@Override
public java.lang.String getExportStatus()
{
return get_ValueAsString(COLUMNNAME_ExportStatus);
}
@Override
public void setM_ReceiptSchedule_ExportAudit_ID (final int M_Receip... | set_Value (COLUMNNAME_M_ReceiptSchedule_ID, M_ReceiptSchedule_ID);
}
@Override
public int getM_ReceiptSchedule_ID()
{
return get_ValueAsInt(COLUMNNAME_M_ReceiptSchedule_ID);
}
@Override
public void setTransactionIdAPI (final @Nullable java.lang.String TransactionIdAPI)
{
set_Value (COLUMNNAME_Transaction... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_ReceiptSchedule_ExportAudit.java | 1 |
请完成以下Java代码 | private void updateDatevAcctExport()
{
final String tableName = getTableName();
if (I_DatevAcctExport.Table_Name.equals(tableName))
{
final int recordId = getRecord_ID();
final I_DatevAcctExport datevAcctExport = InterfaceWrapperHelper.create(getCtx(), recordId, I_DatevAcctExport.class, getTrxName());
f... | {
final TableRecordReference recordRef = TableRecordReference.of(recordTableName, recordId);
final Evaluatee evalCtx = Evaluatees.ofTableRecordReference(recordRef);
if (evalCtx != null)
{
contexts.add(evalCtx);
}
}
//
// 3: global context
contexts.add(Evaluatees.ofCtx(getCtx()));
return E... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\process\ExportToSpreadsheetProcess.java | 1 |
请完成以下Java代码 | public Collection<EntryCriterion> getEntryCriterions() {
return entryCriterionCollection.get(this);
}
public Collection<ExitCriterion> getExitCriterions() {
return exitCriterionCollection.get(this);
}
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder ... | .idAttributeReference(PlanItemDefinition.class)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
itemControlChild = sequenceBuilder.element(ItemControl.class)
.build();
entryCriterionCollection = sequenceBuilder.elementCollection(EntryCriterion.class)
.build();
... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\DiscretionaryItemImpl.java | 1 |
请完成以下Java代码 | private int reusableTopicAttempts() {
if (this.isSameIntervalReuse && this.backOffValues.size() > 1) {
// Assuming that duplicates are always at the end of the list.
return amountOfDuplicates(this.backOffValues.get(this.backOffValues.size() - 1)) - 1;
}
return 0;
}
private boolean hasDuplicates(Long this... | private final String dltSuffix;
public DestinationTopicSuffixes(@Nullable String retryTopicSuffix, @Nullable String dltSuffix) {
this.retryTopicSuffix = StringUtils.hasText(retryTopicSuffix)
? retryTopicSuffix
: RetryTopicConstants.DEFAULT_RETRY_SUFFIX;
this.dltSuffix = StringUtils.hasText(dltSuffix)... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\DestinationTopicPropertiesFactory.java | 1 |
请完成以下Java代码 | public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
public I_M_FreightCost getM_FreightCost() throws RuntimeException
{
return (I_M_FreightCost)MTable.get(getCtx(), I_M_FreightCost.Table_Name)
.getPO(getM_FreightCost_ID(), get_TrxName()); }
/** Set Frachtkostenpauscha... | /** Get Lieferweg.
@return Methode oder Art der Warenlieferung
*/
public int getM_Shipper_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Shipper_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Gueltig ab.
@param ValidFrom
Gueltig ab inklusiv (erster Tag)
*/
public void... | 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 static IHostIdentifier of(@NonNull final InetAddress inetAddress)
{
final String hostAddress = inetAddress.getHostAddress();
final String hostName = inetAddress.getHostName();
return new HostIdentifier(hostName, hostAddress);
}
@Immutable
private static final class HostIdentifier implements IHostId... | @Override
public boolean equals(final Object obj)
{
if (this == obj)
{
return true;
}
if (obj instanceof HostIdentifier)
{
final HostIdentifier other = (HostIdentifier)obj;
return Objects.equals(hostName, other.hostName)
&& Objects.equals(hostAddress, other.hostAddress);
}
el... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\net\NetUtils.java | 1 |
请完成以下Java代码 | public void setHelp (String Help)
{
set_Value (COLUMNNAME_Help, Help);
}
/** Get Comment/Help.
@return Comment or Hint
*/
public String getHelp ()
{
return (String)get_Value(COLUMNNAME_Help);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Nam... | /** Set Issue Recommendation.
@param R_IssueRecommendation_ID
Recommendations how to fix an Issue
*/
public void setR_IssueRecommendation_ID (int R_IssueRecommendation_ID)
{
if (R_IssueRecommendation_ID < 1)
set_ValueNoCheck (COLUMNNAME_R_IssueRecommendation_ID, null);
else
set_ValueNoCheck (COLUM... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_IssueRecommendation.java | 1 |
请完成以下Java代码 | public void setVariableNameIgnoreCase(boolean variableNameIgnoreCase) {
this.variableNameIgnoreCase = variableNameIgnoreCase;
}
public boolean isVariableValueIgnoreCase() {
return variableValueIgnoreCase;
}
public void setVariableValueIgnoreCase(boolean variableValueIgnoreCase) {
this.variableValu... | return true;
if (o == null || getClass() != o.getClass())
return false;
QueryVariableValue that = (QueryVariableValue) o;
return local == that.local && variableNameIgnoreCase == that.variableNameIgnoreCase
&& variableValueIgnoreCase == that.variableValueIgnoreCase && name.equals(that.name) && ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\QueryVariableValue.java | 1 |
请完成以下Java代码 | public ExitCriterion getExitCriterion() {
return exitCriterionRefAttribute.getReferenceTargetElement(this);
}
public void setExitCriterion(ExitCriterion exitCriterion) {
exitCriterionRefAttribute.setReferenceTargetElement(this, exitCriterion);
}
public PlanItem getSource() {
return sourceRefAttrib... | sourceRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SOURCE_REF)
.idAttributeReference(PlanItem.class)
.build();
exitCriterionRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_EXIT_CRITERION_REF)
.idAttributeReference(ExitCriterion.class)
.build();
sentryRefA... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\PlanItemOnPartImpl.java | 1 |
请完成以下Java代码 | public boolean supports(Class<?> clazz) {
return true;
}
@Override
public int vote(Authentication authentication, Object object, Collection<ConfigAttribute> attributes) {
if (authentication == null) {
return ACCESS_DENIED;
}
int result = ACCESS_ABSTAIN;
Collection<? extends GrantedAuthority> authoritie... | for (GrantedAuthority authority : authorities) {
if (attribute.getAttribute().equals(authority.getAuthority())) {
return ACCESS_GRANTED;
}
}
}
}
return result;
}
Collection<? extends GrantedAuthority> extractAuthorities(Authentication authentication) {
return authentication.getAuthoritie... | repos\spring-security-main\access\src\main\java\org\springframework\security\access\vote\RoleVoter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class DynatracePropertiesConfigAdapter extends StepRegistryPropertiesConfigAdapter<DynatraceProperties>
implements DynatraceConfig {
DynatracePropertiesConfigAdapter(DynatraceProperties properties) {
super(properties);
}
@Override
public String prefix() {
return "management.dynatrace.metrics.export";
}
@... | return obtain(v2(V2::getMetricKeyPrefix), DynatraceConfig.super::metricKeyPrefix);
}
@Override
public Map<String, String> defaultDimensions() {
return obtain(v2(V2::getDefaultDimensions), DynatraceConfig.super::defaultDimensions);
}
@Override
public boolean enrichWithDynatraceMetadata() {
return obtain(v2(V... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\dynatrace\DynatracePropertiesConfigAdapter.java | 2 |
请完成以下Java代码 | public static void streamFeed() {
StatusListener listener = new StatusListener(){
@Override
public void onException(Exception e) {
e.printStackTrace();
}
@Override
public void onDeletionNotice(StatusDeletionNotice arg) {
System.out.println("Got a status deletion... | @Override
public void onStatus(Status status) {
System.out.println(status.getUser().getName() + " : " + status.getText());
}
@Override
public void onTrackLimitationNotice(int numberOfLimitedStatuses) {
System.out.println("Got track limitation ... | repos\tutorials-master\saas-modules\twitter4j\src\main\java\com\baeldung\Application.java | 1 |
请完成以下Java代码 | static class TopicCreation {
private final boolean shouldCreateTopics;
private final int numPartitions;
private final short replicationFactor;
TopicCreation(@Nullable Boolean shouldCreate, @Nullable Integer numPartitions, @Nullable Short replicationFactor) {
this.shouldCreateTopics = shouldCreate == null... | this.shouldCreateTopics = shouldCreateTopics;
this.numPartitions = 1;
this.replicationFactor = -1;
}
public int getNumPartitions() {
return this.numPartitions;
}
public short getReplicationFactor() {
return this.replicationFactor;
}
public boolean shouldCreateTopics() {
return this.shouldC... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\RetryTopicConfiguration.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class WebConfig implements WebMvcConfigurer {
/**
* Spring Boot allows configuring Content Negotiation using properties
*/
@Override
public void configureContentNegotiation(final ContentNegotiationConfigurer configurer) {
configurer.favorParameter(true)
.parameterName("... | }
@Bean
public BeanNameViewResolver beanNameViewResolver(){
BeanNameViewResolver beanNameViewResolver = new BeanNameViewResolver();
beanNameViewResolver.setOrder(1);
return beanNameViewResolver;
}
@Bean
public View sample() {
return new JstlView("/WEB-INF/view/samp... | repos\tutorials-master\spring-web-modules\spring-mvc-basics-4\src\main\java\com\baeldung\config\WebConfig.java | 2 |
请完成以下Java代码 | public void setIMP_ProcessorLog_ID (int IMP_ProcessorLog_ID)
{
if (IMP_ProcessorLog_ID < 1)
set_ValueNoCheck (COLUMNNAME_IMP_ProcessorLog_ID, null);
else
set_ValueNoCheck (COLUMNNAME_IMP_ProcessorLog_ID, Integer.valueOf(IMP_ProcessorLog_ID));
}
/** Get Import Processor Log.
@return Import Processor Lo... | /** Set Summary.
@param Summary
Textual summary of this request
*/
public void setSummary (String Summary)
{
set_Value (COLUMNNAME_Summary, Summary);
}
/** Get Summary.
@return Textual summary of this request
*/
public String getSummary ()
{
return (String)get_Value(COLUMNNAME_Summary);
}
/*... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_IMP_ProcessorLog.java | 1 |
请完成以下Java代码 | void close() throws IOException {
synchronized (this.lock) {
if (this.referenceCount == 0) {
return;
}
this.referenceCount--;
if (this.referenceCount == 0) {
debug.log("Closing '%s'", this.path);
this.buffer = null;
this.bufferPosition = -1;
this.bufferSize = 0;
this.fil... | return this.path.toString();
}
}
/**
* Internal tracker used to check open and closing of files in tests.
*/
interface Tracker {
Tracker NONE = new Tracker() {
@Override
public void openedFileChannel(Path path) {
}
@Override
public void closedFileChannel(Path path) {
}
};
void op... | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\zip\FileDataBlock.java | 1 |
请完成以下Java代码 | private Object formatCell(final Object value, final DATEVExportFormatColumn columnFormat)
{
if (value == null)
{
return null;
}
if (columnFormat.getDateFormatter() != null)
{
return formatDateCell(value, columnFormat.getDateFormatter());
}
else if (columnFormat.getNumberFormatter() != null)
{
... | else if (value instanceof TemporalAccessor)
{
TemporalAccessor temporal = (TemporalAccessor)value;
return dateFormatter.format(temporal);
}
else
{
throw new AdempiereException("Cannot convert/format value to Date: " + value + " (" + value.getClass() + ")");
}
}
private static String formatNumberCe... | repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java\de\metas\datev\DATEVCsvExporter.java | 1 |
请完成以下Java代码 | public void setSeqNo(final Integer seqNo)
{
this.seqNo = seqNo;
this.seqNoSet = true;
}
public void setTaxCategory(final TaxCategory taxCategory)
{
this.taxCategory = taxCategory;
}
public void setActive(final Boolean active)
{
this.active = active;
this.activeSet = true;
}
public void setSyncAdvi... | public String getProductIdentifier()
{
return productIdentifier;
}
@NonNull
public TaxCategory getTaxCategory()
{
return taxCategory;
}
@NonNull
public BigDecimal getPriceStd()
{
return priceStd;
}
} | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-pricing\src\main\java\de\metas\common\pricing\v2\productprice\JsonRequestProductPrice.java | 1 |
请完成以下Java代码 | public int available() throws IOException {
return (this.available >= 0) ? this.available : super.available();
}
@Override
public int read(byte[] b, int off, int len) throws IOException {
int result = super.read(b, off, len);
if (result != -1) {
this.available -= result;
}
return result;
}
@Override... | try {
super.fill();
}
catch (EOFException ex) {
if (this.extraBytesWritten) {
throw ex;
}
this.len = 1;
this.buf[0] = 0x0;
this.extraBytesWritten = true;
this.inf.setInput(this.buf, 0, this.len);
}
}
} | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\jar\ZipInflaterInputStream.java | 1 |
请完成以下Java代码 | private final void updateParentSplitPaneDividerLocation()
{
final JComponent comp = getComponent();
if (!comp.isVisible())
{
return; // nothing to update
}
// Find parent split pane if any
JSplitPane parentSplitPane = null;
for (Component c = comp.getParent(); c != null; c = c.getParent())
{
if ... | }
}
// Update it's divider location.
// NOTE: if we would not do this, user would have to manually drag it when the first component is added.
if (parentSplitPane != null)
{
if (parentSplitPane.getDividerLocation() <= 0)
{
parentSplitPane.setDividerLocation(Ini.getDividerLocation());
}
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\tree\FavoritesGroupContainer.java | 1 |
请完成以下Java代码 | public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
}
/** Get Verarbeiten.
@return Verarbeiten */
@Override
public boolean isProcessing ()
{
Object oo = get_Value(COLUMNNAME_Processing);
if (oo != null)
{
if (oo instanceof Boolean)
... | @param Qty
Quantity
*/
@Override
public void setQty (java.math.BigDecimal Qty)
{
set_ValueNoCheck (COLUMNNAME_Qty, Qty);
}
/** Get Menge.
@return Quantity
*/
@Override
public java.math.BigDecimal getQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty);
if (bd == null)
return Big... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_MatchPO.java | 1 |
请完成以下Java代码 | public class NERTrainer extends PerceptronTrainer
{
/**
* 支持任意自定义NER类型,例如:<br>
* tagSet.nerLabels.clear();<br>
* tagSet.nerLabels.add("nr");<br>
* tagSet.nerLabels.add("ns");<br>
* tagSet.nerLabels.add("nt");<br>
*/
public NERTagSet tagSet;
public NERTrainer(NERTagSet tagSet)
... | * tagSet.nerLabels.add("nt");<br>
* return tagSet;<br>
* @return
*/
@Override
protected TagSet createTagSet()
{
return tagSet;
}
@Override
protected Instance createInstance(Sentence sentence, FeatureMap featureMap)
{
return new NERInstance(sentence, featureMap... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\perceptron\NERTrainer.java | 1 |
请完成以下Java代码 | public boolean cancel(boolean mayInterruptIfRunning)
{
throw new UnsupportedOperationException();
}
@Override
public boolean isCancelled()
{
return canceled;
}
@Override
public boolean isDone()
{
return done;
}
@Override
public T get() throws InterruptedException, ExecutionException
{
latch.awai... | if (!done)
{
throw new IllegalStateException("Value not available");
}
//
// We got a cancellation
if (canceled)
{
final CancellationException cancelException = new CancellationException(exception.getLocalizedMessage());
cancelException.initCause(exception);
throw cancelException;
}
//
... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\concurrent\FutureValue.java | 1 |
请在Spring Boot框架中完成以下Java代码 | void register(ObservationConfig config, List<ObservationHandler<?>> handlers) {
MultiValueMap<ObservationHandlerGroup, ObservationHandler<?>> grouped = new LinkedMultiValueMap<>();
List<ObservationHandler<?>> unclaimed = new ArrayList<>();
for (ObservationHandler<?> handler : handlers) {
ObservationHandlerGrou... | if (!CollectionUtils.isEmpty(unclaimed)) {
for (ObservationHandler<?> handler : unclaimed) {
config.observationHandler(handler);
}
}
}
private @Nullable ObservationHandlerGroup findGroup(ObservationHandler<?> handler) {
for (ObservationHandlerGroup group : this.groups) {
if (group.isMember(handler))... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-observation\src\main\java\org\springframework\boot\micrometer\observation\autoconfigure\ObservationHandlerGroups.java | 2 |
请完成以下Java代码 | public class LuceneFileSearch {
private Directory indexDirectory;
private StandardAnalyzer analyzer;
public LuceneFileSearch(Directory fsDirectory, StandardAnalyzer analyzer) {
super();
this.indexDirectory = fsDirectory;
this.analyzer = analyzer;
}
public void addFileToInd... | TopDocs topDocs = searcher.search(query, 10);
List<Document> documents = new ArrayList<>();
for (ScoreDoc scoreDoc : topDocs.scoreDocs) {
documents.add(searcher.doc(scoreDoc.doc));
}
return documents;
} catch (IOException | ParseException e) {
... | repos\tutorials-master\lucene\src\main\java\com\baeldung\lucene\LuceneFileSearch.java | 1 |
请完成以下Java代码 | public RefundConfig getRefundConfigById(@NonNull final RefundConfigId refundConfigId)
{
for (RefundConfig refundConfig : refundConfigs)
{
if (refundConfig.getId().equals(refundConfigId))
{
return refundConfig;
}
}
Check.fail("This contract has no config with id={}; this={}", refundConfigId, this)... | LocalDate date = invoiceSchedule.calculateNextDateToInvoice(startDate);
while (date.isBefore(currentDate))
{
final LocalDate nextDate = invoiceSchedule.calculateNextDateToInvoice(date);
Check.assume(nextDate.isAfter(date), // make sure not to get stuck in an endless loop
"For the given date={}, invoiceS... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\RefundContract.java | 1 |
请完成以下Java代码 | default void contextPrepared(ConfigurableApplicationContext context) {
}
/**
* Called once the application context has been loaded but before it has been
* refreshed.
* @param context the application context
*/
default void contextLoaded(ConfigurableApplicationContext context) {
}
/**
* The context has... | * {@link ApplicationRunner ApplicationRunners} have been called.
* @param context the application context.
* @param timeTaken the time taken for the application to be ready or {@code null} if
* unknown
* @since 2.6.0
*/
default void ready(ConfigurableApplicationContext context, @Nullable Duration timeTaken) ... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\SpringApplicationRunListener.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Integer getLineNo()
{
return lineNo;
}
public BigDecimal getQtyCUsPerTU()
{
return qtyCUsPerTU;
}
public BigDecimal getQtyTUs()
{
return qtyTUs;
}
public BigDecimal getQtyInUOM()
{
return qtyInUOM;
}
public String getUOM_x12de355()
{
return UOM_x12de355;
}
public String getPriceUOM_... | public String getProductAttributes()
{
return productAttributes;
}
public int getM_ProductPrice_ID()
{
return M_ProductPrice_ID;
}
public int getM_ProductPrice_Attribute_ID()
{
return M_ProductPrice_Attribute_ID;
}
public int getM_HU_PI_Item_Product_ID()
{
return M_HU_PI_Item_Product_ID;
}
publi... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\excelimport\Excel_OLCand_Row.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.