instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class UserProduct extends AbstractEntity { public static UserProduct build(final User user, final Product product) { final UserProduct userProduct = new UserProduct(); userProduct.setUser(user); userProduct.setProduct(product); return userProduct; } @ManyToOne(fetch = FetchType.LAZY) @NonNull priv...
return user; } private void setUser(final User user) { this.user = user; } public Product getProduct() { return product; } private void setProduct(final Product product) { this.product = product; } }
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\model\UserProduct.java
2
请完成以下Java代码
public UserAuthToken createNew(@NonNull final CreateUserAuthTokenRequest request) { final I_AD_User_AuthToken record = newInstanceOutOfTrx(I_AD_User_AuthToken.class); record.setAD_User_ID(request.getUserId().getRepoId()); InterfaceWrapperHelper.setValue(record, I_AD_User_AuthToken.COLUMNNAME_AD_Client_ID, reques...
.create() .delete(); } @NonNull public UserAuthToken getById(@NonNull final UserAuthTokenId id) { final I_AD_User_AuthToken record = queryBL.createQueryBuilder(I_AD_User_AuthToken.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_AD_User_AuthToken.COLUMNNAME_AD_User_AuthToken_ID, id) .creat...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\UserAuthTokenRepository.java
1
请完成以下Java代码
public void setA_Purchase_Price (BigDecimal A_Purchase_Price) { set_Value (COLUMNNAME_A_Purchase_Price, A_Purchase_Price); } /** Get Option Purchase Price. @return Option Purchase Price */ public BigDecimal getA_Purchase_Price () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Purchase_Price); if ...
/** Set Text Message. @param TextMsg Text Message */ public void setTextMsg (String TextMsg) { set_Value (COLUMNNAME_TextMsg, TextMsg); } /** Get Text Message. @return Text Message */ public String getTextMsg () { return (String)get_Value(COLUMNNAME_TextMsg); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Info_Fin.java
1
请完成以下Java代码
public StockDetailsView getByIdOrNull(final ViewId viewId) { return views.getIfPresent(viewId); } @Override public void closeById(@NonNull final ViewId viewId, @NonNull final ViewCloseAction closeAction) { views.invalidate(viewId); views.cleanUp(); // also cleanup to prevent views cache to grow. } @Overr...
singleQuery.productId(ProductId.ofRepoIdOrNull(productRepoId)); final int attributeRepoId = filter.getParameterValueAsInt(I_M_HU_Stock_Detail_V.COLUMNNAME_M_Attribute_ID, -1); singleQuery.attributeId(AttributeId.ofRepoIdOrNull(attributeRepoId)); final String attributeValue = filter.getParameterValueAsString(...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\stockdetails\StockDetailsViewFactory.java
1
请完成以下Java代码
public void setAD_OrgType_ID (int AD_OrgType_ID) { if (AD_OrgType_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_OrgType_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_OrgType_ID, Integer.valueOf(AD_OrgType_ID)); } /** Get Organization Type. @return Organization Type */ public int getAD_OrgType_ID () ...
*/ public void setDescription (String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Description. @return Optional short description of the record */ public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set Name. @param Name Alphan...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_OrgType.java
1
请在Spring Boot框架中完成以下Java代码
class NoDslContextBeanFailureAnalyzer extends AbstractFailureAnalyzer<NoSuchBeanDefinitionException> implements Ordered { private final BeanFactory beanFactory; NoDslContextBeanFailureAnalyzer(BeanFactory beanFactory) { this.beanFactory = beanFactory; } @Override protected @Nullable FailureAnalysis analyze(...
private boolean hasR2dbcAutoConfiguration() { try { this.beanFactory.getBean(R2dbcAutoConfiguration.class); return true; } catch (Exception ex) { return false; } } @Override public int getOrder() { return 0; } }
repos\spring-boot-4.0.1\module\spring-boot-jooq\src\main\java\org\springframework\boot\jooq\autoconfigure\NoDslContextBeanFailureAnalyzer.java
2
请完成以下Java代码
public de.metas.handlingunits.model.I_M_HU_PI getM_HU_PI() { return get_ValueAsPO(COLUMNNAME_M_HU_PI_ID, de.metas.handlingunits.model.I_M_HU_PI.class); } @Override public void setM_HU_PI(final de.metas.handlingunits.model.I_M_HU_PI M_HU_PI) { set_ValueFromPO(COLUMNNAME_M_HU_PI_ID, de.metas.handlingunits.model...
return get_ValueAsInt(COLUMNNAME_M_HU_PI_ID); } @Override public void setM_HU_Process_ID (final int M_HU_Process_ID) { if (M_HU_Process_ID < 1) set_ValueNoCheck (COLUMNNAME_M_HU_Process_ID, null); else set_ValueNoCheck (COLUMNNAME_M_HU_Process_ID, M_HU_Process_ID); } @Override public int getM_HU_Pr...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Process.java
1
请完成以下Java代码
public String getFormKey() { return formKey; } public void setFormKey(String formKey) { this.formKey = formKey; } public boolean isInterrupting() { return isInterrupting; } public void setInterrupting(boolean isInterrupting) { this.isInterrupting = isInterrupti...
} public void setValues(StartEvent otherEvent) { super.setValues(otherEvent); setInitiator(otherEvent.getInitiator()); setFormKey(otherEvent.getFormKey()); setSameDeployment(otherEvent.isInterrupting); setInterrupting(otherEvent.isInterrupting); setValidateFormFields...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\StartEvent.java
1
请完成以下Java代码
private ViewResult getPage(final PageIndex pageIndex) { try { return cache.get(pageIndex); } catch (final ExecutionException e) { throw AdempiereException.wrapIfNeeded(e); } } @Override @Nullable public IViewRow getRow(final int rowIndex) { final ViewResult page = getPage(PageI...
Check.assume(rowIndex < rowsCount, "rowIndex < {}", rowsCount); return rows.get(rowIndex); } @Override public int getRowCount() { return rows.size(); } } @Override protected List<CellValue> getNextRow() { final ArrayList<CellValue> result = new ArrayList<>(); for (int i = 0; i < getColumnCoun...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewExcelExporter.java
1
请完成以下Java代码
public IDataSet load(String folderPath, String charsetName) throws IllegalArgumentException, IOException { return load(folderPath, charsetName, 1.); } @Override public IDataSet load(String folderPath) throws IllegalArgumentException, IOException { return load(folderPath, "UTF-8"); ...
} } ConsoleLogger.logger.out(" %d 篇文档\n", e - b); } ConsoleLogger.logger.finish(" 加载了 %d 个类目,共 %d 篇文档\n", getCatalog().size(), size()); return this; } @Override public IDataSet load(String folderPath, double rate) throws IllegalArgumentException, IOException ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\corpus\AbstractDataSet.java
1
请完成以下Java代码
protected DbEntityManager getDbEntityManager() { return getCommandContext().getDbEntityManager(); } protected JobManager getJobManager() { return getCommandContext().getJobManager(); } protected JobDefinitionManager getJobDefinitionManager() { return getCommandContext().getJobDefinitionManager(); ...
public ExpressionManager getExpressionManager() { return expressionManager; } public void setExpressionManager(ExpressionManager expressionManager) { this.expressionManager = expressionManager; } public BpmnParser getBpmnParser() { return bpmnParser; } public void setBpmnParser(BpmnParser bpm...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\deployer\BpmnDeployer.java
1
请完成以下Java代码
public boolean isSuspended() { return activiti5ProcessInstance.isSuspended(); } @Override public Map<String, Object> getProcessVariables() { return activiti5ProcessInstance.getProcessVariables(); } @Override public String getTenantId() { return activiti5ProcessInstance....
} @Override public String getCallbackId() { return null; } @Override public String getCallbackType() { return null; } @Override public String getReferenceId() { return null; } @Override public String getReferenceType() { return null...
repos\flowable-engine-main\modules\flowable5-compatibility\src\main\java\org\flowable\compatibility\wrapper\Flowable5ProcessInstanceWrapper.java
1
请完成以下Java代码
private List<RelatedProcessDescriptor> createAdditionalRelatedProcessDescriptors() { return ImmutableList.of( // allow to open the HU-editor for various picking related purposes createProcessDescriptorForPickingSlotView(WEBUI_Picking_HUEditor_Launcher.class), // fine-picking related processes create...
{ final IADProcessDAO adProcessDAO = Services.get(IADProcessDAO.class); final AdProcessId processId = adProcessDAO.retrieveProcessIdByClassIfUnique(processClass); Preconditions.checkArgument(processId != null, "No AD_Process_ID found for %s", processClass); return RelatedProcessDescriptor.builder() .proce...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\PickingSlotViewFactory.java
1
请完成以下Java代码
public void setES_FTS_Config_ID (final int ES_FTS_Config_ID) { if (ES_FTS_Config_ID < 1) set_ValueNoCheck (COLUMNNAME_ES_FTS_Config_ID, null); else set_ValueNoCheck (COLUMNNAME_ES_FTS_Config_ID, ES_FTS_Config_ID); } @Override public int getES_FTS_Config_ID() { return get_ValueAsInt(COLUMNNAME_ES_FT...
@Override public void setParent_Column(final org.compiere.model.I_AD_Column Parent_Column) { set_ValueFromPO(COLUMNNAME_Parent_Column_ID, org.compiere.model.I_AD_Column.class, Parent_Column); } @Override public void setParent_Column_ID (final int Parent_Column_ID) { if (Parent_Column_ID < 1) set_Value (C...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java-gen\de\metas\elasticsearch\model\X_ES_FTS_Config_SourceModel.java
1
请完成以下Java代码
public void setReportStatus(Integer reportStatus) { this.reportStatus = reportStatus; } public Integer getHandleStatus() { return handleStatus; } public void setHandleStatus(Integer handleStatus) { this.handleStatus = handleStatus; } public String getNote() { r...
sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", reportType=").append(reportType); sb.append(", reportMemberName=").append(reportMemberName); sb.append(", createTime=").append(crea...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsMemberReport.java
1
请在Spring Boot框架中完成以下Java代码
public Set<Object> setMembers(String key) { return setOperations.members(key); } public boolean setIsMember(String key, Object value) { return setOperations.isMember(key, value); } public long setAdd(String key, Object... values) { return setOperations.add(key, values); } ...
public boolean listRightPush(String key, Object value, long milliseconds) { listOperations.rightPush(key, value); if (milliseconds > 0) { return expire(key, milliseconds); } return false; } public long listRightPushAll(String key, List<Object> value) { return...
repos\spring-boot-best-practice-master\spring-boot-redis\src\main\java\cn\javastack\springboot\redis\service\RedisOptService.java
2
请完成以下Java代码
public class MapMapper { private final Map<String, String> source; private final Map<String, Object> target; public MapMapper(@NonNull Map<String, String> source, @NonNull Map<String, Object> target) { Assert.notNull(source, "Source Map must not be null"); Assert.notNull(target, "Target Map must not be null")...
Assert.state(keys.length == 1, String.format("Source size [%d] cannot be transformed as one argument", keys.length)); Map<String, String> source = getSource(); if (Arrays.stream(keys).allMatch(source::containsKey)) { getTarget().put(key, function.apply(source.get(keys[0]))); } } public void to(S...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-cloud\src\main\java\org\springframework\geode\cloud\bindings\MapMapper.java
1
请完成以下Java代码
default Boolean getEmailVerified() { return this.getClaimAsBoolean(StandardClaimNames.EMAIL_VERIFIED); } /** * Returns the user's gender {@code (gender)}. * @return the user's gender */ default String getGender() { return this.getClaimAsString(StandardClaimNames.GENDER); } /** * Returns the user's bi...
return this.getClaimAsBoolean(StandardClaimNames.PHONE_NUMBER_VERIFIED); } /** * Returns the user's preferred postal address {@code (address)}. * @return the user's preferred postal address */ default AddressStandardClaim getAddress() { Map<String, Object> addressFields = this.getClaimAsMap(StandardClaimNam...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\StandardClaimAccessor.java
1
请完成以下Java代码
public class Tenant extends BaseEntity { @Serial private static final long serialVersionUID = 1L; /** * 主键id */ @Schema(description = "主键") @TableId(value = "id", type = IdType.ASSIGN_ID) @JsonSerialize(using = ToStringSerializer.class) private Long id; /** * 租户ID */ @Schema(description = "租户ID") p...
private String domain; /** * 联系人 */ @Schema(description = "联系人") private String linkman; /** * 联系电话 */ @Schema(description = "联系电话") private String contactNumber; /** * 联系地址 */ @Schema(description = "联系地址") private String address; }
repos\SpringBlade-master\blade-service-api\blade-system-api\src\main\java\org\springblade\system\entity\Tenant.java
1
请完成以下Java代码
public class MigrationVariableValidationReportDto extends VariableValueDto { protected List<String> failures; public List<String> getFailures() { return failures; } public void setFailures(List<String> failures) { this.failures = failures; } public static Map<String, MigrationVariableValidationR...
dtos.put(name, MigrationVariableValidationReportDto.from(report))); return dtos; } public static MigrationVariableValidationReportDto from(MigrationVariableValidationReport variableReport) { MigrationVariableValidationReportDto dto = new MigrationVariableValidationReportDto(); VariableValueDto valueDto...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\migration\MigrationVariableValidationReportDto.java
1
请完成以下Java代码
public void setParameterSeqNo (int ParameterSeqNo) { set_Value (COLUMNNAME_ParameterSeqNo, Integer.valueOf(ParameterSeqNo)); } public int getParameterSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_ParameterSeqNo); if (ii == null) return 0; return ii.intValue(); } public void setParameterDisp...
*/ public void setQueryCriteriaFunction (String QueryCriteriaFunction) { set_Value (COLUMNNAME_QueryCriteriaFunction, QueryCriteriaFunction); } /** Get Query Criteria Function. @return column used for adding a sql function to query criteria */ public String getQueryCriteriaFunction () { return (String...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_InfoColumn.java
1
请完成以下Java代码
public static void main(String[] args) { SpringApplication.run(SpringBootMvcFnApplication.class, args); } @Bean RouterFunction<ServerResponse> productListing(ProductController pc, ProductService ps) { return pc.productListing(ps); } @Bean RouterFunction<ServerResponse> allAppli...
}) .build() .and(route(RequestPredicates.all(), req -> notFound().build())); } public static class Error { private String errorMessage; public Error(String message) { this.errorMessage = message; } public String getErrorMessage() { ...
repos\tutorials-master\spring-boot-modules\spring-boot-mvc-2\src\main\java\com\baeldung\springbootmvc\SpringBootMvcFnApplication.java
1
请在Spring Boot框架中完成以下Java代码
public BigDecimal getCareType() { return careType; } public void setCareType(BigDecimal careType) { this.careType = careType; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; ...
public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class InsuranceContractSalesContracts {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" careType: ").append(toIndentedString(careType)).append("\n"); sb.append("}"); return...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\InsuranceContractSalesContracts.java
2
请完成以下Java代码
public class CachedBodyOutputMessage implements ReactiveHttpOutputMessage { private final DataBufferFactory bufferFactory; private final HttpHeaders httpHeaders; private boolean cached = false; private @Nullable Flux<DataBuffer> body = null; public CachedBodyOutputMessage(ServerWebExchange exchange, HttpHeade...
* Return the request body, or an error stream if the body was never set or when. * @return body as {@link Flux} */ public Flux<DataBuffer> getBody() { if (body == null) { return Flux .error(new IllegalStateException("The body is not set. " + "Did handling complete with success?")); } return this.body;...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\rewrite\CachedBodyOutputMessage.java
1
请在Spring Boot框架中完成以下Java代码
public Boolean getHasChildren() { return subCount > 0; } @ApiModelProperty(value = "是否为叶子") public Boolean getLeaf() { return subCount <= 0; } @ApiModelProperty(value = "部门全名") public String getLabel() { return name; } @Override public boolean equals(Object...
if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DeptDto deptDto = (DeptDto) o; return Objects.equals(id, deptDto.id) && Objects.equals(name, deptDto.name); } @Override public int h...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\service\dto\DeptDto.java
2
请完成以下Java代码
public class NumberInfo { private int number; public NumberInfo(int number) { this.number = number; } public static NumberInfo from(int number) { return new NumberInfo(number); } public boolean isPositive() { return number > 0; } public boolean isEven() { ...
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; NumberInfo that = (NumberInfo) o; return number == that.number; } @Override public int hashCode() { return O...
repos\tutorials-master\spring-batch-2\src\main\java\com\baeldung\conditionalflow\model\NumberInfo.java
1
请完成以下Java代码
public void setReadOnlyLogic (final @Nullable java.lang.String ReadOnlyLogic) { set_Value (COLUMNNAME_ReadOnlyLogic, ReadOnlyLogic); } @Override public java.lang.String getReadOnlyLogic() { return get_ValueAsString(COLUMNNAME_ReadOnlyLogic); } @Override public void setSelectionColumnSeqNo (final int Sele...
} @Override public void setValueMin (final @Nullable java.lang.String ValueMin) { set_Value (COLUMNNAME_ValueMin, ValueMin); } @Override public java.lang.String getValueMin() { return get_ValueAsString(COLUMNNAME_ValueMin); } @Override public void setVersion (final BigDecimal Version) { set_Value (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Column.java
1
请完成以下Java代码
public Enumeration<String> getHeaders(String name) { List<String> list = header(name); if (list != null) { return new Vector<String>(list).elements(); } return super.getHeaders(name); } @Override public String getHeader(String name) { List<String> list = header(name); if (list != null && !l...
return true; } }; } public ServletInputStream getInputStream() { ByteArrayInputStream body = new ByteArrayInputStream(builder.toString().getBytes()); return new ServletInputStream() { @Override public int read() throws IOException { return body.read(); } @Override public void setReadLis...
repos\spring-cloud-gateway-main\spring-cloud-gateway-proxyexchange-webmvc\src\main\java\org\springframework\cloud\gateway\mvc\ProxyExchange.java
1
请完成以下Java代码
public OAuth2AccessToken getAccessToken() { return get(OAuth2AccessToken.class); } /** * Returns the {@link OAuth2Authorization authorization}. * @return the {@link OAuth2Authorization} */ public OAuth2Authorization getAuthorization() { return get(OAuth2Authorization.class); } /** * Constructs a new ...
return put(OAuth2AccessToken.class, accessToken); } /** * Sets the {@link OAuth2Authorization authorization}. * @param authorization the {@link OAuth2Authorization} * @return the {@link Builder} for further configuration */ public Builder authorization(OAuth2Authorization authorization) { return p...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\authentication\OidcUserInfoAuthenticationContext.java
1
请完成以下Java代码
public class ColumnEntity { /** * 列表 */ private String columnName; /** * 数据类型 */ private String dataType; /** * 备注 */ private String comments; /** * 驼峰属性 */ private String caseAttrName; /**
* 普通属性 */ private String lowerAttrName; /** * 属性类型 */ private String attrType; /** * jdbc类型 */ private String jdbcType; /** * 其他信息 */ private String extra; }
repos\spring-boot-demo-master\demo-codegen\src\main\java\com\xkcoding\codegen\entity\ColumnEntity.java
1
请完成以下Java代码
public boolean isLine() { return MFColorType.LINES.equals(getType()); } public boolean isTexture() { return MFColorType.TEXTURE.equals(getType()); } public MFColor setGradientUpperColor(final Color color) { if (!isGradient() || color == null) { return this; } return toBuilder().gradientUpperColo...
return this; } return toBuilder().lineBackColor(color).build(); } public MFColor setLineWidth(final float width) { if (!isLine()) { return this; } return toBuilder().lineWidth(width).build(); } public MFColor setLineDistance(final int distance) { if (!isLine()) { return this; } retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\util\MFColor.java
1
请完成以下Java代码
public java.lang.String getDocStatus() { return get_ValueAsString(COLUMNNAME_DocStatus); } @Override public void setExternalId (final @Nullable java.lang.String ExternalId) { set_Value (COLUMNNAME_ExternalId, ExternalId); } @Override public java.lang.String getExternalId() { return get_ValueAsString(...
@Override public void setM_Warehouse_ID (final int M_Warehouse_ID) { if (M_Warehouse_ID < 1) set_Value (COLUMNNAME_M_Warehouse_ID, null); else set_Value (COLUMNNAME_M_Warehouse_ID, M_Warehouse_ID); } @Override public int getM_Warehouse_ID() { return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Forecast.java
1
请完成以下Java代码
public ResponseEntity<PageResult<ColumnInfo>> queryColumns(@RequestParam String tableName){ List<ColumnInfo> columnInfos = generatorService.getColumns(tableName); return new ResponseEntity<>(PageUtil.toPage(columnInfos,columnInfos.size()), HttpStatus.OK); } @ApiOperation("保存字段数据") @PutMappi...
throw new BadRequestException("此环境不允许生成代码,请选择预览或者下载查看!"); } switch (type){ // 生成代码 case 0: generatorService.generator(genConfigService.find(tableName), generatorService.getColumns(tableName)); break; // 预览 case 1: return generatorServic...
repos\eladmin-master\eladmin-generator\src\main\java\me\zhengjie\rest\GeneratorController.java
1
请完成以下Java代码
private static ITranslatableString getLocationString(final LocationId locationId, final CountryId fallbackCountryId) { if (locationId != null) { return TranslatableStrings.anyLanguage(getLocationString(locationId)); } if (fallbackCountryId != null) { return getCountryName(fallbackCountryId); } ret...
private static String getLocationString(final BPartnerLocationAndCaptureId bpLocationId) { if (bpLocationId == null) { return "?"; } final LocationId locationId; if (bpLocationId.getLocationCaptureId() != null) { locationId = bpLocationId.getLocationCaptureId(); } else { final I_C_BPartner_...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\tax\api\TaxNotFoundException.java
1
请完成以下Java代码
protected void validateValue(Object value) { if(value != null) { if(values != null && !values.containsKey(value)) { throw new ProcessEngineException("Invalid value for enum form property: " + value); } } } public Map<String, String> getValues() { return values; } //////////////...
validateValue(propertyValue); return propertyValue; } @Override public String convertModelValueToFormValue(Object modelValue) { if(modelValue != null) { if(!(modelValue instanceof String)) { throw new ProcessEngineException("Model value should be a String"); } validateValue(mode...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\form\type\EnumFormType.java
1
请完成以下Java代码
public Optional<WarehouseId> retrieveInTransitWarehouseIdIfExists(@NonNull final OrgId adOrgId) { final IWarehouseDAO warehousesRepo = Services.get(IWarehouseDAO.class); return warehousesRepo.getInTransitWarehouseIdIfExists(adOrgId); } public Optional<BPartnerId> retrieveOrgBPartnerId(final OrgId orgId) { fi...
{ transferTimeFromNetworkLine = 0; } final int transferTime; if (transferTimeFromNetworkLine > 0) { transferTime = transferTimeFromNetworkLine; } else if (productPlanningData != null) { transferTime = productPlanningData.getTransferTimeDays(); Check.assume(transferTime >= 0, "transferTime >= 0...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\ddorder\DDOrderUtil.java
1
请在Spring Boot框架中完成以下Java代码
public class ComponentIssueCreateRequest { @NonNull I_PP_Order_BOMLine orderBOMLine; @NonNull ProductId productId; @NonNull LocatorId locatorId; @NonNull AttributeSetInstanceId attributeSetInstanceId; @NonNull ZonedDateTime movementDate; @NonNull Quantity qtyIssue; @NonNull Quantity qtyScrap; @NonNull Quantity ...
@Nullable final Quantity qtyScrap, @Nullable final Quantity qtyReject, final int pickingCandidateId) { this.orderBOMLine = orderBOMLine; this.productId = productId != null ? productId : ProductId.ofRepoId(orderBOMLine.getM_Product_ID()); this.locatorId = locatorId; this.attributeSetInstanceId = attribute...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\ComponentIssueCreateRequest.java
2
请完成以下Java代码
public final class ColorConverter extends LogEventPatternConverter { private static final Map<String, AnsiElement> ELEMENTS; static { Map<String, AnsiElement> ansiElements = new HashMap<>(); Arrays.stream(AnsiColor.values()) .filter((color) -> color != AnsiColor.DEFAULT) .forEach((color) -> ansiElements.p...
element = LEVELS.get(event.getLevel().intLevel()); element = (element != null) ? element : AnsiColor.GREEN; } appendAnsiString(toAppendTo, buf.toString(), element); } } protected void appendAnsiString(StringBuilder toAppendTo, String in, AnsiElement element) { toAppendTo.append(AnsiOutput.toString(elem...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\log4j2\ColorConverter.java
1
请在Spring Boot框架中完成以下Java代码
public DecisionRequirementsDefinitionQuery orderByDecisionRequirementsDefinitionName() { orderBy(DecisionRequirementsDefinitionQueryProperty.DECISION_REQUIREMENTS_DEFINITION_NAME); return this; } public DecisionRequirementsDefinitionQuery orderByDeploymentId() { orderBy(DecisionRequirementsDefinitionQu...
public String getName() { return name; } public String getNameLike() { return nameLike; } public String getDeploymentId() { return deploymentId; } public String getKey() { return key; } public String getKeyLike() { return keyLike; } public String getResourceName() { retu...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\entity\repository\DecisionRequirementsDefinitionQueryImpl.java
2
请完成以下Java代码
public Area getEllipseAreaBounds() { Ellipse2D.Double coll = new Ellipse2D.Double(x, y, width, height); return new Area(coll); } public Ellipse2D getCircleBounds() { return new Ellipse2D.Double(x, y, 200, 200); } public Area getPolygonBounds() { for (int i = 0; i < xOff...
int top = Math.max(y, other.y); int bottom = Math.min(y + height, other.y + other.height); int left = Math.max(x, other.x); int right = Math.min(x + width, other.x + other.height); if (right <= left || bottom <= top) return false; for (int i = top; i < bottom; i++) { ...
repos\tutorials-master\image-processing\src\main\java\com\baeldung\imagecollision\GameObject.java
1
请在Spring Boot框架中完成以下Java代码
public R submit(@Valid @RequestBody TopMenu topMenu) { return R.status(topMenuService.saveOrUpdate(topMenu)); } /** * 删除 顶部菜单表 */ @PostMapping("/remove") @ApiOperationSupport(order = 7) @Operation(summary = "逻辑删除", description = "传入ids") public R remove(@Parameter(description = "主键集合", required = true) @R...
/** * 设置顶部菜单 */ @PostMapping("/grant") @ApiOperationSupport(order = 8) @Operation(summary = "顶部菜单配置", description = "传入topMenuId集合以及menuId集合") public R grant(@RequestBody GrantVO grantVO) { CacheUtil.clear(SYS_CACHE); CacheUtil.clear(MENU_CACHE); CacheUtil.clear(MENU_CACHE); boolean temp = topMenuServic...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\controller\TopMenuController.java
2
请完成以下Spring Boot application配置
#spring settings spring.http.encoding.force=true spring.http.encoding.charset=UTF-8 spring.http.encoding.enabled=true #logging settings logging.level.org.springframework.web=INFO logging.file=${user.home}/logs/csp/sentinel-dashboard.log logging.pattern.file= %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %ms...
If auth.enabled=false, Sentinel console disable login auth.username=sentinel auth.password=sentinel # Inject the dashboard version. It's required to enable # filtering in pom.xml for this resource file. sentinel.dashboard.version=${project.version}
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\resources\application.properties
2
请完成以下Java代码
public boolean isGenerated () { Object oo = get_Value(COLUMNNAME_IsGenerated); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Zeile Nr.. @param Line Unique line for this document */ @Override publ...
return "Y".equals(oo); } return false; } /** Set Write-off Amount. @param WriteOffAmt Amount to write-off */ @Override public void setWriteOffAmt (java.math.BigDecimal WriteOffAmt) { set_Value (COLUMNNAME_WriteOffAmt, WriteOffAmt); } /** Get Write-off Amount. @return Amount to write-off */ ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CashLine.java
1
请完成以下Java代码
public void initMap() { // to do nothing } }; // 如果模板引擎是 freemarker String templatePath = "/templates/mapper.xml.ftl"; // 如果模板引擎是 velocity // String templatePath = "/templates/mapper.xml.vm"; // 自定义输出配置 List<FileOutConfig> focList = n...
// 配置自定义输出模板 //指定自定义模板路径,注意不要带上.ftl/.vm, 会根据使用的模板引擎自动识别 // templateConfig.setEntity("templates/entity2.java"); // templateConfig.setService(); // templateConfig.setController(); templateConfig.setXml(null); mpg.setTemplate(templateConfig); // 策略配置 Strate...
repos\spring-boot-quick-master\quick-mybatis-druid\src\main\java\com\quick\druid\utils\CodeGenerator.java
1
请在Spring Boot框架中完成以下Java代码
public class PmsOperatorLogServiceImpl implements PmsOperatorLogService { @Autowired private PmsOperatorLogDao pmsOperatorLogDao; /** * 创建pmsOperator */ public void saveData(PmsOperatorLog pmsOperatorLog) { pmsOperatorLogDao.insert(pmsOperatorLog); } /** * 修改pmsOperator */ public void updateData(PmsO...
} /** * 分页查询pmsOperator * * @param pageParam * @param ActivityVo * PmsOperator * @return */ public PageBean listPage(PageParam pageParam, PmsOperatorLog pmsOperatorLog) { Map<String, Object> paramMap = new HashMap<String, Object>(); return pmsOperatorLogDao.listPage(pageParam, paramMap)...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\service\impl\PmsOperatorLogServiceImpl.java
2
请在Spring Boot框架中完成以下Java代码
public class SpelConditional { @Value("#{false ? 'There was true value' : 'Something went wrong. There was false value'}") private String ternary; @Value("#{someCar.model != null ? someCar.model : 'Unknown model'}") private String ternary2; @Value("#{someCar.model?:'Unknown model'}") private S...
} public String getElvis() { return elvis; } public void setElvis(String elvis) { this.elvis = elvis; } @Override public String toString() { return "SpelConditional{" + "ternary='" + ternary + '\'' + ", ternary2='" + ternary2 + '\'' + ...
repos\tutorials-master\spring-spel\src\main\java\com\baeldung\spring\spel\examples\SpelConditional.java
2
请完成以下Java代码
public void setAllowEmptyExpiryClaim(boolean allowEmptyExpiryClaim) { this.allowEmptyExpiryClaim = allowEmptyExpiryClaim; } /** * Whether to allow the {@code nbf} header to be empty. The default value is * {@code true} * * @since 7.0 */ public void setAllowEmptyNotBeforeClaim(boolean allowEmptyNotBefore...
} } return OAuth2TokenValidatorResult.success(); } private OAuth2TokenValidatorResult createOAuth2Error(String reason) { this.logger.debug(reason); return OAuth2TokenValidatorResult.failure(new OAuth2Error(OAuth2ErrorCodes.INVALID_TOKEN, reason, "https://tools.ietf.org/html/rfc6750#section-3.1")); } /...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JwtTimestampValidator.java
1
请完成以下Java代码
public final ProcessPreconditionsResolution checkPreconditionsApplicable() { if (!hasChangedRows()) { return ProcessPreconditionsResolution.rejectWithInternalReason("nothing to save"); } final ProductsProposalView view = getView(); if (!view.getSinglePriceListVersionId().isPresent()) { return Proces...
final BigDecimal userEnteredPriceValue = row.getPrice().getUserEnteredPriceValue(); final ProductPriceId productPriceId; // // Update existing product price if (row.getProductPriceId() != null) { productPriceId = row.getProductPriceId(); pricesListsRepo.updateProductPrice(UpdateProductPriceRequest.buil...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\process\WEBUI_ProductsProposal_SaveProductPriceToCurrentPriceListVersion.java
1
请完成以下Java代码
public boolean isDefault () { Object oo = get_Value(COLUMNNAME_IsDefault); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setN...
/** Set Query. @param Query SQL */ public void setQuery (String Query) { set_Value (COLUMNNAME_Query, Query); } /** Get Query. @return SQL */ public String getQuery () { return (String)get_Value(COLUMNNAME_Query); } /** Set Search Type. @param SearchType Which kind of search is used (Qu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_SearchDefinition.java
1
请完成以下Java代码
public class ZipType { @XmlValue protected String value; @XmlAttribute(name = "statecode") protected String statecode; @XmlAttribute(name = "countrycode") protected String countrycode; /** * Gets the value of the value property. * * @return * possible object is ...
} /** * Gets the value of the countrycode property. * * @return * possible object is * {@link String } * */ public String getCountrycode() { if (countrycode == null) { return "CH"; } else { return countrycode; } ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\ZipType.java
1
请在Spring Boot框架中完成以下Java代码
public Object getForObject(@PathVariable Long id) { String url = HOST_MALL_ADMIN + "/brand/{id}"; CommonResult commonResult = restTemplate.getForObject(url, CommonResult.class, id); return commonResult; } @ApiOperation("postForEntity jsonBody") @RequestMapping(value = "/post", metho...
} @ApiOperation("postForEntity form") @RequestMapping(value = "/post3", method = RequestMethod.POST) @ResponseBody public Object postForEntity3(@RequestParam String name) { String url = HOST_MALL_ADMIN + "/productAttribute/category/create"; //设置头信息 HttpHeaders headers = new Http...
repos\mall-master\mall-demo\src\main\java\com\macro\mall\demo\controller\RestTemplateDemoController.java
2
请在Spring Boot框架中完成以下Java代码
protected boolean contains(List<IdentityLinkEntity> identityLinkEntities, String identityLinkId) { return identityLinkEntities.stream().anyMatch(identityLinkEntity -> Objects.equals(identityLinkId, identityLinkEntity.getId())); } @Override public List<IdentityLinkEntity> deleteProcessDefinitionIden...
@Override public void deleteIdentityLinksByProcessInstanceId(String processInstanceId) { dataManager.deleteIdentityLinksByProcessInstanceId(processInstanceId); } @Override public void deleteIdentityLinksByScopeIdAndScopeType(String scopeId, String scopeType) { dataManager.deleteIdentity...
repos\flowable-engine-main\modules\flowable-identitylink-service\src\main\java\org\flowable\identitylink\service\impl\persistence\entity\IdentityLinkEntityManagerImpl.java
2
请完成以下Java代码
public class WordCounter { private static final String LIST_NAME = "textList"; private static final String MAP_NAME = "countMap"; private Pipeline createPipeLine() { Pipeline p = Pipeline.create(); p.readFrom(Sources.<String>list(LIST_NAME)) .flatMap(word -> traverseArray(word....
JetInstance jet = Jet.newJetInstance(); try { List<String> textList = jet.getList(LIST_NAME); textList.addAll(sentences); Pipeline p = createPipeLine(); jet.newJob(p).join(); Map<String, Long> counts = jet.getMap(MAP_NAME); count = counts.g...
repos\tutorials-master\hazelcast\src\main\java\com\baeldung\hazelcast\jet\WordCounter.java
1
请完成以下Java代码
public void setTraceSqlQueries( @Parameter(description = "If Enabled, all SQL queries are logged with loglevel=WARN, or if the system property <code>" + IQueryStatisticsLogger.SYSTEM_PROPERTY_LOG_TO_SYSTEM_ERROR + "</code> is set to <code>true</code>, they will be written to std-err.") @RequestParam("enabled") fi...
@GetMapping("/top/byExecutionCount") @Operation(summary = "Gets top SQL queries ordered by their execution count (descending)") public Map<String, Object> getTopCountQueriesAsString() { userSession.assertLoggedIn(); return queriesListToMap(statisticsLogger.getTopCountQueriesAsString()); } private static Map<S...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\debug\DebugTraceSqlQueriesRestController.java
1
请完成以下Java代码
public static JaxBContextProvider defaultJaxBContextProvider() { return new DefaultJaxBContextProvider(); } /* * Configures the DocumentBuilderFactory in a way, that it is protected against * XML External Entity Attacks. If the implementing parser does not support one or * multiple features, the faile...
// ignored } } /* * JAXP allows users to override the default value via system properties and * a central properties file (see https://docs.oracle.com/javase/tutorial/jaxp/properties/scope.html). * However, both are overridden by an explicit configuration in code, as we apply it. * Since we want us...
repos\camunda-bpm-platform-master\spin\dataformat-xml-dom\src\main\java\org\camunda\spin\impl\xml\dom\format\DomXmlDataFormat.java
1
请完成以下Java代码
public class HttpClientBasicAuthentication { private static final Logger logger = LoggerFactory.getLogger(HttpClientBasicAuthentication.class); public static void main(String[] args) throws URISyntaxException, IOException, InterruptedException { useClientWithAuthenticator(); useClientWithHeade...
HttpRequest request = HttpRequest.newBuilder() .GET() .uri(new URI("https://postman-echo.com/basic-auth")) .header("Authorization", getBasicAuthenticationHeader("postman", "password")) .build(); HttpResponse<String> response = client.send(request, BodyHandlers.of...
repos\tutorials-master\core-java-modules\core-java-11-2\src\main\java\com\baeldung\httpclient\basicauthentication\HttpClientBasicAuthentication.java
1
请在Spring Boot框架中完成以下Java代码
public String getTimerJobStacktrace(@ApiParam(name = "jobId") @PathVariable String jobId, HttpServletResponse response) { Job job = getTimerJobById(jobId); String stackTrace = managementService.getTimerJobExceptionStacktrace(job.getId()); if (stackTrace == null) { throw new Flowabl...
return stackTrace; } @ApiOperation(value = "Get the exception stacktrace for a deadletter job", tags = { "Jobs" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the requested job was not found and the stacktrace has been returned. The response contains the raw stacktrace...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\management\JobExceptionStacktraceResource.java
2
请在Spring Boot框架中完成以下Java代码
public class SecurityConfiguration { @Bean public InMemoryUserDetailsManager userDetailsService(PasswordEncoder passwordEncoder) { UserDetails admin = User.withUsername("admin") .password(passwordEncoder.encode("password")) .roles("USER", "ADMIN") .build(); ...
@Bean public PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { return http.authorizeHttpRequests(request -> request.requestMatchers(new AntPathRequestMatcher("/products/**")) ...
repos\tutorials-master\spring-boot-modules\spring-boot-security\src\main\java\com\baeldung\antmatchers\config\SecurityConfiguration.java
2
请完成以下Java代码
public abstract class AbstractAclVoter implements AccessDecisionVoter<MethodInvocation> { @SuppressWarnings("NullAway.Init") private @Nullable Class<?> processDomainObjectClass; protected Object getDomainObjectInstance(MethodInvocation invocation) { Object[] args = invocation.getArguments(); Class<?>[] params ...
public void setProcessDomainObjectClass(Class<?> processDomainObjectClass) { Assert.notNull(processDomainObjectClass, "processDomainObjectClass cannot be set to null"); this.processDomainObjectClass = processDomainObjectClass; } /** * This implementation supports only <code>MethodSecurityInterceptor</code>, be...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\vote\AbstractAclVoter.java
1
请完成以下Java代码
private boolean canVoidPaidInvoice(@NonNull final I_C_Invoice invoice) { final I_C_Invoice inv = InterfaceWrapperHelper.create(invoice, I_C_Invoice.class); if (hasAnyNonPaymentAllocations(inv)) { final UserNotificationRequest userNotificationRequest = UserNotificationRequest.builder() .contentADMessage(...
return true; } @NonNull private IInvoicingParams getIInvoicingParams() { final PlainInvoicingParams invoicingParams = new PlainInvoicingParams(); invoicingParams.setUpdateLocationAndContactForInvoice(true); invoicingParams.setIgnoreInvoiceSchedule(false); return invoicingParams; } private boolean hasAn...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\async\spi\impl\RecreateInvoiceWorkpackageProcessor.java
1
请在Spring Boot框架中完成以下Java代码
public List<Student> read() { return service.readAll(); } @GetMapping("/{id}") public ResponseEntity<Student> read(@PathVariable("id") Long id) { Student foundStudent = service.read(id); if (foundStudent == null) { return ResponseEntity.notFound().build(); } else...
Student updatedStudent = service.update(id, student); if (updatedStudent == null) { return ResponseEntity.notFound().build(); } else { return ResponseEntity.ok(updatedStudent); } } @DeleteMapping("/{id}") public ResponseEntity<Object> deleteStudent(@PathVaria...
repos\tutorials-master\spring-web-modules\spring-boot-rest\src\main\java\com\baeldung\web\controller\students\StudentController.java
2
请完成以下Java代码
public void updateStatusIfNeededWhenCancelling(final I_C_Flatrate_Term term, final Set<OrderId> orderIds) { if (X_C_Flatrate_Term.CONTRACTSTATUS_EndingContract.equals(term.getContractStatus()) || X_C_Flatrate_Term.CONTRACTSTATUS_Quit.equals(term.getContractStatus())) { // update order contract status to can...
{ if (orders.size() == 1) // means that the order does not have parent { return; } final I_C_Order contractOrder = orders.get(0); final I_C_Order parentOrder = orders.get(1); if (isActiveParentContractOrder(parentOrder, contractOrder)) { contractOrderService.setOrderContractStatusAndSave(parentOrd...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\order\UpdateContractOrderStatus.java
1
请完成以下Java代码
public void clearCachedAuthorizationInfo(PrincipalCollection principals) { super.clearCachedAuthorizationInfo(principals); clearAllCache(); } @Override public void clearCachedAuthenticationInfo(PrincipalCollection principals) { super.clearCachedAuthenticationInfo(principals); ...
if (getAuthorizationCache() != null) { getAuthorizationCache().clear(); } } public void clearAllCachedAuthenticationInfo() { if (getAuthenticationCache() != null) { getAuthenticationCache().clear(); } } public void clearAllCache() { clearAllCach...
repos\springBoot-master\springboot-shiro2\src\main\java\cn\abel\rest\shiro\ShiroRealm.java
1
请在Spring Boot框架中完成以下Java代码
private Set<String> getPackagesToScan(AnnotationMetadata metadata) { AnnotationAttributes attributes = AnnotationAttributes .fromMap(metadata.getAnnotationAttributes(EntityScan.class.getName())); Assert.state(attributes != null, "'attributes' must not be null"); Set<String> packagesToScan = new LinkedHashS...
private final Set<String> packageNames = new LinkedHashSet<>(); EntityScanPackagesBeanDefinition(Collection<String> packageNames) { setBeanClass(EntityScanPackages.class); setRole(BeanDefinition.ROLE_INFRASTRUCTURE); addPackageNames(packageNames); } private void addPackageNames(Collection<String> addit...
repos\spring-boot-4.0.1\module\spring-boot-persistence\src\main\java\org\springframework\boot\persistence\autoconfigure\EntityScanPackages.java
2
请完成以下Java代码
public static boolean hasIgnoreCounterVariable(PlanItemInstanceEntity repeatingPlanItemInstanceEntity) { return repeatingPlanItemInstanceEntity.getPlanItem().getItemControl().getRepetitionRule().isIgnoreRepetitionCounterVariable(); } public static String getCounterVariable(PlanItemInstanceEntity repeat...
} PlanItemInstanceEntity childPlanItemInstanceEntity = PlanItemInstanceUtil.copyAndInsertPlanItemInstance(commandContext, planItemInstanceEntity, localVariables, false, false); // record the plan item being created based on the collection, so it gets synchronized to the history as well Command...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\util\PlanItemInstanceUtil.java
1
请完成以下Java代码
private static Object normalizeSingleArgumentBeforeFormat_ReferenceListAwareEnum( @NonNull final ReferenceListAwareEnum referenceListAwareEnum, final String adLanguage) { final int adReferenceId = ReferenceListAwareEnums.getAD_Reference_ID(referenceListAwareEnum); if (adReferenceId > 0) { final ADRefere...
catch (Exception ex) { s_log.warn("Failed normalizing argument `{}`. Using toString().", item, ex); itemNormStr = item.toString(); } if (!(result.length() == 0)) { result.append(", "); } result.append(itemNormStr); } return result.toString(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\MessageFormatter.java
1
请在Spring Boot框架中完成以下Java代码
class DefaultServerHttpMessageConvertersCustomizer implements ServerHttpMessageConvertersCustomizer { private final @Nullable HttpMessageConverters legacyConverters; private final Collection<HttpMessageConverter<?>> converters; DefaultServerHttpMessageConvertersCustomizer(@Nullable HttpMessageConverters legacyCon...
} else { builder.registerDefaults(); this.converters.forEach((converter) -> { if (converter instanceof KotlinSerializationJsonHttpMessageConverter) { builder.withKotlinSerializationJsonConverter(converter); } else { builder.addCustomConverter(converter); } }); } } }
repos\spring-boot-4.0.1\module\spring-boot-http-converter\src\main\java\org\springframework\boot\http\converter\autoconfigure\DefaultServerHttpMessageConvertersCustomizer.java
2
请完成以下Java代码
public void sendDashboardItemsOrderChangedEvent( @NonNull final UserDashboard dashboard, @NonNull final DashboardWidgetType widgetType) { sendEvents( getWebsocketTopicNamesByDashboardId(dashboard.getId()), JSONDashboardChangedEventsList.of( JSONDashboardOrderChangedEvent.of( dashboard.get...
{ if (websocketEndpoints.isEmpty() || events.isEmpty()) { return; } for (final WebsocketTopicName websocketEndpoint : websocketEndpoints) { websocketSender.convertAndSend(websocketEndpoint, events); logger.trace("Notified WS {}: {}", websocketEndpoint, events); } } private ImmutableSet<Websocke...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dashboard\websocket\UserDashboardWebsocketSender.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isClientAndOrgMatching(@NonNull final ClientAndOrgId clientAndOrgId) { for (ClientAndOrgId currentClientAndOrgId = clientAndOrgId; currentClientAndOrgId != null; currentClientAndOrgId = getFallbackClientAndOrgId(currentClientAndOrgId)) { if (entryValues.containsKey(currentClientAndOrgId)) { ...
final SysConfigEntryValue entryValue = entryValues.get(currentClientAndOrgId); if (entryValue != null) { return Optional.of(entryValue.getValue()); } } return Optional.empty(); } // // // ------------------------------- // // public static class SysConfigEntryBuilder { public String getNam...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\service\impl\SysConfigEntry.java
2
请完成以下Java代码
private void removeDuplicateTransactions(final List<IHUTransactionAttribute> transactions) { if (transactions.isEmpty()) { return; } // // Check our transactions history and if we find a transaction which is shadowed by our newly created transaction // then just remove it from list and keep only ours ...
final HUTransactionAttributeOperation operation = trx.getOperation(); final Object referencedObject = trx.getReferencedObject(); final String referencedObjectTableName; final int referencedObjectId; final int uniqueDiscriminant; if (referencedObject == null) { referencedObjectTableName = null; refere...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\HUTrxAttributesCollector.java
1
请完成以下Java代码
protected ProcessPreconditionsResolution checkPreconditionsApplicable() { if (getSelectedRowIds().isEmpty()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } if (!rowsHaveSingleProductId()) { final ITranslatableString msg = msgBL.getTranslatableMsgText(MSG); return ProcessPreco...
{ return IProcessDefaultParametersProvider.DEFAULT_VALUE_NOTAVAILABLE; } } private SqlViewRowsWhereClause getViewSqlWhereClause(@NonNull final DocumentIdsSelection rowIds) { final String breaksTableName = I_M_DiscountSchemaBreak.Table_Name; return getView().getSqlWhereClause(rowIds, SqlOptions.usingTableNa...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pricing\process\M_DiscountSchemaBreak_CopyToOtherSchema_Product.java
1
请完成以下Java代码
public void createUpdateConsent( @NonNull final ContactPerson contactPerson) { final ContactPersonId contactPersonId = Check.assumeNotNull(contactPerson.getContactPersonId(), "contact is saved: {}", contactPerson); final I_MKTG_Consent consentExistingRecord = getConsentRecord(contactPersonId); final I_MKTG_C...
.bpLocationId(bpLocationId) .build(); save(contactPerson); } public Set<ContactPerson> getByBPartnerLocationId(@NonNull final BPartnerLocationId bpLocationId) { return queryBL .createQueryBuilder(I_MKTG_ContactPerson.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_MKTG_ContactPerson.COL...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\model\ContactPersonRepository.java
1
请完成以下Java代码
public Optional<I_C_BPartner_Location> getFirstBPLocationMatching(@NonNull final BPartnerLocationMatchingKey matchingKey) { return getFirstBPLocationMatching(bpLocation -> isBPartnerLocationMatching(bpLocation, matchingKey)); } private boolean isBPartnerLocationMatching(@NonNull final I_C_BPartner_Location bp...
if (contacts == null) { if (record.getC_BPartner_ID() > 0) { contacts = new ArrayList<>(bpartnersRepo.retrieveContacts(record)); } else { contacts = new ArrayList<>(); } } return contacts; } public BPartnerContactId addAndSaveContact(final I_AD_User contact) { bpart...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\impexp\BPartnersCache.java
1
请完成以下Java代码
public class StaticNameResolverProvider extends NameResolverProvider { /** * The constant containing the scheme that will be used by this factory. */ public static final String STATIC_SCHEME = "static"; private static final Pattern PATTERN_COMMA = Pattern.compile(","); @Nullable @Overri...
@Override public String getDefaultScheme() { return STATIC_SCHEME; } @Override protected boolean isAvailable() { return true; } @Override protected int priority() { return 4; // Less important than DNS } @Override public String toString() { retu...
repos\grpc-spring-master\grpc-client-spring-boot-starter\src\main\java\net\devh\boot\grpc\client\nameresolver\StaticNameResolverProvider.java
1
请完成以下Java代码
public class SessionEventHttpSessionListenerAdapter implements ApplicationListener<AbstractSessionEvent>, ServletContextAware { private final List<HttpSessionListener> listeners; private ServletContext context; public SessionEventHttpSessionListenerAdapter(List<HttpSessionListener> listeners) { super(); thi...
private HttpSessionEvent createHttpSessionEvent(AbstractSessionEvent event) { Session session = event.getSession(); HttpSession httpSession = new HttpSessionAdapter<>(session, this.context); return new HttpSessionEvent(httpSession); } /* * @see org.springframework.web.context.ServletContextAware#setServletCo...
repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\http\SessionEventHttpSessionListenerAdapter.java
1
请完成以下Java代码
final class DurationToStringConverter implements GenericConverter { @Override public Set<ConvertiblePair> getConvertibleTypes() { return Collections.singleton(new ConvertiblePair(Duration.class, String.class)); } @Override public @Nullable Object convert(@Nullable Object source, TypeDescriptor sourceType, Type...
DurationUnit annotation = sourceType.getAnnotation(DurationUnit.class); return (annotation != null) ? annotation.value() : null; } private @Nullable DurationStyle getDurationStyle(TypeDescriptor sourceType) { DurationFormat annotation = sourceType.getAnnotation(DurationFormat.class); return (annotation != null...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\convert\DurationToStringConverter.java
1
请完成以下Java代码
public void write(OutputStream out) throws IOException, WebApplicationException { try { byte[] buff = new byte[16 * 1000]; int read = 0; while((read = filteredStream.read(buff)) > 0) { out.write(buff, 0, read); } } ...
/** * Returns an input stream for a given resource * * @param resourceName * @return */ protected InputStream getPluginAssetAsStream(AppPlugin plugin, String fileName) { String assetDirectory = plugin.getAssetDirectory(); if (assetDirectory == null) { return null; } InputStream...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\plugin\resource\AbstractAppPluginRootResource.java
1
请完成以下Java代码
public class AttributesKeyQueryHelper<T> { /** * @param modelColumn the attributesKey column to build the composite filter around. * @return an instance that can create a composite filter for attributes keys. */ public static <T> AttributesKeyQueryHelper<T> createFor(@NonNull final ModelColumn<T, Object> modelC...
for (final AttributesKeyPattern attributesKeyPattern : attributesKeyPatterns) { final String likeExpression = attributesKeyPattern.getSqlLikeString(); final boolean ignoreCase = false; final StringLikeFilter<T> filter = new StringLikeFilter<>(modelColumn.getColumnName(), likeExpression, ignoreCase); filt...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\keys\AttributesKeyQueryHelper.java
1
请完成以下Java代码
public static HttpHeaders getHeader(String mediaType) { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.parseMediaType(mediaType)); headers.add("Accept", mediaType); return headers; } /** * 将 JSONObject 转为 a=1&b=2&c=3...&n=n 的形式 */ public ...
String key = it.next(); String value = ""; Object object = source.get(key); if (object != null) { if (!StringUtils.isEmpty(object.toString())) { value = object.toString(); } } urlVariables.append("&").append(...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\RestUtil.java
1
请完成以下Java代码
protected boolean isHistoryEventProduced() { HistoryLevel historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel(); return historyLevel.isHistoryEventProduced(HistoryEventTypes.USER_OPERATION_LOG, null); } protected boolean isUserAuthenticated() { String userId = getAuthenticatedUserId(...
return Context.getCommandContext().isRestrictUserOperationLogToAuthenticatedUsers(); } protected boolean isUserOperationLogEnabledOnCommandContext() { return Context.getCommandContext().isUserOperationLogEnabled(); } protected String getOperationType(IdentityOperationResult operationResult) { switch (...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\UserOperationLogManager.java
1
请完成以下Java代码
public class DocumentNoBL implements IDocumentNoBL { private final Map<String, IDocumentNoListener> listeners = new HashMap<>(); @Override public void registerDocumentNoListener(@NonNull final IDocumentNoListener listener) { listeners.put(listener.getTableName(), listener); } @Override public void fireDocume...
final Optional<IDocumentNoAware> documentNoAware = asDocumentNoAware(model); if (!documentNoAware.isPresent()) { return; } documentNoListener.onDocumentNoChange(documentNoAware.get(), newDocumentNo); } @Override public Optional<IDocumentNoAware> asDocumentNoAware(final Object model) { final IDocument...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\sequence\impl\DocumentNoBL.java
1
请完成以下Java代码
public String getAD_RelationType_InternalName () { return (String)get_Value(COLUMNNAME_AD_RelationType_InternalName); } public org.compiere.model.I_AD_Table getAD_Table_Source() throws RuntimeException { return (org.compiere.model.I_AD_Table)MTable.get(getCtx(), org.compiere.model.I_AD_Table.Table_Name) ...
return ii.intValue(); } /** Set Quell-Datensatz-ID. @param Record_Source_ID Quell-Datensatz-ID */ public void setRecord_Source_ID (int Record_Source_ID) { if (Record_Source_ID < 1) set_ValueNoCheck (COLUMNNAME_Record_Source_ID, null); else set_ValueNoCheck (COLUMNNAME_Record_Source_ID, Integer.valu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Relation_Explicit_v1.java
1
请完成以下Java代码
public int getPP_MRP_Demand_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_PP_MRP_Demand_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.eevolution.model.I_PP_MRP getPP_MRP_Supply() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_PP_MRP_Supply_ID, org.eevolut...
{ Integer ii = (Integer)get_Value(COLUMNNAME_PP_MRP_Supply_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Zugewiesene Menge. @param QtyAllocated Zugewiesene Menge */ @Override public void setQtyAllocated (java.math.BigDecimal QtyAllocated) { set_Value (COLUMNNAME_QtyAllocated, QtyA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_MRP_Alloc.java
1
请在Spring Boot框架中完成以下Java代码
protected void toString(final MoreObjects.ToStringHelper toStringHelper) { toStringHelper .add("product", product) .add("bpartner", bpartner) .add("day", day) .add("trend", trend); } public Long getProductId() { return product.getId(); } public String getProductIdAsString() { return produ...
{ return YearWeekUtil.ofLocalDate(day.toLocalDate()); } @Nullable public Trend getTrend() { return Trend.ofNullableCode(trend); } @Nullable public String getTrendAsString() { return trend; } public void setTrend(@Nullable final Trend trend) { this.trend = trend != null ? trend.getCode() : null; }...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\model\WeekSupply.java
2
请完成以下Java代码
public void setEXP_ReplicationTrx_ID (final int EXP_ReplicationTrx_ID) { if (EXP_ReplicationTrx_ID < 1) set_ValueNoCheck (COLUMNNAME_EXP_ReplicationTrx_ID, null); else set_ValueNoCheck (COLUMNNAME_EXP_ReplicationTrx_ID, EXP_ReplicationTrx_ID); } @Override public int getEXP_ReplicationTrx_ID() { ret...
@Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setNote (final @Nullable java.lang.String Note) { set_Value (COLUMNNAME_Note, Note); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\process\rpl\model\X_EXP_ReplicationTrx.java
1
请在Spring Boot框架中完成以下Java代码
public void setAgencyCode(String value) { this.agencyCode = value; } /** * Gets the value of the language property. * * @return * possible object is * {@link String } * */ public String getLanguage() { ...
/** * Sets the value of the language property. * * @param value * allowed object is * {@link String } * */ public void setLanguage(String value) { this.language = value; } } }
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\FreeTextType.java
2
请完成以下Java代码
public NShortSegment enablePlaceRecognize(boolean enable) { config.placeRecognize = enable; config.updateNerConfig(); return this; } /** * 开启机构名识别 * @param enable * @return */ public NShortSegment enableOrganizationRecognize(boolean enable) { conf...
config.updateNerConfig(); return this; } /** * 是否启用偏移量计算(开启后Term.offset才会被计算) * @param enable * @return */ public NShortSegment enableOffset(boolean enable) { config.offset = enable; return this; } public NShortSegment enableAllNamedEntityRecognize(b...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\NShort\NShortSegment.java
1
请完成以下Java代码
public int getESR_Import_ID() { return get_ValueAsInt(COLUMNNAME_ESR_Import_ID); } @Override public void setESR_Trx_Qty (final @Nullable BigDecimal ESR_Trx_Qty) { throw new IllegalArgumentException ("ESR_Trx_Qty is virtual column"); } @Override public BigDecimal getESR_Trx_Qty() { final BigDecimal bd ...
@Override public boolean isValid() { return get_ValueAsBoolean(COLUMNNAME_IsValid); } @Override public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } @Override...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-gen\de\metas\payment\esr\model\X_ESR_Import.java
1
请完成以下Java代码
public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets the value of the schmeNm p...
* {@link PersonIdentificationSchemeName1Choice } * */ public void setSchmeNm(PersonIdentificationSchemeName1Choice value) { this.schmeNm = value; } /** * Gets the value of the issr property. * * @return * possible object is * {@link String } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\GenericPersonIdentification1.java
1
请在Spring Boot框架中完成以下Java代码
public class AsyncConfig { public static final String EXECUTOR_ONE_BEAN_NAME = "executor-one"; public static final String EXECUTOR_TWO_BEAN_NAME = "executor-two"; @Configuration public static class ExecutorOneConfiguration { @Bean(name = EXECUTOR_ONE_BEAN_NAME + "-properties") @Primar...
// 创建 ThreadPoolTaskExecutor 对象 return builder.build(); } } private static TaskExecutorBuilder createTskExecutorBuilder(TaskExecutionProperties properties) { // Pool 属性 TaskExecutionProperties.Pool pool = properties.getPool(); TaskExecutorBuilder builder = new TaskE...
repos\SpringBoot-Labs-master\lab-29\lab-29-async-two\src\main\java\cn\iocoder\springboot\lab29\asynctask\config\AsyncConfig.java
2
请完成以下Java代码
public abstract class JsonWriterStructuredLogFormatter<E> implements StructuredLogFormatter<E> { private final JsonWriter<E> jsonWriter; /** * Create a new {@link JsonWriterStructuredLogFormatter} instance with the given * members. * @param members a consumer, which should configure the members * @param cus...
* @param jsonWriter the {@link JsonWriter} */ protected JsonWriterStructuredLogFormatter(JsonWriter<E> jsonWriter) { this.jsonWriter = jsonWriter; } @Override public String format(E event) { return this.jsonWriter.writeToString(event); } @Override public byte[] formatAsBytes(E event, Charset charset) { ...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\structured\JsonWriterStructuredLogFormatter.java
1
请完成以下Java代码
public class DLMPermanentIniCustomizer extends AbstractDLMCustomizer { public static final String INI_P_DLM_COALESCE_LEVEL = "de.metas.dlm.DLM_Coalesce_Level"; public static final String INI_P_DLM_DLM_LEVEL = "de.metas.dlm.DLM_Level"; public static AbstractDLMCustomizer INSTANCE = new DLMPermanentIniCustomizer(); ...
} return dlmLevel; } /** * Returns the coalesce level set in the {@link Ini} (metasfresh.properties).<br> * <b>Side Effect:</b> if none is set there yet, then it gets the value from {@link DLMPermanentSysConfigCustomizer} and adds it to the {@link Ini}. */ @Override public int getDlmCoalesceLevel() { fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\connection\DLMPermanentIniCustomizer.java
1
请完成以下Java代码
public int getPA_ReportLine_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_PA_ReportLine_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Record ID. @param Record_ID Direct internal record ID */ public void setRecord_ID (int Record_ID) { if (Record_ID < 0) set_ValueNoChe...
/** Set Sequence. @param SeqNo Method of ordering records; lowest number comes first */ public void setSeqNo (int SeqNo) { set_ValueNoCheck (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Sequence. @return Method of ordering records; lowest number comes first */ public int getSeqNo () { I...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_T_Report.java
1
请在Spring Boot框架中完成以下Java代码
public int getOrder() { return this.order; } public void setOrder(int order) { this.order = order; } /** * {@link View} backed by an HTML resource. */ private static class HtmlResourceView implements View { private final Resource resource; HtmlResourceView(Resource resource) { this.resource = re...
} @Override public String getContentType() { return MediaType.TEXT_HTML_VALUE; } @Override public void render(@Nullable Map<String, ?> model, HttpServletRequest request, HttpServletResponse response) throws Exception { response.setContentType(getContentType()); FileCopyUtils.copy(this.resource....
repos\spring-boot-4.0.1\module\spring-boot-webmvc\src\main\java\org\springframework\boot\webmvc\autoconfigure\error\DefaultErrorViewResolver.java
2
请完成以下Java代码
final class ProductsCache { private final IProductDAO productsRepo; private final Map<ProductId, Product> productsCache = new HashMap<>(); @Builder private ProductsCache(@NonNull final IProductDAO productsRepo) { this.productsRepo = productsRepo; } public Product getProductById(final ProductId productId) {...
{ @Getter private final I_M_Product record; private Product(@NonNull final I_M_Product record) { this.record = record; } public ProductId getIdOrNull() { return ProductId.ofRepoIdOrNull(record.getM_Product_ID()); } public int getOrgId() { return record.getAD_Org_ID(); } public void ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\impexp\ProductsCache.java
1
请完成以下Java代码
public void setSubjectTokenResolver(Function<OAuth2AuthorizationContext, Mono<OAuth2Token>> subjectTokenResolver) { Assert.notNull(subjectTokenResolver, "subjectTokenResolver cannot be null"); this.subjectTokenResolver = subjectTokenResolver; } /** * Sets the resolver used for resolving the {@link OAuth2Token ...
* An access token is considered expired if * {@code OAuth2AccessToken#getExpiresAt() - clockSkew} is before the current time * {@code clock#instant()}. * @param clockSkew the maximum acceptable clock skew */ public void setClockSkew(Duration clockSkew) { Assert.notNull(clockSkew, "clockSkew cannot be null");...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\TokenExchangeReactiveOAuth2AuthorizedClientProvider.java
1
请完成以下Java代码
public boolean isIncludeAllAttributeValues () { Object oo = get_Value(COLUMNNAME_IsIncludeAllAttributeValues); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Merkmalswert-Zusammenfassung. @param IsValueAg...
public int getM_Attribute_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Attribute_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Gruppenname. @param ValueAggregateName Gruppenname */ @Override public void setValueAggregateName (java.lang.String ValueAggregateName) { set_Va...
repos\metasfresh-new_dawn_uat\backend\de.metas.dimension\src\main\java-gen\de\metas\dimension\model\X_DIM_Dimension_Spec_Attribute.java
1
请在Spring Boot框架中完成以下Java代码
class OtherLinesAggregator implements QuotationLinesGroupAggregator { private final ProjectQuotationPriceCalculator priceCalculator; private final LinkedHashMap<QuotationLineKey, QuotationLineAggregator> lineAggregators = new LinkedHashMap<>(); @Builder private OtherLinesAggregator( @NonNull final ProjectQuota...
} @Override public Stream<Map.Entry<ServiceRepairProjectCostCollectorId, OrderAndLineId>> streamQuotationLineIdsIndexedByCostCollectorId() { return lineAggregators.values() .stream() .flatMap(QuotationLineAggregator::streamQuotationLineIdsIndexedByCostCollectorId); } @Override public GroupTemplate get...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\service\commands\createQuotationFromProjectCommand\OtherLinesAggregator.java
2
请完成以下Java代码
public String login(int AD_Org_ID, int AD_Role_ID, int AD_User_ID) { return null; } @Override public String modelChange(PO po, int type) throws Exception { if (I_AD_Table_MView.Table_Name.equals(po.get_TableName())) { processMetadataChanges(po, type); } else if (TYPE_AFTER_NEW == type || TYPE_AFTER_C...
} // // We should do a complete refresh => marking mview as staled if (staled) { mviewBL.setStaled(mview); } } private boolean addMView(I_AD_Table_MView mview, boolean invalidateIfNecessary) { final ITableMViewBL mviewBL = Services.get(ITableMViewBL.class); MViewMetadata mdata = mviewBL.getMetadat...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\engine\MViewModelValidator.java
1
请完成以下Java代码
public CaseInstanceMigrationDocumentBuilder preUpgradeExpression(String preUpgradeExpression) { this.preUpgradeExpression = preUpgradeExpression; return this; } @Override public CaseInstanceMigrationDocumentBuilder postUpgradeExpression(String postUpgradeExpression) { this.postUpgra...
caseInstanceMigrationDocument.setMigrateToCaseDefinition(this.migrateToCaseDefinitionKey, this.migrateToCaseDefinitionVersion, this.migrateToCaseDefinitionTenantId); caseInstanceMigrationDocument.setActivatePlanItemDefinitionMappings(this.activatePlanItemDefinitionMappings); caseInstanceMigrationDocumen...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\migration\CaseInstanceMigrationDocumentBuilderImpl.java
1