instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public boolean compileFromString(String className, String sourceCode) { JavaFileObject sourceObject = new InMemoryJavaFile(className, sourceCode); return compile(Collections.singletonList(sourceObject)); } private boolean compile(Iterable<? extends JavaFileObject> compilationUnits) { Di...
} return success; } public void runClass(String className, String... args) throws Exception { try (URLClassLoader classLoader = new URLClassLoader(new URL[]{outputDirectory.toUri().toURL()})) { Class<?> loadedClass = classLoader.loadClass(className); loadedClass.getMeth...
repos\tutorials-master\core-java-modules\core-java-compiler\src\main\java\com\baeldung\compilerapi\JavaCompilerUtils.java
1
请完成以下Java代码
public class SimpleContext extends ELContext { static class Functions extends FunctionMapper { Map<String, Method> map = Collections.emptyMap(); @Override public Method resolveFunction(String prefix, String localName) { return map.get(prefix + ":" + localName); } ...
return variables.setVariable(name, expression); } /** * Get our function mapper. */ @Override public FunctionMapper getFunctionMapper() { if (functions == null) { functions = new Functions(); } return functions; } /** * Get our variable mapper...
repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\util\SimpleContext.java
1
请完成以下Java代码
public boolean isSavedOrDeleted() { return isSaved() || isDeleted(); } public DocumentSaveStatus throwIfError() { if (!error) { return this; } if (exception != null) { throw AdempiereException.wrapIfNeeded(exception); } else { throw new AdempiereException(reason != null ? reason : Trans...
} public void throwIfNotSavedNorDelete() { if (isSavedOrDeleted()) { return; } if (exception != null) { throw AdempiereException.wrapIfNeeded(exception); } else { throw new AdempiereException(reason != null ? reason : TranslatableStrings.anyLanguage("Not saved")); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentSaveStatus.java
1
请完成以下Java代码
protected void setJobRetriesByJobId(String jobId, CommandContext commandContext) { JobEntity job = commandContext .getJobManager() .findJobById(jobId); if (job != null) { for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.ch...
JobDefinitionManager jobDefinitionManager = commandContext.getJobDefinitionManager(); JobDefinitionEntity jobDefinition = jobDefinitionManager.findById(jobDefinitionId); if (jobDefinition != null) { String processDefinitionId = jobDefinition.getProcessDefinitionId(); for (CommandChecker checker : c...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SetJobRetriesCmd.java
1
请在Spring Boot框架中完成以下Java代码
public class GraphQLDataFetchers { private static List<Map<String, String>> books = Arrays.asList( ImmutableMap.of("id", "book-1", "name", "Harry Potter and the Philosopher's Stone", "pageCount", "223", "authorId", "author-1"), Imm...
String bookId = dataFetchingEnvironment.getArgument("id"); return books .stream() .filter(book -> book.get("id").equals(bookId)) .findFirst() .orElse(null); }; } public DataFetcher getAuthorDataFetcher() { ...
repos\spring-boot-quick-master\quick-graphQL\src\main\java\com\quick\graphql\service\GraphQLDataFetchers.java
2
请完成以下Java代码
public <R> R forProcessInstanceReadonly(final DocumentId pinstanceId, @NonNull final Function<IProcessInstanceController, R> processor) { try (final IAutoCloseable ignored = getInstance(pinstanceId).lockForReading()) { final HUReportProcessInstance processInstance = getInstance(pinstanceId) .copyReadonly()...
private final ImmutableMap<ProcessId, WebuiHUProcessDescriptor> descriptorsByProcessId; private IndexedWebuiHUProcessDescriptors(final List<WebuiHUProcessDescriptor> descriptors) { descriptorsByProcessId = Maps.uniqueIndex(descriptors, WebuiHUProcessDescriptor::getProcessId); } public WebuiHUProcessDescrip...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\report\HUReportProcessInstancesRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class GroovyTemplateAvailabilityProvider extends PathBasedTemplateAvailabilityProvider { private static final String REQUIRED_CLASS_NAME = "groovy.text.TemplateEngine"; public GroovyTemplateAvailabilityProvider() { super(REQUIRED_CLASS_NAME, GroovyTemplateAvailabilityProperties.class, "spring.groovy.templa...
} } static class GroovyTemplateAvailabilityRuntimeHints implements RuntimeHintsRegistrar { @Override public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) { if (ClassUtils.isPresent(REQUIRED_CLASS_NAME, classLoader)) { BindableRuntimeHintsRegistrar.forTypes(GroovyTemplateAvail...
repos\spring-boot-4.0.1\module\spring-boot-groovy-templates\src\main\java\org\springframework\boot\groovy\template\autoconfigure\GroovyTemplateAvailabilityProvider.java
2
请在Spring Boot框架中完成以下Java代码
public class BankAccountAspect { @Before(value = "@annotation(com.baeldung.method.info.AccountOperation)") public void getAccountOperationInfo(JoinPoint joinPoint) { // Method Information MethodSignature signature = (MethodSignature) joinPoint.getSignature(); System.out.println("full ...
System.out.println("Method args values:"); Arrays.stream(joinPoint.getArgs()) .forEach(o -> System.out.println("arg value: " + o.toString())); // Additional Information System.out.println("returning type: " + signature.getReturnType()); System.out.println("method modifier: " +...
repos\tutorials-master\spring-aop-2\src\main\java\com\baeldung\method\info\BankAccountAspect.java
2
请完成以下Java代码
public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public int getAge() { ...
public void setRegTime(Date regTime) { this.regTime = regTime; } public String getState() { return state; } public void setState(String state) { this.state = state; } @Override public String toString() { return ToStringBuilder.reflectionToString(this); ...
repos\spring-boot-leaning-master\1.x\第16课:综合实战用户管理系统\user-manage\src\main\java\com\neo\entity\UserEntity.java
1
请在Spring Boot框架中完成以下Java代码
public static BPartnerPrintFormatMap ofList(@NonNull final List<BPartnerPrintFormat> list) { return !list.isEmpty() ? new BPartnerPrintFormatMap(list) : EMPTY; } private static BPartnerPrintFormatMap EMPTY = new BPartnerPrintFormatMap(ImmutableList.of()); private final ImmutableMap<DocTypeId, BPartnerPrintForma...
{ return Optional.ofNullable(byDocTypeId.get(docTypeId)) .map(BPartnerPrintFormat::getPrintFormatId); } public Optional<PrintFormatId> getFirstByTableId(@NonNull final AdTableId tableId) { return byDocTypeId.values() .stream() .filter(item -> AdTableId.equals(item.getAdTableId(), tableId)) .find...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\BPartnerPrintFormatMap.java
2
请在Spring Boot框架中完成以下Java代码
public void create(@NonNull final InvoicePayScheduleCreateRequest request) { request.getLines().forEach(line -> createLine(line, request.getInvoiceId())); } private void createLine(@NonNull final InvoicePayScheduleCreateRequest.Line request, @NonNull final InvoiceId invoiceId) { final I_C_InvoicePaySchedule re...
} public void updateById(@NonNull final InvoiceId invoiceId, @NonNull final Consumer<InvoicePaySchedule> updater) { newLoaderAndSaver().updateById(invoiceId, updater); } public void updateByIds(@NonNull final Set<InvoiceId> invoiceIds, @NonNull final Consumer<InvoicePaySchedule> updater) { newLoaderAndSaver(...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\paymentschedule\repository\InvoicePayScheduleRepository.java
2
请完成以下Java代码
public void allocatePOLineToSOLine( @NonNull final OrderLineId purchaseOrderLineId, @NonNull final OrderLineId salesOrderLineId) { final I_C_PO_OrderLine_Alloc poLineAllocation = InterfaceWrapperHelper.newInstance(I_C_PO_OrderLine_Alloc.class); poLineAllocation.setC_PO_OrderLine_ID(purchaseOrderLineId.getRep...
final InputDataSourceId dataSourceId = orderQuery.getInputDataSourceId(); if (dataSourceId != null) { queryBuilder.addEqualsFilter(I_C_Order.COLUMNNAME_AD_InputDataSource_ID, dataSourceId); } final ExternalSystemId externalSystemId = orderQuery.getExternalSystemId(); if (externalSystemId != null) { q...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\impl\AbstractOrderDAO.java
1
请完成以下Java代码
public void add(AuditEvent event) { Assert.notNull(event, "'event' must not be null"); synchronized (this.monitor) { this.tail = (this.tail + 1) % this.events.length; this.events[this.tail] = event; } } @Override public List<AuditEvent> find(@Nullable String principal, @Nullable Instant after, @Nullable...
private boolean isMatch(@Nullable String principal, @Nullable Instant after, @Nullable String type, AuditEvent event) { boolean match = true; match = match && (principal == null || event.getPrincipal().equals(principal)); match = match && (after == null || event.getTimestamp().isAfter(after)); match = match ...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\audit\InMemoryAuditEventRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class ExcelController { private String fileLocation; @Resource(name = "excelPOIHelper") private ExcelPOIHelper excelPOIHelper; @RequestMapping(method = RequestMethod.GET, value = "/excelProcessing") public String getExcelProcessingPage() { return "excel"; } @RequestMapping...
@RequestMapping(method = RequestMethod.GET, value = "/readPOI") public String readPOI(Model model) throws IOException { if (fileLocation != null) { if (fileLocation.endsWith(".xlsx") || fileLocation.endsWith(".xls")) { Map<Integer, List<MyCell>> data = excelPOIHelper.readExcel(f...
repos\tutorials-master\spring-web-modules\spring-mvc-java-2\src\main\java\com\baeldung\excel\ExcelController.java
2
请完成以下Java代码
public class PrivilegeMappingEntityImpl extends AbstractIdmEngineEntity implements PrivilegeMappingEntity { protected String privilegeId; protected String userId; protected String groupId; @Override public Object getPersistentState() { // Privilege mapping is immutable return Privi...
} @Override public void setUserId(String userId) { this.userId = userId; } @Override public String getGroupId() { return groupId; } @Override public void setGroupId(String groupId) { this.groupId = groupId; } }
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\persistence\entity\PrivilegeMappingEntityImpl.java
1
请在Spring Boot框架中完成以下Java代码
public EventSubscriptionDataManager getEventSubscriptionDataManager() { return eventSubscriptionDataManager; } public EventSubscriptionServiceConfiguration setEventSubscriptionDataManager(EventSubscriptionDataManager eventSubscriptionDataManager) { this.eventSubscriptionDataManager = eventSubsc...
public Duration getEventSubscriptionLockTime() { return eventSubscriptionLockTime; } public EventSubscriptionServiceConfiguration setEventSubscriptionLockTime(Duration eventSubscriptionLockTime) { this.eventSubscriptionLockTime = eventSubscriptionLockTime; return this; } public...
repos\flowable-engine-main\modules\flowable-eventsubscription-service\src\main\java\org\flowable\eventsubscription\service\EventSubscriptionServiceConfiguration.java
2
请完成以下Java代码
public void setIsDeliveryStop (final boolean IsDeliveryStop) { set_Value (COLUMNNAME_IsDeliveryStop, IsDeliveryStop); } @Override public boolean isDeliveryStop() { return get_ValueAsBoolean(COLUMNNAME_IsDeliveryStop); } @Override public void setIsPaid (final boolean IsPaid) { throw new IllegalArgument...
public void setSourceDoc_Record_ID (final int SourceDoc_Record_ID) { if (SourceDoc_Record_ID < 1) set_Value (COLUMNNAME_SourceDoc_Record_ID, null); else set_Value (COLUMNNAME_SourceDoc_Record_ID, SourceDoc_Record_ID); } @Override public int getSourceDoc_Record_ID() { return get_ValueAsInt(COLUMNNAM...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_Shipment_Constraint.java
1
请完成以下Java代码
public void validateDocTypeIsInSync(@NonNull final I_C_Payment payment) { final DocTypeId docTypeId = DocTypeId.ofRepoIdOrNull(payment.getC_DocType_ID()); if (docTypeId == null) { return; } final I_C_DocType docType = docTypeBL.getById(docTypeId); // Invoice final I_C_Invoice invoice = InvoiceId.op...
// if (C_Order_ID != 0 && dt != null && !dt.isSOTrx()) // return "PaymentDocTypeInvoiceInconsistent"; // Order final OrderId orderId = OrderId.ofRepoIdOrNull(payment.getC_Order_ID()); if (orderId == null) { return; } final I_C_Order order = orderDAO.getById(orderId); if (order.isSOTrx() != docType...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\api\impl\PaymentBL.java
1
请完成以下Java代码
public static int dateDiff(Date one, Date two) throws ServiceException { if (one == null || two == null) { throw new ServiceException(ARG_ERROR_CODE, ARG_ERROR); } long diff = Math.abs((one.getTime() - two.getTime()) / (1000 * 3600 * 24)); return new Long(diff).intValue(); ...
*/ public static Date getFirstAndLastOfMonth() { LocalDate today = LocalDate.now(); LocalDate firstDay = LocalDate.of(today.getYear(),today.getMonth(),1); ZoneId zone = ZoneId.systemDefault(); Instant instant = firstDay.atStartOfDay().atZone(zone).toInstant(); return Date.fro...
repos\springBoot-master\abel-util\src\main\java\cn\abel\utils\DateTimeUtils.java
1
请在Spring Boot框架中完成以下Java代码
public class DemoController { @GetMapping("/echo") public String echo() { return "echo"; } @GetMapping("/test") public String test() { return "test"; } @GetMapping("/sleep") public String sleep() throws InterruptedException { Thread.sleep(100L); return ...
// 释放资源 if (entry != null) { entry.exit(); } } } // 测试 @SentinelResource 注解 @GetMapping("/annotations_demo") @SentinelResource(value = "annotations_demo_resource", blockHandler = "blockHandler", fallback = "fallback") public St...
repos\SpringBoot-Labs-master\lab-46\lab-46-sentinel-demo\src\main\java\cn\iocoder\springboot\lab46\sentineldemo\controller\DemoController.java
2
请完成以下Java代码
public ActivityImpl getInitial() { return initial; } public void setInitial(ActivityImpl initial) { this.initial = initial; } @Override public String toString() { return "ProcessDefinition("+id+")"; } public String getDescription() { return (String) getProperty("documentation"); } ...
public PvmScope getEventScope() { return null; } public ScopeImpl getFlowScope() { return null; } public PvmScope getLevelOfSubprocessScope() { return null; } @Override public boolean isSubProcessScope() { return true; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\process\ProcessDefinitionImpl.java
1
请完成以下Java代码
public BigDecimal getF_SHARE() { return F_SHARE; } public void setF_SHARE(BigDecimal f_SHARE) { F_SHARE = f_SHARE; } public String getF_ISRATION() { return F_ISRATION; } public void setF_ISRATION(String f_ISRATION) { F_ISRATION = f_ISRATION; } public S...
public void setF_MEMO(String f_MEMO) { F_MEMO = f_MEMO; } public String getF_STATUS() { return F_STATUS; } public void setF_STATUS(String f_STATUS) { F_STATUS = f_STATUS; } public String getF_ISAUDIT() { return F_ISAUDIT; } public void setF_ISAUDIT(Str...
repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\common\vo\BscTollSpecialShare.java
1
请完成以下Java代码
public String getImplementationType() { return implementationType; } public void setImplementationType(String implementationType) { this.implementationType = implementationType; } public String getImplementation() { return implementation; } public void setImplementatio...
} public Object getInstance() { return instance; } public void setInstance(Object instance) { this.instance = instance; } @Override public FlowableListener clone() { FlowableListener clone = new FlowableListener(); clone.setValues(this); return clone; ...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\FlowableListener.java
1
请在Spring Boot框架中完成以下Java代码
private ResultSet executeStatement(SimpleStatement statement, String keyspace) { if (keyspace != null) { statement.setKeyspace(CqlIdentifier.fromCql(keyspace)); } return session.execute(statement); } private BoundStatement getProductVariantInsertStatement(Product product,UU...
product.getPrice()); } private BoundStatement getProductInsertStatement(Product product,UUID productId,String productTableName) { String cqlQuery1 = new StringBuilder("").append("INSERT INTO ").append(productTableName) .append("(product_id,product_name,description,price) ").append("...
repos\tutorials-master\persistence-modules\java-cassandra\src\main\java\com\baeldung\cassandra\batch\repository\ProductRepository.java
2
请完成以下Java代码
public final List<IHUDocument> createHUDocuments(final Properties ctx, final String tableName, final int recordId) { assumeTableName(tableName); final T model = InterfaceWrapperHelper.create(ctx, recordId, modelClass, ITrx.TRXNAME_None); final HUDocumentsCollector documentsCollector = new HUDocumentsCollector(...
protected final void createHUDocuments(final HUDocumentsCollector documentsCollector, final ProcessInfo pi) { Check.assumeNotNull(pi, "process info not null"); final String tableName = pi.getTableNameOrNull(); assumeTableName(tableName); final Iterator<T> models = retrieveModelsFromProcessInfo(pi); createH...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\document\impl\AbstractHUDocumentFactory.java
1
请完成以下Java代码
public LocatorId getPickFromLocatorId() {return getPickFromLocator().getId();} public WarehouseId getPickFromWarehouseId() {return getPickFromLocatorId().getWarehouseId();} public Optional<Quantity> getQtyPicked() { return Optional.ofNullable(pickedTo != null ? pickedTo.getQtyPicked() : null); } public Option...
public void assertPicked() { if (!isPicked()) { throw new AdempiereException("PickFrom was not picked: " + this); } } public PickingJobStepPickFrom assertNotPicked() { if (isPicked()) { throw new AdempiereException("PickFrom already picked: " + this); } return this; } public PickingJobStepP...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJobStepPickFrom.java
1
请完成以下Java代码
public Integer getSort() { return sort; } public void setSort(Integer sort) { this.sort = sort; } public String getIcon() { return icon; } public void setIcon(String icon) { this.icon = icon; } public String getKeywords() { return keywords; ...
StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", parentId=").append(parentId); sb.append(", name=").append(name); sb.append(", level...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProductCategory.java
1
请完成以下Java代码
public void invalidateMatchingInvoiceCandidatesAfterCommit(@NonNull final I_C_Flatrate_Term flatrateTerm) { if (isNoRefundTerm(flatrateTerm)) { return; // this MI only deals with "refund" terms } final IQuery<I_C_Invoice_Candidate> query = createInvoiceCandidatesToInvalidQuery(flatrateTerm); Services.ge...
flatrateTerm.getEndDate()); return Services.get(IQueryBL.class) .createQueryBuilder(I_C_Invoice_Candidate.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_C_Invoice_Candidate.COLUMN_Processed, false) .addEqualsFilter(I_C_Invoice_Candidate.COLUMNNAME_M_Product_ID, flatrateTerm.getM_Product_ID()...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\interceptor\C_Flatrate_Term.java
1
请完成以下Java代码
public boolean containsKey(Object key) { return getDelegate().containsKey(key); } @Override public Object get(Object key) { return getDelegate().get(key); } @Override public void load(InputStream inStream) throws IOException { getDelegate().load(inStream); } @Override public Object put(Object key, ...
public void storeToXML(OutputStream os, String comment) throws IOException { getDelegate().storeToXML(os, comment); } @Override public void storeToXML(OutputStream os, String comment, String encoding) throws IOException { getDelegate().storeToXML(os, comment, encoding); } @Override public String getProper...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\AbstractPropertiesProxy.java
1
请完成以下Java代码
public Date getGmtCreate() { return gmtCreate; } public void setGmtCreate(Date gmtCreate) { this.gmtCreate = gmtCreate; } public Date getGmtModified() { return gmtModified; } public void setGmtModified(Date gmtModified) { this.gmtModified = gmtModified; } ...
flowRule.setLimitApp(this.limitApp); flowRule.setRefResource(this.refResource); flowRule.setStrategy(this.strategy); if (this.controlBehavior != null) { flowRule.setControlBehavior(controlBehavior); } if (this.warmUpPeriodSec != null) { flowRule.setWarmUpP...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\rule\FlowRuleEntity.java
1
请完成以下Java代码
public OrderProductPK getPk() { return pk; } public void setPk(OrderProductPK pk) { this.pk = pk; } public Integer getQuantity() { return quantity; } public void setQuantity(Integer quantity) { this.quantity = quantity; } @Override public int hashC...
if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } OrderProduct other = (OrderProduct) obj; if (pk == null) { if (other.pk != null) { return false; } } else if (!pk.equals(...
repos\tutorials-master\spring-boot-modules\spring-boot-angular\src\main\java\com\baeldung\ecommerce\model\OrderProduct.java
1
请完成以下Java代码
public int shiftOperators(int number) { int length = 0; long temp = 1; while(temp <= number) { length++; temp = (temp << 3) + (temp << 1); } return length; } public int dividingWithPowersOf2(int number) { int length = 1; if (nu...
// 4 or 5 digits if (number < 10000) return 4; else return 5; } } } else { // 6 digits or more if (number < 10000000) { // 6 or 7 digits if ...
repos\tutorials-master\core-java-modules\core-java-numbers\src\main\java\com\baeldung\numberofdigits\NumberOfDigits.java
1
请在Spring Boot框架中完成以下Java代码
public Integer getBatchSize() { return this.batchSize; } public void setBatchSize(Integer batchSize) { this.batchSize = batchSize; } public String getUri() { return this.uri; } public void setUri(String uri) { this.uri = uri; } public Duration getMeterTimeToLive() { return this.meterTimeToLive; }...
} public Duration getConfigTimeToLive() { return this.configTimeToLive; } public void setConfigTimeToLive(Duration configTimeToLive) { this.configTimeToLive = configTimeToLive; } public String getConfigUri() { return this.configUri; } public void setConfigUri(String configUri) { this.configUri = conf...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\atlas\AtlasProperties.java
2
请完成以下Java代码
public static EventDescriptor ofClientOrgUserIdAndTraceId( @NonNull final ClientAndOrgId clientAndOrgId, @NonNull final UserId userId, @Nullable final String traceId) { return builder() .eventId(newEventId()) .clientAndOrgId(clientAndOrgId) .userId(userId) .traceId(traceId) .build(); } ...
public OrgId getOrgId() { return getClientAndOrgId().getOrgId(); } @NonNull public EventDescriptor withNewEventId() { return toBuilder() .eventId(newEventId()) .build(); } @NonNull public EventDescriptor withClientAndOrg(@NonNull final ClientAndOrgId clientAndOrgId) { return toBuilder() .cl...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\commons\EventDescriptor.java
1
请完成以下Java代码
private String generateRandomResult() { // // Randomly throw exception if (throwRandomException && random.nextInt(10) == 0) { throw new RuntimeException("Randomly generated exception"); } // // Generate and return a random weight final BigDecimal weight = BigDecimal.valueOf(random.nextInt(1000000))...
final String returnString = createWeightString(weightToUse); return returnString; } } public static String createWeightString(final BigDecimal weight) { final DecimalFormat weightFormat = new DecimalFormat("#########.000"); String weightStr = weightFormat.format(weight); while (weightStr.length() < 11) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.device.scales\src\main\java\de\metas\device\scales\endpoint\MockedEndpoint.java
1
请完成以下Java代码
public List<HistoricIncidentEntity> getCompletedHistoricIncidents(Date finishedAfter, Date finishedAt, int maxResults) { checkIsAuthorizedToReadHistoryAndTenants(); Map<String...
.disableBinaryFetching() .disableCustomObjectDeserialization() .includeInputs() .includeOutputs(); List<List<HistoricDecisionInstance>> partitions = CollectionUtil.partition(decisionInstances, DbSqlSessionFactory.MAXIMUM_NUMBER_PARAMS); for (List<HistoricDecisionInstance> partition : p...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\optimize\OptimizeManager.java
1
请在Spring Boot框架中完成以下Java代码
public class Child { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Integer id; private String name; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() {
return name; } public void setName(String name) { this.name = name; } public Child(){} public Child(Integer id, String name){ this.id = id; this.name = name; } }
repos\SpringBoot-Projects-FullStack-master\Part-5 Spring Boot Web Application\SpringMysqlhiber\src\main\java\spring\mysqlhiber\domain\Child.java
2
请完成以下Java代码
public static FacetAwareItem ofList(final Set<PickingJobFacet> facets) { if (facets.isEmpty()) { return EMPTY; } return new FacetAwareItem(facets); } public boolean hasFacets() {return !facetsByGroup.isEmpty();} public boolean isMatching(@NonNull final PickingJobQuery.Facets query) { retu...
private static <T> boolean isMatching(final Set<T> values, final Set<T> requiredValues) { if (requiredValues.isEmpty()) { return true; } return values.stream().anyMatch(requiredValues::contains); } public ImmutableSet<PickingJobFacet> getFacets(@NonNull final PickingJobFacetGroup group) { r...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\facets\PickingJobFacetsAccumulator.java
1
请完成以下Java代码
public int getDerivedVersion() { return derivedVersion; } @Override public void setDerivedVersion(int derivedVersion) { this.derivedVersion = derivedVersion; } @Override public String getEngineVersion() { return engineVersion; } @Override public void setEng...
this.engineVersion = engineVersion; } public IOSpecification getIoSpecification() { return ioSpecification; } public void setIoSpecification(IOSpecification ioSpecification) { this.ioSpecification = ioSpecification; } @Override public String toString() { return "Pr...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\ProcessDefinitionEntityImpl.java
1
请完成以下Java代码
public void setPayBankFee_Acct (final int PayBankFee_Acct) { set_Value (COLUMNNAME_PayBankFee_Acct, PayBankFee_Acct); } @Override public int getPayBankFee_Acct() { return get_ValueAsInt(COLUMNNAME_PayBankFee_Acct); } @Override public org.compiere.model.I_C_ValidCombination getPayment_WriteOff_A() { re...
@Override public void setRealizedGain_Acct (final int RealizedGain_Acct) { set_Value (COLUMNNAME_RealizedGain_Acct, RealizedGain_Acct); } @Override public int getRealizedGain_Acct() { return get_ValueAsInt(COLUMNNAME_RealizedGain_Acct); } @Override public org.compiere.model.I_C_ValidCombination getReali...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_BankAccount_Acct.java
1
请完成以下Java代码
public class MdcThreadPoolTaskExecutor extends ThreadPoolTaskExecutor { /** * 所有线程都会委托给这个execute方法,在这个方法中我们把父线程的MDC内容赋值给子线程 * https://logback.qos.ch/manual/mdc.html#managedThreads * * @param runnable */ @Override public void execute(Runnable runnable) { // 获取父线程MDC中的内容,必须在r...
*/ private void run(Runnable runnable, Map<String, String> context) { // 将父线程的MDC内容传给子线程 if (context != null) { try { MDC.setContextMap(context); } catch (Exception e) { logger.error(e.getMessage(), e); } } try { ...
repos\spring-boot-student-master\spring-boot-student-log\src\main\java\com\xiaolyuh\utils\MdcThreadPoolTaskExecutor.java
1
请在Spring Boot框架中完成以下Java代码
private static ExternalSystemConfigQRCode fromJson(@NonNull final JsonPayload json) { final ExternalSystemType externalSystemType = ExternalSystemType.ofValue(json.getExternalSystemType()); final int repoId = json.getChildConfigId(); return ExternalSystemConfigQRCode.builder() .childConfigId(toExternalSystem...
} else if (externalSystemType.isGRSSignum()) { return ExternalSystemGRSSignumConfigId.ofRepoId(repoId); } else if (externalSystemType.isLeichUndMehl()) { return ExternalSystemLeichMehlConfigId.ofRepoId(repoId); } throw new AdempiereException("Unsupported externalSystemType: " + externalSystemType); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\config\qrcode\v1\JsonConverterV1.java
2
请完成以下Java代码
static void sendNotificationToCarsWithUnnamedVariable(Collection<Car<?>> cars) { for (int i = 0, _ = sendOneTimeNotification(); i < cars.size(); i++) { // Notify car } } private static int sendOneTimeNotification() { System.out.println("Sending one time notification!"); ...
static void obtainTransactionAndUpdateCarWithUnnamedVariables(Car<?> car) { try (var _ = new Transaction()) { updateCar(car); } } static void updateCar(Car<?> car) { // Some update logic System.out.println("Car updated!"); } static Map<String, List<Car<?>>> ...
repos\tutorials-master\core-java-modules\core-java-21\src\main\java\com\baeldung\unnamed\variables\UnnamedVariables.java
1
请完成以下Java代码
public void setTimes(String times) { this.times = times; } public String getTempleNumber() { return TempleNumber; } public void setTempleNumber(String templeNumber) { TempleNumber = templeNumber; } public String getPosthumousTitle() { return posthumousTitle; ...
public void setSon(String son) { this.son = son; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public King getKing() { return king; } public void setKing(King king) { this.king = k...
repos\springBoot-master\springboot-neo4j\src\main\java\cn\abel\neo4j\bean\Queen.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 ...
/** Get StructureXML. @return Autogenerated Containerdefinition as XML Code */ public String getStructureXML () { return (String)get_Value(COLUMNNAME_StructureXML); } /** Set Title. @param Title Name this entity is referred to as */ public void setTitle (String Title) { set_Value (COLUMNNAME_Ti...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_CStage.java
1
请完成以下Java代码
public boolean process(final I_ESR_ImportLine line, final String message) { Check.assumeNotNull(line.getESR_Payment_Action(), "@" + ESRConstants.ERR_ESR_LINE_WITH_NO_PAYMENT_ACTION + "@"); // 08500: allocate when process final I_C_Invoice invoice = line.getC_Invoice(); final PaymentId paymentId = PaymentId.o...
final BigDecimal invoiceOpenAmt = Services.get(IInvoiceDAO.class).retrieveOpenAmt(invoice); if (payment.getPayAmt().compareTo(invoiceOpenAmt) != 0) { final BigDecimal overUnderAmt = payment.getPayAmt().subtract(invoiceOpenAmt); payment.setOverUnderAmt(overUnderAmt); } InterfaceWrapperHelper.s...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\actionhandler\impl\AbstractESRActionHandler.java
1
请完成以下Java代码
protected abstract class AbstractPropertySourceLoggingFunction implements Function<PropertySource<?>, PropertySource<?>> { protected void logProperties(@NonNull Iterable<String> propertyNames, @NonNull Function<String, Object> propertyValueFunction) { log("Properties ["); for (String propertyName : Co...
} return propertySource; } } // The PropertySource may not be enumerable but may use a Map as its source. protected class MapPropertySourceLoggingFunction extends AbstractPropertySourceLoggingFunction { @Override @SuppressWarnings("unchecked") public @Nullable PropertySource<?> apply(@Nullable Property...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\context\logging\EnvironmentLoggingApplicationListener.java
1
请完成以下Java代码
private final boolean isValueDisplayed() { return !isValueToColumn || isValueToColumn && isValueToEnabled; } @Override public boolean isCellEditable(final EventObject e) { return true; } @Override public boolean shouldSelectCell(final EventObject e) { return isValueDisplayed(); } private IUserQueryR...
@Override public boolean stopCellEditing() { if (!super.stopCellEditing()) { return false; } destroyEditor(); return true; } @Override public void cancelCellEditing() { super.cancelCellEditing(); destroyEditor(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindValueEditor.java
1
请完成以下Java代码
public final class InvoiceCandidateGenerateResult { public static InvoiceCandidateGenerateResult of( @NonNull final IInvoiceCandidateHandler handler, @NonNull final List<? extends I_C_Invoice_Candidate> invoiceCandidates) { return new InvoiceCandidateGenerateResult(handler, invoiceCandidates); } public sta...
{ this.handler = handler; this.invoiceCandidates = ImmutableList.copyOf(invoiceCandidates); } public IInvoiceCandidateHandler getHandler() { return handler; } public List<I_C_Invoice_Candidate> getC_Invoice_Candidates() { return invoiceCandidates; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\spi\InvoiceCandidateGenerateResult.java
1
请完成以下Java代码
void removeFileSystem(NestedFileSystem fileSystem) { synchronized (this.fileSystems) { this.fileSystems.remove(fileSystem.getJarPath()); } } @Override public SeekableByteChannel newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs) throws IOException { NestedPath nested...
NestedPath nestedPath = NestedPath.cast(path); nestedPath.assertExists(); return new NestedFileStore(nestedPath.getFileSystem()); } @Override public void checkAccess(Path path, AccessMode... modes) throws IOException { Path jarPath = getJarPath(path); jarPath.getFileSystem().provider().checkAccess(jarPath, ...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\nio\file\NestedFileSystemProvider.java
1
请完成以下Java代码
public class MiniTableModel extends DefaultTableModel { /** * */ private static final long serialVersionUID = 1672846860594628976L; public MiniTableModel() { super(); } /** * Same as {@link DefaultTableModel#setValueAt(Object, int, int)} but is firing the event ONLY if the value was really changed. ...
boolean valueSet = false; try { rowVector.setElementAt(aValue, column); fireTableCellUpdated(row, column); valueSet = true; } finally { // Rollback changes if (!valueSet) { rowVector.setElementAt(valueOld, column); } } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\minigrid\MiniTableModel.java
1
请在Spring Boot框架中完成以下Java代码
private BeanMetadataElement extracted(Element element, ParserContext pc, NamespaceHandlerResolver resolver, Element providerElement) { String ref = providerElement.getAttribute(ATT_REF); if (!StringUtils.hasText(ref)) { BeanDefinition provider = resolver.resolve(providerElement.getNamespaceURI()).parse(provid...
* from the &lt;http&gt; namespace, such as OpenID, is expected to handle the * request). */ public static final class NullAuthenticationProvider implements AuthenticationProvider { @Override public Authentication authenticate(Authentication authentication) throws AuthenticationException { return null; } ...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\authentication\AuthenticationManagerBeanDefinitionParser.java
2
请完成以下Java代码
public void setM_IolCandHandler_Log_ID (final int M_IolCandHandler_Log_ID) { if (M_IolCandHandler_Log_ID < 1) set_ValueNoCheck (COLUMNNAME_M_IolCandHandler_Log_ID, null); else set_ValueNoCheck (COLUMNNAME_M_IolCandHandler_Log_ID, M_IolCandHandler_Log_ID); } @Override public int getM_IolCandHandler_Log_...
{ return get_ValueAsInt(COLUMNNAME_Record_ID); } @Override public void setStatus (final @Nullable java.lang.String Status) { set_Value (COLUMNNAME_Status, Status); } @Override public java.lang.String getStatus() { return get_ValueAsString(COLUMNNAME_Status); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_IolCandHandler_Log.java
1
请完成以下Java代码
public static LookupValuesPage allValues(@NonNull final LookupValuesList values) { return builder() .totalRows(OptionalInt.of(values.size())) // N/A .firstRow(0) // N/A .values(values) .hasMoreResults(OptionalBoolean.FALSE) .build(); } public static LookupValuesPage ofNullable(@Nullable final ...
} return allValues(LookupValuesList.fromNullable(lookupValue)); } public <T> T transform(@NonNull final Function<LookupValuesPage, T> transformation) { return transformation.apply(this); } public boolean isEmpty() { return values.isEmpty(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\LookupValuesPage.java
1
请在Spring Boot框架中完成以下Java代码
public class NettyConfig { /** * 定义全局单利channel组 管理所有channel */ private static volatile ChannelGroup channelGroup = null; /** * 存放请求ID与channel的对应关系 */ private static volatile ConcurrentHashMap<String, Channel> channelMap = null; /** * 定义两把锁 */ private static final ...
return channelGroup; } public static ConcurrentHashMap<String, Channel> getChannelMap() { if (null == channelMap) { synchronized (lock2) { if (null == channelMap) { channelMap = new ConcurrentHashMap<>(); } } } ...
repos\springboot-demo-master\netty\src\main\java\com\et\netty\config\NettyConfig.java
2
请完成以下Spring Boot application配置
spring.datasource.url= jdbc:mysql://localhost:3306/springboot_demo?useSSL=false spring.datasource.username= root spring.datasource.password= root ## Hibernate Properties # The SQL dialect makes Hibernate generate better SQL for the chosen database spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5I...
# Threshold after which files are written to disk. spring.servlet.multipart.file-size-threshold=2KB # Max file size. spring.servlet.multipart.max-file-size=200MB # Max Request Size spring.servlet.multipart.max-request-size=215MB
repos\Spring-Boot-Advanced-Projects-main\springboot-upload-download-file-database\src\main\resources\application.properties
2
请在Spring Boot框架中完成以下Java代码
public String getCity() { return city; } public void setCity(String city) { this.city = city; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OrderDeliveryAddress orderDelive...
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OrderDeliveryAddress {\n"); sb.append(" gender: ").append(toIndentedString(gender)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" name: ").app...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-orders-api\src\main\java\io\swagger\client\model\OrderDeliveryAddress.java
2
请完成以下Java代码
public void deleteDeployment(String deploymentId) { getHistoricDecisionExecutionEntityManager().deleteHistoricDecisionExecutionsByDeploymentId(deploymentId); getDecisionTableEntityManager().deleteDecisionsByDeploymentId(deploymentId); getResourceEntityManager().deleteResourcesByDeploymentId(depl...
return dataManager.getDeploymentResourceNames(deploymentId); } @Override public List<DmnDeployment> findDeploymentsByNativeQuery(Map<String, Object> parameterMap) { return dataManager.findDeploymentsByNativeQuery(parameterMap); } @Override public long findDeploymentCountByNativeQuery(M...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\persistence\entity\DmnDeploymentEntityManagerImpl.java
1
请完成以下Java代码
public class FinishedGoodsReceiveLineId { public static final FinishedGoodsReceiveLineId FINISHED_GOODS = new FinishedGoodsReceiveLineId("finishedGoods"); public static FinishedGoodsReceiveLineId ofCOProductBOMLineId(@NonNull final PPOrderBOMLineId coProductBOMLineId) {return new FinishedGoodsReceiveLineId(PREFIX_CO...
private FinishedGoodsReceiveLineId(@NonNull final String string) { this.string = string; } @Override @Deprecated public String toString() {return toJson();} @JsonValue public String toJson() {return string;} public static boolean equals(@Nullable final FinishedGoodsReceiveLineId id1, @Nullable final Finish...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\model\FinishedGoodsReceiveLineId.java
1
请在Spring Boot框架中完成以下Java代码
public class ShippingHeaderTypesProperties { private String headerName; private String international; private String domestic; public String getHeaderName() { return headerName; } public void setHeaderName(String headerName) { this.headerName = headerName; } p...
return international; } public void setInternational(String international) { this.international = international; } public String getDomestic() { return domestic; } public void setDomestic(String domestic) { this.domestic = domestic; } }
repos\tutorials-master\spring-cloud-modules\spring-cloud-aws-v3\src\main\java\com\baeldung\spring\cloud\aws\sqs\conversion\configuration\ShippingHeaderTypesProperties.java
2
请在Spring Boot框架中完成以下Java代码
public class PersonServiceImpl implements PersonService { @Autowired PersonRepository personRepository; @Autowired RedisTemplate redisTemplate; @Override @CachePut(value = "people", key = "#person.id") public Person save(Person person) { Person p = personRepository.save(person); ...
@Override @Cacheable(value = "people#${select.cache.timeout:1800}#${select.cache.refresh:600}", key = "#person.id", sync = true) //3 public Person findOne(Person person, String a, String[] b, List<Long> c) { Person p = personRepository.findOne(person.getId()); System.out.println("为id、key为:" + p....
repos\spring-boot-student-master\spring-boot-student-cache-redis\src\main\java\com\xiaolyuh\service\impl\PersonServiceImpl.java
2
请完成以下Java代码
protected void executeSynchronous(FlowNode flowNode) { // Execution listener if (CollectionUtil.isNotEmpty(flowNode.getExecutionListeners())) { executeExecutionListeners(flowNode, ExecutionListener.EVENTNAME_START); } commandContext.getHistoryManager().recordActivityStart(ex...
ErrorPropagation.propagateError(error, execution); } catch (RuntimeException e) { if (LogMDC.isMDCEnabled()) { LogMDC.putMDCExecution(execution); } throw e; } } else { logger.debug("No activityBehavior on act...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\agenda\ContinueMultiInstanceOperation.java
1
请完成以下Java代码
public List<Passenger> addPassenger(Passenger passenger) { passengers.add(passenger); return passengers; } public List<Passenger> removePassenger(Passenger passenger) { passengers.remove(passenger); return passengers; } public List<Passenger> getPassengersBySource(S...
public long getKidsCount(List<Passenger> passengerList) { return passengerList.stream() .filter(it -> (it.getAge() <= 10)) .count(); } public List<Passenger> getFinalPassengersList() { return Collections.unmodifiableList(passengers); } public List<String> getSer...
repos\tutorials-master\core-java-modules\core-java-collections-list-3\src\main\java\com\baeldung\list\listvsarraylist\ListDemo.java
1
请完成以下Java代码
public int getPageCount() { return pageCount; } public void setPageCount(int pageCount) { this.pageCount = pageCount; } public String getFormat() { return format; } public void setFormat(String format) { this.format = format; } public List<PrintPackageInfo> getPrintPackageInfos() { if (printP...
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PrintPackage other = (PrintPackage)obj; if (copies != other.copies) return false; if (format == null) { if (other.format != null) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.api\src\main\java\de\metas\printing\esb\api\PrintPackage.java
1
请完成以下Java代码
public LwM2mClient get(String endpoint) { try (var connection = connectionFactory.getConnection()) { byte[] data = connection.get(getKey(endpoint)); if (data == null) { return null; } else { try { return deserialize(data); ...
} }); }); return clients; } } @Override public void put(LwM2mClient client) { if (client.getState().equals(LwM2MClientState.UNREGISTERED)) { log.error("[{}] Client is in invalid state: {}!", client.getEndpoint(), client.getState(), new Exc...
repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\store\TbRedisLwM2MClientStore.java
1
请完成以下Java代码
public Optional<StockQtyAndUOMQty> getQtyShipped(final I_C_OLCand olCand) { if (InterfaceWrapperHelper.isNull(olCand, I_C_OLCand.COLUMNNAME_QtyShipped)) { return Optional.empty(); } final Quantity qtyShipped = Quantity.of(olCand.getQtyShipped(), getC_UOM_Effective(olCand)); final ProductId productId = Pr...
final Quantity catchWeight = Quantity.of(olCand.getQtyShipped_CatchWeight(), uomDAO.getById(catchWeightUomId)); builder.uomQty(catchWeight); } return Optional.of(builder.build()); } @Override public Optional<BigDecimal> getManualQtyInPriceUOM(final @NonNull I_C_OLCand record) { return !InterfaceWrapperHe...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\impl\OLCandEffectiveValuesBL.java
1
请在Spring Boot框架中完成以下Java代码
public class SecurityConfig { @Bean public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) { return http .authorizeExchange(exchanges -> exchanges .pathMatchers("/admin").hasAuthority("ROLE_ADMIN") .anyExchange().authenticated()) .form...
.roles("USER") .build(); UserDetails admin = User .withUsername("admin") .password(passwordEncoder().encode("password")) .roles("ADMIN") .build(); return new MapReactiveUserDetailsService(user, admin); } @Bean public PasswordEncoder passwo...
repos\tutorials-master\spring-reactive-modules\spring-reactive\src\main\java\com\baeldung\reactive\security\SecurityConfig.java
2
请完成以下Java代码
public PrintingQueueProcessingInfo getProcessingInfo() { return printingQueueProcessingInfo; } /** * Iterate {@link I_C_Printing_Queue}s which are not processed yet. * * IMPORTANT: items are returned in FIFO order (ordered by {@link I_C_Printing_Queue#COLUMNNAME_C_Printing_Queue_ID}) */ @Override public...
final String trxName) { final IQuery<I_C_Printing_Queue> query = Services.get(IPrintingDAO.class).createQuery(ctx, queueQuery, trxName); // IMPORTANT: we need to query only one item at time (BufferSize=1) because else // it could happen that we re-process again an item which was already processed but it was cac...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\api\impl\DefaultPrintingQueueSource.java
1
请完成以下Java代码
protected ImportRecordResult importRecord(@NonNull final IMutable<Object> state, @NonNull final I_I_Pharma_Product importRecord, final boolean isInsertOnly) throws Exception { final org.compiere.model.I_M_Product existentProduct = productDAO.retrieveProductByValue(importRecord.getA00PZN()); final String ope...
{ product = IFAProductImportHelper.updateProduct(importRecord, existentProduct); } importRecord.setM_Product_ID(product.getM_Product_ID()); ModelValidationEngine.get().fireImportValidate(this, importRecord, importRecord.getM_Product(), IImportInterceptor.TIMING_AFTER_IMPORT); IFAProductImportHelper.i...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java\de\metas\impexp\product\IFAInitialImportProcess2.java
1
请在Spring Boot框架中完成以下Java代码
public String getDriverClassName() { return driverClassName; } public void setDriverClassName(String driverClassName) { this.driverClassName = driverClassName; } public int getInitialSize() { return initialSize; } public void setInitialSize(int initialSize) { t...
} public boolean isTestOnBorrow() { return testOnBorrow; } public void setTestOnBorrow(boolean testOnBorrow) { this.testOnBorrow = testOnBorrow; } public boolean isTestOnReturn() { return testOnReturn; } public void setTestOnReturn(boolean testOnReturn) { ...
repos\spring-boot-leaning-master\2.x_42_courses\第 3-7 课: Spring Boot 集成 Druid 监控数据源\spring-boot-multi-Jpa-druid\src\main\java\com\neo\config\druid\DruidConfig.java
2
请完成以下Java代码
public class CacheAwareCmmnHistoryEventProducer extends DefaultCmmnHistoryEventProducer { @Override protected HistoricCaseInstanceEventEntity loadCaseInstanceEventEntity(CaseExecutionEntity caseExecutionEntity) { final String caseInstanceId = caseExecutionEntity.getCaseInstanceId(); HistoricCaseInstanceEv...
if (cachedEntity != null) { return cachedEntity; } else { return newCaseActivityInstanceEventEntity(caseExecutionEntity); } } /** find a cached entity by primary key */ protected <T extends HistoryEvent> T findInCache(Class<T> type, String id) { return Context.getCommandContext() ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\producer\CacheAwareCmmnHistoryEventProducer.java
1
请在Spring Boot框架中完成以下Java代码
public class Book implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String title; private String isbn; public Long getId() { return id; } public void setId(Long id) ...
} if (getClass() != obj.getClass()) { return false; } return id != null && id.equals(((Book) obj).id); } @Override public int hashCode() { return 2021; } @Override public String toString() { return "Book{" + "id=" + id + ", title=" + title ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootOneToManyUnidirectional\src\main\java\com\bookstore\entity\Book.java
2
请完成以下Java代码
public ViewLayout getViewLayout( @NonNull final WindowId windowId, @NonNull final JSONViewDataType viewDataType, @Nullable final ViewProfileId profileId) { return ViewLayout.builder() .setWindowId(PickingConstants.WINDOWID_PickingView) .setCaption("Picking") // .setIncludedViewLayout(Include...
.pickingCandidateService(pickingCandidateService) .barcodeFilterData(extractProductBarcodeFilterData(request).orElse(null)) .build(); } @Builder(builderMethodName = "createViewRequest", builderClassName = "$CreateViewRequestBuilder") private static CreateViewRequest createCreateViewRequest( @NonNull fina...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\packageable\PackageableViewFactory.java
1
请在Spring Boot框架中完成以下Java代码
static class LazyTracingSpanContext implements SpanContext { private final SingletonSupplier<Tracer> tracer; LazyTracingSpanContext(ObjectProvider<Tracer> tracerProvider) { this.tracer = SingletonSupplier.of(tracerProvider::getObject); } @Override public @Nullable String getCurrentTraceId() { Span cu...
return false; } Boolean sampled = currentSpan.context().sampled(); return sampled != null && sampled; } @Override public void markCurrentSpanAsExemplar() { } private @Nullable Span currentSpan() { return this.tracer.obtain().currentSpan(); } } }
repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing\src\main\java\org\springframework\boot\micrometer\tracing\autoconfigure\prometheus\PrometheusExemplarsAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public final class WebMvcObservationAutoConfiguration { @Bean @ConditionalOnMissingFilterBean FilterRegistrationBean<ServerHttpObservationFilter> webMvcObservationFilter(ObservationRegistry registry, ObjectProvider<ServerRequestObservationConvention> customConvention, ObservationProperties observationProperti...
@ConditionalOnBean(MeterRegistry.class) static class MeterFilterConfiguration { @Bean @Order(0) MaximumAllowableTagsMeterFilter metricsHttpServerUriTagFilter(ObservationProperties observationProperties, MetricsProperties metricsProperties) { String meterNamePrefix = observationProperties.getHttp().getSer...
repos\spring-boot-4.0.1\module\spring-boot-webmvc\src\main\java\org\springframework\boot\webmvc\autoconfigure\WebMvcObservationAutoConfiguration.java
2
请完成以下Java代码
public int assignAsyncBatchForProcessing(@NonNull final AsyncBatchId asyncBatchId) { return dao.assignAsyncBatchForProcessing(getQueuePackageProcessorIds(), asyncBatchId); } @NonNull private Optional<IQuery<I_C_Queue_WorkPackage>> createQuery(final Properties workPackageCtx) { return createQuery(workPackageCt...
{ return newWorkPackage(ctx); } @Override public IWorkPackageBuilder newWorkPackage(final Properties context) { if (enquingPackageProcessorId == null) { throw new IllegalStateException("Enquing not allowed"); } return new WorkPackageBuilder(context, this, enquingPackageProcessorId); } @NonNull pu...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\api\impl\WorkPackageQueue.java
1
请完成以下Java代码
public void actionPerformed(ActionEvent e) { dispose(); } // actionPerformed /** * Add change log menu item * * @param l * @param popupMenu * @return CMenuItem */ public static CMenuItem addMenu(ActionListener l, JPopupMenu popupMenu) { CMenuItem mi = new CMenuItem(Msg.getElement(Env.getCtx(), ...
popupMenu.add(mi); return mi; } // addMenu /** * Open field record info dialog * * @param mField */ public static void start(GridField mField) { int WindowNo = mField.getWindowNo(); Frame frame = Env.getWindow(WindowNo); new FieldRecordInfo(frame, mField.getColumnName(), mField.getGridTab().getA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\FieldRecordInfo.java
1
请完成以下Java代码
public void setC_Workplace(final org.compiere.model.I_C_Workplace C_Workplace) { set_ValueFromPO(COLUMNNAME_C_Workplace_ID, org.compiere.model.I_C_Workplace.class, C_Workplace); } @Override public void setC_Workplace_ID (final int C_Workplace_ID) { if (C_Workplace_ID < 1) set_Value (COLUMNNAME_C_Workplace...
public int getM_Warehouse_ID() { return get_ValueAsInt(COLUMNNAME_M_Warehouse_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); } /** * POSPaymentProc...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_POS.java
1
请在Spring Boot框架中完成以下Java代码
public CommandLineRunner commandLineRunner() { return useJdbcClient(); } private CommandLineRunner useJdbcTemplate() { return (args) -> { log.info("using JdbcTemplate..."); BeanPropertyRowMapper<UserDO> rowMapper = new BeanPropertyRowMapper<>(UserDO.class); U...
private CommandLineRunner useJdbcClient() { return (args) -> { log.info("using JdbcClient..."); UserDO userDO = jdbcClient.sql("select username from t_user where id = ?") .param(2L) .query(UserDO.class) .single(); lo...
repos\spring-boot-best-practice-master\spring-boot-datasource\src\main\java\cn\javastack\springboot\ds\Application.java
2
请完成以下Java代码
protected Map<String, Long> reportMetrics() { Map<String, Long> reports = new HashMap<>(); DbOperation deleteOperationProcessInstance = deleteOperations.get(HistoricProcessInstanceEntity.class); if (deleteOperationProcessInstance != null) { reports.put(Metrics.HISTORY_CLEANUP_REMOVED_PROCESS_INSTANCE...
} protected boolean shouldRescheduleNow() { int batchSize = getBatchSize(); for (DbOperation deleteOperation : deleteOperations.values()) { if (deleteOperation.getRowsAffected() == batchSize) { return true; } } return false; } public int getBatchSize() { return Context ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\historycleanup\HistoryCleanupRemovalTime.java
1
请在Spring Boot框架中完成以下Java代码
public ConcurrentKafkaListenerContainerFactory<String, String> filterKafkaListenerContainerFactory() { ConcurrentKafkaListenerContainerFactory<String, String> factory = kafkaListenerContainerFactory("filter"); factory.setRecordFilterStrategy(record -> record.value() .contains("World")); ...
public ConsumerFactory<String, Object> multiTypeConsumerFactory() { HashMap<String, Object> props = new HashMap<>(); props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapAddress); props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class); props.put(Consumer...
repos\tutorials-master\spring-kafka\src\main\java\com\baeldung\spring\kafka\KafkaConsumerConfig.java
2
请完成以下Java代码
public OrderCost execute() { final ImmutableList<OrderCostDetail> details = createOrderCostDetails(); final OrderCostType costType = costTypeRepository.getById(request.getCostTypeId()); final OrderId orderId = request.getOrderId(); final I_C_Order order = orderBL.getById(orderId); final OrderCost orderCos...
} return orderBL.getLinesByIds(orderAndLineIds) .values() .stream() .sorted(Comparator.comparing(I_C_OrderLine::getLine)) .map(OrderCostCreateCommand::toOrderCostDetail) .collect(ImmutableList.toImmutableList()); } private static OrderCostDetail toOrderCostDetail(final I_C_OrderLine orderLine)...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\OrderCostCreateCommand.java
1
请完成以下Java代码
public void setIsRemitTo (final boolean IsRemitTo) { set_Value (COLUMNNAME_IsRemitTo, IsRemitTo); } @Override public boolean isRemitTo() { return get_ValueAsBoolean(COLUMNNAME_IsRemitTo); } @Override public void setIsReplicationLookupDefault (final boolean IsReplicationLookupDefault) { set_Value (COLU...
} @Override public java.lang.String getPhone() { return get_ValueAsString(COLUMNNAME_Phone); } @Override public void setPhone2 (final @Nullable java.lang.String Phone2) { set_Value (COLUMNNAME_Phone2, Phone2); } @Override public java.lang.String getPhone2() { return get_ValueAsString(COLUMNNAME_Ph...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Location_QuickInput.java
1
请完成以下Java代码
public void validateBankAccountCurrency(final I_C_PaySelection paySelection) { final I_C_BP_BankAccount bankAccount = InterfaceWrapperHelper.create(paySelection.getC_BP_BankAccount(), I_C_BP_BankAccount.class); final List<I_C_PaySelectionLine> paySelectionLines = Services.get(IPaySelectionDAO.class).retrievePaySe...
final String formattedDate = dateFormat.format(paySelection.getPayDate()); name.append(formattedDate); } if (name.length() > 0) { name.append("_"); } final BankAccountId bankAccountId = BankAccountId.ofRepoIdOrNull(paySelection.getC_BP_BankAccount_ID()); if (bankAccountId != null) { final Strin...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\modelvalidator\C_PaySelection.java
1
请完成以下Java代码
public class TimerCancelledListenerDelegate implements ActivitiEventListener { private List<BPMNElementEventListener<BPMNTimerCancelledEvent>> processRuntimeEventListeners; private ToTimerCancelledConverter converter; public TimerCancelledListenerDelegate( List<BPMNElementEventListener<BPMNTimerC...
public void onEvent(ActivitiEvent event) { converter .from(event) .ifPresent(convertedEvent -> { for (BPMNElementEventListener<BPMNTimerCancelledEvent> listener : processRuntimeEventListeners) { listener.onEvent(convertedEvent); } ...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\event\internal\TimerCancelledListenerDelegate.java
1
请完成以下Java代码
public final class ALoginRes_da extends ListResourceBundle { // TODO Run native2ascii to convert to plain ASCII !! /** Translation Content */ static final Object[][] contents = new String[][] { { "Connection", "Forbindelse" }, { "Defaults", "Basis" }, { "Login", "ADempiere: ...
{ "NotConnected", "Ingen forbindelse" }, { "DatabaseNotFound", "Database blev ikke fundet" }, { "UserPwdError", "Forkert bruger til adgangskode" }, { "RoleNotFound", "Rolle blev ikke fundet/afsluttet" }, { "Authorized", "Tilladelse OK" }, { "Ok", "OK" }, { "Cancel", ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\apps\ALoginRes_da.java
1
请完成以下Java代码
public static boolean isOldValues(final Object model) { final POWrapper wrapper = getPOWrapperOrNull(model); return wrapper != null && wrapper.useOldValues; } @Nullable public static IModelInternalAccessor getModelInternalAccessor(@NonNull final Object model) { if (model instanceof PO) { final PO po = ...
final int columnIndex = POWrapper.this.getColumnIndex(columnName); return POWrapper.this.getValue(columnName, columnIndex, returnType); } @Override public Object getReferencedObject(final String columnName, final Method interfaceMethod) throws Exception { return POWrapper.this.getReferencedObject(columnN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\model\POWrapper.java
1
请完成以下Java代码
public final void setNString(final int parameterIndex, final String value) throws SQLException { traceSqlParam(parameterIndex, value); delegate.setNString(parameterIndex, value); } @Override public final ResultSet executeQuery() throws SQLException { return trace(() -> delegate.executeQuery()); } @Overr...
public final boolean execute() throws SQLException { return trace(() -> delegate.execute()); } @Override public final void addBatch() throws SQLException { trace(() -> { delegate.addBatch(); return null; }); } @Override public final ResultSetMetaData getMetaData() throws SQLException { return d...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\sql\impl\TracingPreparedStatement.java
1
请完成以下Java代码
public int characteristics() { return Spliterator.ORDERED | Spliterator.NONNULL | Spliterator.CONCURRENT; } } /** * Returns a {@link Spliterator} over the elements in this queue. * * <p>The returned spliterator is * <a href="package-summary.html#Weakl...
// Unsafe mechanics private static final sun.misc.Unsafe UNSAFE; private static final long headOffset; private static final long tailOffset; static { try { Field f = Unsafe.class.getDeclaredField("theUnsafe"); f.setAccessible(true); UNSAFE = (Unsafe) f.get(n...
repos\spring-boot-student-master\spring-boot-student-concurrent\src\main\java\com\xiaolyuh\ConcurrentLinkedQueue.java
1
请在Spring Boot框架中完成以下Java代码
CsrfRequestDataValueProcessor requestDataValueProcessor() { return new CsrfRequestDataValueProcessor(); } @Bean static RsaKeyConversionServicePostProcessor conversionServicePostProcessor() { return new RsaKeyConversionServicePostProcessor(); } private List<SecurityWebFilterChain> getSecurityWebFilterChains()...
SecurityWebFilterChain result = http.build(); return result; } private static class OAuth2ClasspathGuard { static void configure(ApplicationContext context, ServerHttpSecurity http) { http.oauth2Login(withDefaults()); http.oauth2Client(withDefaults()); } static boolean shouldConfigure(ApplicationCont...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\reactive\WebFluxSecurityConfiguration.java
2
请完成以下Java代码
public class MCharge extends X_C_Charge { /** * */ private static final long serialVersionUID = 630271473830196435L; /** * Get Charge Account * @param C_Charge_ID charge * @param as account schema * @param amount amount for expense(+)/revenue(-) * @return Charge Account or null */ public sta...
* Standard Constructor * @param ctx context * @param C_Charge_ID id * @param trxName transaction */ public MCharge (Properties ctx, int C_Charge_ID, String trxName) { super (ctx, C_Charge_ID, trxName); if (C_Charge_ID == 0) { setChargeAmt (Env.ZERO); setIsSameCurrency (false); setIsSameTax (fa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MCharge.java
1
请完成以下Java代码
private List<ImmutableAttributeSet.Builder> recurse( final int currendAttributeIdIdx, @NonNull final List<AttributeId> attributeIds, @NonNull final MultiValueMap<AttributeId, AttributeListValue> attributeId2Values, @NonNull final ImmutableAttributeSet.Builder builder) { final LinkedList<ImmutableAttribut...
final boolean listContainsMore = attributeIds.size() > nextAttributeIdIdx; if (listContainsMore) { result.addAll(recurse(nextAttributeIdIdx, attributeIds, attributeId2Values, copy)); } else { result.add(copy); } } return result; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\flatrate\dataEntry\CreateAllAttributeSetsCommand.java
1
请在Spring Boot框架中完成以下Java代码
public XMLGregorianCalendar getStartDate() { return startDate; } /** * Sets the value of the startDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setStartDate(XMLGregorianCalendar value) { ...
* */ public XMLGregorianCalendar getEndDate() { return endDate; } /** * Sets the value of the endDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setEndDate(XMLGregorianCalendar value)...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ExtendedPeriodType.java
2
请完成以下Java代码
protected final I_C_Queue_WorkPackage getC_Queue_WorkPackage() { Check.assumeNotNull(workpackage, "workpackage not null"); return this.workpackage; } @NonNull protected final QueueWorkPackageId getQueueWorkPackageId() { Check.assumeNotNull(workpackage, "workpackage not null"); return QueueWorkPackageId.of...
catch (final LockFailedException e) { // this can happen, if e.g. there was a restart, or if the WP was flagged as error once Loggables.addLog("Missing lock for ownerName={}; was probably cleaned up meanwhile", elementsLockOwnerName); return Optional.empty(); } } /** * Returns the {@link NullLatchStr...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\spi\WorkpackageProcessorAdapter.java
1
请完成以下Java代码
public void updateLockTime(String caseInstanceId, Date lockDate, String lockOwner, Date expirationTime) { HashMap<String, Object> params = new HashMap<>(); params.put("id", caseInstanceId); params.put("lockTime", lockDate); params.put("expirationTime", expirationTime); params.put...
protected void setSafeInValueLists(CaseInstanceQueryImpl caseInstanceQuery) { if (caseInstanceQuery.getCaseInstanceIds() != null) { caseInstanceQuery.setSafeCaseInstanceIds(createSafeInValuesList(caseInstanceQuery.getCaseInstanceIds())); } if (caseInstanceQuery.getInvolvedGr...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\data\impl\MybatisCaseInstanceDataManagerImpl.java
1
请完成以下Java代码
public class Bestellen { @XmlElement(namespace = "", required = true) protected String clientSoftwareKennung; @XmlElement(namespace = "", required = true) protected Bestellung bestellung; /** * Gets the value of the clientSoftwareKennung property. * * @return * possible ob...
* {@link Bestellung } * */ public Bestellung getBestellung() { return bestellung; } /** * Sets the value of the bestellung property. * * @param value * allowed object is * {@link Bestellung } * */ public void setBestellung(Best...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\Bestellen.java
1
请完成以下Spring Boot application配置
spring: application: name: dubbo-registry-nacos-consumer-sample demo: service: version: 1.0.0 nacos: host: 127.0.0.1 port: 8848 username: nacos password: nacos dubbo: registry: address
: nacos://${nacos.host}:${nacos.port}/?username=${nacos.username}&password=${nacos.password}
repos\dubbo-spring-boot-project-master\dubbo-spring-boot-samples\registry-samples\nacos-samples\consumer-sample\src\main\resources\application.yml
2
请完成以下Java代码
public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setM_Product_TaxCategory_ID (final int M_Product_TaxCategory_ID) { if (M_Product_TaxCategory_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_TaxCategory_ID, null); else set_ValueNoCheck (COLUMNNAME...
return get_ValueAsInt(COLUMNNAME_M_Product_TaxCategory_ID); } @Override public void setValidFrom (final java.sql.Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); } @Override public java.sql.Timestamp getValidFrom() { return get_ValueAsTimestamp(COLUMNNAME_ValidFrom); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_TaxCategory.java
1
请完成以下Java代码
public class ExcelCreator { public static HSSFWorkbook createSampleWorkbook() { HSSFWorkbook workbook = new HSSFWorkbook(); final String SHEET_NAME = "Employees"; final String[] COLUMN_HEADERS = { "ID", "Name", "Department" }; Object[][] data = { { 101, "John Doe", "Finance" }, { 1...
for (int i = 0; i < rowData.length; i++) { Cell cell = row.createCell(i); Object value = rowData[i]; if (value instanceof Integer) { cell.setCellValue(((Integer) value).doubleValue()); } else if (value instanceof Double) { ...
repos\tutorials-master\apache-poi-3\src\main\java\com\baeldung\hssfworkbook\ExcelCreator.java
1
请完成以下Java代码
public void sendAndCancel() { sendRequests(Lists.newArrayList( "http://www.baidu.com", "http://www.163.com", "http://www.sina.com.cn")); client.cancel(this.tag); } public void sendRequests(List<String> urls) { for (String item : urls) { ...
private static class SimpleCallback implements Callback { public void onFailure(Request request, IOException e) { e.printStackTrace(); } public void onResponse(Response response) throws IOException { System.out.println(response.body().string()); } } pub...
repos\spring-boot-quick-master\quick-okhttp\src\main\java\com\quick\okhttp\CancelRequest.java
1