instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class ProcessEngineXmlImpl implements ProcessEngineXml { protected String name; protected boolean isDefault; protected String configurationClass; protected String jobAcquisitionName; protected String datasource; protected Map<String, String> properties; protected List<ProcessEnginePluginXml> plu...
return datasource; } public void setDatasource(String datasource) { this.datasource = datasource; } public String getJobAcquisitionName() { return jobAcquisitionName; } public void setJobAcquisitionName(String jobAcquisitionName) { this.jobAcquisitionName = jobAcquisitionName; } ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\metadata\ProcessEngineXmlImpl.java
1
请完成以下Java代码
private static WFActivityStatus computeStatus( @NonNull final Quantity qtyToReceive, @NonNull final Quantity qtyReceived) { if (qtyReceived.isZero()) { return WFActivityStatus.NOT_STARTED; } final Quantity qtyToReceiveRemaining = qtyToReceive.subtract(qtyReceived); return qtyToReceiveRemaining.sign...
public FinishedGoodsReceiveLine withQtyReceived(@NonNull final Quantity qtyReceived) { return !Objects.equals(this.qtyReceived, qtyReceived) ? toBuilder().qtyReceived(qtyReceived).build() : this; } @NonNull public ITranslatableString getProductValueAndProductName() { final TranslatableStringBuilder me...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\model\FinishedGoodsReceiveLine.java
1
请完成以下Java代码
public String getUsername() { return user.getUsername(); } @Override public String getPassword() { return user.getPassword(); } @Override public Collection<? extends GrantedAuthority> getAuthorities() { final List<GrantedAuthority> authorities = new ArrayList<>(); ...
@Override public boolean isCredentialsNonExpired() { return true; } @Override public boolean isEnabled() { return true; } public User getUser() { return user; } }
repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\custom\security\MyUserPrincipal.java
1
请完成以下Java代码
public int getDisplayType() { return gridField.getDisplayType(); } public ReferenceId getAD_Reference_Value_ID() { return gridField.getAD_Reference_Value_ID(); } public boolean isLookup() { return gridField.isLookup(); } public Lookup getLookup() { return gridField.getLookup(); } public boolean ...
{ final Lookup lookup = getLookup(); if (lookup != null) { infoDisplay = lookup.getDisplay(value); } } else if (getDisplayType() == DisplayType.YesNo) { final IMsgBL msgBL = Services.get(IMsgBL.class); infoDisplay = msgBL.getMsg(Env.getCtx(), infoDisplay); } return infoDisplay; } @Ov...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindPanelSearchField.java
1
请完成以下Java代码
private void repairFileChannel() throws IOException { tracker.closedFileChannel(this.path); this.fileChannel = FileChannel.open(this.path, StandardOpenOption.READ); tracker.openedFileChannel(this.path); } void open() throws IOException { synchronized (this.lock) { if (this.referenceCount == 0) { ...
throw exceptionSupplier.get(); } } } @Override public String toString() { return this.path.toString(); } } /** * Internal tracker used to check open and closing of files in tests. */ interface Tracker { Tracker NONE = new Tracker() { @Override public void openedFileChannel(Path pat...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\zip\FileDataBlock.java
1
请完成以下Java代码
public String getName() { return type; } @Schema(description = "JSON object with the alarm Id. " + "Specify this field to update the alarm. " + "Referencing non-existing alarm Id will cause error. " + "Omit this field to create new alarm.") @Override public A...
public static AlarmStatus toStatus(boolean cleared, boolean acknowledged) { if (cleared) { return acknowledged ? AlarmStatus.CLEARED_ACK : AlarmStatus.CLEARED_UNACK; } else { return acknowledged ? AlarmStatus.ACTIVE_ACK : AlarmStatus.ACTIVE_UNACK; } } @JsonIgnore...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\alarm\Alarm.java
1
请完成以下Java代码
protected String getDescription() { Assert.state(this.servlet != null, "Unable to return description for null servlet"); return "servlet " + getServletName(); } @Override protected ServletRegistration.Dynamic addRegistration(String description, ServletContext servletContext) { String name = getServletName(); ...
if (this.multipartConfig != null) { registration.setMultipartConfig(this.multipartConfig); } } /** * Returns the servlet name that will be registered. * @return the servlet name */ public String getServletName() { return getOrDeduceName(this.servlet); } @Override public String toString() { return...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\web\servlet\ServletRegistrationBean.java
1
请完成以下Java代码
public class ModificationDto { protected List<ProcessInstanceModificationInstructionDto> instructions; protected List<String> processInstanceIds; protected ProcessInstanceQueryDto processInstanceQuery; protected HistoricProcessInstanceQueryDto historicProcessInstanceQuery; protected String processDefinitionI...
public void applyTo(ModificationBuilder builder, ProcessEngine processEngine, ObjectMapper objectMapper) { for (ProcessInstanceModificationInstructionDto instruction : instructions) { instruction.applyTo(builder, processEngine, objectMapper); } } public String getAnnotation() { return annotatio...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\ModificationDto.java
1
请完成以下Java代码
public boolean isOnly() {return mode == Mode.ONLY;} @Override public boolean test(@Nullable final T value) { if (mode == Mode.ANY) { return true; } else if (mode == Mode.NONE) { return false; } else if (mode == Mode.ONLY) { return onlyValues.contains(value); } else { throw Check.mk...
public InSetPredicate<T> intersectWith(@NonNull final InSetPredicate<T> other) { if (isNone() || other.isNone()) { return none(); } if (isAny()) { return other; } else if (other.isAny()) { return this; } return only(Sets.intersection(this.toSet(), other.toSet())); } public interface C...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\InSetPredicate.java
1
请完成以下Java代码
public void onMsg(TbContext ctx, TbMsg msg) { EntityType originatorEntityType = msg.getOriginator().getEntityType(); if (!EntityType.DEVICE.equals(originatorEntityType)) { ctx.tellFailure(msg, new IllegalArgumentException( "Unsupported originator entity type: [" + origina...
private TbCallback getMsgEnqueuedCallback(TbContext ctx, TbMsg msg) { return new TbCallback() { @Override public void onSuccess() { ctx.tellSuccess(msg); } @Override public void onFailure(Throwable t) { ctx.tellFailure(...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\action\TbDeviceStateNode.java
1
请完成以下Java代码
public class GetTaskVariableCmdTyped implements Command<TypedValue>, Serializable { private static final long serialVersionUID = 1L; protected String taskId; protected String variableName; protected boolean isLocal; protected boolean deserializeValue; public GetTaskVariableCmdTyped(String taskId, String v...
if (isLocal) { value = task.getVariableLocalTyped(variableName, deserializeValue); } else { value = task.getVariableTyped(variableName, deserializeValue); } return value; } protected void checkGetTaskVariableTyped(TaskEntity task, CommandContext commandContext) { for(CommandChecker che...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\GetTaskVariableCmdTyped.java
1
请完成以下Java代码
void play(String audioFilePath) { try { InputStream inputStream = getClass().getClassLoader() .getResourceAsStream(audioFilePath); AudioInputStream audioStream = AudioSystem.getAudioInputStream(inputStream); AudioFormat format = audioStream.getFormat(); ...
} catch (UnsupportedAudioFileException | LineUnavailableException | IOException ex) { System.out.println("Error occured during playback process:"+ ex.getMessage()); } } public static void main(String[] args) { String audioFilePath = "AudioFileWithWavFormat.wav"; // Clip ca...
repos\tutorials-master\javax-sound\src\main\java\com\baeldung\SoundPlayerUsingClip.java
1
请完成以下Java代码
public class Notice 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; /** * 标题 */ @Schema(description = "标题") priva...
private Integer category; /** * 发布日期 */ @Schema(description = "发布日期") private Date releaseTime; /** * 内容 */ @Schema(description = "内容") private String content; }
repos\SpringBlade-master\blade-service-api\blade-demo-api\src\main\java\com\example\demo\entity\Notice.java
1
请完成以下Java代码
public static void main(String[] args) { SpringApplication.run(Application.class, args).close(); } /* * Boot will autowire this into the container factory. */ @Bean public CommonErrorHandler errorHandler(KafkaOperations<Object, Object> template) { return new DefaultErrorHandler( new DeadLetterPublishin...
logger.info("Received from DLT: " + new String(in)); this.exec.execute(() -> System.out.println("Hit Enter to terminate...")); } @Bean public NewTopic topic() { return new NewTopic("topic1", 1, (short) 1); } @Bean public NewTopic dlt() { return new NewTopic("topic1-dlt", 1, (short) 1); } @Bean @Profil...
repos\spring-kafka-main\samples\sample-01\src\main\java\com\example\Application.java
1
请完成以下Java代码
public class CompositeDeliveryDayHandler implements IDeliveryDayHandler { private final CopyOnWriteArrayList<IDeliveryDayHandler> handlers = new CopyOnWriteArrayList<>(); public final void addDeliveryDayHandler(final IDeliveryDayHandler handler) { Check.assumeNotNull(handler, "handler not null"); handlers.addIf...
for (final IDeliveryDayHandler handler : handlers) { handler.updateDeliveryDayWhenAllocationChanged(deliveryDay, deliveryDayAlloc, deliveryDayAllocOld); } } @Override public void updateTourInstanceWhenDeliveryDayChanged(I_M_Tour_Instance tourInstance, I_M_DeliveryDay deliveryDay, I_M_DeliveryDay deliveryDayO...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\tourplanning\spi\CompositeDeliveryDayHandler.java
1
请在Spring Boot框架中完成以下Java代码
public class PhonecallSchedule { @NonNull PhonecallSchemaVersionLineId schemaVersionLineId; @Nullable PhonecallScheduleId id; @NonNull OrgId orgId; @NonNull BPartnerLocationId bpartnerAndLocationId; @NonNull UserId contactId; @NonNull LocalDate date; @NonNull ZonedDateTime startTime; @NonNull Zo...
boolean isOrdered; boolean isCalled; UserId salesRepId; @Nullable String description; public PhonecallSchemaId getPhonecallSchemaId() { return getSchemaVersionLineId().getVersionId().getPhonecallSchemaId(); } public PhonecallSchemaVersionId getPhonecallSchemaVersionId() { return getSchemaVersionLineId...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\phonecall\PhonecallSchedule.java
2
请完成以下Java代码
public String getType() { return TYPE; } @Override public void execute(JobEntity job, String configuration, VariableScope variableScope, CommandContext commandContext) { PlanItemInstanceEntity planItemInstanceEntity = (PlanItemInstanceEntity) variableScope; VariableService variable...
if (planItemInstanceEntity instanceof CountingPlanItemInstanceEntity) { ((CountingPlanItemInstanceEntity) planItemInstanceEntity) .setVariableCount(((CountingPlanItemInstanceEntity) planItemInstanceEntity).getVariableCount() - jobVariables.size()); } } ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\job\ExternalWorkerTaskCompleteJobHandler.java
1
请完成以下Java代码
public int hashCode() { if (hashcode == 0) { hashcode = new HashcodeBuilder() .append(name) .toHashcode(); } return hashcode; } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } final ResourceAsPermission other = EqualsBuilder.getOther(this, obj)...
.isEqual(); } @Override public Resource getResource() { return this; } @Override public boolean hasAccess(final Access access) { // TODO: return accesses.contains(access); throw new UnsupportedOperationException("Not implemented"); } @Override public Permission mergeWith(Permission accessFrom) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\ResourceAsPermission.java
1
请完成以下Java代码
public I_I_Replenish retrieveImportRecord(final Properties ctx, final ResultSet rs) throws SQLException { return new X_I_Replenish(ctx, rs, ITrx.TRXNAME_ThreadInherited); } /* * @param isInsertOnly ignored. This import is only for updates. */ @Override protected ImportRecordResult importRecord( @NonNull ...
replenish = ReplenishImportHelper.createNewReplenish(importRecord); replenishImportResult = ImportRecordResult.Inserted; } else { replenish = ReplenishImportHelper.uppdateReplenish(importRecord); replenishImportResult = ImportRecordResult.Updated; } InterfaceWrapperHelper.save(replenish); importR...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\replenishment\impexp\ReplenishmentImportProcess.java
1
请完成以下Java代码
public OAuth2TokenValidator<Jwt> build() { List.of(JoseHeaderNames.TYP, JwtClaimNames.EXP, JwtClaimNames.SUB, JwtClaimNames.IAT, JwtClaimNames.JTI, JwtClaimNames.ISS, JwtClaimNames.AUD, "client_id") .forEach((name) -> Assert.isTrue(this.validators.containsKey(name), name + " must be validated")); return ...
OAuth2TokenValidator<Jwt> isEqualTo(String value) { return and(satisfies((jwt) -> value.equals(jwt.getClaim(this.claimName)))); } OAuth2TokenValidator<Jwt> satisfies(Predicate<Jwt> predicate) { return and((jwt) -> { OAuth2Error error = new OAuth2Error(OAuth2ErrorCodes.INVALID_TOKEN, this.claimName + " is...
repos\spring-security-main\oauth2\oauth2-jose\src\main\java\org\springframework\security\oauth2\jwt\JwtValidators.java
1
请完成以下Java代码
private static Map.Entry<BPartnerId, AvailabilityRequestItem> toVendorAndRequestItem(final Map.Entry<TrackingId, PurchaseCandidatesGroup> entry) { final TrackingId trackingId = entry.getKey(); final PurchaseCandidatesGroup purchaseCandidatesGroup = entry.getValue(); final BPartnerId vendorId = purchaseCandidates...
} private static AvailabilityRequest createAvailabilityRequestOrNull(final BPartnerId vendorId, final Collection<AvailabilityRequestItem> requestItems) { if (requestItems.isEmpty()) { return null; } return AvailabilityRequest.builder() .vendorId(vendorId.getRepoId()) .availabilityRequestItems(req...
repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\availability\AvailabilityCheckService.java
1
请完成以下Java代码
public String getSourceCaseDefinitionId() { return sourceCaseDefinitionId; } public void setSourceCaseDefinitionId(String sourceCaseDefinitionId) { this.sourceCaseDefinitionId = sourceCaseDefinitionId; } public String getTargetCaseDefinitionId() { return targetCaseDefinitionId;...
public String getMigrationMessage() { return migrationMessage; } public void setMigrationMessage(String migrationMessage) { this.migrationMessage = migrationMessage; } public String getMigrationStacktrace() { return migrationStacktrace; } public void setMigrationSt...
repos\flowable-engine-main\modules\flowable-cmmn-api\src\main\java\org\flowable\cmmn\api\migration\CaseInstanceBatchMigrationPartResult.java
1
请完成以下Java代码
public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set Landscape. @param IsLandscape Landscape orientation */ public void setIsLandscape (boolean IsLandscape) { set_Value (COLUMNNAME_IsLandscape, Boolean.valueOf(IsLandscape)); } /** Get Landscape. @return L...
} /** Get Label Width. @return Width of the Label */ public int getLabelWidth () { Integer ii = (Integer)get_Value(COLUMNNAME_LabelWidth); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintLabel.java
1
请在Spring Boot框架中完成以下Java代码
public void setWithoutTenantId(Boolean withoutTenantId) { this.withoutTenantId = withoutTenantId; } @CamundaQueryParam(value = "includeDeploymentsWithoutTenantId", converter = BooleanConverter.class) public void setIncludeDeploymentsWithoutTenantId(Boolean includeDeploymentsWithoutTenantId) { this.includ...
if (tenantIds != null && !tenantIds.isEmpty()) { query.tenantIdIn(tenantIds.toArray(new String[tenantIds.size()])); } if (TRUE.equals(withoutTenantId)) { query.withoutTenantId(); } if (TRUE.equals(includeDeploymentsWithoutTenantId)) { query.includeDeploymentsWithoutTenantId(); } ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\repository\DeploymentQueryDto.java
2
请完成以下Java代码
public void setM_Product_ID (int M_Product_ID) { if (M_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Product. @return Product, Service, Item */ public int getM_Product_ID () { Integer ...
@param SetupTime Setup time before starting Production */ public void setSetupTime (BigDecimal SetupTime) { set_Value (COLUMNNAME_SetupTime, SetupTime); } /** Get Setup Time. @return Setup time before starting Production */ public BigDecimal getSetupTime () { BigDecimal bd = (BigDecimal)get_Value...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_ProductOperation.java
1
请完成以下Java代码
public BigDecimal getPriceLastPO () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceLastPO); if (bd == null) return Env.ZERO; return bd; } /** Set List Price. @param PriceList List Price */ public void setPriceList (BigDecimal PriceList) { set_Value (COLUMNNAME_PriceList, PriceList); ...
(Included) Amount for copyright, etc. */ public void setRoyaltyAmt (BigDecimal RoyaltyAmt) { set_Value (COLUMNNAME_RoyaltyAmt, RoyaltyAmt); } /** Get Royalty Amount. @return (Included) Amount for copyright, etc. */ public BigDecimal getRoyaltyAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_PO.java
1
请完成以下Java代码
public UUID getId() { return id; } public OrderStatus getStatus() { return status; } public BigDecimal getPrice() { return price; } public List<OrderItem> getOrderItems() { return Collections.unmodifiableList(orderItems); } @Override public int has...
} @Override public boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof Order)) return false; Order other = (Order) obj; return Objects.equals(id, other.id) && Objects.equals(orderItems, other.orderItems) && Objects.equals(price...
repos\tutorials-master\patterns-modules\ddd\src\main\java\com\baeldung\dddhexagonalspring\domain\Order.java
1
请完成以下Java代码
private List<DocLine_Inventory> loadLines(final I_M_Inventory inventory) { final InventoryId inventoryId = InventoryId.ofRepoId(inventory.getM_Inventory_ID()); return Services.get(IInventoryDAO.class) .retrieveLinesForInventoryId(inventoryId) .stream() .map(line -> new DocLine_Inventory(line, this)) ...
* Inventory * Inventory DR CR * InventoryDiff DR CR (or Charge) * </pre> */ private void createFactsForInventoryLine(final Fact fact, final DocLine_Inventory line) { final AcctSchema as = fact.getAcctSchema(); final CostAmount costs = line.getCreateCosts(as); // // Inv...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc_Inventory.java
1
请完成以下Java代码
private static void run(String args[]) throws Exception { MessageDigest digest = MessageDigest.getInstance("SHA1"); digest.digest(new byte[256]); byte[] dummy = digest.digest(); int hashLen = dummy.length; long size = Long.parseLong(args[1]); MappedByteBuffer shm = crea...
System.out.printf("%d iteractions run. matches=%d, mismatches=%d\n", iterations, matchCount, mismatchCount); } private static MappedByteBuffer createSharedMemory(String path, long size) { try (FileChannel fc = (FileChannel) Files.newByteChannel( new File(path).toPath(), EnumSet.of(...
repos\tutorials-master\core-java-modules\core-java-sun\src\main\java\com\baeldung\sharedmem\ConsumerAppWithSpinLock.java
1
请在Spring Boot框架中完成以下Java代码
public OAuth2TokenValidatorResult validate(Jwt jwt) { Collection<OAuth2Error> errors = new ArrayList<>(); LogoutTokenClaimAccessor logoutClaims = jwt::getClaims; Map<String, Object> events = logoutClaims.getEvents(); if (events == null) { errors.add(invalidLogoutToken("events claim must not be null")); } ...
errors.add(invalidLogoutToken("iat claim must not be null")); } String jwtId = logoutClaims.getId(); if (jwtId == null) { errors.add(invalidLogoutToken("jti claim must not be null")); } if (logoutClaims.getSubject() == null && logoutClaims.getSessionId() == null) { errors.add(invalidLogoutToken("sub a...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\oauth2\client\OidcBackChannelLogoutTokenValidator.java
2
请完成以下Java代码
public class X_M_AttributeSet_IncludedTab extends org.compiere.model.PO implements I_M_AttributeSet_IncludedTab, org.compiere.model.I_Persistent { private static final long serialVersionUID = 777904131L; /** Standard Constructor */ public X_M_AttributeSet_IncludedTab (final Properties ctx, final int M_Attri...
public void setM_AttributeSet_ID (final int M_AttributeSet_ID) { if (M_AttributeSet_ID < 0) set_ValueNoCheck (COLUMNNAME_M_AttributeSet_ID, null); else set_ValueNoCheck (COLUMNNAME_M_AttributeSet_ID, M_AttributeSet_ID); } @Override public int getM_AttributeSet_ID() { return get_ValueAsInt(COLUMNNAM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeSet_IncludedTab.java
1
请完成以下Java代码
public String getRmtId() { return rmtId; } /** * Sets the value of the rmtId property. * * @param value * allowed object is * {@link String } * */ public void setRmtId(String value) { this.rmtId = value; } /** * Gets the value o...
* allowed object is * {@link String } * */ public void setRmtLctnElctrncAdr(String value) { this.rmtLctnElctrncAdr = value; } /** * Gets the value of the rmtLctnPstlAdr property. * * @return * possible object is * {@link NameAndAddress10...
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\RemittanceLocation2.java
1
请完成以下Java代码
protected void makeDecisionsConsistentWithPersistedVersions(ParsedDeployment parsedDeployment) { for (DecisionEntity decision : parsedDeployment.getAllDecisions()) { DecisionEntity persistedDecision = dmnDeploymentHelper.getPersistedInstanceOfDecision(decision); if (persistedDecision !=...
this.dmnDeploymentHelper = dmnDeploymentHelper; } public CachingAndArtifactsManager getCachingAndArtifcatsManager() { return cachingAndArtifactsManager; } public void setCachingAndArtifactsManager(CachingAndArtifactsManager manager) { this.cachingAndArtifactsManager = manager; } ...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\deployer\DmnDeployer.java
1
请完成以下Java代码
private void loadIfNeeded() { if (loaded) { return; } load(); loaded = true; } private void load() { // // Load the HU // NOTE: instead of getting the HU by using huStorage.getM_HU() we are loading it directly because the huStorage's transaction is already closed, // and our ModelCacheServic...
productIds = CollectionUtils.asSet(huStorage.getM_Product_ID()); bpartnerIds = huSegment.getBpartnerIds(); locatorIds = huSegment.getLocatorIds(); } @Override public Set<Integer> getProductIds() { loadIfNeeded(); return productIds; } @Override public Set<Integer> getBpartnerIds() { loadIfNeeded(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\segments\ShipmentScheduleSegmentFromHUStorage.java
1
请完成以下Java代码
public static void main(String[] args) { SpringApplication.run(StartApplication.class, args); } @Autowired BookRepository bookRepository; @Bean public CommandLineRunner startup() { return args -> { Book b1 = new Book("Book A", BigDecimal.valueOf(9....
BigDecimal.valueOf(29.99), LocalDate.of(2023, 6, 10)); Book b4 = new Book("Book D", BigDecimal.valueOf(39.99), LocalDate.of(2023, 5, 5)); Book b5 = new Book("Book E", BigDecimal.valueOf(49.99), Lo...
repos\spring-boot-master\spring-data-jpa-paging-sorting\src\main\java\com\mkyong\StartApplication.java
1
请完成以下Java代码
private void weightHU(@NonNull final HuId huId, @NonNull final BigDecimal weightGross) { if (weightGross.signum() < 0) { throw new AdempiereException("Invalid weightGross: " + weightGross) .setParameter("huId", huId); } final I_M_HU hu = handlingUnitsBL.getById(huId); final IMutableHUContext huConte...
} final PPOrderIssueSchedule issueScheduleChanged = issueSchedule.withSeqNo(newSeqNo); issueScheduleRepository.saveChanges(issueScheduleChanged); return issueScheduleChanged; } public void updateQtyToIssue( @NonNull final PPOrderIssueScheduleId issueScheduleId, @NonNull final Quantity qtyToIssue) { f...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\issue_schedule\PPOrderIssueScheduleService.java
1
请完成以下Java代码
public class ManagerInfo extends Manager implements Serializable { private static final long serialVersionUID = 1L; /** * 状态 */ private String stateStr; /** * 所属项目id列表(逗号分隔) */ private String pids; /** * 所属项目名列表(逗号分隔) */ private String pnames; /** * 所...
@Override public String toString() { return "username:" + getUsername() + "|name=" + getName(); } public String getStateStr() { return stateStr; } public void setStateStr(String stateStr) { this.stateStr = stateStr; } public String getPids() { return pids; ...
repos\SpringBootBucket-master\springboot-jwt\src\main\java\com\xncoding\jwt\model\ManagerInfo.java
1
请完成以下Java代码
public List<List<Object>> getCartesianProductRecursive(List<List<Object>> sets) { List<List<Object>> result = new ArrayList<>(); getCartesianProductRecursiveHelper(sets, 0, new ArrayList<>(), result); return result; } private void getCartesianProductRecursiveHelper(List<List<Object>> se...
if(index == sets.size()) { List<Object> emptyList = new ArrayList<>(); return Stream.of(emptyList); } List<Object> currentSet = sets.get(index); return currentSet.stream().flatMap(element -> cartesianProduct(sets, index+1) .map(list -> { List<O...
repos\tutorials-master\core-java-modules\core-java-collections-set-2\src\main\java\com\baeldung\cartesianproduct\CartesianProduct.java
1
请完成以下Java代码
public boolean isEmpty() { return this.session.getAttributeNames().isEmpty(); } @Override public boolean containsKey(Object key) { return key instanceof String && this.session.getAttributeNames().contains(key); } @Override public boolean containsValue(Object value) { return this.session.getAttrib...
@Override public boolean hasNext() { return this.i.hasNext(); } @Override public Object next() { return this.i.next().getValue(); } @Override public void remove() { this.i.remove(); } }; } @Override public int size() { return SpringSessionMa...
repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\server\session\SpringSessionWebSessionStore.java
1
请在Spring Boot框架中完成以下Java代码
public class ProcessDefinitionDecisionCollectionResource extends BaseProcessDefinitionResource { @ApiOperation(value = "List decisions for a process-definition", nickname = "listProcessDefinitionDecisions", tags = { "Process Definitions" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "In...
* @deprecated */ @Deprecated @ApiOperation(value = "List decision tables for a process-definition", nickname = "listProcessDefinitionDecisionTables", tags = { "Process Definitions" }) @ApiResponses(value = { @ApiResponse(code = 200, message = "Indicates the process definition was found and ...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\repository\ProcessDefinitionDecisionCollectionResource.java
2
请完成以下Java代码
public class CamundaVariableOnPartImpl extends CmmnModelElementInstanceImpl implements CamundaVariableOnPart { protected static Attribute<String> camundaVariableNameAttribute; protected static ChildElement<CamundaVariableTransitionEvent> camundaVariableEventChild; public CamundaVariableOnPartImpl(ModelTypeIn...
public void setVariableName(String name) { camundaVariableNameAttribute.setValue(this, name); } public VariableTransition getVariableEvent() { CamundaVariableTransitionEvent child = camundaVariableEventChild.getChild(this); return child.getValue(); } public void setVariableEvent(VariableTransitio...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\camunda\CamundaVariableOnPartImpl.java
1
请完成以下Java代码
private AvailableForSalesConfig retrieveConfigRecord(@NonNull final ConfigQuery query) { final I_MD_AvailableForSales_Config configRecord = Services.get(IQueryBL.class) .createQueryBuilder(I_MD_AvailableForSales_Config.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_MD_AvailableForSales_Config.CO...
} return AvailableForSalesConfig .builder() .featureEnabled(configRecord.isFeatureActivated()) .insufficientQtyAvailableForSalesColorId(ColorId.ofRepoId(configRecord.getInsufficientQtyAvailableForSalesColor_ID())) .salesOrderLookBehindHours(configRecord.getSalesOrderLookBehindHours()) .shipmentDa...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\availableforsales\AvailableForSalesConfigRepo.java
1
请在Spring Boot框架中完成以下Java代码
public String getScopeId() { return scopeId; } public String getScopeDefinitionId() { return scopeDefinitionId; } public String getSubScopeId() { return subScopeId; } public String getScopeType() { return scopeType; } public Date getFromDate() { ...
public long getToLogNumber() { return toLogNumber; } @Override public long executeCount(CommandContext commandContext) { return taskServiceConfiguration.getHistoricTaskLogEntryEntityManager().findHistoricTaskLogEntriesCountByQueryCriteria(this); } @Override public List<Historic...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\HistoricTaskLogEntryQueryImpl.java
2
请在Spring Boot框架中完成以下Java代码
public void setId(Long id) { this.id = id; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getFirstName() { return firstName; } public void setFirstName...
} public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } }
repos\tutorials-master\patterns-modules\design-patterns-architectural\src\main\java\com\baeldung\repositoryvsdaopattern\User.java
2
请完成以下Java代码
public int getMSV3_BestellungAntwort_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_MSV3_BestellungAntwort_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Id. @param MSV3_Id Id */ @Override public void setMSV3_Id (java.lang.String MSV3_Id) { set_Value (COLUMNNAME_MSV3_Id, MSV3...
{ set_Value (COLUMNNAME_MSV3_NachtBetrieb, Boolean.valueOf(MSV3_NachtBetrieb)); } /** Get NachtBetrieb. @return NachtBetrieb */ @Override public boolean isMSV3_NachtBetrieb () { Object oo = get_Value(COLUMNNAME_MSV3_NachtBetrieb); if (oo != null) { if (oo instanceof Boolean) return ((Boole...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_BestellungAntwort.java
1
请完成以下Java代码
public List<I_M_MatchPO> getByInvoiceId(@NonNull final InvoiceId invoiceId) { final String sql = "SELECT * FROM M_MatchPO mi" + " INNER JOIN C_InvoiceLine il ON (mi.C_InvoiceLine_ID=il.C_InvoiceLine_ID) " + "WHERE il.C_Invoice_ID=?"; final List<Object> sqlParams = Arrays.asList(invoiceId); PreparedStatem...
@Override public List<I_M_MatchPO> getByOrderLineId(final OrderLineId orderLineId) { if (orderLineId == null) { return ImmutableList.of(); } return Services.get(IQueryBL.class) .createQueryBuilder(I_M_MatchPO.class) .addEqualsFilter(I_M_MatchPO.COLUMN_C_OrderLine_ID, orderLineId) .orderBy(I_M_...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\impl\MatchPODAO.java
1
请在Spring Boot框架中完成以下Java代码
public class DAMOU1 { @XmlElement(name = "DOCUMENTID", required = true) protected String documentid; @XmlElement(name = "LINENUMBER", required = true) protected String linenumber; @XmlElement(name = "AMOUNTQUAL", required = true) protected String amountqual; @XmlElement(name = "AMOUNT") ...
* Gets the value of the amount property. * * @return * possible object is * {@link String } * */ public String getAMOUNT() { return amount; } /** * Sets the value of the amount property. * * @param value * allowed object is *...
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\DAMOU1.java
2
请在Spring Boot框架中完成以下Java代码
public class SpringbootRedisApplication { private static final Logger LOGGER = LoggerFactory.getLogger(SpringbootRedisApplication.class); @Bean RedisMessageListenerContainer container(RedisConnectionFactory connectionFactory, MessageListenerAdapter listenerAdapter) { RedisMessageListenerContainer con...
StringRedisTemplate template = ctx.getBean(StringRedisTemplate.class); CountDownLatch latch = ctx.getBean(CountDownLatch.class); LOGGER.info("Sending message..."); template.convertAndSend("chat", "Hello from Redis!"); latch.await(); System.exit(0); } /** * 2017-04-20 17:25:15.536 INFO 39148 --- [ ...
repos\SpringBootLearning-master\springboot-redis-message\src\main\java\com\forezp\SpringbootRedisApplication.java
2
请完成以下Java代码
public boolean isDetached() { return externalTask.getExecutionId() == null; } @Override public void detachState() { externalTask.getExecution().removeExternalTask(externalTask); externalTask.setExecution(null); } @Override public void attachState(MigratingScopeInstance owningInstance) { Ex...
externalTask.setActivityId(targetActivity.getId()); externalTask.setProcessDefinitionId(targetProcessDefinition.getId()); externalTask.setProcessDefinitionKey(targetProcessDefinition.getKey()); } public String getId() { return externalTask.getId(); } public ScopeImpl getTargetScope() { return ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingExternalTaskInstance.java
1
请完成以下Java代码
public void writeHeaders(HttpServletRequest request, HttpServletResponse response) { if (!response.containsHeader(REFERRER_POLICY_HEADER)) { response.setHeader(REFERRER_POLICY_HEADER, this.policy.getPolicy()); } } public enum ReferrerPolicy { NO_REFERRER("no-referrer"), NO_REFERRER_WHEN_DOWNGRADE("no-re...
static { Map<String, ReferrerPolicy> referrerPolicies = new HashMap<>(); for (ReferrerPolicy referrerPolicy : values()) { referrerPolicies.put(referrerPolicy.getPolicy(), referrerPolicy); } REFERRER_POLICIES = Collections.unmodifiableMap(referrerPolicies); } private final String policy; Referrer...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\header\writers\ReferrerPolicyHeaderWriter.java
1
请完成以下Java代码
public void initialize() { this.scheduledExecutorService = Executors.newSingleThreadScheduledExecutor(new BasicThreadFactory.Builder().namingPattern(threadName).build()); this.changeDetectionRunnable = createChangeDetectionRunnable(); this.scheduledExecutorService.scheduleAtFixedRate(this.change...
} public String getThreadName() { return threadName; } public void setThreadName(String threadName) { this.threadName = threadName; } public Runnable getChangeDetectionRunnable() { return changeDetectionRunnable; } public void setChangeDetectionRunnable(Runnable chang...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\management\DefaultEventRegistryChangeDetectionExecutor.java
1
请完成以下Java代码
public String getId() { // membership doesn't have an id, returning a fake one to make the internals work return userId + groupId; } @Override public void setId(String id) { // membership doesn't have an id } @Override public String getUserId() { return userId; ...
public void setUserId(String userId) { this.userId = userId; } @Override public String getGroupId() { return groupId; } @Override public void setGroupId(String groupId) { this.groupId = groupId; } }
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\persistence\entity\MembershipEntityImpl.java
1
请完成以下Java代码
public AuthorizationQuery resourceType(int resourceType) { this.resourceType = resourceType; queryByResourceType = true; return this; } public AuthorizationQuery resourceId(String resourceId) { this.resourceId = resourceId; return this; } public AuthorizationQuery hasPermission(Permission ...
} public boolean isQueryByPermission() { return queryByPermission; } public String[] getUserIds() { return userIds; } public String[] getGroupIds() { return groupIds; } public int getResourceType() { return resourceType; } public String getResourceId() { return resourceId; }...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\AuthorizationQueryImpl.java
1
请完成以下Java代码
public VariableType getResult(ResultSet rs, String columnName) throws SQLException { String typeName = rs.getString(columnName); VariableType type = getVariableTypes().getVariableType(typeName); if (type == null && typeName != null) { throw new ActivitiException("unknown variable typ...
if (variableTypes == null) { variableTypes = Context.getProcessEngineConfiguration().getVariableTypes(); } return variableTypes; } public VariableType getResult(ResultSet resultSet, int columnIndex) throws SQLException { String typeName = resultSet.getString(columnIndex); ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\db\IbatisVariableTypeHandler.java
1
请完成以下Java代码
private void audit(final OPERATION operation) { setOperation(operation); setTimestamp((new Date()).getTime()); } public enum OPERATION { INSERT, UPDATE, DELETE; private String value; OPERATION() { value = toString(); } public static OPERATIO...
for (final OPERATION op : OPERATION.values()) { if (op.getValue().equals(value)) { operation = op; break; } } return operation; } public String getValue() { return value; } } }
repos\tutorials-master\persistence-modules\spring-data-jpa-enterprise\src\main\java\com\baeldung\boot\domain\Bar.java
1
请完成以下Java代码
public void adjustPage() { if (totalCount <= 0) { totalCount = 0; } if (pageSize <= 0) { pageSize = DEF_COUNT; } if (pageNo <= 0) { pageNo = 1; } if ((pageNo - 1) * pageSize >= totalCount) { pageNo = totalCount / pageSize; } } public int getPageNo() { return pageNo; } public int getP...
protected int pageSize = 20; protected int pageNo = 1; public void setTotalCount(int totalCount) { this.totalCount = totalCount; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } public void setPageNo(int pageNo) { this.pageNo = pageNo; } protected int filterNo; public int get...
repos\springboot-demo-master\elasticsearch\src\main\java\demo\et59\elaticsearch\page\SimplePage.java
1
请在Spring Boot框架中完成以下Java代码
private ImmutableList<PickingJob> executeInTrx() { final ImmutableList.Builder<PickingJob> result = ImmutableList.builder(); for (final PickingJob initialPickingJob : initialPickingJobs) { final PickingJob pickingJob = execute(initialPickingJob); result.add(pickingJob); } return result.build(); } pr...
return pickingJob; } // private PickingJob unpickAllStepsAndSave(final PickingJob pickingJob) // { // return PickingJobUnPickCommand.builder() // .pickingJobRepository(pickingJobRepository) // .pickingCandidateService(pickingCandidateService) // .pickingJob(pickingJob) // .build() // .execute(...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\commands\PickingJobAbortCommand.java
2
请完成以下Java代码
public void setEmployeeNumber(String no) { ((InetOrgPerson) this.instance).employeeNumber = no; } public void setDestinationIndicator(String destination) { ((InetOrgPerson) this.instance).destinationIndicator = destination; } public void setHomePhone(String homePhone) { ((InetOrgPerson) this.instance...
((InetOrgPerson) this.instance).postalCode = postalCode; } public void setPostalAddress(String postalAddress) { ((InetOrgPerson) this.instance).postalAddress = postalAddress; } public void setMobile(String mobile) { ((InetOrgPerson) this.instance).mobile = mobile; } public void setHomePostalAddress...
repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\userdetails\InetOrgPerson.java
1
请完成以下Java代码
public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else set_Value (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setQ...
@Override public void setQtyDeliveredInUOM (final BigDecimal QtyDeliveredInUOM) { set_Value (COLUMNNAME_QtyDeliveredInUOM, QtyDeliveredInUOM); } @Override public BigDecimal getQtyDeliveredInUOM() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyDeliveredInUOM); return bd != null ? bd : BigDecim...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_DesadvLine_InOutLine.java
1
请完成以下Java代码
public HUConsolidationJob closeTarget(@NonNull final HUConsolidationJobId jobId, @NonNull final UserId callerId) { return jobRepository.updateById(jobId, job -> { job.assertUserCanEdit(callerId); return targetCloser.closeTarget(job); }); } public void printTargetLabel(@NonNull final HUConsolidationJobId j...
.pickingSlotService(pickingSlotService) .request(request) .build() .execute(); } public JsonHUConsolidationJobPickingSlotContent getPickingSlotContent(final HUConsolidationJobId jobId, final PickingSlotId pickingSlotId) { return GetPickingSlotContentCommand.builder() .jobRepository(jobRepository) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\job\HUConsolidationJobService.java
1
请完成以下Java代码
private Map<BPartnerLocationId, BPartnerLocationId> getBPartnerLocationIdMap(final int bpartnerId) { final Map<BPartnerLocationId, GLN> oldLocationToGlnMap = getOldLocationIdToGlnMap(); final Map<GLN, BPartnerLocationId> glnToNewLocationMap = getGlnToNewLocationMap(bpartnerId); oldLocationToGlnMap.forEach((oldL...
{ final OLCandUpdateResult result = olCandUpdateBL.updateOLCands(getCtx(), createIterator(), params); return "@Success@: " + result.getUpdated() + " @Processed@, " + result.getSkipped() + " @Skipped@"; } private Iterator<I_C_OLCand> createIterator() { return createQueryBuilder() .create() .setRequire...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\process\C_OLCand_SetOverrideValues.java
1
请完成以下Java代码
protected Map<Integer, I_M_HU> retrieveModelsByParent(I_M_HU_Item huItem) { return query(I_M_HU.class) .addEqualsFilter(I_M_HU.COLUMN_M_HU_Item_Parent_ID, huItem.getM_HU_Item_ID()) .create() .mapById(I_M_HU.class); } /** * Recursively collect all M_HU_IDs and M_HU_Item_IDs starting from <code>startH...
final List<Integer> huItemIdsList = Services.get(IQueryBL.class) .createQueryBuilder(I_M_HU_Item.class, getContext()) .addInArrayOrAllFilter(I_M_HU_Item.COLUMN_M_HU_ID, huIds) .create() .listIds(); return new HashSet<>(huItemIdsList); } private final Set<Integer> retrieveIncludedM_HUIds(final Set<I...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\snapshot\impl\M_HU_SnapshotHandler.java
1
请完成以下Java代码
final class DefaultClientResponseField implements ClientResponseField { private final DefaultClientGraphQlResponse response; private final ResponseField field; DefaultClientResponseField(DefaultClientGraphQlResponse response, ResponseField field) { this.response = response; this.field = field; } @Overrid...
public <D> List<D> toEntityList(Class<D> elementType) { List<D> list = toEntity(ResolvableType.forClassWithGenerics(List.class, elementType)); return (list != null) ? list : Collections.emptyList(); } @Override public <D> List<D> toEntityList(ParameterizedTypeReference<D> elementType) { List<D> list = toEntit...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\client\DefaultClientResponseField.java
1
请完成以下Java代码
public void setIsSummary (boolean IsSummary) { set_Value (COLUMNNAME_IsSummary, Boolean.valueOf(IsSummary)); } /** Get Zusammenfassungseintrag. @return This is a summary entity */ @Override public boolean isSummary () { Object oo = get_Value(COLUMNNAME_IsSummary); if (oo != null) { if (oo inst...
return ii.intValue(); } /** Set Browse name. @param WEBUI_NameBrowse Browse name */ @Override public void setWEBUI_NameBrowse (java.lang.String WEBUI_NameBrowse) { set_Value (COLUMNNAME_WEBUI_NameBrowse, WEBUI_NameBrowse); } /** Get Browse name. @return Browse name */ @Override public java.lang.Str...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Menu.java
1
请完成以下Java代码
public void setFact_Acct_ID (int Fact_Acct_ID) { if (Fact_Acct_ID < 1) set_ValueNoCheck (COLUMNNAME_Fact_Acct_ID, null); else set_ValueNoCheck (COLUMNNAME_Fact_Acct_ID, Integer.valueOf(Fact_Acct_ID)); } /** Get Accounting Fact. @return Accounting Fact */ @Override public int getFact_Acct_ID () {...
{ set_Value (COLUMNNAME_Line, Integer.valueOf(Line)); } /** Get Zeile Nr.. @return Unique line for this document */ @Override public int getLine () { Integer ii = (Integer)get_Value(COLUMNNAME_Line); if (ii == null) return 0; return ii.intValue(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_TaxDeclarationAcct.java
1
请在Spring Boot框架中完成以下Java代码
PackingItem createNewState() { return root.copy(); } @Override protected final PackingItem getDelegate() { final PackingItem state = getStateOrNull(); if (state != null) { return state; } return root; } /** * @return * <ul> * <li>the {@link PackingItem} as it is in current trans...
* @param state */ public void commit(final PackingItem state) { root.updateFrom(state); } /** * Creates a new instance which wraps a copy of this instances {@link #getDelegate()} value. */ @Override public IPackingItem copy() { return new TransactionalPackingItem(this); } @Override public boolean ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\picking\service\TransactionalPackingItem.java
2
请完成以下Java代码
public static PackageableRowsData cast(final IRowsData<PackageableRow> rowsData) { return (PackageableRowsData)rowsData; } public static final PackageableRowsData EMPTY = new PackageableRowsData(ImmutableList::of); private final ExtendedMemorizingSupplier<Map<DocumentId, PackageableRow>> topLevelRows; private...
@Override public void invalidateAll() { topLevelRows.forget(); } @Override public DocumentIdsSelection getDocumentIdsToInvalidate(final TableRecordReferenceSet recordRefs) { return recordRefs.streamIds(I_M_ShipmentSchedule.Table_Name, ShipmentScheduleId::ofRepoId) .flatMap(this::streamDocumentIdsForShipm...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\packageable\PackageableRowsData.java
1
请在Spring Boot框架中完成以下Java代码
public static class IssueTo { @NonNull String issueStepId; @NonNull String huQRCode; @Nullable BigDecimal huWeightGrossBeforeIssue; @NonNull BigDecimal qtyIssued; @Nullable BigDecimal qtyRejected; @Nullable String qtyRejectedReasonCode; } @Nullable IssueTo issueTo; @Value @Builder @Jacksonized publ...
@Builder @Jacksonized private JsonManufacturingOrderEvent( @NonNull final String wfProcessId, @NonNull final String wfActivityId, // @Nullable final IssueTo issueTo, @Nullable final ReceiveFrom receiveFrom, @Nullable final PickTo pickTo) { if (CoalesceUtil.countNotNulls(issueTo, receiveFrom) != 1...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\rest_api\json\JsonManufacturingOrderEvent.java
2
请完成以下Java代码
public BootstrapConfig getBootstrapConfigByEndpoint(String endpoint) { return bootstrapConfigStore.getAll().get(endpoint); } public SecurityInfo addValueToStore(TbLwM2MSecurityInfo store, String endpoint) { /* add value to store from BootstrapJson */ SecurityInfo securityInfo = null; ...
bootstrapConfigStore.remove(config); } } bootstrapConfigStore.add(endpoint, bsConfigNew); } catch (InvalidConfigurationException e) { if (e.getMessage().contains("Psk identity") && e.getMessage().contains("already used f...
repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\bootstrap\store\LwM2MBootstrapSecurityStore.java
1
请在Spring Boot框架中完成以下Java代码
public class M_Inventory { public static final AdMessageKey MSG_WEBUI_ADD_VIRTUAL_INV_NOT_ALLOWED = AdMessageKey.of("MSG_WEBUI_ADD_VIRTUAL_INV_NOT_ALLOWED"); public M_Inventory() { final IProgramaticCalloutProvider programaticCalloutProvider = Services.get(IProgramaticCalloutProvider.class); programaticCalloutP...
} // DocumentNo if (documentNoInfo.isDocNoControlled()) { inventoryRecord.setDocumentNo(documentNoInfo.getDocumentNo()); } } private I_C_DocType getDocTypeOrNull(final I_M_Inventory inventoryRecord) { final DocTypeId docTypeId = DocTypeId.ofRepoIdOrNull(inventoryRecord.getC_DocType_ID()); return doc...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inventory\callout\M_Inventory.java
2
请完成以下Java代码
public int hashCode() { return Objects.hash(userRolePermissionsKey, adLanguage); } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj instanceof MenuTreeKey) { final MenuTreeKey other = (MenuTreeKey)obj; return Objects.equals(userRolePe...
{ menuIds.remove(adMenuId); } } public static class Builder { private UserId adUserId; private final Set<Integer> menuIds = new HashSet<>(); private Builder() { } public MenuTreeRepository.UserMenuFavorites build() { return new UserMenuFavorites(this); } public Builder ad...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\menu\MenuTreeRepository.java
1
请完成以下Java代码
public boolean isSameDeployment() { return sameDeployment; } public void setSameDeployment(boolean sameDeployment) { this.sameDeployment = sameDeployment; } public String getValidateFormFields() { return validateFormFields; } public void setValidateFormFields(String va...
@Override public List<Criterion> getExitCriteria() { return exitCriteria; } @Override public void setExitCriteria(List<Criterion> exitCriteria) { this.exitCriteria = exitCriteria; } public String getBusinessStatus() { return businessStatus; } public void setBus...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\Stage.java
1
请完成以下Java代码
public static Vertex newPlaceInstance(String realWord, int frequency) { return new Vertex(Predefine.TAG_PLACE, realWord, new CoreDictionary.Attribute(Nature.ns, frequency)); } /** * 创建一个机构名实例 * * @param realWord * @param frequency * @return */ public static Vertex ...
return new Vertex(Predefine.TAG_BIGIN, " ", new CoreDictionary.Attribute(Nature.begin, Predefine.TOTAL_FREQUENCY / 10), CoreDictionary.getWordID(Predefine.TAG_BIGIN)); } /** * 生成线程安全的终止节点 * @return */ public static Vertex newE() { return new Vertex(Predefine.TAG_END, " ", new Cor...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\common\Vertex.java
1
请完成以下Java代码
public class PmsFeightTemplate implements Serializable { private Long id; private String name; @ApiModelProperty(value = "计费类型:0->按重量;1->按件数") private Integer chargeType; @ApiModelProperty(value = "首重kg") private BigDecimal firstWeight; @ApiModelProperty(value = "首费(元)") private BigD...
public BigDecimal getFirstFee() { return firstFee; } public void setFirstFee(BigDecimal firstFee) { this.firstFee = firstFee; } public BigDecimal getContinueWeight() { return continueWeight; } public void setContinueWeight(BigDecimal continueWeight) { this.cont...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsFeightTemplate.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setC_CompensationGroup_Schema_Category_ID (final int C_CompensationGroup_Schema_Category_ID) { if (C_CompensationGroup_Schema_Category_ID < 1) set_ValueNoCheck...
} @Override public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } @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); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CompensationGroup_Schema_Category.java
1
请完成以下Java代码
public class AlipayConfig implements Serializable { @Id @Column(name = "config_id") @ApiModelProperty(value = "ID", hidden = true) private Long id; @NotBlank @ApiModelProperty(value = "应用ID") private String appId; @NotBlank @ApiModelProperty(value = "商户私钥") private String priv...
@ApiModelProperty(value = "异步通知地址") private String notifyUrl; @NotBlank @ApiModelProperty(value = "订单完成后返回的页面") private String returnUrl; @ApiModelProperty(value = "类型") private String format="JSON"; @NotBlank @ApiModelProperty(value = "商户号") private String sysServiceProviderId; ...
repos\eladmin-master\eladmin-tools\src\main\java\me\zhengjie\domain\AlipayConfig.java
1
请完成以下Java代码
public Quantity getQtyRejected() { return pickFroms.getQtyRejected().orElseGet(qtyToPick::toZero); } public PickingJobStep reduceWithPickedEvent( @NonNull PickingJobStepPickFromKey key, @NonNull PickingJobStepPickedTo pickedTo) { return withChangedPickFroms(pickFroms -> pickFroms.reduceWithPickedEvent(ke...
public PickingJobStepPickFrom getPickFromByHUQRCode(@NonNull final HUQRCode qrCode) { return pickFroms.getPickFromByHUQRCode(qrCode); } @NonNull public List<HuId> getPickedHUIds() { return pickFroms.getPickedHUIds(); } @NonNull public Optional<PickingJobStepPickedToHU> getLastPickedHU() { return pickFr...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJobStep.java
1
请完成以下Java代码
public void setGap (int rowGap, int colGap) { m_rowGap = rowGap; m_colGap = colGap; } // setGap /************************************************************************** * Layout & Calculate Image Size. * Set p_width & p_height * @return true if calculated */ protected boolean calculateSize() {...
{ Point2D.Double location = getAbsoluteLocation(pageStart); float y = (float)location.y; // for (int row = 0; row < m_rows; row++) { float x = (float)location.x; for (int col = 0; col < m_cols; col++) { if (m_textLayout[row][col] != null) { float yy = y + m_textLayout[row][col].getAscent...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\GridElement.java
1
请完成以下Java代码
public static class AsyncBuilder extends AbstractBuilder<AsyncBuilder> { protected @Nullable AsyncPredicate<ServerWebExchange> predicate; @Override protected AsyncBuilder getThis() { return this; } @Override public AsyncPredicate<ServerWebExchange> getPredicate() { Objects.requireNonNull(this.predi...
public static class Builder extends AbstractBuilder<Builder> { protected @Nullable Predicate<ServerWebExchange> predicate; @Override protected Builder getThis() { return this; } @Override public AsyncPredicate<ServerWebExchange> getPredicate() { return ServerWebExchangeUtils.toAsyncPredicate(this.p...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\route\Route.java
1
请完成以下Java代码
public int getDD_OrderLine_ID() { return get_ValueAsInt(COLUMNNAME_DD_OrderLine_ID); } @Override public void setM_HU_Reservation_ID (final int M_HU_Reservation_ID) { if (M_HU_Reservation_ID < 1) set_ValueNoCheck (COLUMNNAME_M_HU_Reservation_ID, null); else set_ValueNoCheck (COLUMNNAME_M_HU_Reservat...
set_Value (COLUMNNAME_QtyReserved, QtyReserved); } @Override public BigDecimal getQtyReserved() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyReserved); return bd != null ? bd : BigDecimal.ZERO; } @Override public de.metas.handlingunits.model.I_M_HU getVHU() { return get_ValueAsPO(COLUMNN...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Reservation.java
1
请在Spring Boot框架中完成以下Java代码
public Result<AiragMcp> queryById(@RequestParam(name = "id", required = true) String id) { AiragMcp airagMcp = airagMcpService.getById(id); if (airagMcp == null) { return Result.error("未找到对应数据"); } return Result.OK(airagMcp); } /** * 导出excel * * @param...
/** * 通过excel导入数据 * * @param request * @param response * @return */ // @RequiresPermissions("llm:airag_mcp:importExcel") @RequestMapping(value = "/importExcel", method = RequestMethod.POST) public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-module\jeecg-boot-module-airag\src\main\java\org\jeecg\modules\airag\llm\controller\AiragMcpController.java
2
请完成以下Java代码
public int read() throws IOException { return in().read(); } @Override public int read(byte[] b) throws IOException { return in().read(b); } @Override public int read(byte[] b, int off, int len) throws IOException { return in().read(b, off, len); } @Override public long skip(long n) throws IOException...
catch (IOException ex) { // Ignore } } @Override public synchronized void reset() throws IOException { in().reset(); } private InputStream in() throws IOException { InputStream in = this.in; if (in == null) { synchronized (this) { in = this.in; if (in == null) { in = getDelegateInputSt...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\net\protocol\jar\LazyDelegatingInputStream.java
1
请在Spring Boot框架中完成以下Java代码
public class Employee { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private int id; @Column(name = "name") private String name; @ManyToOne @Cascade(CascadeType.SAVE_UPDATE) @JoinColumn(name = "department_id") private Department department; ...
return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Department getDepartment() { return department; } public void setDepartment(Departm...
repos\tutorials-master\persistence-modules\hibernate-exceptions\src\main\java\com\baeldung\hibernate\exception\transientobject\entity\Employee.java
2
请完成以下Java代码
public void setTargetQty (java.math.BigDecimal TargetQty) { set_Value (COLUMNNAME_TargetQty, TargetQty); } /** Get Zielmenge. @return Target Movement Quantity */ @Override public java.math.BigDecimal getTargetQty () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TargetQty); if (bd == null) re...
@param Value Search key for the record in the format required - must be unique */ @Override public void setValue (java.lang.String Value) { throw new IllegalArgumentException ("Value is virtual column"); } /** Get Suchschlüssel. @return Search key for the record in the format required - must be unique ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_MovementLine.java
1
请完成以下Java代码
public Map<String, String> getInitParams() { Map<String, String> initParams = new HashMap<>(); if (enableSecureCookie) { // only add param if it's true; default is false initParams.put("enableSecureCookie", String.valueOf(enableSecureCookie)); } if (!enableSameSiteCookie) { // only add param if ...
} return initParams; } @Override public String toString() { return joinOn(this.getClass()) .add("enableSecureCookie='" + enableSecureCookie + '\'') .add("enableSameSiteCookie='" + enableSameSiteCookie + '\'') .add("sameSiteCookieOption='" + sameSiteCookieOption + '\'') .add("same...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\SessionCookieProperties.java
1
请完成以下Java代码
private ListenableFuture<Void> addToQueue(EdgeEventEntity entity) { return queue.add(entity); } @Override public PageData<EdgeEvent> findEdgeEvents(UUID tenantId, EdgeId edgeId, Long seqIdStart, Long seqIdEnd, TimePageLink pageLink) { return DaoUtil.toPageData( edgeEventRep...
seqIdEnd, DaoUtil.toPageable(pageLink, SORT_ORDERS))); } @Override public void cleanupEvents(long ttl) { partitioningRepository.dropPartitionsBefore(TABLE_NAME, ttl, TimeUnit.HOURS.toMillis(partitionSizeInHours)); } @Override public void createPartition(...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\edge\JpaBaseEdgeEventDao.java
1
请完成以下Java代码
public boolean isSuspended() { return SuspensionState.SUSPENDED.getStateCode() == suspensionState; } @Override public String getProcessDefinitionId() { return processDefinitionId; } public void setProcessDefinitionId(String processDefinitionId) { this.processDefinitionId = processDefinitionId; ...
public void setSuspensionState(int state) { this.suspensionState = state; } public Long getOverridingJobPriority() { return jobPriority; } public void setJobPriority(Long jobPriority) { this.jobPriority = jobPriority; } public String getTenantId() { return tenantId; } public void set...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\JobDefinitionEntity.java
1
请在Spring Boot框架中完成以下Java代码
public class SchedulerDao { private final IQueryBL queryBL = Services.get(IQueryBL.class); @NonNull public Optional<I_AD_Scheduler> getSchedulerByProcessIdIfUnique(@NonNull final AdProcessId processId) { final List<I_AD_Scheduler> records = queryBL.createQueryBuilder(I_AD_Scheduler.class) .addEqualsFilter(I_...
} return Optional.of(records.get(0)); } @NonNull public I_AD_Scheduler getById(@NonNull final AdSchedulerId adSchedulerId) { return InterfaceWrapperHelper.load(adSchedulerId, I_AD_Scheduler.class); } public void save(@NonNull final I_AD_Scheduler scheduler) { InterfaceWrapperHelper.save(scheduler); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\scheduler\SchedulerDao.java
2
请完成以下Java代码
public class RandomHexGenerator { public String generateUnboundedRandomHexUsingRandomNextInt() { Random random = new Random(); int randomInt = random.nextInt(); return Integer.toHexString(randomInt); } public String generateRandomHexUsingRandomNextIntWithInRange(int lower, int uppe...
public String generateRandomHexWithCommonsMathRandomDataGenerator(int len) { RandomDataGenerator randomDataGenerator = new RandomDataGenerator(); return randomDataGenerator.nextHexString(len); } public String generateSecureRandomHexWithCommonsMathRandomDataGenerator(int len) { RandomDat...
repos\tutorials-master\core-java-modules\core-java-hex\src\main\java\com\baeldung\randomhexnumber\RandomHexGenerator.java
1
请完成以下Java代码
private boolean containsInvalidUrlEncodedSlash(String uri) { if (this.allowUrlEncodedSlash || uri == null) { return false; } return uri.contains("%2f") || uri.contains("%2F"); } /** * Checks whether a path is normalized (doesn't contain path traversal sequences like * "./", "/../" or "/.") * @param pa...
for (int i = path.length(); i > 0;) { int slashIndex = path.lastIndexOf('/', i - 1); int gap = i - slashIndex; if (gap == 2 && path.charAt(slashIndex + 1) == '.') { // ".", "/./" or "/." return false; } if (gap == 3 && path.charAt(slashIndex + 1) == '.' && path.charAt(slashIndex + 2) == '.') { ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\firewall\DefaultHttpFirewall.java
1
请完成以下Java代码
public class WEBUI_C_OrderLineSO_Delete_HUReservation extends HUEditorProcessTemplate implements IProcessPrecondition { private final HUReservationService huReservationService = SpringContextHolder.instance.getBean(HUReservationService.class); private final SalesOrderLineRepository salesOrderLineRepository = Spri...
} private Quantity retrieveUnreservableQuantity(final ProductId productId) { final RetrieveHUsQtyRequest request = WEBUI_C_OrderLineSO_Util.createHuQuantityRequest( streamSelectedHUIds(Select.ALL), productId); return huReservationService.retrieveUnreservableQty(request); } @Override @RunOutOfTrx // the s...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\sales\hu\reservation\process\WEBUI_C_OrderLineSO_Delete_HUReservation.java
1
请完成以下Java代码
public int getM_DiscountSchema_ID() { return get_ValueAsInt(COLUMNNAME_M_DiscountSchema_ID); } @Override public void setM_DiscountSchemaBreak_V_ID (final int M_DiscountSchemaBreak_V_ID) { if (M_DiscountSchemaBreak_V_ID < 1) set_ValueNoCheck (COLUMNNAME_M_DiscountSchemaBreak_V_ID, null); else set_Va...
} @Override public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DiscountSchemaBreak_V.java
1
请在Spring Boot框架中完成以下Java代码
final class RegisterMissingBeanPostProcessor implements BeanDefinitionRegistryPostProcessor, BeanFactoryAware { private final AnnotationBeanNameGenerator beanNameGenerator = new AnnotationBeanNameGenerator(); private final List<AbstractBeanDefinition> beanDefinitions = new ArrayList<>(); private BeanFactory beanF...
} @Override public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException { } <T> void addBeanDefinition(Class<T> beanClass, Supplier<T> beanSupplier) { this.beanDefinitions.add(new RootBeanDefinition(beanClass, beanSupplier)); } @Override public void setBeanFactory(B...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configuration\RegisterMissingBeanPostProcessor.java
2
请在Spring Boot框架中完成以下Java代码
public class FileUploadController implements HandlerExceptionResolver { @RequestMapping(value = "/uploadFile", method = RequestMethod.GET) public String getImageView() { return "file"; } @RequestMapping(value = "/uploadFile", method = RequestMethod.POST) public ModelAndView uploadFile(Mult...
modelAndView.getModel() .put("message", "File uploaded successfully!"); return modelAndView; } @Override public ModelAndView resolveException(HttpServletRequest request, HttpServletResponse response, Object object, Exception exc) { ModelAndView modelAndView = new ModelAndView("f...
repos\tutorials-master\spring-web-modules\spring-mvc-basics-2\src\main\java\com\baeldung\spring\controller\FileUploadController.java
2
请完成以下Java代码
private void fillProcessDefinitionData(HistoricJobLogEventEntity event, JobEntity jobEntity) { String processDefinitionId = jobEntity.getProcessDefinitionId(); if (processDefinitionId != null) { fillProcessDefinitionData(event, processDefinitionId); } else { event.setProcessDefinitionId(jobEntit...
} private void fillProcessDefinitionData(HistoryEvent event, String processDefinitionId) { ProcessDefinitionEntity entity = this.getProcessDefinitionEntity(processDefinitionId); if (entity != null) { event.setProcessDefinitionId(entity.getId()); event.setProcessDefinitionKey(entity.getKey()); ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\producer\DefaultHistoryEventProducer.java
1
请完成以下Java代码
public List<PrinterHWMediaTray> getPrinterHWMediaTrays() { return this.printerHWMediaTrays; } public void setPrinterHWMediaTrays(List<PrinterHWMediaTray> printerHWMediaTrays) { this.printerHWMediaTrays = printerHWMediaTrays; } @Override public String toString() { return "PrinterHW [name=" + name + ", pr...
private String isDefault; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getTrayNumber() { return trayNumber; } public void setTrayNumber(String trayNumber) { this.trayNumber = trayNumber; } public String getIsDefa...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.api\src\main\java\de\metas\printing\esb\api\PrinterHW.java
1
请完成以下Java代码
public String getSummary(final DocumentTableFields docFields) { return extractProductBom(docFields).getDocumentNo(); } @Override public String getDocumentInfo(final DocumentTableFields docFields) { return getSummary(docFields); } @Override public int getDoc_User_ID(final DocumentTableFields docFields) { ...
} @Override public void reactivateIt(final DocumentTableFields docFields) { final I_PP_Product_BOM productBom = extractProductBom(docFields); productBom.setProcessed(false); productBom.setDocAction(X_PP_Product_BOM.DOCACTION_Complete); } private static I_PP_Product_BOM extractProductBom(final DocumentTabl...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\eevolution\document\PP_Product_BOM_DocHandler.java
1
请完成以下Java代码
private void setUserFieldsAndSave(@NonNull final I_AD_User user, @NonNull final I_I_User importRecord) { user.setFirstname(importRecord.getFirstname()); user.setLastname(importRecord.getLastname()); // set value after we set first name and last name user.setValue(importRecord.getUserValue()); user.setEMail(i...
loginUser.setLogin(importRecord.getLogin()); loginUser.setIsSystemUser(importRecord.isSystemUser()); final IUserBL userBL = Services.get(IUserBL.class); userBL.changePasswordAndSave(loginUser, RandomStringUtils.randomAlphanumeric(8)); } @Override protected void markImported(final I_I_User importRecord) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\impexp\ADUserImportProcess.java
1
请在Spring Boot框架中完成以下Java代码
public String index(HttpServletRequest request, Model model) { // 获取登录的用户 RpUserInfo rpUserInfo = (RpUserInfo) request.getSession().getAttribute(ConstantClass.USER); if (rpUserInfo != null) { return "system/index"; } String mobile = request.getParameter("mobile"); ...
if (rpUserInfo == null) { msg = "用户名/密码错误"; } else if (!EncryptUtil.encodeMD5String(password).equals(rpUserInfo.getPassword())) { msg = "用户名/密码错误"; } model.addAttribute("mobile", mobile); model.addAttribute("password", password); request.getSession().setAt...
repos\roncoo-pay-master\roncoo-pay-web-merchant\src\main\java\com\roncoo\pay\controller\login\LoginController.java
2
请在Spring Boot框架中完成以下Java代码
public static String getPurchaseOrdersFromLocalFileRouteId(@NonNull final JsonExternalSystemRequest externalSystemRequest) { return "GetPurchaseOrderFromLocalFile#" + externalSystemRequest.getExternalSystemChildConfigValue(); } @Override public String getServiceValue() { return "LocalFileSyncPurchaseOrders"; ...
} @Override public String getDisableCommand() { return STOP_PURCHASE_ORDER_SYNC_LOCAL_FILE_ROUTE; } @NonNull public String getStartPurchaseOrderRouteId() { return getExternalSystemTypeCode() + "-" + getEnableCommand(); } @NonNull public String getStopPurchaseOrderRouteId() { return getExternalSystem...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-pcm-file-import\src\main\java\de\metas\camel\externalsystems\pcm\purchaseorder\LocalFilePurchaseOrderSyncServicePCMRouteBuilder.java
2