instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public class ClassPathChangedEvent extends ApplicationEvent {
private final Set<ChangedFiles> changeSet;
private final boolean restartRequired;
/**
* Create a new {@link ClassPathChangedEvent}.
* @param source the source of the event
* @param changeSet the changed files
* @param restartRequired if a resta... | int modified = 0;
for (ChangedFiles changedFiles : this.changeSet) {
for (ChangedFile changedFile : changedFiles) {
Type type = changedFile.getType();
if (type == Type.ADD) {
added++;
}
else if (type == Type.DELETE) {
deleted++;
}
else if (type == Type.MODIFY) {
modified++;
... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\classpath\ClassPathChangedEvent.java | 1 |
请完成以下Java代码 | public void setBackground (Color bg)
{
if (bg.equals(getBackground()))
return;
super.setBackground(bg);
} // setBackground
/**
* Set Editor to value
* @param value value of the editor
*/
@Override
public void setValue (Object value)
{
if (value == null)
setText("");
else
setText(value.... | */
@Override
public void keyPressed(KeyEvent e)
{
} // keyPressed
/**
* key Released
* @see java.awt.event.KeyListener#keyReleased(java.awt.event.KeyEvent)
* @param e
*/
@Override
public void keyReleased(KeyEvent e)
{
} // keyReleased
/**
* key Typed
* @see java.awt.event.KeyListener#keyTyped(... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CTextField.java | 1 |
请完成以下Java代码 | public de.metas.vertical.pharma.vendor.gateway.msv3.model.I_MSV3_VerfuegbarkeitsanfrageEinzelne getMSV3_VerfuegbarkeitsanfrageEinzelne() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_MSV3_VerfuegbarkeitsanfrageEinzelne_ID, de.metas.vertical.pharma.vendor.gateway.msv3.model.I_MSV3_VerfuegbarkeitsanfrageEi... | set_ValueNoCheck (COLUMNNAME_MSV3_VerfuegbarkeitsanfrageEinzelne_ID, null);
else
set_ValueNoCheck (COLUMNNAME_MSV3_VerfuegbarkeitsanfrageEinzelne_ID, Integer.valueOf(MSV3_VerfuegbarkeitsanfrageEinzelne_ID));
}
/** Get MSV3_VerfuegbarkeitsanfrageEinzelne.
@return MSV3_VerfuegbarkeitsanfrageEinzelne */
@Ove... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_VerfuegbarkeitsanfrageEinzelne_Artikel.java | 1 |
请完成以下Java代码 | public Mono<MultipleArticlesView> findArticles(String tag, String author, String favoritedByUser, int offset, int limit, Optional<User> currentUser) {
return articlesFinder.findArticles(tag, author, favoritedByUser, offset, limit, currentUser);
}
public Mono<ArticleView> getArticle(String slug, Optiona... | public Mono<ArticleView> favoriteArticle(String slug, User currentUser) {
return articleRepository.findBySlug(slug)
.map(article -> {
currentUser.favorite(article);
return ArticleView.ofOwnArticle(article, currentUser);
});
}
publi... | repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\article\ArticleFacade.java | 1 |
请完成以下Java代码 | public int getAD_WF_NodeNext_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_WF_NodeNext_ID);
}
/**
* AndOr AD_Reference_ID=204
* Reference name: AD_Find AndOr
*/
public static final int ANDOR_AD_Reference_ID=204;
/** And = A */
public static final String ANDOR_And = "A";
/** OR = O */
public static final... | return get_ValueAsString(COLUMNNAME_Operation);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
@Override
public void setValue (final java.lang.String Value)
{
set_Value (COLUMN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_NextCondition.java | 1 |
请完成以下Java代码 | public List<String> map(ConfigurationPropertyName configurationPropertyName) {
// Use a local copy in case another thread changes things
LastMapping<ConfigurationPropertyName, List<String>> last = this.lastMappedConfigurationPropertyName;
if (last != null && last.isFrom(configurationPropertyName)) {
return las... | private static class LastMapping<T, M> {
private final T from;
private final M mapping;
LastMapping(T from, M mapping) {
this.from = from;
this.mapping = mapping;
}
boolean isFrom(T from) {
return ObjectUtils.nullSafeEquals(from, this.from);
}
M getMapping() {
return this.mapping;
}
}... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\source\DefaultPropertyMapper.java | 1 |
请完成以下Java代码 | public final void notifyRecordsChanged(
@NonNull final TableRecordReferenceSet recordRefs,
final boolean watchedByFrontend)
{
if (recordRefs.isEmpty())
{
return; // nothing to do, but shall not happen
}
final TableRecordReferenceSet recordRefsEligible = recordRefs.filter(this::isEligibleInvalidateEve... | }
protected final DocumentIdsSelection getDocumentIdsToInvalidate(@NonNull final TableRecordReferenceSet recordRefs)
{
return rowsData.getDocumentIdsToInvalidate(recordRefs);
}
// extends IEditableView.patchViewRow
public final void patchViewRow(final RowEditingContext ctx, final List<JSONDocumentChangedEvent>... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\template\AbstractCustomView.java | 1 |
请完成以下Java代码 | public void fatalError(SAXParseException spe) throws SAXException {
String message = "Fatal Error: " + getParseExceptionInfo(spe);
throw new SAXException(message);
}
}
/**
* Get an empty DOM document
*
* @param documentBuilderFactory the factory to build to DOM document
* @return the ne... | * @throws ModelParseException if a parsing or IO error is triggered
*/
public static DomDocument parseInputStream(DocumentBuilderFactory documentBuilderFactory, InputStream inputStream) {
try {
DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
documentBuilder.setErrorH... | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\util\DomUtil.java | 1 |
请完成以下Java代码 | public class ExtendedReflectionToStringBuilder extends org.apache.commons.lang3.builder.ReflectionToStringBuilder
{
public ExtendedReflectionToStringBuilder(Object object, ToStringStyle style, StringBuffer buffer)
{
super(object, style, buffer);
}
public ExtendedReflectionToStringBuilder(Object object, ToStringS... | {
if (!super.accept(field))
{
return false;
}
final ToStringBuilder toStringBuilder = field.getAnnotation(ToStringBuilder.class);
if (toStringBuilder != null && toStringBuilder.skip())
{
return false;
}
return true;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\text\ExtendedReflectionToStringBuilder.java | 1 |
请完成以下Java代码 | public boolean isCreateOverviewVariable() {
return createOverviewVariable;
}
public void setCreateOverviewVariable(boolean createOverviewVariable) {
this.createOverviewVariable = createOverviewVariable;
}
@Override
public VariableAggregationDefinition clone() {
VariableAggr... | return target;
}
public void setTarget(String target) {
this.target = target;
}
public String getTargetExpression() {
return targetExpression;
}
public void setTargetExpression(String targetExpression) {
this.targetExpression = targe... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\VariableAggregationDefinition.java | 1 |
请完成以下Java代码 | public static int findLargestNumberUsingArithmetic(int num, int k) {
for (int j = 0; j < k; j++) {
int result = 0;
int i = 1;
while (num / i > 0) {
int temp = (num / (i * 10))
* i
+ (num % i);
i... | while (k > 0 && !stack.isEmpty() && stack.peek() < digit) {
stack.pop();
k--;
}
stack.push(digit);
}
while (k > 0) {
stack.pop();
k--;
}
StringBuilder result = new StringBuilder();
while (!stack.is... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-8\src\main\java\com\baeldung\algorithms\largestNumberRemovingK\LargestNumberRemoveKDigits.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private JSONArray getItemHintProviders(ItemHint hint) throws Exception {
JSONArray providers = new JSONArray();
for (ItemHint.ValueProvider provider : hint.getProviders()) {
providers.put(getItemHintProvider(provider));
}
return providers;
}
private JSONObject getItemHintProvider(ItemHint.ValueProvider pr... | JSONArray array = new JSONArray();
int length = Array.getLength(value);
for (int i = 0; i < length; i++) {
array.put(Array.get(value, i));
}
defaultValue = array;
}
return defaultValue;
}
private static final class ItemMetadataComparator implements Comparator<ItemMetadata> {
private static fi... | repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\metadata\JsonConverter.java | 2 |
请完成以下Java代码 | public @Nullable OneTimeToken consume(OneTimeTokenAuthenticationToken authenticationToken) {
OneTimeToken ott = this.oneTimeTokenByToken.remove(authenticationToken.getTokenValue());
if (ott == null || isExpired(ott)) {
return null;
}
return ott;
}
private void cleanExpiredTokensIfNeeded() {
if (this.one... | private boolean isExpired(OneTimeToken ott) {
return this.clock.instant().isAfter(ott.getExpiresAt());
}
/**
* Sets the {@link Clock} used when generating one-time token and checking token
* expiry.
* @param clock the clock
*/
public void setClock(Clock clock) {
Assert.notNull(clock, "clock cannot be nu... | repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\ott\InMemoryOneTimeTokenService.java | 1 |
请完成以下Java代码 | public void receive(Message message) {
// Print source and dest with message
String line = "Message received from: " + message.getSrc() + " to: " + message.getDest() + " -> " + message.getObject();
// Only track the count of broadcast messages
// Tracking direct message would make for a... | // is done inside the JChannel's thread, we don't have to worry about synchronizing
// messageCount. For production code it should be synchronized!
try {
// Deserialize
messageCount = Util.objectFromStream(new DataInputStream(input));
} catch (Exception e) {
S... | repos\tutorials-master\messaging-modules\jgroups\src\main\java\com\baeldung\jgroups\JGroupsMessenger.java | 1 |
请完成以下Java代码 | public void filter(final List<IQualityInvoiceLineGroup> groups)
{
for (final Iterator<IQualityInvoiceLineGroup> it = groups.iterator(); it.hasNext();)
{
final IQualityInvoiceLineGroup group = it.next();
final QualityInvoiceLineGroupType type = group.getQualityInvoiceLineGroupType();
if (!hasType(type))
... | public void sort(final List<IQualityInvoiceLineGroup> lines)
{
Collections.sort(lines, this);
}
/**
* Remove from given lines those which their type is not specified in our list. Then sort the result.
*
* NOTE: we assume the list is read-write.
*
* @param lines
*/
public void filterAndSort(final List... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\invoicing\QualityInvoiceLineGroupByTypeComparator.java | 1 |
请完成以下Java代码 | public void setM_HU_ID (final int M_HU_ID)
{
if (M_HU_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_HU_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_HU_ID, M_HU_ID);
}
@Override
public int getM_HU_ID()
{
return get_ValueAsInt(COLUMNNAME_M_HU_ID);
}
@Override
public void setM_InOutLine_ID (final int M... | public int getM_InOutLine_ID()
{
return get_ValueAsInt(COLUMNNAME_M_InOutLine_ID);
}
@Override
public void setValue (final @Nullable java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
@Override
public java.lang.String getValue()
{
return get_ValueAsString(COLUMNNAME_Value);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_M_InOutLine_HU_IPA_SSCC18_v.java | 1 |
请完成以下Spring Boot application配置 | spring:
# datasource 数据源配置内容
datasource:
# 订单数据源配置
orders:
url: jdbc:mysql://127.0.0.1:3306/test_orders?useSSL=false&useUnicode=true&characterEncoding=UTF-8
driver-class-name: com.mysql.jdbc.Driver
username: root
password:
# HikariCP 自定义配置,对应 HikariConfig 配置属性类
hikari:
... | er-class-name: com.mysql.jdbc.Driver
username: root
password:
# HikariCP 自定义配置,对应 HikariConfig 配置属性类
hikari:
minimum-idle: 15 # 池中维护的最小空闲连接数,默认为 10 个。
maximum-pool-size: 15 # 池中最大连接数,包括闲置和使用中的连接,默认为 10 个。 | repos\SpringBoot-Labs-master\lab-19\lab-19-datasource-pool-hikaricp-multiple\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | class InvalidConfigurationPropertyNameFailureAnalyzer
extends AbstractFailureAnalyzer<InvalidConfigurationPropertyNameException> {
@Override
protected FailureAnalysis analyze(Throwable rootFailure, InvalidConfigurationPropertyNameException cause) {
BeanCreationException exception = findCause(rootFailure, BeanCre... | String invalid = cause.getInvalidCharacters().stream().map(this::quote).collect(Collectors.joining(", "));
description.append(String.format("%n Invalid characters: %s", invalid));
if (exception != null) {
description.append(String.format("%n Bean: %s", exception.getBeanName()));
}
description.append(St... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\diagnostics\analyzer\InvalidConfigurationPropertyNameFailureAnalyzer.java | 1 |
请完成以下Java代码 | public class MChatType extends X_CM_ChatType
{
/**
*
*/
private static final long serialVersionUID = -7933150405119053730L;
/**
* Get MChatType from Cache
* @param ctx context
* @param CM_ChatType_ID id
* @return MChatType
*/
public static MChatType get (Properties ctx, int CM_ChatType_ID)
{
Int... | * Standard Constructor
* @param ctx context
* @param CM_ChatType_ID id
* @param trxName transaction
*/
public MChatType (Properties ctx, int CM_ChatType_ID, String trxName)
{
super (ctx, CM_ChatType_ID, trxName);
if (CM_ChatType_ID == 0)
setModerationType (MODERATIONTYPE_NotModerated);
} // MChatType... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MChatType.java | 1 |
请完成以下Java代码 | public void add_M_HU_PI_Item_Product(final I_M_ForecastLine forecastLine)
{
final IHUDocumentHandlerFactory huDocumentHandlerFactory = Services.get(IHUDocumentHandlerFactory.class);
final IHUDocumentHandler handler = huDocumentHandlerFactory.createHandler(I_M_ForecastLine.Table_Name);
if (null != handler)
{
... | {
final IHUPackingAware packingAware = new ForecastLineHUPackingAware(forecastLine);
final Integer qtyPacks = packingAware.getQtyTU().intValue();
Services.get(IHUPackingAwareBL.class).setQtyCUFromQtyTU(packingAware, qtyPacks);
}
private void updateQtyPacks(final I_M_ForecastLine forecastLine)
{
final IHUPac... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\model\validator\M_ForecastLine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void deleteTable(String tableName) {
StringBuilder sb = new StringBuilder("DROP TABLE IF EXISTS ").append(tableName);
final String query = sb.toString();
session.execute(query);
}
private ResultSet executeStatement(SimpleStatement statement, String keyspace) {
if (keyspa... | return preparedStatement.bind(productId, UUID.randomUUID(),
product.getProductName(),
product.getDescription(),
product.getPrice());
}
private BoundStatement getProductInsertStatement(Product product,UUID productId,String productTableName) {
String cqlQuery1 = new Str... | repos\tutorials-master\persistence-modules\java-cassandra\src\main\java\com\baeldung\cassandra\batch\repository\ProductRepository.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public List<ProductOrderEntity> getProductOrderList() {
return productOrderList;
}
public void setProductOrderList(List<ProductOrderEntity> productOrderList) {
this.productOrderList = productOrderList;
}
public OrderStateEnum getOrderStateEnum() {
return orderStateEnum;
}
... | this.locationEntity = locationEntity;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getExpressNo() {
return expressNo;
}
public void setExpressNo(String expressNo) {
this.exp... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\order\OrdersEntity.java | 2 |
请完成以下Java代码 | public Builder withId(String id) {
this.id = id;
return this;
}
/**
* Builder method for eventName parameter.
* @param eventName field to set
* @return builder
*/
public Builder withEventName(String eventName) {
this.eventN... | /**
* Builder method for activityId parameter.
* @param activityId field to set
* @return builder
*/
public Builder withActivityId(String activityId) {
this.activityId = activityId;
return this;
}
/**
* Builder method for crea... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\MessageSubscriptionImpl.java | 1 |
请完成以下Java代码 | public boolean isBlocking() {
return blocking;
}
public void setBlocking(boolean blocking) {
this.blocking = blocking;
}
public String getBlockingExpression() {
return blockingExpression;
}
public void setBlockingExpression(String blockingExpression) {
this... | public boolean isAsyncLeaveExclusive() {
return asyncLeaveExclusive;
}
public void setAsyncLeaveExclusive(boolean asyncLeaveExclusive) {
this.asyncLeaveExclusive = asyncLeaveExclusive;
}
public void setValues(Task otherElement) {
super.setValues(otherElement);
setBlocking(otherElement.isBlocki... | repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\Task.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ResponseEntity<Foo> postFoo(@RequestBody final Foo foo) {
fooRepository.put(foo.getId(), foo);
final URI location = ServletUriComponentsBuilder
.fromCurrentServletMapping()
.path("/foos/{id}")
.build()
.expand(foo.getId())
... | }
@RequestMapping(method = RequestMethod.DELETE, value = "/foos/{id}")
@ResponseStatus(HttpStatus.OK)
@ResponseBody
public long deleteFoo(@PathVariable final long id) {
fooRepository.remove(id);
return id;
}
@RequestMapping(method = RequestMethod.POST, value = "/foos/form", pro... | repos\tutorials-master\spring-web-modules\spring-resttemplate\src\main\java\com\baeldung\resttemplate\configuration\FooController.java | 2 |
请完成以下Java代码 | public void setSource(final Object model)
{
if (model instanceof IHUPackingAware)
{
record = (IHUPackingAware)model;
}
else if (InterfaceWrapperHelper.isInstanceOf(model, I_C_Order.class))
{
final I_C_Order order = InterfaceWrapperHelper.create(model, I_C_Order.class);
record = new OrderHUPackingAwa... | applyOnOrderLine(orderLine);
}
public void applyOnOrderLine(final I_C_OrderLine orderLine)
{
final IHUPackingAware to = new OrderLineHUPackingAware(orderLine);
Services.get(IHUPackingAwareBL.class).prepareCopyFrom(record)
.overridePartner(false)
.copyTo(to);
}
@Override
public boolean isCreateNewRe... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\OrderLineHUPackingGridRowBuilder.java | 1 |
请完成以下Java代码 | protected void validateParams(String userId, String groupId, String processInstanceId, String type) {
if (processInstanceId == null) {
throw new ActivitiIllegalArgumentException("processInstanceId is null");
}
if (type == null) {
throw new ActivitiIllegalArgumentExceptio... | if (processInstance == null) {
throw new ActivitiObjectNotFoundException(
"Cannot find process instance with id " + processInstanceId,
ExecutionEntity.class
);
}
executeInternal(commandContext, processInstance);
return null;
}
pro... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\DeleteIdentityLinkForProcessInstanceCmd.java | 1 |
请完成以下Java代码 | public void setRef_RMA_ID (int Ref_RMA_ID)
{
if (Ref_RMA_ID < 1)
set_Value (COLUMNNAME_Ref_RMA_ID, null);
else
set_Value (COLUMNNAME_Ref_RMA_ID, Integer.valueOf(Ref_RMA_ID));
}
/** Get Referenced RMA.
@return Referenced RMA */
@Override
public int getRef_RMA_ID ()
{
Integer ii = (Integer)get_V... | if (SalesRep_ID < 1)
set_Value (COLUMNNAME_SalesRep_ID, null);
else
set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID));
}
/** Get Vertriebsbeauftragter.
@return Sales Representative or Company Agent
*/
@Override
public int getSalesRep_ID ()
{
Integer ii = (Integer)get_Value(COLUMNN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_RMA.java | 1 |
请完成以下Spring Boot application配置 | #primary
spring.datasource.druid.one.url=jdbc:mysql://localhost:3306/test1?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true
spring.datasource.druid.one.username=root
spring.datasource.druid.one.password=root
spring.datasource.druid.one.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.d... | =false
# \u662F\u5426\u6253\u5F00PSCache\uFF0C
spring.datasource.druid.poolPreparedStatements=true
#\u5E76\u4E14\u6307\u5B9A\u6BCF\u4E2A\u8FDE\u63A5\u4E0APSCache\u7684\u5927\u5C0F
spring.datasource.druid.maxPoolPreparedStatementPerConnectionSize=20
#\u914D\u7F6E\u76D1\u63A7\u7EDF\u8BA1\u62E6\u622A\u7684filters
spring.d... | repos\spring-boot-leaning-master\2.x_42_courses\第 3-7 课: Spring Boot 集成 Druid 监控数据源\spring-boot-multi-Jpa-druid\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public ResponseEntity<Foo> getFooById(@Parameter(description = "id of foo to be searched") @PathVariable("id") String id) {
Optional<Foo> foo = repository.findById(Long.valueOf(id));
return foo.isPresent() ? new ResponseEntity<>(foo.get(), HttpStatus.OK) : new ResponseEntity<>(HttpStatus.NOT_FOUND);
... | repository.deleteById(id);
} catch (Exception e) {
return new ResponseEntity<>(HttpStatus.BAD_REQUEST);
}
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Operation(summary = "Update a foo")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", des... | repos\tutorials-master\spring-boot-modules\spring-boot-springdoc-2\src\main\java\com\baeldung\restdocopenapi\springdoc\FooBarController.java | 1 |
请完成以下Java代码 | public class Weather {
@SerializedName(value = "location", alternate = "place")
private String location;
@SerializedName(value = "temp", alternate = "temperature")
private int temp;
@SerializedName(value = "outlook", alternate = "weather")
private String outlook;
public String getLocatio... | return temp;
}
public void setTemp(int temp) {
this.temp = temp;
}
public String getOutlook() {
return outlook;
}
public void setOutlook(String outlook) {
this.outlook = outlook;
}
} | repos\tutorials-master\json-modules\gson\src\main\java\com\baeldung\gson\entities\Weather.java | 1 |
请完成以下Java代码 | private static void updateBillToAndShipToFlags(
@NonNull final I_I_BPartner importRecord,
@NonNull final I_C_BPartner_Location bpartnerLocation)
{
bpartnerLocation.setIsShipToDefault(importRecord.isShipToDefault());
bpartnerLocation.setIsShipTo(extractIsShipTo(importRecord));
bpartnerLocation.setIsBillToDe... | {
bpartnerLocation.setFax(importRecord.getFax());
}
}
private void fireImportValidator(
@NonNull final I_I_BPartner importRecord,
@NonNull final I_C_BPartner_Location bpartnerLocation)
{
ModelValidationEngine.get().fireImportValidate(process, importRecord, bpartnerLocation, IImportInterceptor.TIMING_AF... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\impexp\BPartnerLocationImportHelper.java | 1 |
请完成以下Java代码 | private void createNotice(final I_M_Product product, final String msg)
{
final String productValue = product != null ? product.getValue() : "-";
addLog("WARNING: Product " + productValue + ": " + msg);
}
@lombok.Value(staticConstructor = "of")
private static class Context
{
@NonNull I_M_Product product;
@... | private static class RoutingActivitySegmentCost
{
public static Collector<RoutingActivitySegmentCost, ?, Map<CostElementId, BigDecimal>> groupByCostElementId()
{
return Collectors.groupingBy(RoutingActivitySegmentCost::getCostElementId, sumCostsAsBigDecimal());
}
private static Collector<RoutingActivitySeg... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\process\RollupWorkflow.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UniqueFieldController {
@Autowired
private SaleRepository saleRepo;
@Autowired
private CompanyRepository companyRepo;
@Autowired
private CustomerRepository customerRepo;
@Autowired
private AssetRepository assetRepo;
@PostMapping("/sale")
public Sale post(@Request... | return companyRepo.findById(id);
}
@PostMapping("/customer")
public Customer post(@RequestBody Customer customer) {
return customerRepo.insert(customer);
}
@GetMapping("/customer/{id}")
public Optional<Customer> getCustomer(@PathVariable String id) {
return customerRepo.findByI... | repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb-2\src\main\java\com\baeldung\boot\unique\field\web\UniqueFieldController.java | 2 |
请完成以下Java代码 | public final int getM_LocatorTo_ID()
{
final I_M_MovementLine movementLine = getModel(I_M_MovementLine.class);
return movementLine.getM_LocatorTo_ID();
}
@Value
@Builder
private static class MovementLineCostAmounts
{
AggregatedCostAmount outboundCosts;
AggregatedCostAmount inboundCosts;
}
public final... | .date(getDateAcctAsInstant())
.build())
.toAggregatedCostAmount();
return MoveCostsResult.builder()
.outboundCosts(outboundCosts)
.inboundCosts(inboundCosts)
.build();
}
else
{
return services.moveCosts(MoveCostsRequest.builder()
.acctSchemaId(as.getId())
.clientId(ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\DocLine_Movement.java | 1 |
请完成以下Java代码 | class NameOffsetLookups {
public static final NameOffsetLookups NONE = new NameOffsetLookups(0, 0);
private final int offset;
private final BitSet enabled;
NameOffsetLookups(int offset, int size) {
this.offset = offset;
this.enabled = (size != 0) ? new BitSet(size) : null;
}
void swap(int i, int j) {
i... | int enable(int index, boolean enable) {
if (this.enabled != null) {
this.enabled.set(index, enable);
}
return (!enable) ? 0 : this.offset;
}
boolean isEnabled(int index) {
return (this.enabled != null && this.enabled.get(index));
}
boolean hasAnyEnabled() {
return this.enabled != null && this.enabled... | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\zip\NameOffsetLookups.java | 1 |
请完成以下Java代码 | public <T> T[] toArray(T[] a) {
return deque.toArray(a);
}
@Override
public boolean add(E e) {
return deque.add(e);
}
@Override
public boolean remove(Object o) {
return deque.remove(o);
}
@Override
public boolean containsAll(Collection<?> c) {
retur... | public boolean addAll(Collection<? extends E> c) {
return deque.addAll(c);
}
@Override
public boolean removeAll(Collection<?> c) {
return deque.removeAll(c);
}
@Override
public boolean retainAll(Collection<?> c) {
return deque.retainAll(c);
}
@Override
publ... | repos\tutorials-master\core-java-modules\core-java-collections-4\src\main\java\com\baeldung\collections\dequestack\ArrayLifoStack.java | 1 |
请完成以下Java代码 | protected void applyFilters(BatchQuery query) {
if (batchId != null) {
query.batchId(batchId);
}
if (type != null) {
query.type(type);
}
if (TRUE.equals(withoutTenantId)) {
query.withoutTenantId();
}
if (tenantIds != null && !tenantIds.isEmpty()) {
query.tenantIdIn(te... | }
if (FALSE.equals(suspended)) {
query.active();
}
}
protected void applySortBy(BatchQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) {
if (sortBy.equals(SORT_BY_BATCH_ID_VALUE)) {
query.orderById();
}
else if (sortBy.equals(SORT_BY_TENANT_ID_VALUE))... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\batch\BatchQueryDto.java | 1 |
请完成以下Java代码 | public IVendorReceipt<I_M_InOutLine> getVendorReceiptForPLV(final I_M_PriceList_Version plv)
{
return getPricingInfo().getVendorReceiptForPLV(plv);
}
@Override
public IQualityInspectionOrder getQualityInspectionOrderOrNull()
{
final List<IQualityInspectionOrder> qualityInspectionOrders = getQualityInspectionO... | public void linkModelToMaterialTracking(final Object model)
{
final I_M_Material_Tracking materialTracking = getM_Material_Tracking();
materialTrackingBL.linkModelToMaterialTracking(
MTLinkRequest.builder()
.model(model)
.materialTrackingRecord(materialTracking)
.build());
}
@Override
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\MaterialTrackingDocuments.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CustomQueryBook {
@Id
private Long id;
private String title;
public CustomQueryBook() {
}
public CustomQueryBook(long id, String title) {
this.id = id;
this.title = title;
}
public void setId(Long id) { | this.id = id;
}
public Long getId() {
return id;
}
public void setTitle(String title) {
this.title = title;
}
public String getTitle() {
return title;
}
} | repos\tutorials-master\persistence-modules\spring-data-jpa-repo-4\src\main\java\com\baeldung\spring\insertableonly\query\CustomQueryBook.java | 2 |
请完成以下Java代码 | public static Collector<Quantity, ?, MixedQuantity> collectAndSum()
{
return GuavaCollectors.collectUsingListAccumulator(de.metas.quantity.MixedQuantity::sumOf);
}
public static MixedQuantity sumOf(@NonNull final Collection<Quantity> collection)
{
if (collection.isEmpty())
{
return EMPTY;
}
final Has... | {
if (map.isEmpty())
{
return Optional.empty();
}
else if (map.size() == 1)
{
return map.values().stream().findFirst();
}
else
{
throw new AdempiereException("Expected none or single value but got many: " + map.values());
}
}
public MixedQuantity add(@NonNull final Quantity qtyToAdd)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\quantity\MixedQuantity.java | 1 |
请完成以下Java代码 | public long countByTenantId(TenantId tenantId) {
return dashboardDao.countByTenantId(tenantId);
}
@Override
public EntityType getEntityType() {
return EntityType.DASHBOARD;
}
private class CustomerDashboardsRemover extends PaginatedRemover<Customer, DashboardInfo> {
privat... | }
private class CustomerDashboardsUpdater extends PaginatedRemover<Customer, DashboardInfo> {
private final Customer customer;
CustomerDashboardsUpdater(Customer customer) {
this.customer = customer;
}
@Override
protected PageData<DashboardInfo> findEntities(T... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\dashboard\DashboardServiceImpl.java | 1 |
请完成以下Java代码 | public String getTransactionId() {
return transactionId;
}
public void setTransactionId(String transactionId) {
this.transactionId = transactionId;
}
public Double getAmount() {
return amount;
}
public void setAmount(Double amount) {
this.amount = amount;
} | public String getCurrency() {
return currency;
}
public void setCurrency(String currency) {
this.currency = currency;
}
public String getRecipient() {
return recipient;
}
public void setRecipient(String recipient) {
this.recipient = recipient;
}
} | repos\tutorials-master\spring-web-modules\spring-resttemplate-3\src\main\java\com\baeldung\xmlpost\model\PaymentRequest.java | 1 |
请完成以下Java代码 | public class BlueprintELResolver extends ELResolver {
private static final Logger LOGGER = LoggerFactory.getLogger(BlueprintELResolver.class);
private Map<String, JavaDelegate> delegateMap = new HashMap<>();
private Map<String, ActivityBehavior> activityBehaviourMap = new HashMap<>();
@Override
pu... | String name = (String) props.get("osgi.service.blueprint.compname");
if (activityBehaviourMap.containsKey(name)) {
activityBehaviourMap.remove(name);
}
LOGGER.info("removed Flowable service from activity behaviour cache {}", name);
}
@Override
public boolean isReadOnly(E... | repos\flowable-engine-main\modules\flowable-osgi\src\main\java\org\flowable\osgi\blueprint\BlueprintELResolver.java | 1 |
请完成以下Java代码 | public class QuickSort {
public static void quickSort(int arr[], int begin, int end)
{
if (begin < end) {
int partitionIndex = partition(arr, begin, end);
// Recursively sort elements of the 2 sub-arrays
quickSort(arr, begin, partitionIndex-1);
quickSort... | for (int j=begin; j<end; j++)
{
if (arr[j] <= pivot) {
i++;
int swapTemp = arr[i];
arr[i] = arr[j];
arr[j] = swapTemp;
}
}
int swapTemp = arr[i+1];
arr[i+1] = arr[end];
arr[end] = swapTemp;
... | repos\tutorials-master\algorithms-modules\algorithms-sorting\src\main\java\com\baeldung\algorithms\quicksort\QuickSort.java | 1 |
请完成以下Java代码 | public static void main(String[] args) throws Exception
{
if (Check.isEmpty(System.getProperty("PropertyFile"), true))
{
throw new AdempiereException("Please set the PropertyFile");
}
final String outputFolder = System.getProperty("OutputFolder");
if (Check.isEmpty(outputFolder, true))
{
throw new A... | .setAD_Process_ID(-1) // N/A
.setClassname(GenerateCanonicalXSD.class.getName())
.addParameter(PARAM_Target_Directory, outputFolder)
.addParameter(PARAM_EntityType, entityType)
.build();
final GenerateCanonicalXSD process = new GenerateCanonicalXSD();
process.p_FilterBy_AD_Client_ID = false;
Log... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\esb\process\GenerateCanonicalXSD.java | 1 |
请完成以下Java代码 | public List<Fact> createFacts(final AcctSchema as)
{
final Fact fact = new Fact(this, as, PostingType.Actual);
setC_Currency_ID(as.getCurrencyId());
getDocLines().forEach(line -> createFactsForMovementLine(fact, line));
return ImmutableList.of(fact);
}
private void createFactsForMovementLine(final Fact fa... | //
// InventoryTo DR/CR (to locator)
final CostAmount inboundCosts = costs.getInboundAmountToPost(as);
fact.createLine()
.setDocLine(line)
.setAccount(line.getAccount(ProductAcctType.P_Asset_Acct, as))
.setAmtSourceDrOrCr(inboundCosts.toMoney()) // to (+) DR
.setQty(line.getQty()) // incoming
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc_Movement.java | 1 |
请完成以下Java代码 | public static class CustomerHolder {
public static CustomerHolder from(Customer customer) {
return new CustomerHolder(customer);
}
private boolean cacheMiss = true;
private final Customer customer;
protected CustomerHolder(Customer customer) {
Assert.notNull(customer, "Customer must not be null");
... | this.cacheMiss = cacheMiss;
return this;
}
public boolean isCacheMiss() {
return this.cacheMiss;
}
public Customer getCustomer() {
return customer;
}
}
}
// end::class[] | repos\spring-boot-data-geode-main\spring-geode-samples\caching\multi-site\src\main\java\example\app\caching\multisite\client\web\CustomerController.java | 1 |
请完成以下Java代码 | public String getCostCalculationMethod()
{
return get_ValueAsString(COLUMNNAME_CostCalculationMethod);
}
@Override
public void setCostCalculation_Percentage (final @Nullable BigDecimal CostCalculation_Percentage)
{
set_Value (COLUMNNAME_CostCalculation_Percentage, CostCalculation_Percentage);
}
@Override
... | if (Created_OrderLine_ID < 1)
set_ValueNoCheck (COLUMNNAME_Created_OrderLine_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Created_OrderLine_ID, Created_OrderLine_ID);
}
@Override
public int getCreated_OrderLine_ID()
{
return get_ValueAsInt(COLUMNNAME_Created_OrderLine_ID);
}
@Override
public void ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Order_Cost.java | 1 |
请完成以下Java代码 | public void setDLM_Referencing_Column_ID(final int DLM_Referencing_Column_ID)
{
if (DLM_Referencing_Column_ID < 1)
{
set_Value(COLUMNNAME_DLM_Referencing_Column_ID, null);
}
else
{
set_Value(COLUMNNAME_DLM_Referencing_Column_ID, Integer.valueOf(DLM_Referencing_Column_ID));
}
}
/**
* Get Referenz... | {
set_Value(COLUMNNAME_IsPartitionBoundary, Boolean.valueOf(IsPartitionBoundary));
}
/**
* Get Partitionsgrenze.
*
* @return Falls ja, dann gehören Datensatze, die über die jeweilige Referenz verknüpft sind nicht zur selben Partition.
*/
@Override
public boolean isPartitionBoundary()
{
final Object o... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition_Config_Reference.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected CassandraToSqlColumn getColumn(String sqlColumnName) {
return this.columns.stream().filter(col -> col.getSqlColumnName().equals(sqlColumnName)).findFirst().get();
}
protected CassandraToSqlColumnData getColumnData(CassandraToSqlColumnData[] data, String sqlColumnName) {
CassandraToSql... | StringBuilder insertStatementBuilder = new StringBuilder();
insertStatementBuilder.append("INSERT INTO ").append(this.sqlTableName).append(" (");
for (CassandraToSqlColumn column : columns) {
insertStatementBuilder.append(column.getSqlColumnName()).append(",");
}
insertStatem... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\install\migrate\CassandraToSqlTable.java | 2 |
请完成以下Java代码 | public boolean isSecretRequired() {
return this.clientSecret != null;
}
/**
* 是否有 scopes
*
* @return 结果
*/
@Override
public boolean isScoped() {
return this.scopes != null && !this.scopes.isEmpty();
}
/**
* scopes
*
* @return scopes
*/
... | * 所以在 spring security 的默认实现中直接给的是空的一个集合
* 这里我们也给他一个空的把
*
* @return GrantedAuthority
*/
@Override
public Collection<GrantedAuthority> getAuthorities() {
return Collections.emptyList();
}
/**
* 判断是否自动授权
*
* @param scope scope
* @return 结果
*/
@Overr... | repos\spring-boot-demo-master\demo-oauth\oauth-authorization-server\src\main\java\com\xkcoding\oauth\entity\SysClientDetails.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8088
spring:
datasource:
quartz:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/demo?serverTimezone=GMT%2B8
username: root
password: 123456
quartz:
job-store-type: jdbc # 使用数据库存储
scheduler-name: hyhScheduler # 相同 Scheduler 名字的节点,形成一个 ... | te
tablePrefix: QRTZ_ # Quartz 表前缀
isClustered: true # 是集群模式
clusterCheckinInterval: 1000
useProperties: false
# 线程池相关配置
threadPool:
threadCount: 25 # 线程池大小。默认为 10 。
threadPriority: 5 # 线程优先级
class: org.quartz.simpl.... | repos\springboot-demo-master\quartz\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public String getDatabaseCatalog() {
return databaseCatalog;
}
public ProcessEngineConfiguration setDatabaseCatalog(String databaseCatalog) {
this.databaseCatalog = databaseCatalog;
return this;
}
public String getDatabaseSchema() {
return databaseSchema;
}
pub... | return this;
}
public int getAsyncFailedJobWaitTime() {
return asyncFailedJobWaitTime;
}
public ProcessEngineConfiguration setAsyncFailedJobWaitTime(int asyncFailedJobWaitTime) {
this.asyncFailedJobWaitTime = asyncFailedJobWaitTime;
return this;
}
public boolean isEnab... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\ProcessEngineConfiguration.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getId() {
return id;
}
public String getBatchType() {
return batchType;
}
public Collection<String> getBatchTypes() {
return batchTypes;
}
public String getSearchKey() {
return searchKey;
}
public String getSearchKey2() {
return s... | }
public String getStatus() {
return status;
}
public String getTenantId() {
return tenantId;
}
public String getTenantIdLike() {
return tenantIdLike;
}
public boolean isWithoutTenantId() {
return withoutTenantId;
}
} | repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\BatchQueryImpl.java | 2 |
请完成以下Java代码 | private I_M_ShipperTransportation getCreateShipperTransportation(final I_M_Tour_Instance tourInstance)
{
if (_shipperTransportation != null)
{
return _shipperTransportation;
}
//
// Use the shipper transportation passed by paramters if any
_shipperTransportation = getM_ShipperTransportation_Param();
... | final ShipperId shipperId = ShipperId.ofRepoIdOrNull(p_M_Shipper_ID);
if (shipperId != null)
{
shipperTransportationBL.setShipper(shipperTransportation, shipperId);
}
shipperTransportationBL.setC_DocType(shipperTransportation);
shipperTransportation.setIsSOTrx(true);
// 07958
// also set the tour id
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\tourplanning\process\M_Tour_Instance_CreateFromSelectedDeliveryDays.java | 1 |
请完成以下Java代码 | public void setIsConsiderAttributes (final boolean IsConsiderAttributes)
{
set_Value (COLUMNNAME_IsConsiderAttributes, IsConsiderAttributes);
}
@Override
public boolean isConsiderAttributes()
{
return get_ValueAsBoolean(COLUMNNAME_IsConsiderAttributes);
}
@Override
public void setIsPickingReviewRequired ... | @Override
public void setM_Picking_Config_V2_ID (final int M_Picking_Config_V2_ID)
{
if (M_Picking_Config_V2_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Picking_Config_V2_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Picking_Config_V2_ID, M_Picking_Config_V2_ID);
}
@Override
public int getM_Picking_Config... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\picking\model\X_M_Picking_Config_V2.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected ClassLoader createReportClassLoader(final ReportContext reportContext)
{
final ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
final ClassLoader parentClassLoader;
if (developerModeBL.isEnabled())
{
parentClassLoader = JasperCompileClassLoader.builder()
.pare... | final File developmentWorkspaceDir = developerModeBL.getDevelopmentWorkspaceDir().orElse(null);
if (developmentWorkspaceDir != null)
{
return DevelopmentWorkspaceJasperDirectoriesFinder.getReportsDirectoriesForWorkspace(developmentWorkspaceDir);
}
else
{
logger.warn("No development workspace directory c... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\server\AbstractReportEngine.java | 2 |
请完成以下Spring Boot application配置 | server:
port: 8888
spring:
application:
name: gateway-application
cloud:
# Spring Cloud Gateway 配置项,对应 GatewayProperties 类
gateway:
# 路由配置项,对应 RouteDefinition 数组
routes:
- id: feign | -service-route
uri: http://127.0.0.1:8081
predicates:
- Path=/** | repos\SpringBoot-Labs-master\labx-14\labx-14-sc-skywalking-springcloudgateway\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
/**
* LayoutSection AD_Reference_ID=541981
* Reference name: MobileUI_HUManager_LayoutSection LayoutSection
*/
public static final int LAYOUTSECTION_AD_Reference_ID=541981;
/** Dis... | set_ValueNoCheck (COLUMNNAME_MobileUI_HUManager_ID, MobileUI_HUManager_ID);
}
@Override
public int getMobileUI_HUManager_ID()
{
return get_ValueAsInt(COLUMNNAME_MobileUI_HUManager_ID);
}
@Override
public void setMobileUI_HUManager_LayoutSection_ID (final int MobileUI_HUManager_LayoutSection_ID)
{
if (Mob... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MobileUI_HUManager_LayoutSection.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setTimeForPayment(BigInteger value) {
this.timeForPayment = value;
}
/**
* Gets the value of the ordrspReference property.
*
* @return
* possible object is
* {@link ReferenceType }
*
*/
public ReferenceType getOrdrspReference() {
... | *
*/
public ReferenceType getSupplierOrderReference() {
return supplierOrderReference;
}
/**
* Sets the value of the supplierOrderReference property.
*
* @param value
* allowed object is
* {@link ReferenceType }
*
*/
public void setSupp... | 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\DESADVExtensionType.java | 2 |
请完成以下Java代码 | public boolean isAvailable()
{
final GridField gridField = getEditor().getField();
if (gridField == null)
{
return false;
}
final int displayType = gridField.getDisplayType();
if (displayType == DisplayType.Text || displayType == DisplayType.URL)
{
if (gridField.getFieldLength() > gridField.getDi... | final boolean editable = editor.isReadWrite();
final String textNew = startEditor(gridField, text, editable);
if (editable)
{
gridField.getGridTab().setValue(gridField, textNew);
}
// TODO: i think is handled above
// Data Binding
// try
// {
// fireVetoableChange(m_columnName, m_oldText, getText... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\menu\TextEditorContextMenuAction.java | 1 |
请完成以下Java代码 | public Filter addAttribute(String attribute,Object entity)
{
put(attribute,entity);
return(this);
}
/**
Get rid of a current filter.
*/
public Filter removeAttribute(String attribute)
{
try
{
remove(attribute);
}
catch(NullPoin... | }
StringBuffer sb = new StringBuffer(to_split.length()+50);
StringCharacterIterator sci = new StringCharacterIterator(to_split);
int length = 0;
for (char c = sci.first(); c != CharacterIterator.DONE; c = sci.next())
{
if(String.valueOf(c).equals(" "))
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\filter\StringFilter.java | 1 |
请完成以下Java代码 | public HistoricActivityInstanceQueryImpl orderByTenantId() {
orderBy(HistoricActivityInstanceQueryProperty.TENANT_ID);
return this;
}
public HistoricActivityInstanceQueryImpl activityInstanceId(String activityInstanceId) {
this.activityInstanceId = activityInstanceId;
return thi... | public String getActivityType() {
return activityType;
}
public String getAssignee() {
return assignee;
}
public boolean isFinished() {
return finished;
}
public boolean isUnfinished() {
return unfinished;
}
public String getActivityInstanceId() {
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\HistoricActivityInstanceQueryImpl.java | 1 |
请完成以下Java代码 | public boolean containsValue(Object value) {
throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".containsValue() is not supported.");
}
@Override
public Object remove(Object key) {
throw new UnsupportedOperationException("ProcessVariableMap.remove is unsupported. ... | public Set<String> keySet() {
throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".keySet() is not supported.");
}
@Override
public Collection<Object> values() {
throw new UnsupportedOperationException(ProcessVariableMap.class.getName() + ".values() is not supporte... | repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\ProcessVariableMap.java | 1 |
请完成以下Java代码 | public static OrderedDocumentsList of(@NonNull final Document document, @NonNull final DocumentQueryOrderByList orderBys) {return new OrderedDocumentsList(ImmutableList.of(document), orderBys);}
@NonNull
public static OrderedDocumentsList ofNullable(@Nullable final Document document)
{
return document != null ? o... | documents.forEach(this::addDocument);
}
public int size()
{
return documents.size();
}
public boolean isEmpty()
{
return documents.isEmpty();
}
public Document get(final int index)
{
return documents.get(index);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\OrderedDocumentsList.java | 1 |
请完成以下Java代码 | public class DiskSpaceErrorChecker implements ErrorChecker {
private static final Logger LOG = LoggerFactory.getLogger(DiskSpaceErrorChecker.class);
private final ErrorReporter errorReporter;
private final double limit;
public DiskSpaceErrorChecker(ErrorReporter errorReporter, double limit) {
... | long usableSpace = fileStore.getUsableSpace();
double usablePercentage = ((double) usableSpace) / totalSpace;
LOG.debug("File store {} has {} of {} ({}) usable space",
fileStore, usableSpace, totalSpace, usablePercentage);
if (totalSpace > 0 && usable... | repos\tutorials-master\saas-modules\slack\src\main\java\com\baeldung\examples\slack\DiskSpaceErrorChecker.java | 1 |
请完成以下Java代码 | public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public List<Book> getBooks() {
return books;
}
public void setBooks(List<Book> books) {
this.books = books;
} | public Publisher getPublisher() {
return publisher;
}
public void setPublisher(Publisher publisher) {
this.publisher = publisher;
}
@Override
public String toString() {
return "Author{" + "id=" + id + ", name=" + name
+ ", genre=" + genre + ", age=" + age + ... | repos\Hibernate-SpringBoot-master\HibernateSpringBootFetchJoinAndQueries\src\main\java\com\bookstore\entity\Author.java | 1 |
请完成以下Java代码 | public static InvoiceDocBaseType ofDocBaseType(@NonNull final DocBaseType docBaseType)
{
return ofCode(docBaseType.getCode());
}
@Override
public String getCode()
{
return getDocBaseType().getCode();
}
public boolean isSales()
{
return getSoTrx().isSales();
}
public boolean isPurchase()
{
return g... | public boolean isVendorCreditMemo()
{
return this == VendorCreditMemo;
}
public boolean isIncomingCash()
{
return (isSales() && !isCreditMemo()) // ARI
|| (isPurchase() && isCreditMemo()) // APC
;
}
public boolean isOutgoingCash()
{
return !isIncomingCash();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\InvoiceDocBaseType.java | 1 |
请完成以下Java代码 | public void setA_User3 (String A_User3)
{
set_Value (COLUMNNAME_A_User3, A_User3);
}
/** Get A_User3.
@return A_User3 */
public String getA_User3 ()
{
return (String)get_Value(COLUMNNAME_A_User3);
}
/** Set A_User4.
@param A_User4 A_User4 */
public void setA_User4 (String A_User4)
{
set_Value ... | /** Set A_User8.
@param A_User8 A_User8 */
public void setA_User8 (String A_User8)
{
set_Value (COLUMNNAME_A_User8, A_User8);
}
/** Get A_User8.
@return A_User8 */
public String getA_User8 ()
{
return (String)get_Value(COLUMNNAME_A_User8);
}
/** Set A_User9.
@param A_User9 A_User9 */
public ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Info_Oth.java | 1 |
请完成以下Java代码 | public void setM_DistributionRun_ID (int M_DistributionRun_ID)
{
if (M_DistributionRun_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_DistributionRun_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_DistributionRun_ID, Integer.valueOf(M_DistributionRun_ID));
}
/** Get Distribution Run.
@return Distribution Run ... | /** Set Product.
@param M_Product_ID
Product, Service, Item
*/
public void setM_Product_ID (int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
}
/** Get Product.
@return Product, Service... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DistributionRunLine.java | 1 |
请完成以下Java代码 | boolean isEndOfFile() {
return this.character == -1;
}
boolean isEndOfLine() {
return this.character == -1 || (!this.escaped && this.character == '\n');
}
boolean isListDelimiter() {
return !this.escaped && this.character == ',';
}
boolean isPropertyDelimiter() {
return !this.escaped && (this... | }
}
/**
* A single document within the properties file.
*/
static class Document {
private final Map<String, OriginTrackedValue> values = new LinkedHashMap<>();
void put(String key, OriginTrackedValue value) {
if (!key.isEmpty()) {
this.values.put(key, value);
}
}
boolean isEmpty() {
re... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\env\OriginTrackedPropertiesLoader.java | 1 |
请完成以下Java代码 | public boolean isCriteriaChanged() {
return criteriaChanged;
}
public boolean hasNewChildPlanItemInstances() {
return newChildPlanItemInstances != null && newChildPlanItemInstances.size() > 0;
}
public List<PlanItemInstanceEntity> getNewChildPlanItemInstances() {
return newChil... | * Returns true, if the given plan item instance has at least one instance in completed state (only possible of course for repetition based plan items).
*
* @param planItemInstance the plan item instance to check for a completed instance of the same plan item
* @return true, if a completed instance was fo... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\agenda\PlanItemEvaluationResult.java | 1 |
请完成以下Java代码 | public Collection<Decision> getOutputDecisions() {
return outputDecisionRefCollection.getReferenceTargetElements(this);
}
public Collection<Decision> getEncapsulatedDecisions() {
return encapsulatedDecisionRefCollection.getReferenceTargetElements(this);
}
public Collection<Decision> getInputDecisions(... | .build();
encapsulatedDecisionRefCollection = sequenceBuilder.elementCollection(EncapsulatedDecisionReference.class)
.uriElementReferenceCollection(Decision.class)
.build();
inputDecisionRefCollection = sequenceBuilder.elementCollection(InputDecisionReference.class)
.uriElementReferenceColle... | repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\DecisionServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Map<String, Object> getUserInfo(String token) {
Map<String, Object> map = new HashMap(5);
String username = JwtUtil.getUsername(token);
//此处通过token只能拿到一个信息 用户账号 后面的就是根据账号获取其他信息 查询数据或是走redis 用户根据自身业务可自定义
SysUserCacheInfo userInfo = null;
try {
userInfo = sysBas... | SysUserCacheInfo userInfo = null;
try {
userInfo = sysBaseApi.getCacheUser(username);
} catch (Exception e) {
log.error("获取用户信息异常:"+ e.getMessage());
}
if(userInfo == null){
return null;
}
// 查询权限
Set<String> userPermissions = s... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\config\jimureport\JimuReportTokenService.java | 2 |
请完成以下Java代码 | public LocalDate getParameterAsLocalDate()
{
return TimeUtil.asLocalDate(m_Parameter);
}
@Nullable
public LocalDate getParameter_ToAsLocalDate()
{
return TimeUtil.asLocalDate(m_Parameter_To);
}
@Nullable
public ZonedDateTime getParameterAsZonedDateTime()
{
return TimeUtil.asZonedDateTime(m_Parameter);
... | }
@Nullable
public BigDecimal getParameter_ToAsBigDecimal()
{
return toBigDecimal(m_Parameter_To);
}
@Nullable
private static BigDecimal toBigDecimal(@Nullable final Object value)
{
if (value == null)
{
return null;
}
else if (value instanceof BigDecimal)
{
return (BigDecimal)value;
}
els... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessInfoParameter.java | 1 |
请完成以下Java代码 | public void skipAdminUserCreation(User existingUser) {
logDebug("011", "Skip creating initial Admin User, user does exist: {}", existingUser);
}
public void createInitialFilter(Filter filter) {
logInfo("015", "Create initial filter: id={} name={}", filter.getId(), filter.getName());
}
public void skip... | public void enterLicenseKeyFailed(URL licenseKeyFile, Exception e) {
logWarn("031", "Failed setting up license key: {}", licenseKeyFile, e);
}
public void configureJobExecutorPool(Integer corePoolSize, Integer maxPoolSize) {
logInfo("040", "Setting up jobExecutor with corePoolSize={}, maxPoolSize:{}", core... | repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\util\SpringBootProcessEngineLogger.java | 1 |
请完成以下Java代码 | public int getGL_Fund_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_GL_Fund_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Comment/Help.
@param Help
Comment or Hint
*/
public void setHelp (String Help)
{
set_Value (COLUMNNAME_Help, Help);
}
/** Get Comment/Help.
@ret... | /** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName(... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_GL_Fund.java | 1 |
请完成以下Java代码 | public String toString()
{
// return "Graph{" +
// "vertexes=" + Arrays.toString(vertexes) +
// '}';
StringBuilder sb = new StringBuilder();
int line = 0;
for (List<Vertex> vertexList : vertexes)
{
sb.append(String.valueOf(line++) + ':... | /**
* 清空词图
*/
public void clear()
{
for (List<Vertex> vertexList : vertexes)
{
vertexList.clear();
}
size = 0;
}
/**
* 清理from属性
*/
public void clean()
{
for (List<Vertex> vertexList : vertexes)
{
for (Ve... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\common\WordNet.java | 1 |
请完成以下Java代码 | public class GetProcessDefinitionInfoCmd implements Command<ObjectNode>, Serializable {
private static final long serialVersionUID = 1L;
protected String processDefinitionId;
protected ProcessDefinition processDefinition;
public GetProcessDefinitionInfoCmd(String processDefinitionId) {
this.p... | protected ProcessDefinition resolveProcessDefinition(DeploymentManager deploymentManager) {
return Optional.ofNullable(processDefinition).orElseGet(() ->
deploymentManager.findDeployedProcessDefinitionById(processDefinitionId)
);
}
protected ObjectNode executeInternal(
Deplo... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\GetProcessDefinitionInfoCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private IPricingResult computePricesForBasePricingSystem(@NonNull final PricingSystemId basePricingSystemId)
{
final IPricingContext pricingCtx = request.getPricingCtx();
Check.assumeNotNull(pricingCtx, "pricingCtx shall not be null for {}", request);
final IPricingContext basePricingSystemPricingCtx = createBa... | {
discount = request.getBpartnerFlatDiscount();
}
else
{
discount = pricingConditionsBreak.getDiscount();
}
result.discount(discount);
}
private PricingConditionsBreak findMatchingPricingConditionBreak()
{
if (request.getForcePricingConditionsBreak() != null)
{
return request.getForcePricing... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\service\impl\CalculatePricingConditionsCommand.java | 2 |
请完成以下Java代码 | protected Map<String, CachedEntity> findClassCacheByCheckingSubclasses(Class<?> entityClass) {
for (Class<?> clazz : cachedObjects.keySet()) {
if (entityClass.isAssignableFrom(clazz)) {
return cachedObjects.get(clazz);
}
}
return null;
}
@Override... | if (classCache != null) {
List<T> entities = new ArrayList<T>(classCache.size());
for (CachedEntity cachedObject : classCache.values()) {
entities.add((T) cachedObject.getEntity());
}
return entities;
}
return emptyList();
}
publi... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\cache\EntityCacheImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public <T> Optional<Codec<T>> getCodecFor(Class<T> type) {
return this.delegate.getCodecFor(type);
}
@Override
public PersistenceExceptionTranslator getExceptionTranslator() {
return this.delegate.getExceptionTranslator();
}
@Override
public CodecRegistry getCodecRegistry() {
return this.delegate... | return this.delegate.getSession(options);
}
@Override
public ReactiveMongoDatabaseFactory withSession(ClientSession session) {
return this.delegate.withSession(session);
}
@Override
public boolean isTransactionActive() {
return this.delegate.isTransactionActive();
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-data-mongodb\src\main\java\org\springframework\boot\data\mongodb\autoconfigure\DataMongoReactiveAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public ApiResponse<Region> getRegionWithHttpInfo(String albertaApiKey, String _id) throws ApiException {
com.squareup.okhttp.Call call = getRegionValidateBeforeCall(albertaApiKey, _id, null, null);
Type localVarReturnType = new TypeToken<Region>(){}.getType();
return apiClient.execute(call, loca... | }
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\api\RegionApi.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public final class MassPrintingService implements IMassPrintingService
{
private final IArchiveBL archiveService = Services.get(IArchiveBL.class);
/**
* Exports the given data to PDF and creates an <code>AD_Archive</code> with <code>IsDirectPrint='Y'</code> (to trigger a <code>C_Printing_Queue</code> record being ... | .bpartnerId(archiveInfo.getBpartnerId())
//
// Ask our printing service to printing it right now:
.isDirectEnqueue(true)
.isDirectProcessQueueItem(true)
.copies(archiveInfo.getCopies())
//
.build());
if (archiveResult.isNoArchive())
{
throw new AdempiereException("No archive created ... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\adapter\MassPrintingService.java | 2 |
请完成以下Java代码 | public class MBankStatement extends X_C_BankStatement
{
public MBankStatement(final Properties ctx, final int C_BankStatement_ID, final String trxName)
{
super(ctx, C_BankStatement_ID, trxName);
if (is_new())
{
// setC_BP_BankAccount_ID (0); // parent
setStatementDate(new Timestamp(System.currentTimeMilli... | public MBankStatement(final Properties ctx, final ResultSet rs, final String trxName)
{
super(ctx, rs, trxName);
}
@Override
public void setProcessed(final boolean processed)
{
super.setProcessed(processed);
final BankStatementId bankStatementId = BankStatementId.ofRepoIdOrNull(getC_BankStatement_ID());
... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-legacy\org\compiere\model\MBankStatement.java | 1 |
请完成以下Spring Boot application配置 | #
# %L
# de-metas-camel-grssignum
# %%
# Copyright (C) 2021 metas GmbH
# %%
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of the
# License, or (at your option) any later versi... | details.
#
# You should have received a copy of the GNU General Public
# License along with this program. If not, see
# <http://www.gnu.org/licenses/gpl-2.0.html>.
# L%
#
export.bpartner.retry.count=10
export.bpartner.retry.delay.ms=60000 | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public class RpPayProduct extends BaseEntity implements Serializable {
private String productCode;
private String productName;
private String auditStatus;
private static final long serialVersionUID = 1L;
public String getProductCode() {
return productCode;
}
public void set... | public void setProductName(String productName) {
this.productName = productName == null ? null : productName.trim();
}
public String getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus == null ? null : auditSt... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\entity\RpPayProduct.java | 2 |
请完成以下Java代码 | public void setExpressionHandler(MethodSecurityExpressionHandler expressionHandler) {
this.registry.setExpressionHandler(expressionHandler);
}
/**
* Configure pre/post-authorization template resolution
* <p>
* By default, this value is <code>null</code>, which indicates that templates should
* not be resol... | *
* @since 5.8
*/
public void setSecurityContextHolderStrategy(SecurityContextHolderStrategy strategy) {
this.securityContextHolderStrategy = () -> strategy;
}
/**
* Filter a {@code returnedObject} using the {@link PostFilter} annotation that the
* {@link MethodInvocation} specifies.
* @param mi the {@l... | repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\method\PostFilterAuthorizationMethodInterceptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final boolean isCustomLoginPage() {
return this.customLoginPage;
}
/**
* Gets the Authentication Filter
* @return the Authentication Filter
*/
protected final F getAuthenticationFilter() {
return this.authFilter;
}
/**
* Sets the Authentication Filter
* @param authFilter the Authentication F... | return this.failureUrl;
}
/**
* Updates the default values for authentication.
*/
protected final void updateAuthenticationDefaults() {
if (this.loginProcessingUrl == null) {
loginProcessingUrl(this.loginPage);
}
if (this.failureHandler == null) {
failureUrl(this.loginPage + "?error");
}
LogoutC... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\AbstractAuthenticationFilterConfigurer.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private Object createInstance(String configurationClassName) {
try {
Class<?> configurationClass = getClass().getClassLoader().loadClass(configurationClassName);
return configurationClass.getDeclaredConstructor().newInstance();
} catch (Exception e) {
throw new ProcessEngineException("Could n... | processEngineConsumers.add(serviceBuilder.provides(name));
this.executorSupplier = JBossCompatibilityExtension.addServerExecutorDependency(serviceBuilder);
JBossCompatibilityExtension.addServerExecutorDependency(serviceBuilder);
}
public ProcessEngine getProcessEngine() {
return processEngine;
}
... | repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\MscManagedProcessEngineController.java | 2 |
请完成以下Java代码 | public class ParseHandler extends DefaultHandler {
protected String defaultNamespace;
protected Parse parse;
protected Locator locator;
protected Deque<Element> elementStack = new ArrayDeque<>();
public ParseHandler(Parse parse) {
this.parse = parse;
}
public void startElement(String uri, String lo... | parse.addError(e);
}
public void warning(SAXParseException e) {
parse.addWarning(e);
}
public void setDocumentLocator(Locator locator) {
this.locator = locator;
}
public void setDefaultNamespace(String defaultNamespace) {
this.defaultNamespace = defaultNamespace;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\xml\ParseHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static String getHavingValue(AnnotationAttributes annotationAttributes) {
Object havingValue = annotationAttributes.get("havingValue");
Assert.state(havingValue != null, "'havingValue' must not be null");
return havingValue.toString();
}
private String getPrefix(AnnotationAttributes annotationAttr... | }
}
private boolean isMatch(@Nullable String value, String requiredValue) {
if (StringUtils.hasLength(requiredValue)) {
return requiredValue.equalsIgnoreCase(value);
}
return !"false".equalsIgnoreCase(value);
}
@Override
public String toString() {
StringBuilder result = new StringBuilder();
... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\condition\OnPropertyCondition.java | 2 |
请完成以下Java代码 | public class FlowableMultiInstanceActivityCompletedEventImpl extends FlowableMultiInstanceActivityEventImpl implements
FlowableMultiInstanceActivityCompletedEvent {
protected int numberOfInstances;
protected int numberOfActiveInstances;
protected int numberOfCompletedInstances;
public FlowableM... | @Override
public int getNumberOfActiveInstances() {
return numberOfActiveInstances;
}
public void setNumberOfActiveInstances(int numberOfActiveInstances) {
this.numberOfActiveInstances = numberOfActiveInstances;
}
@Override
public int getNumberOfCompletedInstances() {
r... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\delegate\event\impl\FlowableMultiInstanceActivityCompletedEventImpl.java | 1 |
请完成以下Java代码 | public int getM_Locator_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Locator_ID);
}
@Override
public void setM_Product_ID (final int M_Product_ID)
{
if (M_Product_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Product_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Product_ID, M_Product_ID);
}
@Override
pu... | return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setQty (final @Nullable BigDecimal Qty)
{
set_ValueNoCheck (COLUMNNAME_Qty, Qty);
}
@Override
public BigDecimal getQty()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty);
return bd != null ? bd : BigDecimal.ZERO;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Stock_Detail_V.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Integer add(UserAddDTO addDTO) {
// 插入用户记录,返回编号
Integer returnId = UUID.randomUUID().hashCode();
// 返回用户编号
return returnId;
}
/**
* 更新指定用户编号的用户
*
* @param updateDTO 更新用户信息 DTO
* @return 是否修改成功
*/
@PostMapping("/update") // URL 修改成 /update ,Req... | return success;
}
/**
* 删除指定用户编号的用户
*
* @param id 用户编号
* @return 是否删除成功
*/
@DeleteMapping("/delete") // URL 修改成 /delete ,RequestMethod 改成 DELETE
public Boolean delete(@RequestParam("id") Integer id) {
// 删除用户记录
Boolean success = false;
// 返回是否更新成功
... | repos\SpringBoot-Labs-master\lab-23\lab-springmvc-23-01\src\main\java\cn\iocoder\springboot\lab23\springmvc\controller\UserController2.java | 2 |
请完成以下Java代码 | private ProcessClassInfo getProcessClassInfo()
{
if (_processClassInfo == null)
{
_processClassInfo = ProcessClassInfo.of(_processClass);
}
return _processClassInfo;
}
public ProcessPreconditionChecker setPreconditionsContext(final IProcessPreconditionsContext preconditionsContext)
{
setPreconditionsC... | _preconditionsContextSupplier = preconditionsContextSupplier;
return this;
}
private IProcessPreconditionsContext getPreconditionsContext()
{
Check.assumeNotNull(_preconditionsContextSupplier, "Parameter preconditionsContextSupplier is not null");
final IProcessPreconditionsContext preconditionsContext = _pr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessPreconditionChecker.java | 1 |
请完成以下Java代码 | public String getCategoryName() {
return categoryName;
}
public void setCategoryName(String categoryName) {
this.categoryName = categoryName;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}... | sb.append(", recommendStatus=").append(recommendStatus);
sb.append(", createTime=").append(createTime);
sb.append(", collectCount=").append(collectCount);
sb.append(", readCount=").append(readCount);
sb.append(", commentCount=").append(commentCount);
sb.append(", albumPics=").app... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsSubject.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class OrderEmailPropagationSysConfigRepository
{
private final ISysConfigBL sysConfigBL;
public static final String SYS_CONFIG_C_Order_Email_Propagation = "de.metas.order.C_Order_Email_Propagation";
private static final String SYS_CONFIG_C_Order_Email_Propagation_Default = "N";
public OrderEmailPropagation... | return value.contains("C_Doc_Outbound_Log"); // #12448 It should be de.metas.document.archive.model.I_C_Doc_Outbound_Log.Table_Name but that's not available in de.metas.business
}
public boolean isPropagateToMInOut(@NonNull final ClientAndOrgId clientAndOrgId)
{
final String value = getValue(clientAndOrgId);
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\impl\OrderEmailPropagationSysConfigRepository.java | 2 |
请完成以下Java代码 | public final class DefaultServerGenerateOneTimeTokenRequestResolver
implements ServerGenerateOneTimeTokenRequestResolver {
private static final String USERNAME = "username";
private static final Duration DEFAULT_EXPIRES_IN = Duration.ofMinutes(5);
private Duration expiresIn = DEFAULT_EXPIRES_IN;
@Override
@S... | .switchIfEmpty(Mono.empty())
.map((username) -> new GenerateOneTimeTokenRequest(username, this.expiresIn));
// @formatter:on
}
/**
* Sets one-time token expiration time
* @param expiresIn one-time token expiration time
*/
public void setExpiresIn(Duration expiresIn) {
Assert.notNull(expiresIn, "expire... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\authentication\ott\DefaultServerGenerateOneTimeTokenRequestResolver.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.