instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public int getId() { return id; } public void setId(int id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getEmail() { return email; } public void setEmail(String email) { this.email = em...
return password; } public void setPassword(String password) { this.password = password; } public String getRole() { return role; } public void setRole(String role) { this.role = role; } public String getAddress() { return address; } public void setAddress(String address) { this.address = addres...
repos\E-commerce-project-springBoot-master2\JtProject\src\main\java\com\jtspringproject\JtSpringProject\models\User.java
1
请在Spring Boot框架中完成以下Java代码
public Result<?> deleteConversation(@PathVariable("id") String id) { return chatService.deleteConversation(id); } /** * 更新会话标题 * * @param updateTitleParams * @return * @author chenrui * @date 2025/3/3 16:55 */ @IgnoreAuth @PutMapping(value = "/conversation/upd...
/** * 根据请求ID停止某个请求的处理 * * @param requestId 请求的唯一标识符,用于识别和停止特定的请求 * @return 返回一个Result对象,表示停止请求的结果 * @author chenrui * @date 2025/2/25 11:42 */ @IgnoreAuth @GetMapping(value = "/stop/{requestId}") public Result<?> stop(@PathVariable(name = "requestId", required = true) Stri...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-module\jeecg-boot-module-airag\src\main\java\org\jeecg\modules\airag\app\controller\AiragChatController.java
2
请完成以下Java代码
public static class ProcessedImage { private String mediaType; private int width; private int height; @With private byte[] data; private long size; private ProcessedImage preview; } @Data public static class ScadaSymbolMetadataInfo { private S...
} else { searchTags = new String[0]; } if (metaData != null && metaData.has("widgetSizeX")) { widgetSizeX = metaData.get("widgetSizeX").asInt(); } else { widgetSizeX = 3; } if (metaData != null && metaData.has("w...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\util\ImageUtils.java
1
请完成以下Java代码
public void collect(@NonNull final HUAttributeChange change) { Check.assume(!disposed.get(), "Collector shall not be disposed: {}", this); final HUAttributeChanges huChanges = huAttributeChangesMap.computeIfAbsent(change.getHuId(), HUAttributeChanges::new); huChanges.collect(change); } public void createAndPo...
{ return ImmutableList.of(); } final EventDescriptor eventDescriptor = EventDescriptor.ofClientAndOrg(hu.getAD_Client_ID(), hu.getAD_Org_ID()); final Instant date = changes.getLastChangeDate(); final WarehouseId warehouseId = warehousesRepo.getWarehouseIdByLocatorRepoId(hu.getM_Locator_ID()); final Attri...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\material\interceptor\HUAttributeChangesCollector.java
1
请完成以下Java代码
public ADHyperlink getADHyperlink(String uri) { try { return getADHyperlink(new URI(uri)); } catch (URISyntaxException e) { throw new AdempiereException(e); } } public ADHyperlink getADHyperlink(final URI uri) { String protocol = uri.getScheme(); if (!PROTOCOL.equals(protocol)) return nul...
String urlParams = encodeParams(link.getParameters()); String urlStr = PROTOCOL + "://" + HOST + "/" + link.getAction().toString() + "?" + urlParams; try { return new URI(urlStr); } catch (URISyntaxException e) { throw new AdempiereException(e); } } private String encode(String s) { try { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\util\ADHyperlinkBuilder.java
1
请完成以下Java代码
public ClientSetup setAccountNo(final String accountNo) { if (!Check.isEmpty(accountNo, true)) { orgBankAccount.setAccountNo(accountNo.trim()); } return this; } public final String getAccountNo() { return orgBankAccount.getAccountNo(); } public String getIBAN() { return orgBankAccount.getIBAN();...
orgContact.setFax(fax.trim()); } return this; } public final String getFax() { return orgContact.getFax(); } public ClientSetup setEMail(final String email) { if (!Check.isEmpty(email, true)) { // NOTE: we are not setting the Phone, Fax, EMail on C_BPartner_Location because those fields are hidden ...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\setup\process\ClientSetup.java
1
请完成以下Java代码
private CreateMatchInvoiceCommand createMatchInvoiceCommand(final @NonNull CreateMatchInvoiceRequest request) { return CreateMatchInvoiceCommand.builder() .orderCostService(this) .matchInvoiceService(matchInvoiceService) .invoiceBL(invoiceBL) .inoutBL(inoutBL) .moneyService(moneyService) .req...
private void updateCreatedOrderLineIfAny(@NonNull final OrderCost orderCost) { if (orderCost.getCreatedOrderLineId() == null) { return; } CreateOrUpdateOrderLineFromOrderCostCommand.builder() .orderBL(orderBL) .moneyService(moneyService) .orderCost(orderCost) .build() .execute(); } p...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\OrderCostService.java
1
请在Spring Boot框架中完成以下Java代码
public Result updateProduct(ProdUpdateReq prodUpdateReq) { //增量更新产品 return productService.updateProduct(prodUpdateReq); } @Override public Result<List<ProductEntity>> findProducts(ProdQueryReq prodQueryReq) { return productService.findProducts(prodQueryReq); } @Override ...
public Result<List<CategoryEntity>> findCategorys(CategoryQueryReq categoryQueryReq) { return productService.findCategorys(categoryQueryReq); } @Override public Result createBrand(BrandInsertReq brandInsertReq) { return productService.createBrand(brandInsertReq); } @Override pu...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Controller\src\main\java\com\gaoxi\controller\product\ProductControllerImpl.java
2
请完成以下Java代码
@Nullable private Class<? extends IProcessDefaultParametersProvider> getProcessDefaultParametersProvider() { final Class<?> processClass = getProcessClassOrNull(); if (processClass == null || !IProcessDefaultParametersProvider.class.isAssignableFrom(processClass)) { return null; } try { ret...
{ this.startProcessDirectly = startProcessDirectly; return this; } private boolean isStartProcessDirectly() { if (startProcessDirectly != null) { return startProcessDirectly; } else { return computeIsStartProcessDirectly(); } } private boolean computeIsStartProcessDirectly() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\descriptor\ProcessDescriptor.java
1
请完成以下Java代码
public class PrimitiveMaps { public static void main(String[] args) { hppcMap(); eclipseCollectionsMap(); fastutilMap(); } private static void hppcMap() { //Regular maps IntLongHashMap intLongHashMap = new IntLongHashMap(); intLongHashMap.put(25,1L); ...
Int2BooleanMap int2BooleanMap = new Int2BooleanOpenHashMap(); int2BooleanMap.put(1, true); int2BooleanMap.put(7, false); int2BooleanMap.put(4, true); boolean value = int2BooleanMap.get(1); //Lambda style iteration Int2BooleanMaps.fastForEach(int2BooleanMap, entry -> { ...
repos\tutorials-master\core-java-modules\core-java-collections-maps-9\src\main\java\com\baeldung\map\primitives\PrimitiveMaps.java
1
请完成以下Java代码
public String getName() { return this.getAttribute(this.nameAttributeKey).toString(); } @Override public Collection<? extends GrantedAuthority> getAuthorities() { return this.authorities; } @Override public Map<String, Object> getAttributes() { return this.attributes; } private Set<GrantedAuthority> so...
@Override public int hashCode() { int result = this.getName().hashCode(); result = 31 * result + this.getAuthorities().hashCode(); result = 31 * result + this.getAttributes().hashCode(); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Name: ["); ...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\user\DefaultOAuth2User.java
1
请完成以下Java代码
public void setUp() { for (long i = 0; i < set1Size; i++) { employeeSet1.add(new Employee(i, RandomStringUtils.random(7, true, false))); } for (long i = 0; i < list1Size; i++) { employeeList1.add(new Employee(i, RandomStringUtils.random(7, true, fals...
@Benchmark public boolean given_SizeOfHashsetSmallerThanSizeOfAnotherHashSet_When_RemoveAllFromHashSet_Then_GoodPerformance(MyState state) { return state.employeeSet3.removeAll(state.employeeSet4); } public static void main(String[] args) throws Exception { Options options = new OptionsBuil...
repos\tutorials-master\core-java-modules\core-java-collections-3\src\main\java\com\baeldung\collections\removeallperformance\HashSetBenchmark.java
1
请完成以下Java代码
public ResourceOptionsDto availableOperations(UriInfo context) { ResourceOptionsDto dto = new ResourceOptionsDto(); // add links if operations are authorized UriBuilder baseUriBuilder = context.getBaseUriBuilder() .path(rootResourcePath) .path(UserRestService.PATH) .path(resourceId)...
dbUser.setPassword(account.getPassword()); identityService.saveUser(dbUser); } public void updateProfile(UserProfileDto profile) { ensureNotReadOnly(); User dbUser = findUserObject(); if(dbUser == null) { throw new InvalidRequestException(Status.NOT_FOUND, "User with id " + resourceId + " d...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\identity\impl\UserResourceImpl.java
1
请完成以下Java代码
public class Bankstatement { private BigInteger ktoNr = null; private BigInteger blz = null; private String auftragsreferenzNr = null; private String bezugsrefernznr = null; private BigInteger auszugsNr = null; private Saldo anfangsSaldo = null; private Saldo schlussSaldo = null; private Saldo aktuellValutenSa...
public void setBezugsrefernznr(String bezugsrefernznr) { this.bezugsrefernznr = bezugsrefernznr; } public BigInteger getAuszugsNr() { return auszugsNr; } public void setAuszugsNr(BigInteger auszugsNr) { this.auszugsNr = auszugsNr; } public Saldo getAnfangsSaldo() { return anfangsSaldo; } public void set...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\schaeffer\compiere\mt940\Bankstatement.java
1
请完成以下Java代码
public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } @Override public void setSeqNoGrid (final int SeqNoGrid) { set_Value (COLUMNNAME_SeqNoGrid, SeqNoGrid); } @Override public int getSeqNoGrid()...
public static final int VIEWEDITMODE_AD_Reference_ID=541263; /** Never = N */ public static final String VIEWEDITMODE_Never = "N"; /** OnDemand = D */ public static final String VIEWEDITMODE_OnDemand = "D"; /** Always = Y */ public static final String VIEWEDITMODE_Always = "Y"; @Override public void setViewEdit...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UI_Element.java
1
请完成以下Spring Boot application配置
spring: datasource: url: jdbc:h2:mem:mydb;MODE=PostgreSQL username: sa password: password driverClassName: org.h2.Driver jpa: database-platform: com.baeldung.arrayscollections.dialects.CustomDialect defer-datasource-initialization: true
show-sql: true properties: hibernate: format_sql: true sql: init: data-locations:
repos\tutorials-master\persistence-modules\hibernate6\src\main\resources\application-customdialect.yaml
2
请完成以下Java代码
public void unassignHUs(@NonNull final TableRecordReference modelRef, @NonNull final Collection<HuId> husToUnassign) { huAssignmentDAO.deleteHUAssignments(Env.getCtx(), modelRef, husToUnassign, ITrx.TRXNAME_ThreadInherited); } @Override public IHUAssignmentBuilder createHUAssignmentBuilder() { return new HUAs...
for (final I_M_HU_Assignment huAssignment : huAssignmentsForSource) { createHUAssignmentBuilder() .setTemplateForNewRecord(huAssignment) .setModel(targetModel) .build(); } } @Override public ImmutableSetMultimap<TableRecordReference, HuId> getHUsByRecordRefs(@NonNull final TableRecordReference...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUAssignmentBL.java
1
请完成以下Java代码
public String getProcessDefinitionKey() { return processDefinitionKey; } public String getTenantId() { return tenantId; } public boolean isCreationLog() { return creationLog; } public boolean isFailureLog() { return failureLog; } public boolean isSuccessLog() { return successLog;...
result.removalTime = historicExternalTaskLog.getRemovalTime(); result.externalTaskId = historicExternalTaskLog.getExternalTaskId(); result.topicName = historicExternalTaskLog.getTopicName(); result.workerId = historicExternalTaskLog.getWorkerId(); result.priority = historicExternalTaskLog.getPriority()...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricExternalTaskLogDto.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult delete(@RequestParam("ids") List<Long> ids) { int count = roleService.delete(ids); if (count > 0) { return CommonResult.success(count); } return CommonResult.failed(); } @ApiOperation("获取所有角色") @RequestMapping(value = "/listAll", method = Requ...
public CommonResult<List<UmsResource>> listResource(@PathVariable Long roleId) { List<UmsResource> roleList = roleService.listResource(roleId); return CommonResult.success(roleList); } @ApiOperation("给角色分配菜单") @RequestMapping(value = "/allocMenu", method = RequestMethod.POST) @ResponseB...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\UmsRoleController.java
2
请完成以下Java代码
public void setMessageType(MessageType messageType) { this.messageType = messageType; } public Card getCard() { return card; } public void setCard(Card card) { this.card = card; } public enum MessageType { text, interactive } public static class Card { /** * This is header title. */ pri...
return title; } public void setTitle(String title) { this.title = title; } public String getThemeColor() { return themeColor; } public void setThemeColor(String themeColor) { this.themeColor = themeColor; } } }
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\FeiShuNotifier.java
1
请完成以下Java代码
public void setIsPackagingTax (final boolean IsPackagingTax) { set_Value (COLUMNNAME_IsPackagingTax, IsPackagingTax); } @Override public boolean isPackagingTax() { return get_ValueAsBoolean(COLUMNNAME_IsPackagingTax); } @Override public void setIsTaxIncluded (final boolean IsTaxIncluded) { set_Value (...
public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } @Override public void setTaxAmt (final BigDecimal TaxAmt) { set_ValueNoCheck (COLUMNNAME_TaxAmt, TaxAmt); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_InvoiceTax.java
1
请在Spring Boot框架中完成以下Java代码
public class StartupListener implements ApplicationListener<ContextRefreshedEvent> { @Override public void onApplicationEvent(final ContextRefreshedEvent event) { final ApplicationContext applicationContext = event.getApplicationContext(); SpringContextHolder.instance.setApplicationContext(applicationContext); ...
// not ok; we have > 1 matching beans defined in the spring context. So far that always indicated some sort of mistake, so let's escalate. throw e; } catch (final NoSuchBeanDefinitionException e) { // ok; the bean is not in the spring context, so let's just return null return null; } catch (f...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\StartupListener.java
2
请完成以下Java代码
public class RootPropertyResolver extends ELResolver { private final Map<String, Object> map = Collections.synchronizedMap(new HashMap<>()); private final boolean readOnly; /** * Create a read/write root property resolver */ public RootPropertyResolver() { this(false); } /** * Create a root property res...
if (readOnly) { throw new PropertyNotWritableException("Resolver is read only!"); } setProperty((String) property, value); } } @Override public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params) { if (resolve(context, base, method)) { throw new Null...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\de\odysseus\el\util\RootPropertyResolver.java
1
请完成以下Java代码
public String getName() { return nameAttribute.getValue(this); } public void setName(String name) { nameAttribute.setValue(this, name); } public PartitionElement getPartitionElement() { return partitionElementRefAttribute.getReferenceTargetElement(this); } public void setPartitionElement(Part...
public void setPartitionElementChild(PartitionElement partitionElement) { partitionElementChild.setChild(this, partitionElement); } public Collection<FlowNode> getFlowNodeRefs() { return flowNodeRefCollection.getReferenceTargetElements(this); } public ChildLaneSet getChildLaneSet() { return childL...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\LaneImpl.java
1
请完成以下Java代码
public boolean hasMoreElements() { return names.hasMoreElements(); } @Override public String nextElement() { String headerNames = names.nextElement(); validateAllowedHeaderName(headerNames); return headerNames; } }; } @Override public String getParameter(String name) { ...
String[] values = super.getParameterValues(name); if (values != null) { for (String value : values) { validateAllowedParameterValue(name, value); } } return values; } private void validateAllowedHeaderName(String headerNames) { if (!StrictHttpFirewall.this.allowedHeaderNames.test(headerNam...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\firewall\StrictHttpFirewall.java
1
请完成以下Java代码
public class SequentialTbRuleEngineSubmitStrategy extends AbstractTbRuleEngineSubmitStrategy { private final AtomicInteger msgIdx = new AtomicInteger(0); private volatile BiConsumer<UUID, TbProtoQueueMsg<TransportProtos.ToRuleEngineMsg>> msgConsumer; private volatile UUID expectedMsgId; public Sequent...
} private void submitNext() { int listSize = orderedMsgList.size(); int idx = msgIdx.get(); if (idx < listSize) { IdMsgPair<TransportProtos.ToRuleEngineMsg> pair = orderedMsgList.get(idx); expectedMsgId = pair.uuid; if (log.isDebugEnabled()) { ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\queue\processing\SequentialTbRuleEngineSubmitStrategy.java
1
请完成以下Spring Boot application配置
# REDIS # Redis\u6570\u636E\u5E93\u7D22\u5F15\uFF08\u9ED8\u8BA4\u4E3A0\uFF09 spring.redis.database=0 # Redis\u670D\u52A1\u5668\u5730\u5740 spring.redis.host=localhost # Redis\u670D\u52A1\u5668\u8FDE\u63A5\u7AEF\u53E3 spring.redis.port=6379 # Redis\u670D\u52A1\u5668\u8FDE\u63A5\u5BC6\u7801\uFF08\u9ED8\u8BA4\u4E3A\u7...
8\u8BA4 -1 spring.redis.lettuce.pool.max-wait=-1 # \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5927\u7A7A\u95F2\u8FDE\u63A5 \u9ED8\u8BA4 8 spring.redis.lettuce.pool.max-idle=8 # \u8FDE\u63A5\u6C60\u4E2D\u7684\u6700\u5C0F\u7A7A\u95F2\u8FDE\u63A5 \u9ED8\u8BA4 0 spring.redis.lettuce.pool.min-idle=0
repos\spring-boot-leaning-master\2.x_42_courses\第 4-2 课:Spring Boot 和 Redis 常用操作\spring-boot-redis\src\main\resources\application.properties
2
请在Spring Boot框架中完成以下Java代码
private boolean isCachePdxReadSerializedEnabled() { return SimpleCacheResolver.getInstance().resolve() .filter(GemFireCache::getPdxReadSerialized) .isPresent(); } private boolean isPdxReadSerializedEnabled(@NonNull Environment environment) { return Optional.ofNullable(environment) .filter(env -...
static class DisableGemFireShutdownHookCondition extends AbstractDisableGemFireShutdownHookSupport implements Condition { @Override public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) { return shouldDisableGemFireShutdownHook(context.getEnvironment()); } } public static clas...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\DataImportExportAutoConfiguration.java
2
请完成以下Java代码
public VertragsdatenTag getTag() { return tag; } /** * Sets the value of the tag property. * * @param value * allowed object is * {@link VertragsdatenTag } * */ public void setTag(VertragsdatenTag value) { this.tag = value; } /** ...
* {@link XMLGregorianCalendar } * */ public void setEndezeit(XMLGregorianCalendar value) { this.endezeit = value; } /** * Gets the value of the hauptbestellzeit property. * * @return * possible object is * {@link VertragsdatenHauptbestellzeit } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\VertragsdatenBestellfenster.java
1
请完成以下Java代码
public Map<Class<?>, String> getUpdateStatements() { return updateStatements; } public void setUpdateStatements(Map<Class<?>, String> updateStatements) { this.updateStatements = updateStatements; } public Map<Class<?>, String> getDeleteStatements() { return deleteStatements; ...
this.databaseCatalog = databaseCatalog; } public String getDatabaseSchema() { return databaseSchema; } public void setDatabaseSchema(String databaseSchema) { this.databaseSchema = databaseSchema; } public void setTablePrefixIsSchema(boolean tablePrefixIsSchema) { this....
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\db\DbSqlSessionFactory.java
1
请完成以下Java代码
public class DefaultPrintingQueueSource extends AbstractPrintingQueueSource { private final Properties ctx; private final IPrintingQueueQuery printingQueueQuery; private final PrintingQueueProcessingInfo printingQueueProcessingInfo; public DefaultPrintingQueueSource( @NonNull final Properties ctx, @NonNull f...
queryRelated.setIgnoreC_Printing_Queue_ID(item.getC_Printing_Queue_ID()); queryRelated.setCopies(item.getCopies()); // 08958 return createPrintingQueueIterator(ctx, queryRelated, ITrx.TRXNAME_None); } private Iterator<I_C_Printing_Queue> createPrintingQueueIterator(final Properties ctx, final IPrintingQueueQ...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\api\impl\DefaultPrintingQueueSource.java
1
请完成以下Java代码
public class HistoricIdentityLinkEntityImpl extends AbstractEntityNoRevision implements HistoricIdentityLinkEntity, Serializable, BulkDeleteable { private static final long serialVersionUID = 1L; protected String type; protected String userId; protected String groupId; protected String tas...
} public void setUserId(String userId) { if (this.groupId != null && userId != null) { throw new ActivitiException("Cannot assign a userId to a task assignment that already has a groupId"); } this.userId = userId; } public String getGroupId() { return groupId; ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricIdentityLinkEntityImpl.java
1
请完成以下Java代码
public List<String> getDisable() { return disabledHeaders.stream().toList(); } /** * Binds the list of default/opt-out header names to disable, transforms them into a * lowercase set. This is to ensure case-insensitive comparison. * @param disable - list of default/opt-out header names to disable */ publi...
/** * @return the default/opt-out header names to disable */ public Set<String> getDisabledHeaders() { return disabledHeaders; } /** * @return the default/opt-out header names to apply */ public Set<String> getDefaultHeaders() { return defaultHeaders; } @Override public String toString() { return...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\SecureHeadersProperties.java
1
请完成以下Java代码
public void registerCalloutProvider(final ICalloutProvider providerToAdd) { final ICalloutProvider providersOld = providers; final ICalloutProvider providersNew = CompositeCalloutProvider.compose(providersOld, providerToAdd); if (providersNew == providersOld) { return; } providers = providersNew; lo...
return ImmutableList.of(providers); } } @Override public ICalloutProvider getProvider() { return providers; } @Override public TableCalloutsMap getCallouts(final Properties ctx, final String tableName) { return providers.getCallouts(ctx, tableName); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\callout\api\impl\CalloutFactory.java
1
请完成以下Java代码
public boolean isCatchWeight(@NonNull final org.compiere.model.I_C_OrderLine orderLine) { return InvoicableQtyBasedOn.ofNullableCodeOrNominal(orderLine.getInvoicableQtyBasedOn()).isCatchWeight(); } @Override public Optional<BPartnerId> getBPartnerId(@NonNull final OrderLineId orderLineId) { final I_C_OrderLin...
} else { isTaxExempt = null; } final Tax tax = taxDAO.getBy(TaxQuery.builder() .fromCountryId(countryFromId) .orgId(OrgId.ofRepoId(orderLine.getAD_Org_ID())) .bPartnerLocationId(bpLocationId) .warehouseId(warehouseId) .dateOfInterest(taxDate) .taxCategoryId(taxCategoryId) .soTrx(...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\impl\OrderLineBL.java
1
请完成以下Java代码
public String getDescription() { return description; } @JsonIgnore public boolean isDisabled() { return disabled != null && disabled; } @JsonIgnore public boolean isEnabled() { return !isDisabled(); } public boolean isQuickAction() { return quickAction; }
public boolean isDefaultQuickAction() { return defaultQuickAction; } private int getSortNo() { return sortNo; } @JsonAnyGetter public Map<String, Object> getDebugProperties() { return debugProperties; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\json\JSONDocumentAction.java
1
请完成以下Java代码
public class ActivityInstanceQueryProperty implements QueryProperty { private static final long serialVersionUID = 1L; private static final Map<String, ActivityInstanceQueryProperty> properties = new HashMap<>(); public static final ActivityInstanceQueryProperty ACTIVITY_INSTANCE_ID = new ActivityInstanc...
public ActivityInstanceQueryProperty(String name) { this.name = name; properties.put(name, this); } @Override public String getName() { return name; } public static ActivityInstanceQueryProperty findByName(String propertyName) { return properties.get(propertyName); ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\ActivityInstanceQueryProperty.java
1
请完成以下Java代码
public List<String> shortcutFieldOrder() { return Arrays.asList(NAME_KEY, REGEXP_KEY); } @Override public Predicate<ServerWebExchange> apply(Config config) { return new GatewayPredicate() { @Override public boolean test(ServerWebExchange exchange) { List<HttpCookie> cookies = exchange.getRequest().get...
private @Nullable String name; @NotEmpty private @Nullable String regexp; public @Nullable String getName() { return name; } public Config setName(String name) { this.name = name; return this; } public @Nullable String getRegexp() { return regexp; } public Config setRegexp(String rege...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\handler\predicate\CookieRoutePredicateFactory.java
1
请完成以下Java代码
public boolean isNew() { return isGeneratedAttribute; } @Override protected void setInternalValueDate(Date value) { attributeInstance.setValueDate(TimeUtil.asTimestamp(value)); } @Override protected Date getInternalValueDate() { return attributeInstance.getValueDate(); } @Override protected void se...
throw new UnsupportedOperationException("Setting initial value not supported"); } @Override protected Date getInternalValueDateInitial() { return null; } @Override public boolean isOnlyIfInProductAttributeSet() { // FIXME tsa: figure out why this returns false instead of using the flag from M_HU_PI_Attrib...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\AIWithHUPIAttributeValue.java
1
请在Spring Boot框架中完成以下Java代码
protected Function<Endpoints, Endpoints> alignWithManagementUrl(InstanceId instanceId, String managementUrl) { return (endpoints) -> { if (!managementUrl.startsWith("https:")) { return endpoints; } if (endpoints.stream().noneMatch((e) -> e.getUrl().startsWith("http:"))) { return endpoints; } lo...
@Data protected static class EndpointRef { private final String href; private final boolean templated; @JsonCreator EndpointRef(@JsonProperty("href") String href, @JsonProperty("templated") boolean templated) { this.href = href; this.templated = templated; } } } }
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\services\endpoints\QueryIndexEndpointStrategy.java
2
请在Spring Boot框架中完成以下Java代码
public final class ReactiveUserDetailsServiceAutoConfiguration { private static final String NOOP_PASSWORD_PREFIX = "{noop}"; private static final Pattern PASSWORD_ALGORITHM_PATTERN = Pattern.compile("^\\{.+}.*$"); private static final Log logger = LogFactory.getLog(ReactiveUserDetailsServiceAutoConfiguration.cla...
return NOOP_PASSWORD_PREFIX + password; } static class RSocketEnabledOrReactiveWebApplication extends AnyNestedCondition { RSocketEnabledOrReactiveWebApplication() { super(ConfigurationPhase.REGISTER_BEAN); } @ConditionalOnBean(RSocketMessageHandler.class) static class RSocketSecurityEnabledCondition { ...
repos\spring-boot-4.0.1\module\spring-boot-security\src\main\java\org\springframework\boot\security\autoconfigure\ReactiveUserDetailsServiceAutoConfiguration.java
2
请完成以下Java代码
public boolean comparesEqualTo(final BigDecimal val) { return value.compareTo(val) == 0; } public int signum() { return value.signum(); } public MutableBigDecimal min(final MutableBigDecimal value) { if (this.value.compareTo(value.getValue()) <= 0) { return this; } else {
return value; } } public MutableBigDecimal max(final MutableBigDecimal value) { if (this.value.compareTo(value.getValue()) >= 0) { return this; } else { return value; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\lang\MutableBigDecimal.java
1
请完成以下Java代码
public void setAD_Issue_ID (int AD_Issue_ID) { if (AD_Issue_ID < 1) set_Value (COLUMNNAME_AD_Issue_ID, null); else set_Value (COLUMNNAME_AD_Issue_ID, Integer.valueOf(AD_Issue_ID)); } @Override public int getAD_Issue_ID() { return get_ValueAsInt(COLUMNNAME_AD_Issue_ID); } @Override public void s...
public java.lang.String getJsonRequest() { return (java.lang.String)get_Value(COLUMNNAME_JsonRequest); } @Override public void setJsonResponse (java.lang.String JsonResponse) { set_Value (COLUMNNAME_JsonResponse, JsonResponse); } @Override public java.lang.String getJsonResponse() { return (java.lang...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Cost_Collector_ImportAudit.java
1
请在Spring Boot框架中完成以下Java代码
public class ArticleRssController { @GetMapping(value = "/rss1") public String articleMvcFeed() { return "articleFeedView"; } @GetMapping(value = "/rss2", produces = {"application/rss+xml", "application/rss+json"}) @ResponseBody public Channel articleHttpFeed() { List<Article> ...
} private Channel buildChannel(List<Article> articles){ Channel channel = new Channel("rss_2.0"); channel.setLink("http://localhost:8080/spring-mvc-simple/rss"); channel.setTitle("Article Feed"); channel.setDescription("Article Feed Description"); channel.setPubDate(new Date...
repos\tutorials-master\spring-web-modules\spring-mvc-basics-2\src\main\java\com\baeldung\spring\controller\rss\ArticleRssController.java
2
请完成以下Java代码
public static final class Builder { public String getFieldName() { return fieldName; } public String getParameterName() { return parameterName; } public DocumentFieldWidgetType getWidgetType() { return widgetType; } public Builder displayName(@NonNull final ITranslatableString displayNa...
{ return displayName; } public Builder lookupDescriptor(@NonNull final Optional<LookupDescriptor> lookupDescriptor) { this.lookupDescriptor = lookupDescriptor; return this; } public Builder lookupDescriptor(@Nullable final LookupDescriptor lookupDescriptor) { return lookupDescriptor(Optional.o...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\DocumentFilterParamDescriptor.java
1
请完成以下Java代码
public abstract class PvmAtomicOperationCreateConcurrentExecution implements PvmAtomicOperation { public void execute(PvmExecutionImpl execution) { // Invariant: execution is the Scope Execution for the activity's flow scope. PvmActivity activityToStart = execution.getNextActivity(); execution.setNextA...
protected void setDelayedPayloadToNewScope(PvmExecutionImpl execution, CoreModelElement scope) { String activityType = (String) scope.getProperty(BpmnProperties.TYPE.getName()); if (ActivityTypes.START_EVENT_MESSAGE.equals(activityType) // Event subprocess message start event || ActivityTypes.BOUNDARY_M...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\operation\PvmAtomicOperationCreateConcurrentExecution.java
1
请完成以下Java代码
public static void updateWeightNet(@NonNull final IWeightable weightable) { // NOTE: we calculate WeightGross, no matter if our HU is allowed to be weighted by user // final boolean weightUOMFriendly = weightable.isWeightable(); final BigDecimal weightTare = weightable.getWeightTareTotal(); final BigDecimal w...
weightNetActual = weightNet.add(weightable.getWeightTareInitial()); // only subtract seed value (the container's weight) weightable.setWeightNet(weightNetActual); weightable.setWeightNetNoPropagate(weightNet); // directly set the correct value we're expecting } } public static boolean isWeightableAttribute...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\weightable\Weightables.java
1
请完成以下Java代码
public CommandExecutor getCommandExecutor() { return commandExecutor; } public CommandContext getCommandContext() { return commandContext; } public String getMessageName() { return messageName; } public String getBusinessKey() { return businessKey; } public String getProcessInstanceI...
} public VariableMap getPayloadProcessInstanceVariablesToTriggeredScope() { return payloadProcessInstanceVariablesToTriggeredScope; } public boolean isExclusiveCorrelation() { return isExclusiveCorrelation; } public String getTenantId() { return tenantId; } public boolean isTenantIdSet() {...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\MessageCorrelationBuilderImpl.java
1
请完成以下Java代码
public class VerfuegbarkeitsantwortArtikel { @XmlElement(name = "AnfrageMenge") protected int anfrageMenge; @XmlElement(name = "AnfragePzn") protected long anfragePzn; @XmlElement(name = "Substitution") protected VerfuegbarkeitSubstitution substitution; @XmlElement(name = "Anteile", require...
* */ public VerfuegbarkeitSubstitution getSubstitution() { return substitution; } /** * Sets the value of the substitution property. * * @param value * allowed object is * {@link VerfuegbarkeitSubstitution } * */ public void setSubstitu...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\VerfuegbarkeitsantwortArtikel.java
1
请完成以下Java代码
public String getCcy() { return ccy; } /** * Sets the value of the ccy property. * * @param value * allowed object is * {@link String } * */ public void setCcy(String value) { this.ccy = value; } /** * Gets the value of the nm p...
* {@link String } * */ public String getNm() { return nm; } /** * Sets the value of the nm property. * * @param value * allowed object is * {@link String } * */ public void setNm(String value) { this.nm = value; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\CashAccount16.java
1
请完成以下Java代码
protected ExecutionEntity resolveExecution(HistoryCleanupContext context) { return null; } @Override protected EverLivingJobEntity newJobInstance(HistoryCleanupContext context) { return new EverLivingJobEntity(); } @Override protected void postInitialize(HistoryCleanupContext context, EverLivingJo...
protected int resolveRetries(HistoryCleanupContext context) { return context.getMaxRetries(); } @Override public Date resolveDueDate(HistoryCleanupContext context) { return resolveDueDate(context.isImmediatelyDue()); } private Date resolveDueDate(boolean isImmediatelyDue) { CommandContext comman...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\historycleanup\HistoryCleanupJobDeclaration.java
1
请在Spring Boot框架中完成以下Java代码
public static ClientKeyStore loadClientKeyStore(String keyStorePath, String keyStorePass, String privateKeyPass){ try{ return loadClientKeyStore(new FileInputStream(keyStorePath), keyStorePass, privateKeyPass); }catch(Exception e){ logger.error("loadClientKeyFactory fail : "+e.getMessage(), e); ...
} } public static TrustKeyStore loadTrustKeyStore(InputStream keyStoreStream, String keyStorePass){ try{ TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); KeyStore ks = KeyStore.getInstance("JKS"); ks.load(keyStoreStream, keyStorePass.toCharArray()); tmf.ini...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\utils\httpclient\SimpleHttpUtils.java
2
请完成以下Java代码
public class InOutCostDeleteCommand { @NonNull private final OrderCostRepository orderCostRepository; @NonNull private final InOutCostRepository inOutCostRepository; @NonNull private final InOutId inoutId; @Builder private InOutCostDeleteCommand( final @NonNull OrderCostRepository orderCostRepository, fina...
if (inoutCosts.isEmpty()) { return; } final ImmutableSet<OrderCostId> orderCostIds = inoutCosts.stream().map(InOutCost::getOrderCostId).collect(ImmutableSet.toImmutableSet()); final ImmutableMap<OrderCostId, OrderCost> orderCostsById = Maps.uniqueIndex(orderCostRepository.getByIds(orderCostIds), OrderCost::...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\inout\InOutCostDeleteCommand.java
1
请在Spring Boot框架中完成以下Java代码
public class StudentServiceImp implements StudentService { @Autowired private StudentDao studentDao; @Override public int add(Student student) { return this.studentDao.add(student); } @Override public int update(Student student) { return this.studentDao.update(student); } @Override
public int deleteBysno(String sno) { return this.studentDao.deleteBysno(sno); } @Override public List<Map<String, Object>> queryStudentListMap() { return this.studentDao.queryStudentsListMap(); } @Override public Student queryStudentBySno(String sno) { return this.studentDao.queryStudentBySno(sno); } }
repos\SpringAll-master\04.Spring-Boot-JdbcTemplate\src\main\java\com\springboot\service\impl\StudentServiceImp.java
2
请完成以下Java代码
public BigDecimal getQty() { return forecastLine.getQty(); } @Override public int getM_HU_PI_Item_Product_ID() { final int forecastLine_PIItemProductId = forecastLine.getM_HU_PI_Item_Product_ID(); if (forecastLine_PIItemProductId > 0) { return forecastLine_PIItemProductId; } return -1; } @Overr...
{ values.setC_BPartner_ID(partnerId); } @Override public int getC_BPartner_ID() { return values.getC_BPartner_ID(); } @Override public boolean isInDispute() { return values.isInDispute(); } @Override public void setInDispute(final boolean inDispute) { values.setInDispute(inDispute); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\ForecastLineHUPackingAware.java
1
请完成以下Java代码
public PartyIdentification32 getInvcr() { return invcr; } /** * Sets the value of the invcr property. * * @param value * allowed object is * {@link PartyIdentification32 } * */ public void setInvcr(PartyIdentification32 value) { this.invcr = ...
* <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the addtlRmtInf property. * * <p> * For exa...
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\StructuredRemittanceInformation7.java
1
请完成以下Java代码
public int getDisplayLength() { return displayLength; } public void setDisplayLength(final int displayLength) { this.displayLength = displayLength; } public int getColumnDisplayLength() { return columnDisplayLength; } public void setColumnDisplayLength(final int columnDisplayLength) { this.columnDi...
} public static final class Builder { private int displayLength = 0; private int columnDisplayLength = 0; private boolean sameLine = false; private int spanX = 1; private int spanY = 1; private Builder() { super(); } public GridFieldLayoutConstraints build() { return new GridFieldLayoutCo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\GridFieldLayoutConstraints.java
1
请完成以下Java代码
public StringAttributeBuilder namespace(String namespaceUri) { return (StringAttributeBuilder) super.namespace(namespaceUri); } @Override public StringAttributeBuilder defaultValue(String defaultValue) { return (StringAttributeBuilder) super.defaultValue(defaultValue); } @Override public StringAtt...
return referenceBuilder; } protected <V extends ModelElementInstance> void setAttributeReference(AttributeReferenceBuilder<V> referenceBuilder) { if (this.referenceBuilder != null) { throw new ModelException("An attribute cannot have more than one reference"); } this.referenceBuilder = referenceB...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\type\attribute\StringAttributeBuilderImpl.java
1
请完成以下Java代码
public static byte[] fileAsByteArray(File file) { try { return inputStreamAsByteArray(new FileInputStream(file)); } catch(FileNotFoundException e) { throw LOG.fileNotFoundException(file.getAbsolutePath(), e); } } /** * Returns the input stream of a file with specified filename * *...
} /** * Returns the File for a filename. * * @param filename the filename to load * @param classLoader the classLoader to load file with, if null falls back to TCCL and then this class's classloader * @return the file object * @throws IoUtilException if the file cannot be loaded */ public stat...
repos\camunda-bpm-platform-master\commons\utils\src\main\java\org\camunda\commons\utils\IoUtil.java
1
请完成以下Java代码
public java.math.BigDecimal getWorkingTime () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_WorkingTime); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Yield %. @param Yield The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 perce...
{ Integer ii = (Integer)get_Value(COLUMNNAME_Yield); if (ii == null) return 0; return ii.intValue(); } @Override public void setC_Manufacturing_Aggregation_ID (final int C_Manufacturing_Aggregation_ID) { if (C_Manufacturing_Aggregation_ID < 1) set_Value (COLUMNNAME_C_Manufacturing_Aggregation_ID, nu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\product\model\X_M_Product_PlanningSchema.java
1
请完成以下Java代码
protected void additionalAuthenticationChecks(UserDetails userDetails, UsernamePasswordAuthenticationToken authentication) throws AuthenticationException { if (authentication.getCredentials() == null) { logger.debug("Authentication failed: no credentials provided"); throw new B...
UserDetails loadedUser; try { loadedUser = this.userDetailsService.loadUserByUsernameAndDomain(auth.getPrincipal() .toString(), auth.getDomain()); } catch (UsernameNotFoundException notFound) { if (authentication.getCredentials() != null) { String...
repos\tutorials-master\spring-security-modules\spring-security-web-login-2\src\main\java\com\baeldung\loginextrafieldscustom\CustomUserDetailsAuthenticationProvider.java
1
请完成以下Java代码
protected void dispatchTransactionEventListener(FlowableEvent event, FlowableEventListener listener) { TransactionContext transactionContext = Context.getTransactionContext(); if (transactionContext == null) { return; } ExecuteEventListenerTransactionListener transac...
} } protected synchronized void addTypedEventListener(FlowableEventListener listener, FlowableEventType type) { List<FlowableEventListener> listeners = typedListeners.get(type); if (listeners == null) { // Add an empty list of listeners for this type listeners = new Copy...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\event\FlowableEventSupport.java
1
请完成以下Java代码
public ActiveOrHistoricCurrencyAndAmount getTtlAmt() { return ttlAmt; } /** * Sets the value of the ttlAmt property. * * @param value * allowed object is * {@link ActiveOrHistoricCurrencyAndAmount } * */ public void setTtlAmt(ActiveOrHistoricCurrency...
* {@link CreditDebitCode } * */ public CreditDebitCode getCdtDbtInd() { return cdtDbtInd; } /** * Sets the value of the cdtDbtInd property. * * @param value * allowed object is * {@link CreditDebitCode } * */ public void setCdt...
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\BatchInformation2.java
1
请完成以下Java代码
public class SubprocessValidator extends ProcessLevelValidator { @Override protected void executeValidation(BpmnModel bpmnModel, Process process, List<ValidationError> errors) { List<SubProcess> subProcesses = process.findFlowElementsOfType(SubProcess.class); for (SubProcess subProcess : subPro...
} for (StartEvent startEvent : startEvents) { if (!startEvent.getEventDefinitions().isEmpty()) { addError( errors, Problems.SUBPROCESS_START_EVENT_EVENT_DEFINITION_NOT_ALLOWED, ...
repos\Activiti-develop\activiti-core\activiti-process-validation\src\main\java\org\activiti\validation\validator\impl\SubprocessValidator.java
1
请完成以下Java代码
public void setBkTxCd(BankTransactionCodeStructure4 value) { this.bkTxCd = value; } /** * Gets the value of the avlbty property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned li...
* * <p> * Objects of the following type(s) are allowed in the list * {@link CashBalanceAvailability2 } * * */ public List<CashBalanceAvailability2> getAvlbty() { if (avlbty == null) { avlbty = new ArrayList<CashBalanceAvailability2>(); } return th...
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\TotalsPerBankTransactionCode2.java
1
请完成以下Java代码
public Criteria andFinishOrderAmountNotBetween(BigDecimal value1, BigDecimal value2) { addCriterion("finish_order_amount not between", value1, value2, "finishOrderAmount"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria { protected Cri...
return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsMemberTagExample.java
1
请完成以下Java代码
protected @Nullable Long size() { return null; } @Override protected long hitCount() { return this.cache.getStatistics().getHits(); } @Override protected Long missCount() { return this.cache.getStatistics().getMisses(); } @Override protected @Nullable Long evictionCount() { return null; } @Overri...
} @Override protected void bindImplementationSpecificMetrics(MeterRegistry registry) { FunctionCounter.builder("cache.removals", this.cache, (cache) -> cache.getStatistics().getDeletes()) .tags(getTagsWithCacheName()) .description("Cache removals") .register(registry); FunctionCounter.builder("cache.get...
repos\spring-boot-4.0.1\module\spring-boot-cache\src\main\java\org\springframework\boot\cache\metrics\RedisCacheMetrics.java
1
请完成以下Java代码
public void setM_InventoryLine_ID (int M_InventoryLine_ID) { if (M_InventoryLine_ID < 1) set_Value (COLUMNNAME_M_InventoryLine_ID, null); else set_Value (COLUMNNAME_M_InventoryLine_ID, Integer.valueOf(M_InventoryLine_ID)); } /** Get Phys.Inventory Line. @return Unique line in an Inventory document ...
/** Set Scrapped Quantity. @param ScrappedQty The Quantity scrapped due to QA issues */ public void setScrappedQty (BigDecimal ScrappedQty) { set_Value (COLUMNNAME_ScrappedQty, ScrappedQty); } /** Get Scrapped Quantity. @return The Quantity scrapped due to QA issues */ public BigDecimal getScrapped...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_InOutLineConfirm.java
1
请完成以下Java代码
public boolean supports(AuthenticationToken token) { //这个token就是从过滤器中传入的jwtToken return token instanceof HeaderToken; } //授权 @Override protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { return null; } //认证 //这个token就是从过滤器中传入的jwtToke...
if (headerKey == null) { throw new NullPointerException("headerKey 不允许为空"); } if (!"123".equals(headerKey)) { throw new AuthenticationException("认证失败"); } // 校验逻辑 //... //下面是验证这个user是否是真实存在的 log.info("使用header认证: " + headerKey); re...
repos\spring-boot-quick-master\quick-shiro\src\main\java\com\shiro\quick\shiro\realm\HeaderRealm.java
1
请完成以下Java代码
public SqlSessionFactory getSqlSessionFactory() { return sqlSessionFactory; } public void setSqlSessionFactory(SqlSessionFactory sqlSessionFactory) { this.sqlSessionFactory = sqlSessionFactory; } public IdGenerator getIdGenerator() { return idGenerator; } public void setIdGenerator(IdGenerato...
public void setSelectStatements(Map<Class< ? >, String> selectStatements) { this.selectStatements = selectStatements; } public boolean isDbIdentityUsed() { return isDbIdentityUsed; } public void setDbIdentityUsed(boolean isDbIdentityUsed) { this.isDbIdentityUsed = isDbIdentityUsed; } public b...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\sql\DbSqlSessionFactory.java
1
请完成以下Java代码
public void setAD_User_ID (int AD_User_ID) { if (AD_User_ID < 1) set_Value (COLUMNNAME_AD_User_ID, null); else set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID)); } /** Get User/Contact. @return User within the system - Internal or Business Partner Contact */ public int getAD_User_ID (...
/** Get Topic. @return Auction Topic */ public int getB_Topic_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_B_Topic_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Text Message. @param TextMsg Text Message */ public void setTextMsg (String TextMsg) { set_Value (COLUM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_BidComment.java
1
请完成以下Java代码
public void setIsHandOverLocation (final boolean IsHandOverLocation) { set_Value (COLUMNNAME_IsHandOverLocation, IsHandOverLocation); } @Override public boolean isHandOverLocation() { return get_ValueAsBoolean(COLUMNNAME_IsHandOverLocation); } @Override public void setIsOneTime (final boolean IsOneTime) ...
@Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setPhone (final @Nullable java.lang.String Phone) { set_Value (COLUMNNAME_Phone, Phone); } @Override public java.lang.String getPhone() { return get_ValueAsString(COLUMNNAME_Phone); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Location_QuickInput.java
1
请完成以下Java代码
public void switchDynamicAllocation(final PickingSlotId pickingSlotId, final boolean isDynamic) { final I_M_PickingSlot pickingSlot = pickingSlotRepository.getById(pickingSlotId); if (isDynamic == pickingSlot.isDynamic()) { //nothing to do return; } if (pickingSlot.isDynamic()) { turnOffDynamicAl...
{ return pickingSlotQueueRepository.getPickingSlotQueue(pickingSlotId); } public void removeFromPickingSlotQueue(@NonNull final PickingSlotId pickingSlotId, @NonNull final Set<HuId> huIdsToRemove) { huPickingSlotBL.removeFromPickingSlotQueue(pickingSlotId, huIdsToRemove); } public List<PickingSlotReservation...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\slot\PickingSlotService.java
1
请在Spring Boot框架中完成以下Java代码
private void collectReceivedHU(@NonNull final I_M_HU hu) { this.receivedHUs.add(hu); } private void collectReceivedHUs(@NonNull final List<I_M_HU> hus) { this.receivedHUs.addAll(hus); } private void setCatchWeightForReceivedHUs() { if (catchWeight == null) { return; } if (receivedHUs.isEmpty())...
} private void setQRCodeAttribute(@NonNull final I_M_HU hu) { if (barcode == null) {return;} final IAttributeStorage huAttributes = handlingUnitsBL.getAttributeStorage(hu); if (!huAttributes.hasAttribute(HUAttributeConstants.ATTR_QRCode)) {return;} huAttributes.setSaveOnChange(true); huAttributes.setValu...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\commands\receive\ReceiveGoodsCommand.java
2
请完成以下Java代码
public void setValue(Object value, ValueFields valueFields) { if (value instanceof ParallelMultiInstanceLoopVariable) { valueFields.setTextValue(((ParallelMultiInstanceLoopVariable) value).getExecutionId()); valueFields.setTextValue2(((ParallelMultiInstanceLoopVariable) value).getType())...
return 0; } List<? extends ExecutionEntity> childExecutions = multiInstanceRootExecution.getExecutions(); int nrOfActiveInstances = (int) childExecutions.stream().filter(execution -> execution.isActive() && !(execution.getCurrentFlowElement() instanceof BoundaryEvent)).count(); ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\variable\ParallelMultiInstanceLoopVariableType.java
1
请完成以下Java代码
public void setImage(final Image image) { m_image = image; if (m_image == null) { return; } MediaTracker mt = new MediaTracker(this); mt.addImage(m_image, 0); try { mt.waitForID(0); } catch (Exception e) { } Dimension dim = new Dimension(m_image.getWidth(this), m_image....
{ g.drawImage(m_image, in.left, in.top, this); } } // paint /** * Update * * @param g graphics */ @Override public void update(final Graphics g) { paint(g); } // update } // GImage } // Attachment
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\Attachment.java
1
请完成以下Java代码
public void setWStoreUser (String WStoreUser) { set_Value (COLUMNNAME_WStoreUser, WStoreUser); } /** Get WebStore User. @return User ID of the Web Store EMail address */ public String getWStoreUser () { return (String)get_Value(COLUMNNAME_WStoreUser); } /** Set WebStore Password. @param WStoreUserP...
Password of the Web Store EMail address */ public void setWStoreUserPW (String WStoreUserPW) { set_Value (COLUMNNAME_WStoreUserPW, WStoreUserPW); } /** Get WebStore Password. @return Password of the Web Store EMail address */ public String getWStoreUserPW () { return (String)get_Value(COLUMNNAME_WSt...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_Store.java
1
请完成以下Java代码
public void setInternalName (final String InternalName) { set_Value (COLUMNNAME_InternalName, InternalName); } @Override public String getInternalName() { return get_ValueAsString(COLUMNNAME_InternalName); } @Override public void setKeepAliveTimeHours (final @Nullable String KeepAliveTimeHours) { set_V...
public static final String NOTIFICATIONTYPE_AsyncBatchProcessed = "ABP"; /** Workpackage Processed = WPP */ public static final String NOTIFICATIONTYPE_WorkpackageProcessed = "WPP"; @Override public void setNotificationType (final @Nullable String NotificationType) { set_Value (COLUMNNAME_NotificationType, Notif...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Async_Batch_Type.java
1
请完成以下Java代码
public static String messageName(SparkplugMessageType type) { return STATE.equals(type) ? "sparkplugConnectionState" : type.name(); } public boolean isState() { return this.equals(STATE); } public boolean isDeath() { return this.equals(DDEATH) || this.equals(NDEATH); } public boolean isCommand() { ret...
return isCommand() || isData() || isRecord(); } public boolean isNode() { return this.equals(NBIRTH) || this.equals(NCMD) || this.equals(NDATA) ||this.equals(NDEATH) || this.equals(NRECORD); } public boolean isDevice() { return this.equals(DBIRTH) || this.equals(DCMD) || this.equals(DDATA) ||th...
repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\util\sparkplug\SparkplugMessageType.java
1
请在Spring Boot框架中完成以下Java代码
public Result<String> pay(String orderId, HttpServletRequest httpReq) { // 获取买家ID String buyerId = getUserId(httpReq); // 支付 String html = orderService.pay(orderId, buyerId); // 成功 return Result.newSuccessResult(html); } @Override public Result cancelOrder(...
String buyerId = getUserId(httpReq); // 确认收货 orderService.confirmReceive(orderId, buyerId); // 成功 return Result.newSuccessResult(); } /** * 获取用户ID * @param httpReq HTTP请求 * @return 用户ID */ private String getUserId(HttpServletRequest httpReq) { ...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Controller\src\main\java\com\gaoxi\controller\order\OrderControllerImpl.java
2
请在Spring Boot框架中完成以下Java代码
public class UserId implements RepoIdAware { public static final UserId SYSTEM = new UserId(0); public static final UserId METASFRESH = new UserId(100); /** * Used by the reports service when it accesses the REST-API */ public static final UserId JSON_REPORTS = new UserId(540057); @JsonCreator public static...
} public static int toRepoId(@Nullable final UserId userId) { return toRepoIdOr(userId, -1); } public static int toRepoIdOr( @Nullable final UserId userId, final int defaultValue) { return userId != null ? userId.getRepoId() : defaultValue; } public static boolean equals(@Nullable final UserId userI...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\UserId.java
2
请在Spring Boot框架中完成以下Java代码
public class BasicAuthenticationSecurityConfiguration { //Filter chain // authenticate all requests //basic authentication //disabling csrf //stateless rest api @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { //1: Response to preflight request doesn't pass access control ...
auth -> auth .requestMatchers(HttpMethod.OPTIONS, "/**").permitAll() .anyRequest().authenticated() ) .httpBasic(Customizer.withDefaults()) .sessionManagement( session -> session.sessionCreationPolicy (SessionCreationPolicy.STATELESS)) // .csrf().disable() Deprecat...
repos\master-spring-and-spring-boot-main\13-full-stack\02-rest-api\src\main\java\com\in28minutes\rest\webservices\restfulwebservices\basic\BasicAuthenticationSecurityConfiguration.java
2
请完成以下Java代码
public GatewayFilter apply(NameConfig config) { return new GatewayFilter() { @Override public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) { ServerHttpRequest request = exchange.getRequest(); MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>(request.getQuer...
catch (IllegalArgumentException ex) { throw new IllegalStateException("Invalid URI query: \"" + queryParams + "\""); } } @Override public String toString() { return filterToStringCreator(RemoveRequestParameterGatewayFilterFactory.this) .append("name", config.getName()) .toString(); }...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RemoveRequestParameterGatewayFilterFactory.java
1
请完成以下Java代码
private Color getColor (boolean primary) { String add = primary ? "" : "_1"; // is either BD or Int Integer Red = (Integer)m_mTab.getValue("Red" + add); Integer Green = (Integer)m_mTab.getValue("Green" + add); Integer Blue = (Integer)m_mTab.getValue("Blue" + add); // int red = Red == null ? 0 : Red.intVa...
m_mTab.setValue("RepeatDistance", new BigDecimal(cc.getGradientRepeatDistance())); m_mTab.setValue("StartPoint", String.valueOf(cc.getGradientStartPoint())); } else if (cc.isLine()) { setColor (cc.getLineBackColor(), true); setColor (cc.getLineColor(), false); m_mTab.getValue("LineWidth"); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VColor.java
1
请完成以下Java代码
private void setButtonVisibility(final CButton button, final boolean visible) { if (button == null) { return; } button.setVisible(visible); } private void enableDisableButtons(final JTable table) { final boolean enabled = table.getSelectedRow() >= 0; if (bZoomPrimary != null) { bZoomPrimary.set...
} if (bZoomSecondary != null) { bZoomSecondary.setEnabled(enabled); } } @Override public void dispose() { // task 09330: we reversed the order of setEnabled and dispose and that apparently solved the problem from this task getParent().setEnabled(true); super.dispose(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\history\impl\InvoiceHistory.java
1
请完成以下Java代码
/* package */static String extractSequenceNumber(final String fileName) { final int indexOf = fileName.indexOf("_"); if (indexOf <= 0) { // no '_' or empty prefix => return full name return fileName; } return fileName.substring(0, indexOf); } public GloballyOrderedScannerDecorator(final IScriptScann...
@SuppressWarnings("unused") private void dumpTofile(SortedSet<IScript> lexiagraphicallySortedScripts) { FileWriter writer; try { writer = new FileWriter(GloballyOrderedScannerDecorator.class.getName() + "_sorted_scripts.txt"); for (final IScript script : lexiagraphicallySortedScripts) { writer.writ...
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\scanner\impl\GloballyOrderedScannerDecorator.java
1
请完成以下Java代码
public static JsonExternalReferenceItem of( @NonNull final JsonExternalReferenceLookupItem lookupItem) { return new JsonExternalReferenceItem(lookupItem, null, null, null, null, null); } @NonNull JsonExternalReferenceLookupItem lookupItem; @Nullable @JsonInclude(JsonInclude.Include.NON_NULL) JsonMetasfres...
@Nullable @JsonInclude(JsonInclude.Include.NON_NULL) JsonMetasfreshId externalReferenceId; @JsonCreator @Builder private JsonExternalReferenceItem( @JsonProperty("lookupItem") @NonNull final JsonExternalReferenceLookupItem lookupItem, @JsonProperty("metasfreshId") @Nullable final JsonMetasfreshId metasfresh...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-externalreference\src\main\java\de\metas\common\externalreference\v1\JsonExternalReferenceItem.java
1
请完成以下Java代码
public void collectDocumentValidStatusChanged(final DocumentPath documentPath, final DocumentValidStatus documentValidStatus) { // do nothing } @Override public void collectValidStatus(final IDocumentFieldView documentField) { // do nothing } @Override public void collectDocumentSaveStatusChanged(final Do...
public void collectAllowNew(final DocumentPath rootDocumentPath, final DetailId detailId, final LogicExpressionResult allowNew) { // do nothing } @Override public void collectAllowDelete(final DocumentPath rootDocumentPath, final DetailId detailId, final LogicExpressionResult allowDelete) { // do nothing } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\NullDocumentChangesCollector.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonProductCategory { @ApiModelProperty( // allowEmptyValue = false, // dataType = "java.lang.Integer", // value = "This translates to `M_Product_Category_ID`.") @NonNull ProductCategoryId id; @NonNull String value; @NonNull String name;
@Nullable String description; @ApiModelProperty( // allowEmptyValue = false, // dataType = "java.lang.Integer", // value = "This translates to `M_Product_Category.M_Product_Category_Parent_ID`.") @Nullable ProductCategoryId parentProductCategoryId; boolean defaultCategory; @NonNull JsonCreatedUpdated...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\product\response\JsonProductCategory.java
2
请完成以下Java代码
public void localize(ProcessInstance processInstance, String locale, boolean withLocalizationFallback) { ExecutionEntity processInstanceExecution = (ExecutionEntity) processInstance; processInstanceExecution.setLocalizedName(null); processInstanceExecution.setLocalizedDescription(null); ...
public void localize(HistoricProcessInstance historicProcessInstance, String locale, boolean withLocalizationFallback) { HistoricProcessInstanceEntity processInstanceEntity = (HistoricProcessInstanceEntity) historicProcessInstance; processInstanceEntity.setLocalizedName(null); processInstanceEnt...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\DefaultProcessLocalizationManager.java
1
请完成以下Java代码
private static final TableModelMetaInfo<?> getTableModelMetaInfoOrNull(final TableModel model) { if (!(model instanceof AnnotatedTableModel<?>)) { return null; } final TableModelMetaInfo<?> metaInfo = ((AnnotatedTableModel<?>)model).getMetaInfo(); return metaInfo; } private TableCellRenderer createTab...
public void propertyChange(final PropertyChangeEvent evt) { // Avoid recursion if (running) { return; } running = true; try { final TableColumnInfo columnMetaInfo = (TableColumnInfo)evt.getSource(); final TableColumnExt columnExt = getTableColumnExt(); if (columnExt == null) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\swing\table\AnnotatedTableColumnFactory.java
1
请完成以下Java代码
public String getTypeName() { return TYPE_NAME; } public boolean isCachable() { return forceCacheable; } public boolean isAbleToStore(Object value) { if (value == null) { return true; } return mappings.isJPAEntity(value); } public void setVa...
valueFields.setTextValue(className); valueFields.setTextValue2(idString); } else { valueFields.setTextValue(null); valueFields.setTextValue2(null); } } public Object getValue(ValueFields valueFields) { if (valueFields.getTextValue() != null && valueFi...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\variable\JPAEntityVariableType.java
1
请完成以下Java代码
public V call() throws Exception { this.originalSecurityContext = this.securityContextHolderStrategy.getContext(); try { this.securityContextHolderStrategy.setContext(this.delegateSecurityContext); return this.delegate.call(); } finally { SecurityContext emptyContext = this.securityContextHolderStrateg...
* @param securityContext the {@link SecurityContext} to establish for the delegate * {@link Callable}. If null, defaults to {@link SecurityContextHolder#getContext()} * @return */ public static <V> Callable<V> create(Callable<V> delegate, SecurityContext securityContext) { return (securityContext != null) ? ne...
repos\spring-security-main\core\src\main\java\org\springframework\security\concurrent\DelegatingSecurityContextCallable.java
1
请在Spring Boot框架中完成以下Java代码
public String getLINENUMBER() { return linenumber; } /** * Sets the value of the linenumber property. * * @param value * allowed object is * {@link String } * */ public void setLINENUMBER(String value) { this.linenumber = value; } /*...
* {@link String } * */ public String getFREETEXTCODE() { return freetextcode; } /** * Sets the value of the freetextcode property. * * @param value * allowed object is * {@link String } * */ public void setFREETEXTCODE(String v...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DTEXT1.java
2
请在Spring Boot框架中完成以下Java代码
public class QuoteDTO implements Serializable { private Long id; @NotNull private String symbol; @NotNull private BigDecimal price; @NotNull private ZonedDateTime lastTrade; public Long getId() { return id; } public void setId(Long id) { this.id = id; } ...
public void setLastTrade(ZonedDateTime lastTrade) { this.lastTrade = lastTrade; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } QuoteDTO quot...
repos\tutorials-master\jhipster-modules\jhipster-uaa\quotes\src\main\java\com\baeldung\jhipster\quotes\service\dto\QuoteDTO.java
2
请在Spring Boot框架中完成以下Java代码
public final class TransactionAutoConfiguration { @Bean @ConditionalOnMissingBean @ConditionalOnSingleCandidate(ReactiveTransactionManager.class) TransactionalOperator transactionalOperator(ReactiveTransactionManager transactionManager) { return TransactionalOperator.create(transactionManager); } @Configurati...
@ConditionalOnBooleanProperty(name = "spring.aop.proxy-target-class", havingValue = false) static class JdkDynamicAutoProxyConfiguration { } @Configuration(proxyBeanMethods = false) @EnableTransactionManagement(proxyTargetClass = true) @ConditionalOnBooleanProperty(name = "spring.aop.proxy-target-class", ma...
repos\spring-boot-4.0.1\module\spring-boot-transaction\src\main\java\org\springframework\boot\transaction\autoconfigure\TransactionAutoConfiguration.java
2
请完成以下Java代码
public boolean isOrAlphabetic() { return orAlphabetic; } public void setOrAlphabetic(boolean orAlphabetic) { this.orAlphabetic = orAlphabetic; } public boolean isNot() { return not; } public void setNot(boolean not) { this.not = not; } public boolean i...
", notEqual=" + notEqual + ", notEqualAlphabetic=" + notEqualAlphabetic + ", lessThan=" + lessThan + ", lessThanAlphabetic=" + lessThanAlphabetic + ", lessThanOrEqual=" + lessThanOrEqual + ", lessThanOrEqualAlphabetic=" + lessThanOrEqualAlp...
repos\tutorials-master\spring-spel\src\main\java\com\baeldung\spring\spel\examples\SpelRelational.java
1
请完成以下Java代码
private int unlockUser(final int accountLockExpire, final int AD_User_IDToUnlock) { final int result[] = { 0 }; Services.get(ITrxManager.class).runInNewTrx(new TrxRunnable() { @Override public void run(final String localTrxName) throws Exception { final org.compiere.model.I_AD_User user = Interfa...
if (curentLogin.compareTo(acountUnlock) > 0) { user.setLoginFailureCount(0); user.setIsAccountLocked(false); InterfaceWrapperHelper.save(user); result[0] = 1; } } }); return result[0]; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\process\AD_User_ExpireLocks.java
1
请完成以下Java代码
public ImmutableList<ExternalId> toExternalIds(@NonNull final Collection<JsonExternalId> externalLineIds) { return externalLineIds .stream() .map(JsonExternalIds::toExternalId) .collect(ImmutableList.toImmutableList()); } public JsonExternalId of(@NonNull final ExternalId externalId) { return JsonE...
public boolean equals(@Nullable final JsonExternalId id1, @Nullable final JsonExternalId id2) { return Objects.equals(id1, id2); } public static boolean isEqualTo( @Nullable final JsonExternalId jsonExternalId, @Nullable final ExternalId externalId) { if (jsonExternalId == null && externalId == null) {...
repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\rest_api\utils\JsonExternalIds.java
1
请完成以下Java代码
private boolean rowsHaveSingleProductId() { // getProcessInfo().getQueryFilterOrElse(ConstantQueryFilter.of(false)); doesn't work from checkPreconditionsApplicable final SqlViewRowsWhereClause viewSqlWhereClause = getViewSqlWhereClause(getSelectedRowIds()); final IQueryFilter<I_M_DiscountSchemaBreak> selectionQu...
{ final IQueryFilter<I_M_DiscountSchemaBreak> queryFilter = getProcessInfo().getQueryFilterOrElse(null); if (queryFilter == null) { throw new AdempiereException("@NoSelection@"); } final boolean allowCopyToSameSchema = true; final CopyDiscountSchemaBreaksRequest request = CopyDiscountSchemaBreaksReques...
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