instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public void setIsAdditionalCustomQuery (final boolean IsAdditionalCustomQuery)
{
set_Value (COLUMNNAME_IsAdditionalCustomQuery, IsAdditionalCustomQuery);
}
@Override
public boolean isAdditionalCustomQuery()
{
return get_ValueAsBoolean(COLUMNNAME_IsAdditionalCustomQuery);
}
@Override
public void setLeichM... | @Override
public int getLeichMehl_PluFile_ConfigGroup_ID()
{
return get_ValueAsInt(COLUMNNAME_LeichMehl_PluFile_ConfigGroup_ID);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_LeichMehl_PluFile_ConfigGroup.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String logout(HttpServletRequest request, Model model) {
request.getSession().removeAttribute(ConstantClass.USER);
return "system/login";
}
/**
* 函数功能说明 :首页
*
* @return String
* @throws
* @参数: @return
*/
@RequestMapping(value = "/index", method = {Reques... | msg = "请输入手机号/密码";
model.addAttribute("msg", msg);
return "system/login";
}
rpUserInfo = rpUserInfoService.getDataByMobile(mobile);
if (rpUserInfo == null) {
msg = "用户名/密码错误";
} else if (!EncryptUtil.encodeMD5String(password).equals(rpUserInfo.getPassw... | repos\roncoo-pay-master\roncoo-pay-web-merchant\src\main\java\com\roncoo\pay\controller\login\LoginController.java | 2 |
请完成以下Java代码 | public org.compiere.model.I_M_Attribute getM_Attribute() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_M_Attribute_ID, org.compiere.model.I_M_Attribute.class);
}
@Override
public void setM_Attribute(org.compiere.model.I_M_Attribute M_Attribute)
{
set_ValueFromPO(COLUMNNAME_M_Attribute_ID, org.comp... | {
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
@Override
public java.lang.String getName ()
{
return (java.lang.String)get_Value(COLUMNNAME_Name);
}
/** Set Suchschlüssel.
@param Value
Search key for the record in the format required - must ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeValue.java | 1 |
请完成以下Java代码 | public Mono<URI> getRedirectUri(ServerWebExchange exchange) {
MultiValueMap<String, HttpCookie> cookieMap = exchange.getRequest().getCookies();
return Mono.justOrEmpty(cookieMap.getFirst(REDIRECT_URI_COOKIE_NAME))
.map(HttpCookie::getValue)
.map(CookieServerRequestCache::decodeCookie)
.onErrorResume(Illega... | }
private static ResponseCookie.ResponseCookieBuilder createResponseCookieBuilder(ServerHttpRequest request,
@Nullable String cookieValue, Duration age) {
return ResponseCookie.from(REDIRECT_URI_COOKIE_NAME)
.value(cookieValue)
.path(request.getPath().contextPath().value() + "/")
.maxAge(age)
.httpOn... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\savedrequest\CookieServerRequestCache.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable Duration getReceiveTimeout() {
return this.receiveTimeout;
}
public void setReceiveTimeout(@Nullable Duration receiveTimeout) {
this.receiveTimeout = receiveTimeout;
}
public Session getSession() {
return this.session;
}
public static class Session {
/**
* Acknowledge mo... | /**
* Does not require that the message be logged to stable storage. This is the
* lowest-overhead delivery mode but can lead to lost of message if the broker
* goes down.
*/
NON_PERSISTENT(1),
/*
* Instructs the JMS provider to log the message to stable storage as part of the
* client's send ope... | repos\spring-boot-4.0.1\module\spring-boot-jms\src\main\java\org\springframework\boot\jms\autoconfigure\JmsProperties.java | 2 |
请完成以下Java代码 | public List<Rating> findCachedRatingsByBookId(Long bookId) {
return setOps.members("book-" + bookId)
.stream()
.map(rtId -> {
try {
return jsonMapper.readValue(valueOps.get(rtId), Rating.class);
} catch (IOException ex) {
... | public boolean updateRating(Rating persisted) {
try {
valueOps.set("rating-" + persisted.getId(), jsonMapper.writeValueAsString(persisted));
return true;
} catch (JsonProcessingException e) {
e.printStackTrace();
}
return false;
}
public boole... | repos\tutorials-master\spring-cloud-modules\spring-cloud-bootstrap\zipkin-log-svc-rating\src\main\java\com\baeldung\spring\cloud\bootstrap\svcrating\rating\RatingCacheRepository.java | 1 |
请完成以下Java代码 | public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result) + ((id == null) ? 0 : id.hashCode());
result = (prime * result) + ((name == null) ? 0 : name.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if... | }
} else if (!id.equals(other.id)) {
return false;
}
if (name == null) {
if (other.name != null) {
return false;
}
} else if (!name.equals(other.name)) {
return false;
}
return true;
}
} | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\custom\persistence\model\Organization.java | 1 |
请完成以下Java代码 | public StockQtyAndUOMQty getQtysWithIssues(@NonNull final InvoicableQtyBasedOn invoicableQtyBasedOn)
{
Quantity deliveredInUom;
switch (invoicableQtyBasedOn)
{
case CatchWeight:
deliveredInUom = coalesce(getQtyWithIssuesCatch(), getQtyWithIssuesNominal());
break;
case NominalWeight:
deliveredIn... | qtyWithIssuesEffective, qtyTotal.getUomId());
}
public StockQtyAndUOMQty computeInvoicableQtyDelivered(
@Nullable final Percent qualityDiscountOverride,
@NonNull final InvoicableQtyBasedOn invoicableQtyBasedOn)
{
final StockQtyAndUOMQty qtysWithIssuesEffective = computeQtysWithIssuesEffective(qualityDiscoun... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\internalbusinesslogic\ReceiptData.java | 1 |
请完成以下Java代码 | protected void rollbackOperation() {
// first, rollback all successful steps
for (DeploymentOperationStep step : successfulSteps) {
try {
step.cancelOperationStep(this);
}
catch(Exception e) {
LOG.exceptionWhileRollingBackOperation(e);
}
}
// second, remove serv... | }
public DeploymentOperationBuilder addStep(DeploymentOperationStep step) {
steps.add(step);
return this;
}
public DeploymentOperationBuilder addSteps(Collection<DeploymentOperationStep> steps) {
for (DeploymentOperationStep step: steps) {
addStep(step);
}
return this... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\spi\DeploymentOperation.java | 1 |
请完成以下Java代码 | public AmountRangeBoundary1 getToAmt() {
return toAmt;
}
/**
* Sets the value of the toAmt property.
*
* @param value
* allowed object is
* {@link AmountRangeBoundary1 }
*
*/
public void setToAmt(AmountRangeBoundary1 value) {
this.toAmt = val... | public BigDecimal getEQAmt() {
return eqAmt;
}
/**
* Sets the value of the eqAmt property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setEQAmt(BigDecimal value) {
this.eqAmt = value;
}
/**
* Gets... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\ImpliedCurrencyAmountRangeChoice.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void handleComponentLifecycleEvent(ComponentLifecycleMsg event) {
if (event.getEntityId().getEntityType() == EntityType.TENANT) {
if (event.getEvent() == ComponentLifecycleEvent.DELETED) {
Set<TopicPartitionInfo> partitions = stateService.getPartitions();
if (C... | private void forwardToActorSystem(CalculatedFieldLinkedTelemetryMsgProto linkedMsg, TbCallback callback) {
var msg = linkedMsg.getMsg();
var tenantId = toTenantId(msg.getTenantIdMSB(), msg.getTenantIdLSB());
var entityId = EntityIdFactory.getByTypeAndUuid(msg.getEntityType(), new UUID(msg.getEnt... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\queue\DefaultTbCalculatedFieldConsumerService.java | 2 |
请完成以下Java代码 | public int getC_Invoice_Relation_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Invoice_Relation_ID);
}
/**
* C_Invoice_Relation_Type AD_Reference_ID=541475
* Reference name: C_Invoice_Relation_Types
*/
public static final int C_INVOICE_RELATION_TYPE_AD_Reference_ID=541475;
/** PurchaseToSales = POtoSO */
p... | return get_ValueAsPO(COLUMNNAME_C_Invoice_To_ID, org.compiere.model.I_C_Invoice.class);
}
@Override
public void setC_Invoice_To(final org.compiere.model.I_C_Invoice C_Invoice_To)
{
set_ValueFromPO(COLUMNNAME_C_Invoice_To_ID, org.compiere.model.I_C_Invoice.class, C_Invoice_To);
}
@Override
public void setC_In... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice_Relation.java | 1 |
请完成以下Java代码 | public FlatrateDataEntry save(@NonNull final FlatrateDataEntry entry)
{
final I_C_Flatrate_DataEntry entryRecord = load(entry.getId(), I_C_Flatrate_DataEntry.class);
entryRecord.setC_UOM_ID(entry.getUomId().getRepoId());
entryRecord.setC_Flatrate_Term_ID(entry.getId().getFlatrateTermId().getRepoId());
final F... | {
detailRecord.setC_UOM_ID(entryRecord.getC_UOM_ID());
}
if (detailRecord.getSeqNo() <= 0)
{
detailRecord.setSeqNo(maxSeqNo);
maxSeqNo += 10;
}
saveRecord(detailRecord);
final FlatrateDataEntryDetailId detailId = FlatrateDataEntryDetailId.ofRepoId(entry.getId(), detailRecord.getC_Flatrat... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\flatrate\dataEntry\FlatrateDataEntryRepo.java | 1 |
请完成以下Java代码 | public Object getParameterDefaultValue(final IProcessDefaultParameter parameter)
{
if (PARAM_QtyCUsPerTU.equals(parameter.getColumnName()) && isSingleSelectedRow())
{
return computeQtyToIssue(getSingleSelectedRow());
}
else if (PARAM_IsShowAllParams.equals(parameter.getColumnName()))
{
return isSingleS... | {
return qtyLeftToIssue.toZero();
}
if (row.isProcessed())
{
final I_PP_Order_BOMLine bomLine = ppOrderBOMDAO.getOrderBOMLineById(row.getOrderBOMLineId());
final DraftPPOrderQuantities draftQtys = huPPOrderQtyBL.getDraftPPOrderQuantities(row.getOrderId());
final Quantity quantityToIssueForWha... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\process\WEBUI_PP_Order_M_Source_HU_IssueCUQty.java | 1 |
请完成以下Java代码 | private MCashLine[] createCashLines(MCash cash)
{
ArrayList<MCashLine> cashLineList = new ArrayList<MCashLine>();
// From Bank (From) to CashLine
MCashLine cashLine = new MCashLine (cash);
cashLine.setAmount(p_Amount);
cashLine.setC_BP_BankAccount_ID(p_From_C_BP_BankAccount_ID);
cashLine.setC_Currency_ID... | /**
* Generate CashJournal
*
*/
private void generateBankTransfer()
{
// Create Cash & CashLines
MCash cash = createCash();
MCashLine cashLines[]= createCashLines(cash);
StringBuffer processMsg = new StringBuffer(cash.getDocumentNo());
cash.setDocAction(p_docAction);
if (!cash.processIt(p_doc... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\adempiere\process\ImmediateBankTransfer.java | 1 |
请完成以下Spring Boot application配置 | ## Spring view resolver set up
spring.mvc.view.prefix= /WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
## Spring DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
spring.datasource.url = jdbc:mysql://localhost:3306/springboot?useSSL=false&characterEncoding=UTF-8&serverTimezone=UTC
spring.datasource.username = ... | te.ddl-auto=update
spring.datasource.driver = com.mysql.jdbc.Driver
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
logging.level.org.hibernate.SQL = debug
spring.jpa.show-sql=true | repos\SpringBoot-Projects-FullStack-master\Part-8 Spring Boot Real Projects\0.ProjectToDoinDBNoSec\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public class CombiningLists {
public static List<Object> usingNativeJava(List<Object> first, List<Object> second) {
List<Object> combined = new ArrayList<>();
combined.addAll(first);
combined.addAll(second);
return combined;
}
public static List<Object> usingJava8Ob... | return combined;
}
public static List<Object> usingApacheCommons(List<Object> first, List<Object> second) {
List<Object> combined = ListUtils.union(first, second);
return combined;
}
public static List<Object> usingGuava(List<Object> first, List<Object> second) {
Iterable<O... | repos\tutorials-master\core-java-modules\core-java-collections\src\main\java\com\baeldung\collections\combiningcollections\CombiningLists.java | 1 |
请完成以下Java代码 | public Iterator<DistributionFacetId> iterator() {return set.iterator();}
public boolean isEmpty() {return set.isEmpty();}
public Set<WarehouseId> getWarehouseFromIds() {return getValues(DistributionFacetGroupType.WAREHOUSE_FROM, DistributionFacetId::getWarehouseId);}
public Set<WarehouseId> getWarehouseToIds() {r... | public <T> Set<T> getValues(DistributionFacetGroupType groupType, Function<DistributionFacetId, T> valueExtractor)
{
if (set.isEmpty())
{
return ImmutableSet.of();
}
return set.stream()
.filter(facetId -> facetId.getGroup().equals(groupType))
.map(valueExtractor)
.collect(ImmutableSet.toImmutab... | repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\launchers\facets\DistributionFacetIdsCollection.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public UpdateProcessDefinitionSuspensionStateBuilderImpl includeProcessInstances(boolean includeProcessInstance) {
this.includeProcessInstances = includeProcessInstance;
return this;
}
@Override
public UpdateProcessDefinitionSuspensionStateBuilderImpl executionDate(Date date) {
this.executionDate = d... | ensureOnlyOneNotNull("Need to specify either a process instance id or a process definition key.", processDefinitionId, processDefinitionKey);
if(processDefinitionId != null && isTenantIdSet) {
throw LOG.exceptionUpdateSuspensionStateForTenantOnlyByProcessDefinitionKey();
}
ensureNotNull("commandExec... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\repository\UpdateProcessDefinitionSuspensionStateBuilderImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | InfoContributor grpcInfoContributor(final GrpcServerProperties properties,
final Collection<BindableService> grpcServices) {
final Map<String, Object> details = new LinkedHashMap<>();
details.put("port", properties.getPort());
if (properties.isReflectionServiceEnabled()) {
... | /**
* Gets all method names from the given service descriptor.
*
* @param serviceDescriptor The service descriptor to get the names from.
* @return The newly created and sorted list of the method names.
*/
protected List<String> collectMethodNamesForService(final ServiceDescriptor serviceDe... | repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\autoconfigure\GrpcServerMetricAutoConfiguration.java | 2 |
请完成以下Java代码 | public @Nullable MultipartConfigElement getMultipartConfig() {
return this.multipartConfig;
}
@Override
protected String getDescription() {
Assert.state(this.servlet != null, "Unable to return description for null servlet");
return "servlet " + getServletName();
}
@Override
protected ServletRegistration.D... | registration.setMultipartConfig(this.multipartConfig);
}
}
/**
* Returns the servlet name that will be registered.
* @return the servlet name
*/
public String getServletName() {
return getOrDeduceName(this.servlet);
}
@Override
public String toString() {
return getServletName() + " urls=" + getUrlMa... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\ServletRegistrationBean.java | 1 |
请完成以下Java代码 | public param setName(String name)
{
addAttribute("name",name);
return(this);
}
/**
Sets the value of this attribute.
@param value sets the value attribute.
*/
public param setValue(String value)
{
addAttribute("value",value);
return(t... | }
/**
Adds an Element to the element.
@param element Adds an Element to the element.
*/
public param addElement(Element element)
{
addElementToRegistry(element);
return(this);
}
/**
Adds an Element to the element.
@param element ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\param.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public PageData<MobileAppBundleInfo> getTenantMobileAppBundleInfos(@Parameter(description = PAGE_SIZE_DESCRIPTION, required = true)
@RequestParam int pageSize,
@Parameter(descrip... | public MobileAppBundleInfo getMobileAppBundleInfoById(@PathVariable UUID id) throws ThingsboardException {
MobileAppBundleId mobileAppBundleId = new MobileAppBundleId(id);
return checkEntityId(mobileAppBundleId, mobileAppBundleService::findMobileAppBundleInfoById, Operation.READ);
}
@ApiOperati... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\controller\MobileAppBundleController.java | 2 |
请完成以下Java代码 | public ResponseEntity<List<MenuDto>> getMenuSuperior(@RequestBody List<Long> ids) {
Set<MenuDto> menuDtos = new LinkedHashSet<>();
if(CollectionUtil.isNotEmpty(ids)){
for (Long id : ids) {
MenuDto menuDto = menuService.findById(id);
List<MenuDto> menuDtoList =... | return new ResponseEntity<>(HttpStatus.CREATED);
}
@Log("修改菜单")
@ApiOperation("修改菜单")
@PutMapping
@PreAuthorize("@el.check('menu:edit')")
public ResponseEntity<Object> updateMenu(@Validated(Menu.Update.class) @RequestBody Menu resources){
menuService.update(resources);
return ne... | repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\rest\MenuController.java | 1 |
请完成以下Java代码 | public void setQty (BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
/** Get Quantity.
@return Quantity
*/
public BigDecimal getQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Sequence.
@param SeqNo
Method of order... | */
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Sequence.
@return Method of ordering records; lowest number comes first
*/
public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
return 0;
return ii.intVal... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionDistribution.java | 1 |
请完成以下Java代码 | public @NonNull DocumentReportInfo getDocumentReportInfo(
@NonNull final TableRecordReference recordRef,
@Nullable final PrintFormatId adPrintFormatToUseId, final AdProcessId reportProcessIdToUse)
{
final ShipperTransportationId shipperTransportationId = recordRef.getIdAssumingTableName(I_M_ShipperTransportati... | .bPartnerLocationId(BPartnerLocationId.ofRepoId(shipperPartnerId, shipperTransportation.getShipper_Location_ID()))
.docTypeId(docTypeId)
.onlyCopiesGreaterZero(true)
.build();
return DocumentReportInfo.builder()
.recordRef(recordRef)
.reportProcessId(reportProcessIdToUse)
.copies(util.getDocu... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipping\ShipperTransportationReportAdvisor.java | 1 |
请完成以下Java代码 | private void runWebSocket() throws Exception {
this.webSocket = true;
String accept = getWebsocketAcceptResponse();
this.outputStream.writeHeaders("HTTP/1.1 101 Switching Protocols", "Upgrade: websocket", "Connection: Upgrade",
"Sec-WebSocket-Accept: " + accept);
new Frame("{\"command\":\"hello\",\"protocol... | frame.write(this.outputStream);
}
private String getWebsocketAcceptResponse() throws NoSuchAlgorithmException {
Matcher matcher = WEBSOCKET_KEY_PATTERN.matcher(this.header);
Assert.state(matcher.find(), "No Sec-WebSocket-Key");
String response = matcher.group(1).trim() + WEBSOCKET_GUID;
MessageDigest message... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\livereload\Connection.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getGenre() {
return genre;
}
public void setGenre(String genre) { | this.genre = genre;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return "Author{" + "id=" + id + ", name=" + name
+ ", genre=" + genre + ", age=" + age + '}';
}
} | repos\Hibernate-SpringBoot-master\HibernateSpringBootMappedSuperclassRepository\src\main\java\com\bookstore\entity\Author.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getPRODUCTDESCTYPE() {
return productdesctype;
}
/**
* Sets the value of the productdesctype property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPRODUCTDESCTYPE(String value) {
this.productdescty... | */
public String getPRODUCTDESCLANG() {
return productdesclang;
}
/**
* Sets the value of the productdesclang property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPRODUCTDESCLANG(String value) {
this.produc... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DPRDE1.java | 2 |
请完成以下Java代码 | public boolean hasComments(@NonNull final DocumentPath documentPath)
{
final TableRecordReference reference = documentDescriptorFactory.getTableRecordReferenceIfPossible(documentPath).orElse(null);
if (reference == null)
{
return false;
}
final Map<TableRecordReference, Boolean> referencesWithComments = ... | commentsRepository.createCommentEntry(jsonCommentCreateRequest.getText(), tableRecordReference);
}
@NonNull
private JSONComment toJsonComment(@NonNull final CommentEntry comment, final ZoneId zoneId)
{
final String text = comment.getText();
final String created = DateTimeConverters.toJson(comment.getCreated(),... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\comments\CommentsService.java | 1 |
请完成以下Java代码 | private static POSCardReader extractCardReader(@Nullable final SumUpTransaction.CardReader sumUpCardReader)
{
if(sumUpCardReader == null)
{
return null;
}
return POSCardReader.builder()
.externalId(POSCardReaderExternalId.ofString(sumUpCardReader.getExternalId().getAsString()))
.name(sumUpCardRea... | }
}
public static SumUpPOSRef toPOSRef(@NonNull final POSOrderAndPaymentId posOrderAndPaymentId)
{
return SumUpPOSRef.builder()
.posOrderId(posOrderAndPaymentId.getOrderId().getRepoId())
.posPaymentId(posOrderAndPaymentId.getPaymentId().getRepoId())
.build();
}
@Nullable
public static POSOrderAndP... | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\payment_gateway\sumup\SumUpUtils.java | 1 |
请完成以下Java代码 | private static String getMetadataIssuer(Map<String, Object> configuration) {
if (configuration.containsKey("issuer")) {
return configuration.get("issuer").toString();
}
return "(unavailable)";
}
private static Map<String, Object> getConfiguration(String issuer, RestOperations rest, UriComponents... uris) {
... | }
static UriComponents oidc(String issuer) {
UriComponents uri = UriComponentsBuilder.fromUriString(issuer).build();
// @formatter:off
return UriComponentsBuilder.newInstance().uriComponents(uri)
.replacePath(uri.getPath() + OIDC_METADATA_PATH)
.build();
// @formatter:on
}
static UriComponents oidc... | repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JwtDecoderProviderConfigurationUtils.java | 1 |
请完成以下Java代码 | public CFrame showWindowByWindowId(final AdWindowId adWindowId)
{
for (int i = 0; i < hiddenWindows.size(); i++)
{
final CFrame hiddenFrame = hiddenWindows.get(i);
if (AdWindowId.equals(hiddenFrame.getAdWindowId(), adWindowId))
{
hiddenWindows.remove(i); // NOTE: we can safely remove here because we a... | for (final Component child : childs)
{
if (child instanceof JComponent)
{
mgr.markCompletelyDirty((JComponent)child);
}
}
w.repaint();
updated.add(w);
}
for (final Window w : hiddenWindows)
{
if (updated.contains(w))
{
continue;
}
SwingUtilities.updateComponentTreeUI(w... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\WindowsIndex.java | 1 |
请完成以下Java代码 | public boolean isTenantIdSet() {
return isTenantIdSet;
}
public boolean isRootProcessInstances() {
return isRootProcessInstances;
}
public boolean isProcessDefinitionWithoutTenantId() {
return isProcessDefinitionWithoutTenantId;
}
public boolean isLeafProcessInstances() {
return isLeafPro... | orQuery.isOrQueryActive = true;
orQuery.queries = queries;
queries.add(orQuery);
return orQuery;
}
@Override
public ProcessInstanceQuery endOr() {
if (!queries.isEmpty() && this != queries.get(queries.size()-1)) {
throw new ProcessEngineException("Invalid query usage: cannot set endOr() bef... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessInstanceQueryImpl.java | 1 |
请完成以下Java代码 | public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPassWord() {
return passWord;
}
public void setPassWord(String passWord) {
this.passWord = passWord;
}
public UserSexEnum getUserSex() {
return userSex;
} | public void setUserSex(UserSexEnum userSex) {
this.userSex = userSex;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
@Override
public String toString() {
// TODO Auto-generated method stub
return "userName " + this.userName +... | repos\spring-boot-leaning-master\2.x_42_courses\第 3-2 课: 如何优雅的使用 MyBatis XML 配置版\spring-boot-multi-mybatis-xml\src\main\java\com\neo\model\User.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
public Date getBillDate() {
return billDate;
}
public void setBillDate(Date billDate) {
this.billDate = billDate;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.produc... | return payWayName;
}
public void setPayWayName(String payWayName) {
this.payWayName = payWayName == null ? null : payWayName.trim();
}
public Date getPaySuccessTime() {
return paySuccessTime;
}
public void setPaySuccessTime(Date paySuccessTime) {
this.paySuccessTime = paySuccessTime;
}
public Date get... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckMistakeScratchPool.java | 2 |
请完成以下Java代码 | public Attribute get(String key)
{
return trie.get(key);
}
/**
* 打分
* @param from
* @param to
* @return
*/
public Edge getEdge(Node from, Node to)
{
// 首先尝试词+词
Attribute attribute = get(from.compiledWord, to.compiledWord);
if (attribute == nu... | }
Attribute(String dr, float p)
{
dependencyRelation = new String[]{dr};
this.p = new float[]{p};
}
/**
* 加权
* @param boost
*/
public void setBoost(float boost)
{
for (int i = 0; i < p.length; ++i)
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\bigram\WordNatureDependencyModel.java | 1 |
请完成以下Java代码 | private boolean isReferencedObjectValue(final String propertyName, final Object valueOld, final Object valueNew)
{
// TODO: optimize this method
final POJOWrapper wrapperOld = getWrapper(valueOld);
if (wrapperOld != null)
{
return true;
}
final POJOWrapper wrapper = getWrapper(valueNew);
if (wrapper... | public Evaluatee2 asEvaluatee()
{
return new Evaluatee2()
{
@Override
public String get_ValueAsString(final String variableName)
{
if (!has_Variable(variableName))
{
return "";
}
final Object value = POJOWrapper.this.getValuesMap().get(variableName);
return value == null ? "" : v... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\POJOWrapper.java | 1 |
请完成以下Java代码 | public void setC_OrderLine_ID (final int C_OrderLine_ID)
{
if (C_OrderLine_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_OrderLine_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_OrderLine_ID, C_OrderLine_ID);
}
@Override
public int getC_OrderLine_ID()
{
return get_ValueAsInt(COLUMNNAME_C_OrderLine_ID);
}... | @Override
public void setPrice (final BigDecimal Price)
{
set_Value (COLUMNNAME_Price, Price);
}
@Override
public BigDecimal getPrice()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Price);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQty (final BigDecimal Qty)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_OrderLine_Detail.java | 1 |
请完成以下Java代码 | public de.metas.inoutcandidate.model.I_M_ReceiptSchedule getM_ReceiptSchedule()
{
return get_ValueAsPO(COLUMNNAME_M_ReceiptSchedule_ID, de.metas.inoutcandidate.model.I_M_ReceiptSchedule.class);
}
@Override
public void setM_ReceiptSchedule(final de.metas.inoutcandidate.model.I_M_ReceiptSchedule M_ReceiptSchedule)... | 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_TransactionIdAPI, TransactionIdAPI);
}
@Override
public java.lang.String getTransactionIdA... | 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代码 | public void warmupByVHUIds(@NonNull final Collection<HuId> vhuIds)
{
entriesByVhuId.getAllOrLoad(vhuIds, this::retrieveEntriesByVHUId);
}
public ImmutableList<HUReservationEntry> getEntriesByVHUIds(@NonNull final Collection<HuId> vhuIds)
{
if (vhuIds.isEmpty())
{
return ImmutableList.of();
}
return e... | {
return HUReservationDocRef.builder()
.salesOrderLineId(OrderLineId.ofRepoIdOrNull(record.getC_OrderLineSO_ID()))
.projectId(ProjectId.ofRepoIdOrNull(record.getC_Project_ID()))
.pickingJobStepId(PickingJobStepId.ofRepoIdOrNull(record.getM_Picking_Job_Step_ID()))
.ddOrderLineId(DDOrderLineId.ofRepoIdO... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\reservation\HUReservationRepository.java | 1 |
请完成以下Java代码 | public String getPickupDateAndTimeStart()
{
return pickupDate + "T" + timeFrom;
}
@JsonIgnore
@NonNull
public String getPickupDateAndTimeEnd()
{
return pickupDate + "T" + timeTo;
}
@JsonIgnore
@Nullable
public String getValue(@NonNull final String attributeValue)
{
switch (attributeValue)
{
case... | case DeliveryMappingConstants.ATTRIBUTE_VALUE_SENDER_COMPANY_NAME:
return getPickupAddress().getCompanyName1();
case DeliveryMappingConstants.ATTRIBUTE_VALUE_SENDER_COMPANY_NAME_2:
return getPickupAddress().getCompanyName2();
case DeliveryMappingConstants.ATTRIBUTE_VALUE_SENDER_DEPARTMENT:
return getP... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-delivery\src\main\java\de\metas\common\delivery\v1\json\request\JsonDeliveryRequest.java | 1 |
请完成以下Java代码 | private AdElementId getFieldElementIdOrNull(final I_AD_Field field)
{
if (field.getAD_Name_ID() > 0)
{
return AdElementId.ofRepoId(field.getAD_Name_ID());
}
else if (field.getAD_Column_ID() > 0)
{
// the AD_Name_ID was set to null. Get back to the values from the AD_Column
final I_AD_Column fieldCol... | {
final AdFieldId adFieldId = AdFieldId.ofRepoIdOrNull(field.getAD_Field_ID());
if (adFieldId != null)
{
final IElementLinkBL elementLinksService = Services.get(IElementLinkBL.class);
elementLinksService.recreateADElementLinkForFieldId(adFieldId);
}
}
@ModelChange(timings = { ModelValidator.TYPE_BEFORE... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\field\model\interceptor\AD_Field.java | 1 |
请完成以下Java代码 | public ProcessEngineException cannotAttachToTransitionInstance(MigratingInstance attachingInstance) {
return new ProcessEngineException(exceptionMessage(
"007",
"{}",
"Cannot attach instance '{}' to a transition instance",
attachingInstance));
}
public BadUserRequestException pr... | else {
detailMessage = exceptionMessage(
"010",
"Cannot migrate process instance '{}' without tenant to a process definition with a tenant ('{}')",
processInstanceId,
targetTenantId);
}
return new ProcessEngineException(detailMessage);
}
public ProcessEngineEx... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\MigrationLogger.java | 1 |
请完成以下Java代码 | public void setSQLStatement (final @Nullable java.lang.String SQLStatement)
{
set_Value (COLUMNNAME_SQLStatement, SQLStatement);
}
@Override
public java.lang.String getSQLStatement()
{
return get_ValueAsString(COLUMNNAME_SQLStatement);
}
@Override
public void setTechnicalNote (final @Nullable java.lang.S... | @Override
public void setType (final java.lang.String Type)
{
set_Value (COLUMNNAME_Type, Type);
}
@Override
public java.lang.String getType()
{
return get_ValueAsString(COLUMNNAME_Type);
}
@Override
public void setValue (final java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
@Over... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Process.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<AuthorNameBookTitle> fetchBooksAndAuthorsJpql() {
return bookRepository.findBooksAndAuthorsJpql();
}
// Books and authors (SQL)
public List<AuthorNameBookTitle> fetchBooksAndAuthorsSql() {
return bookRepository.findBooksAndAuthorsSql();
}
// Authors and books (JPQL)
... | return authorRepository.findAuthorsAndBooksByGenreAndPriceJpql(genre, price);
}
// Fetch authors and books filtering by author's genre and book's price (SQL)
public List<AuthorNameBookTitle> findAuthorsAndBooksByGenreAndPriceSql(String genre, int price) {
return authorRepository.findAuthorsAndBooks... | repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoViaInnerJoins\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请完成以下Java代码 | public de.metas.dataentry.model.I_DataEntry_SubTab getDataEntry_SubTab() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_DataEntry_SubTab_ID, de.metas.dataentry.model.I_DataEntry_SubTab.class);
}
@Override
public void setDataEntry_SubTab(de.metas.dataentry.model.I_DataEntry_SubTab DataEntry_SubTab)
{
... | if (Record_ID < 0)
set_ValueNoCheck (COLUMNNAME_Record_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID));
}
/** Get Datensatz-ID.
@return Direct internal record ID
*/
@Override
public int getRecord_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_DataEntry_Record.java | 1 |
请完成以下Spring Boot application配置 | spring:
profiles:
active: standalone
---
spring:
config:
activate:
on-profile: standalone
data:
redis:
host: localhost
password: 123456
port: 6379
database: 0
---
spring:
config:
activate:
on-profile: sentinel
data:
redis:
password: 123456
s... | l:
master: mymaster
nodes:
- 192.168.11.163:26379
- 192.168.11.164:26379
- 192.168.11.165:26379 | repos\spring-boot-best-practice-master\spring-boot-redis\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public class Customer {
private int id;
private String name;
private String address;
public Customer() {
super();
}
public Customer(final String name, final String address) {
this.name = name;
this.address = address;
}
//
public int getId() {
retu... | public String getName() {
return name;
}
public void setName(final String name) {
this.name = name;
}
public String getAddress() {
return address;
}
public void setAddress(final String address) {
this.address = address;
}
public void setCustomerAddress... | repos\tutorials-master\spring-boot-modules\spring-boot-caching\src\main\java\com\baeldung\caching\example\Customer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public AcceptPaymentDisputeRequest revision(Integer revision)
{
this.revision = revision;
return this;
}
/**
* This integer value indicates the revision number of the payment dispute. This field is required. The current revision number for a payment dispute can be retrieved with the getPaymentDispute method.... | @Override
public int hashCode()
{
return Objects.hash(returnAddress, revision);
}
@Override
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("class AcceptPaymentDisputeRequest {\n");
sb.append(" returnAddress: ").append(toIndentedString(returnAddress)).append("\n");
sb.ap... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\AcceptPaymentDisputeRequest.java | 2 |
请完成以下Java代码 | public String toString()
{
return MoreObjects.toStringHelper(this)
.add("documentNo", documentNo)
.add("docBaseType", docBaseType)
.add("docSubType", docSubType)
.add("IsSOTrx", soTrx)
.add("hasChanges", hasChanges)
.add("docNoControlled", docNoControlled)
.toString();
}
@Override
pub... | public Builder setDocBaseType(final String docBaseType)
{
this.docBaseType = docBaseType;
return this;
}
public Builder setDocSubType(final String docSubType)
{
this.docSubType = docSubType;
return this;
}
public Builder setHasChanges(final boolean hasChanges)
{
this.hasChanges = hasChang... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\sequence\impl\DocumentNoInfo.java | 1 |
请完成以下Java代码 | public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Quantity.
@param Qty
Quantity
*/
public void setQty (BigDecimal Qty)
{
... | return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name)
.getPO(getSalesRep_ID(), get_TrxName()); }
/** Set Sales Representative.
@param SalesRep_ID
Sales Representative or Company Agent
*/
public void setSalesRep_ID (int SalesRep_ID)
{
if (SalesRep_ID < 1)
set_Value (COLUMNNAME_SalesRep_ID, nu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DunningRunEntry.java | 1 |
请完成以下Java代码 | public void onEvent(final IEventBus eventBus, final Event event)
{
try (final MDCCloseable ignored = EventMDC.putEvent(event))
{
logger.debug("TypedConsumerAsEventListener.onEvent - eventBodyType={}", eventBodyType.getName());
final String json = event.getBody();
final T obj = jsonDeserializer.read... | {
eventListener.onEvent(this, event);
}
catch (final RuntimeException ex)
{
if (!Adempiere.isUnitTestMode())
{
final EventLogUserService eventLogUserService = SpringContextHolder.instance.getBean(EventLogUserService.class);
eventLogUserService
.newErrorLogEntry(eventListener.getCla... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\impl\EventBus.java | 1 |
请完成以下Java代码 | public class CleanableHistoricCaseInstanceReportResultEntity implements CleanableHistoricCaseInstanceReportResult {
protected String caseDefinitionId;
protected String caseDefinitionKey;
protected String caseDefinitionName;
protected int caseDefinitionVersion;
protected Integer historyTimeToLive;
protected... | public void setHistoryTimeToLive(Integer historyTimeToLive) {
this.historyTimeToLive = historyTimeToLive;
}
public long getFinishedCaseInstanceCount() {
return finishedCaseInstanceCount;
}
public void setFinishedCaseInstanceCount(Long finishedCaseInstanceCount) {
this.finishedCaseInstanceCount = f... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\CleanableHistoricCaseInstanceReportResultEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class MongoAutoConfiguration {
@Bean
@ConditionalOnMissingBean(MongoConnectionDetails.class)
PropertiesMongoConnectionDetails mongoConnectionDetails(MongoProperties properties,
ObjectProvider<SslBundles> sslBundles) {
return new PropertiesMongoConnectionDetails(properties, sslBundles.getIfAvailabl... | @Bean
MongoClientSettings mongoClientSettings() {
return MongoClientSettings.builder().build();
}
@Bean
StandardMongoClientSettingsBuilderCustomizer standardMongoSettingsCustomizer(MongoProperties properties,
MongoConnectionDetails connectionDetails) {
return new StandardMongoClientSettingsBuilderCus... | repos\spring-boot-4.0.1\module\spring-boot-mongodb\src\main\java\org\springframework\boot\mongodb\autoconfigure\MongoAutoConfiguration.java | 2 |
请完成以下Java代码 | public UserOperationLogQuery userId(String userId) {
ensureNotNull("userId", userId);
this.userId = userId;
return this;
}
public UserOperationLogQuery operationId(String operationId) {
ensureNotNull("operationId", operationId);
this.operationId = operationId;
return this;
}
public Use... | public long executeCount(CommandContext commandContext) {
checkQueryOk();
return commandContext
.getOperationLogManager()
.findOperationLogEntryCountByQueryCriteria(this);
}
public List<UserOperationLogEntry> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
return... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\UserOperationLogQueryImpl.java | 1 |
请完成以下Java代码 | private BasicDBObject getBasicDBObject(HttpServletRequest request, JoinPoint joinPoint) {
// 基本信息
BasicDBObject r = new BasicDBObject();
r.append("requestURL", request.getRequestURL().toString());
r.append("requestURI", request.getRequestURI());
r.append("queryString", request.ge... | * @return
*/
private Map<String, String> getHeadersInfo(HttpServletRequest request) {
Map<String, String> map = new HashMap<>();
Enumeration headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) {
String key = (String) headerNames.nextElement();
... | repos\SpringBoot-Learning-master\1.x\Chapter4-2-5\src\main\java\com\didispace\aspect\WebLogAspect.java | 1 |
请在Spring Boot框架中完成以下Java代码 | HandlerMapper remoteDevToolsHealthCheckHandlerMapper(ServerProperties serverProperties) {
Handler handler = new HttpStatusHandler();
Servlet servlet = serverProperties.getServlet();
String servletContextPath = (servlet.getContextPath() != null) ? servlet.getContextPath() : "";
return new UrlHandlerMapper(servle... | @Bean
@ConditionalOnMissingBean(name = "remoteRestartHandlerMapper")
UrlHandlerMapper remoteRestartHandlerMapper(HttpRestartServer server, ServerProperties serverProperties,
DevToolsProperties properties) {
Servlet servlet = serverProperties.getServlet();
RemoteDevToolsProperties remote = properties.getRe... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\autoconfigure\RemoteDevToolsAutoConfiguration.java | 2 |
请完成以下Java代码 | public void setFollowUpDate(Date followUpDate) {
this.followUpDate = followUpDate;
}
public int getPriority() {
return priority;
}
public void setPriority(int priority) {
this.priority = priority;
}
public String getParentTaskId() {
return parentTaskId;
}
public void setParentTaskId(... | public void setRootProcessInstanceId(String rootProcessInstanceId) {
this.rootProcessInstanceId = rootProcessInstanceId;
}
@Override
public String toString() {
return this.getClass().getSimpleName()
+ "[taskId" + taskId
+ ", assignee=" + assignee
+ ", owner=" + owner
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricTaskInstanceEventEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SpringCloudS3Service {
private static final Logger logger = LoggerFactory.getLogger(SpringCloudS3Service.class);
@Autowired
AmazonS3 amazonS3;
@Autowired
SpringCloudS3 springCloudS3;
public void createBucket(String bucketName) {
logger.debug("Creating S3 bucket: {}", buc... | logger.info("{} file uploaded to S3", objectName);
} catch (IOException e) {
logger.error(e.getMessage(), e);
}
}
public void deleteBucket(String bucketName) {
logger.trace("Deleting S3 objects under {} bucket...", bucketName);
ListObjectsV2Result listObjectsV2Result... | repos\tutorials-master\spring-cloud-modules\spring-cloud-aws\src\main\java\com\baeldung\spring\cloud\aws\s3\SpringCloudS3Service.java | 2 |
请完成以下Java代码 | public boolean isValidEAN13Product(@NonNull final EAN13 ean13, @NonNull final ProductId expectedProductId)
{
return getGS1ProductCodesCollection(expectedProductId).isValidProductNo(ean13, null);
}
@Override
public boolean isValidEAN13Product(@NonNull final EAN13 ean13, @NonNull final ProductId expectedProductId,... | {
record.setGTIN(gtin != null ? gtin.getAsString() : null);
record.setUPC(gtin != null ? gtin.getAsString() : null);
if (gtin != null)
{
record.setEAN13_ProductCode(null);
}
}
@Override
public void setProductCodeFieldsFromEAN13ProductCode(@NonNull final I_M_Product record, @Nullable final EAN13Product... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\impl\ProductBL.java | 1 |
请完成以下Java代码 | public void putAll(Map<? extends K, ? extends V> m) {
for (Map.Entry<? extends K, ? extends V> entry : m.entrySet()) {
put(entry.getKey(), entry.getValue());
}
}
@Override
public V remove(Object key) {
V removedValue = super.remove(key);
if (removedV... | }
int mapSize = this.size();
int lastIndex = mapSize;
if (numberToRemove == lastIndex) {
numberToKey.remove(numberToRemove);
keyToNumber.remove(keyToRemove);
} else {
K lastKey = numberToKey.get(lastIndex);
if (lastKey == ... | repos\tutorials-master\core-java-modules\core-java-collections-maps-9\src\main\java\com\baeldung\map\randommapkey\RandomizedMap.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BookService implements IBookService {
private static final Set<Book> BOOKS_DATA = initializeData();
@Override
public Book getBookWithTitle(String title) {
return BOOKS_DATA.stream()
.filter(book -> book.getTitle().equals(title))
.findFirst()
.orElse... | @Override
public Book updateBook(Book book) {
BOOKS_DATA.removeIf(b -> Objects.equals(b.getId(), book.getId()));
BOOKS_DATA.add(book);
return book;
}
@Override
public boolean deleteBook(Book book) {
return BOOKS_DATA.remove(book);
}
private static Set<Book> init... | repos\tutorials-master\graphql-modules\graphql-spqr\src\main\java\com\baeldung\spqr\BookService.java | 2 |
请完成以下Java代码 | public String getChangeType() {
return changeType;
}
public void setChangeType(String changeType) {
this.changeType = changeType;
}
public String getScopeId() {
return scopeId;
}
public void setScopeId(String scopeId) {
this.scopeId = scopeId;
}
public Str... | public void setScopeType(String scopeType) {
this.scopeType = scopeType;
}
public String getScopeDefinitionId() {
return scopeDefinitionId;
}
public void setScopeDefinitionId(String scopeDefinitionId) {
this.scopeDefinitionId = scopeDefinitionId;
}
public boolean contains... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\variablelistener\VariableListenerSessionData.java | 1 |
请完成以下Java代码 | public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Long getDurationInMillis() {
if(durationI... | return endTime.getTime() - startTime.getTime();
} else {
return null;
}
}
public void setDurationInMillis(Long durationInMillis) {
this.durationInMillis = durationInMillis;
}
public Long getDurationRaw() {
return durationInMillis;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricScopeInstanceEvent.java | 1 |
请完成以下Java代码 | public @Nullable Object getParameterDefaultValue(final IProcessDefaultParameter parameter)
{
if (Objects.equals(PARAM_Shipper, parameter.getColumnName()))
{
return CollectionUtils.singleElement(helper.getShipperIds(getSelectedShipmentScheduleIds()));
}
else if (Objects.equals(PARAM_IsIncludeCarrierAdviseMan... | .carrierGoodsTypeId(p_GoodsType)
.carrierServiceIds(getCarrierServiceIds())
.build()
);
return JavaProcess.MSG_OK;
}
private ImmutableSet<ShipmentScheduleId> getSelectedShipmentScheduleIds()
{
return getSelectedIds(ShipmentScheduleId::ofRepoId, rowsLimit);
}
private ImmutableSet<CarrierService... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons.webui\src\main\java\de\metas\shipper\gateway\commons\webui\M_ShipmentSchedule_Advise_Manual.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((emailAddress == null) ? 0 : emailAddress.hashCode());
result = prime * result
+ ((firstName == null) ? 0 : firstName.hashCode());
result = prime * result
+ ((lastName == null) ? 0 : lastName.hashCode());
re... | if (other.firstName != null)
return false;
} else if (!firstName.equals(other.firstName))
return false;
if (lastName == null) {
if (other.lastName != null)
return false;
} else if (!lastName.equals(other.lastName))
return false;
if (userName == null) {
if (other.userName != null)
return ... | repos\spring-boot-microservices-master\user-webservice\src\main\java\com\rohitghatol\microservices\user\dto\UserDTO.java | 2 |
请完成以下Java代码 | public void setAD_ReportView_ID (int AD_ReportView_ID)
{
if (AD_ReportView_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_ReportView_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_ReportView_ID, Integer.valueOf(AD_ReportView_ID));
}
/** Get Report View.
@return View used to generate this report
*/
publi... | /** Set SQL Group Function.
@param IsGroupFunction
This function will generate a Group By Clause
*/
public void setIsGroupFunction (boolean IsGroupFunction)
{
set_Value (COLUMNNAME_IsGroupFunction, Boolean.valueOf(IsGroupFunction));
}
/** Get SQL Group Function.
@return This function will generate a Gr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReportView_Col.java | 1 |
请完成以下Java代码 | public class AddRequestParameterGatewayFilterFactory extends AbstractNameValueGatewayFilterFactory {
@Override
public GatewayFilter apply(NameValueConfig config) {
return new GatewayFilter() {
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
String name = Objects... | catch (RuntimeException ex) {
throw new IllegalStateException("Invalid URI query: \"" + query.toString() + "\"");
}
}
@Override
public String toString() {
String name = config.getName();
String value = config.getValue();
return filterToStringCreator(AddRequestParameterGatewayFilterFactory... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\AddRequestParameterGatewayFilterFactory.java | 1 |
请完成以下Java代码 | public class SetVariablesAsyncCmd extends AbstractSetVariableAsyncCmd implements Command<Void> {
protected String caseInstanceId;
protected Map<String, Object> variables;
public SetVariablesAsyncCmd(String caseInstanceId, Map<String, Object> variables) {
this.caseInstanceId = caseInstanceI... | if (caseInstanceEntity == null) {
throw new FlowableObjectNotFoundException("No case instance found for id " + caseInstanceId, CaseInstanceEntity.class);
}
for (String variableName : variables.keySet()) {
addVariable(false, caseInstanceId, null, variableName, variables.g... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\SetVariablesAsyncCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserEntity {
@Id
@Column(name = "id")
private String id;
@OneToOne
@JoinColumn(name = "address")
private AddressEntity address;
@Column(name = "name")
private String name;
@Column(name = "email")
private String email;
@Column(name = "enabled")
private B... | public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
UserEntity that = (UserEntity) o;
return Objects.equals(id, that.id)... | repos\spring-examples-java-17\spring-data\src\main\java\itx\examples\springdata\entity\UserEntity.java | 2 |
请完成以下Java代码 | public class User {
@Id
private String id;
private String name;
private Integer age;
@DBRef
@Field("email")
@CascadeSave
private EmailAddress emailAddress;
private Integer yearOfBirth;
public User() {
}
public User(String name, Integer age) {
this.name = ... | public void setAge(final Integer age) {
this.age = age;
}
public EmailAddress getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(final EmailAddress emailAddress) {
this.emailAddress = emailAddress;
}
public Integer getYearOfBirth() {
return ... | repos\tutorials-master\persistence-modules\spring-data-mongodb-2\src\main\java\com\baeldung\model\User.java | 1 |
请完成以下Java代码 | public Iterator<DocTax> iterator()
{
return taxesByTaxId.values().iterator();
}
public Optional<DocTax> getByTaxId(@Nullable final TaxId taxId)
{
if (taxId == null)
{
return Optional.empty();
}
return Optional.ofNullable(taxesByTaxId.get(taxId));
}
public void mapEach(@NonNull final UnaryOperator<... | taxesByTaxId.compute(taxId, (k, docTax) -> mapper.apply(docTax));
}
}
public void add(@NonNull final DocTax docTax)
{
final TaxId taxId = docTax.getTaxId();
final DocTax existingDocTax = taxesByTaxId.get(taxId);
if (existingDocTax != null)
{
throw new AdempiereException("Cannot add " + docTax + " since... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocTaxesList.java | 1 |
请完成以下Java代码 | public static String toGlobalQRCodeJsonString(final HUQRCode qrCode)
{
return toGlobalQRCode(qrCode).getAsString();
}
public static GlobalQRCode toGlobalQRCode(final HUQRCode qrCode)
{
return JsonConverterV1.toGlobalQRCode(HUQRCodeJsonConverter.GLOBAL_QRCODE_TYPE, qrCode);
}
public static HUQRCode fromGloba... | return JsonConverterV1.fromGlobalQRCode(globalQRCode);
}
else
{
throw new AdempiereException(INVALID_QR_VERSION_ERROR_MSG)
.setParameter("version", version);
}
}
public static JsonDisplayableQRCode toRenderedJson(@NonNull final HUQRCode huQRCode)
{
return JsonDisplayableQRCode.builder()
.code(... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\model\json\HUQRCodeJsonConverter.java | 1 |
请完成以下Java代码 | public class ArrayListBenchmark {
@State(Scope.Thread)
public static class MyState {
List<Employee> employeeList = new ArrayList<>();
Vector<Employee> employeeVector = new Vector<>();
//LinkedList<Employee> employeeList = new LinkedList<>();
long iterations = 100000;
... | public int testIndexOf(ArrayListBenchmark.MyState state) {
return state.employeeList.indexOf(state.employee);
}
@Benchmark
public Employee testGet(ArrayListBenchmark.MyState state) {
return state.employeeList.get(state.employeeIndex);
}
@Benchmark
public Employee testVectorGet(... | repos\tutorials-master\core-java-modules\core-java-collections-3\src\main\java\com\baeldung\collections\arraylistvsvector\ArrayListBenchmark.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Consumer<Collection<Saml2Error>> validateRequest(LogoutResponse response,
RelyingPartyRegistration registration) {
return (errors) -> {
validateIssuer(response, registration).accept(errors);
validateDestination(response, registration).accept(errors);
validateStatus(response).accept(errors);
};
... | if (StatusCode.SUCCESS.equals(response.getStatus().getStatusCode().getValue())) {
return;
}
if (StatusCode.PARTIAL_LOGOUT.equals(response.getStatus().getStatusCode().getValue())) {
return;
}
errors.add(new Saml2Error(Saml2ErrorCodes.INVALID_RESPONSE, "Response indicated logout failed"));
};
}
p... | repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\authentication\logout\BaseOpenSamlLogoutResponseValidator.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private long id;
private String name;
private String email;
public User(){}
public User(String name, String email) {
this.name = name;
this.email = email;
}
public void setName... | public void setEmail(String email) {
this.email = email;
}
public long getId() {
return id;
}
public String getName() {
return name;
}
public String getEmail() {
return email;
}
} | repos\tutorials-master\patterns-modules\design-patterns-architectural\src\main\java\com\baeldung\daopattern\entities\User.java | 2 |
请完成以下Java代码 | public void setOutputDataItem(String outputDataItem) {
this.outputDataItem = outputDataItem;
}
protected void updateResultCollection(DelegateExecution childExecution, DelegateExecution miRootExecution) {
if (miRootExecution != null && hasLoopDataOutputRef()) {
Object loopDataOutputR... | if (hasOutputDataItem()) {
return availableVariables.get(getOutputDataItem());
} else {
//exclude from the result all the built-in multi-instances variables
//and loopDataOutputRef itself that may exist in the context depending
// on the variable propagation
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\MultiInstanceActivityBehavior.java | 1 |
请完成以下Java代码 | public static final FindPanelBuilder builder()
{
return new FindPanelBuilder();
}
/** Logger */
private static final transient Logger log = LogManager.getLogger(Find.class);
private final FindPanel findPanel;
private final FindPanelActionListener findPanelActionListener = new FindPanelActionListener()
{
@O... | findPanel.requestFocus();
}
@Override
public void windowClosing(WindowEvent e)
{
findPanel.doCancel();
}
});
AEnv.showCenterWindow(builder.getParentFrame(), this);
} // Find
@Override
public void dispose()
{
findPanel.dispose();
removeAll();
super.dispose();
} // dispose
/****... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\search\Find.java | 1 |
请完成以下Java代码 | public static EventLogEntryCollector createThreadLocalForEvent(@NonNull final Event event)
{
final EventLogEntryCollector previousEntryCollector = threadLocalCollector.get();
final EventLogEntryCollector entryCollector = new EventLogEntryCollector(event, previousEntryCollector);
threadLocalCollector.set(entryCol... | else
{
threadLocalCollector.remove();
}
// Avoid throwing exception because EventLogService is not available in unit tests
if (Adempiere.isUnitTestMode())
{
return;
}
try
{
final EventLogService eventStoreService = SpringContextHolder.instance.getBean(EventLogService.class);
eventStoreServ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\log\EventLogEntryCollector.java | 1 |
请完成以下Java代码 | public void addEventListener(ActivitiEventListener listenerToAdd) {
eventSupport.addEventListener(listenerToAdd);
}
@Override
public void addEventListener(ActivitiEventListener listenerToAdd, ActivitiEventType... types) {
eventSupport.addEventListener(listenerToAdd, types);
}
@Over... | * cached. However, queries will only occur when the definition is not yet in the cache, which is very unlikely to happen, unless evicted.
*
* @param event
* @return
*/
protected BpmnModel extractBpmnModelFromEvent(ActivitiEvent event) {
BpmnModel result = null;
if (result == nul... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\delegate\event\impl\ActivitiEventDispatcherImpl.java | 1 |
请完成以下Java代码 | public void attachmentWasStored(
@NonNull final AttachmentEntry attachmentEntry,
@NonNull final URI storageIdentifier)
{
final ImmutableList<I_C_Doc_Outbound_Log> docOutboundLogRecords = attachmentEntry
.getLinkedRecords()
.stream()
.filter(this::isDocOutBoundLogReference)
.map(ref -> ref.getMo... | docOutboundLogRecord.setDateLastStore(SystemTime.asTimestamp());
saveRecord(docOutboundLogRecord);
}
attachmentEntryService.createAttachmentLinks(
ImmutableList.of(attachmentEntry),
createdLogLineRecords.build());
}
private boolean isDocOutBoundLogReference(ITableRecordReference ref)
{
return I_C_... | repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\storage\attachments\DocOutboundAttachmentStoredListener.java | 1 |
请完成以下Java代码 | public JSONMenuNode getPath(
@RequestParam(name = PARAM_Type) final JSONMenuNodeType jsonType,
@RequestParam(name = PARAM_ElementId) final String elementIdStr,
@RequestParam(name = PARAM_IncludeLastNode, required = false, defaultValue = "false") @Parameter(description = "Shall we include the last node") final ... | userSession.assertLoggedIn();
final MenuNode rootFiltered = getMenuTree()
.filter(nameQuery, includeLeafsIfGroupAccepted);
if (rootFiltered == null)
{
throw new NoMenuNodesFoundException();
}
if (rootFiltered.getChildren().isEmpty())
{
throw new NoMenuNodesFoundException();
}
return JSONMen... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\menu\MenuRestController.java | 1 |
请完成以下Java代码 | public class ConvertPrimitivesArrayToList {
public static void failConvert() {
int[] input = new int[]{1,2,3,4};
// List<Integer> inputAsList = Arrays.asList(input);
}
public static List<Integer> iterateConvert(int[] input) {
List<Integer> output = new ArrayList<Integer>();
... | }
public static List<Integer> streamConvertIntStream(int[] input) {
List<Integer> output = IntStream.of(input).boxed().collect(Collectors.toList());
return output;
}
public static List<Integer> guavaConvert(int[] input) {
List<Integer> output = Ints.asList(input);
return ou... | repos\tutorials-master\core-java-modules\core-java-collections-7\src\main\java\com\baeldung\convertarrayprimitives\ConvertPrimitivesArrayToList.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Builder getBuilder(String registrationId) {
ClientRegistration.Builder builder = getBuilder(registrationId,
ClientAuthenticationMethod.CLIENT_SECRET_POST, DEFAULT_REDIRECT_URL);
builder.scope("users.read", "tweet.read");
builder.authorizationUri("https://x.com/i/oauth2/authorize");
builder.token... | String redirectUri) {
ClientRegistration.Builder builder = ClientRegistration.withRegistrationId(registrationId);
builder.clientAuthenticationMethod(method);
builder.authorizationGrantType(AuthorizationGrantType.AUTHORIZATION_CODE);
builder.redirectUri(redirectUri);
return builder;
}
/**
* Create a new
... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\oauth2\client\CommonOAuth2Provider.java | 2 |
请完成以下Java代码 | public java.sql.Timestamp getPreparationTime_2 ()
{
return (java.sql.Timestamp)get_Value(COLUMNNAME_PreparationTime_2);
}
/** Set Bereitstellungszeit Mi.
@param PreparationTime_3
Preparation time for wednesday
*/
@Override
public void setPreparationTime_3 (java.sql.Timestamp PreparationTime_3)
{
set... | return (java.sql.Timestamp)get_Value(COLUMNNAME_PreparationTime_6);
}
/** Set Bereitstellungszeit So.
@param PreparationTime_7
Preparation time for Sunday
*/
@Override
public void setPreparationTime_7 (java.sql.Timestamp PreparationTime_7)
{
set_Value (COLUMNNAME_PreparationTime_7, PreparationTime_7);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\tourplanning\model\X_M_TourVersion.java | 1 |
请完成以下Java代码 | private ImmutableList<DBFunction> retrieveAvailableImportFunctionsByTableName(@NonNull final String tableName)
{
final StringBuilder sql = new StringBuilder("SELECT routines.specific_schema, routines.routine_name FROM information_schema.routines ")
.append(" WHERE routines.routine_name ILIKE ? ")
.append(" O... | }
private boolean isEligibleAfterRowFunction(@NonNull final DBFunction function)
{
final String routine_name = function.getName();
return StringUtils.containsIgnoreCase(routine_name, IMPORT_AFTER_ROW);
}
private boolean isEligibleAfterAllFunction(@NonNull final DBFunction function)
{
final String routine_... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\processing\DBFunctionsRepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setZIP(String value) {
this.zip = value;
}
/**
* Gets the value of the town property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTown() {
return town;
}
/**
* Sets the value of the town ... | public void setCountry(String value) {
this.country = value;
}
/**
* Details about the contact person at the delivery point.
*
* @return
* possible object is
* {@link ContactType }
*
*/
public ContactType getContact() {
return contact;
}
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\DeliveryPointDetails.java | 2 |
请完成以下Java代码 | public class LinesProcessor implements Tasklet, StepExecutionListener {
private final Logger logger = LoggerFactory.getLogger(LinesProcessor.class);
private List<Line> lines;
@Override
public RepeatStatus execute(StepContribution stepContribution, ChunkContext chunkContext) throws Exception {
... | @Override
public void beforeStep(StepExecution stepExecution) {
ExecutionContext executionContext = stepExecution
.getJobExecution()
.getExecutionContext();
this.lines = (List<Line>) executionContext.get("lines");
logger.debug("Lines Processor initialized.");
}
@... | repos\tutorials-master\spring-batch\src\main\java\com\baeldung\taskletsvschunks\tasklets\LinesProcessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class DateUtils
{
@Nullable
public static LocalDate toLocalDate(@Nullable final java.sql.Date date)
{
return date != null
? date.toLocalDate()
: null;
}
@NonNull
public static java.sql.Date toSqlDate(@NonNull final LocalDate date)
{
return java.sql.Date.valueOf(date);
}
public static... | public static String getDayName(@NonNull final LocalDate date, @NonNull final Locale locale)
{
return date.format(DateTimeFormatter.ofPattern("EEEE", locale));
}
public static ArrayList<LocalDate> getDaysList(final LocalDate startDate, final LocalDate endDate)
{
final ArrayList<LocalDate> result = new ArrayLis... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\util\DateUtils.java | 2 |
请完成以下Java代码 | public class ActivitiProcessStartedEventImpl extends ActivitiEntityWithVariablesEventImpl implements FlowableProcessStartedEvent {
protected final String nestedProcessInstanceId;
protected final String nestedProcessDefinitionId;
@SuppressWarnings("rawtypes")
public ActivitiProcessStartedEventImpl(fin... | this.nestedProcessInstanceId = null;
}
}
@Override
public String getNestedProcessInstanceId() {
return this.nestedProcessInstanceId;
}
@Override
public String getNestedProcessDefinitionId() {
return this.nestedProcessDefinitionId;
}
} | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\delegate\event\impl\ActivitiProcessStartedEventImpl.java | 1 |
请完成以下Java代码 | public void setM_Product_ID (final int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, M_Product_ID);
}
@Override
public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setN... | public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
@Override
public void setStandardQty (final BigDecimal StandardQty)
{
set_Value (COLUMNNAME_StandardQty, StandardQty);
}
@Override
public Big... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Phase.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class OrderMapping {
@SerializedName("orderId")
private String orderId = null;
@SerializedName("salesId")
private String salesId = null;
@SerializedName("updated")
private OffsetDateTime updated = null;
public OrderMapping orderId(String orderId) {
this.orderId = orderId;
return this;
... | }
if (o == null || getClass() != o.getClass()) {
return false;
}
OrderMapping orderMapping = (OrderMapping) o;
return Objects.equals(this.orderId, orderMapping.orderId) &&
Objects.equals(this.salesId, orderMapping.salesId) &&
Objects.equals(this.updated, orderMapping.updated);
}
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-orders-api\src\main\java\io\swagger\client\model\OrderMapping.java | 2 |
请完成以下Java代码 | public String getPassword() {
return password;
}
public UserDO setPassword(String password) {
this.password = password;
return this;
}
public Date getCreateTime() {
return createTime;
}
public UserDO setCreateTime(Date createTime) {
this.createTime = cr... | public Integer getDeleted() {
return deleted;
}
public UserDO setDeleted(Integer deleted) {
this.deleted = deleted;
return this;
}
public Integer getTenantId() {
return tenantId;
}
public UserDO setTenantId(Integer tenantId) {
this.tenantId = tenantId;
... | repos\SpringBoot-Labs-master\lab-12-mybatis\lab-12-mybatis-plus-tenant\src\main\java\cn\iocoder\springboot\lab12\mybatis\dataobject\UserDO.java | 1 |
请完成以下Java代码 | public String getProcessDefinitionId() {
return processDefinitionId;
}
public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
public String getProcessDefinitionKey() {
return processDefinitionKey;
}
public void setProcessDefinitionKe... | public void setCleanableProcessInstanceCount(Long cleanableProcessInstanceCount) {
this.cleanableProcessInstanceCount = cleanableProcessInstanceCount;
}
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public String toStri... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\CleanableHistoricProcessInstanceReportResultEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Collection<String> getCaseDefinitionKeys() {
return caseDefinitionKeys;
}
public boolean isWithLocalizationFallback() {
return withLocalizationFallback;
}
public List<HistoricTaskInstanceQueryImpl> getOrQueryObjects() {
return orQueryObjects;
}
public List<List<... | public void setSafeInvolvedGroups(List<List<String>> safeInvolvedGroups) {
this.safeInvolvedGroups = safeInvolvedGroups;
}
public Set<String> getScopeIds() {
return scopeIds;
}
public List<List<String>> getSafeScopeIds() {
return safeScopeIds;
}
public void setSafeScop... | repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\HistoricTaskInstanceQueryImpl.java | 2 |
请完成以下Java代码 | public void setInitialAnswer(final int initialAnswer)
{
// If the inial answer did not actual changed, do nothing
if (this._initialAnswer == initialAnswer)
{
return;
}
//
// Configure buttons accelerator (KeyStroke) and RootPane's default button
final JRootPane rootPane = getRootPane();
final CButt... | * Request focus on inital answer.
*/
private void focusInitialAnswerButton()
{
final CButton defaultButton;
if (_initialAnswer == A_OK)
{
defaultButton = confirmPanel.getOKButton();
}
else if (_initialAnswer == A_CANCEL)
{
defaultButton = confirmPanel.getCancelButton();
}
else
{
return;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ADialogDialog.java | 1 |
请完成以下Java代码 | public BigDecimal getDiscount()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Discount);
return bd != null ? bd : BigDecimal.ZERO;
}
/**
* IfForeignDiscountsExist AD_Reference_ID=541401
* Reference name: C_SubscrDiscount_Line_IfForeignDiscountsExist
*/
public static final int IFFOREIGNDISCOU... | set_Value (COLUMNNAME_M_Product_ID, M_Product_ID);
}
@Override
public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNN... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_SubscrDiscount_Line.java | 1 |
请完成以下Java代码 | public static int getCalloutId(final GridTab mTab, final String colName)
{
final Integer id = (Integer)mTab.getValue(colName);
if (id == null || id <= 0)
{
return 0;
}
return id;
}
/**
* For a {@link Timestamp} representing e.g. "17.12.2009 15:14:34" this method returns a timestamp representing
*... | }
final GridWindow gridWindow = new GridWindow(wVO);
//
GridTab tab = null;
int tabIndex = -1;
for (int i = 0; i < gridWindow.getTabCount(); i++)
{
GridTab t = gridWindow.getTab(i);
if (t.getAD_Table_ID() == AD_Table_ID)
{
tab = t;
tabIndex = i;
break;
}
}
if (tab == null)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\util\MiscUtils.java | 1 |
请完成以下Java代码 | protected void reportExecution(TenantId tenantId, CustomerId customerId) {
apiUsageReportClient.ifPresent(client -> client.report(tenantId, customerId, ApiUsageRecordKey.JS_EXEC_COUNT, 1));
}
@Override
protected JsScriptExecutionTask doInvokeFunction(UUID scriptId, Object[] args) {
return n... | protected abstract ListenableFuture<UUID> doEval(UUID scriptId, JsScriptInfo jsInfo, String scriptBody);
protected abstract ListenableFuture<Object> doInvokeFunction(UUID scriptId, JsScriptInfo jsInfo, Object[] args);
protected abstract void doRelease(UUID scriptId, JsScriptInfo scriptInfo) throws Exception;
... | repos\thingsboard-master\common\script\script-api\src\main\java\org\thingsboard\script\api\js\AbstractJsInvokeService.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.