instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public class CustomResponseWithBuilderController {
@GetMapping("/hello")
public ResponseEntity<String> hello() {
return ResponseEntity.ok("Hello World!");
}
@GetMapping("/age")
public ResponseEntity<String> age(@RequestParam("yearOfBirth") int yearOfBirth) {
if (isInFuture(yearOfBi... | private boolean isInFuture(int year) {
return currentYear() < year;
}
private int currentYear() {
return Year.now()
.getValue();
}
@GetMapping("/customHeader")
public ResponseEntity<String> customHeader() {
return ResponseEntity.ok()
.header("Custom-... | repos\tutorials-master\spring-boot-modules\spring-boot-mvc\src\main\java\com\baeldung\responseentity\CustomResponseWithBuilderController.java | 2 |
请完成以下Java代码 | public void collect(@NonNull HUAttributeChange change)
{
Check.assumeEquals(huId, change.getHuId(), "Invalid HuId for {}. Expected: {}", change, huId);
attributes.compute(change.getAttributeId(), (attributeId, previousChange) -> mergeChange(previousChange, change));
lastChangeDate = max(lastChangeDate, change.... | ? previousChange.mergeWithNextChange(currentChange)
: currentChange;
}
public boolean isEmpty()
{
return attributes.isEmpty();
}
public AttributesKey getOldAttributesKey()
{
return toAttributesKey(HUAttributeChange::getOldAttributeKeyPartOrNull);
}
public AttributesKey getNewAttributesKey()
{
retu... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\material\interceptor\HUAttributeChanges.java | 1 |
请完成以下Java代码 | protected void validateFlowElementsInContainer(
FlowElementsContainer container,
List<ValidationError> errors,
Process process
) {
for (FlowElement flowElement : container.getFlowElements()) {
if (flowElement instanceof FlowElementsContainer) {
FlowElement... | if ((flowElement instanceof Event)) {
((Event) flowElement).getEventDefinitions()
.stream()
.forEach(event -> {
if (event instanceof TimerEventDefinition) {
addWarning(errors, Problems.EVENT_TIMER_ASYNC_NOT_AVAIL... | repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\boot\process\validation\AsyncPropertyValidator.java | 1 |
请完成以下Java代码 | public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Create Single Order.
@param IsCreateSingleOrder
For all shipments create one Order
*/
public void setIsCreateSingleOrder (boolean IsCreateSingleOrder)
{
set_Value (COLUMNNAME_IsCreateSingleOrder, Boolean.val... | /** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Proces... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DistributionRun.java | 1 |
请完成以下Java代码 | public ExternalWorkerJobAcquireBuilder createExternalWorkerJobAcquireBuilder() {
return new ExternalWorkerJobAcquireBuilderImpl(commandExecutor, configuration.getJobServiceConfiguration());
}
@Override
public ExternalWorkerJobFailureBuilder createExternalWorkerJobFailureBuilder(String externalJobId... | }
return commandExecutor.execute(command);
}
public <T> T executeCommand(CommandConfig config, Command<T> command) {
if (config == null) {
throw new FlowableIllegalArgumentException("The config is null");
}
if (command == null) {
throw new FlowableIllegal... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\CmmnManagementServiceImpl.java | 1 |
请完成以下Java代码 | public void flush()
{
List<ProcessInfoLog> logEntries = null;
try
{
//note: synchronized with addToBuffer
mainLock.lock();
logEntries = buffer;
this.buffer = null;
if (logEntries == null || logEntries.isEmpty())
{
return;
}
pInstanceDAO.saveProcessInfoLogs(pInstanceId, logEntries)... | //making sure there is no flush going on in a diff thread while adding to buffer
mainLock.lock();
List<ProcessInfoLog> buffer = this.buffer;
if (buffer == null)
{
buffer = this.buffer = new ArrayList<>(bufferSize);
}
buffer.add(logEntry);
if (buffer.size() >= bufferSize)
{
flush();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\impl\ADProcessLoggable.java | 1 |
请完成以下Java代码 | public void setC_Currency_ID (final int C_Currency_ID)
{
if (C_Currency_ID < 1)
set_Value (COLUMNNAME_C_Currency_ID, null);
else
set_Value (COLUMNNAME_C_Currency_ID, C_Currency_ID);
}
@Override
public int getC_Currency_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Currency_ID);
}
@Override
public v... | @Override
public BigDecimal getQtyShipped()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyShipped);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setTotalPrice (final BigDecimal TotalPrice)
{
set_Value (COLUMNNAME_TotalPrice, TotalPrice);
}
@Override
public BigDecimal... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_ShipmentOrder_Item.java | 1 |
请完成以下Spring Boot application配置 | spring:
application:
name: demo-consumer # Spring 应用名
cloud:
nacos:
# Nacos 作为注册中心的配置项,对应 NacosDiscoveryProperties 配置类
discovery:
server-addr: 127.0.0.1:8848 # Nacos 服务器地址
server:
port: 28080 # | 服务器端口。默认为 8080
logging:
level:
cn.iocoder.springcloud.labx03.feigndemo.consumer.feign: DEBUG | repos\SpringBoot-Labs-master\labx-03-spring-cloud-feign\labx-03-sc-feign-demo02B-consumer\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public RestResponse<?> fileParam(@MultipartParam FileItem fileItem) throws Exception {
try {
byte[] fileContent = fileItem.getData();
log.debug("Saving the uploaded file");
java.nio.file.Path tempFile = Files.createTempFile("baeldung_tempfiles", ".tmp");
Files.wr... | public void headerParam(@HeaderParam String customheader, Response response) {
log.info("Custom header: " + customheader);
response.text(customheader);
}
@GetRoute("/params/cookie")
public void cookieParam(@CookieParam(defaultValue = "default value") String myCookie, Response response) {
... | repos\tutorials-master\web-modules\blade\src\main\java\com\baeldung\blade\sample\ParameterInjectionExampleController.java | 1 |
请完成以下Spring Boot application配置 | # datasource config
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/springboot3_db?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false
spring.datas | ource.username=root
spring.datasource.password=
mybatis.mapper-locations=classpath:mapper/*Dao.xml | repos\spring-boot-projects-main\SpringBoot入门案例源码\spring-boot-mybatis\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public StockQtyAndUOMQty computeQtysDelivered()
{
final StockQtyAndUOMQty qtysDelivered;
if (soTrx.isSales())
{
qtysDelivered = deliveredData.getShipmentData().computeInvoicableQtyDelivered(invoicableQtyBasedOn);
}
else
{
qtysDelivered = deliveredData.getReceiptData().getQtysTotal(invoicableQtyBased... | /**
* Excluding possible receipt quantities with quality issues
*/
StockQtyAndUOMQty qtysRaw;
/**
* Computed including possible receipt quality issues, not overridden by a possible qtyToInvoice override.
*/
StockQtyAndUOMQty qtysCalc;
private ToInvoiceExclOverride(
@NonNull final InvoicedQtys ... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\internalbusinesslogic\InvoiceCandidate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SpringController {
@GetMapping("/")
public String getIndex() {
return "comparison/index";
}
@GetMapping("/login")
public String showLoginPage() {
return "comparison/login";
}
@RequestMapping("/login-error")
public String loginError(Model model) {
m... | return "comparison/home";
}
private void addUserAttributes(Model model) {
Authentication auth = SecurityContextHolder.getContext()
.getAuthentication();
if (auth != null && !auth.getClass()
.equals(AnonymousAuthenticationToken.class)) {
User user = (User) aut... | repos\tutorials-master\security-modules\apache-shiro\src\main\java\com\baeldung\comparison\springsecurity\web\SpringController.java | 2 |
请完成以下Java代码 | public void setP_Number (BigDecimal P_Number)
{
set_Value (COLUMNNAME_P_Number, P_Number);
}
/** Get Process Number.
@return Process Parameter
*/
public BigDecimal getP_Number ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_P_Number);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Se... | public void setP_String_To (String P_String_To)
{
set_Value (COLUMNNAME_P_String_To, P_String_To);
}
/** Get Process String To.
@return Process Parameter
*/
public String getP_String_To ()
{
return (String)get_Value(COLUMNNAME_P_String_To);
}
/** Set Sequence.
@param SeqNo
Method of ordering rec... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PInstance_Para.java | 1 |
请完成以下Java代码 | public static ExternalSystemAlbertaConfigId ofRepoId(final int repoId)
{
return new ExternalSystemAlbertaConfigId(repoId);
}
@Nullable
public static ExternalSystemAlbertaConfigId ofRepoIdOrNull(@Nullable final Integer repoId)
{
return repoId != null && repoId > 0 ? new ExternalSystemAlbertaConfigId(repoId) : ... | {
return getRepoId();
}
private ExternalSystemAlbertaConfigId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "ExternalSystem_Config_Alberta_ID");
}
@Override
public ExternalSystemType getType()
{
return ExternalSystemType.Alberta;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\alberta\ExternalSystemAlbertaConfigId.java | 1 |
请完成以下Java代码 | public class StringDataEntry extends BasicKvEntry {
private static final long serialVersionUID = 1L;
private final String value;
public StringDataEntry(String key, String value) {
super(key);
this.value = value;
}
@Override
public DataType getDataType() {
return DataT... | public boolean equals(Object o) {
if (this == o)
return true;
if (!(o instanceof StringDataEntry))
return false;
if (!super.equals(o))
return false;
StringDataEntry that = (StringDataEntry) o;
return Objects.equals(value, that.value);
}
... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\kv\StringDataEntry.java | 1 |
请完成以下Java代码 | public void setValidateFormFields(String validateFormFields) {
this.validateFormFields = validateFormFields;
}
public String getTaskIdVariableName() {
return taskIdVariableName;
}
public void setTaskIdVariableName(String taskIdVariableName) {
this.taskIdVariableName = taskIdVar... | setValidateFormFields(otherElement.getValidateFormFields());
setCandidateGroups(new ArrayList<>(otherElement.getCandidateGroups()));
setCandidateUsers(new ArrayList<>(otherElement.getCandidateUsers()));
setCustomGroupIdentityLinks(otherElement.customGroupIdentityLinks);
setCustomUserId... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\UserTask.java | 1 |
请完成以下Java代码 | public @Nullable ConnectionFactory getTargetConnectionFactory(Object key) {
return this.targetConnectionFactories.get(key);
}
/**
* Specify whether to apply a validation enforcing all {@link ConnectionFactory#isPublisherConfirms()} and
* {@link ConnectionFactory#isPublisherReturns()} have a consistent value.
... | checkConfirmsAndReturns(connectionFactory);
}
/**
* Removes the {@link ConnectionFactory} associated with the given lookup key and returns it.
* @param key the lookup key
* @return the {@link ConnectionFactory} that was removed
*/
protected ConnectionFactory removeTargetConnectionFactory(Object key) {
ret... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\connection\AbstractRoutingConnectionFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class LanguageKey
{
@Nullable
public static LanguageKey ofNullableString(@Nullable final String languageInfo)
{
return languageInfo != null && !languageInfo.isBlank()
? ofString(languageInfo)
: null;
}
public static Optional<LanguageKey> optionalOfNullableString(@Nullable final String languageInf... | @NonNull
String variant;
public Locale toLocale()
{
return new Locale(language, country, variant);
}
@Override
@Deprecated
public String toString()
{
return getAsString();
}
@JsonValue
public String getAsString()
{
final StringBuilder sb = new StringBuilder();
sb.append(language);
if (!country.... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\util\LanguageKey.java | 2 |
请完成以下Java代码 | public boolean isCopyVariablesToProperties() {
return copyVariablesToProperties;
}
public void setCopyVariablesToProperties(boolean copyVariablesToProperties) {
this.copyVariablesToProperties = copyVariablesToProperties;
}
public boolean isCopyCamelBodyToBody() {
return copyCam... | this.copyCamelBodyToBodyAsString = copyCamelBodyToBodyAsString;
}
public boolean isSetProcessInitiator() {
return StringUtils.isNotEmpty(getProcessInitiatorHeaderName());
}
public Map<String, Object> getReturnVarMap() {
return returnVarMap;
}
public void setReturnVarMap(Map<St... | repos\flowable-engine-main\modules\flowable-camel\src\main\java\org\flowable\camel\FlowableEndpoint.java | 1 |
请完成以下Java代码 | public void addToCurrentQtyAndCumulate(
@NonNull final Quantity qtyToAdd,
@NonNull final CostAmount amt)
{
currentQty = currentQty.add(qtyToAdd).toZeroIfNegative();
addCumulatedAmtAndQty(amt, qtyToAdd);
}
public void addToCurrentQtyAndCumulate(@NonNull final CostAmountAndQty amtAndQty)
{
addToCurrentQ... | {
setCostPrice(getCostPrice().withOwnCostPrice(ownCostPrice));
}
public void clearOwnCostPrice()
{
setCostPrice(getCostPrice().withZeroOwnCostPrice());
}
public void addToOwnCostPrice(@NonNull final CostAmount ownCostPriceToAdd)
{
setCostPrice(getCostPrice().addToOwnCostPrice(ownCostPriceToAdd));
}
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\CurrentCost.java | 1 |
请完成以下Java代码 | public void setPP_Order_Report_ID (int PP_Order_Report_ID)
{
if (PP_Order_Report_ID < 1)
set_ValueNoCheck (COLUMNNAME_PP_Order_Report_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PP_Order_Report_ID, Integer.valueOf(PP_Order_Report_ID));
}
/** Get Summary the results of manufacturing.
@return Summary t... | {
set_Value (COLUMNNAME_Qty, Qty);
}
/** Get Menge.
@return Menge
*/
@Override
public java.math.BigDecimal getQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Reihenfolge.
@param SeqNo
Zur Bestimmung der Reihenfolge der... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Order_Report.java | 1 |
请完成以下Java代码 | private static String getRoleWithDefaultPrefix(String defaultRolePrefix, String role) {
if (role == null) {
return role;
}
if ((defaultRolePrefix == null) || (defaultRolePrefix.length() == 0)) {
return role;
}
if (role.startsWith(defaultRolePrefix)) {
... | @Override
public Object getThis() {
return this;
}
@Override
public void setFilterObject(Object obj) {
this.filterObject = obj;
}
@Override
public void setReturnObject(Object obj) {
this.returnObject = obj;
}
} | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\custom\security\MySecurityExpressionRoot.java | 1 |
请完成以下Java代码 | public ServerTransportConfig getTransportConfig() {
return transportConfig;
}
public ClusterServerModifyRequest setTransportConfig(
ServerTransportConfig transportConfig) {
this.transportConfig = transportConfig;
return this;
}
public Set<String> getNamespaceSet() {
... | return this;
}
@Override
public String toString() {
return "ClusterServerModifyRequest{" +
"app='" + app + '\'' +
", ip='" + ip + '\'' +
", port=" + port +
", mode=" + mode +
", flowConfig=" + flowConfig +
", transportConfig=" ... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\cluster\request\ClusterServerModifyRequest.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PCMContentSourceLocalFile
{
private static final AdMessageKey MSG_DUPLICATE_FILE_LOOKUP_DETAILS = AdMessageKey.of("ExternalSystemConfigPCMDuplicateFileLookupDetails");
@NonNull
String rootLocation;
@NonNull
String processedDirectory;
@NonNull
String erroredDirectory;
@NonNull
Duration pollingF... | final boolean isFileLookupInfoDuplicated = CollectionUtils.hasDuplicatesForValue(request2LookupInfo.values(), targetLookupInfo);
if (isFileLookupInfoDuplicated)
{
final ITranslatableString duplicateFileLookupInfoErrorMsg = msgBL.getTranslatableMsgText(MSG_DUPLICATE_FILE_LOOKUP_DETAILS,
... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\pcm\source\PCMContentSourceLocalFile.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Student {
@Id
private long id;
private String name;
@ElementCollection
private List<String> tags = new ArrayList<>();
@ElementCollection
private List<SkillTag> skillTags = new ArrayList<>();
@ElementCollection
private List<KVTag> kvTags = new ArrayList<>();
publ... | return name;
}
public void setName(String name) {
this.name = name;
}
public List<String> getTags() {
return tags;
}
public void setTags(List<String> tags) {
this.tags.addAll(tags);
}
public List<SkillTag> getSkillTags() {
return skillTags;
}
... | repos\tutorials-master\persistence-modules\spring-data-jpa-filtering\src\main\java\com\baeldung\inmemory\persistence\model\Student.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class CounterController {
public static final String INDEX_TEMPLATE_VIEW_NAME = "index";
private final Set<String> sessionIds = Collections.synchronizedSet(new HashSet<>());
@GetMapping("/")
@ResponseBody
public String home() {
return format("HTTP Session Caching Example");
}
@GetMapping("/ping")
@... | return new ModelAndView(INDEX_TEMPLATE_VIEW_NAME, model);
}
private Object getRequestCount(HttpSession session) {
Integer requestCount = (Integer) session.getAttribute("requestCount");
requestCount = requestCount != null ? requestCount : 0;
requestCount++;
session.setAttribute("requestCount", requestCount... | repos\spring-boot-data-geode-main\spring-geode-samples\caching\http-session\src\main\java\example\app\caching\session\http\controller\CounterController.java | 2 |
请完成以下Java代码 | public List<ReportEntry2> getNtry() {
if (ntry == null) {
ntry = new ArrayList<ReportEntry2>();
}
return this.ntry;
}
/**
* Gets the value of the addtlStmtInf property.
*
* @return
* possible object is
* {@link String }
*
*/
... | return addtlStmtInf;
}
/**
* Sets the value of the addtlStmtInf property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAddtlStmtInf(String value) {
this.addtlStmtInf = value;
}
} | 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\AccountStatement2.java | 1 |
请完成以下Java代码 | public class ListAndSetApproach<E> {
private final List<E> list;
private final Set<E> set;
public ListAndSetApproach() {
this.list = new ArrayList<>();
this.set = new HashSet<>();
}
public boolean add(E element) {
if (set.add(element)) {
list.add(element);
... | }
public int size() {
return list.size();
}
public boolean isEmpty() {
return list.isEmpty();
}
public void clear() {
list.clear();
set.clear();
}
} | repos\tutorials-master\core-java-modules\core-java-collections-set-2\src\main\java\com\baeldung\linkedhashsetindexof\ListAndSetApproach.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 setM... | set_ValueNoCheck (COLUMNNAME_M_QualityInsp_LagerKonf_Version_ID, M_QualityInsp_LagerKonf_Version_ID);
}
@Override
public int getM_QualityInsp_LagerKonf_Version_ID()
{
return get_ValueAsInt(COLUMNNAME_M_QualityInsp_LagerKonf_Version_ID);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLU... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java-gen\de\metas\materialtracking\ch\lagerkonf\model\X_M_QualityInsp_LagerKonf_AdditionalFee.java | 1 |
请完成以下Java代码 | public void setOperation (String Operation)
{
set_Value (COLUMNNAME_Operation, Operation);
}
/** Get Operation.
@return Compare Operation
*/
public String getOperation ()
{
return (String)get_Value(COLUMNNAME_Operation);
}
/** Set Quantity.
@param Qty
Quantity
*/
public void setQty (BigDeci... | Method of ordering records; lowest number comes first
*/
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_S... | 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 ActiveOrHistoricCurrencyAndAmount getTtlTaxAmt() {
return ttlTaxAmt;
}
/**
* Sets the value of the ttlTaxAmt property.
*
* @param value
* allowed object is
* {@link ActiveOrHistoricCurrencyAndAmount }
*
*/
public void setTtlTaxAmt(ActiveOrHist... | }
/**
* Gets the value of the rcrd property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> me... | 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\TaxInformation3.java | 1 |
请完成以下Java代码 | public CaseInstanceStartEventSubscriptionBuilder addCorrelationParameterValues(Map<String, Object> parameters) {
correlationParameterValues.putAll(parameters);
return this;
}
@Override
public CaseInstanceStartEventSubscriptionBuilder tenantId(String tenantId) {
this.tenantId = tenan... | checkValidInformation();
return cmmnRuntimeService.registerCaseInstanceStartEventSubscription(this);
}
protected void checkValidInformation() {
if (StringUtils.isEmpty(caseDefinitionKey)) {
throw new FlowableIllegalArgumentException("The case definition must be provided using the ke... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CaseInstanceStartEventSubscriptionBuilderImpl.java | 1 |
请完成以下Java代码 | public String getLogFileDatePattern()
{
return logFileDatePattern;
}
private final void updateFileNamePattern()
{
final StringBuilder fileNamePatternBuilder = new StringBuilder();
final String logDir = getLogDir();
if (!Check.isEmpty(logDir, true))
{
fileNamePatternBuilder.append(logDir);
if (!log... | }
}
public List<File> getLogFiles()
{
final File logDir = getLogDirAsFile();
if (logDir != null && logDir.isDirectory())
{
final File[] logs = logDir.listFiles(logFileNameFilter);
for (int i = 0; i < logs.length; i++)
{
try
{
logs[i] = logs[i].getCanonicalFile();
}
catch (Excepti... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\logging\MetasfreshTimeBasedRollingPolicy.java | 1 |
请完成以下Java代码 | public String getProcessDefinitionVersionTag() {
return subscriptionConfiguration.getProcessDefinitionVersionTag();
}
@Override
public Map<String, Object> getProcessVariables() {
return subscriptionConfiguration.getProcessVariables();
}
@Override
public boolean isWithoutTenantId() {
return sub... | return subscriptionConfiguration.getTenantIdIn();
}
@Override
public boolean isIncludeExtensionProperties() {
return subscriptionConfiguration.getIncludeExtensionProperties();
}
protected String[] toArray(List<String> list) {
return list.toArray(new String[0]);
}
@Override
public void afterPr... | repos\camunda-bpm-platform-master\spring-boot-starter\starter-client\spring\src\main\java\org\camunda\bpm\client\spring\impl\subscription\SpringTopicSubscriptionImpl.java | 1 |
请完成以下Java代码 | public Object getRawEvent() {
return consumerRecord;
}
@Override
public Object getBody() {
return consumerRecord.value();
}
@Override
public Map<String, Object> getHeaders() {
if (headers == null) {
headers = retrieveHeaders();
}
return heade... | for (Header consumerRecordHeader : consumerRecordHeaders) {
headers.put(consumerRecordHeader.key(), consumerRecordHeader.value());
}
return headers;
}
@Override
public String toString() {
return "KafkaConsumerRecordInboundEvent{" +
"consumerRecord=" + co... | repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\kafka\KafkaConsumerRecordInboundEvent.java | 1 |
请完成以下Java代码 | public List<CommentData> findByArticleId(String articleId, User user) {
List<CommentData> comments = commentReadService.findByArticleId(articleId);
if (comments.size() > 0 && user != null) {
Set<String> followingAuthors =
userRelationshipQueryService.followingAuthors(
user.getId(),... | Set<String> followingAuthors =
userRelationshipQueryService.followingAuthors(
user.getId(),
comments.stream()
.map(commentData -> commentData.getProfileData().getId())
.collect(Collectors.toList()));
comments.forEach(
commentData ... | repos\spring-boot-realworld-example-app-master\src\main\java\io\spring\application\CommentQueryService.java | 1 |
请完成以下Java代码 | public boolean isParentDocumentProcessed()
{
return parentDocument.isProcessed();
}
@Override
public boolean isParentDocumentActive()
{
return parentDocument.isActive();
}
@Override
public boolean isParentDocumentNew()
{
return parentDocument.isNew();
}
@Override
public boolean isPar... | {
return getChangedDocuments();
}
@Override
public Evaluatee toEvaluatee()
{
return parentDocument.asEvaluatee();
}
@Override
public void collectAllowNew(final DocumentPath parentDocumentPath, final DetailId detailId, final LogicExpressionResult allowNew)
{
parentDocument.getChangesCollector(... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\HighVolumeReadWriteIncludedDocumentsCollection.java | 1 |
请完成以下Java代码 | public void setTotalOpenBalance (final BigDecimal TotalOpenBalance)
{
set_Value (COLUMNNAME_TotalOpenBalance, TotalOpenBalance);
}
/** Get Offener Saldo.
@return Gesamt der offenen Beträge in primärer Buchführungswährung
*/
@Override
public BigDecimal getTotalOpenBalance ()
{
final BigDecimal bd = (BigD... | return 0;
}
return ii.intValue();
}
/** Set Suchschlüssel.
@param value
Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein
*/
@Override
public void setvalue (final java.lang.String value)
{
set_Value (COLUMNNAME_value, value);
}
/** Get Suchschlüssel.
@return Suchschlüs... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\adempiere\model\X_V_BPartnerCockpit.java | 1 |
请完成以下Java代码 | protected void setC_Activity_ID(final I_C_Invoice_Candidate invoiceCandidate)
{
final ActivityId activityId = productAcctDAO.retrieveActivityForAcct(
ClientId.ofRepoId(invoiceCandidate.getAD_Client_ID()),
OrgId.ofRepoId(invoiceCandidate.getAD_Org_ID()),
ProductId.ofRepoId(invoiceCandidate.getM_Product_ID... | // TODO: we should use shipPartnerLocation
final BPartnerLocationAndCaptureId billToLocation = InvoiceCandidateLocationAdapterFactory
.billLocationAdapter(ic)
.getBPartnerLocationAndCaptureId();
final TaxId taxID = taxBL.getTaxNotNull(
ic,
taxCategoryId,
ic.getM_Product_ID(),
date, // ship ... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\ic\spi\impl\InvoiceCandidateWriter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand;
}
public int getSort() {
return sort;
}
public void... | public UserEntity getCompanyEntity() {
return companyEntity;
}
public void setCompanyEntity(UserEntity companyEntity) {
this.companyEntity = companyEntity;
}
@Override
public String toString() {
return "BrandEntity{" +
"id='" + id + '\'' +
",... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\product\BrandEntity.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private ReportResult exportAsJasperPrint(final JasperPrint jasperPrint) throws IOException
{
final ByteArrayOutputStream out = new ByteArrayOutputStream();
final ObjectOutputStream oos = new ObjectOutputStream(out);
oos.writeObject(jasperPrint);
return ReportResult.builder()
.outputType(OutputType.JasperP... | if (jasperPrint.getProperty(XlsReportConfiguration.PROPERTY_PASSWORD) == null)
{
// do nothing;
}
else if (jasperPrint.getProperty(XlsReportConfiguration.PROPERTY_PASSWORD).isEmpty())
{
exporter.setParameter(JRXlsAbstractExporterParameter.PASSWORD, null);
}
else
{
exporter.setParameter(JRXlsAbstr... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\JasperEngine.java | 2 |
请完成以下Java代码 | private DeliveryOrderParcel updateDeliveryOrderLine(@NonNull final DeliveryOrderParcel line, @NonNull final JsonDeliveryResponseItem jsonDeliveryResponseItem)
{
final String awb = jsonDeliveryResponseItem.getAwb();
final byte[] labelData = Base64.getDecoder().decode(jsonDeliveryResponseItem.getLabelPdfBase64());
... | .orderId(OrderId.of(NShiftConstants.SHIPPER_GATEWAY_ID, deliveryOrderIdAsString))
.defaultLabelType(NShiftPackageLabelType.DEFAULT)
.label(PackageLabel.builder()
.type(NShiftPackageLabelType.DEFAULT)
.labelData(labelData)
.contentType(PackageLabel.CONTENTTYPE_PDF)
.fileName(awb)
.b... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.nshift\src\main\java\de\metas\shipper\gateway\nshift\client\NShiftShipperGatewayClient.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setFormat(DateFormat dateFormat)
{
this.dateFormat = dateFormat;
}
@Override
public void write(JsonWriter out, java.sql.Date date) throws IOException
{
if (date == null)
{
out.nullValue();
}
else
{
String value;
if (dateFormat != null)
{
value = dateFormat.f... | }
}
@Override
public Date read(JsonReader in) throws IOException
{
try
{
switch (in.peek())
{
case NULL:
in.nextNull();
return null;
default:
String date = in.nextString();
try
{
if (dateFormat != null)
{
return dateFormat.parse(date);... | 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\invoker\JSON.java | 2 |
请完成以下Java代码 | static ClientHttpRequestFactoryBuilder<? extends ClientHttpRequestFactory> detect() {
return detect(null);
}
/**
* Detect the most suitable {@link ClientHttpRequestFactoryBuilder} based on the
* classpath. The method favors builders in the following order:
* <ol>
* <li>{@link #httpComponents()}</li>
* <l... | @Nullable ClassLoader classLoader) {
if (HttpComponentsClientHttpRequestFactoryBuilder.Classes.present(classLoader)) {
return httpComponents();
}
if (JettyClientHttpRequestFactoryBuilder.Classes.present(classLoader)) {
return jetty();
}
if (ReactorClientHttpRequestFactoryBuilder.Classes.present(classLoa... | repos\spring-boot-4.0.1\module\spring-boot-http-client\src\main\java\org\springframework\boot\http\client\ClientHttpRequestFactoryBuilder.java | 1 |
请完成以下Java代码 | public void addOnPart(CmmnOnPartDeclaration onPart) {
CmmnActivity source = onPart.getSource();
if (source == null) {
// do nothing: ignore onPart
return;
}
String sourceId = source.getId();
List<CmmnOnPartDeclaration> onPartDeclarations = onPartMap.get(sourceId);
if (onPartDeclar... | }
// variableOnParts
public void addVariableOnParts(CmmnVariableOnPartDeclaration variableOnPartDeclaration) {
variableOnParts.add(variableOnPartDeclaration);
}
public boolean hasVariableOnPart(String variableEventName, String variableName) {
for(CmmnVariableOnPartDeclaration variableOnPartDeclaration... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\model\CmmnSentryDeclaration.java | 1 |
请完成以下Java代码 | protected FlowElement convertJsonToElement(
JsonNode elementNode,
JsonNode modelNode,
Map<String, JsonNode> shapeMap
) {
StartEvent startEvent = new StartEvent();
startEvent.setInitiator(getPropertyValueAsString(PROPERTY_NONE_STARTEVENT_INITIATOR, elementNode));
Strin... | } else if (STENCIL_EVENT_START_SIGNAL.equals(stencilId)) {
convertJsonToSignalDefinition(elementNode, startEvent);
}
return startEvent;
}
protected void addExtensionElement(String name, String elementText, Event event) {
ExtensionElement extensionElement = new ExtensionEleme... | repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\StartEventJsonConverter.java | 1 |
请完成以下Java代码 | public final class AdminSettingsEntity extends BaseSqlEntity<AdminSettings> implements BaseEntity<AdminSettings> {
@Column(name = ModelConstants.ADMIN_SETTINGS_TENANT_ID_PROPERTY)
private UUID tenantId;
@Column(name = ADMIN_SETTINGS_KEY_PROPERTY)
private String key;
@Convert(converter = JsonConve... | this.tenantId = adminSettings.getTenantId().getId();
this.key = adminSettings.getKey();
this.jsonValue = adminSettings.getJsonValue();
}
@Override
public AdminSettings toData() {
AdminSettings adminSettings = new AdminSettings(new AdminSettingsId(id));
adminSettings.setCreat... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\AdminSettingsEntity.java | 1 |
请完成以下Java代码 | public static EAN13HUQRCode fromScannedCodeOrNullIfNotHandled(@NonNull final ScannedCode scannedCode)
{
return fromStringOrNullIfNotHandled(scannedCode.getAsString());
}
@Nullable
public static EAN13HUQRCode fromStringOrNullIfNotHandled(@NonNull final String barcode)
{
return fromString(barcode).orElse(null);... | public ScannedCode toScannedCode() {return ScannedCode.ofString(getAsString());}
@Override
public String getAsString() {return ean13.getAsString();}
@Override
public Optional<BigDecimal> getWeightInKg() {return ean13.getWeightInKg();}
@Override
public Optional<LocalDate> getBestBeforeDate() {return Optional.em... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\ean13\EAN13HUQRCode.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PersonRepositoryService implements PersonService {
private PersonRepository repo;
@Autowired
public void setPersonRepository(PersonRepository repo) {
this.repo = repo;
}
public Optional<Person> findOne(String id) {
return repo.findById(id);
}
public List<Pers... | public List<Person> findByLastName(String lastName) {
return repo.findByLastName(lastName);
}
public void create(Person person) {
person.setCreated(DateTime.now());
repo.save(person);
}
public void update(Person person) {
person.setUpdated(DateTime.now());
repo.... | repos\tutorials-master\persistence-modules\spring-data-couchbase-2\src\main\java\com\baeldung\spring\data\couchbase\service\PersonRepositoryService.java | 2 |
请完成以下Java代码 | public void setPA_SLA_Measure_ID (int PA_SLA_Measure_ID)
{
if (PA_SLA_Measure_ID < 1)
set_ValueNoCheck (COLUMNNAME_PA_SLA_Measure_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PA_SLA_Measure_ID, Integer.valueOf(PA_SLA_Measure_ID));
}
/** Get SLA Measure.
@return Service Level Agreement Measure
*/
p... | {
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 ((Boolean)oo).booleanValue();
return "Y".equ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_SLA_Measure.java | 1 |
请完成以下Java代码 | protected Optional<HistoricPlanItemInstance> getPlanItemInstance(List<HistoricPlanItemInstance> planItemInstances, PlanItemDefinition planItemDefinition) {
HistoricPlanItemInstance planItemInstance = null;
for (HistoricPlanItemInstance p : planItemInstances) {
if (p.getPlanItemDefinitionId()... | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getDisplayOrder() {
return displayOrder;
}
public void setDisplayOrder(Integer displayOrder) {
this.displayOrd... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\GetHistoricStageOverviewCmd.java | 1 |
请完成以下Java代码 | public class PrintingSegment
{
private Integer pageFrom;
private Integer pageTo;
private final int initialPageFrom;
private final int initialPageTo;
@Getter
private final int lastPages;
private final String routingType;
@Getter
private final PrinterRoutingId printerRoutingId;
@Getter
private final Hardw... | this.pageFrom = pageFrom;
}
public int getPageFrom()
{
if (pageFrom != null)
{
return pageFrom;
}
return initialPageFrom;
}
public void setPageTo(final int pageTo)
{
this.pageTo = pageTo;
}
public int getPageTo()
{
if (pageTo != null)
{
return pageTo;
}
return initialPageTo;
}
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\printingdata\PrintingSegment.java | 1 |
请完成以下Java代码 | public String listUsers(Model model, UserForm userForm) {
model.addAttribute("userForm", userForm);
return "users";
}
/**
* An interface to represent the form to be used
*
* @author Oliver Gierke
*/
interface UserForm {
String getUsername();
String getPassword();
String getRepeatedPassword();... | rejectIfEmptyOrWhitespace(errors, "password", "user.password.empty");
rejectIfEmptyOrWhitespace(errors, "repeatedPassword", "user.repeatedPassword.empty");
if (!getPassword().equals(getRepeatedPassword())) {
errors.rejectValue("repeatedPassword", "user.password.no-match");
}
try {
userManagement.... | repos\spring-data-examples-main\web\example\src\main\java\example\users\web\UserController.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public BigDecimal getFullPrice() {
return ... | public BigDecimal getReducePrice() {
return reducePrice;
}
public void setReducePrice(BigDecimal reducePrice) {
this.reducePrice = reducePrice;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProductFullReduction.java | 1 |
请完成以下Java代码 | public void setPriority (final int Priority)
{
set_Value (COLUMNNAME_Priority, Priority);
}
@Override
public int getPriority()
{
return get_ValueAsInt(COLUMNNAME_Priority);
}
@Override
public void setProcessed (final boolean Processed)
{
set_Value (COLUMNNAME_Processed, Processed);
}
@Override
pub... | @Override
public java.lang.String getTextMsg()
{
return get_ValueAsString(COLUMNNAME_TextMsg);
}
/**
* WFState AD_Reference_ID=305
* Reference name: WF_Instance State
*/
public static final int WFSTATE_AD_Reference_ID=305;
/** NotStarted = ON */
public static final String WFSTATE_NotStarted = "ON";
/... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_Activity.java | 1 |
请完成以下Java代码 | public void setPJ_Asset_A(final org.compiere.model.I_C_ValidCombination PJ_Asset_A)
{
set_ValueFromPO(COLUMNNAME_PJ_Asset_Acct, org.compiere.model.I_C_ValidCombination.class, PJ_Asset_A);
}
@Override
public void setPJ_Asset_Acct (final int PJ_Asset_Acct)
{
set_Value (COLUMNNAME_PJ_Asset_Acct, PJ_Asset_Acct);
... | public void setPJ_WIP_A(final org.compiere.model.I_C_ValidCombination PJ_WIP_A)
{
set_ValueFromPO(COLUMNNAME_PJ_WIP_Acct, org.compiere.model.I_C_ValidCombination.class, PJ_WIP_A);
}
@Override
public void setPJ_WIP_Acct (final int PJ_WIP_Acct)
{
set_Value (COLUMNNAME_PJ_WIP_Acct, PJ_WIP_Acct);
}
@Override
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Project_Acct.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public R<List<MenuVO>> routes(BladeUser user, Long topMenuId) {
List<MenuVO> list = menuService.routes((user == null || user.getUserId() == 0L) ? null : user.getRoleId(), topMenuId);
return R.data(list);
}
/**
* 前端按钮数据
*/
@GetMapping("/buttons")
@ApiOperationSupport(order = 8)
@Operation(summary = "前端按钮数据... | * 顶部菜单数据
*/
@GetMapping("/top-menu")
@ApiOperationSupport(order = 13)
@Operation(summary = "顶部菜单数据", description = "顶部菜单数据")
public R<List<TopMenu>> topMenu(BladeUser user) {
if (Func.isEmpty(user)) {
return null;
}
List<TopMenu> list = topMenuService.list(Wrappers.<TopMenu>query().lambda().orderByAsc(To... | repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\controller\MenuController.java | 2 |
请完成以下Java代码 | public void setCSVFieldDelimiter (java.lang.String CSVFieldDelimiter)
{
set_Value (COLUMNNAME_CSVFieldDelimiter, CSVFieldDelimiter);
}
/** Get CSV Field Delimiter.
@return CSV Field Delimiter */
@Override
public java.lang.String getCSVFieldDelimiter ()
{
return (java.lang.String)get_Value(COLUMNNAME_CSV... | @Override
public java.lang.String getDecimalSeparator ()
{
return (java.lang.String)get_Value(COLUMNNAME_DecimalSeparator);
}
/** Set Beschreibung.
@param Description Beschreibung */
@Override
public void setDescription (java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java-gen\de\metas\datev\model\X_DATEV_ExportFormat.java | 1 |
请完成以下Java代码 | public OrgId getOrgId()
{
return OrgId.ofRepoId(getMandatoryPropertyAsInt(Env.CTXNAME_AD_Org_ID));
}
public void setWarehouse(final WarehouseId warehouseId, final String warehouseName)
{
setProperty(Env.CTXNAME_M_Warehouse_ID, WarehouseId.toRepoId(warehouseId));
Ini.setProperty(Ini.P_WAREHOUSE, warehouseName... | Ini.setProperty(Ini.P_PRINTER, printerName);
}
public void setAcctSchema(final AcctSchema acctSchema)
{
setProperty("$C_AcctSchema_ID", acctSchema.getId().getRepoId());
setProperty("$C_Currency_ID", acctSchema.getCurrencyId().getRepoId());
setProperty("$HasAlias", acctSchema.getValidCombinationOptions().isUse... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\LoginContext.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ParcelShopDelivery {
protected long parcelShopId;
@XmlElement(required = true)
protected Notification parcelShopNotification;
/**
* Gets the value of the parcelShopId property.
*
*/
public long getParcelShopId() {
return parcelShopId;
}
/**
* Sets... | }
/**
* Sets the value of the parcelShopNotification property.
*
* @param value
* allowed object is
* {@link Notification }
*
*/
public void setParcelShopNotification(Notification value) {
this.parcelShopNotification = value;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\ParcelShopDelivery.java | 2 |
请完成以下Java代码 | public abstract class ToggableSideAction extends AbstractSideAction
{
private boolean toggled;
public ToggableSideAction()
{
super();
}
public ToggableSideAction(final String id)
{
super(id);
}
@Override
public String toString()
{
return ObjectUtils.toString(this);
}
@Override
public SideAction... | @Override
public final void setToggled(boolean toggled)
{
this.toggled = toggled;
}
@Override
public final boolean isToggled()
{
return toggled;
}
@Override
public abstract String getDisplayName();
@Override
public abstract void execute();
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ui\sideactions\model\ToggableSideAction.java | 1 |
请完成以下Java代码 | public Execution getExecution() {
return businessProcess.getExecution();
}
/**
* @see BusinessProcess#getExecution()
*/
/* Makes the id of the current Execution available for injection */
@Produces
@Named
@ExecutionId
public String getExecutionId() {
return businessProcess.getExecutionId();... | * association exists.
*/
/* Makes the current Task available for injection */
@Produces
@Named
public Task getTask() {
return businessProcess.getTask();
}
/**
* Returns the id of the task associated with the current conversation or
* 'null'.
*/
/* Makes the taskId available for ... | repos\camunda-bpm-platform-master\engine-cdi\core\src\main\java\org\camunda\bpm\engine\cdi\CurrentProcessInstance.java | 1 |
请完成以下Java代码 | public void setId() {
this.isIdAttribute = true;
}
/**
* @return the attributeName
*/
public String getAttributeName() {
return attributeName;
}
/**
* @param attributeName the attributeName to set
*/
public void setAttributeName(String attributeName) {
this.attributeName = attribut... | return incomingReferences;
}
/**
* @return the outgoingReferences
*/
public List<Reference<?>> getOutgoingReferences() {
return outgoingReferences;
}
public void registerOutgoingReference(Reference<?> ref) {
outgoingReferences.add(ref);
}
public void registerIncoming(Reference<?> ref) {
... | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\type\attribute\AttributeImpl.java | 1 |
请完成以下Java代码 | public class ClassicPhone {
private final String dialpad;
private final String ringer;
private String otherParts;
@AutoFactory
public ClassicPhone(@Provided String dialpad, @Provided String ringer) {
this.dialpad = dialpad;
this.ringer = ringer;
}
@AutoFactory
public C... | this.otherParts = otherParts;
}
public String getDialpad() {
return dialpad;
}
public String getRinger() {
return ringer;
}
public String getOtherParts() {
return otherParts;
}
} | repos\tutorials-master\google-auto-project\src\main\java\com\baeldung\autofactory\model\ClassicPhone.java | 1 |
请完成以下Java代码 | public class PP_Product_BOMLine
{
/**
* Validates and them updates the BOM line fields from selected product, if any.
*/
@CalloutMethod(columnNames = I_PP_Product_BOMLine.COLUMNNAME_M_Product_ID)
public void onProductChanged(final I_PP_Product_BOMLine bomLine)
{
final int M_Product_ID = bomLine.getM_Product_I... | bomLine.setDescription(product.getDescription());
bomLine.setHelp(product.getHelp());
bomLine.setC_UOM_ID(product.getC_UOM_ID());
}
@CalloutMethod(columnNames = { I_PP_Product_BOMLine.COLUMNNAME_VariantGroup})
public void validateVariantGroup(final I_PP_Product_BOMLine bomLine)
{
final boolean valid = Servic... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\callout\PP_Product_BOMLine.java | 1 |
请完成以下Java代码 | private int getPrecedenceScore(char ch) {
switch (ch) {
case '^':
return 3;
case '*':
case '/':
return 2;
case '+':
case '-':
return 1;
}
return -1;
}
private boolean isOperand(char ch) {
return (ch >=... | for (int i = 0; i < infix.length(); i++) {
char ch = infix.charAt(i);
if (isOperand(ch)) {
result.append(ch);
} else if (ch == '(') {
stack.push(ch);
} else if (ch == ')') {
while (!stack.isEmpty() && stack.peek() != '(') {... | repos\tutorials-master\core-java-modules\core-java-lang-operators-3\src\main\java\com\baeldung\infixpostfix\InfixToPostFixExpressionConversion.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserService {
@Autowired
private UserDao userDao;
public List<User> getByMap(Map<String,Object> map) {
return userDao.getByMap(map);
}
public User getById(Integer id) {
return userDao.getById(id);
}
public User create(User user) {
userDao.create(user);
return user; | }
public User update(User user) {
userDao.update(user);
return user;
}
public int delete(Integer id) {
return userDao.delete(id);
}
public User getByUserName(String userName) {
return userDao.getByUserName(userName);
}
} | repos\springBoot-master\springboot-shiro\src\main\java\com\us\service\UserService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private @Nullable String getGridFsDatabase() {
return this.properties.getGridfs().getDatabase();
}
@Override
public Mono<MongoDatabase> getMongoDatabase(String dbName) throws DataAccessException {
return this.delegate.getMongoDatabase(dbName);
}
@Override
public <T> Optional<Codec<T>> getCodecFor(Cl... | @Override
public Mono<ClientSession> getSession(ClientSessionOptions options) {
return this.delegate.getSession(options);
}
@Override
public ReactiveMongoDatabaseFactory withSession(ClientSession session) {
return this.delegate.withSession(session);
}
@Override
public boolean isTransactionActive()... | repos\spring-boot-4.0.1\module\spring-boot-data-mongodb\src\main\java\org\springframework\boot\data\mongodb\autoconfigure\DataMongoReactiveAutoConfiguration.java | 2 |
请完成以下Java代码 | public class ExecuteActivityForAdhocSubProcessCmd implements Command<Execution>, Serializable {
private static final long serialVersionUID = 1L;
protected String executionId;
protected String activityId;
public ExecuteActivityForAdhocSubProcessCmd(String executionId, String activityId) {
this.... | foundNode = flowNode;
}
}
}
if (foundNode == null) {
throw new ActivitiException("The requested activity with id " + activityId + " can not be enabled");
}
ExecutionEntity activityExecution = Context.getCommandContext()
.getExecutionE... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\ExecuteActivityForAdhocSubProcessCmd.java | 1 |
请完成以下Java代码 | public class ImmutablePair<L, R> implements Entry<L, R>, Serializable, Comparable<ImmutablePair<L, R>> {
/** Serialization version */
private static final long serialVersionUID = -7043970803192830955L;
protected L left;
protected R right;
/**
* @return the left element
*/
public L getLeft() {
r... | * @return negative if this is less, zero if equal, positive if greater
*/
@Override
@SuppressWarnings("unchecked")
public int compareTo(ImmutablePair<L, R> o) {
if (o == null) {
throw new IllegalArgumentException("Pair to compare to must not be null");
}
try {
int leftComparison = compa... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\ImmutablePair.java | 1 |
请完成以下Java代码 | public String getStructure() {
return structureAttribute.getValue(this);
}
public void setStructure(String structureRef) {
structureAttribute.setValue(this, structureRef);
}
// public Import getImport() {
// return importRefAttribute.getReferenceTargetElement(this);
// }
//
// public void setImpor... | definitionTypeAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_DEFINITION_TYPE)
.defaultValue("http://www.omg.org/spec/CMMN/DefinitionType/Unspecified")
.build();
structureAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_STRUCTURE_REF)
.build();
// TODO: The Import does not... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CaseFileItemDefinitionImpl.java | 1 |
请完成以下Java代码 | class ByteArrayDataBlock implements CloseableDataBlock {
private final byte[] bytes;
private final int maxReadSize;
/**
* Create a new {@link ByteArrayDataBlock} backed by the given bytes.
* @param bytes the bytes to use
*/
ByteArrayDataBlock(byte... bytes) {
this(bytes, -1);
}
ByteArrayDataBlock(byte... | @Override
public int read(ByteBuffer dst, long pos) throws IOException {
return read(dst, (int) pos);
}
private int read(ByteBuffer dst, int pos) {
int remaining = dst.remaining();
int length = Math.min(this.bytes.length - pos, remaining);
if (this.maxReadSize > 0 && length > this.maxReadSize) {
length =... | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\zip\ByteArrayDataBlock.java | 1 |
请完成以下Java代码 | public int getC_BPartner_Location_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_Location_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Recurrent Payment.
@param C_RecurrentPayment_ID Recurrent Payment */
@Override
public void setC_RecurrentPayment_ID (int C_Recurren... | else
set_ValueNoCheck (COLUMNNAME_C_RecurrentPayment_ID, Integer.valueOf(C_RecurrentPayment_ID));
}
/** Get Recurrent Payment.
@return Recurrent Payment */
@Override
public int getC_RecurrentPayment_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_RecurrentPayment_ID);
if (ii == null)
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-gen\de\metas\banking\model\X_C_RecurrentPayment.java | 1 |
请完成以下Java代码 | class OperationMethodParameters implements OperationParameters {
private final List<OperationParameter> operationParameters;
/**
* Create a new {@link OperationMethodParameters} instance.
* @param method the source method
* @param parameterNameDiscoverer the parameter name discoverer
*/
OperationMethodPara... | public OperationParameter get(int index) {
return this.operationParameters.get(index);
}
@Override
public Iterator<OperationParameter> iterator() {
return this.operationParameters.iterator();
}
@Override
public Stream<OperationParameter> stream() {
return this.operationParameters.stream();
}
} | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\invoke\reflect\OperationMethodParameters.java | 1 |
请完成以下Java代码 | public class LoginResponse implements Serializable
{
private static final long serialVersionUID = 6515589439074746845L;
private String username;
private String sessionId;
private String hostKey = null;
@Override
public String toString()
{
return "LoginResponse [username=" + username
+ ", sessionId=" + se... | return sessionId;
}
public void setSessionId(String sessionId)
{
this.sessionId = sessionId;
}
public String getHostKey()
{
return hostKey;
}
public void setHostKey(String hostKey)
{
this.hostKey = hostKey;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.api\src\main\java\de\metas\printing\esb\api\LoginResponse.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
FilterInvocation fi = new FilterInvocation(servletRequest, servletResponse, filterChain);
HttpServletResponse response = (HttpServletResponse)servletRespon... | fi.getChain().doFilter(fi.getRequest(), fi.getResponse());
} finally {
super.afterInvocation(token, null);
}
}
@Override
public Class<?> getSecureObjectClass() {
return FilterInvocation.class;
}
@Override
public SecurityMetadataSource obtainSecurityMetadataS... | repos\SpringBootLearning-master (1)\springboot-security-oauth2\src\main\java\com\gf\config\MyFilterSecurityInterceptor.java | 2 |
请完成以下Java代码 | public java.lang.String getConfidentialType ()
{
return (java.lang.String)get_Value(COLUMNNAME_ConfidentialType);
}
/** Set Beschreibung.
@param Description Beschreibung */
@Override
public void setDescription (java.lang.String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get... | @return Type of moderation
*/
@Override
public java.lang.String getModerationType ()
{
return (java.lang.String)get_Value(COLUMNNAME_ModerationType);
}
/** Set Datensatz-ID.
@param Record_ID
Direct internal record ID
*/
@Override
public void setRecord_ID (int Record_ID)
{
if (Record_ID < 0)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Chat.java | 1 |
请完成以下Java代码 | public AdWindowId getAdWindowId()
{
return gridTab.getAdWindowId();
}
@Override
public AdTabId getAdTabId()
{
return AdTabId.ofRepoId(gridTab.getAD_Tab_ID());
}
@Override
public String getTableName()
{
return gridTab.getTableName();
}
@Override
public <T> T getSelectedModel(final Cla... | public int getSingleSelectedRecordId()
{
return gridTab.getRecord_ID();
}
@Override
public SelectionSize getSelectionSize()
{
// backward compatibility
return SelectionSize.ofSize(1);
}
@Override
public <T> IQueryFilter<T> getQueryFilter(@NonNull Class<T> recordClass)
{
return gridTab.cr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\GridTab.java | 1 |
请完成以下Java代码 | public DocumentId getId()
{
return documentId;
}
@Override
public IViewRowType getType()
{
return rowType;
}
@Override
public DocumentPath getDocumentPath()
{
return documentPath;
}
/**
* Return false, because with true, all rows are "grayed" out. This does not mean that the rows are editable.
*... | @Override
public ViewRowFieldNameAndJsonValues getFieldNameAndJsonValues()
{
return values.get(this);
}
public DocumentZoomIntoInfo getZoomIntoInfo(@NonNull final String fieldName)
{
if (FIELDNAME_M_Product_ID.equals(fieldName))
{
return lookups.getZoomInto(productId);
}
else
{
throw new Adempie... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\MaterialCockpitRow.java | 1 |
请完成以下Java代码 | private ConfigurableEnvironment createEnvironment(Class<? extends ConfigurableEnvironment> type) {
try {
Constructor<? extends ConfigurableEnvironment> constructor = type.getDeclaredConstructor();
ReflectionUtils.makeAccessible(constructor);
return constructor.newInstance();
}
catch (Exception ex) {
r... | return false;
}
}
private void removePropertySources(MutablePropertySources propertySources, boolean isServletEnvironment) {
Set<String> names = new HashSet<>();
for (PropertySource<?> propertySource : propertySources) {
names.add(propertySource.getName());
}
for (String name : names) {
if (!isServle... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\EnvironmentConverter.java | 1 |
请完成以下Java代码 | public void setLongValue(Long longValue) {
throw new UnsupportedOperationException("Not supported to set long value");
}
@Override
public Double getDoubleValue() {
JsonNode doubleNode = node.path("doubleValue");
if (doubleNode.isNumber()) {
re... | }
@Override
public void setBytes(byte[] bytes) {
throw new UnsupportedOperationException("Not supported to set bytes");
}
@Override
public Object getCachedValue() {
throw new UnsupportedOperationException("Not supported to set get cached value");
... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\delete\BatchDeleteCaseConfig.java | 1 |
请完成以下Java代码 | public final void setErrorParametersConverter(
Converter<OAuth2Error, Map<String, String>> errorParametersConverter) {
Assert.notNull(errorParametersConverter, "errorParametersConverter cannot be null");
this.errorParametersConverter = errorParametersConverter;
}
/**
* A {@link Converter} that converts the ... | */
private static class OAuth2ErrorParametersConverter implements Converter<OAuth2Error, Map<String, String>> {
@Override
public Map<String, String> convert(OAuth2Error oauth2Error) {
Map<String, String> parameters = new HashMap<>();
parameters.put(OAuth2ParameterNames.ERROR, oauth2Error.getErrorCode());
... | repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\http\converter\OAuth2ErrorHttpMessageConverter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class QueryVariable {
private String name;
private String operation;
private Object value;
private String type;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@ApiModelProperty(hidden = true)
public Query... | public enum QueryVariableOperation {
EQUALS("equals"), NOT_EQUALS("notEquals"), EQUALS_IGNORE_CASE("equalsIgnoreCase"), NOT_EQUALS_IGNORE_CASE("notEqualsIgnoreCase"), LIKE("like"), LIKE_IGNORE_CASE("likeIgnoreCase"), GREATER_THAN("greaterThan"), GREATER_THAN_OR_EQUALS(
"greaterThanOrEquals"), LE... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\engine\variable\QueryVariable.java | 2 |
请完成以下Java代码 | public PrintingData onlyWithType(@NonNull final OutputType outputType)
{
final ImmutableList<PrintingSegment> filteredSegments = segments.stream()
.filter(segment -> segment.isMatchingOutputType(outputType))
.collect(ImmutableList.toImmutableList());
return toBuilder()
.clearSegments()
.segments(f... | .clearSegments()
.segments(filteredSegments)
.adjustSegmentPageRanges(false)
.build();
}
public boolean hasSegments() {return !getSegments().isEmpty();}
public int getSegmentsCount() {return getSegments().size();}
public ImmutableSet<String> getPrinterNames()
{
return segments.stream()
.map(s... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\printingdata\PrintingData.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8088
spring:
redis:
database: 0
port: 6379
host: 127.0.0.1
password: 123456
timeout=3000:
jedis:
pool:
max-active: 8
max-idle: 8
max-wait: -1
min-idle: 0
datasource:
url: jdbc:mysql://localhost:3306/demo?useSSL=false&useUnicode=true&c... | ver
jpa:
database: mysql
show-sql: true
hibernate:
ddl-auto: update
properties:
hibernate:
dialect: org.hibernate.dialect.MySQL5Dialect
thymeleaf:
cache: false
mode: HTML | repos\springboot-demo-master\shiro\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public CalculateTaxResult calculateTax(final BigDecimal amount, final boolean taxIncluded, final int scale)
{
// Null Tax
if (rate.signum() == 0)
{
return CalculateTaxResult.ZERO;
}
BigDecimal multiplier = rate.divide(Env.ONEHUNDRED, 12, RoundingMode.HALF_UP);
final BigDecimal taxAmt;
final BigDecim... | reverseChargeAmt = BigDecimal.ZERO;
}
final BigDecimal taxAmtFinal = taxAmt.setScale(scale, RoundingMode.HALF_UP);
final BigDecimal reverseChargeTaxAmtFinal = reverseChargeAmt.setScale(scale, RoundingMode.HALF_UP);
log.debug("calculateTax: amount={} (incl={}, multiplier={}, scale={}) = {} [{}] / reverse charg... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\tax\api\Tax.java | 1 |
请完成以下Java代码 | public static MigrationPlanDto from(MigrationPlan migrationPlan) {
MigrationPlanDto dto = new MigrationPlanDto();
VariableMap variables = migrationPlan.getVariables();
if (variables != null) {
dto.setVariables(VariableValueDto.fromMap(variables));
}
dto.setSourceProcessDefinitionId(migration... | if (migrationPlanDto.getInstructions() != null) {
for (MigrationInstructionDto migrationInstructionDto : migrationPlanDto.getInstructions()) {
MigrationInstructionBuilder migrationInstructionBuilder = migrationPlanBuilder.mapActivities(migrationInstructionDto.getSourceActivityIds().get(0), migrationInstru... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\migration\MigrationPlanDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class FactAcctLogService
{
private static final String SYSCONFIG_IsUseLegacyProcessor = "FactAcctLogService.useLegacyProcessor";
private final ISysConfigBL sysConfigBL = Services.get(ISysConfigBL.class);
private final ITrxManager trxManager = Services.get(ITrxManager.class);
public FactAcctLogProcessResult... | }
else
{
final int count = DB.getSQLValueEx(ITrx.TRXNAME_ThreadInherited, "SELECT de_metas_acct.fact_acct_log_process(?)", limit.toInt());
return FactAcctLogProcessResult.builder()
.iterations(1)
.processedLogRecordsCount(count)
.build();
}
}
private boolean isUseLegacyProcessor()
{
ret... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\aggregation\FactAcctLogService.java | 2 |
请完成以下Java代码 | public class UpdateProcessInstancesSuspensionStateBuilderImpl implements UpdateProcessInstancesSuspensionStateBuilder {
protected List<String> processInstanceIds;
protected ProcessInstanceQuery processInstanceQuery;
protected HistoricProcessInstanceQuery historicProcessInstanceQuery;
protected CommandExecutor ... | public void activate() {
commandExecutor.execute(new UpdateProcessInstancesSuspendStateCmd(commandExecutor, this, false));
}
@Override
public Batch suspendAsync() {
return commandExecutor.execute(new UpdateProcessInstancesSuspendStateBatchCmd(commandExecutor, this, true));
}
@Override
public Batch... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\UpdateProcessInstancesSuspensionStateBuilderImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void run(String... args) throws Exception {
UserDTO user = userRpcService.get(1);
logger.info("[run][发起一次 Dubbo RPC 请求,获得用户为({})]", user);
}
}
@Component
public class UserRpcServiceTest02 implements CommandLineRunner {
private final Logger logger = LoggerFac... | }
@Component
public class UserRpcServiceTest03 implements CommandLineRunner {
private final Logger logger = LoggerFactory.getLogger(getClass());
@Resource
private UserRpcService userRpcService;
@Override
public void run(String... args) {
// 添加用户
... | repos\SpringBoot-Labs-master\lab-30\lab-30-dubbo-xml-demo\user-rpc-service-consumer\src\main\java\cn\iocoder\springboot\lab30\rpc\ConsumerApplication.java | 2 |
请完成以下Java代码 | public long findTaskCountByNativeQuery(Map<String, Object> parameterMap) {
return (Long) getDbSqlSession().selectOne("selectTaskCountByNativeQuery", parameterMap);
}
@SuppressWarnings("unchecked")
public List<Task> findTasksByParentTaskId(String parentTaskId) {
return getDbSqlSession().sele... | } else if (cascade) {
Context
.getCommandContext()
.getHistoricTaskInstanceEntityManager()
.deleteHistoricTaskInstanceById(taskId);
}
}
public void updateTaskTenantIdForDeployment(String deploymentId, String newTenantId) {
... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\TaskEntityManager.java | 1 |
请完成以下Java代码 | public class SimpleUuidConsumer {
private static final Logger log = LoggerFactory.getLogger(SimpleUuidConsumer.class);
private final Channel channel;
private final String queue;
public SimpleUuidConsumer(Channel channel, String queue) {
this.channel = channel;
this.queue = queue;
... | .getDeliveryTag();
process(message, deliveryTag);
}, cancelledTag -> {
log.warn("cancelled: #{}", cancelledTag);
});
}
private void process(String message, long deliveryTag) {
try {
UUID.fromString(message);
log.debug("* [#{}] processed: ... | repos\tutorials-master\messaging-modules\rabbitmq\src\main\java\com\baeldung\consumerackspubconfirms\SimpleUuidConsumer.java | 1 |
请完成以下Java代码 | public String getApplicationPath() {
return applicationPath;
}
public void setApplicationPath(String applicationPath) {
this.applicationPath = sanitizeApplicationPath(applicationPath);
}
protected String sanitizeApplicationPath(String applicationPath) {
if (applicationPath == null || applicationPa... | public HeaderSecurityProperties getHeaderSecurity() {
return headerSecurity;
}
public void setHeaderSecurity(HeaderSecurityProperties headerSecurity) {
this.headerSecurity = headerSecurity;
}
public AuthenticationProperties getAuth() {
return auth;
}
public void setAuth(AuthenticationProperti... | repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\WebappProperty.java | 1 |
请完成以下Java代码 | public int getUser2_ID()
{
return get_ValueAsInt(COLUMNNAME_User2_ID);
}
@Override
public void setVoiceAuthCode (final @Nullable java.lang.String VoiceAuthCode)
{
set_Value (COLUMNNAME_VoiceAuthCode, VoiceAuthCode);
}
@Override
public java.lang.String getVoiceAuthCode()
{
return get_ValueAsString(COL... | }
@Override
public void setWriteOffAmt (final @Nullable BigDecimal WriteOffAmt)
{
set_Value (COLUMNNAME_WriteOffAmt, WriteOffAmt);
}
@Override
public BigDecimal getWriteOffAmt()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_WriteOffAmt);
return bd != null ? bd : BigDecimal.ZERO;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Payment.java | 1 |
请完成以下Java代码 | public User ofRecord(@NonNull final I_AD_User userRecord)
{
final IUserBL userBL = Services.get(IUserBL.class);
final IBPartnerBL bPartnerBL = Services.get(IBPartnerBL.class);
final Language userLanguage = Language.asLanguage(userRecord.getAD_Language());
final Language bpartnerLanguage = bPartnerBL.getLangua... | {
userRecord = newInstance(I_AD_User.class);
}
else
{
userRecord = load(user.getId().getRepoId(), I_AD_User.class);
}
userRecord.setC_BPartner_ID(BPartnerId.toRepoId(user.getBpartnerId()));
userRecord.setName(user.getName());
userRecord.setFirstname(user.getFirstName());
userRecord.setLastname(use... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\UserRepository.java | 1 |
请完成以下Java代码 | protected String getDefaultMessage() {
return DEFAULT_MESSAGE;
}
public void setRestTemplate(RestTemplate restTemplate) {
this.restTemplate = restTemplate;
}
public URI getUrl() {
return url;
}
public void setUrl(URI url) {
this.url = url;
}
@Nullable | public String getAuthToken() {
return authToken;
}
public void setAuthToken(@Nullable String authToken) {
this.authToken = authToken;
}
@Nullable
public String getRoomId() {
return roomId;
}
public void setRoomId(@Nullable String roomId) {
this.roomId = roomId;
}
} | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\WebexNotifier.java | 1 |
请完成以下Java代码 | public String getSectionCode() {
return sectionCode;
}
/**
* Sets the value of the sectionCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSectionCode(String value) {
this.sectionCode = value;
}
... | * @return
* possible object is
* {@link Long }
*
*/
public long getServiceAttributes() {
if (serviceAttributes == null) {
return 0L;
} else {
return serviceAttributes;
}
}
/**
* Sets the value of the serviceAttributes pr... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\RecordServiceType.java | 1 |
请完成以下Java代码 | public void setEntityType (String EntityType)
{
set_Value (COLUMNNAME_EntityType, EntityType);
}
/** Get Entity Type.
@return Dictionary Entity Type; Determines ownership and synchronization
*/
public String getEntityType ()
{
return (String)get_Value(COLUMNNAME_EntityType);
}
/** Set Error Msg.
@... | 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 ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Index_Table.java | 1 |
请完成以下Java代码 | protected final PickingSlotView getView()
{
return PickingSlotView.cast(super.getView());
}
protected PickingSlotView getPickingSlotView()
{
return getView();
}
@Override
protected final PickingSlotRow getSingleSelectedRow()
{
return PickingSlotRow.cast(super.getSingleSelectedRow());
}
protected fina... | _shipmentSchedule = shipmentSchedule = shipmentSchedulesRepo.getById(shipmentScheduleId, I_M_ShipmentSchedule.class);
}
return shipmentSchedule;
}
protected final I_C_UOM getCurrentShipmentScheuduleUOM()
{
final I_M_ShipmentSchedule shipmentSchedule = getCurrentShipmentSchedule();
return shipmentScheduleBL.... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\process\PickingSlotViewBasedProcess.java | 1 |
请完成以下Java代码 | public class MyCustomConvertor implements CustomConverter {
@Override
public Object convert(Object dest, Object source, Class<?> arg2, Class<?> arg3) {
if (source == null) {
return null;
}
if (source instanceof Personne3) {
Personne3 person = (Personne3) source;
... | try {
date = format.parse(person.getDtob());
} catch (ParseException e) {
throw new MappingException("Converter MyCustomConvertor " + "used incorrectly:" + e.getMessage());
}
long timestamp = date.getTime();
return new Personne3(person.get... | repos\tutorials-master\libraries-data\src\main\java\com\baeldung\dozer\MyCustomConvertor.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.