instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public boolean hasStartFormKey() {
return hasStartFormKey;
}
@Override
public boolean getHasStartFormKey() {
return hasStartFormKey;
}
@Override
public void setStartFormKey(boolean hasStartFormKey) {
this.hasStartFormKey = hasStartFormKey;
}
@Override
publi... | @Override
public void setDerivedFromRoot(String derivedFromRoot) {
this.derivedFromRoot = derivedFromRoot;
}
@Override
public int getDerivedVersion() {
return derivedVersion;
}
@Override
public void setDerivedVersion(int derivedVersion) {
this.derivedVersion = deriv... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\ProcessDefinitionEntityImpl.java | 1 |
请完成以下Java代码 | void add(Throwable exception, ExitCodeExceptionMapper mapper) {
Assert.notNull(exception, "'exception' must not be null");
Assert.notNull(mapper, "'mapper' must not be null");
add(new MappedExitCodeGenerator(exception, mapper));
}
void addAll(ExitCodeGenerator... generators) {
Assert.notNull(generators, "'ge... | }
}
catch (Exception ex) {
exitCode = 1;
ex.printStackTrace();
}
}
return exitCode;
}
/**
* Adapts an {@link ExitCodeExceptionMapper} to an {@link ExitCodeGenerator}.
*/
private static class MappedExitCodeGenerator implements ExitCodeGenerator {
private final Throwable exception;
priv... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ExitCodeGenerators.java | 1 |
请完成以下Java代码 | public void setIsDefault (final boolean IsDefault)
{
set_Value (COLUMNNAME_IsDefault, IsDefault);
}
@Override
public boolean isDefault()
{
return get_ValueAsBoolean(COLUMNNAME_IsDefault);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
... | @Override
public void setWEBUI_Dashboard_ID (final int WEBUI_Dashboard_ID)
{
if (WEBUI_Dashboard_ID < 1)
set_ValueNoCheck (COLUMNNAME_WEBUI_Dashboard_ID, null);
else
set_ValueNoCheck (COLUMNNAME_WEBUI_Dashboard_ID, WEBUI_Dashboard_ID);
}
@Override
public int getWEBUI_Dashboard_ID()
{
return get_Va... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java-gen\de\metas\ui\web\base\model\X_WEBUI_Dashboard.java | 1 |
请完成以下Java代码 | Optional<UserName> getUserNameToUpdate() {
return ofNullable(userNameToUpdate);
}
Optional<String> getPasswordToUpdate() {
return ofNullable(passwordToUpdate);
}
Optional<Image> getImageToUpdate() {
return ofNullable(imageToUpdate);
}
Optional<String> getBioToUpdate() ... | public UserUpdateRequestBuilder passwordToUpdate(String passwordToUpdate) {
this.passwordToUpdate = passwordToUpdate;
return this;
}
public UserUpdateRequestBuilder imageToUpdate(Image imageToUpdate) {
this.imageToUpdate = imageToUpdate;
return this;
... | repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\domain\user\UserUpdateRequest.java | 1 |
请完成以下Java代码 | public Set<Integer> getProductIds()
{
loadIfNeeded();
return productIds;
}
@Override
public Set<Integer> getBpartnerIds()
{
loadIfNeeded();
return bpartnerIds;
}
@Override
public Set<Integer> getLocatorIds()
{
loadIfNeeded();
return locatorIds; | }
@Override
public Set<ShipmentScheduleAttributeSegment> getAttributes()
{
loadIfNeeded();
return attributeSegments;
}
@Override
public Set<Integer> getBillBPartnerIds()
{
return ImmutableSet.of();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\segments\ShipmentScheduleSegmentFromHUAttribute.java | 1 |
请完成以下Java代码 | public int getX() {
return x;
}
@Override
public void setX(int x) {
this.x = x;
}
@Override
public int getY() {
return y;
}
@Override
public void setY(int y) {
this.y = y;
}
@Override
public int getWidth() {
return width;
}
... | @Override
public boolean isAsync() {
return isAsync;
}
public void setAsync(boolean isAsync) {
this.isAsync = isAsync;
}
@Override
public boolean isExclusive() {
return isExclusive;
}
public void setExclusive(boolean isExclusive) {
this.isExclusive = is... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\pvm\process\ActivityImpl.java | 1 |
请完成以下Java代码 | public Set<String> getStatusCodes() {
return statusCodes;
}
public CircuitBreakerConfig setStatusCodes(String... statusCodes) {
return setStatusCodes(new LinkedHashSet<>(Arrays.asList(statusCodes)));
}
public CircuitBreakerConfig setStatusCodes(Set<String> statusCodes) {
this.statusCodes = statusCode... | public CircuitBreakerStatusCodeException(HttpStatusCode statusCode) {
super(statusCode);
}
}
public static class FilterSupplier extends SimpleFilterSupplier {
public FilterSupplier() {
super(CircuitBreakerFilterFunctions.class);
}
}
} | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\filter\CircuitBreakerFilterFunctions.java | 1 |
请完成以下Java代码 | public CardTransaction2Choice getTx() {
return tx;
}
/**
* Sets the value of the tx property.
*
* @param value
* allowed object is
* {@link CardTransaction2Choice }
*
*/
public void setTx(CardTransaction2Choice value) {
this.tx = value;
}... | *
*/
public CashAccount24 getPrePdAcct() {
return prePdAcct;
}
/**
* Sets the value of the prePdAcct property.
*
* @param value
* allowed object is
* {@link CashAccount24 }
*
*/
public void setPrePdAcct(CashAccount24 value) {
th... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-xjc_camt054_001_06\de\metas\payment\camt054_001_06\CardTransaction2.java | 1 |
请完成以下Java代码 | public boolean isDetached() {
return caseInstance.getSuperExecutionId() == null;
}
@Override
public void detachState() {
caseInstance.setSuperExecution(null);
}
@Override
public void attachState(MigratingScopeInstance targetActivityInstance) {
caseInstance.setSuperExecution(targetActivityInsta... | public void attachState(MigratingTransitionInstance targetTransitionInstance) {
throw MIGRATION_LOGGER.cannotAttachToTransitionInstance(this);
}
@Override
public void migrateState() {
// nothing to do
}
@Override
public void migrateDependentEntities() {
// nothing to do
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingCalledCaseInstance.java | 1 |
请完成以下Java代码 | public final void setBlob(final int parameterIndex, final InputStream inputStream) throws SQLException
{
traceSqlParam(parameterIndex, inputStream);
delegate.setBlob(parameterIndex, inputStream);
}
@Override
public final void setNClob(final int parameterIndex, final Reader reader) throws SQLException
{
trac... | return trace(() -> delegate.executeUpdate());
}
@Override
public final void clearParameters() throws SQLException
{
delegate.clearParameters();
}
@Override
public final boolean execute() throws SQLException
{
return trace(() -> delegate.execute());
}
@Override
public final void addBatch() throws SQLEx... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\sql\impl\TracingPreparedStatement.java | 1 |
请完成以下Java代码 | public String toString() {
StringBuilder builder2 = new StringBuilder();
builder2
.append("StartMessageDeploymentDefinitionImpl [messageSubscription=")
.append(messageSubscription)
.append(", processDefinition=")
.append(processDefinition)
.app... | return this;
}
/**
* Builder method for processDefinition parameter.
* @param processDefinition field to set
* @return builder
*/
public Builder withProcessDefinition(ProcessDefinition processDefinition) {
this.processDefinition = processDefinitio... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\StartMessageDeploymentDefinitionImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void save(TenantId tenantId, RpcId rpcId, RpcStatus newStatus, JsonNode response) {
Rpc foundRpc = rpcService.findById(tenantId, rpcId);
if (foundRpc != null) {
foundRpc.setStatus(newStatus);
if (response != null) {
foundRpc.setResponse(response);
... | .type(TbMsgType.valueOf("RPC_" + rpc.getStatus().name()))
.originator(rpc.getDeviceId())
.copyMetaData(TbMsgMetaData.EMPTY)
.data(JacksonUtil.toString(rpc))
.build();
tbClusterService.pushMsgToRuleEngine(tenantId, rpc.getDeviceId(), msg, null);
... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\rpc\TbRpcService.java | 2 |
请完成以下Java代码 | public Optional<User> findById(String userId) {
return Optional.ofNullable(map.get(userId));
}
/**
* Finds all the users from the in-memory data store
* The default implementation is an In-Memory persistence
*/
public Optional<List<User>> findAll() {
return Optional.of(new A... | */
public void delete(String userId) {
map.remove(userId);
}
/**
* Checks if the user exists
* The default implementation is an In-Memory persistence
* @param userId The user that has to be checked for
*/
public boolean isExists(String userId) {
return map.contains... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-3\src\main\java\com\baeldung\httpfirewall\dao\InMemoryUserDao.java | 1 |
请完成以下Java代码 | private ImmutableSet<HuId> filterOutInvalidHUs(@NonNull final PickingSlotRow pickingSlotRowOrHU)
{
final ImmutableSet.Builder<HuId> hus = ImmutableSet.builder();
if (pickingSlotRowOrHU.isPickingSlotRow())
{
for (final PickingSlotRow pickingSlotRow : pickingSlotRowOrHU.getIncludedRows())
{
if (isValidHu... | @Override
protected String doIt() throws Exception
{
final PickingSlotRow rowToProcess = getSingleSelectedRow();
final ImmutableSet<HuId> hUs = filterOutInvalidHUs(rowToProcess);
final ShipmentScheduleId shipmentScheduleId = null;
//noinspection ConstantConditions
pickingCandidateService.processForHUIds(hU... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\process\WEBUI_Picking_M_Picking_Candidate_Process.java | 1 |
请完成以下Java代码 | class MutableUser implements MutableUserDetails {
private static final long serialVersionUID = 620L;
private @Nullable String password;
private final UserDetails delegate;
MutableUser(UserDetails user) {
this.delegate = user;
this.password = user.getPassword();
}
@Override
public @Nullable String getPas... | @Override
public boolean isAccountNonLocked() {
return this.delegate.isAccountNonLocked();
}
@Override
public boolean isCredentialsNonExpired() {
return this.delegate.isCredentialsNonExpired();
}
@Override
public boolean isEnabled() {
return this.delegate.isEnabled();
}
} | repos\spring-security-main\core\src\main\java\org\springframework\security\provisioning\MutableUser.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PickFromHU
{
@NonNull HuId topLevelHUId;
@With
boolean huReservedForThisLine;
@NonNull LocatorId locatorId;
//
// Relevant HU Attributes:
@NonNull String huCode;
@Nullable LocalDate expiringDate;
@Nullable String serialNo;
@Nullable String lotNumber;
@Nullable String repackNumber;
@With
@Non... | @Nullable final AlternativePickFromKeys alternatives)
{
this.topLevelHUId = topLevelHUId;
this.huReservedForThisLine = huReservedForThisLine;
this.locatorId = locatorId;
this.huCode = huCode != null ? huCode : topLevelHUId.toHUValue();
this.expiringDate = expiringDate;
this.serialNo = serialNo;
this.lotN... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\plan\generator\pickFromHUs\PickFromHU.java | 2 |
请完成以下Java代码 | public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Sequence.
@return Method of ordering records; lowest number comes first
*/
public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
return 0;
return ii.intValue()... | */
public void setSortNo (int SortNo)
{
set_Value (COLUMNNAME_SortNo, Integer.valueOf(SortNo));
}
/** Get Record Sort No.
@return Determines in what order the records are displayed
*/
public int getSortNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SortNo);
if (ii == null)
return 0;
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UserDef_Field.java | 1 |
请完成以下Java代码 | protected boolean isHistoryEventProduced() {
HistoryLevel historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
return historyLevel.isHistoryEventProduced(HistoryEventTypes.INCIDENT_CREATE, null) ||
historyLevel.isHistoryEventProduced(HistoryEventTypes.INCIDENT_DELETE, null) ||
... | return getDbEntityManager()
.deletePreserveOrder(HistoricIncidentEntity.class, "deleteHistoricIncidentsByRemovalTime",
new ListQueryParameterObject(parameters, 0, batchSize));
}
public void addRemovalTimeToHistoricIncidentsByBatchId(String batchId, Date removalTime) {
Map<String, Object> paramete... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricIncidentManager.java | 1 |
请完成以下Java代码 | public class AssetInfoEntity extends AbstractAssetEntity<AssetInfo> {
public static final Map<String,String> assetInfoColumnMap = new HashMap<>();
static {
assetInfoColumnMap.put("customerTitle", "c.title");
assetInfoColumnMap.put("assetProfileName", "p.name");
}
private String custome... | String assetProfileName) {
super(assetEntity);
this.customerTitle = customerTitle;
if (customerAdditionalInfo != null && ((JsonNode)customerAdditionalInfo).has("isPublic")) {
this.customerIsPublic = ((JsonNode)customerAdditionalInfo).get("isPublic").asBoolean();
} else {
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\AssetInfoEntity.java | 1 |
请完成以下Java代码 | public java.lang.String getName ()
{
return (java.lang.String)get_Value(COLUMNNAME_Name);
}
/** Set Preis.
@param Price
Price
*/
@Override
public void setPrice (java.math.BigDecimal Price)
{
set_ValueNoCheck (COLUMNNAME_Price, Price);
}
/** Get Preis.
@return Price
*/
@Override
public java... | /** Set SKU.
@param SKU
Stock Keeping Unit
*/
@Override
public void setSKU (java.lang.String SKU)
{
set_ValueNoCheck (COLUMNNAME_SKU, SKU);
}
/** Get SKU.
@return Stock Keeping Unit
*/
@Override
public java.lang.String getSKU ()
{
return (java.lang.String)get_Value(COLUMNNAME_SKU);
}
/** S... | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQResponseLine_v.java | 1 |
请完成以下Java代码 | public void updatePostCalculationAmountsForCostElement(
final CurrencyPrecision precision,
final CostElementId costElementId)
{
final List<PPOrderCost> costs = filterAndList(PPOrderCostFilter.builder()
.costElementId(costElementId)
.build());
final List<PPOrderCost> inboundCosts = costs.stream()
... | final CostAmount totalCoProductsCostAmount = coProductCosts.stream()
.map(PPOrderCost::getPostCalculationAmount)
.reduce(CostAmount::add)
.orElseGet(totalInboundCostAmount::toZero);
//
// Update main product cost
mainProductCost.setPostCalculationAmount(totalInboundCostAmount.subtract(totalCoProducts... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\PPOrderCosts.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result putRecycleBin(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
try {
String ids = jsonObject.getString("ids");
if (StringUtils.isNotBlank(ids)) {
sysDictService.revertLogicDeleted(Arrays.asList(ids.split(",")));
return Result.ok("操作成功!");
}
} catch (Exception e) {
... | if(msg!=null && (msg.toLowerCase().indexOf(extractvalue)>=0 || msg.toLowerCase().indexOf(updatexml)>=0)){
return Result.error("校验失败,sql解析异常!");
}
return Result.error("校验失败,sql解析异常!" + msg);
}
/**
* 根据应用id获取字典列表和详情
* @param request
*/
@GetMapping("/getDictListByLowAppId")
public Result<List<SysDictVo>>... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysDictController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public BigDecimal getAmount() {
return amount;
}
/**
* Sets the value of the amount property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setAmount(BigDecimal value) {
this.amount = value;
}
/**
*... | return comment;
}
/**
* Sets the value of the comment property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setComment(String value) {
this.comment = value;
}
} | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\DiscountType.java | 2 |
请完成以下Spring Boot application配置 | spring:
application:
name: user-service # 服务名
# Zipkin 配置项,对应 ZipkinProperties 类
zipkin:
base-url: http://127.0.0.1:9411 # Zipkin 服务的地址
# Spring Cloud Sleuth 配置项
sleuth:
# Spring Cloud Sleuth 针对 Web 组件的配置项,例如说 SpringMVC
web:
enabled: true # 是否开启,默认为 true
data | :
# Elasticsearch 配置项
elasticsearch:
cluster-name: elasticsearch # 集群名
cluster-nodes: 127.0.0.1:9300 # 集群节点 | repos\SpringBoot-Labs-master\labx-13\labx-13-sc-sleuth-db-elasticsearch\src\main\resources\application.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ExcelExportConstants
{
public static ExcelExportConstants givenOrDefault(@Nullable final ExcelExportConstants constants)
{
return coalesce(constants, getFromSysConfig());
}
public static ExcelExportConstants getFromSysConfig()
{
final ISysConfigBL sysconfigs = Services.get(ISysConfigBL.class);
... | private static final String SYSCONFIG_MaxRowsToAllowCellWidthAutoSize = "de.metas.excel.MaxRowsToAllowCellWidthAutoSize";
private static final String SYSCONFIG_UseStreamingWorkbookImplementation = "de.metas.excel.UseStreamingWorkbookImplementation";
private static final String SYSCONFIG_ALL_ROWS_PAGE_SIZE = "de.metas... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\excel\ExcelExportConstants.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) {
return R.status(codeService.removeByIds(Func.toLongList(ids)));
}
/**
* 复制
*/
@PostMapping("/copy")
@ApiOperationSupport(order = 5)
@Operation(summary = "复制", description = "传入id")
public R copy(@Parameter(descrip... | BladeCodeGenerator generator = new BladeCodeGenerator();
// 设置数据源
Datasource datasource = datasourceService.getById(code.getDatasourceId());
generator.setDriverName(datasource.getDriverClass());
generator.setUrl(datasource.getUrl());
generator.setUsername(datasource.getUsername());
generator.setPasswo... | repos\SpringBlade-master\blade-ops\blade-develop\src\main\java\org\springblade\develop\controller\CodeController.java | 2 |
请完成以下Java代码 | private static ImmutableList<MADBoilerPlateVarEval> retrieveAll()
{
return queryBL.createQueryBuilder(I_AD_BoilerPlate_Var_Eval.Table_Name)
.orderBy(I_AD_BoilerPlate_Var_Eval.COLUMNNAME_AD_BoilerPlate_Var_ID)
.orderBy(I_AD_BoilerPlate_Var_Eval.COLUMNNAME_C_DocType_ID)
.create()
.listImmutable(MADBoil... | {
if (get_TrxName() == null)
return MADBoilerPlateVar.get(getCtx(), getAD_BoilerPlate_Var_ID());
else
return super.getAD_BoilerPlate_Var();
}
@Override
public I_C_DocType getC_DocType() throws RuntimeException
{
if (get_TrxName() == null)
return MDocType.get(getCtx(), getC_DocType_ID());
else
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\letters\model\MADBoilerPlateVarEval.java | 1 |
请完成以下Java代码 | public void updateOrderCostsOnOrderLineChanged(final OrderCostDetailOrderLinePart orderLineInfo)
{
orderCostRepository.changeByOrderLineId(
orderLineInfo.getOrderLineId(),
orderCost -> {
orderCost.updateOrderLineInfoIfApplies(orderLineInfo, moneyService::getStdPrecision, uomConversionBL);
updateCre... | .orderCost(orderCost)
.build()
.execute();
}
public void deleteByCreatedOrderLineId(@NonNull final OrderAndLineId createdOrderLineId)
{
orderCostRepository.deleteByCreatedOrderLineId(createdOrderLineId);
}
public boolean isCostGeneratedOrderLine(@NonNull final OrderLineId orderLineId)
{
return order... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\OrderCostService.java | 1 |
请完成以下Java代码 | public final class ALoginRes_sl extends ListResourceBundle
{
// TODO Run native2ascii to convert to plain ASCII !!
/** Translation Content */
static final Object[][] contents = new String[][]
{
{ "Connection", "Povezava" },
{ "Defaults", "Privzete vrednosti" },
{ "Login", "P... | { "DatabaseNotFound", "Ne najdem baze podatkov" },
{ "UserPwdError", "Geslo ni pravilno" },
{ "RoleNotFound", "Ne najdem izbrane vloge" },
{ "Authorized", "Avtoriziran" },
{ "Ok", "V redu" },
{ "Cancel", "Prekli\u010di" },
{ "VersionConflict", "Konflikt verzij"... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\apps\ALoginRes_sl.java | 1 |
请完成以下Java代码 | public static FaultInfo extractFaultInfoOrNull(final Object value)
{
if (value instanceof Msv3FaultInfo)
{
final Msv3FaultInfo msv3FaultInfo = (Msv3FaultInfo)value;
return fromJAXB(msv3FaultInfo);
}
else
{
return null;
}
}
public static final FaultInfo fromJAXB(final Msv3FaultInfo msv3FaultInfo... | public final Msv3FaultInfo toJAXB(final FaultInfo faultInfo)
{
if (faultInfo == null)
{
return null;
}
final Msv3FaultInfo soap = jaxbObjectFactory.createMsv3FaultInfo();
soap.setErrorCode(faultInfo.getErrorCode());
soap.setEndanwenderFehlertext(faultInfo.getUserMessage());
soap.setTechnischerFehlert... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.commons\src\main\java\de\metas\vertical\pharma\msv3\protocol\util\v2\MiscJAXBConvertersV2.java | 1 |
请完成以下Spring Boot application配置 | spring:
application:
name: dubbo-zookeeper-service-introspection-consumer-sample
demo:
service:
version: 1.0.0
embedded:
zookeeper:
port: 2181
dubbo:
application:
## "composite" is a new metadata type introduced since 2.7.8
metadata-type: composite
registry:
address: zookeeper://127... | pring.application.name}/dubbo.cache
## "dubbo.registry.use-as-*" property will be auto-detected since 2.7.8
# use-as-config-center: true
# use-as-metadata-center: true | repos\dubbo-spring-boot-project-master\dubbo-spring-boot-samples\service-introspection-samples\zookeeper-samples\consumer-sample\src\main\resources\application.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | private static class KPIDataCacheKey
{
@NonNull KPIId kpiId;
@NonNull KPITimeRangeDefaults timeRangeDefaults;
@NonNull KPIDataContext context;
}
@Value
@ToString(exclude = "data" /* because it's too big */)
private static class KPIDataCacheValue
{
public static KPIDataCacheValue ok(@NonNull final KPIData... | this.data = data;
this.defaultMaxStaleAccepted = defaultMaxStaleAccepted;
}
public boolean isExpired()
{
return isExpired(null);
}
public boolean isExpired(@Nullable final Duration maxStaleAccepted)
{
final Duration maxStaleAcceptedEffective = maxStaleAccepted != null
? maxStaleAccepted
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\kpi\data\KPIDataProvider.java | 2 |
请完成以下Java代码 | class SharedPrinter {
private final Semaphore semEven = new Semaphore(0);
private final Semaphore semOdd = new Semaphore(1);
void printEvenNum(int num) {
try {
semEven.acquire();
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
... | }
}
class Odd implements Runnable {
private SharedPrinter sp;
private int max;
Odd(SharedPrinter sp, int max) {
this.sp = sp;
this.max = max;
}
@Override
public void run() {
for (int i = 1; i <= max; i = i + 2) {
sp.printOddNum(i);
}
}
} | repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-2\src\main\java\com\baeldung\concurrent\evenandodd\PrintEvenOddSemaphore.java | 1 |
请完成以下Java代码 | public synchronized <T> T getBeanOrNull(@NonNull final Class<T> beanType)
{
assertJUnitMode();
final ArrayList<Object> beans = map.get(ClassReference.of(beanType));
if (beans == null || beans.isEmpty())
{
return null;
}
if (beans.size() > 1)
{
logger.warn("Found more than one bean for {} but retu... | List<Object> beanObjs = map.get(ClassReference.of(beanType));
if (beanObjs == null)
{
final List<Object> assignableBeans = map.values()
.stream()
.filter(Objects::nonNull)
.flatMap(Collection::stream)
.filter(impl -> beanType.isAssignableFrom(impl.getClass()))
.collect(Collectors.toList(... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\JUnitBeansMap.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class InfoFromBuyer
{
public static final String SERIALIZED_NAME_NOTE = "note";
@SerializedName(SERIALIZED_NAME_NOTE)
private String note;
public static final String SERIALIZED_NAME_RETURN_SHIPMENT_TRACKING = "returnShipmentTracking";
@SerializedName(SERIALIZED_NAME_RETURN_SHIPMENT_TRACKING)
private List<... | {
this.returnShipmentTracking = returnShipmentTracking;
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
InfoFromBuyer infoFromBuyer = (InfoFromBuyer)o;
return Objects.equals(this.note, infoFromBuyer... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\InfoFromBuyer.java | 2 |
请完成以下Java代码 | public void setC_UOM_ID (final int C_UOM_ID)
{
if (C_UOM_ID < 1)
set_Value (COLUMNNAME_C_UOM_ID, null);
else
set_Value (COLUMNNAME_C_UOM_ID, C_UOM_ID);
}
@Override
public int getC_UOM_ID()
{
return get_ValueAsInt(COLUMNNAME_C_UOM_ID);
}
@Override
public void setLineNetAmt (final BigDecimal Line... | @Override
public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setQtyOrdered (final BigDecimal QtyOrdered)
{
set_Value (COLUMNNAME_QtyOrdered, QtyOrdered);
}
@Override
public BigDecimal getQtyOrdered()
{
final BigDecimal bd = get_ValueAsBigDecimal(CO... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Order_Cost_Detail.java | 1 |
请完成以下Java代码 | public void setMsgText (final java.lang.String MsgText)
{
set_Value (COLUMNNAME_MsgText, MsgText);
}
@Override
public java.lang.String getMsgText()
{
return get_ValueAsString(COLUMNNAME_MsgText);
}
@Override
public void setMsgTip (final @Nullable java.lang.String MsgTip)
{
set_Value (COLUMNNAME_MsgTip... | public static final String MSGTYPE_Information = "I";
/** Menü = M */
public static final String MSGTYPE_Menue = "M";
@Override
public void setMsgType (final java.lang.String MsgType)
{
set_Value (COLUMNNAME_MsgType, MsgType);
}
@Override
public java.lang.String getMsgType()
{
return get_ValueAsString(CO... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Message.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CustomerMapping updated(OffsetDateTime updated) {
this.updated = updated;
return this;
}
/**
* Der Zeitstempel der letzten Änderung
* @return updated
**/
@Schema(example = "2019-11-28T08:37:39.637Z", description = "Der Zeitstempel der letzten Änderung")
public OffsetDateTime getUpdated(... | @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CustomerMapping {\n");
sb.append(" _id: ").append(toIndentedString(_id)).append("\n");
sb.append(" customerId: ").append(toIndentedString(customerId)).append("\n");
sb.append(" updated: ").a... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\CustomerMapping.java | 2 |
请完成以下Java代码 | public boolean isActive() {
return caseActivityInstanceState == ACTIVE.getStateCode();
}
public boolean isSuspended() {
return caseActivityInstanceState == SUSPENDED.getStateCode();
}
public boolean isCompleted() {
return caseActivityInstanceState == COMPLETED.getStateCode();
}
public boolean... | + ", parentCaseActivityInstanceId=" + parentCaseActivityInstanceId
+ ", taskId=" + taskId
+ ", calledProcessInstanceId=" + calledProcessInstanceId
+ ", calledCaseInstanceId=" + calledCaseInstanceId
+ ", durationInMillis=" + durationInMillis
+ ", createTime=" + star... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricCaseActivityInstanceEventEntity.java | 1 |
请完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Date getLastModified() {
return lastModified;
}
public void setLastModified(Date lastModified) {
this.lastModified = lastModified;
} | public long getId() {
return id;
}
public String getAbout() {
return about;
}
public void setAbout(String about) {
this.about = about;
}
@Override
public String toString() {
return String.format("ID: %d\nName: %s\nLast Modified: %s\nAbout: %s\n", getId(), g... | repos\tutorials-master\persistence-modules\hibernate5\src\main\java\com\baeldung\hibernate\interceptors\entity\User.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PurchaseService {
private final PaymentMethodClient paymentMethodClient;
private final ReportClient reportClient;
public PurchaseService(PaymentMethodClient paymentMethodClient, ReportClient reportClient) {
this.paymentMethodClient = paymentMethodClient;
this.reportClient = re... | }
if (ex instanceof TimeoutException) {
// handle thread timeout
throw new RuntimeException("Thread timeout!", ex);
}
throw new RuntimeException("Unrecoverable error!", ex);
});
CompletableFuture.runAsync(() -... | repos\tutorials-master\spring-cloud-modules\spring-cloud-openfeign-2\src\main\java\com\baeldung\cloud\openfeign\completablefuturefeignclient\PurchaseService.java | 2 |
请完成以下Java代码 | public static String compile(String tag, String name)
{
if (tag.startsWith("m")) return Predefine.TAG_NUMBER;
else if (tag.startsWith("nr")) return Predefine.TAG_PEOPLE;
else if (tag.startsWith("ns")) return Predefine.TAG_PLACE;
else if (tag.startsWith("nt")) return Predefine.TAG_GRO... | // case "nrf":
// case "nrj":
// return Predefine.TAG_PEOPLE;
// case "ns":
// case "nsf":
// return Predefine.TAG_PLACE;
// case "nt":
// return Predefine.TAG_TIME;
// case "x":
// return Prede... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dependency\CoNll\PosTagCompiler.java | 1 |
请完成以下Java代码 | public Instant getParameterValueAsInstantOrNull(@NonNull final String parameterName)
{
final DocumentFilterParam param = getParameterOrNull(parameterName);
if (param == null)
{
return null;
}
return param.getValueAsInstant();
}
@Nullable
public Instant getParameterValueToAsInstantOrNull(@NonNull fina... | {
return caption(caption);
}
public DocumentFilterBuilder setCaption(@NonNull final String caption)
{
return caption(TranslatableStrings.constant(caption));
}
public DocumentFilterBuilder setFacetFilter(final boolean facetFilter)
{
return facetFilter(facetFilter);
}
public boolean hasParamet... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\DocumentFilter.java | 1 |
请完成以下Java代码 | private void unsuccessfulRedirectForAuthorization(HttpServletRequest request, HttpServletResponse response,
AuthenticationException ex) throws IOException {
Throwable cause = ex.getCause();
LogMessage message = LogMessage.format("Authorization Request failed: %s", cause);
if (InvalidClientRegistrationIdExcepti... | protected void initExtractorMap() {
super.initExtractorMap();
registerExtractor(ServletException.class, (throwable) -> {
ThrowableAnalyzer.verifyThrowableHierarchy(throwable, ServletException.class);
return ((ServletException) throwable).getRootCause();
});
}
}
private static final class OAuth2Au... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\web\OAuth2AuthorizationRequestRedirectFilter.java | 1 |
请完成以下Java代码 | private static final class DefaultOidcUserInfoMapper
implements Function<OidcUserInfoAuthenticationContext, OidcUserInfo> {
// @formatter:off
private static final List<String> EMAIL_CLAIMS = Arrays.asList(
StandardClaimNames.EMAIL,
StandardClaimNames.EMAIL_VERIFIED
);
private static final List<Strin... | private static Map<String, Object> getClaimsRequestedByScope(Map<String, Object> claims,
Set<String> requestedScopes) {
Set<String> scopeRequestedClaimNames = new HashSet<>(32);
scopeRequestedClaimNames.add(StandardClaimNames.SUB);
if (requestedScopes.contains(OidcScopes.ADDRESS)) {
scopeRequestedClai... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\authentication\OidcUserInfoAuthenticationProvider.java | 1 |
请完成以下Java代码 | public static void setSuspensionState(TaskEntity taskEntity, SuspensionState state) {
if (taskEntity.getSuspensionState() == state.getStateCode()) {
throw new FlowableException("Cannot set suspension state '" + state + "' for " + taskEntity + "': already in state '" + state + "'.");
}
... | }
}
protected static void dispatchStateChangeEvent(Object entity, SuspensionState state) {
CommandContext commandContext = Context.getCommandContext();
ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);
FlowableE... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\SuspensionStateUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public BPGroupId getBPGroupByBPartnerId(@NonNull final BPartnerId bpartnerId)
{
return BPGroupId.ofRepoId(getByBPartnerId(bpartnerId).getC_BP_Group_ID());
}
@Override
@Nullable
public I_C_BP_Group getDefaultByClientOrgId(@NonNull final ClientAndOrgId clientAndOrgId)
{
final BPGroupId bpGroupId = Services.get... | @Override
public BPartnerNameAndGreetingStrategyId getBPartnerNameAndGreetingStrategyId(@NonNull final BPGroupId bpGroupId)
{
final I_C_BP_Group bpGroup = getById(bpGroupId);
return StringUtils.trimBlankToOptional(bpGroup.getBPNameAndGreetingStrategy())
.map(BPartnerNameAndGreetingStrategyId::ofString)
.... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\impl\BPGroupDAO.java | 2 |
请完成以下Java代码 | public class PaymentsToReconcileViewFactory implements IViewFactory, IViewsIndexStorage
{
static final String WINDOW_ID_String = "paymentsToReconcile";
public static final WindowId WINDOW_ID = WindowId.fromJson(WINDOW_ID_String);
private final BankStatementReconciliationViewFactory banksStatementReconciliationViewF... | throw new UnsupportedOperationException();
}
@Nullable
@Override
public PaymentsToReconcileView getByIdOrNull(@NonNull final ViewId paymentsToReconcileViewId)
{
final ViewId bankStatementReconciliationViewId = toBankStatementReconciliationViewId(paymentsToReconcileViewId);
final BankStatementReconciliationVie... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bankstatement_reconciliation\PaymentsToReconcileViewFactory.java | 1 |
请完成以下Java代码 | String getEntityTypeForTableName(final String tableName)
{
return TableIdsCache.instance.getEntityType(tableName);
}
/**
* Get PO class.
*
* @param className fully qualified class name
* @return class or <code>null</code> if model class was not found or it's not valid
*/
private Class<?> loadModelClass... | }
private final Constructor<?> findIDConstructor(final Class<?> modelClass) throws NoSuchMethodException, SecurityException
{
return modelClass.getDeclaredConstructor(new Class[] { Properties.class, int.class, String.class });
}
public Constructor<?> getIDConstructor(final Class<?> modelClass)
{
try
{
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\TableModelClassLoader.java | 1 |
请完成以下Java代码 | public Builder registeredClient(RegisteredClient registeredClient) {
return put(RegisteredClient.class, registeredClient);
}
/**
* Sets the {@link OAuth2AuthorizationRequest authorization request}.
* @param authorizationRequest the {@link OAuth2AuthorizationRequest}
* @return the {@link Builder} for fu... | }
/**
* Builds a new {@link OAuth2AuthorizationCodeRequestAuthenticationContext}.
* @return the {@link OAuth2AuthorizationCodeRequestAuthenticationContext}
*/
@Override
public OAuth2AuthorizationCodeRequestAuthenticationContext build() {
Assert.notNull(get(RegisteredClient.class), "registeredClient c... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2AuthorizationCodeRequestAuthenticationContext.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AttributeSetHelper
{
private final IAttributeDAO attributeDAO = Services.get(IAttributeDAO.class);
public List<CreateAttributeInstanceReq> toCreateAttributeInstanceReqList(@NonNull final Collection<JsonAttributeInstance> jsonAttributeInstances)
{
return jsonAttributeInstances.stream()
.map(this::... | {
final I_M_Attribute attribute = attributeDAO.retrieveAttributeByValue(attributeInstance.getAttributeCode());
final AttributeValueType targetAttributeType = AttributeValueType.ofCode(attribute.getAttributeValueType());
switch (targetAttributeType)
{
case DATE:
return attributeInstance.getValueDate();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\shipping\AttributeSetHelper.java | 2 |
请完成以下Java代码 | public Stream<HuForInventoryLine> ofHURecord(@NonNull final I_M_HU huRecord)
{
final HuForInventoryLineBuilder builder = HuForInventoryLine
.builder()
.orgId(OrgId.ofRepoId(huRecord.getAD_Org_ID()))
.locatorId(IHandlingUnitsBL.extractLocatorId(huRecord));
return handlingUnitsBL
.getStorageFactory(... | @NonNull final HuForInventoryLineBuilder huForInventoryLineBuilder,
@NonNull final IHUProductStorage huProductStorage)
{
final AttributesKey attributesKey = handlingUnitsBL.getAttributesKeyForInventory(huProductStorage.getM_HU());
final Quantity qty = huProductStorage.getQty();
return huForInventoryLineBui... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\draftlinescreator\HuForInventoryLineFactory.java | 1 |
请完成以下Java代码 | public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
@Override
public List<HistoricDecisionInputInstance> getInputs() {
if(inputs != null) {
return inputs;
} else {
throw LOG.historicDecisionInputInstancesNotFetchedException();
}
}
@Override
public List<Histor... | public void addOutput(HistoricDecisionOutputInstance decisionOutputInstance) {
if(outputs == null) {
outputs = new ArrayList<HistoricDecisionOutputInstance>();
}
outputs.add(decisionOutputInstance);
}
public Double getCollectResultValue() {
return collectResultValue;
}
public void setCol... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricDecisionInstanceEntity.java | 1 |
请完成以下Java代码 | public class DhlCustomDeliveryData implements CustomDeliveryData
{
@Singular
@NonNull
private final ImmutableList<DhlCustomDeliveryDataDetail> details;
@NonNull
public static DhlCustomDeliveryData cast(@NonNull final CustomDeliveryData customDeliveryData)
{
return (DhlCustomDeliveryData)customDeliveryData;
}
... | }
@NonNull
public DhlCustomDeliveryDataDetail getDetailBySequenceNumber(@NonNull final DhlSequenceNumber sequenceNumber)
{
//noinspection OptionalGetWithoutIsPresent
return details.stream()
.filter(it -> it.getSequenceNumber().equals(sequenceNumber))
.findFirst()
.get();
}
@NonNull
public DhlCus... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java\de\metas\shipper\gateway\dhl\model\DhlCustomDeliveryData.java | 1 |
请完成以下Java代码 | public Json oper(String operate) {
this.put(KEY_OPER, operate);
return this;
}
/** 设置操作结果是否成功的标记 */
public Json succ(boolean success) {
this.put(KEY_SUCC, success);
return this;
}
/** 设置操作结果的代码 */
public Json code(int code) {
this.put(KEY_CODE, code);
return this;
}
/** 设置操作结果的信息 */
public Json ... | this.put(KEY_MSG, message);
return this;
}
/** 设置操作返回的数据 */
public Json data(Object dataVal) {
this.put(KEY_DATA, dataVal);
return this;
}
/** 设置操作返回的数据,数据使用自定义的key存储 */
public Json data(String dataKey, Object dataVal) {
this.put(dataKey, dataVal);
return this;
}
} | repos\spring-boot-quick-master\quick-spring-shiro\src\main\java\com\shiro\vo\Json.java | 1 |
请在Spring Boot框架中完成以下Java代码 | Saml2AuthenticationToken getToken() {
return this.token;
}
}
/**
* A tuple containing an OpenSAML {@link Assertion} and its associated authentication
* token.
*
* @since 5.4
*/
static class AssertionToken {
private final Saml2AuthenticationToken token;
private final Assertion assertion; | AssertionToken(Assertion assertion, Saml2AuthenticationToken token) {
this.token = token;
this.assertion = assertion;
}
Assertion getAssertion() {
return this.assertion;
}
Saml2AuthenticationToken getToken() {
return this.token;
}
}
} | repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\authentication\BaseOpenSamlAuthenticationProvider.java | 2 |
请完成以下Java代码 | public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Integer getAdminCount() {
return adminCount;
}
publi... | return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.ap... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsRole.java | 1 |
请完成以下Java代码 | public void patternMatches(Blackhole bh) {
// Above approach "value.matches(PATTERN)" makes this internally
// 5_000_000 Pattern objects created
// 5_000_000 Matcher objects created
for (String value : values) {
bh.consume(Pattern.matches(PATTERN, value));
}
}
... | bh.consume(value.matches(PATTERN));
}
}
@Setup()
public void setUp() {
preCompiledPattern = Pattern.compile(PATTERN);
matcherFromPreCompiledPattern = preCompiledPattern.matcher("");
values = new ArrayList<>();
for (int x = 1; x <= 5_000_000; x++) {
value... | repos\tutorials-master\core-java-modules\core-java-regex-3\src\main\java\com\baeldung\patternreuse\PatternPerformanceComparison.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class WebSocketConfiguration {
@Bean
@ConditionalOnMissingBean
GraphQlWebSocketHandler graphQlWebSocketHandler(WebGraphQlHandler webGraphQlHandler,
GraphQlProperties properties, ObjectProvider<ServerHttpMessageConvertersCustomizer> customizers) {
return new GraphQlWebSocketHandler(webGraphQlHandler... | @Bean
HandlerMapping graphQlWebSocketMapping(GraphQlWebSocketHandler handler, GraphQlProperties properties) {
String path = properties.getWebsocket().getPath();
Assert.state(path != null, "'path' must not be null");
logger.info(LogMessage.format("GraphQL endpoint WebSocket %s", path));
WebSocketHandlerMap... | repos\spring-boot-4.0.1\module\spring-boot-graphql\src\main\java\org\springframework\boot\graphql\autoconfigure\servlet\GraphQlWebMvcAutoConfiguration.java | 2 |
请完成以下Java代码 | protected void installService(OperationContext context, ManagedProcessEngineMetadata processEngineConfiguration) {
MscManagedProcessEngineController service = new MscManagedProcessEngineController(processEngineConfiguration);
ServiceName serviceName = ServiceNames.forManagedProcessEngine(processEngineConfigura... | pluginConfigurations.add(processEnginePluginXml);
}
}
return pluginConfigurations;
}
protected Map<String, String> getProperties(ModelNode properties) {
Map<String, String> propertyMap = new HashMap<>();
if (properties.isDefined()) {
for (Property property : properties.asPropertyList()... | repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\extension\handler\ProcessEngineAdd.java | 1 |
请完成以下Java代码 | public List<Map<String, Object>> getRuleResults() {
return ruleResults;
}
public List<Object> getOutputValues(String outputName) {
List<Object> outputValues = new ArrayList<>();
for (Map<String, Object> ruleOutputValues : ruleResults) {
outputValues.add(ruleOutputValues.get(... | } else {
return null;
}
}
public Map<String, Object> getSingleRuleResult() {
if (ruleResults.isEmpty()) {
return null;
} else if (ruleResults.size() > 1) {
throw new FlowableException("Decision has multiple results");
} else {
retu... | repos\flowable-engine-main\modules\flowable-dmn-api\src\main\java\org\flowable\dmn\api\DmnDecisionRuleResult.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void exportStockToShopware(@NonNull final Exchange exchange)
{
final ExportStockRouteContext exportStockRouteContext = exchange.getProperty(ROUTE_PROPERTY_EXPORT_STOCK_CONTEXT, ExportStockRouteContext.class);
final JsonStock jsonStock = exchange.getIn().getBody(JsonStock.class);
final ShopwareClient sh... | final String clientId = request.getParameters().get(ExternalSystemConstants.PARAM_CLIENT_ID);
final String clientSecret = request.getParameters().get(ExternalSystemConstants.PARAM_CLIENT_SECRET);
final String basePath = request.getParameters().get(ExternalSystemConstants.PARAM_BASE_PATH);
final PInstanceLogger p... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\stock\ExportStockRouteBuilder.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ApiAuditConfigRepository
{
private final IQueryBL queryBL = Services.get(IQueryBL.class);
private final CCache<Integer, ApiAuditConfigsMap> cache = CCache.<Integer, ApiAuditConfigsMap>builder()
.tableName(I_API_Audit_Config.Table_Name)
.build();
public ImmutableList<ApiAuditConfig> getActiveConf... | return ApiAuditConfig.builder()
.apiAuditConfigId(ApiAuditConfigId.ofRepoId(record.getAPI_Audit_Config_ID()))
.active(record.isActive())
.orgId(OrgId.ofRepoId(record.getAD_Org_ID()))
.seqNo(record.getSeqNo())
.isBypassAudit(record.isBypassAudit())
.forceProcessedAsync(record.isForceProcessedAsyn... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\audit\apirequest\config\ApiAuditConfigRepository.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void setConsignmentReference(String value) {
this.consignmentReference = value;
}
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
... | * This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the invoiceFooter property.
*
* <p>
... | 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\INVOICExtensionType.java | 2 |
请完成以下Java代码 | private Set<String> sortedStrings(Collection<String> input) {
return sortedStrings(input, Function.identity());
}
private <S> Set<String> sortedStrings(Collection<S> input, Function<S, String> converter) {
TreeSet<String> results = new TreeSet<>();
for (S item : input) {
results.add(converter.apply(item));
... | private final @Nullable Origin origin;
private Descriptor(String propertyName, @Nullable Origin origin) {
this.propertyName = propertyName;
this.origin = origin;
}
static Descriptor get(PropertySource<?> source, String propertyName) {
Origin origin = OriginLookup.getOrigin(source, propertyName);
ret... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\diagnostics\analyzer\MutuallyExclusiveConfigurationPropertiesFailureAnalyzer.java | 1 |
请完成以下Java代码 | public class QueryPropertyImpl implements QueryProperty {
private static final long serialVersionUID = 1L;
protected String name;
protected String function;
public QueryPropertyImpl(String name) {
this(name, null);
}
public QueryPropertyImpl(String name, String function) {
this.name = name;
... | }
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
QueryPropertyImpl other = (QueryPropertyImpl) obj;
if (function == null) {
if (other.function != null)
return false;
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\QueryPropertyImpl.java | 1 |
请完成以下Java代码 | public DeviceProfile findByName(TenantId tenantId, String profileName) {
return DaoUtil.getData(deviceProfileRepository.findByTenantIdAndName(tenantId.getId(), profileName));
}
@Override
public PageData<DeviceProfile> findAllWithImages(PageLink pageLink) {
return DaoUtil.toPageData(devicePr... | @Override
public DeviceProfileId getExternalIdByInternal(DeviceProfileId internalId) {
return Optional.ofNullable(deviceProfileRepository.getExternalIdById(internalId.getId()))
.map(DeviceProfileId::new).orElse(null);
}
@Override
public DeviceProfile findDefaultEntityByTenantId(... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\device\JpaDeviceProfileDao.java | 1 |
请完成以下Java代码 | abstract class VEditorAction extends AbstractAction
{
private static final long serialVersionUID = 1L;
public VEditorAction(final String name, final KeyStroke accelerator)
{
super(name);
putValue(Action.ACCELERATOR_KEY, accelerator);
}
@Override
public abstract void actionPerformed(final ActionEvent e);
... | return;
}
final String actionName = getName();
final ActionMap actionMap = comp.getActionMap();
actionMap.put(actionName, this);
final KeyStroke accelerator = getAccelerator();
if (accelerator != null)
{
final InputMap inputMap = comp.getInputMap(inputMapCondition);
inputMap.put(accelerator, acti... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VEditorAction.java | 1 |
请完成以下Java代码 | public int getFact_Acct_UserChange_ID()
{
return get_ValueAsInt(COLUMNNAME_Fact_Acct_UserChange_ID);
}
@Override
public void setLocal_Currency_ID (final int Local_Currency_ID)
{
if (Local_Currency_ID < 1)
set_Value (COLUMNNAME_Local_Currency_ID, null);
else
set_Value (COLUMNNAME_Local_Currency_ID, ... | /** CR = C */
public static final String POSTINGSIGN_CR = "C";
@Override
public void setPostingSign (final java.lang.String PostingSign)
{
set_Value (COLUMNNAME_PostingSign, PostingSign);
}
@Override
public java.lang.String getPostingSign()
{
return get_ValueAsString(COLUMNNAME_PostingSign);
}
@Overrid... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Fact_Acct_UserChange.java | 1 |
请完成以下Java代码 | public void setSalesPartnerCode (final @Nullable java.lang.String SalesPartnerCode)
{
set_Value (COLUMNNAME_SalesPartnerCode, SalesPartnerCode);
}
@Override
public java.lang.String getSalesPartnerCode()
{
return get_ValueAsString(COLUMNNAME_SalesPartnerCode);
}
@Override
public void setSalesRep_ID (final... | }
@Override
public int getUser1_ID()
{
return get_ValueAsInt(COLUMNNAME_User1_ID);
}
@Override
public org.compiere.model.I_C_ElementValue getUser2()
{
return get_ValueAsPO(COLUMNNAME_User2_ID, org.compiere.model.I_C_ElementValue.class);
}
@Override
public void setUser2(final org.compiere.model.I_C_Ele... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CustomersService {
private final DataSource dataSource;
public CustomersService(DataSource dataSource) {
this.dataSource = dataSource;
}
public List<Customer> customersEligibleForOffers() throws SQLException {
try (Connection conn = dataSource.getConnection(); Statement s... | customers.add(customer);
}
}
return customers;
}
}
private Customer mapCustomer(ResultSet resultSet) throws SQLException {
return new Customer(
resultSet.getInt("id"),
resultSet.getString("name"),
Status.valueOf(resultS... | repos\tutorials-master\persistence-modules\core-java-persistence-4\src\main\java\com\baeldung\jdbc\mocking\CustomersService.java | 2 |
请完成以下Java代码 | public ResponseEntity<QuoteDTO> updateQuote(@Valid @RequestBody QuoteDTO quoteDTO) throws URISyntaxException {
log.debug("REST request to update Quote : {}", quoteDTO);
if (quoteDTO.getId() == null) {
throw new BadRequestAlertException("Invalid id", ENTITY_NAME, "idnull");
}
... | * @return the ResponseEntity with status 200 (OK) and with body the quoteDTO, or with status 404 (Not Found)
*/
@GetMapping("/quotes/{id}")
@Timed
public ResponseEntity<QuoteDTO> getQuote(@PathVariable Long id) {
log.debug("REST request to get Quote : {}", id);
Optional<QuoteDTO> quoteD... | repos\tutorials-master\jhipster-modules\jhipster-uaa\quotes\src\main\java\com\baeldung\jhipster\quotes\web\rest\QuoteResource.java | 1 |
请完成以下Java代码 | protected void addQty(final int qtyToAdd)
{
qty = qty.add(BigDecimal.valueOf(qtyToAdd));
}
protected void subtractQty(final int qtyToSubtract)
{
qty = qty.subtract(BigDecimal.valueOf(qtyToSubtract));
}
/**
*
* @return packing materials amount(qty)'s unit of measure
*/
public I_C_UOM getC_UOM()
{
r... | || getM_MaterialTracking_ID() != candidateToAdd.getM_MaterialTracking_ID())
{
throw new HUException("Candidates are not matching."
+ "\nthis: " + this
+ "\ncandidate to add: " + candidateToAdd);
}
qty = qty.add(candidateToAdd.qty);
// add sources; might be different
addSources(candidateToAdd.get... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\spi\impl\HUPackingMaterialDocumentLineCandidate.java | 1 |
请完成以下Java代码 | protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_ImpEx_Connector[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Se... | {
return (de.metas.impex.model.I_ImpEx_ConnectorType)MTable.get(getCtx(), de.metas.impex.model.I_ImpEx_ConnectorType.Table_Name)
.getPO(getImpEx_ConnectorType_ID(), get_TrxName()); }
/** Set Konnektor-Typ.
@param ImpEx_ConnectorType_ID Konnektor-Typ */
public void setImpEx_ConnectorType_ID (int ImpEx_Connec... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\impex\model\X_ImpEx_Connector.java | 1 |
请完成以下Java代码 | public CalculateTaxResult calculateTax(final I_C_Tax tax, final BigDecimal amount, final boolean taxIncluded, final int scale)
{
return TaxUtils.from(tax).calculateTax(amount, taxIncluded, scale);
}
public BigDecimal calculateTaxAmt(final I_C_Tax tax, final BigDecimal amount, final boolean taxIncluded, final int ... | if (taxCategoryId == null)
{
throw new AdempiereException("No tax category found for Regular VATType");
}
return taxCategoryId;
}
@NonNull
public Optional<TaxCategoryId> getTaxCategoryIdByInternalName(@NonNull final String internalName)
{
return Services.get(IQueryBL.class)
.createQueryBuilder(I_C_... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\tax\api\impl\TaxBL.java | 1 |
请完成以下Java代码 | protected void configure() {
try {
bind(AccountService.class).to(AccountServiceImpl.class);
bind(Person.class).toConstructor(Person.class.getConstructor());
// bind(Person.class).toProvider(new Provider<Person>() {
// public Person get() {
// Person p = new Person();
// return p;
// }
// });
... | // TODO Auto-generated catch block
e.printStackTrace();
} catch (SecurityException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
@Provides
public BookService bookServiceGenerator() {
return new BookServiceImpl();
}
} | repos\tutorials-master\di-modules\guice\src\main\java\com\baeldung\guice\modules\GuiceModule.java | 1 |
请完成以下Java代码 | public void updateProductDescriptionFromProductBOMIfConfigured(final I_C_OrderLine orderLine)
{
orderLineBL.updateProductDescriptionFromProductBOMIfConfigured(orderLine);
}
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE }, //
ifColumnsChanged = { I_C_OrderLine.COLUMN... | @ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE }, //
ifColumnsChanged = { I_C_OrderLine.COLUMNNAME_IsWithoutCharge, I_C_OrderLine.COLUMNNAME_PriceActual, I_C_OrderLine.COLUMNNAME_PriceEntered })
public void updatePriceToZero(final I_C_OrderLine orderLine)
{
if (orderLi... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\model\interceptor\C_OrderLine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setProcessInstanceVariables(List<QueryVariable> processInstanceVariables) {
this.processInstanceVariables = processInstanceVariables;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getProcessInstanceId() ... | public void setActivityId(String activityId) {
this.activityId = activityId;
}
public String getParentId() {
return parentId;
}
public void setParentId(String parentId) {
this.parentId = parentId;
}
public String getTenantId() {
return tenantId;
}
publ... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\ExecutionQueryRequest.java | 2 |
请完成以下Java代码 | public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public Type getType() {
return typ... | this.type = type;
}
public Priority getPriority() {
return priority;
}
public void setPriority(Priority priority) {
this.priority = priority;
}
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.categor... | repos\tutorials-master\persistence-modules\java-jpa\src\main\java\com\baeldung\jpa\enums\Article.java | 1 |
请完成以下Java代码 | public UserQuery userEmail(String email) {
this.email = email;
return this;
}
public UserQuery userEmailLike(String emailLike) {
ensureNotNull("Provided emailLike", emailLike);
this.emailLike = emailLike;
return this;
}
public UserQuery memberOfGroup(String groupId) {
ensureNotNull("Pr... | public UserQuery orderByUserLastName() {
return orderBy(UserQueryProperty.LAST_NAME);
}
//getters //////////////////////////////////////////////////////////
public String getId() {
return id;
}
public String[] getIds() {
return ids;
}
public String getFirstName() {
return firstName;
}
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\UserQueryImpl.java | 1 |
请完成以下Java代码 | private final ICopyPasteSupportEditor getCopyPasteSupport()
{
if (_copyPasteSupport == null)
{
_copyPasteSupport = createCopyPasteSupport(getEditor());
if (!NullCopyPasteSupportEditor.isNull(_copyPasteSupport))
{
// Setup the copy/paste action if needed
CopyPasteAction.getCreateAction(_cop... | {
return getActionType().getKeyStroke();
}
@Override
public boolean isAvailable()
{
return !NullCopyPasteSupportEditor.isNull(getCopyPasteSupport());
}
@Override
public boolean isRunnable()
{
return getCopyPasteSupport().isCopyPasteActionAllowed(getActionType());
}
@Override
public boo... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\CopyPasteContextMenuAction.java | 1 |
请完成以下Java代码 | private static boolean isNotPkcs8Wrapper(String line) {
return !PKCS8_PEM_HEADER.equals(line) && !PKCS8_PEM_FOOTER.equals(line);
}
private static class X509PemDecoder implements Converter<List<String>, RSAPublicKey> {
private final KeyFactory keyFactory;
X509PemDecoder(KeyFactory keyFactory) {
this.keyFac... | public @NonNull RSAPublicKey convert(List<String> lines) {
StringBuilder base64Encoded = new StringBuilder();
for (String line : lines) {
if (isNotX509CertificateWrapper(line)) {
base64Encoded.append(line);
}
}
byte[] x509 = Base64.getDecoder().decode(base64Encoded.toString());
try (InputStr... | repos\spring-security-main\core\src\main\java\org\springframework\security\converter\RsaKeyConverters.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class C_BPartner_Location
{
@Init
public void setupCallouts()
{
final IProgramaticCalloutProvider calloutProvider = Services.get(IProgramaticCalloutProvider.class);
calloutProvider.registerAnnotatedCallout(new de.metas.contracts.bpartner.interceptor.C_BPartner_Location());
}
@ModelChange(timings = Mode... | /**
* Prevents that a (the preceeding) location is terminated in the past.
* This is done by preventing that the current location's validFrom is set int he past.
*/
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE },
ifColumnsChanged = { I_C_BPartner_Location.COLUMNNA... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\interceptor\C_BPartner_Location.java | 2 |
请完成以下Java代码 | public boolean isEmpty()
{
final LinkedHashMap<EventKey, JSONDocumentChangedWebSocketEvent> events = this._events;
return events == null || events.isEmpty();
}
private JSONDocumentChangedWebSocketEvent getCreateEvent(@NonNull final WindowId windowId, @NonNull final DocumentId documentId)
{
final EventKey key... | {
final JSONDocumentChangedWebSocketEvent event = getCreateEvent(windowId, documentId);
event.addIncludedTabInfo(tabInfo);
}
public void mergeFrom(final JSONDocumentChangedWebSocketEventCollector from)
{
final LinkedHashMap<EventKey, JSONDocumentChangedWebSocketEvent> fromEvents = from._events;
if (fromEven... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\events\JSONDocumentChangedWebSocketEventCollector.java | 1 |
请完成以下Java代码 | protected boolean removeListenerEntry(final int workpackageId, final IQueueProcessorListener callback)
{
listenersLock.lock();
try
{
final List<ListenerEntry> entries = _listeners.get(workpackageId);
if (entries == null)
{
return false;
}
boolean removed = false;
for (final Iterator<Listen... | try
{
listener.onWorkpackageProcessed(workpackage, workpackageProcessor);
}
catch (final Exception e)
{
logger.error("Error while executing " + listener + " for " + workpackage + " [SKIP]", e);
// NOTE: we are not throwing the error because there is not much to handle it, everything was consumed... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\processor\impl\DefaultQueueProcessorEventDispatcher.java | 1 |
请完成以下Java代码 | private QuickInputDescriptor createQuickInputDescriptorOrNull(final QuickInputDescriptorKey key)
{
final IQuickInputDescriptorFactory quickInputDescriptorFactory = getQuickInputDescriptorFactory(key);
if (quickInputDescriptorFactory == null)
{
return null;
}
return quickInputDescriptorFactory.createQuick... | return null;
}
private IQuickInputDescriptorFactory getQuickInputDescriptorFactory(final IQuickInputDescriptorFactory.MatchingKey matchingKey)
{
final ImmutableList<IQuickInputDescriptorFactory> matchingFactories = factories.get(matchingKey);
if (matchingFactories.isEmpty())
{
return null;
}
if (match... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\quickinput\QuickInputDescriptorFactoryService.java | 1 |
请完成以下Java代码 | public AbstractEngineConfiguration setCustomPreDeployers(List<EngineDeployer> customPreDeployers) {
this.customPreDeployers = customPreDeployers;
return this;
}
public List<EngineDeployer> getCustomPostDeployers() {
return customPostDeployers;
}
public AbstractEngineConfigurati... | }
public AbstractEngineConfiguration setIdmEngineConfigurator(EngineConfigurator idmEngineConfigurator) {
this.idmEngineConfigurator = idmEngineConfigurator;
return this;
}
public EngineConfigurator getEventRegistryConfigurator() {
return eventRegistryConfigurator;
}
publi... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\AbstractEngineConfiguration.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public HistoryJobQuery jobTenantIdLike(String tenantIdLike) {
if (tenantIdLike == null) {
throw new FlowableIllegalArgumentException("Provided tenant id is null");
}
this.tenantIdLike = tenantIdLike;
return this;
}
@Override
public HistoryJobQuery jobWithoutTenan... | public boolean isWithException() {
return withException;
}
public String getExceptionMessage() {
return exceptionMessage;
}
public String getScopeType() {
return scopeType;
}
public String getTenantId() {
return tenantId;
}
public String getTenantIdLik... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\HistoryJobQueryImpl.java | 2 |
请完成以下Java代码 | public static final class DocumentFilterBuilder
{
public DocumentFilterBuilder setFilterId(final String filterId)
{
return filterId(filterId);
}
public DocumentFilterBuilder setCaption(@NonNull final ITranslatableString caption)
{
return caption(caption);
}
public DocumentFilterBuilder setCaption... | return !Check.isEmpty(parameters)
|| !Check.isEmpty(internalParameterNames);
}
public DocumentFilterBuilder setParameters(@NonNull final List<DocumentFilterParam> parameters)
{
return parameters(parameters);
}
public DocumentFilterBuilder addParameter(@NonNull final DocumentFilterParam parameter)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\DocumentFilter.java | 1 |
请完成以下Java代码 | protected DecisionDefinition getDecisionDefinition(CommandContext commandContext) {
DeploymentCache deploymentCache = commandContext.getProcessEngineConfiguration().getDeploymentCache();
if (decisionDefinitionId != null) {
return findById(deploymentCache);
} else {
return findByKey(deploymentCa... | }
else if (version == null && isTenandIdSet) {
decisionDefinition = deploymentCache.findDeployedLatestDecisionDefinitionByKeyAndTenantId(decisionDefinitionKey, decisionDefinitionTenantId);
}
else if (version != null && !isTenandIdSet) {
decisionDefinition = deploymentCache.findDeployedDecisionDe... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\cmd\EvaluateDecisionTableCmd.java | 1 |
请完成以下Java代码 | public List<HistoricVariableUpdate> execute(CommandContext commandContext) {
List<HistoricVariableUpdate> historicVariableUpdates =
commandContext.getOptimizeManager().getHistoricVariableUpdates(occurredAfter, occurredAt, maxResults);
fetchVariableValues(historicVariableUpdates, commandContext);
retur... | HistoricDetailVariableInstanceUpdateEntity entity = (HistoricDetailVariableInstanceUpdateEntity) variableUpdate;
if (shouldFetchValue(entity)) {
String byteArrayId = entity.getByteArrayValueId();
if (byteArrayId != null) {
byteArrayIds.add(byteArrayId);
}
}
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\optimize\OptimizeHistoricVariableUpdateQueryCmd.java | 1 |
请完成以下Java代码 | private final ITrxManager getTrxManager()
{
final ITrxManager trxManager = trxManagerRef.get();
if (trxManager == null)
{
throw new AdempiereException("TrxManager service expired");
}
return trxManager;
}
@Override
public final String getJMXName()
{
return jmxName;
}
@Override
public void setDe... | {
if (trxs == null || trxs.isEmpty())
{
return new String[] {};
}
final String[] arr = new String[trxs.size()];
for (int i = 0; i < trxs.size(); i++)
{
final ITrx trx = trxs.get(0);
if (trx == null)
{
arr[i] = "null";
}
else
{
arr[i] = trx.toString();
}
}
return arr;
}... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\jmx\JMXTrxManager.java | 1 |
请完成以下Java代码 | private JsonPurchaseCandidate.JsonPurchaseCandidateBuilder preparePurchaseCandidateStatus(@NonNull final PurchaseCandidate candidate)
{
return JsonPurchaseCandidate.builder()
.externalSystemCode(poJsonConverters.getExternalSystemTypeById(candidate))
.externalHeaderId(JsonExternalIds.ofOrNull(candidate.getExt... | return JsonPurchaseOrder.builder()
.dateOrdered(TimeUtil.asZonedDateTime(order.getDateOrdered(), timeZone))
.datePromised(TimeUtil.asZonedDateTime(order.getDatePromised(), timeZone))
.docStatus(order.getDocStatus())
.documentNo(order.getDocumentNo())
.metasfreshId(JsonMetasfreshId.of(order.getC_Orde... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\order\PurchaseCandidatesStatusService.java | 1 |
请完成以下Java代码 | public PartyIdentification43 getMsgRcpt() {
return msgRcpt;
}
/**
* Sets the value of the msgRcpt property.
*
* @param value
* allowed object is
* {@link PartyIdentification43 }
*
*/
public void setMsgRcpt(PartyIdentification43 value) {
this.... | *
*/
public void setOrgnlBizQry(OriginalBusinessQuery1 value) {
this.orgnlBizQry = value;
}
/**
* Gets the value of the addtlInf property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAddtlInf() {
ret... | 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\GroupHeader58.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static AutoConfigurationReplacements load(Class<?> annotation, @Nullable ClassLoader classLoader) {
Assert.notNull(annotation, "'annotation' must not be null");
ClassLoader classLoaderToUse = decideClassloader(classLoader);
String location = String.format(LOCATION, annotation.getName());
Enumeration<URL> urls =... | }
catch (IOException ex) {
throw new IllegalArgumentException("Failed to load configurations from location [" + location + "]", ex);
}
}
@SuppressWarnings({ "unchecked", "rawtypes" })
private static Map<String, String> readReplacements(URL url) {
try (BufferedReader reader = new BufferedReader(
new Inp... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\AutoConfigurationReplacements.java | 2 |
请完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Column(name = "source")
public String getSource() {
return source;
}
public void setSource(String source) {
this.source = source;
}
@Column(name = "destination")
... | @ElementCollection(fetch = EAGER)
@CollectionTable(name = "consignment_item", joinColumns = @JoinColumn(name = "consignment_id"))
@OrderColumn(name = "item_index")
public List<Item> getItems() {
return items;
}
public void setItems(List<Item> items) {
this.items = items;
}
... | repos\tutorials-master\aws-modules\aws-lambda-modules\shipping-tracker-lambda\ShippingFunction\src\main\java\com\baeldung\lambda\shipping\Consignment.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public abstract class AbstractProcessEngineAutoConfiguration extends AbstractProcessEngineConfiguration {
@Bean
public SpringAsyncExecutor springAsyncExecutor(TaskExecutor applicationTaskExecutor) {
return new SpringAsyncExecutor(applicationTaskExecutor, springRejectedJobsHandler());
}
@Bean
... | @Override
public TaskService taskServiceBean(ProcessEngine processEngine) {
return super.taskServiceBean(processEngine);
}
@Bean
@ConditionalOnMissingBean
@Override
public HistoryService historyServiceBean(ProcessEngine processEngine) {
return super.historyServiceBean(processEng... | repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\boot\AbstractProcessEngineAutoConfiguration.java | 2 |
请完成以下Java代码 | protected void configureQuery(HistoricIncidentQueryImpl query) {
getAuthorizationManager().configureHistoricIncidentQuery(query);
getTenantManager().configureQuery(query);
}
protected boolean isHistoryEventProduced() {
HistoryLevel historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel(... | }
parameters.put("batchSize", batchSize);
return getDbEntityManager()
.deletePreserveOrder(HistoricIncidentEntity.class, "deleteHistoricIncidentsByRemovalTime",
new ListQueryParameterObject(parameters, 0, batchSize));
}
public void addRemovalTimeToHistoricIncidentsByBatchId(String batchId, D... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricIncidentManager.java | 1 |
请完成以下Java代码 | public Message<?> preSend(Message<?> message, MessageChannel channel) {
Authentication authentication = this.securityContextHolderStrategy.getContext().getAuthentication();
if (authentication == null) {
authentication = this.anonymous;
}
return MessageBuilder.fromMessage(message).setHeader(this.authenticatio... | originalContext.remove();
return;
}
SecurityContext context = contextStack.pop();
try {
if (this.empty.equals(context)) {
this.securityContextHolderStrategy.clearContext();
originalContext.remove();
}
else {
this.securityContextHolderStrategy.setContext(context);
}
}
catch (Throwabl... | repos\spring-security-main\messaging\src\main\java\org\springframework\security\messaging\context\SecurityContextPropagationChannelInterceptor.java | 1 |
请完成以下Java代码 | public List<HistoricCaseInstance> findByCriteria(HistoricCaseInstanceQueryImpl query) {
setSafeInValueLists(query);
return getDbSqlSession().selectList("selectHistoricCaseInstancesByQueryCriteria", query, getManagedEntityClass());
}
@Override
public long countByCriteria(HistoricCaseInstance... | @Override
public void deleteHistoricCaseInstances(HistoricCaseInstanceQueryImpl historicCaseInstanceQuery) {
getDbSqlSession().delete("bulkDeleteHistoricCaseInstances", historicCaseInstanceQuery, getManagedEntityClass());
}
@Override
public void bulkDeleteHistoricCaseInstances(Collection<St... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\data\impl\MybatisHistoricCaseInstanceDataManagerImpl.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.