instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void setM_CostRevaluation_ID (final int M_CostRevaluation_ID) { if (M_CostRevaluation_ID < 1) set_ValueNoCheck (COLUMNNAME_M_CostRevaluation_ID, null); else set_ValueNoCheck (COLUMNNAME_M_CostRevaluation_ID, M_CostRevaluation_ID); } @Override public int getM_CostRevaluation_ID() { return get...
{ if (M_CostType_ID < 1) set_Value (COLUMNNAME_M_CostType_ID, null); else set_Value (COLUMNNAME_M_CostType_ID, M_CostType_ID); } @Override public int getM_CostType_ID() { return get_ValueAsInt(COLUMNNAME_M_CostType_ID); } @Override public void setM_Product_ID (final int M_Product_ID) { if (M_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_CostRevaluationLine.java
1
请完成以下Java代码
public class Dashboard extends DashboardInfo implements ExportableEntity<DashboardId> { private static final long serialVersionUID = 872682138346187503L; private transient JsonNode configuration; @Getter @Setter private DashboardId externalId; @Getter @Setter private List<ResourceExp...
} @JsonIgnore public List<ObjectNode> getEntityAliasesConfig() { return getChildObjects("entityAliases"); } @JsonIgnore public List<ObjectNode> getWidgetsConfig() { return getChildObjects("widgets"); } @JsonIgnore private List<ObjectNode> getChildObjects(String propert...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\Dashboard.java
1
请完成以下Java代码
public InvoiceRow build() { return new InvoiceRow(this); } public Builder setOrgId(final OrgId orgId) { this.orgId = orgId; return this; } public Builder setC_Invoice_ID(final int C_Invoice_ID) { this.C_Invoice_ID = C_Invoice_ID; return this; } public Builder setC_Order_ID(final int ...
this.grandTotal = grandTotal; return this; } public Builder setGrandTotalConv(final BigDecimal grandTotalConv) { this.grandTotalConv = grandTotalConv; return this; } public Builder setOpenAmtConv(final BigDecimal openAmtConv) { this.openAmtConv = openAmtConv; return this; } public Buil...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.swingui\src\main\java\de\metas\banking\payment\paymentallocation\model\InvoiceRow.java
1
请完成以下Java代码
public void setLot (java.lang.String Lot) { set_Value (COLUMNNAME_Lot, Lot); } /** Get Los-Nr.. @return Los-Nummer (alphanumerisch) */ @Override public java.lang.String getLot () { return (java.lang.String)get_Value(COLUMNNAME_Lot); } @Override public org.compiere.model.I_M_Product getM_Product() t...
public int getM_Product_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); if (ii == null) return 0; return ii.intValue(); } /** Set M_Product_LotNumber_Quarantine. @param M_Product_LotNumber_Quarantine_ID M_Product_LotNumber_Quarantine */ @Override public void setM_Product_LotNumber...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\product\model\X_M_Product_LotNumber_Quarantine.java
1
请完成以下Java代码
public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override
public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } @Override public void setStandardQty (final BigDecimal StandardQty) { set_Value (COLUMNNAME_StandardQty, StandardQty); } @Override public BigDecimal getStandardQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_StandardQty...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Phase.java
1
请完成以下Java代码
public @NonNull LookupValuesList findByIdsOrdered(final @NonNull Collection<?> ids) { if (ids.isEmpty()) { return LookupValuesList.EMPTY; } return ids.stream() .map(NullLookupDataSource::toUnknownLookupValue) .filter(Objects::nonNull) .collect(LookupValuesList.collect()); } @Override public...
{ return ImmutableList.of(); } @Override public void cacheInvalidate() { } @Override public Optional<WindowId> getZoomIntoWindowId() { return Optional.empty(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\NullLookupDataSource.java
1
请完成以下Java代码
public String getName() { return name; } @Override public void setName(String name) { this.name = name; } @Override public byte[] getBytes() { return bytes; } @Override public void setBytes(byte[] bytes) { this.bytes = bytes; } @Override ...
public Object getPersistentState() { return DmnResourceEntityImpl.class; } @Override public boolean isGenerated() { return false; } @Override public void setGenerated(boolean generated) { this.generated = generated; } // common methods /////////////////////...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\persistence\entity\DmnResourceEntityImpl.java
1
请完成以下Java代码
public class MActivity extends X_C_Activity { /** * */ private static final long serialVersionUID = 3014706648686670575L; /** Static Cache */ private static CCache<Integer, MActivity> s_cache = new CCache<Integer, MActivity>(Table_Name, 30); /** * Get/Load Activity [CACHED] * @param ctx context * @pa...
/** * After Save. * Insert * - create tree * @param newRecord insert * @param success save success * @return true if saved */ protected boolean afterSave (boolean newRecord, boolean success) { if (!success) return success; if (newRecord) insert_Tree(MTree_Base.TREETYPE_Activity); // Value...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MActivity.java
1
请在Spring Boot框架中完成以下Java代码
public void setPort(@Nullable Integer port) { this.port = port; } public @Nullable String getUsername() { return this.username; } public void setUsername(@Nullable String username) { this.username = username; } public @Nullable String getPassword() { return this.password; } public void setPassword(@...
/** * Whether to enable SSL support. If enabled, 'mail.(protocol).ssl.enable' * property is set to 'true'. */ private boolean enabled; /** * SSL bundle name. If set, 'mail.(protocol).ssl.socketFactory' property is set to * an SSLSocketFactory obtained from the corresponding SSL bundle. * <p> *...
repos\spring-boot-4.0.1\module\spring-boot-mail\src\main\java\org\springframework\boot\mail\autoconfigure\MailProperties.java
2
请完成以下Java代码
public boolean login() throws LoginException { this.authen = this.securityContextHolderStrategy.getContext().getAuthentication(); if (this.authen != null) { return true; } String msg = "Login cannot complete, authentication not found in security context"; if (!this.ignoreMissingAuthentication) { throw n...
* @return true if this method succeeded, or false if this <code>LoginModule</code> * should be ignored. */ @Override public boolean logout() { if (this.authen == null) { return false; } Assert.notNull(this.subject, "subject cannot be null"); this.subject.getPrincipals().remove(this.authen); this.auth...
repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\jaas\SecurityContextLoginModule.java
1
请在Spring Boot框架中完成以下Java代码
public Result<IPage<OssFile>> queryPageList(OssFile file, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { ...
} /** * 通过id查询. */ @ResponseBody @GetMapping("/queryById") public Result<OssFile> queryById(@RequestParam(name = "id") String id) { Result<OssFile> result = new Result<>(); OssFile file = ossFileService.getById(id); if (file == null) { result.error500("未找到对应实体"); } else { result.setResult(file)...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\oss\controller\OssFileController.java
2
请完成以下Spring Boot application配置
spring.datasource.url=jdbc:mysql://localhost:3306 spring.datasource.username=root spring.datasource.password=root spring.jpa.show-sql=true spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect spring.dat
asource.initialization-mode=always spring.datasource.platform=mysql spring.jpa.open-in-view=false
repos\Hibernate-SpringBoot-master\HibernateSpringBootMatchEntitiesToTablesTwoSchemas\src\main\resources\application.properties
2
请完成以下Java代码
public @Nullable WebServer getWebServer() { return this.webServer; } /** * Utility class to store and restore any user defined scopes. This allows scopes to * be registered in an ApplicationContextInitializer in the same way as they would in * a classic non-embedded web application context. */ public stat...
if (scope != null) { this.scopes.put(scopeName, scope); } } } public void restore() { this.scopes.forEach((key, value) -> { if (logger.isInfoEnabled()) { logger.info("Restoring user defined scope " + key); } this.beanFactory.registerScope(key, value); }); } } }
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\servlet\context\ServletWebServerApplicationContext.java
1
请完成以下Java代码
static void main(String[] args) { String mode = System.getProperty("jarmode"); boolean disableSystemExit = Boolean.getBoolean(DISABLE_SYSTEM_EXIT); try { runJarMode(mode, args); if (disableSystemExit) { System.setProperty(SUPPRESSED_SYSTEM_EXIT_CODE, "0"); } } catch (Throwable ex) { printError...
ClassUtils.getDefaultClassLoader()); for (JarMode candidate : candidates) { if (candidate.accepts(mode)) { candidate.run(mode, args); return; } } throw new JarModeErrorException("Unsupported jarmode '" + mode + "'"); } private static void printError(Throwable ex) { if (ex instanceof JarModeErro...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\launch\JarModeRunner.java
1
请完成以下Java代码
public String getSerNo () { return (String)get_Value(COLUMNNAME_SerNo); } /** Set URL. @param URL Full URL address - e.g. http://www.adempiere.org */ public void setURL (String URL) { set_ValueNoCheck (COLUMNNAME_URL, URL); } /** Get URL. @return Full URL address - e.g. http://www.adempiere.org ...
} /** Set Version No. @param VersionNo Version Number */ public void setVersionNo (String VersionNo) { set_ValueNoCheck (COLUMNNAME_VersionNo, VersionNo); } /** Get Version No. @return Version Number */ public String getVersionNo () { return (String)get_Value(COLUMNNAME_VersionNo); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Delivery.java
1
请完成以下Java代码
public void sendNotification(@NonNull final WFUserNotification notification) { notificationBL.sendAfterCommit(UserNotificationRequest.builder() .topic(USER_NOTIFICATIONS_TOPIC) .recipientUserId(notification.getUserId()) .contentADMessage(notification.getContent().getAdMessage()) .contentADMessagePara...
public void save(@NonNull final WFEventAudit audit) { auditRepo.save(audit); } public void addEventAudit(@NonNull final WFEventAudit audit) { auditList.add(audit); } public void createNewAttachment( @NonNull final Object referencedRecord, @NonNull final File file) { attachmentEntryService.createNew...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\execution\WorkflowExecutionContext.java
1
请完成以下Java代码
public abstract class ExecutableScript { /** The language of the script. Used to resolve the * {@link ScriptEngine}. */ protected final String language; protected ExecutableScript(String language) { this.language = language; } /** * The language in which the script is written. * @return the la...
} else if (variableScope instanceof TaskEntity) { TaskEntity task = (TaskEntity) variableScope; if (task.getExecution() != null) { activityId = task.getExecution().getActivityId(); definitionIdMessage = " in the process definition with id '" + task.getProcessDefinitionId() + "'"; } ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\scripting\ExecutableScript.java
1
请完成以下Java代码
private List<FactLine> createFactLines(final FactLine baseLine, final GLDistributionResult glDistribution) { final List<GLDistributionResultLine> glDistributionLines = glDistribution.getResultLines(); if (glDistributionLines.isEmpty()) { return ImmutableList.of(); } final List<FactLine> factLines = new A...
// // Update accounting dimensions factLine.updateFromDimension(AccountDimension.builder() .applyOverrides(accountDimension) .clearC_AcctSchema_ID() .clearSegmentValue(AcctSegmentType.Account) .build()); // Amount setAmountToFactLine(glDistributionLine, factLine); logger.debug("{}", factLine...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\FactGLDistributor.java
1
请完成以下Java代码
public void onMessage(Message message) { try { TextMessage textMessage = (TextMessage) message; String producerPing = textMessage.getText(); if (producerPing.equals("marco")) { acknowledge("polo"); } } catch (JMSException e) { ...
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE); MessageProducer ackSender = session.createProducer(ackQueue); ackSender.setDeliveryMode(DeliveryMode.NON_PERSISTENT); TextMessage message = session.createTextMessage(text); ackSender.send(message); ...
repos\tutorials-master\spring-ejb-modules\ejb-beans\src\main\java\com\baeldung\ejbspringcomparison\ejb\messagedriven\RecieverMDB.java
1
请在Spring Boot框架中完成以下Java代码
public Date getStartTime() { return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; } @ApiModelProperty(example = "2013-04-18T14:06:32.715+0000") public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) {...
public void setState(String state) { this.state = state; } @ApiModelProperty(example = "123") public String getCallbackId() { return callbackId; } public void setCallbackId(String callbackId) { this.callbackId = callbackId; } @ApiModelProperty(example = "cmmn-1.1-t...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\caze\HistoricCaseInstanceResponse.java
2
请在Spring Boot框架中完成以下Java代码
public PostSaleAuthenticationProgram getAuthenticityVerification() { return authenticityVerification; } public void setAuthenticityVerification(PostSaleAuthenticationProgram authenticityVerification) { this.authenticityVerification = authenticityVerification; } public Program fulfillmentProgram(EbayFulfillm...
{ return Objects.hash(authenticityVerification, fulfillmentProgram); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Program {\n"); sb.append(" authenticityVerification: ").append(toIndentedString(authenticityVerification)).append("\n"); sb.append(" f...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\Program.java
2
请在Spring Boot框架中完成以下Java代码
static RootBeanDefinition parseAuthoritiesPopulator(Element elt, ParserContext parserContext) { String groupSearchFilter = elt.getAttribute(ATT_GROUP_SEARCH_FILTER); String groupSearchBase = elt.getAttribute(ATT_GROUP_SEARCH_BASE); String groupRoleAttribute = elt.getAttribute(ATT_GROUP_ROLE_ATTRIBUTE); String r...
populator.addPropertyValue("groupSearchFilter", groupSearchFilter); populator.addPropertyValue("searchSubtree", Boolean.TRUE); if (StringUtils.hasText(rolePrefix)) { if ("none".equals(rolePrefix)) { rolePrefix = ""; } populator.addPropertyValue("rolePrefix", rolePrefix); } if (StringUtils.hasLength...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\ldap\LdapUserServiceBeanDefinitionParser.java
2
请在Spring Boot框架中完成以下Java代码
public int hashCode() { int hashValue = super.hashCode(); hashValue = 37 * hashValue + ObjectUtils.nullSafeHashCode(getPool()); return hashValue; } /** * @inheritDoc */ @Override public String toString() { return String.format("ConnectionEndpoint [%1$s] from Pool [%2$s]", super.toStrin...
@SuppressWarnings("unused") protected static class SocketCreationException extends RuntimeException { protected SocketCreationException() { } protected SocketCreationException(String message) { super(message); } protected SocketCreationException(Throwable cause) { super(cause); } protected Socket...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\config\annotation\ClusterAwareConfiguration.java
2
请完成以下Java代码
public JsonExternalReferenceLookupResponse lookup( @ApiParam(required = true, value = "`AD_Org.Value` of the external references we are looking for") // @PathVariable("orgCode") // @NonNull final String orgCode, @RequestBody @NonNull final JsonExternalReferenceLookupRequest request) { return externalRef...
return ResponseEntity.ok().build(); } @PutMapping("/upsert/{orgCode}") public ResponseEntity<?> upsert( @ApiParam(required = true, value = "`AD_Org.Value` of the external references we are upserting") // @PathVariable("orgCode") // @Nullable final String orgCode, @RequestBody @NonNull final JsonRequest...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalreference\src\main\java\de\metas\externalreference\rest\v1\ExternalReferenceRestController.java
1
请完成以下Java代码
protected String doIt() throws Exception { createRecord(p_MsgText); // // Set Custom PrintFormat if needed if (p_AD_PrintFormat_ID > 0) { final MPrintFormat pf = MPrintFormat.get(getCtx(), p_AD_PrintFormat_ID, false); getResult().setPrintFormat(pf); } // // Jasper Report else if (isJasperReport...
.setParameters(getProcessInfo().getAdProcessId()) .anyMatch(); } private void startJasper() { ProcessInfo.builder() .setCtx(getCtx()) .setProcessCalledFrom(getProcessInfo().getProcessCalledFrom()) .setAD_Client_ID(getAD_Client_ID()) .setAD_User_ID(getAD_User_ID()) .setPInstanceId(getPinsta...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\letters\report\AD_BoilerPlate_Report.java
1
请完成以下Java代码
protected JButton createArrowButton() { return super.createArrowButton(); } public JButton getArrowButton() { return arrowButton; } /** * Set Icon of arrow button * */ public void setIcon(Icon defaultIcon) { ((MetalComboBoxButton)arrowButton).setComboIcon(defaultIcon); } // setIcon /** * C...
public static class AdempiereComboPopup extends BasicComboPopup { private static final long serialVersionUID = 3226003169560939486L; public AdempiereComboPopup(final JComboBox<Object> combo) { super(combo); } @Override protected int getPopupHeightForRowCount(final int maxRowCount) { // ensure the...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\plaf\AdempiereComboBoxUI.java
1
请完成以下Java代码
public abstract class AbstractMonitoringBL implements IMonitoringBL { /** * NOTE: don't access this field on methods which are not synchronized/thread safe. */ private final Map<String, IMeter> names2Meters = new HashMap<String, IMeter>(); @Override public final synchronized IMeter createOrGet(final String mod...
final Meter meter = new Meter(); registerJMX(jmxName, meter); names2Meters.put(jmxName, meter); return meter; } private final String mkJmxName(final String moduleName, final String meterName) { final String jmxName = moduleName + ":type=" + meterName; return jmxName; } protected abstract void register...
repos\metasfresh-new_dawn_uat\backend\de.metas.monitoring\src\main\java\de\metas\monitoring\api\impl\AbstractMonitoringBL.java
1
请完成以下Java代码
private void updateMigrationStatus() { Services.get(IMigrationBL.class).updateStatus(migration); } @Override public String getStatusDescription() { final String statusCode = migration.getStatusCode(); if (action == Action.Apply) { if (X_AD_Migration.STATUSCODE_Applied.equals(statusCode)) { retu...
} else { return new ArrayList<>(executionErrors); } } private final void log(String msg, String resolution, boolean isError) { if (isError && !logger.isErrorEnabled()) { return; } if (!isError && !logger.isInfoEnabled()) { return; } final StringBuffer sb = new StringBuffer(); sb.appe...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\MigrationExecutor.java
1
请完成以下Java代码
public class DingTalkNotifier extends AbstractContentNotifier { private static final String DEFAULT_MESSAGE = "#{name} #{id} is #{status}"; private RestTemplate restTemplate; /** * Webhook URI for the DingTalk API. */ private String webhookUrl; /** * Secret for DingTalk. */ @Nullable private String s...
return DEFAULT_MESSAGE; } private String getSign(Long timestamp) { try { String stringToSign = timestamp + "\n" + secret; Mac mac = Mac.getInstance("HmacSHA256"); mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), "HmacSHA256")); byte[] signData = mac.doFinal(stringToSign.getBytes(Stan...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\DingTalkNotifier.java
1
请完成以下Java代码
public class EDI_DesadvPackGenerateCSV_FileForSSCC_Labels extends EDI_GenerateCSV_FileForSSCC_Labels { @Override public ProcessPreconditionsResolution checkPreconditionsApplicable(@NonNull final IProcessPreconditionsContext context) { if (context.getSelectionSize().isNoSelection()) { return ProcessPreconditi...
final List<EDIDesadvPackId> list = queryBL .createQueryBuilder(I_EDI_Desadv_Pack.class) .filter(selectedRecordsFilter) .create() .stream() .map(I_EDI_Desadv_Pack::getEDI_Desadv_Pack_ID) .map(EDIDesadvPackId::ofRepoId) .collect(ImmutableList.toImmutableList()); if (!Check.isEmpty(list)) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\EDI_DesadvPackGenerateCSV_FileForSSCC_Labels.java
1
请完成以下Java代码
public int getAD_OrgType_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgType_ID); if (ii == null) return 0; return ii.intValue(); } public I_AD_PrintColor getAD_PrintColor() throws RuntimeException { return (I_AD_PrintColor)MTable.get(getCtx(), I_AD_PrintColor.Table_Name) .getPO(getAD_...
/** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_OrgType.java
1
请完成以下Java代码
public String getHelp(final String adLanguage) { final I_AD_Process adProcess = adProcessSupplier.get(); final I_AD_Process adProcessTrl = InterfaceWrapperHelper.translate(adProcess, I_AD_Process.class, adLanguage); return adProcessTrl.getHelp(); } public Icon getIcon() { final I_AD_Process adProcess = ad...
} private ProcessPreconditionsResolution getPreconditionsResolution() { return preconditionsResolutionSupplier.get(); } public boolean isEnabled() { return getPreconditionsResolution().isAccepted(); } public boolean isSilentRejection() { return getPreconditionsResolution().isInternal(); } public boo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ui\SwingRelatedProcessDescriptor.java
1
请在Spring Boot框架中完成以下Java代码
public static String lpadZero(final String value, final int size) { if (value == null) { throw new IllegalArgumentException("value is null"); } final String valueFixed = value.trim(); final String s = "0000000000000000000" + valueFixed; return s.substring(s.length() - size); } public static String ...
// Fix very weird java 6 bug: stripTrailingZeros doesn't work on 0 itself // http://stackoverflow.com/questions/5239137/clarification-on-behavior-of-bigdecimal-striptrailingzeroes if (result.signum() == 0) { result = BigDecimal.ZERO; } // // If after removing our scale is negative, we can safely set the...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\commons\Util.java
2
请完成以下Java代码
public class SimplePBEStringEncryptor implements PBEStringEncryptor { private final PBEByteEncryptor delegate; /** * <p>Constructor for SimplePBEStringEncryptor.</p> * * @param delegate a {@link org.jasypt.encryption.pbe.PBEByteEncryptor} object */ public SimplePBEStringEncryptor(PBEBy...
return Base64.getEncoder().encodeToString(delegate.encrypt(message.getBytes(StandardCharsets.UTF_8))); } /** {@inheritDoc} */ @Override @SneakyThrows public String decrypt(String encryptedMessage) { return new String(delegate.decrypt(Base64.getDecoder().decode(encryptedMessage)), StandardCh...
repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\encryptor\SimplePBEStringEncryptor.java
1
请完成以下Java代码
public void setOnMouseMove (String script) { addAttribute ("onmousemove", script); } /** * The onmouseout event occurs when the pointing device is moved away from * an element. This attribute may be used with most elements. * * @param script script */ public void setOnMouseOut (String scri...
addAttribute ("onkeypress", script); } /** * The onkeydown event occurs when a key is pressed down over an element. * This attribute may be used with most elements. * * @param script script */ public void setOnKeyDown (String script) { addAttribute ("onkeydown", script); } /** * Th...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\acronym.java
1
请完成以下Java代码
public I_C_ChargeType getC_ChargeType() throws RuntimeException { return (I_C_ChargeType)MTable.get(getCtx(), I_C_ChargeType.Table_Name) .getPO(getC_ChargeType_ID(), get_TrxName()); } /** Set Charge Type. @param C_ChargeType_ID Charge Type */ public void setC_ChargeType_ID (int C_ChargeType_ID) { if ...
{ set_Value (COLUMNNAME_IsAllowNegative, Boolean.valueOf(IsAllowNegative)); } /** Get Allow Negative. @return Allow Negative */ public boolean isAllowNegative () { Object oo = get_Value(COLUMNNAME_IsAllowNegative); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanVal...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ChargeType_DocType.java
1
请完成以下Java代码
protected final void collectHUAndItemIds(final Set<Integer> startHUIds, final Set<Integer> huIdsCollector, final Set<Integer> huItemIdsCollector) { Set<Integer> huIdsToCheck = new HashSet<>(startHUIds); while (!huIdsToCheck.isEmpty()) { huIdsCollector.addAll(huIdsToCheck); final Set<Integer> huItemIds = re...
return new HashSet<>(huItemIdsList); } private final Set<Integer> retrieveIncludedM_HUIds(final Set<Integer> huItemIds) { if (huItemIds.isEmpty()) { return Collections.emptySet(); } final List<Integer> huIdsList = Services.get(IQueryBL.class) .createQueryBuilder(I_M_HU.class, getContext()) .addIn...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\snapshot\impl\M_HU_SnapshotHandler.java
1
请完成以下Java代码
public DocTypeId getOrderDocTypeIdOrNull(@Nullable final OrderDocType orderDocType, final OrgId orgId) { if (orderDocType == null) { return null; } final DocBaseType docBaseType = DocBaseType.SalesOrder; final DocSubType docSubType; if (OrderDocType.PrepayOrder.equals(orderDocType)) { docSubType ...
docSubType = DocSubType.StandardOrder; } final I_AD_Org orgRecord = orgsDAO.getById(orgId); final DocTypeQuery query = DocTypeQuery .builder() .docBaseType(docBaseType) .docSubType(docSubType) .adClientId(orgRecord.getAD_Client_ID()) .adOrgId(orgRecord.getAD_Org_ID()) .build(); return...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\utils\DocTypeService.java
1
请完成以下Java代码
public double getUsage() { return NumberUtil.mul(NumberUtil.div(total - free, total, 4), 100); } /** * 获取JDK名称 */ public String getName() { return ManagementFactory.getRuntimeMXBean().getVmName(); } public String getVersion() { return version; } public vo...
} public void setStartTime(String startTime) { this.startTime = startTime; } public String getStartTime() { return DateUtil.formatDateTime(new Date(ManagementFactory.getRuntimeMXBean().getStartTime())); } public void setRunTime(String runTime) { this.runTime = runTime; ...
repos\spring-boot-demo-master\demo-websocket\src\main\java\com\xkcoding\websocket\model\server\Jvm.java
1
请完成以下Java代码
public abstract class BaseSqlEntity<D> implements BaseEntity<D> { @Id @Column(name = ModelConstants.ID_PROPERTY, columnDefinition = "uuid") @GeneratedId protected UUID id; @Column(name = ModelConstants.CREATED_TIME_PROPERTY, updatable = false) protected long createdTime; public BaseSqlEnt...
return EntityId.NULL_UUID; } } protected static <I> I getEntityId(UUID uuid, Function<UUID, I> creator) { return DaoUtil.toEntityId(uuid, creator); } protected static TenantId getTenantId(UUID uuid) { if (uuid != null && !uuid.equals(EntityId.NULL_UUID)) { return Te...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\BaseSqlEntity.java
1
请完成以下Java代码
public static AuthenticatorAttestationResponseBuilder builder() { return new AuthenticatorAttestationResponseBuilder(); } /** * Builds {@link AuthenticatorAssertionResponse}. * * @author Rob Winch * @since 6.4 */ public static final class AuthenticatorAttestationResponseBuilder { @SuppressWarnings("N...
* @return the {@link AuthenticatorAttestationResponseBuilder} */ public AuthenticatorAttestationResponseBuilder transports(List<AuthenticatorTransport> transports) { this.transports = transports; return this; } /** * Sets the {@link #getClientDataJSON()} property. * @param clientDataJSON the clien...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\AuthenticatorAttestationResponse.java
1
请完成以下Java代码
public int getId() { return id; } public void setId(int id) { this.id = id; } public String getItemName() { return itemName; } public void setItemName(String itemName) { this.itemName = itemName; } public double getItemPrice() { return itemPric...
} public void setSeller(Seller seller) { this.seller = seller; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Item item = (Item) o; return id == item.id && Doub...
repos\tutorials-master\persistence-modules\hibernate-mapping-2\src\main\java\com\baeldung\hibernate\persistmaps\mapkeyjoincolumn\Item.java
1
请完成以下Java代码
public void registerChannelModel(ChannelModel channelModel, String tenantId, EventRegistry eventRegistry, EventRepositoryService eventRepositoryService, boolean fallbackToDefaultTenant) { if (channelModel instanceof DelegateExpressionInboundChannelModel) { registerC...
} } @Override public void unregisterChannelModel(ChannelModel channelModel, String tenantId, EventRepositoryService eventRepositoryService) { // Nothing to do } public HasExpressionManagerEngineConfiguration getEngineConfiguration() { return engineConfiguration; } public v...
repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\pipeline\DelegateExpressionInboundChannelModelProcessor.java
1
请完成以下Java代码
protected void resetAdditional(@NonNull final JsonCacheResetResponse response, @NonNull final JsonCacheResetRequest request) { { final boolean forgetNotSavedDocuments = request.getValueAsBoolean(CACHE_RESET_PARAM_forgetNotSavedDocuments); final String documentsResult = documentCollection.cacheReset(forgetNotSa...
response.addLog("viewColumnHelper: cache invalidated"); } } @GetMapping("/lookups/stats") public JsonGetStatsResponse getLookupCacheStats() { assertAuth(); return lookupDataSourceFactory.getCacheStats() .stream() .sorted(DEFAULT_ORDER_BY) .map(JsonCacheStats::of) .collect(JsonGetStatsRespons...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\admin\CacheRestController.java
1
请完成以下Java代码
public void setRevision(int revision) { this.revision = revision; } public void setPermissions(int permissions) { this.permissions = permissions; } public int getPermissions() { return permissions; } public Set<Permission> getCachedPermissions() { return cachedPermissions; } public i...
} @Override public Set<String> getReferencedEntityIds() { Set<String> referencedEntityIds = new HashSet<String>(); return referencedEntityIds; } @Override public Map<String, Class> getReferencedEntitiesIdAndClass() { Map<String, Class> referenceIdAndClass = new HashMap<String, Class>(); retu...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\AuthorizationEntity.java
1
请完成以下Java代码
public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public de.metas.async.model.I_C_Async_Batch getParent_Async_Batch() { return get_ValueAsPO(COLUMNNAME_Parent_Asy...
{ if (Parent_Async_Batch_ID < 1) set_Value (COLUMNNAME_Parent_Async_Batch_ID, null); else set_Value (COLUMNNAME_Parent_Async_Batch_ID, Parent_Async_Batch_ID); } @Override public int getParent_Async_Batch_ID() { return get_ValueAsInt(COLUMNNAME_Parent_Async_Batch_ID); } @Override public void setP...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Async_Batch.java
1
请完成以下Java代码
private PropertySource<?> makeEncryptable(PropertySource<?> propertySource) { return propertyConverter.makeEncryptable(propertySource); } /** {@inheritDoc} */ @Override public void addFirst(PropertySource<?> propertySource) { envCopy.addFirst(propertySource); super.addFirst(make...
public void addAfter(String relativePropertySourceName, PropertySource<?> propertySource) { envCopy.addAfter(relativePropertySourceName, propertySource); super.addAfter(relativePropertySourceName, makeEncryptable(propertySource)); } /** {@inheritDoc} */ @Override public void replace(Str...
repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\wrapper\EncryptableMutablePropertySourcesWrapper.java
1
请在Spring Boot框架中完成以下Java代码
public void configure() { JacksonDataFormat jacksonDataFormat = new JacksonDataFormat(); jacksonDataFormat.setPrettyPrint(true); from("direct:sendWhatsAppMessage") .setHeader("Authorization", constant("Bearer " + apiToken)) .setHea...
public void processIncomingMessage(String payload) { try { JsonNode jsonNode = objectMapper.readTree(payload); JsonNode messages = jsonNode.at("/entry/0/changes/0/value/messages"); if (messages.isArray() && messages.size() > 0) { String receivedText = messages...
repos\tutorials-master\spring-boot-modules\spring-boot-3-3\src\main\java\com\baeldung\chatbot\service\WhatsAppService.java
2
请完成以下Java代码
public String getProcessMsg() { return m_processMsg; } // getProcessMsg /** * Get Document Owner (Responsible) * * @return AD_User_ID */ @Override public int getDoc_User_ID() { return getCreatedBy(); } // getDoc_User_ID /** * Get Document Currency * * @return C_Currency_ID */ @Overr...
{ return Services.get(IMovementBL.class).isReversal(this); } // isReversal /** * Document Status is Complete or Closed * * @return true if CO, CL or RE */ public boolean isComplete() { String ds = getDocStatus(); return DOCSTATUS_Completed.equals(ds) || DOCSTATUS_Closed.equals(ds) || DOCST...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MMovement.java
1
请完成以下Java代码
public void onDelete(final ICalloutRecord calloutRecord) { try { tabCallout.onDelete(calloutRecord); } catch (final Exception e) { handleException("onDelete", calloutRecord, e); } } @Override public void onRefresh(final ICalloutRecord calloutRecord) { try { tabCallout.onRefresh(calloutRec...
} @Override public void onAfterQuery(final ICalloutRecord calloutRecord) { try { tabCallout.onAfterQuery(calloutRecord); } catch (final Exception e) { handleException("onAfterQuery", calloutRecord, e); } } private static final class StatefulExceptionHandledTabCallout extends ExceptionHandledTab...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\ui\spi\ExceptionHandledTabCallout.java
1
请完成以下Java代码
private ImmutableSet<ProductId> extractProductIds(final IHUStorage storage) { return storage.getProductStorages() .stream() .map(IHUProductStorage::getProductId) .collect(ImmutableSet.toImmutableSet()); } private I_M_HU extractHU(final ViewRowAttributesKey key) { final HuId huId = HuId.ofRepoId(key...
final IHUStorageFactory storageFactory = handlingUnitsBL.getStorageFactory(); return attributeStorageFactoryService.createHUAttributeStorageFactory(storageFactory); } @Override public void invalidateAll() { // // Destroy AttributeStorageFactory _attributeStorageFactory.forget(); // // Destroy attribut...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorRowAttributesProvider.java
1
请在Spring Boot框架中完成以下Java代码
public void updateWhileSaving( @NonNull final I_SAP_GLJournal record, @NonNull final Consumer<SAPGLJournal> consumer) { final SAPGLJournalId glJournalId = SAPGLJournalLoaderAndSaver.extractId(record); final SAPGLJournalLoaderAndSaver loaderAndSaver = new SAPGLJournalLoaderAndSaver(); loaderAndSaver.addToC...
public SAPGLJournal create( @NonNull final SAPGLJournalCreateRequest createRequest, @NonNull final SAPGLJournalCurrencyConverter currencyConverter) { final SAPGLJournalLoaderAndSaver loaderAndSaver = new SAPGLJournalLoaderAndSaver(); return loaderAndSaver.create(createRequest, currencyConverter); } public...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\service\SAPGLJournalRepository.java
2
请完成以下Java代码
public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ @Override public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) ...
*/ @Override public void setValue (String Value) { set_Value (COLUMNNAME_Value, Value); } /** Get Search Key. @return Search key for the record in the format required - must be unique */ @Override public String getValue () { return (String)get_Value(COLUMNNAME_Value); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Payroll.java
1
请完成以下Java代码
public Food.FoodDelivery buildData() { Food.FoodDelivery.Builder foodData = Food.FoodDelivery.newBuilder(); Food.Menu pizzaMenu = Food.Menu.newBuilder() .putItems("Margherita", 12.99f) .putItems("Pepperoni", 14.99f) .build(); Food.Menu sushiMenu = Food.Menu.n...
.build(); } catch (IOException e) { logger.warning(String.format("Error reading file: %s location", FILE_PATH)); return Food.FoodDelivery.newBuilder() .build(); } } public void displayRestaurants(Food.FoodDelivery delivery) { Map<String, Food.Menu...
repos\tutorials-master\google-protocol-buffer\src\main\java\com\baeldung\mapinprotobuf\FoodDelivery.java
1
请完成以下Java代码
public String getIncidentMessageLike() { return incidentMessageLike; } public String getVersionTag() { return versionTag; } public boolean isStartableInTasklist() { return isStartableInTasklist; } public boolean isNotStartableInTasklist() { return isNotStartableInTasklist; } public b...
public List<String> getCandidateGroups() { if (cachedCandidateGroups != null) { return cachedCandidateGroups; } if(authorizationUserId != null) { List<Group> groups = Context.getCommandContext() .getReadOnlyIdentityProvider() .createGroupQuery() .groupMember(author...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessDefinitionQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class EventConsumer { private final Logger LOGGER = LoggerFactory.getLogger(EventConsumer.class); private final Map<String, DataMessageAsyncEvent> messages; private final AccountService accountService; @Autowired public EventConsumer(AccountService accountService) { this.accountSer...
EventWrapper<DataMessageAsyncEvent> wrapper = (EventWrapper<DataMessageAsyncEvent>)message; messages.put(wrapper.getEvent().getId(), wrapper.getEvent()); } else if (message.getType().equals(CreateAccountAsyncEvent.class)) { EventWrapper<CreateAccountAsyncEvent> wrapper = (EventWrapper<Cr...
repos\spring-examples-java-17\spring-kafka\kafka-consumer\src\main\java\itx\examples\spring\kafka\consumer\service\EventConsumer.java
2
请在Spring Boot框架中完成以下Java代码
public void handleEvent(@NonNull final PurchaseCandidateAdvisedEvent event) { final SupplyRequiredDescriptor supplyRequiredDescriptor = event.getSupplyRequiredDescriptor(); final DemandDetail demandDetail = DemandDetail.forSupplyRequiredDescriptorOrNull(supplyRequiredDescriptor); final PurchaseDetail purchaseDe...
.businessCase(CandidateBusinessCase.PURCHASE) .materialDescriptor(supplyRequiredDescriptor.getMaterialDescriptor()) .businessCaseDetail(purchaseDetail) .additionalDemandDetail(demandDetail) .simulated(supplyRequiredDescriptor.isSimulated()) .build(); final MaterialDispoGroupId groupId = candidate...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\purchasecandidate\PurchaseCandidateAdvisedHandler.java
2
请在Spring Boot框架中完成以下Java代码
public class StorageProperties { private String identity; private String credential; private String region; private String bucketName; private String proxyEndpoint; private String localFileBaseDirectory; public String getIdentity() { return identity; } public void set...
public void setRegion(String region) { this.region = region; } public String getBucketName() { return bucketName; } public void setBucketName(String bucketName) { this.bucketName = bucketName; } public String getProxyEndpoint() { return proxyEndpoint; } ...
repos\tutorials-master\aws-modules\s3proxy\src\main\java\com\baeldung\s3proxy\StorageProperties.java
2
请完成以下Java代码
public BigDecimal getUrsprungsbetrag() { return ursprungsbetrag; } public void setUrsprungsbetrag(BigDecimal ursprungsbetrag) { this.ursprungsbetrag = ursprungsbetrag; } public String getUrsprungsbetragWaehrung() { return ursprungsbetragWaehrung; } public void setUrsprungsbetragWaehrung(String ursprungsb...
} public void setVerwendungszweck(String verwendungszweck) { this.verwendungszweck = verwendungszweck; } public String getPartnerBlz() { return partnerBlz; } public void setPartnerBlz(String partnerBlz) { this.partnerBlz = partnerBlz; } public String getPartnerKtoNr() { return partnerKtoNr; } publ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\schaeffer\compiere\mt940\BankstatementLine.java
1
请完成以下Java代码
class NShiftConfigMap { public static final NShiftConfigMap EMPTY = new NShiftConfigMap(ImmutableList.of()); private final ImmutableMap<ShipperId, NShiftConfig> byShipperId; private NShiftConfigMap(final List<NShiftConfig> list) { this.byShipperId = Maps.uniqueIndex(list, NShiftConfig::getShipperId); } publi...
public static Collector<NShiftConfig, ?, NShiftConfigMap> collect() { return GuavaCollectors.collectUsingListAccumulator(NShiftConfigMap::ofList); } public @NonNull NShiftConfig getByShipperId(final @NonNull ShipperId shipperId) { final NShiftConfig config = byShipperId.get(shipperId); if (config == null) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.nshift\src\main\java\de\metas\shipper\gateway\nshift\config\NShiftConfigMap.java
1
请完成以下Java代码
public void reenqueuePPOrders(final I_M_PriceList_Version plv) { final IPriceListDAO priceListDAO = Services.get(IPriceListDAO.class); final IQueryBL queryBL = Services.get(IQueryBL.class); final IInvoiceCandidateHandlerBL invoiceCandidateHandlerBL = Services.get(IInvoiceCandidateHandlerBL.class); final IADTab...
.create() .listDistinct(I_C_Invoice_Detail.COLUMNNAME_PP_Order_ID); for (final Map<String, Object> colName2Value : listDistinct) { final Integer ppOrderId = (Integer)colName2Value.get(I_C_Invoice_Detail.COLUMNNAME_PP_Order_ID); if (ppOrderId == null) { continue; // imho this can't happen, but bett...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\model\validator\M_PriceList_Version.java
1
请完成以下Java代码
public String getTenantId() { return tenantId; } public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getRootProcessInstanceId() { return rootProcessInstanceId; } public void setRootProcessInstanceId(String rootProcessInstanceId) { this.rootProcessInstanceI...
+ ", activityInstanceState=" + activityInstanceState + ", parentActivityInstanceId=" + parentActivityInstanceId + ", calledProcessInstanceId=" + calledProcessInstanceId + ", calledCaseInstanceId=" + calledCaseInstanceId + ", taskId=" + taskId + ", taskAssignee=" + ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricActivityInstanceEventEntity.java
1
请在Spring Boot框架中完成以下Java代码
public class M_PriceList { @ModelChange(timings = { ModelValidator.TYPE_AFTER_NEW, ModelValidator.TYPE_AFTER_CHANGE }) public void assertBasePricingIsValid(final I_M_PriceList priceList) { final IPriceListDAO priceListsRepo = Services.get(IPriceListDAO.class); // final PriceListVersionId basePriceListVersionId ...
final CountryId baseCountryId = CountryId.ofRepoIdOrNull(basePriceList.getC_Country_ID()); final CountryId countryId = CountryId.ofRepoIdOrNull(priceList.getC_Country_ID()); if (!CountryId.equals(baseCountryId, countryId)) { throw new AdempiereException("@PriceListAndBasePriceListCountryMismatchError@") ....
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\interceptor\M_PriceList.java
2
请在Spring Boot框架中完成以下Java代码
public List<JAXBElement<ReductionAndSurchargeBaseType>> getReductionListLineItemOrSurchargeListLineItem() { if (reductionListLineItemOrSurchargeListLineItem == null) { reductionListLineItemOrSurchargeListLineItem = new ArrayList<JAXBElement<ReductionAndSurchargeBaseType>>(); } return...
return totalReductionAndSurchargeListLineItem; } /** * Sets the value of the totalReductionAndSurchargeListLineItem property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setTotalReductionAndSurchargeListLineItem(BigDecimal val...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ReductionAndSurchargeListLineItemDetailsType.java
2
请在Spring Boot框架中完成以下Java代码
public class RolePermLoggingBL implements IRolePermLoggingBL { @Override public void logWindowAccess(RoleId roleId, int id, Boolean access) { MRolePermRequest.logWindowAccess(roleId, id, access); } @Override public void logWindowAccess(RoleId roleId, AdWindowId id, Boolean access, String description) { MRo...
@Override public void logTaskAccess(RoleId roleId, int id, Boolean access) { MRolePermRequest.logTaskAccess(roleId, id, access); } @Override public void logWorkflowAccess(RoleId roleId, int id, Boolean access) { MRolePermRequest.logWorkflowAccess(roleId, id, access); } @Override public void logDocActionA...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\adempiere\service\impl\RolePermLoggingBL.java
2
请完成以下Java代码
private static class SalesOrderLineCandidate { @Nullable private ProductId bomProductId; private boolean addProductToPriceList; // // Quotation info: @NonNull private final GroupId quotationGroupId; @NonNull private final String quotationGroupName; @NonNull final OrgId orgId; @NonNull final ...
@NonNull final BigDecimal price; @NonNull final BigDecimal qty; @NonNull final UomId uomId; @NonNull final TaxCategoryId taxCategoryId; // // Additional quotation lines to copy directly @NonNull @Default private final ImmutableList<I_C_OrderLine> additionalQuotationLines = ImmutableList.of(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\order\createFrom\CreateSalesOrderAndBOMsFromQuotationCommand.java
1
请在Spring Boot框架中完成以下Java代码
public String getFilename() { return filename; } public void setFilename(String filename) { this.filename = filename; } public Attachment contentType(String contentType) { this.contentType = contentType; return this; } /** * MIME type der Datei * @return contentType **/ @Schema...
Objects.equals(this.contentType, attachment.contentType) && Objects.equals(this.uploadDate, attachment.uploadDate) && Objects.equals(this.metadata, attachment.metadata); } @Override public int hashCode() { return Objects.hash(_id, filename, contentType, uploadDate, metadata); } @Overrid...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-document-api\src\main\java\io\swagger\client\model\Attachment.java
2
请在Spring Boot框架中完成以下Java代码
protected DataResponse<HistoricDetailResponse> getQueryResponse(HistoricDetailQueryRequest queryRequest, Map<String, String> allRequestParams) { HistoricDetailQuery query = historyService.createHistoricDetailQuery(); // Populate query based on request if (queryRequest.getProcessInstanceId() != ...
query.formProperties(); } } if (queryRequest.getSelectOnlyVariableUpdates() != null) { if (queryRequest.getSelectOnlyVariableUpdates()) { query.variableUpdates(); } } if (restApiInterceptor != null) { restApiInterce...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricDetailBaseResource.java
2
请完成以下Java代码
public String toString() { return defaultValue; } @Override public String translate(final String adLanguage) { return trlMap.getOrDefault(adLanguage, defaultValue); } @Override public String getDefaultValue() { return defaultValue;
} @Override public Set<String> getAD_Languages() { return trlMap.keySet(); } @JsonIgnore // needed for snapshot testing public boolean isEmpty() { return defaultValue.isEmpty() && trlMap.values().stream().allMatch(String::isEmpty); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\ImmutableTranslatableString.java
1
请在Spring Boot框架中完成以下Java代码
public class Author implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private int age; private String name; private String genre; @Column(insertable = false, updatable = false) long ...
this.name = name; } public String getGenre() { return genre; } public void setGenre(String genre) { this.genre = genre; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public long getTotal() { retu...
repos\Hibernate-SpringBoot-master\HibernateSpringBootListEntityOffsetPaginationExtraColumn\src\main\java\com\bookstore\entity\Author.java
2
请完成以下Java代码
public void invalidate(@NonNull final CacheInvalidateMultiRequest request, @NonNull final ModelCacheInvalidationTiming timing) { // // Reset model cache // * only on AFTER event // * only if it's not NEW event because in case of NEW, the model was not already in cache, for sure if (timing.isAfter() && !timin...
// if (requests.isEmpty()) { return null; } return CacheInvalidateMultiRequest.of(requests); } private CacheInvalidateRequest createChildRecordInvalidateUsingRootRecordReference(final ICacheSourceModel model) { final TableRecordReference rootRecordReference = model.getRootRecordReferenceOrNull(); if...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\ModelCacheInvalidationService.java
1
请完成以下Java代码
public String getTableNameEffective() { return childTableName != null ? childTableName : rootTableName; } public static final class Builder { private String rootTableName; private int rootRecordId = -1; private String childTableName; private int childRecordId = -1; private Builder() { } public...
Check.assume(recordId >= 0, "recordId >= 0"); rootTableName = tableName; rootRecordId = recordId; return this; } public Builder childRecord(@NonNull final String tableName, final int recordId) { Check.assume(recordId >= 0, "recordId >= 0"); childTableName = tableName; childRecordId = recordId...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\CacheInvalidateRequest.java
1
请完成以下Java代码
public JobDefinitionQuery active() { this.suspensionState = SuspensionState.ACTIVE; return this; } public JobDefinitionQuery suspended() { this.suspensionState = SuspensionState.SUSPENDED; return this; } public JobDefinitionQuery withOverridingJobPriority() { this.withOverridingJobPriority...
public JobDefinitionQuery orderByTenantId() { return orderBy(JobDefinitionQueryProperty.TENANT_ID); } // results //////////////////////////////////////////// @Override public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext .getJobDefinitionManager() ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\JobDefinitionQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public int updateBrand(Long id, PmsBrandParam pmsBrandParam) { PmsBrand pmsBrand = new PmsBrand(); BeanUtils.copyProperties(pmsBrandParam, pmsBrand); pmsBrand.setId(id); //如果创建时首字母为空,取名称的第一个为首字母 if (StrUtil.isEmpty(pmsBrand.getFirstLetter())) { pmsBrand.setFirstLetter...
pmsBrandExample.setOrderByClause("sort desc"); PmsBrandExample.Criteria criteria = pmsBrandExample.createCriteria(); if (!StrUtil.isEmpty(keyword)) { criteria.andNameLike("%" + keyword + "%"); } if(showStatus!=null){ criteria.andShowStatusEqualTo(showStatus); ...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\PmsBrandServiceImpl.java
2
请完成以下Java代码
class JWTAuthenticationFilter extends OncePerRequestFilter { @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { ofNullable(request.getHeader(AUTHORIZATION)) .map(authHeader -...
private JWT(String token) { super(null); this.token = token; } @Override public Object getPrincipal() { return token; } @Override public Object getCredentials() { return null; } } }
repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\application\security\JWTAuthenticationFilter.java
1
请完成以下Java代码
public boolean isDeveloperMode() { return developerModeBL.isEnabled(); } public I_M_HU_PI getVirtualPI(final Properties ctx) { return getHandlingUnitsDAO().retrieveVirtualPI(ctx); } public I_M_HU_Item getFirstNotPureVirtualItem(@NonNull final I_M_HU_Item item) { final IHandlingUnitsDAO handlingUnitsDAO =...
{ return HUItemType.ofCode(handlingUnitsBL.getItemType(item)); } public List<I_M_HU> retrieveIncludedHUs(final I_M_HU_Item item) { return getHandlingUnitsDAO().retrieveIncludedHUs(item); } public I_M_HU_PI getIncluded_HU_PI(@NonNull final I_M_HU_Item item) { return handlingUnitsBL.getIncludedPI(item); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\strategy\AllocationStrategySupportingServicesFacade.java
1
请完成以下Java代码
public class Product { private final Money price; public Product(Money price) { super(); this.price = price; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } ...
int result = 1; result = prime * result + ((price == null) ? 0 : price.hashCode()); return result; } @Override public String toString() { return "Product [price=" + price + "]"; } Money getPrice() { return price; } }
repos\tutorials-master\patterns-modules\ddd\src\main\java\com\baeldung\ddd\order\Product.java
1
请完成以下Java代码
public AppPluginRegistry<T> getAppPluginRegistry() { return pluginRegistry; } /** * Load the {@link ProcessEngineProvider} spi implementation. * * @return */ protected ProcessEngineProvider loadProcessEngineProvider() { ServiceLoader<ProcessEngineProvider> loader = ServiceLoader.load(ProcessE...
public List<PluginResourceOverride> getResourceOverrides() { if(resourceOverrides == null) { initResourceOverrides(); } return resourceOverrides; } protected synchronized void initResourceOverrides() { if(resourceOverrides == null) { // double-checked sync, do not remove resourceOverrid...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\AbstractAppRuntimeDelegate.java
1
请完成以下Java代码
public void setFromAddress(@NonNull final BPartnerLocationAddressPart address) { setExistingLocationId(address.getExistingLocationId()); setAddress1(address.getAddress1()); setAddress2(address.getAddress2()); setAddress3(address.getAddress3()); setAddress4(address.getAddress4()); setCity(address.getCity())...
@Nullable public LocationId getExistingLocationIdNotNull() { return Check.assumeNotNull(getExistingLocationId(), "existingLocationId not null: {}", this); } /** * Can be used if this instance's ID is known to be not null. */ @NonNull public BPartnerLocationId getIdNotNull() { return Check.assumeNotNull(...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\composite\BPartnerLocation.java
1
请在Spring Boot框架中完成以下Java代码
public Queue demo10Queue2() { return new Queue(Demo10Message.QUEUE_2); } @Bean public Queue demo10Queue3() { return new Queue(Demo10Message.QUEUE_3); } // 创建 Direct Exchange @Bean public DirectExchange demo10Exchange() { return...
@Bean public Binding demo10Binding1() { return BindingBuilder.bind(demo10Queue1()).to(demo10Exchange()).with("1"); } @Bean public Binding demo10Binding2() { return BindingBuilder.bind(demo10Queue2()).to(demo10Exchange()).with("2"); } @Bean ...
repos\SpringBoot-Labs-master\lab-04-rabbitmq\lab-04-rabbitmq-demo-orderly\src\main\java\cn\iocoder\springboot\lab04\rabbitmqdemo\config\RabbitConfig.java
2
请完成以下Java代码
String getValueFromCache(String key) { // simulate a long running computation try { System.out.println("getting value for "+ key); Thread.sleep(200); } catch (InterruptedException e) { e.printStackTrace(System.err); } return key + "Value"; } public org.infinispan.Cache<String, Stri...
public void clearAll() { // simulate a long running computation try { System.out.println("clearing cache " + CACHE_NAME); Thread.sleep(200); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } @CacheInvalidate(cacheName = CACHE_...
repos\tutorials-master\quarkus-modules\quarkus-infinispan-embedded\src\main\java\com\baeldung\quarkus\infinispan\InfinispanAnnotatedCacheService.java
1
请完成以下Java代码
private static ResponseCookie invalidateRedirectUriCookie(ServerHttpRequest request) { return createResponseCookieBuilder(request, null, Duration.ZERO).build(); } private static ResponseCookie.ResponseCookieBuilder createResponseCookieBuilder(ServerHttpRequest request, @Nullable String cookieValue, Duration age...
private static String decodeCookie(String encodedCookieValue) { return new String(Base64.getDecoder().decode(encodedCookieValue.getBytes())); } private static ServerWebExchangeMatcher createDefaultRequestMatcher() { ServerWebExchangeMatcher get = ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET, "/**"); S...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\savedrequest\CookieServerRequestCache.java
1
请完成以下Java代码
public class IncomingConsumer { private static final String TOPIC_NAME = "incoming-topic"; private final ProcessorService processorService; @KafkaListener(topics = TOPIC_NAME) @AsyncListener(operation = @AsyncOperation( channelName = TOPIC_NAME, description = "More details for...
description = "Spring Type Id Header", value = "com.baeldung.boot.documentation.springwolf.dto.IncomingPayloadDto" ), } ) ) ) @KafkaAsyncOperationBinding public void consume(IncomingPayloadDto payload) { log.info("Receiv...
repos\tutorials-master\spring-boot-modules\spring-boot-documentation\src\main\java\com\baeldung\boot\documentation\springwolf\adapter\incoming\IncomingConsumer.java
1
请完成以下Java代码
private void validateProduct(@NonNull final I_M_Product product) { try { trxManager.runInNewTrx(() -> checkProductById(product)); } catch (final Exception ex) { product.setIsVerified(false); InterfaceWrapperHelper.save(product); throw AdempiereException.wrapIfNeeded(ex); } } private void che...
// Check All BOM Lines for (final I_PP_Product_BOMLine tbomline : productBOMDAO.retrieveLines(bom)) { final ProductId productId = ProductId.ofRepoId(tbomline.getM_Product_ID()); final I_M_Product bomLineProduct = productBL.getById(productId); checkProductBOMCyclesAndMarkAsVerified(bomLineProduct); } } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\process\PP_Product_BOM_Check.java
1
请完成以下Java代码
public void apply(final Object model) { for (final IGridTabRowBuilder builder : builders) { if (!builder.isValid()) { logger.debug("Skip builder because it's not valid: {}", builder); continue; } builder.apply(model); logger.debug("Applied {} to {}", new Object[] { builder, model }); } }...
{ for (final IGridTabRowBuilder builder : builders) { if (builder.isValid()) { return true; } } return false; } @Override public void setSource(Object model) { for (final IGridTabRowBuilder builder : builders) { builder.setSource(model); } } @Override public String toString() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\apps\search\impl\CompositeGridTabRowBuilder.java
1
请完成以下Java代码
public String getParentId() { return parentId; } public void setParentId(String parentId) { this.parentId = parentId; } public Map<String, String> getDetails() { return details; } public void setDetails(Map<String, String> details) { this.details = details; }
@Override public String toString() { return this.getClass().getSimpleName() + "[id=" + id + ", revision=" + revision + ", type=" + type + ", userId=" + userId + ", key=" + key + ", value=" + value + ", password=" + password + ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\IdentityInfoEntity.java
1
请完成以下Java代码
private static ImmutableList<Integer> findAllHUsWithAShipperTransportation(@NonNull final ImmutableList<Integer> allHuIds) { final IQueryBL queryBL = Services.get(IQueryBL.class); final IQuery<I_M_ShipperTransportation> subQuery__M_ShipperTransportation = queryBL .createQueryBuilder(I_M_ShipperTransportation....
.end() .create(); final List<Integer> list = queryBL .createQueryBuilder(I_M_Package_HU.class) .addInArrayFilter(I_M_Package_HU.COLUMNNAME_M_HU_ID, allHuIds) .addInSubQueryFilter() .matchingColumnNames(I_M_Package_HU.COLUMNNAME_M_Package_ID, I_M_Package.COLUMNNAME_M_Package_ID) .subQuery(subQ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipping\InOutToTransportationOrderService.java
1
请完成以下Java代码
public class ExpressionUtils { public static final List<Function> userDefinedFunctions = new ArrayList<>(); static { userDefinedFunctions.add( new Function("ln") { @Override public double apply(double... args) { return Mat...
userDefinedFunctions.add(Functions.getBuiltinFunction("log1p")); userDefinedFunctions.add(Functions.getBuiltinFunction("abs")); userDefinedFunctions.add(Functions.getBuiltinFunction("acos")); userDefinedFunctions.add(Functions.getBuiltinFunction("asin")); userDefinedFunctions.add(Functio...
repos\thingsboard-master\common\util\src\main\java\org\thingsboard\common\util\ExpressionUtils.java
1
请完成以下Java代码
public void setImplementationType(String implementationType) { implementationTypeAttribute.setValue(this, implementationType); } public Collection<InputDecisionParameter> getInputs() { return inputCollection.get(this); } public Collection<OutputDecisionParameter> getOutputs() { return outputCollec...
nameAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_NAME) .build(); implementationTypeAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_IMPLEMENTATION_TYPE) .defaultValue("http://www.omg.org/spec/CMMN/DecisionType/Unspecified") .build(); SequenceBuilder sequenceBuilder = ty...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\DecisionImpl.java
1
请完成以下Java代码
public void onDateWorkComplete(final I_C_RfQ rfq) { final IRfQWorkDatesAware workDatesAware = InterfaceWrapperHelper.create(rfq, IRfQWorkDatesAware.class); RfQWorkDatesUtil.updateFromDateWorkComplete(workDatesAware); } @CalloutMethod(columnNames = I_C_RfQ.COLUMNNAME_DeliveryDays, skipIfCopying = true) public v...
public void onC_RfQTopic(final I_C_RfQ rfq) { final I_C_RfQ_Topic rfqTopic = rfq.getC_RfQ_Topic(); if (rfqTopic == null) { return; } final String rfqTypeDefault = rfqTopic.getRfQType(); if (rfqTypeDefault != null) { rfq.setRfQType(rfqTypeDefault); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\model\interceptor\C_RfQ.java
1
请完成以下Java代码
public void setHelp (String Help) { set_Value (COLUMNNAME_Help, Help); } /** Get Comment/Help. @return Comment or Hint */ public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** Set Distribution List. @param M_DistributionList_ID Distribution Lists allow to distribute product...
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Proce...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DistributionList.java
1
请完成以下Java代码
public void setData(T data) { this.data = data; } public String getCurrentTime() { return currentTime; } public void setCurrentTime(String currentTime) { this.currentTime = currentTime; } //提供几种构造方法 public BaseResp(int code, String message, T data) { this.c...
public BaseResp(ResultStatus resultStatus) { this.code = resultStatus.getErrorCode(); this.message = resultStatus.getErrorMsg(); this.data = data; this.currentTime = new Date().toString(); } public BaseResp(ResultStatus resultStatus, T data) { this.code = resultStatus.ge...
repos\spring-boot-quick-master\quick-rabbitmq\src\main\java\com\quick\mq\util\BaseResp.java
1
请在Spring Boot框架中完成以下Java代码
public ClientId createClient(CreateClientRequest createClientRequest) throws ServiceException { try { HttpRequest request = HttpRequest.newBuilder() .POST(HttpRequest.BodyPublishers.ofString(mapper.writeValueAsString(createClientRequest))) .uri(URI.create(base...
} @Override public void deleteClient(ClientId id) throws ServiceException { try { HttpRequest request = HttpRequest.newBuilder() .DELETE() .uri(URI.create(baseUri + "/client/" + id.getId())) .build(); HttpResponse<Strin...
repos\spring-examples-java-17\spring-bank\bank-client\src\main\java\itx\examples\springbank\client\service\AdminServiceImpl.java
2
请完成以下Java代码
protected void setElementProperty(String id, String propertyName, JsonNode propertyValue, ObjectNode infoNode) { ObjectNode bpmnNode = createOrGetBpmnNode(infoNode); if (!bpmnNode.has(id)) { bpmnNode.putObject(id); } ((ObjectNode) bpmnNode.get(id)).set(propertyName, property...
if (!localizationNode.has(language)) { localizationNode.putObject(language); } ObjectNode languageNode = (ObjectNode) localizationNode.get(language); if (!languageNode.has(id)) { languageNode.putObject(id); } ((ObjectNode) languageNode.get(id)).put(prope...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\DynamicBpmnServiceImpl.java
1
请完成以下Java代码
private void load(final XMLLoader loader) { loader.load(ITrx.TRXNAME_None); for (Object o : loader.getObjects()) { if (o instanceof I_AD_Migration) { final I_AD_Migration migration = (I_AD_Migration)o; execute(migration); } else { logger.warn("Unhandled type " + o + " [SKIP]"); } ...
} private void execute(I_AD_Migration migration) { final Properties ctx = InterfaceWrapperHelper.getCtx(migration); final int migrationId = migration.getAD_Migration_ID(); final IMigrationExecutorProvider executorProvider = Services.get(IMigrationExecutorProvider.class); final IMigrationExecutorContext migr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\process\MigrationLoader.java
1
请在Spring Boot框架中完成以下Java代码
private PaymentAllocationId saveCandidate_InboundPaymentToOutboundPayment(AllocationLineCandidate candidate) { final Money payAmt = candidate.getAmounts().getPayAmt(); Check.assumeEquals(candidate.getAmounts(), AllocationAmounts.builder() .payAmt(payAmt) .build()); final C_AllocationHdr_Builder allocat...
.orgId(candidate.getOrgId()) .currencyId(candidate.getCurrencyId()) .dateTrx(candidate.getDateTrx()) .dateAcct(candidate.getDateAcct()) .manual(true); // flag it as manually created by user } @Nullable private PaymentAllocationId createAndComplete(final C_AllocationHdr_Builder allocationBuilder) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\paymentallocation\service\AllocationLineCandidateSaver.java
2
请完成以下Java代码
public void initialize(VariableTypes types) { if (variableInstanceEntity == null) { VariableType type = types.findVariableType(value); if (type instanceof ByteArrayType) { throw new ActivitiIllegalArgumentException("Variables of type ByteArray cannot be used to query"); ...
if (variableInstanceEntity != null) { return variableInstanceEntity.getLongValue(); } return null; } public Double getDoubleValue() { if (variableInstanceEntity != null) { return variableInstanceEntity.getDoubleValue(); } return null; } p...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\QueryVariableValue.java
1
请完成以下Java代码
public String getHeader(String name) { List<String> list = header(name); if (list != null && !list.isEmpty()) { return list.iterator().next(); } return super.getHeader(name); } } } /** * Convenience class that converts an incoming request input stream into a form that can * be easily deserialize...
public boolean isReady() { return true; } }; } public ServletInputStream getInputStream() { ByteArrayInputStream body = new ByteArrayInputStream(builder.toString().getBytes()); return new ServletInputStream() { @Override public int read() throws IOException { return body.read(); } @Ove...
repos\spring-cloud-gateway-main\spring-cloud-gateway-proxyexchange-webmvc\src\main\java\org\springframework\cloud\gateway\mvc\ProxyExchange.java
1
请完成以下Java代码
private String computeKey(String serverSecret, String content) { String sha512Hex = Sha512DigestUtils.shaHex(content + ":" + serverSecret); String keyPayload = content + ":" + sha512Hex; return Utf8.decode(Base64.getEncoder().encode(Utf8.encode(keyPayload))); } @Override public @Nullable Token verifyToken(Str...
private String generatePseudoRandomNumber() { byte[] randomBytes = new byte[this.pseudoRandomNumberBytes]; this.secureRandom.nextBytes(randomBytes); return new String(Hex.encode(randomBytes)); } private String computeServerSecretApplicableAt(long time) { return this.serverSecret + ":" + Long.valueOf(time % t...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\token\KeyBasedPersistenceTokenService.java
1
请完成以下Java代码
public int getC_ILCandHandler_ID() { return get_ValueAsInt(COLUMNNAME_C_ILCandHandler_ID); } @Override public void setClassname (final java.lang.String Classname) { set_Value (COLUMNNAME_Classname, Classname); } @Override public java.lang.String getClassname() { return get_ValueAsString(COLUMNNAME_Cl...
public java.lang.String getEntityType() { return get_ValueAsString(COLUMNNAME_EntityType); } @Override public void setIs_AD_User_InCharge_UI_Setting (final boolean Is_AD_User_InCharge_UI_Setting) { set_Value (COLUMNNAME_Is_AD_User_InCharge_UI_Setting, Is_AD_User_InCharge_UI_Setting); } @Override public b...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\invoicecandidate\model\X_C_ILCandHandler.java
1