instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public static KeyValues valueOf(String s) {
String[] tokens = StringUtils.tokenizeToStringArray(s, ",", true, true);
List<KeyValue> parsedKeyValues = Arrays.stream(tokens).map(KeyValue::valueOf).toList();
KeyValues keyValues = new KeyValues();
keyValues.setKeyValues(parsedKeyValues);
return keyValues;
}
pu... | }
public String getValue() {
return value;
}
@Override
public String toString() {
return new ToStringCreator(this).append("name", key).append("value", value).toString();
}
public static KeyValue valueOf(String s) {
String[] tokens = StringUtils.tokenizeToStringArray(s, ":", true, true);
Asser... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\common\KeyValues.java | 1 |
请完成以下Java代码 | public boolean updateAssignedCustomer(Customer customer) {
ShortCustomerInfo customerInfo = customer.toShortCustomerInfo();
if (this.assignedCustomers != null && this.assignedCustomers.contains(customerInfo)) {
this.assignedCustomers.remove(customerInfo);
this.assignedCustomers.a... | result = prime * result + ((title == null) ? 0 : title.hashCode());
return result;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
DashboardInfo t... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\DashboardInfo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ImmutableSet<ShipmentScheduleId> generateSchedules(@NonNull final OrderId orderId)
{
final I_C_Order order = orderDAO.getById(orderId);
if (!order.getDocStatus().equals(DOCSTATUS_Completed))
{
Loggables.withLogger(logger, Level.INFO).addLog("Returning! Order not COMPLETED!");
return ImmutableSet.of... | final boolean propagateAsyncIdsToShipmentSchduleWPs)
{
final Supplier<IEnqueueResult> action = () -> olCandToOrderEnqueuer.enqueueBatch(asyncBatchId, propagateAsyncIdsToShipmentSchduleWPs);
asyncBatchService.executeBatch(action, asyncBatchId);
}
private void generateMissingShipmentSchedulesFromOrder(@NonNull f... | repos\metasfresh-new_dawn_uat\backend\de-metas-salesorder\src\main\java\de\metas\salesorder\service\OrderService.java | 2 |
请完成以下Java代码 | public Void execute(CommandContext commandContext) {
commandContext.getAuthorizationManager().checkCamundaAdminOrPermission(CommandChecker::checkDeleteMetrics);
writeUserOperationLog(commandContext);
if(timestamp == null && reporter == null) {
commandContext.getMeterLogManager()
.deleteAll();... | protected void writeUserOperationLog(CommandContext commandContext) {
List<PropertyChange> propertyChanges = new ArrayList<>();
if (timestamp != null) {
propertyChanges.add(new PropertyChange("timestamp", null, timestamp));
}
if (reporter != null) {
propertyChanges.add(new PropertyChange("re... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\DeleteMetricsCmd.java | 1 |
请完成以下Java代码 | public TransportProtos.ProvisionDeviceRequestMsg convertToProvisionRequestMsg(UUID sessionId, Request inbound) throws AdaptorException {
try {
return ProtoConverter.convertToProvisionRequestMsg(inbound.getPayload());
} catch (InvalidProtocolBufferException ex) {
throw new Adaptor... | }
} else {
if (msg.getClientAttributeListCount() == 0 && msg.getSharedAttributeListCount() == 0) {
return new Response(CoAP.ResponseCode.NOT_FOUND);
} else {
Response response = new Response(CoAP.ResponseCode.CONTENT);
response.setPayload(m... | repos\thingsboard-master\common\transport\coap\src\main\java\org\thingsboard\server\transport\coap\adaptors\ProtoCoapAdaptor.java | 1 |
请完成以下Java代码 | private static Map<String, String> getSynchronizedMap() {
Map<String, String> synchronizedMap = Collections.synchronizedMap(new IdentityHashMap<String, String>());
return synchronizedMap;
}
private static IdentityHashMap<String, String> createFromAnotherMap(Map<String, String> otherMap) {
... | }
public static void addAllValues(IdentityHashMap<String, String> identityHashMap, Map<String, String> otherMap) {
identityHashMap.putAll(otherMap);
}
public static IdentityHashMap<String, String> createWithSimpleData() {
IdentityHashMap<String, String> identityHashMap = new IdentityHashMa... | repos\tutorials-master\core-java-modules\core-java-collections-maps-5\src\main\java\com\baeldung\map\identity\IdentityHashMapDemonstrator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected Kryo initialValue() {
final Kryo kryo = new Kryo();
kryo.register(Foo.class, 1);
return kryo;
}
};
public KryoHttpMessageConverter() {
super(KRYO);
}
@Override
protected boolean supports(final Class<?> clazz) {
return Object.class.isAssignableFrom(clazz);
}
@Override
protected Object... | return kryoThreadLocal.get().readClassAndObject(input);
}
@Override
protected void writeInternal(final Object object,
final HttpOutputMessage outputMessage) throws IOException {
final Output output = new Output(outputMessage.getBody());
kryoThreadLocal.get().writeClassAndObject(output, object);
output.flus... | repos\tutorials-master\spring-web-modules\spring-rest-simple\src\main\java\com\baeldung\config\converter\KryoHttpMessageConverter.java | 2 |
请完成以下Java代码 | public static class OpenIncludedViewAction implements ResultAction
{
@NonNull
ViewId viewId;
ViewProfileId profileId;
}
@lombok.Value(staticConstructor = "of")
public static class CreateAndOpenIncludedViewAction implements ResultAction
{
@NonNull
CreateViewRequest createViewRequest;
}
public static f... | @lombok.Builder
public static class SelectViewRowsAction implements ResultAction
{
@NonNull ViewId viewId;
@NonNull DocumentIdsSelection rowIds;
}
@lombok.Value
@lombok.Builder
public static class DisplayQRCodeAction implements ResultAction
{
@NonNull String code;
}
@lombok.Value
@lombok.Builder
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\ProcessInstanceResult.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class FreeMarkerReactiveWebConfiguration extends AbstractFreeMarkerConfiguration {
FreeMarkerReactiveWebConfiguration(FreeMarkerProperties properties,
ObjectProvider<FreeMarkerVariablesCustomizer> variablesCustomizers) {
super(properties, variablesCustomizers);
}
@Bean
@ConditionalOnMissingBean(FreeMarkerCon... | freemarker.template.Configuration freeMarkerConfiguration(FreeMarkerConfig configurer) {
return configurer.getConfiguration();
}
@Bean
@ConditionalOnMissingBean(name = "freeMarkerViewResolver")
FreeMarkerViewResolver freeMarkerViewResolver() {
FreeMarkerViewResolver resolver = new FreeMarkerViewResolver();
r... | repos\spring-boot-4.0.1\module\spring-boot-freemarker\src\main\java\org\springframework\boot\freemarker\autoconfigure\FreeMarkerReactiveWebConfiguration.java | 2 |
请完成以下Java代码 | public Date getRecentOrderTime() {
return recentOrderTime;
}
public void setRecentOrderTime(Date recentOrderTime) {
this.recentOrderTime = recentOrderTime;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleN... | sb.append(", commentCount=").append(commentCount);
sb.append(", returnOrderCount=").append(returnOrderCount);
sb.append(", loginCount=").append(loginCount);
sb.append(", attendCount=").append(attendCount);
sb.append(", fansCount=").append(fansCount);
sb.append(", collectProductCo... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsMemberStatisticsInfo.java | 1 |
请完成以下Java代码 | public class LocalInstrumentSEPA {
@XmlElement(name = "Cd", required = true)
protected String cd;
/**
* Gets the value of the cd property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCd() {
return cd; | }
/**
* Sets the value of the cd property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCd(String value) {
this.cd = value;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_008_003_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_008_003_02\LocalInstrumentSEPA.java | 1 |
请完成以下Java代码 | public Color deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
{
final JsonObject jo = json.getAsJsonObject();
final int r = jo.get("r").getAsInt();
final int g = jo.get("g").getAsInt();
final int b = jo.get("b").getAsInt();
final int a = jo.get("... | }
@Override
public VEditorDialogButtonAlign deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
{
final JsonObject jo = json.getAsJsonObject();
final String value = jo.get("value").getAsString();
try
{
return VEditorDialogButtonAlign.valueOf(... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\UIDefaultsSerializer.java | 1 |
请完成以下Java代码 | public void assertNotEmpty()
{
if (list.isEmpty())
{
throw new AdempiereException("candidates list shall not be empty");
}
}
public boolean isEmpty() {return list.isEmpty();}
@Override
@NonNull
public Iterator<Candidate> iterator() {return list.iterator();}
@Override
public void forEach(@NonNull fin... | {
assertNotEmpty();
return CollectionUtils.extractSingleElement(list, Candidate::getBusinessCase);
}
public Candidate getSingleCandidate()
{
return CollectionUtils.singleElement(list);
}
public Candidate getSingleSupplyCandidate()
{
return CollectionUtils.singleElement(list, candidate -> CandidateType.e... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\candidate\CandidatesGroup.java | 1 |
请完成以下Java代码 | protected void addAuthorizationsFromIterator(
CommandContext commandContext,
List<String> expressions,
ProcessDefinitionEntity processDefinition,
ExpressionType expressionType
) {
if (expressions != null) {
Iterator<String> iterator = expressions.iterator();
... | public TimerManager getTimerManager() {
return timerManager;
}
public void setTimerManager(TimerManager timerManager) {
this.timerManager = timerManager;
}
public EventSubscriptionManager getEventSubscriptionManager() {
return eventSubscriptionManager;
}
public void se... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\deployer\BpmnDeploymentHelper.java | 1 |
请完成以下Java代码 | public class MElementValueTreeSupport extends DefaultPOTreeSupport
{
private ChartOfAccountsService _chartOfAccountsService; // lazy
@Override
public int getAD_Tree_ID(final PO po)
{
if (!InterfaceWrapperHelper.isInstanceOf(po, I_C_ElementValue.class))
{
return -1;
}
final I_C_ElementValue ev = Interfac... | return "0=1";
}
else
{
return I_C_ElementValue.COLUMNNAME_C_Element_ID + "=" + chartOfAccountsId.getRepoId();
}
}
private Optional<ChartOfAccountsId> getChartOfAccountsId(final MTree_Base tree)
{
return chartOfAccountsService()
.getByTreeId(AdTreeId.ofRepoId(tree.getAD_Tree_ID()))
.map(ChartOfA... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\elementvalue\MElementValueTreeSupport.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public HEADERXlief getHEADER() {
return header;
}
/**
* Sets the value of the header property.
*
* @param value
* allowed object is
* {@link HEADERXlief }
*
*/
public void setHEADER(HEADERXlief value) {
this.header = value;
}
/**
... | }
/**
* Sets the value of the trailr property.
*
* @param value
* allowed object is
* {@link TRAILR }
*
*/
public void setTRAILR(TRAILR value) {
this.trailr = value;
}
} | 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\Xlief4H.java | 2 |
请完成以下Java代码 | public CreditDebitCode getCdtDbtInd() {
return cdtDbtInd;
}
/**
* Sets the value of the cdtDbtInd property.
*
* @param value
* allowed object is
* {@link CreditDebitCode }
*
*/
public void setCdtDbtInd(CreditDebitCode value) {
this.cdtDbtInd ... | * This is why there is not a <CODE>set</CODE> method for the avlbty property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAvlbty().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link C... | 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\CashBalance3.java | 1 |
请完成以下Java代码 | public UUID getId() {
return id;
}
public void setId(UUID id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getAuthor() {
return author;
}
public v... | return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getPublisher() {
return publisher;
}
public void setPublisher(String publisher) {
this.publisher = publisher;
}
} | repos\tutorials-master\persistence-modules\java-cassandra\src\main\java\com\baeldung\cassandra\java\client\domain\Book.java | 1 |
请完成以下Java代码 | private List<BpmnModel> parseSubModels(
FlowElement subElement,
Map<String, GraphicInfo> locations,
Map<String, List<GraphicInfo>> flowLocations,
Map<String, GraphicInfo> labelLocations
) {
List<BpmnModel> subModels = new ArrayList<BpmnModel>();
BpmnModel subModel = n... | } else {
// do not include data objects because they do not have a corresponding shape in the BPMNDI data
if (!(element instanceof DataObject) && null != locations.get(elementId)) {
// must be a shape
subModel.getLocationMap().put(elementId, locati... | repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\SubprocessXMLConverter.java | 1 |
请完成以下Java代码 | public int getCleanInstancesEndedAfterNumberOfDays() {
return (int) cleanInstancesEndedAfter.toDays();
}
/**
* @deprecated use {@link #setCleanInstancesEndedAfter(Duration)} instead
*/
@Deprecated
public ProcessEngineConfiguration setCleanInstancesEndedAfterNumberOfDays(int cleanInsta... | }
public HistoryCleaningManager getHistoryCleaningManager() {
return historyCleaningManager;
}
public ProcessEngineConfiguration setHistoryCleaningManager(HistoryCleaningManager historyCleaningManager) {
this.historyCleaningManager = historyCleaningManager;
return this;
}
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\ProcessEngineConfiguration.java | 1 |
请完成以下Java代码 | public void setC_Doc_Responsible_ID (int C_Doc_Responsible_ID)
{
if (C_Doc_Responsible_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Doc_Responsible_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_Doc_Responsible_ID, Integer.valueOf(C_Doc_Responsible_ID));
}
/** Get Document Responsible.
@return Document Resp... | */
@Override
public void setRecord_ID (int Record_ID)
{
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 ()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\workflow\model\X_C_Doc_Responsible.java | 1 |
请完成以下Java代码 | public class RcCaptchaValidateFilter extends AccessControlFilter {
private boolean captchaEbabled = true;// 是否开启验证码支持
private String captchaParam = "captchaCode";// 前台提交的验证码参数名
private String failureKeyAttribute = "shiroLoginFailure"; // 验证码验证失败后存储到的属性名
public void setCaptchaEbabled(boolean captchaEbabled) {
... | if (captchaEbabled == false || !"post".equalsIgnoreCase(httpServletRequest.getMethod())) {
return true;
}
// 3、此时是表单提交,验证验证码是否正确
// 获取页面提交的验证码
String submitCaptcha = httpServletRequest.getParameter(captchaParam);
// 获取session中的验证码
String captcha = (String) httpServletRequest.getSession().getAttribute("rc... | repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\permission\shiro\filter\RcCaptchaValidateFilter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ExtendedPeriodType {
@XmlElement(name = "Quantity")
protected ConditionalUnitType quantity;
@XmlElement(name = "StartDate")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar startDate;
@XmlElement(name = "EndDate")
@XmlSchemaType(name = "dateTime")
protected ... | this.startDate = value;
}
/**
* Gets the value of the endDate property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getEndDate() {
return endDate;
}
/**
* Sets the value of the endDa... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ExtendedPeriodType.java | 2 |
请完成以下Java代码 | public String getTenantId() {
return tenantId;
}
public long getPriority() {
return priority;
}
public String getBusinessKey() {
return businessKey;
}
public static ExternalTaskDto fromExternalTask(ExternalTask task) {
ExternalTaskDto dto = new ExternalTaskDto();
dto.activityId = task... | dto.createTime = task.getCreateTime();
dto.processDefinitionId = task.getProcessDefinitionId();
dto.processDefinitionKey = task.getProcessDefinitionKey();
dto.processDefinitionVersionTag = task.getProcessDefinitionVersionTag();
dto.processInstanceId = task.getProcessInstanceId();
dto.retries = task.... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\externaltask\ExternalTaskDto.java | 1 |
请完成以下Java代码 | default Date getStartTime() {
return getCreateTime();
}
Date getCreateTime();
Date getLastAvailableTime();
Date getLastUnavailableTime();
Date getLastEnabledTime();
Date getLastDisabledTime();
Date getLastStartedTime();
Date getLastSuspendedTime();
Date getCompletedTime();
... | String getAssignee();
String getCompletedBy();
String getReferenceId();
String getReferenceType();
boolean isCompletable();
String getEntryCriterionId();
String getExitCriterionId();
String getFormKey();
String getExtraValue();
String getTenantId();
Map<String, Object> getPlanIte... | repos\flowable-engine-main\modules\flowable-cmmn-api\src\main\java\org\flowable\cmmn\api\runtime\PlanItemInstance.java | 1 |
请完成以下Java代码 | public class DmnEngineMetricCollectorWrapper implements DmnEngineMetricCollector, DmnDecisionEvaluationListener {
protected final DmnEngineMetricCollector collector;
public DmnEngineMetricCollectorWrapper(DmnEngineMetricCollector collector) {
this.collector = collector;
}
@Override
public void notify(D... | // ignore other evaluation events since the collector is implemented as decision table evaluation listener
}
@Override
public long getExecutedDecisionInstances() {
return collector.getExecutedDecisionInstances();
}
@Override
public long getExecutedDecisionElements() {
return collector.getExecutedD... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\metrics\DmnEngineMetricCollectorWrapper.java | 1 |
请完成以下Java代码 | public void setTitle(String title)
{
if (title != null)
{
final int pos = title.indexOf('&');
if (pos != -1 && title.length() > pos) // We have a nemonic
{
final int mnemonic = title.toUpperCase().charAt(pos + 1);
if (mnemonic != ' ')
{
title = title.substring(0, pos) + title.substring(po... | {
Object source = e.getSource();
while (source != null)
{
if (source instanceof Window)
{
((Window)source).dispose();
return;
}
if (source instanceof Container)
{
source = ((Container)source).getParent();
}
else
{
source = null;
}
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CDialog.java | 1 |
请完成以下Java代码 | public void setAD_Session_ID (int AD_Session_ID)
{
if (AD_Session_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_Session_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_Session_ID, Integer.valueOf(AD_Session_ID));
}
@Override
public int getAD_Session_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Session_ID);... | public void setC_Print_Package_ID (int C_Print_Package_ID)
{
if (C_Print_Package_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Print_Package_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_Print_Package_ID, Integer.valueOf(C_Print_Package_ID));
}
@Override
public int getC_Print_Package_ID()
{
return get_Va... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_C_Print_Package.java | 1 |
请完成以下Java代码 | public List<Job> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
return commandContext
.getJobManager()
.findJobsByQueryCriteria(this, page);
}
@Override
public List<ImmutablePair<String, String>> executeDeploymentIdMappingsList(CommandContext commandContext) {
che... | return executionId;
}
public boolean getRetriesLeft() {
return retriesLeft;
}
public boolean getExecutable() {
return executable;
}
public Date getNow() {
return ClockUtil.getCurrentTime();
}
public boolean isWithException() {
return withException;
}
public String getExceptionMessage... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\JobQueryImpl.java | 1 |
请完成以下Java代码 | protected boolean afterSave(boolean newRecord, boolean success) {
if (!success)
return false;
return updateParent();
}
@Override
protected boolean afterDelete(boolean success) {
if (!success)
return false;
return updateParent();
}
/**
* Update parent flags
* @return true if success
*/
privat... | return no == 1;
}
/**
* String Representation
* @return info
*/
@Override
public String toString ()
{
StringBuffer sb = new StringBuffer ("MAlertRule[");
sb.append(get_ID())
.append("-").append(getName())
.append(",Valid=").append(isValid())
.append(",").append(getSql(false));
sb.append ("]"... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MAlertRule.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setConcurrency(Integer concurrency) {
this.concurrency = concurrency;
}
@Override
protected ConcurrentMessageListenerContainer<K, V> createContainerInstance(KafkaListenerEndpoint endpoint) {
TopicPartitionOffset[] topicPartitions = endpoint.getTopicPartitionsToAssign();
if (topicPartitions != null... | @Override
protected void initializeContainer(ConcurrentMessageListenerContainer<K, V> instance,
KafkaListenerEndpoint endpoint) {
super.initializeContainer(instance, endpoint);
Integer conc = endpoint.getConcurrency();
if (conc != null) {
instance.setConcurrency(conc);
}
else if (this.concurrency != n... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\config\ConcurrentKafkaListenerContainerFactory.java | 2 |
请完成以下Java代码 | public boolean isDefaultPO ()
{
Object oo = get_Value(COLUMNNAME_IsDefaultPO);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Standard (Verkauf).
@param IsDefaultSO
Default value for sales transactions... | return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
@Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the ... | repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java-gen\de\metas\aggregation\model\X_C_Aggregation.java | 1 |
请完成以下Java代码 | public class WEBUI_M_HU_ReturnFromCustomer extends HUEditorProcessTemplate implements IProcessPrecondition
{
private final ReturnsServiceFacade returnsServiceFacade = SpringContextHolder.instance.getBean(ReturnsServiceFacade.class);
private ImmutableList<I_M_HU> _selectedHUsToReturn = null;
private MultiCustomerHUR... | private Stream<HUEditorRow> streamEligibleSelectedRows()
{
return streamSelectedRows(ELIGIBLE_ROWS_FILTER);
}
private ImmutableList<I_M_HU> getSelectedHUsToReturn()
{
ImmutableList<I_M_HU> selectedHUsToReturn = this._selectedHUsToReturn;
if (selectedHUsToReturn == null)
{
final ImmutableSet<HuId> huIds ... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_ReturnFromCustomer.java | 1 |
请完成以下Java代码 | public boolean isCompleted(final I_C_RfQResponse rfqResponse)
{
return X_C_RfQResponse.DOCSTATUS_Completed.equals(rfqResponse.getDocStatus());
}
@Override
public boolean isCompleted(final I_C_RfQResponseLine rfqResponseLine)
{
return X_C_RfQResponseLine.DOCSTATUS_Completed.equals(rfqResponseLine.getDocStatus(... | {
return "@C_RfQResponse_ID@ ?";
}
return "@C_RfQResponse_ID@ #" + rfqResponse.getName();
}
@Override
public void updateQtyPromisedAndSave(final I_C_RfQResponseLine rfqResponseLine)
{
final BigDecimal qtyPromised = Services.get(IRfqDAO.class).calculateQtyPromised(rfqResponseLine);
rfqResponseLine.setQty... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\impl\RfqBL.java | 1 |
请完成以下Java代码 | public void enableTenantCheck() {
tenantCheckEnabled = true;
}
public void disableTenantCheck() {
tenantCheckEnabled = false;
}
public void setTenantCheckEnabled(boolean tenantCheckEnabled) {
this.tenantCheckEnabled = tenantCheckEnabled;
}
public boolean isTenantCheckEnabled() {
return te... | return getSession(OptimizeManager.class);
}
public <T> void executeWithOperationLogPrevented(Command<T> command) {
boolean initialLegacyRestrictions =
isRestrictUserOperationLogToAuthenticatedUsers();
disableUserOperationLog();
setRestrictUserOperationLogToAuthenticatedUsers(true);
try {
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\interceptor\CommandContext.java | 1 |
请完成以下Java代码 | public ExecutionImpl getReplacedBy() {
return (ExecutionImpl) replacedBy;
}
public void setExecutions(List<ExecutionImpl> executions) {
this.executions = executions;
}
public String getCurrentActivityName() {
String currentActivityName = null;
if (this.activity != null) {
currentActivity... | public ProcessEngineServices getProcessEngineServices() {
throw new UnsupportedOperationException(ProcessEngineServicesAware.class.getName() +" is unsupported in transient ExecutionImpl");
}
public ProcessEngine getProcessEngine() {
throw new UnsupportedOperationException(ProcessEngineServicesAware.class.g... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\ExecutionImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Mono<Void> validateKeyIdAndSignature(Token token) {
return getTokenKey(token).filter((tokenKey) -> hasValidSignature(token, tokenKey))
.switchIfEmpty(Mono.error(new CloudFoundryAuthorizationException(Reason.INVALID_SIGNATURE,
"RSA Signature did not match content")))
.then();
}
private Mono<Strin... | key = key.trim().replace("\n", "");
byte[] bytes = Base64.getDecoder().decode(key);
X509EncodedKeySpec keySpec = new X509EncodedKeySpec(bytes);
return KeyFactory.getInstance("RSA").generatePublic(keySpec);
}
private Mono<Void> validateExpiry(Token token) {
long currentTime = TimeUnit.MILLISECONDS.toSeconds(S... | repos\spring-boot-4.0.1\module\spring-boot-cloudfoundry\src\main\java\org\springframework\boot\cloudfoundry\autoconfigure\actuate\endpoint\reactive\TokenValidator.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class MerchandiseEntity {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String title;
private BigDecimal price;
private String brand;
public MerchandiseEntity() {
}
public MerchandiseEntity(String title, BigDecimal price) {
this.titl... | this.price = price;
}
public String getBrand() {
return brand;
}
public void setBrand(String brand) {
this.brand = brand;
}
@Override
public String toString() {
return "MerchandiseEntity{" +
"id=" + id +
", title='" + title + '\'' +
... | repos\tutorials-master\persistence-modules\spring-data-jpa-repo\src\main\java\com\baeldung\boot\domain\MerchandiseEntity.java | 2 |
请完成以下Java代码 | public Class<?> getSecureObjectClass() {
return FilterInvocation.class;
}
public void invoke(FilterInvocation filterInvocation) throws IOException, ServletException {
if (isApplied(filterInvocation) && this.observeOncePerRequest) {
// filter already applied to this request and user wants us to observe
// o... | * request, such as when JSP forwards are being used and filter security is desired on
* each included fragment of the HTTP request.
* @return <code>true</code> (the default) if once-per-request is honoured, otherwise
* <code>false</code> if <code>FilterSecurityInterceptor</code> will enforce
* authorizations fo... | repos\spring-security-main\access\src\main\java\org\springframework\security\web\access\intercept\FilterSecurityInterceptor.java | 1 |
请完成以下Java代码 | public Object getPersistentState() {
Map<String, Object> persistentState = new HashMap<String, Object>();
persistentState.put("id", this.id);
persistentState.put("type", this.type);
if (this.userId != null) {
persistentState.put("userId", this.userId);
}
if ... | if (this.userId != null && groupId != null) {
throw new ActivitiException("Cannot assign a groupId to a task assignment that already has a userId");
}
this.groupId = groupId;
}
public String getTaskId() {
return taskId;
}
public void setTaskId(String taskId) {
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricIdentityLinkEntityImpl.java | 1 |
请完成以下Java代码 | public int getA_Asset_Info_Ins_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_A_Asset_Info_Ins_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePa... | @return Policy Number */
public String getA_Policy_No ()
{
return (String)get_Value(COLUMNNAME_A_Policy_No);
}
/** Set Policy Renewal Date.
@param A_Renewal_Date Policy Renewal Date */
public void setA_Renewal_Date (Timestamp A_Renewal_Date)
{
set_Value (COLUMNNAME_A_Renewal_Date, A_Renewal_Date);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Info_Ins.java | 1 |
请完成以下Java代码 | private IReportServer getServer()
{
return serverSupplier.get();
}
private IReportServer createReportServer()
{
final String serverClassname = Services.get(ISysConfigBL.class).getValue(SYSCONFIG_ReportsServerClass, SYSCONFIG_ReportsServerClass_DEFAULT);
logger.info("Reports server classname: {}", serverClass... | }
// task 09740
// In case the report is not linked to a window but it has C_BPartner_ID as parameter and it is set, take the language of that bpartner
// TODO: i think this one is no longer needed because we already checking this case in ProcessInfo.findReportingLanguage()
if (lang == null)
{
final IRang... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\de.metas.report.jasper.client\src\main\java\de\metas\report\client\ReportsClient.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<String> getManagedClassNames() {
return managedClassNames;
}
@Override
public boolean excludeUnlistedClasses() {
return false;
}
@Override
public SharedCacheMode getSharedCacheMode() {
return SharedCacheMode.UNSPECIFIED;
}
@Override
public Va... | @Override
public ClassLoader getClassLoader() {
return Thread.currentThread().getContextClassLoader();
}
@Override
public void addTransformer(ClassTransformer transformer) {
transformers.add(transformer);
}
@Override
public ClassLoader getNewTempClassLoader() {
... | repos\tutorials-master\persistence-modules\hibernate-jpa-2\src\main\java\com\baeldung\hibernate\jpabootstrap\config\HibernatePersistenceUnitInfo.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class RfqQty extends AbstractSyncConfirmAwareEntity
{
/* package */static final String TABLE_NAME = "rfq_qty";
@ManyToOne(fetch = FetchType.LAZY)
@NonNull
@Setter
private Rfq rfq;
@NonNull
private java.sql.Date datePromised;
@NonNull
@Getter
private BigDecimal qtyPromised = BigDecimal.ZERO;
@NonNu... | {
return DateUtils.toLocalDate(datePromised);
}
public void setQtyPromisedUserEntered(@NonNull final BigDecimal qtyPromisedUserEntered)
{
this.qtyPromisedUserEntered = qtyPromisedUserEntered;
}
public boolean isConfirmedByUser()
{
return getQtyPromised().compareTo(getQtyPromisedUserEntered()) == 0;
}
p... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\model\RfqQty.java | 2 |
请完成以下Java代码 | public class GeodeBindingsPropertiesProcessor implements BindingsPropertiesProcessor {
public static final String TYPE = "gemfire";
/**
* @inheritDoc
*/
@Override
public void process(@NonNull Environment environment, @NonNull Bindings bindings,
@NonNull Map<String, Object> properties) {
if (Guards.isTyp... | // (i.e. PCC in PCF).
MapMapper mapMapper = new MapMapper(binding.getSecret(), properties);
mapMapper.from("gemfire.security-username").to("spring.data.gemfire.security.username");
mapMapper.from("gemfire.security-password").to("spring.data.gemfire.security.password");
mapMapper.from("gemfire.locator... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-cloud\src\main\java\org\springframework\geode\cloud\bindings\boot\GeodeBindingsPropertiesProcessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DefaultTbMobileAppBundleService extends AbstractTbEntityService implements TbMobileAppBundleService {
private final MobileAppBundleService mobileAppBundleService;
@Override
public MobileAppBundle save(MobileAppBundle mobileAppBundle, List<OAuth2ClientId> oauth2Clients, User user) throws Excep... | throw e;
}
}
@Override
public void delete(MobileAppBundle mobileAppBundle, User user) {
ActionType actionType = ActionType.DELETED;
TenantId tenantId = mobileAppBundle.getTenantId();
MobileAppBundleId mobileAppBundleId = mobileAppBundle.getId();
try {
mob... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\entitiy\mobile\DefaultTbMobileAppBundleService.java | 2 |
请完成以下Java代码 | public void resume(String listenerId) {
Assert.notNull(this.registry, "Resume by id is only supported when a registry is provided");
getListenerContainer(listenerId).ifPresent(this::resume);
}
/**
* Resume the listener container.
* @param messageListenerContainer the listener container
*/
public void resu... | }
/*
* Callers must ensure this.registry is not null before calling.
*/
private Optional<MessageListenerContainer> getListenerContainer(String listenerId) {
MessageListenerContainer messageListenerContainer = Objects.requireNonNull(this.registry).getListenerContainer(listenerId); // NOSONAR
if (messageListen... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\ListenerContainerPauseService.java | 1 |
请完成以下Spring Boot application配置 | # dubbo 配置项,对应 DubboConfigurationProperties 配置类
dubbo:
# Dubbo 应用配置
application:
name: user-service-consumer # 应用名
# Dubbo 注册中心配置
registry:
address: zookeeper://127.0.0.1:2181 # 注册中心地址。个鞥多注册中心,可见 http://dubbo.apache.org/zh-cn/docs/user/references/registry/introduction.html 文档。
# D | ubbo 消费者配置
consumer:
timeout: 1000 # 【重要】远程服务调用超时时间,单位:毫秒。默认为 1000 毫秒,胖友可以根据自己业务修改
UserRpcService:
version: 1.0.0 | repos\SpringBoot-Labs-master\lab-30\lab-30-dubbo-annotations-demo\user-rpc-service-consumer-02\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | private List<DocumentLayoutElementGroupDescriptor> buildElementGroups()
{
return elementGroupsBuilders
.stream()
.map(DocumentLayoutElementGroupDescriptor.Builder::build)
.filter(this::checkValid)
.collect(GuavaCollectors.toImmutableList());
}
private boolean checkValid(final DocumentLayou... | return this;
}
public Builder addElementGroups(@NonNull final List<DocumentLayoutElementGroupDescriptor.Builder> elementGroupBuilders)
{
elementGroupsBuilders.addAll(elementGroupBuilders);
return this;
}
public Builder addElementGroup(@NonNull final DocumentLayoutElementGroupDescriptor.Builder element... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutColumnDescriptor.java | 1 |
请完成以下Java代码 | public class RuleChainActor extends RuleEngineComponentActor<RuleChainId, RuleChainActorMessageProcessor> {
private final RuleChain ruleChain;
private RuleChainActor(ActorSystemContext systemContext, TenantId tenantId, RuleChain ruleChain) {
super(systemContext, tenantId, ruleChain.getId());
t... | }
@Override
public TbActorId createActorId() {
return new TbEntityActorId(ruleChain.getId());
}
@Override
public TbActor createActor() {
return new RuleChainActor(context, tenantId, ruleChain);
}
}
@Override
protected RuleChainId get... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\actors\ruleChain\RuleChainActor.java | 1 |
请完成以下Java代码 | public class Milestone extends PlanItemDefinition {
protected Integer displayOrder;
protected String includeInStageOverview;
protected String milestoneVariable;
protected String businessStatus;
public Integer getDisplayOrder() {
return displayOrder;
}
public void setDispla... | public String getMilestoneVariable() {
return milestoneVariable;
}
public void setMilestoneVariable(String milestoneVariable) {
this.milestoneVariable = milestoneVariable;
}
public String getBusinessStatus() {
return businessStatus;
}
public void setBusinessStatus(Stri... | repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\Milestone.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public UnitType getQuantityVariances() {
return quantityVariances;
}
/**
* Sets the value of the quantityVariances property.
*
* @param value
* allowed object is
* {@link UnitType }
*
*/
public void setQuantityVariances(UnitType value) {
this... | this.variancesReasonCode = value;
}
/**
* Gets the value of the contractReference property.
*
* @return
* possible object is
* {@link ReferenceType }
*
*/
public ReferenceType getContractReference() {
return contractReference;
}
/**
* S... | 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\RECADVListLineItemExtensionType.java | 2 |
请完成以下Java代码 | public class ActivitiEventListenerValidator extends ProcessLevelValidator {
@Override
protected void executeValidation(BpmnModel bpmnModel, Process process, List<ValidationError> errors) {
List<EventListener> eventListeners = process.getEventListeners();
if (eventListeners != null) {
... | !ImplementationType.IMPLEMENTATION_TYPE_THROW_SIGNAL_EVENT.equals(
eventListener.getImplementationType()
) &&
!ImplementationType.IMPLEMENTATION_TYPE_THROW_GLOBAL_SIGNAL_EVENT.equals(
eventListener.getImplementationT... | repos\Activiti-develop\activiti-core\activiti-process-validation\src\main\java\org\activiti\validation\validator\impl\ActivitiEventListenerValidator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private final class SyncAfterCommit implements TransactionSynchronization, ISyncAfterCommitCollector
{
private final ArrayList<ProductSupply> productSupplies = new ArrayList<>();
private final ArrayList<WeekSupply> weeklySupplies = new ArrayList<>();
private final ArrayList<Rfq> rfqs = new ArrayList<>();
priva... | {
final List<ProductSupply> productSupplies = ImmutableList.copyOf(this.productSupplies);
this.productSupplies.clear();
pushDailyReportsAsync(productSupplies);
}
//
// Sync weekly product supplies
{
final List<WeekSupply> weeklySupplies = ImmutableList.copyOf(this.weeklySupplies);
this.... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\sync\SenderToMetasfreshService.java | 2 |
请完成以下Java代码 | public int getC_BPartner_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_ValidCombination getC_Prepayment_A() throws RuntimeException
{
return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table_Name)
... | */
public void setC_Receivable_Acct (int C_Receivable_Acct)
{
set_Value (COLUMNNAME_C_Receivable_Acct, Integer.valueOf(C_Receivable_Acct));
}
/** Get Customer Receivables.
@return Account for Customer Receivables
*/
public int getC_Receivable_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Recei... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_Customer_Acct.java | 1 |
请完成以下Java代码 | public List<IdentityLinkEntity> findIdentityLinkByProcessDefinitionUserAndGroup(String processDefinitionId, String userId, String groupId) {
Map<String, String> parameters = new HashMap<>();
parameters.put("processDefinitionId", processDefinitionId);
parameters.put("userId", userId);
par... | List<IdentityLinkEntity> identityLinksFromCache = Context.getCommandContext().getDbSqlSession().findInCache(IdentityLinkEntity.class);
boolean alreadyDeleted = false;
for (IdentityLinkEntity identityLinkEntity : identityLinksFromCache) {
if (processInstanceId.equals(identityLinkEntity.getPro... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\IdentityLinkEntityManager.java | 1 |
请完成以下Java代码 | protected class QueryServiceRowCountCmd implements Command<Long> {
protected String statement;
protected ListQueryParameterObject parameter;
public QueryServiceRowCountCmd(String statement, ListQueryParameterObject parameter) {
this.statement = statement;
this.parameter = parameter;
}
... | return (List<T>) commandContext.getDbSqlSession().selectList(statement, parameter);
}
}
protected class ExecuteSingleQueryCmd<T> implements Command<T> {
protected String statement;
protected Object parameter;
protected Class clazz;
public <T> ExecuteSingleQueryCmd(String statement, Object par... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\db\QueryServiceImpl.java | 1 |
请完成以下Java代码 | private Document getParentDocument()
{
return _parentDocument;
}
private DocumentPath getDocumentPath()
{
if (_documentPath == null)
{
final DocumentEntityDescriptor entityDescriptor = getEntityDescriptor();
final DocumentId documentId = getDocumentId();
final Document parentDocument = get... | {
final Document parentDocument = getParentDocument();
if (parentDocument == null)
{
return isNewDocument();
}
else
{
return parentDocument.isWritable();
}
}
private ReentrantReadWriteLock createLock()
{
// don't create locks for any other entity which is not window
final Docum... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\Document.java | 1 |
请完成以下Java代码 | public class ResourceParameterBindingImpl extends BaseElementImpl implements ResourceParameterBinding {
protected static AttributeReference<ResourceParameter> parameterRefAttribute;
protected static ChildElement<Expression> expressionChild;
public static void registerType(ModelBuilder modelBuilder) {
ModelE... | .build();
typeBuilder.build();
}
public ResourceParameterBindingImpl(ModelTypeInstanceContext instanceContext) {
super(instanceContext);
}
public ResourceParameter getParameter() {
return parameterRefAttribute.getReferenceTargetElement(this);
}
public void setParameter(ResourceParameter para... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ResourceParameterBindingImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static void putIfNotNull(ObjectNode map, String key, Date value) {
if (value != null) {
map.put(key, AsyncHistoryDateUtil.formatDate(value));
}
}
public static void putIfNotNull(Map<String, String> map, String key, Boolean value) {
if (value != null) {
... | if (StringUtils.isNotEmpty(s)) {
return Double.valueOf(s);
}
return null;
}
public static Long getLongFromJson(ObjectNode objectNode, String fieldName) {
String s = getStringFromJson(objectNode, fieldName);
if (StringUtils.isNotEmpty(s)) {
return Long... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\history\async\util\AsyncHistoryJsonUtil.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public ListenableFuture<ReclaimResult> reClaimDevice(TenantId tenantId, Device device) {
if (!device.getCustomerId().getId().equals(ModelConstants.NULL_UUID)) {
cacheEviction(device.getId());
Customer unassignedCustomer = customerService.findCustomerById(tenantId, device.getCustomerId())... | System.currentTimeMillis() + validateDurationMs(durationMs));
cache.putIfAbsent(key, claimData);
}
private long validateDurationMs(long durationMs) {
if (durationMs > 0L) {
return durationMs;
}
return systemDurationMs;
}
private ListenableFuture<Void> remove... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\device\ClaimDevicesServiceImpl.java | 2 |
请完成以下Java代码 | public @Nullable Integer getActive() {
return getDataSource().getNumActive();
}
@Override
public @Nullable Integer getIdle() {
return getDataSource().getNumIdle();
}
@Override
public @Nullable Integer getMax() {
return getDataSource().getMaxTotal();
}
@Override | public @Nullable Integer getMin() {
return getDataSource().getMinIdle();
}
@Override
public @Nullable String getValidationQuery() {
return getDataSource().getValidationQuery();
}
@Override
public @Nullable Boolean getDefaultAutoCommit() {
return getDataSource().getDefaultAutoCommit();
}
} | repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\metadata\CommonsDbcp2DataSourcePoolMetadata.java | 1 |
请完成以下Java代码 | public static DocumentFieldWidgetType extractWidgetType(
final String columnName,
final int displayType,
@NonNull final Optional<LookupDescriptor> lookupDescriptor)
{
final DocumentFieldWidgetType widgetType = extractWidgetType(columnName, displayType);
if (lookupDescriptor.isPresent()
&& (widgetType ... | return DocumentLayoutElementFieldDescriptor.LookupSource.list;
}
else if (DisplayType.TableDir == displayType)
{
return DocumentLayoutElementFieldDescriptor.LookupSource.list;
}
else if (DisplayType.Table == displayType)
{
return DocumentLayoutElementFieldDescriptor.LookupSource.list;
}
else if (D... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\factory\standard\DescriptorsFactoryHelper.java | 1 |
请完成以下Java代码 | public String getSvcCd() {
return svcCd;
}
/**
* Sets the value of the svcCd property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setSvcCd(String value) {
this.svcCd = value;
}
/**
* Gets the value o... | *
* @return
* possible object is
* {@link CardSecurityInformation1 }
*
*/
public CardSecurityInformation1 getCardSctyCd() {
return cardSctyCd;
}
/**
* Sets the value of the cardSctyCd property.
*
* @param value
* allowed object is
... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\PlainCardData1.java | 1 |
请完成以下Java代码 | public String getId() {
return historicProcessInstance.getId();
}
@Override
public String getBusinessKey() {
return historicProcessInstance.getBusinessKey();
}
@Override
public String getProcessDefinitionId() {
return historicProcessInstance.getProcessDefinitionId();
... | public String getDeleteReason() {
return historicProcessInstance.getDeleteReason();
}
@Override
public String getSuperProcessInstanceId() {
return historicProcessInstance.getSuperProcessInstanceId();
}
@Override
public String getTenantId() {
return historicProcessInstan... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\ProcessInstanceHistoryLogImpl.java | 1 |
请完成以下Java代码 | void addVertex(String label) {
adjVertices.putIfAbsent(new Vertex(label), new ArrayList<>());
}
void removeVertex(String label) {
Vertex v = new Vertex(label);
adjVertices.values().stream().forEach(e -> e.remove(v));
adjVertices.remove(new Vertex(label));
}
void addEdge... | Vertex(String label) {
this.label = label;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + getOuterType().hashCode();
result = prime * result + ((label == null) ? 0 : label.ha... | repos\tutorials-master\data-structures\src\main\java\com\baeldung\graph\Graph.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void updateUser(@PathVariable String id, User user) {
userService.updateUser(id, user);
}
/**
* 根据用户 id查找
* 存在返回,不存在返回 null
*/
@GetMapping("/{id}")
public User getUser(@PathVariable String id) {
return userService.getUser(id).orElse(null);
}
/**
* 根据年... | /**
* 根据用户描述模糊查找
*/
@GetMapping("/description/{description}")
public List<User> getUserByDescription(@PathVariable String description) {
return userService.getUserByDescription(description);
}
/**
* 根据多个检索条件查询
*/
@GetMapping("/condition")
public Page<User> getUserByC... | repos\SpringAll-master\56.Spring-Boot-MongoDB-crud\src\main\java\com\example\mongodb\controller\UserController.java | 2 |
请完成以下Java代码 | public class IntermediateCatchEventParseHandler extends AbstractFlowNodeBpmnParseHandler<IntermediateCatchEvent> {
private static final Logger LOGGER = LoggerFactory.getLogger(IntermediateCatchEventParseHandler.class);
@Override
public Class<? extends BaseElement> getHandledType() {
return Interme... | } else {
nestedActivity = createActivityOnScope(bpmnParse, event, BpmnXMLConstants.ELEMENT_EVENT_CATCH, scope);
}
nestedActivity.setAsync(event.isAsynchronous());
nestedActivity.setExclusive(!event.isNotExclusive());
// Catch event behavior is the same f... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\handler\IntermediateCatchEventParseHandler.java | 1 |
请完成以下Java代码 | public ArticleDataList findUserFeed(User user, Page page) {
List<String> followdUsers = userRelationshipQueryService.followedUsers(user.getId());
if (followdUsers.size() == 0) {
return new ArticleDataList(new ArrayList<>(), 0);
} else {
List<ArticleData> articles = articleReadService.findArticle... | item -> {
countMap.put(item.getId(), item.getCount());
});
articles.forEach(
articleData -> articleData.setFavoritesCount(countMap.get(articleData.getId())));
}
private void setIsFavorite(List<ArticleData> articles, User currentUser) {
Set<String> favoritedArticles =
artic... | repos\spring-boot-realworld-example-app-master\src\main\java\io\spring\application\ArticleQueryService.java | 1 |
请完成以下Java代码 | public java.lang.String getProductName()
{
return get_ValueAsString(COLUMNNAME_ProductName);
}
@Override
public void setProductNo (final @Nullable java.lang.String ProductNo)
{
set_Value (COLUMNNAME_ProductNo, ProductNo);
}
@Override
public java.lang.String getProductNo()
{
return get_ValueAsString(C... | set_Value (COLUMNNAME_UsedForCustomer, UsedForCustomer);
}
@Override
public boolean isUsedForCustomer()
{
return get_ValueAsBoolean(COLUMNNAME_UsedForCustomer);
}
@Override
public void setUsedForVendor (final boolean UsedForVendor)
{
set_Value (COLUMNNAME_UsedForVendor, UsedForVendor);
}
@Override
pu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Product.java | 1 |
请完成以下Java代码 | public void validateAndSetMissingFields(final I_PP_Cost_Collector cc)
{
//
// Set default locator, if not set and we have the warehouse:
if (cc.getM_Locator_ID() <= 0 && cc.getM_Warehouse_ID() > 0)
{
final WarehouseId warehouseId = WarehouseId.ofRepoId(cc.getM_Warehouse_ID());
final LocatorId locatorId =... | if (cc.getC_UOM_ID() <= 0)
{
cc.setC_UOM_ID(bomLineUOMId.getRepoId());
}
// If Cost Collector UOM differs from BOM Line UOM then throw exception because this conversion is not supported yet
if (cc.getC_UOM_ID() != bomLineUOMId.getRepoId())
{
throw new LiberoException("@PP_Cost_Collector_ID@ @C_UO... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\validator\PP_Cost_Collector.java | 1 |
请完成以下Java代码 | public Class<?> getSecureObjectClass() {
return Message.class;
}
@Override
public SecurityMetadataSource obtainSecurityMetadataSource() {
return this.metadataSource;
}
@Override
public Message<?> preSend(Message<?> message, MessageChannel channel) {
InterceptorStatusToken token = beforeInvocation(message)... | }
@Override
public boolean preReceive(MessageChannel channel) {
return true;
}
@Override
public Message<?> postReceive(Message<?> message, MessageChannel channel) {
return message;
}
@Override
public void afterReceiveCompletion(@Nullable Message<?> message, MessageChannel channel, @Nullable Exception ex)... | repos\spring-security-main\access\src\main\java\org\springframework\security\messaging\access\intercept\ChannelSecurityInterceptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ReconciliationConfigUtil {
private static final Log LOG = LogFactory.getLog(ReconciliationConfigUtil.class);
/**
* 通过静态代码块读取上传文件的验证格式配置文件,静态代码块只执行一次(单例)
*/
private static Properties properties = new Properties();
private ReconciliationConfigUtil() {
}
// 通过类装载器装载进来
static {
try {
// 从类... | } catch (IOException e) {
LOG.error(e);
}
}
/**
* 函数功能说明 :读取配置项 Administrator 2012-12-14 修改者名字 : 修改日期 : 修改内容 :
*
* @参数:
* @return void
* @throws
*/
public static String readConfig(String key) {
return (String) properties.get(key);
}
} | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\utils\ReconciliationConfigUtil.java | 2 |
请完成以下Java代码 | public int getAD_User_Substitute_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_Substitute_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Beschreibung.
@param Description Beschreibung */
@Override
public void setDescription (java.lang.String Description)
{
set_Value (... | {
if (Substitute_ID < 1)
set_Value (COLUMNNAME_Substitute_ID, null);
else
set_Value (COLUMNNAME_Substitute_ID, Integer.valueOf(Substitute_ID));
}
/** Get Ersatz.
@return Entity which can be used in place of this entity
*/
@Override
public int getSubstitute_ID ()
{
Integer ii = (Integer)get_Val... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_Substitute.java | 1 |
请完成以下Java代码 | protected void walkToSave(ObjectOutput out) throws IOException
{
out.writeChar(c);
out.writeInt(status.ordinal());
if (status == Status.WORD_END_3 || status == Status.WORD_MIDDLE_2)
{
out.writeObject(value);
}
int childSize = 0;
if (child != null) ... | * 是个词语的结尾,并且没有继续
*/
WORD_END_3,
}
public class TrieEntry extends AbstractMap.SimpleEntry<String, V> implements Comparable<TrieEntry>
{
public TrieEntry(String key, V value)
{
super(key, value);
}
@Override
public int compareTo(TrieEntry o... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\trie\bintrie\BaseNode.java | 1 |
请完成以下Java代码 | public void setupDatabaseAndConnect() throws SQLException {
connection = DriverManager.getConnection("jdbc:h2:mem:testDB", "dbUser", "dbPassword");
String createTable = "CREATE TABLE CUSTOMER (id INT, first_name TEXT, last_name TEXT)";
connection.createStatement()
.execute(createTabl... | connection.setAutoCommit(false);
for (int i = 0; i < 10000; i++) {
preparedStatement.setInt(1, i);
preparedStatement.setString(2, "firstname" + i);
preparedStatement.setString(3, "secondname" + i);
preparedStatement.addBatch();
}
... | repos\tutorials-master\persistence-modules\core-java-persistence-4\src\main\java\com\baeldung\resusepreparedstatement\ReusePreparedStatement.java | 1 |
请完成以下Java代码 | public void notify(DelegateExecution execution) {
// test whether cdi is setup correctly. (if not, just do not deliver the
// event)
try {
ProgrammaticBeanLookup.lookup(ProcessEngine.class);
} catch (Exception e) {
return;
}
BusinessProcessEvent e... | protected BeanManager getBeanManager() {
BeanManager bm = BeanManagerLookup.getBeanManager();
if (bm == null) {
throw new FlowableException("No cdi bean manager available, cannot publish event.");
}
return bm;
}
protected Annotation[] getQualifiers(BusinessProcessEve... | repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\event\CdiExecutionListener.java | 1 |
请完成以下Java代码 | public class FileValueTypeImpl extends AbstractValueTypeImpl implements FileValueType {
private static final long serialVersionUID = 1L;
public FileValueTypeImpl() {
super("file");
}
@Override
public TypedValue createValue(Object value, Map<String, Object> valueInfo) {
if (valueInfo == null) {
... | throw new IllegalArgumentException("The provided encoding is null. Set a non-null value info property with key '" + VALUE_INFO_FILE_ENCODING + "'");
}
builder.encoding(encoding.toString());
}
builder.setTransient(isTransient(valueInfo));
return builder.create();
}
@Override
public Map<S... | repos\camunda-bpm-platform-master\commons\typed-values\src\main\java\org\camunda\bpm\engine\variable\impl\type\FileValueTypeImpl.java | 1 |
请完成以下Java代码 | public JobQuery orderByJobDuedate() {
return orderBy(JobQueryProperty.DUEDATE);
}
public JobQuery orderByExecutionId() {
return orderBy(JobQueryProperty.EXECUTION_ID);
}
public JobQuery orderByJobId() {
return orderBy(JobQueryProperty.JOB_ID);
}
public JobQuery orderByProcessInstanceId() {
... | return rootProcessInstanceId;
}
public String getProcessInstanceId() {
return processInstanceId;
}
public Set<String> getProcessInstanceIds() {
return processInstanceIds;
}
public String getExecutionId() {
return executionId;
}
public boolean getRetriesLeft() {
return retriesLeft;
}
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\JobQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ConfigureDataSources {
// first database, booksdb
@Primary
@Bean(name = "configBooksDb")
@ConfigurationProperties("app.datasource.ds1")
public DataSourceProperties firstDataSourceProperties() {
return new DataSourceProperties();
}
@Primary
@Bean(name = "configFlywa... | @ConfigurationProperties("app.datasource.ds2")
public DataSourceProperties secondDataSourceProperties() {
return new DataSourceProperties();
}
@Bean(name = "configFlywayAuthorsDb")
public FlywayAuthorProperties secondFlywayProperties() {
return new FlywayAuthorProperties();
}
@... | repos\Hibernate-SpringBoot-master\HibernateSpringBootFlywayMySQLTwoDatabases\src\main\java\com\bookstore\config\ConfigureDataSources.java | 2 |
请在Spring Boot框架中完成以下Java代码 | class ApplicationConfiguration {
@Autowired ElasticsearchOperations operations;
@Autowired ConferenceRepository repository;
@PreDestroy
public void deleteIndex() {
operations.indexOps(Conference.class).delete();
}
@PostConstruct
public void insertDataSample() {
operations.indexOps(Conference.class).refre... | var documents = Arrays.asList(
Conference.builder().date("2014-11-06").name("Spring eXchange 2014 - London")
.keywords(Arrays.asList("java", "spring")).location(new GeoPoint(51.500152D, -0.126236D)).build(), //
Conference.builder().date("2014-12-07").name("Scala eXchange 2014 - London")
.keywords(Ar... | repos\spring-data-examples-main\elasticsearch\example\src\main\java\example\springdata\elasticsearch\conference\ApplicationConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public InitializingBean registerTaskCandidateGroupAddedEventListener(
RuntimeService runtimeService,
@Autowired(required = false) List<TaskRuntimeEventListener<TaskCandidateGroupAddedEvent>> listeners,
ToAPITaskCandidateGroupAddedEventConverter taskCandidateGroupAddedEventConverter
) {
... | @Bean
public InitializingBean registerTaskCandidateGroupRemovedEventListener(
RuntimeService runtimeService,
@Autowired(required = false) List<TaskRuntimeEventListener<TaskCandidateGroupRemovedEvent>> listeners,
APITaskCandidateGroupConverter taskCandidateGroupConverter
) {
retur... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-task-runtime-impl\src\main\java\org\activiti\runtime\api\conf\TaskRuntimeAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void warmUpBPartnerNamesCache(@NonNull final Set<BPartnerId> bpartnerIds)
{
CollectionUtils.getAllOrLoad(bpartnerNamesCache, bpartnerIds, bpartnerService::getBPartnerNames);
}
@Override
public String getBPartnerName(@NonNull final BPartnerId bpartnerId)
{
return bpartnerNamesCache.computeIfAbsent(bpart... | }
@Override
public String getLocatorName(@NonNull final LocatorId locatorId)
{
return locatorNamesCache.computeIfAbsent(locatorId, warehouseService::getLocatorNameById);
}
@Override
public HUQRCode getQRCodeByHUId(final HuId huId)
{
return huService.getQRCodeByHuId(huId);
}
@Override
public ScheduledPa... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\repository\DefaultPickingJobLoaderSupportingServices.java | 2 |
请完成以下Java代码 | public class M_InOut_AddToTransportationOrderProcess_SingleView extends JavaProcess implements IProcessPrecondition
{
@Param(parameterName = "M_ShipperTransportation_ID", mandatory = true)
private I_M_ShipperTransportation transportationOrder;
public static final AdMessageKey ALL_SELECTED_SHIPMENTS_SHOULD_BE_COMPLE... | }
@Override
protected String doIt() throws Exception
{
final DocStatus docStatus = DocStatus.ofCode(transportationOrder.getDocStatus());
if (docStatus.isCompleted())
{
// this error should not be thrown since we have AD_Val_Rule for the parameter
throw new AdempiereException("Transportation Order should... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\inout\process\M_InOut_AddToTransportationOrderProcess_SingleView.java | 1 |
请完成以下Java代码 | public void onInit(final InitEvent event) {
initLocales();
initDefaultCredentials();
}
protected void initLocales() {
LinkedHashMap<Locale, String> locales = coreProperties.getAvailableLocales().stream()
.collect(Collectors.toMap(Function.identity(), messageTools::getLoc... | @Override
public void localeChange(final LocaleChangeEvent event) {
UI.getCurrent().getPage().setTitle(messageBundle.getMessage("LoginView.title"));
final JmixLoginI18n loginI18n = JmixLoginI18n.createDefault();
final JmixLoginI18n.JmixForm form = new JmixLoginI18n.JmixForm();
form... | repos\tutorials-master\spring-boot-modules\jmix\src\main\java\com\baeldung\jmix\expensetracker\view\login\LoginView.java | 1 |
请完成以下Java代码 | public I_M_HU getM_HU()
{
return get_ValueAsPO(COLUMNNAME_M_HU_ID, I_M_HU.class);
}
@Override
public void setM_HU(final I_M_HU M_HU)
{
set_ValueFromPO(COLUMNNAME_M_HU_ID, I_M_HU.class, M_HU);
}
@Override
public void setM_HU_ID (final int M_HU_ID)
{
if (M_HU_ID < 1)
set_Value (COLUMNNAME_M_HU_ID, nu... | return get_ValueAsInt(COLUMNNAME_M_HU_QRCode_Assignment_ID);
}
@Override
public I_M_HU_QRCode getM_HU_QRCode()
{
return get_ValueAsPO(COLUMNNAME_M_HU_QRCode_ID, I_M_HU_QRCode.class);
}
@Override
public void setM_HU_QRCode(final I_M_HU_QRCode M_HU_QRCode)
{
set_ValueFromPO(COLUMNNAME_M_HU_QRCode_ID, I_M_HU... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_QRCode_Assignment.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getProcessInstanceId() {
return processInstanceId;
}
public void setProcessInstanceId(String processInstanceId) {
this.processInstanceId = processInstanceId;
}
@ApiModelProperty(example = "http://localhost:8182/runtime/process-instances/5")
public String getProcessIns... | public void setSubScopeId(String subScopeId) {
this.subScopeId = subScopeId;
}
@ApiModelProperty(example = "cmmn")
public String getScopeType() {
return scopeType;
}
public void setScopeType(String scopeType) {
this.scopeType = scopeType;
}
@ApiModelProperty(exampl... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\task\TaskResponse.java | 2 |
请完成以下Java代码 | public class SString implements Comparable<SString>, CharSequence
{
public char[] value;
/**
* 开始位置,包含
*/
public int b;
/**
* 结束位置,不包含
*/
public int e;
/**
* 建立一个字符串
*
* @param value
* @param b
* @param e
*/
public SString(char[] value, int ... | return new String(value, b, e - b);
}
@Override
public int compareTo(SString anotherString)
{
int len1 = value.length;
int len2 = anotherString.value.length;
int lim = Math.min(len1, len2);
char v1[] = value;
char v2[] = anotherString.value;
int k = 0;
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\sequence\SString.java | 1 |
请完成以下Java代码 | public static final <T> IncludeExcludeListPredicate<T> ofExcludes(final T... excludes)
{
final Builder<T> includesExcludesList = builder();
if (excludes != null && excludes.length > 0)
{
for (final T exclude : excludes)
{
if (exclude != null)
{
includesExcludesList.exclude(exclude);
}
... | // Accept it ONLY if there are NO particular items to be included.
// Else, we assume the user want's to include ONLY those.
final boolean acceptAllByDefault = includes.isEmpty();
return acceptAllByDefault;
}
public static class Builder<T>
{
private final Set<T> includes = new LinkedHashSet<>();
private f... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\IncludeExcludeListPredicate.java | 1 |
请完成以下Java代码 | public static ApiResponse ofMessage(String message) {
return of(Status.OK.getCode(), message, null);
}
/**
* 构造一个有状态的API返回
*
* @param status 状态 {@link Status}
* @return ApiResponse
*/
public static ApiResponse ofStatus(Status status) {
return ofStatus(status, null);... | * @param <T> {@link BaseException} 的子类
* @return ApiResponse
*/
public static <T extends BaseException> ApiResponse ofException(T t, Object data) {
return of(t.getCode(), t.getMessage(), data);
}
/**
* 构造一个异常且带数据的API返回
*
* @param t 异常
* @param <T> {@link BaseExcepti... | repos\spring-boot-demo-master\demo-exception-handler\src\main\java\com\xkcoding\exception\handler\model\ApiResponse.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class PooledDataSourceAvailableCondition extends SpringBootCondition {
@Override
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
ConditionMessage.Builder message = ConditionMessage.forCondition("PooledDataSource");
if (DataSourceBuilder.findType(cont... | if (anyMatches(context, metadata, this.pooledCondition)) {
return ConditionOutcome.noMatch(message.foundExactly("supported pooled data source"));
}
if (!ClassUtils.isPresent(EMBEDDED_DATABASE_TYPE, context.getClassLoader())) {
return ConditionOutcome
.noMatch(message.didNotFind("required class").item... | repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\autoconfigure\DataSourceAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public CacheManager gatewayCacheManager(LocalResponseCacheProperties cacheProperties) {
return LocalResponseCacheUtils.createGatewayCacheManager(cacheProperties);
}
@Bean
public LocalResponseCacheGatewayFilterFactory localResponseCacheGatewayFilterFactory(
ResponseCacheManagerFactory responseCacheManagerFactor... | }
@ConditionalOnProperty(value = GatewayProperties.PREFIX + ".filter.local-response-cache.enabled",
havingValue = "true")
static class OnLocalResponseCachePropertyEnabled {
}
@ConditionalOnProperty(name = GatewayProperties.PREFIX + ".global-filter.local-response-cache.enabled",
havingValue = "true", ... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\LocalResponseCacheAutoConfiguration.java | 2 |
请完成以下Java代码 | public Date getDeploymentTime() {
return deploymentTime;
}
@Override
public void setDeploymentTime(Date deploymentTime) {
this.deploymentTime = deploymentTime;
}
@Override
public boolean isNew() {
return isNew;
}
@Override
public void setNew(boolean isNew) ... | public String getDerivedFromRoot() {
return derivedFromRoot;
}
@Override
public void setDerivedFromRoot(String derivedFromRoot) {
this.derivedFromRoot = derivedFromRoot;
}
@Override
public String getParentDeploymentId() {
return parentDeploymentId;
}
@Overr... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\DeploymentEntityImpl.java | 1 |
请完成以下Java代码 | private int readDecimalPointPosition()
{
char decimalPointIndicator = readChar();
if (decimalPointIndicator < '0' || decimalPointIndicator > '9')
{
throw new IllegalArgumentException("decimal point indicator must be a digit");
}
return decimalPointIndicator - '0';
}
private List<?> readCurrencyAndAmoun... | {
throw new IllegalArgumentException("data field must be at least " + minLength + " characters long");
}
String dataField = sequence.substring(position, endIndex);
position = endIndex;
return dataField;
}
private void skipSeparatorIfPresent()
{
if (position < sequence.length() && sequence.charAt(positi... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\gs1\GS1SequenceReader.java | 1 |
请完成以下Java代码 | public class Menu implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@Schema(description = "主键")
@TableId(value = "id", type = IdType.ASSIGN_ID)
@JsonSerialize(using = ToStringSerializer.class)
private Long id;
/**
* 菜单父主键
*/
@Schema(description = "父主键")
... | * 是否打开新页面
*/
@Schema(description = "是否打开新页面")
private Integer isOpen;
/**
* 备注
*/
@Schema(description = "备注")
private String remark;
/**
* 是否已删除
*/
@TableLogic
@Schema(description = "是否已删除")
private Integer isDeleted;
@Override
public boolean equals(Object obj) {
if (this == obj) {
return ... | repos\SpringBlade-master\blade-service-api\blade-system-api\src\main\java\org\springblade\system\entity\Menu.java | 1 |
请完成以下Java代码 | public void setDIM_Dimension_Spec_Assignment_ID (int DIM_Dimension_Spec_Assignment_ID)
{
if (DIM_Dimension_Spec_Assignment_ID < 1)
set_ValueNoCheck (COLUMNNAME_DIM_Dimension_Spec_Assignment_ID, null);
else
set_ValueNoCheck (COLUMNNAME_DIM_Dimension_Spec_Assignment_ID, Integer.valueOf(DIM_Dimension_Spec_Ass... | @Override
public void setDIM_Dimension_Spec_ID (int DIM_Dimension_Spec_ID)
{
if (DIM_Dimension_Spec_ID < 1)
set_ValueNoCheck (COLUMNNAME_DIM_Dimension_Spec_ID, null);
else
set_ValueNoCheck (COLUMNNAME_DIM_Dimension_Spec_ID, Integer.valueOf(DIM_Dimension_Spec_ID));
}
/** Get Dimensionsspezifikation.
@... | repos\metasfresh-new_dawn_uat\backend\de.metas.dimension\src\main\java-gen\de\metas\dimension\model\X_DIM_Dimension_Spec_Assignment.java | 1 |
请完成以下Java代码 | public int getC_Currency_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Currency_ID);
}
@Override
public void setC_UOM_ID (final int C_UOM_ID)
{
if (C_UOM_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_UOM_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_UOM_ID, C_UOM_ID);
}
@Override
public int getC_UOM_ID()... | }
@Override
public void setProductPriceInStockUOM (final BigDecimal ProductPriceInStockUOM)
{
set_ValueNoCheck (COLUMNNAME_ProductPriceInStockUOM, ProductPriceInStockUOM);
}
@Override
public BigDecimal getProductPriceInStockUOM()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_ProductPriceInStock... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_purchase_prices_in_stock_uom_plv_v.java | 1 |
请完成以下Java代码 | public void setV_Liability_Services_Acct (int V_Liability_Services_Acct)
{
set_Value (COLUMNNAME_V_Liability_Services_Acct, Integer.valueOf(V_Liability_Services_Acct));
}
/** Get Vendor Service Liability.
@return Account for Vender Service Liability
*/
public int getV_Liability_Services_Acct ()
{
Intege... | */
public void setV_Prepayment_Acct (int V_Prepayment_Acct)
{
set_Value (COLUMNNAME_V_Prepayment_Acct, Integer.valueOf(V_Prepayment_Acct));
}
/** Get Vendor Prepayment.
@return Account for Vendor Prepayments
*/
public int getV_Prepayment_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_V_Prepayment... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_Vendor_Acct.java | 1 |
请完成以下Java代码 | public <T> T execute(CommandConfig config, Command<T> command, CommandExecutor commandExecutor) {
long waitTime = waitTimeInMs;
int failedAttempts = 0;
do {
if (failedAttempts > 0) {
LOGGER.info("Waiting for {}ms before retrying the command.", waitTime);
... | LOGGER.debug("I am interrupted while waiting for a retry.");
}
}
public void setNumOfRetries(int numOfRetries) {
this.numOfRetries = numOfRetries;
}
public void setWaitIncreaseFactor(int waitIncreaseFactor) {
this.waitIncreaseFactor = waitIncreaseFactor;
}
public void ... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\interceptor\RetryInterceptor.java | 1 |
请完成以下Java代码 | public Set<String> getOptions() {
return Collections.singleton(command.getName());
}
@Override
public String getUsageHelp() {
return command.getDescription();
}
});
}
}
return help;
}
private boolean isHelpShown(Command command) {
return !(command instanceof HelpCommand... | Log.info("");
if (command.getUsageHelp() != null) {
Log.info("usage: " + this.commandRunner.getName() + command.getName() + " "
+ command.getUsageHelp());
Log.info("");
}
if (command.getHelp() != null) {
Log.info(command.getHelp());
}
Collection<HelpExample> examples = command.... | repos\spring-boot-4.0.1\cli\spring-boot-cli\src\main\java\org\springframework\boot\cli\command\core\HelpCommand.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.