instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public String getF_ID() { return F_ID; } public void setF_ID(String f_ID) { F_ID = f_ID; } public String getF_CANTONID() { return F_CANTONID; } public void setF_CANTONID(String f_CANTONID) { F_CANTONID = f_CANTONID; } public String getF_OFFICEID() { ...
F_TOLLCODE = f_TOLLCODE; } public String getF_START() { return F_START; } public void setF_START(String f_START) { F_START = f_START; } public String getF_END() { return F_END; } public void setF_END(String f_END) { F_END = f_END; } public Str...
repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\common\vo\BscOfficeExeItem.java
1
请完成以下Java代码
public class PasswordPolicyControl implements Control { /** * OID of the Password Policy Control */ public static final String OID = "1.3.6.1.4.1.42.2.27.8.5.1"; @Serial private static final long serialVersionUID = 2843242715616817932L; private final boolean critical; /** * Creates a non-critical (reque...
public byte[] getEncodedValue() { return null; } /** * Returns the OID of the Password Policy Control ("1.3.6.1.4.1.42.2.27.8.5.1"). */ @Override public String getID() { return OID; } /** * Returns whether the control is critical for the client. */ @Override public boolean isCritical() { return ...
repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\ppolicy\PasswordPolicyControl.java
1
请完成以下Java代码
public class UserApplication { public static void main(String[] args) { SpringApplication.run(UserApplication.class, args); } @Bean @SuppressWarnings("unused") ApplicationRunner runner(UserRepository userRepository) { return args -> { long count = userRepository.count(); assertThat(count).isZero(); ...
} } @Getter @ToString @EqualsAndHashCode @RequiredArgsConstructor @Region("Users") class User { @lombok.NonNull @Id private final String name; } //interface UserRepository extends CrudRepository<User, String> { } interface UserRepository extends GemfireRepository<User, String> { }
repos\spring-boot-data-geode-main\spring-geode-samples\intro\quick-start\src\main\java\example\app\user\UserApplication.java
1
请完成以下Java代码
public List<I_M_HU> retrieveActiveSourceHus(@NonNull final MatchingSourceHusQuery query) { final IQueryBuilder<I_M_HU> queryBuilder = retrieveActiveSourceHusQuery(query); if (queryBuilder == null) { return ImmutableList.of(); } return queryBuilder.create().list(); } @Override public Set<HuId> retriev...
.addInSubQueryFilter(I_M_Source_HU.COLUMN_M_HU_ID, I_M_HU.COLUMN_M_HU_ID, huQuery) .create() .list(); } @VisibleForTesting static ICompositeQueryFilter<I_M_HU> createHuFilter(@NonNull final MatchingSourceHusQuery query) { final IQueryBL queryBL = Services.get(IQueryBL.class); final IHandlingUnitsDAO h...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\sourcehu\impl\SourceHuDAO.java
1
请在Spring Boot框架中完成以下Java代码
public class Chapter55Application { private static String CHANNEL = "didispace"; public static void main(String[] args) { SpringApplication.run(Chapter55Application.class, args); } @RestController static class RedisController { private RedisTemplate<String, String> redisTemplate;...
public MessageSubscriber(RedisTemplate redisTemplate) { RedisConnection redisConnection = redisTemplate.getConnectionFactory().getConnection(); redisConnection.subscribe(new MessageListener() { @Override public void onMessage(Message message, byte[] bytes) { ...
repos\SpringBoot-Learning-master\2.x\chapter5-5\src\main\java\com\didispace\chapter55\Chapter55Application.java
2
请完成以下Java代码
protected List<TimerJobEntity> getTimerDeclarations(ProcessDefinitionEntity processDefinition, Process process) { JobManager jobManager = Context.getCommandContext().getJobManager(); List<TimerJobEntity> timers = new ArrayList<TimerJobEntity>(); if (process != null && CollectionUtil.isNotEmpty(p...
if (timerJob != null) { timerJob.setProcessDefinitionId(processDefinition.getId()); if (processDefinition.getTenantId() != null) { timerJob.setTenantId(processDefinition.getTenantId()); }...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\deployer\TimerManager.java
1
请完成以下Java代码
public void reportNow() { if(metricsCollectionTask != null) { metricsCollectionTask.run(); } } public void reportValueAtOnce(String name, long value) { commandExecutor.execute(new ReportDbMetricsValueCmd(name, value)); } public long getReportingIntervalInSeconds() { return reportingInter...
metricsCollectionTask.setReporter(reporterId); } } protected class ReportDbMetricsValueCmd implements Command<Void> { protected String name; protected long value; public ReportDbMetricsValueCmd(String name, long value) { this.name = name; this.value = value; } @Override p...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\metrics\reporter\DbMetricsReporter.java
1
请完成以下Java代码
private Collection<HUAttributeQueryFilterVO> createBarcodeHUAttributeQueryFilterVOs() { if (Check.isEmpty(barcode, true)) { return ImmutableList.of(); } final HashMap<AttributeId, HUAttributeQueryFilterVO> filterVOs = new HashMap<>(); for (final I_M_Attribute attribute : getBarcodeAttributes()) { fi...
{ final IDimensionspecDAO dimensionSpecsRepo = Services.get(IDimensionspecDAO.class); final DimensionSpec barcodeDimSpec = dimensionSpecsRepo.retrieveForInternalNameOrNull(HUConstants.DIM_Barcode_Attributes); if (barcodeDimSpec == null) { return ImmutableList.of(); // no barcode dimension spec. Nothing to do...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUQueryBuilder_Attributes.java
1
请完成以下Java代码
public class TimezoneDisplayJava7 { public enum OffsetBase { GMT, UTC } public List<String> getTimeZoneList(OffsetBase base) { String[] availableZoneIds = TimeZone.getAvailableIDs(); List<String> result = new ArrayList<>(availableZoneIds.length); for (String zoneId : avail...
Collections.sort(result); return result; } private String calculateOffset(int rawOffset) { if (rawOffset == 0) { return "+00:00"; } long hours = TimeUnit.MILLISECONDS.toHours(rawOffset); long minutes = TimeUnit.MILLISECONDS.toMinutes(rawOffset); minu...
repos\tutorials-master\core-java-modules\core-java-datetime-string-2\src\main\java\com\baeldung\timezonedisplay\TimezoneDisplayJava7.java
1
请完成以下Java代码
public String getProtocol() { StringBuilder buffer = new StringBuilder(); for (char character : this.prefix.toCharArray()) { if (Character.isAlphabetic(character)) { buffer.append(character); } } return buffer.toString(); } /** * Gets the {@link String pattern} or template used to construct a ...
@Override public String toString() { return this.prefix; } /** * Gets the {@link ResourcePrefix} as a prefix use in a {@link java.net.URL}. * * @return the {@link java.net.URL} prefix. * @see #getUrlPrefixPattern() */ public String toUrlPrefix() { return String.format(getUrlPrefixPattern(), toString(...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\io\support\ResourcePrefix.java
1
请完成以下Java代码
public void setExternalSystem_Config_LeichMehl_ID (final int ExternalSystem_Config_LeichMehl_ID) { if (ExternalSystem_Config_LeichMehl_ID < 1) set_ValueNoCheck (COLUMNNAME_ExternalSystem_Config_LeichMehl_ID, null); else set_ValueNoCheck (COLUMNNAME_ExternalSystem_Config_LeichMehl_ID, ExternalSystem_Config_...
set_Value (COLUMNNAME_PluFileLocalFolder, PluFileLocalFolder); } @Override public java.lang.String getPluFileLocalFolder() { return get_ValueAsString(COLUMNNAME_PluFileLocalFolder); } @Override public void setProduct_BaseFolderName (final String Product_BaseFolderName) { set_Value (COLUMNNAME_Product_Bas...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_LeichMehl.java
1
请完成以下Java代码
public boolean supports(final ConfigAttribute attribute) { return attribute instanceof AccessPredicateConfigAttribute; } @Override public boolean supports(final Class<?> clazz) { return ServerCall.class.isAssignableFrom(clazz); } @Override public int vote(final Authentication a...
/** * Finds the first AccessPredicateConfigAttribute in the given collection. * * @param attributes The attributes to search in. * @return The first found AccessPredicateConfigAttribute or null, if no such elements were found. */ private AccessPredicateConfigAttribute find(final Collection<...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\security\check\AccessPredicateVoter.java
1
请完成以下Java代码
public Mono<ServerHttpRequest> removeMatchingRequest(ServerWebExchange exchange) { MultiValueMap<String, String> queryParams = exchange.getRequest().getQueryParams(); if (this.matchingRequestParameterName != null && !queryParams.containsKey(this.matchingRequestParameterName)) { logger.trace( "matchingReques...
} private static String pathInApplication(ServerHttpRequest request) { String path = request.getPath().pathWithinApplication().value(); String query = request.getURI().getRawQuery(); return path + ((query != null) ? "?" + query : ""); } private URI createRedirectUri(String uri) { if (this.matchingRequestPa...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\savedrequest\WebSessionServerRequestCache.java
1
请完成以下Java代码
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 ID/ColumnName @return ID/ColumnName pair */ public KeyNam...
/** Set Sequence. @param SeqNo Method of ordering records; lowest number comes first */ public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Sequence. @return Method of ordering records; lowest number comes first */ public int getSeqNo () { Integer ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CycleStep.java
1
请完成以下Java代码
public void onMsg(TbContext ctx, TbMsg msg) { var tbMsg = ackIfNeeded(ctx, msg); try { withCallback(ctx.getSmsExecutor().executeAsync(() -> { sendSms(ctx, tbMsg); return null; }), ok -> tellSuccess(ctx, t...
for (String numberTo : numbersToList) { this.smsSender.sendSms(numberTo, message); } } } @Override public void destroy() { if (this.smsSender != null) { this.smsSender.destroy(); } } private SmsSender createSmsSender(TbContext ctx) { ...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\sms\TbSendSmsNode.java
1
请完成以下Java代码
public boolean isAncestorFlowScopeOf(ScopeImpl other) { ScopeImpl otherAncestor = other.getFlowScope(); while (otherAncestor != null) { if (this == otherAncestor) { return true; } else { otherAncestor = otherAncestor.getFlowScope(); } } return false; } publi...
public List<ActivityImpl> getActivities() { return flowActivities; } public Set<ActivityImpl> getEventActivities() { return eventActivities; } public boolean isSubProcessScope() { return isSubProcessScope; } public void setSubProcessScope(boolean isSubProcessScope) { this.isSubProcessScop...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\process\ScopeImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class ArticleService { @Resource private IArticleDAO articleDAO; public Article getArticleById(int articleId) { Article obj = articleDAO.getArticleById(articleId); return obj; } public List<Article> getAllArticles() { return articleDAO.getAllArticles(); } p...
if (articleDAO.articleExists(article.getTitle(), article.getCategory())) { return false; } else { articleDAO.addArticle(article); return true; } } public void updateArticle(Article article) { articleDAO.updateArticle(article); } public void d...
repos\SpringBootBucket-master\springboot-hibernate\src\main\java\com\xncoding\pos\service\ArticleService.java
2
请完成以下Java代码
public void executeQuery() { } public Trx getTrx() { return trx; } public void setTrx(Trx trx) { this.trx = trx; } public ProcessInfo getProcessInfo() { return pi; } public void setProcessInfo(ProcessInfo pi) { this.pi = pi; } public boolean isSelectionActive() { return m_selectionActive; ...
} public void setReportEngineType(int reportEngineType) { this.reportEngineType = reportEngineType; } public MPrintFormat getPrintFormat() { return this.printFormat; } public void setPrintFormat(MPrintFormat printFormat) { this.printFormat = printFormat; } public String getAskPrintMsg() { return as...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\GenForm.java
1
请完成以下Java代码
public int createMeasures (MSLAGoal goal) { String sql = "SELECT M_InOut_ID, io.MovementDate-o.DatePromised," // 1..2 + " io.MovementDate, o.DatePromised, o.DocumentNo " + "FROM M_InOut io" + " INNER JOIN C_Order o ON (io.C_Order_ID=o.C_Order_ID) " + "WHERE io.C_BPartner_ID=?" + " AND NOT EXISTS " ...
} // createMeasures /************************************************************************** * Calculate Goal Actual from unprocessed Measures * @return goal actual measure */ @Override public BigDecimal calculateMeasure (MSLAGoal goal) { // Average BigDecimal retValue = Env.ZERO; BigDecimal total...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\sla\DeliveryAccuracy.java
1
请完成以下Java代码
private WorkQueue nextFromQueue0() { if (iterator.hasNext()) { // once we get the record from the queue, we also add it to our result final WorkQueue next = iterator.next(); final ITableRecordReference tableRecordReference = next.getTableRecordReference(); final IDLMAware model = tableRecordReference.g...
return handlerSupport.getRegisteredHandlers(); } @Override public boolean isHandlerSignaledToStop() { return handlerSupport.isHandlerSignaledToStop(); } @Override public String toString() { return "IterateResult [queueItemsToProcess.size()=" + queueItemsToProcess.size() + ", queueItemsToDelete.size()=...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\partitioner\impl\CreatePartitionIterateResult.java
1
请完成以下Java代码
public int getDiscount() { return get_ValueAsInt(COLUMNNAME_Discount); } @Override public void setDiscountAmt (final @Nullable BigDecimal DiscountAmt) { set_ValueNoCheck (COLUMNNAME_DiscountAmt, DiscountAmt); } @Override public BigDecimal getDiscountAmt() { final BigDecimal bd = get_ValueAsBigDecimal...
public void setEDI_cctop_invoic_v_ID (final int EDI_cctop_invoic_v_ID) { if (EDI_cctop_invoic_v_ID < 1) set_Value (COLUMNNAME_EDI_cctop_invoic_v_ID, null); else set_Value (COLUMNNAME_EDI_cctop_invoic_v_ID, EDI_cctop_invoic_v_ID); } @Override public int getEDI_cctop_invoic_v_ID() { return get_ValueA...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_cctop_140_v.java
1
请完成以下Java代码
public void setAD_Window_ID (int AD_Window_ID) { if (AD_Window_ID < 1) set_Value (COLUMNNAME_AD_Window_ID, null); else set_Value (COLUMNNAME_AD_Window_ID, Integer.valueOf(AD_Window_ID)); } /** Get Window. @return Data entry or display window */ public int getAD_Window_ID () { Integer ii = (Int...
return (String)get_Value(COLUMNNAME_Attribute); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getAttribute()); } /** Set Search Key. @param Value Search key for the record in the format ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Preference.java
1
请完成以下Java代码
public void setM_InOutLine_ID (final int M_InOutLine_ID) { if (M_InOutLine_ID < 1) set_Value (COLUMNNAME_M_InOutLine_ID, null); else set_Value (COLUMNNAME_M_InOutLine_ID, M_InOutLine_ID); } @Override public int getM_InOutLine_ID() { return get_ValueAsInt(COLUMNNAME_M_InOutLine_ID); } @Override ...
@Override public BigDecimal getQtyDeliveredInStockingUOM() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyDeliveredInStockingUOM); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyDeliveredInUOM (final BigDecimal QtyDeliveredInUOM) { set_Value (COLUMNNAME_QtyDeliveredIn...
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 List<X_AD_ReplicationDocument> getReplicationDocuments() { final String whereClause = I_AD_ReplicationDocument.COLUMNNAME_AD_ReplicationStrategy_ID+"=?"; // #1 return new Query(getCtx(),I_AD_ReplicationDocument.Table_Name,whereClause,get_TrxName()) //.setClient_ID() // metas: tsa: don't use this becau...
*/ public static X_AD_ReplicationDocument getReplicationDocument(Properties ctx ,int AD_ReplicationStrategy_ID , int AD_Table_ID) { final String whereClause = I_AD_ReplicationDocument.COLUMNNAME_AD_ReplicationStrategy_ID + "=? AND " + I_AD_ReplicationDocument.COLUMNNAME_AD_Table_ID + "=?"; return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MReplicationStrategy.java
1
请完成以下Java代码
public void setFileName (final @Nullable java.lang.String FileName) { set_Value (COLUMNNAME_FileName, FileName); } @Override public java.lang.String getFileName() { return get_ValueAsString(COLUMNNAME_FileName); } @Override public void setHash (final @Nullable java.lang.String Hash) { set_Value (COLUM...
} @Override public boolean isValid() { return get_ValueAsBoolean(COLUMNNAME_IsValid); } @Override public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-gen\de\metas\payment\esr\model\X_ESR_ImportFile.java
1
请完成以下Java代码
public void setExternalSystem_Status_ID (final int ExternalSystem_Status_ID) { if (ExternalSystem_Status_ID < 1) set_ValueNoCheck (COLUMNNAME_ExternalSystem_Status_ID, null); else set_ValueNoCheck (COLUMNNAME_ExternalSystem_Status_ID, ExternalSystem_Status_ID); } @Override public int getExternalSystem_...
/** Active = Active */ public static final String EXTERNALSYSTEMSTATUS_Active = "Active"; /** Inactive = Inactive */ public static final String EXTERNALSYSTEMSTATUS_Inactive = "Inactive"; /** Error = Error */ public static final String EXTERNALSYSTEMSTATUS_Error = "Error "; /** Down = Down */ public static fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Status.java
1
请完成以下Java代码
public class EmployeeDTO implements Serializable { @QuerySqlField(index = true) private Integer id; @QuerySqlField(index = true) private String name; @QuerySqlField(index = true) private boolean isEmployed; public Integer getId() { return id; } public void setId(Integer id...
} public boolean isEmployed() { return isEmployed; } public void setEmployed(boolean employed) { isEmployed = employed; } @Override public String toString() { return "EmployeeDTO{" + "id=" + id + ", name='" + name + '\'' + ...
repos\tutorials-master\libraries-data-3\src\main\java\com\baeldung\ignite\spring\dto\EmployeeDTO.java
1
请完成以下Java代码
public int getRecord_ID() { return get_ValueAsInt(COLUMNNAME_Record_ID); } @Override public void setTextMsg (final java.lang.String TextMsg) { set_Value (COLUMNNAME_TextMsg, TextMsg); } @Override public java.lang.String getTextMsg() { return get_ValueAsString(COLUMNNAME_TextMsg); } /** * WFStat...
public static final String WFSTATE_Completed = "CC"; /** Aborted = CA */ public static final String WFSTATE_Aborted = "CA"; /** Terminated = CT */ public static final String WFSTATE_Terminated = "CT"; @Override public void setWFState (final java.lang.String WFState) { set_Value (COLUMNNAME_WFState, WFState); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_EventAudit.java
1
请完成以下Java代码
private static ChartOfAccounts fromRecord(@NonNull final I_C_Element record) { return ChartOfAccounts.builder() .id(ChartOfAccountsId.ofRepoId(record.getC_Element_ID())) .name(record.getName()) .clientId(ClientId.ofRepoId(record.getAD_Client_ID())) .orgId(OrgId.ofRepoId(record.getAD_Org_ID())) .t...
public Optional<ChartOfAccounts> getByTreeId(@NonNull final AdTreeId treeId) { return getMap().getByTreeId(treeId); } ChartOfAccounts createChartOfAccounts( @NonNull final String name, @NonNull final ClientId clientId, @NonNull final OrgId orgId, @NonNull final AdTreeId chartOfAccountsTreeId) { fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\elementvalue\ChartOfAccountsRepository.java
1
请完成以下Java代码
private void executeQuery(final GridTabMaxRows maxRows) { final GridController gc = getGridController(); if (gc != null) { clientUI.invoke() .setLongOperation(true) .setParentComponentByWindowNo(m_targetWindowNo) .setRunnable(new Runnable() { @Override public void run() {...
@Override public boolean isFocusable() { if (!isVisible()) { return false; } if (isSimpleSearchPanelActive()) { return m_editorFirst != null; } return false; } @Override public void setFocusable(final boolean focusable) { // ignore it } @Override public void requestFocus() { if (is...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\FindPanel.java
1
请完成以下Java代码
protected VariableStore<CoreVariableInstance> getVariableStore() { return variableStore; } @Override protected VariableInstanceFactory<CoreVariableInstance> getVariableInstanceFactory() { return (VariableInstanceFactory) SimpleVariableInstanceFactory.INSTANCE; } @Override protected List<VariableIn...
public ProcessEngine getProcessEngine() { throw new UnsupportedOperationException(ProcessEngineServicesAware.class.getName() +" is unsupported in transient ExecutionImpl"); } public void forceUpdate() { // nothing to do } public void fireHistoricProcessStartEvent() { // do nothing } protected...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\ExecutionImpl.java
1
请在Spring Boot框架中完成以下Java代码
public static List toList() { NotifyTypeEnum[] ary = NotifyTypeEnum.values(); List list = new ArrayList(); for (int i = 0; i < ary.length; i++) { Map<String, String> map = new HashMap<String, String>(); map.put("desc", ary[i].getDesc()); list.add(map); ...
* 取枚举的json字符串 * * @return */ public static String getJsonStr() { NotifyTypeEnum[] enums = NotifyTypeEnum.values(); StringBuffer jsonStr = new StringBuffer("["); for (NotifyTypeEnum senum : enums) { if (!"[".equals(jsonStr.toString())) { jsonStr.appe...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\notify\enums\NotifyTypeEnum.java
2
请完成以下Java代码
public void setTenantIdIn(List<String> tenantIds) { this.tenantIds = tenantIds; } @CamundaQueryParam(value = "withoutTenantId", converter = BooleanConverter.class) public void setWithoutTenantId(Boolean withoutTenantId) { this.withoutTenantId = withoutTenantId; } @CamundaQueryParam(value="suspended"...
query.withoutTenantId(); } if (tenantIds != null && !tenantIds.isEmpty()) { query.tenantIdIn(tenantIds.toArray(new String[tenantIds.size()])); } if (TRUE.equals(suspended)) { query.suspended(); } if (FALSE.equals(suspended)) { query.active(); } } protected void applySo...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\batch\BatchQueryDto.java
1
请完成以下Java代码
public Integer getUserType() { return userType; } /** * Set the user type. * * @param userType the user type */ public void setUserType(Integer userType) { this.userType = userType; } /** * Get the creates the by. * * @return the creates the by ...
*/ public Integer getDisabled() { return disabled; } /** * Set the disabled. * * @param disabled the disabled */ public void setDisabled(Integer disabled) { this.disabled = disabled; } /** * Get the theme. * * @return the theme */ pub...
repos\springBoot-master\springboot-mybatis\src\main\java\com\us\example\bean\User.java
1
请完成以下Java代码
public class ConvertNumberBases { public static String convertNumberToNewBase(String number, int base, int newBase) { return Integer.toString(Integer.parseInt(number, base), newBase); } public static String convertNumberToNewBaseCustom(String num, int base, int newBase) { int decimalNumber...
} public static int convertFromAnyBaseToDecimal(String num, int base) { if (base < 2 || (base > 10 && base != 16)) { return -1; } int val = 0; int power = 1; for (int i = num.length() - 1; i >= 0; i--) { int digit = charToDecimal(num.charAt(i)); ...
repos\tutorials-master\core-java-modules\core-java-lang-5\src\main\java\com\baeldung\convertnumberbases\ConvertNumberBases.java
1
请在Spring Boot框架中完成以下Java代码
private String getAccessorName(String methodName) { if (this.isRecord && this.fields.containsKey(methodName)) { return methodName; } if (methodName.startsWith("is")) { return lowerCaseFirstCharacter(methodName.substring(2)); } if (methodName.startsWith("get") || methodName.startsWith("set")) { return...
ExecutableElement getPublicGetter(String name, TypeMirror type) { List<ExecutableElement> candidates = this.publicGetters.get(name); return getPublicAccessor(candidates, type, (specificType) -> getMatchingGetter(candidates, specificType)); } ExecutableElement getPublicSetter(String name, TypeMirror type) { Lis...
repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\TypeElementMembers.java
2
请在Spring Boot框架中完成以下Java代码
public Object getCredentials() { return null; } @Override public Object getDetails() { return null; } @Override public Object getPrincipal() { return name; } @Override
public boolean isAuthenticated() { return isAuthenticated; } @Override public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException { this.isAuthenticated = isAuthenticated; } @Override public String getName() { return name; } }
repos\spring-examples-java-17\spring-jcasbin\src\main\java\itx\examples\springboot\security\config\AuthenticationImpl.java
2
请完成以下Java代码
public class NumberOfDigitsDriver { private static NumberOfDigits numberOfDigits; private static Logger LOG = Logger.getLogger(NumberOfDigitsDriver.class.getName()); static { numberOfDigits = new NumberOfDigits(); } public static void main(String[] args) { LOG.info("Testing all me...
length = numberOfDigits.logarithmicApproach(602); LOG.info("Logarithmic Approach : " + length); length = numberOfDigits.repeatedMultiplication(602); LOG.info("Repeated Multiplication : " + length); length = numberOfDigits.shiftOperators(602); LOG.info("Shift Operators : " + len...
repos\tutorials-master\core-java-modules\core-java-numbers\src\main\java\com\baeldung\numberofdigits\NumberOfDigitsDriver.java
1
请完成以下Java代码
public static String extractXsdValueOrNull(@NonNull final InputStream xmlInput) { final XMLInputFactory f = XMLInputFactory.newInstance(); try { final XMLStreamReader r = f.createXMLStreamReader(xmlInput); while (r.hasNext()) { final int eventType = r.next(); if (XMLStreamReader.START_ELEMENT ==...
} catch (final XMLStreamException e) { throw new XsdValueExtractionFailedException(e); } } public static class XsdValueExtractionFailedException extends RuntimeException { private static final long serialVersionUID = 8456946625940728739L; private XsdValueExtractionFailedException(@NonNull final XMLStr...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\xml\XmlIntrospectionUtil.java
1
请完成以下Java代码
public BBANStructureEntryBuilder addBBANStructureEntry() { final BBANStructureEntryBuilder entryBuilder = new BBANStructureEntryBuilder(this); entryBuilders.add(entryBuilder); return entryBuilder; } private void sortEntries() { List<BBANStructureEntry> listEntries = _BBANStructure.getEntries(); // if th...
final int no2 = Integer.valueOf(seqNo2); // order if (no1 > no2) { return 1; } else if (no1 < no2) { return -1; } else { return 0; } }); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java\de\metas\payment\sepa\api\impl\BBANStructureBuilder.java
1
请完成以下Java代码
public Date getExecutionStartTime() { return executionStartTime; } public void setExecutionStartTime(final Date executionStartTime) { this.executionStartTime = executionStartTime; } @Override public Object getPersistentState() { Map<String, Object> persistentState = new HashMap<String, Object>()...
public void delete() { HistoricIncidentManager historicIncidentManager = Context.getCommandContext().getHistoricIncidentManager(); historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(seedJobDefinitionId); historicIncidentManager.deleteHistoricIncidentsByJobDefinitionId(monitorJobDefinitionId); ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\history\HistoricBatchEntity.java
1
请完成以下Java代码
public String getLabel() { return label; } public void setLabel(String label) { this.label = label; } @Schema(description = "JSON object with Asset Profile Id.") public AssetProfileId getAssetProfileId() { return assetProfileId; } public void setAssetProfileId(Asse...
builder.append(", label="); builder.append(label); builder.append(", assetProfileId="); builder.append(assetProfileId); builder.append(", additionalInfo="); builder.append(getAdditionalInfo()); builder.append(", createdTime="); builder.append(createdTime); ...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\asset\Asset.java
1
请完成以下Java代码
public IUnlockCommand setOwner(final LockOwner owner) { this.owner = owner; return this; } @Override public final LockOwner getOwner() { Check.assumeNotNull(owner, UnlockFailedException.class, "owner not null"); return this.owner; } @Override public IUnlockCommand setRecordByModel(final Object model) ...
public IUnlockCommand setRecordsBySelection(final Class<?> modelClass, final PInstanceId adPIstanceId) { _recordsToUnlock.setRecordsBySelection(modelClass, adPIstanceId); return this; } @Override public final AdTableId getSelectionToUnlock_AD_Table_ID() { return _recordsToUnlock.getSelection_AD_Table_ID(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\api\impl\UnlockCommand.java
1
请完成以下Java代码
protected ClassLoader createClassLoader(Collection<URL> urls) throws Exception { if (this.classPathIndex != null) { urls = new ArrayList<>(urls); urls.addAll(this.classPathIndex.getUrls()); } return super.createClassLoader(urls); } @Override protected final Archive getArchive() { return this.archive; ...
@Override protected Set<URL> getClassPathUrls() throws Exception { return this.archive.getClassPathUrls(this::isIncludedOnClassPathAndNotIndexed, this::isSearchedDirectory); } /** * Determine if the specified directory entry is a candidate for further searching. * @param entry the entry to check * @return {...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\launch\ExecutableArchiveLauncher.java
1
请在Spring Boot框架中完成以下Java代码
public class Person { @Id // @Id注解指明这个属性映射为数据库的主键。 @GeneratedValue // @GeneratedValue注解默认使用主键生成方式为自增,hibernate会为我们自动生成一个名为HIBERNATE_SEQUENCE的序列。 private Long id; private String name; private Integer age; private String address; public Person() { super(); } public Person(Long id, String name, Integer age...
public void setName(String name) { this.name = name; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } @Override public String toString(...
repos\spring-boot-student-master\spring-boot-student-cache\src\main\java\com\xiaolyuh\entity\Person.java
2
请完成以下Java代码
default LocalDate getNextBusinessDay(@NonNull final LocalDate date) { LocalDate currentDate = date; while (!isBusinessDay(currentDate)) { currentDate = currentDate.plusDays(1); } return currentDate; } /** * Gets previous business day. * * If given date is a business day then that date will be re...
{ Check.assumeGreaterOrEqualToZero(targetWorkingDays, "targetWorkingDays"); LocalDate currentDate = date; // Skip until we find the first business day while (!isBusinessDay(currentDate)) { currentDate = currentDate.minusDays(1); } if (targetWorkingDays == 0) { return currentDate; } int wor...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\calendar\IBusinessDayMatcher.java
1
请完成以下Java代码
public void setT_Integer (final int T_Integer) { set_Value (COLUMNNAME_T_Integer, T_Integer); } @Override public int getT_Integer() { return get_ValueAsInt(COLUMNNAME_T_Integer); } @Override public void setT_Number (final @Nullable BigDecimal T_Number) { set_Value (COLUMNNAME_T_Number, T_Number); } ...
@Override public void setT_Time (final @Nullable java.sql.Timestamp T_Time) { set_Value (COLUMNNAME_T_Time, T_Time); } @Override public java.sql.Timestamp getT_Time() { return get_ValueAsTimestamp(COLUMNNAME_T_Time); } @Override public void setTest_ID (final int Test_ID) { if (Test_ID < 1) set_Va...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Test.java
1
请完成以下Java代码
public NotificationDeliveryMethod getMethod() { return NotificationDeliveryMethod.MICROSOFT_TEAMS; } @Override public MicrosoftTeamsDeliveryMethodNotificationTemplate copy() { return new MicrosoftTeamsDeliveryMethodNotificationTemplate(this); } @Data @NoArgsConstructor publ...
private boolean setEntityIdInState; public Button(Button other) { this.enabled = other.enabled; this.text = other.text; this.linkType = other.linkType; this.link = other.link; this.dashboardId = other.dashboardId; this.dashboardState = oth...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\notification\template\MicrosoftTeamsDeliveryMethodNotificationTemplate.java
1
请完成以下Java代码
private Node insert(Node root, int key) { if (root == null) { return new Node(key); } else if (root.key > key) { root.left = insert(root.left, key); } else if (root.key < key) { root.right = insert(root.right, key); } else { throw new Runti...
private Node rotateRight(Node y) { Node x = y.left; Node z = x.right; x.right = y; y.left = z; updateHeight(y); updateHeight(x); return x; } private Node rotateLeft(Node y) { Node x = y.right; Node z = x.left; x.left = y; y...
repos\tutorials-master\data-structures-2\src\main\java\com\baeldung\avltree\AVLTree.java
1
请在Spring Boot框架中完成以下Java代码
public class ESR_Import { private final IBPartnerOrgBL bPartnerOrgBL = Services.get(IBPartnerOrgBL.class); private final IBPBankAccountDAO bankAccountDAO = Services.get(IBPBankAccountDAO.class); private final IOrgDAO orgDAO = Services.get(IOrgDAO.class); private final AdMessageKey ERR_ESR_Import_DefaultAccountNotF...
{ throw new OrgHasNoBPartnerLinkException(orgId); } final BPartnerId orgBpartnerId = orgBPartnerIdOptional.get(); final Optional<I_C_BP_BankAccount> orgBankAccount = bankAccountDAO.retrieveDefaultBankAccountInTrx(orgBpartnerId); if (!orgBankAccount.isPresent()) { final I_AD_Org org = orgDAO.getBy...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\model\validator\ESR_Import.java
2
请完成以下Java代码
public int getParameterAsInt(final String parameterName, final int defaultValue) { return values.getParameterAsInt(parameterName, defaultValue); } @Override public <T extends RepoIdAware> T getParameterAsId(String parameterName, Class<T> type) { return values.getParameterAsId(parameterName, type); } @Overr...
return valuesTo.getParameterAsBool(parameterName); } @Override public Timestamp getParameter_ToAsTimestamp(final String parameterName) { return valuesTo.getParameterAsTimestamp(parameterName); } @Override public BigDecimal getParameter_ToAsBigDecimal(final String parameterName) { return valuesTo.getParame...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\api\RangeAwareParams.java
1
请在Spring Boot框架中完成以下Java代码
public C createContainer(TopicPartitionOffset... topicsAndPartitions) { return createContainer(new KafkaListenerEndpointAdapter() { @Override public TopicPartitionOffset[] getTopicPartitionsToAssign() { return Arrays.copyOf(topicsAndPartitions, topicsAndPartitions.length); } }); } @Override publi...
public Pattern getTopicPattern() { return topicPattern; } }); } protected C createContainer(KafkaListenerEndpoint endpoint) { final C container = createContainerInstance(endpoint); initializeContainer(container, endpoint); customizeContainer(container, endpoint); return container; } @SuppressWar...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\config\AbstractKafkaListenerContainerFactory.java
2
请完成以下Java代码
static class Searcher extends BaseSearcher<CoreDictionary.Attribute> { /** * 分词从何处开始,这是一个状态 */ int begin; private LinkedList<Map.Entry<String, CoreDictionary.Attribute>> entryList; protected Searcher(char[] c) { super(c); entryList ...
* 解析一段文本(目前采用了BinTrie+DAT的混合储存形式,此方法可以统一两个数据结构) * * @param text 文本 * @param processor 处理器 */ public static void parseText(String text, AhoCorasickDoubleArrayTrie.IHit<CoreDictionary.Attribute> processor) { DEFAULT.parseText(text, processor); } /** * 最长匹配 * ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\CustomDictionary.java
1
请完成以下Java代码
public Class<? extends DbEntity> getEntityType() { return entityType; } public void setEntityType(Class<? extends DbEntity> entityType) { this.entityType = entityType; } public DbOperationType getOperationType() { return operationType; } public void setOperationType(DbOperationType operationT...
public Exception getFailure() { return failure; } public void setFailure(Exception failure) { this.failure = failure; } public enum State { NOT_APPLIED, APPLIED, /** * Indicates that the operation was not performed for any reason except * concurrent modifications. */ ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\entitymanager\operation\DbOperation.java
1
请完成以下Java代码
public static DocumentFilter createFilter(@NonNull final HUIdsFilterData filterData) { return DocumentFilter.singleParameterFilter(FILTER_ID, FILTER_PARAM_Data, Operator.EQUAL, filterData); } static HUIdsFilterData extractFilterData(@NonNull final DocumentFilter huIdsFilter) { if (isNotHUIdsFilter(huIdsFilter)...
throw new AdempiereException("No " + HUIdsFilterData.class + " found for " + huIdsFilter); } return huIdsFilterData; } public static Optional<HUIdsFilterData> extractFilterData(@Nullable final DocumentFilterList filters) { return findExisting(filters).map(HUIdsFilterHelper::extractFilterData); } public sta...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\filter\HUIdsFilterHelper.java
1
请完成以下Java代码
public void setCmmnElement(CmmnElement cmmnElement) { this.cmmnElement = cmmnElement; } // sentry public List<CmmnSentryDeclaration> getSentries() { return sentries; } public CmmnSentryDeclaration getSentry(String sentryId) { return sentryMap.get(sentryId); } public void addSentry(CmmnSent...
* the listener is defined on. */ public Map<String, List<VariableListener<?>>> getVariableListeners(String eventName, boolean includeCustomListeners) { Map<String, Map<String, List<VariableListener<?>>>> listenerCache; if (includeCustomListeners) { if (resolvedVariableListeners == null) { res...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\model\CmmnActivity.java
1
请完成以下Java代码
public class HTTPTokener extends JSONTokener { /** * Construct an HTTPTokener from a string. * * @param s * A source string. */ public HTTPTokener(String s) { super(s); } /** * Get the next token or string. This is used in parsing HTTP headers. * ...
for (;;) { c = next(); if (c < ' ') { throw syntaxError("Unterminated string."); } if (c == q) { return sb.toString(); } sb.append(c); } } for (;;) { ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\json\HTTPTokener.java
1
请在Spring Boot框架中完成以下Java代码
public class Cause4NonTransientConfig { @Autowired private Environment env; public Cause4NonTransientConfig() { super(); } @Bean public LocalSessionFactoryBean sessionFactory() { final LocalSessionFactoryBean sessionFactory = new LocalSessionFactoryBean(); sessionFacto...
@Bean public HibernateTransactionManager transactionManager() { final HibernateTransactionManager txManager = new HibernateTransactionManager(); txManager.setSessionFactory(sessionFactory().getObject()); return txManager; } @Bean public PersistenceExceptionTranslationPostProces...
repos\tutorials-master\spring-exceptions\src\main\java\com\baeldung\ex\nontransientexception\cause\Cause4NonTransientConfig.java
2
请完成以下Java代码
public synchronized String toString() { final StringBuilder sb = new StringBuilder(getClass().getSimpleName()).append("["); sb.append("lastError=").append(lastError); sb.append(", lastException=").append(lastException); sb.append(", lastWarning=").append(lastWarning); sb.append("]"); return sb.toStr...
return lastWarningToReturn; } public synchronized void setLastWarning(final ValueNamePair lastWarning) { this.lastWarning = lastWarning; } public synchronized void reset() { lastError = null; lastException = null; lastWarning = null; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\logging\MetasfreshLastError.java
1
请完成以下Java代码
public void syncContacts( @NonNull final CampaignId campaignId, @NonNull final SyncDirection syncDirection) { final List<ContactPerson> contactsToSync = contactPersonService.getByCampaignId(campaignId); syncContacts(campaignId, contactsToSync, syncDirection); } public void syncContacts( @NonNull final ...
final PlatformClient platformClient = platformClientService.createPlatformClient(campaign.getPlatformId()); final List<? extends SyncResult> syncResults = syncDirection.map(new SyncDirection.CaseMapper<List<? extends SyncResult>>() { @Override public List<? extends SyncResult> localToRemote() {return platfor...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java\de\metas\marketing\base\CampaignSyncService.java
1
请在Spring Boot框架中完成以下Java代码
public R<List<MenuVO>> buttons(BladeUser user) { List<MenuVO> list = menuService.buttons(user.getRoleId()); return R.data(list); } /** * 获取菜单树形结构 */ @GetMapping("/tree") @ApiOperationSupport(order = 9) @Operation(summary = "树形结构", description = "树形结构") public R<List<MenuVO>> tree() { List<MenuVO> tree ...
if (Func.isEmpty(user)) { return null; } List<TopMenu> list = topMenuService.list(Wrappers.<TopMenu>query().lambda().orderByAsc(TopMenu::getSort)); return R.data(list); } /** * 获取顶部菜单树形结构 */ @GetMapping("/grant-top-tree") @PreAuth(RoleConstant.HAS_ROLE_ADMIN) @ApiOperationSupport(order = 14) @Operat...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\controller\MenuController.java
2
请完成以下Java代码
public int hashCode() { if (_hashCode == null) { _hashCode = new HashcodeBuilder() .append(C_BPartner_ID) .append(M_Product_ID) .append(M_AttributeSetInstance_ID) // .append(M_HU_PI_Item_Product_ID) .append(C_Flatrate_DataEntry_ID) .toHashcode(); } return _hashCode; } public...
private int C_Flatrate_DataEntry_ID = -1; private Builder() { super(); } public PMMBalanceSegment build() { return new PMMBalanceSegment(this); } public Builder setC_BPartner_ID(final int C_BPartner_ID) { this.C_BPartner_ID = C_BPartner_ID; return this; } public Builder setM_Product_...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\balance\PMMBalanceSegment.java
1
请完成以下Java代码
protected void afterHUAddedToCreatedList(final I_M_HU hu) { if (handlingUnitsBL.isLoadingUnit(hu)) { _createdLUs.add(hu); } else { _createdTUsForRemainingQty.add(hu); } } @Override public int getCreatedLUsCount() { return _createdLUs.size(); } @Override public Quantity calculateTotalQtyCU(...
return Quantity.infinite(cuUOM); } final BigDecimal qtyLUs = BigDecimal.valueOf(getMaxLUs()); Check.assume(qtyLUs.signum() >= 0, "Valid QtyLUs: {}", qtyLUs); final BigDecimal qtyTUsPerLU = BigDecimal.valueOf(getMaxTUsPerLU_Effective()); Check.assume(qtyTUsPerLU.signum() >= 0, "Valid QtyTUsPerLU: {}", q...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\impl\LUTUProducerDestination.java
1
请完成以下Java代码
public void onApplicationEvent(AbstractAuthorizationEvent event) { if (event instanceof AuthenticationCredentialsNotFoundEvent) { onAuthenticationCredentialsNotFoundEvent((AuthenticationCredentialsNotFoundEvent) event); } if (event instanceof AuthorizationFailureEvent) { onAuthorizationFailureEvent((Authori...
} private void onAuthorizedEvent(AuthorizedEvent authEvent) { logger.info(LogMessage.format( "Security authorized for authenticated principal: %s; secure object: %s; configuration attributes: %s", authEvent.getAuthentication(), authEvent.getSource(), authEvent.getConfigAttributes())); } private void onAu...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\event\LoggerListener.java
1
请在Spring Boot框架中完成以下Java代码
public String chunk(Chunk chunk, String uploadId) { String filename = chunk.getFilename(); String chunkFilePath = uploadId + "/" + chunk.getChunkNumber(); try (InputStream in = chunk.getFile().getInputStream(); OutputStream out = Files.newOutputStream(Paths.get(chunkFilePath))) { ...
throw new RuntimeException(e); } }); } catch (IOException e) { log.info("File [{}] merge failed", filename, e); throw new RuntimeException(e); } finally { FileUtil.del(chunkProcess.getUploadId()); } } @Override public R...
repos\springboot-demo-master\file\src\main\java\com\et\service\impl\LocalFileSystemClient.java
2
请完成以下Java代码
static Collector<IStringExpression, ?, IStringExpression> collectJoining(final String delimiter) { final Supplier<List<IStringExpression>> supplier = ArrayList::new; final BiConsumer<List<IStringExpression>, IStringExpression> accumulator = (list, item) -> list.add(item); final BinaryOperator<List<IStringExpress...
{ final String expressionStr = evaluate(ctx, OnVariableNotFound.Preserve); return StringExpressionCompiler.instance.compile(expressionStr); } /** * Turns this expression in an expression which caches it's evaluation results. * If this expression implements {@link ICachedStringExpression} it will be returned ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\IStringExpression.java
1
请完成以下Java代码
public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** 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 get...
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Sequence. @return Method of ordering records; lowest number comes first */ public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) return 0; return ii.intValue(); } /** Set Version. @param Versi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Modification.java
1
请在Spring Boot框架中完成以下Java代码
public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public...
} public void setField3(String field3) { this.field3 = field3; } public String getField4() { return field4; } public void setField4(String field4) { this.field4 = field4; } public String getField5() { return field5; } public void setField5(String ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\vo\F2FPayResultVo.java
2
请完成以下Java代码
public int signum() { return getAsBigDecimal().signum(); } public boolean isZero() { return signum() == 0; } public Amount negate() { return isZero() ? this : new Amount(value.negate(), currencyCode); } public Amount negateIf(final boolean condition) { return condition ? negate() : this; }...
} else { return new Amount(value.subtract(amtToSubtract.value), currencyCode); } } public Amount multiply(@NonNull final Percent percent, @NonNull final CurrencyPrecision precision) { final BigDecimal newValue = percent.computePercentageOf(value, precision.toInt(), precision.getRoundingMode()); return...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\currency\Amount.java
1
请在Spring Boot框架中完成以下Java代码
public String getLineItemId() { return lineItemId; } public void setLineItemId(String lineItemId) { this.lineItemId = lineItemId; } public LineItemReference quantity(Integer quantity) { this.quantity = quantity; return this; } /** * This field is reserved for internal or future use. * * @ret...
if (o == null || getClass() != o.getClass()) { return false; } LineItemReference lineItemReference = (LineItemReference)o; return Objects.equals(this.lineItemId, lineItemReference.lineItemId) && Objects.equals(this.quantity, lineItemReference.quantity); } @Override public int hashCode() { return O...
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\LineItemReference.java
2
请在Spring Boot框架中完成以下Java代码
private List<String> findRegistryByAppName(String appnameParam){ HashMap<String, List<String>> appAddressMap = new HashMap<String, List<String>>(); List<XxlJobRegistry> list = xxlJobRegistryDao.findAll(RegistryConfig.DEAD_TIMEOUT, new Date()); if (list != null) { for (XxlJobRegistry item: list) { if (Regis...
int count = xxlJobInfoDao.pageListCount(0, 10, id, -1, null, null, null); if (count > 0) { return new ReturnT<String>(500, I18nUtil.getString("jobgroup_del_limit_0") ); } List<XxlJobGroup> allList = xxlJobGroupDao.findAll(); if (allList.size() == 1) { return new ReturnT<String>(500, I18nUtil.getString("...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\controller\JobGroupController.java
2
请完成以下Java代码
public void handleOrderVoided(@NonNull final VoidOrderAndRelatedDocsRequest request) { final IDocumentBL documentBL = Services.get(IDocumentBL.class); final IPair<RecordsToHandleKey, List<ITableRecordReference>> recordsToHandle = request.getRecordsToHandle(); final List<I_C_Order> orderRecordsToHandle = TableR...
prefixToUse = String.format("%s(%s)-", voidedOrderDocumentNoPrefix, attemptCount); } final String documentNo = orderRecord.getDocumentNo(); // try to update; retry on exception, with a different docNo; // Rationale: duplicate documentNos are OK if the doc has different docTypes or bPartners(!). // I don't w...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\voidorderandrelateddocs\VoidOrderHandler.java
1
请完成以下Java代码
public int getProductId() {return getProductDescriptor().getProductId();} @JsonIgnore public int getAttributeSetInstanceId() {return getProductDescriptor().getAttributeSetInstanceId();} @JsonIgnore public AttributesKey getStorageAttributesKey() {return getProductDescriptor().getStorageAttributesKey();} public v...
if (Objects.equals(this.forwardPPOrderRef, forwardPPOrderRefNew)) { return this; } return toBuilder().forwardPPOrderRef(forwardPPOrderRefNew).build(); } public int getOrderLineIdAsRepoId() { return IdConstants.toRepoId(salesOrderLineId); } public int getOrderIdAsRepoId() { return IdConstants.toRep...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\ddordercandidate\DDOrderCandidateData.java
1
请完成以下Java代码
public class MigratingCalledProcessInstance implements MigratingInstance { public static final MigrationLogger MIGRATION_LOGGER = ProcessEngineLogger.MIGRATION_LOGGER; protected ExecutionEntity processInstance; public MigratingCalledProcessInstance(ExecutionEntity processInstance) { this.processInstance = ...
@Override public void attachState(MigratingTransitionInstance targetTransitionInstance) { throw MIGRATION_LOGGER.cannotAttachToTransitionInstance(this); } @Override public void migrateState() { // nothing to do } @Override public void migrateDependentEntities() { // nothing to do } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingCalledProcessInstance.java
1
请完成以下Java代码
public class ReencryptMojo extends AbstractReencryptMojo { @Parameter(property = "jasypt.plugin.old.password") private String oldPassword; @Parameter(property = "jasypt.plugin.old.private-key-string") private String oldPrivateKeyString; @Parameter(property = "jasypt.plugin.old.private-key-location") private...
protected void configure(JasyptEncryptorConfigurationProperties properties) { setIfNotNull(properties::setPassword, oldPassword); setIfNotNull(properties::setPrivateKeyString, oldPrivateKeyString); setIfNotNull(properties::setPrivateKeyLocation, oldPrivateKeyLocation); setIfNotNull(prope...
repos\jasypt-spring-boot-master\jasypt-maven-plugin\src\main\java\com\ulisesbocchio\jasyptmavenplugin\mojo\ReencryptMojo.java
1
请完成以下Java代码
public GatewayFilter apply(Config config) { String replacementValue = Objects.requireNonNull(config.replacement, "replacement must not be null"); String replacement = replacementValue.replace("$\\", "$"); String regexpValue = Objects.requireNonNull(config.regexp, "regexp must not be null"); Pattern pattern = Pa...
public @Nullable String getRegexp() { return regexp; } public Config setRegexp(String regexp) { Assert.hasText(regexp, "regexp must have a value"); this.regexp = regexp; return this; } public @Nullable String getReplacement() { return replacement; } public Config setReplacement(String repl...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RewritePathGatewayFilterFactory.java
1
请完成以下Java代码
public void setLocal_Currency_ID (final int Local_Currency_ID) { if (Local_Currency_ID < 1) set_Value (COLUMNNAME_Local_Currency_ID, null); else set_Value (COLUMNNAME_Local_Currency_ID, Local_Currency_ID); } @Override public int getLocal_Currency_ID() { return get_ValueAsInt(COLUMNNAME_Local_Curren...
* Reference name: PostingSign */ public static final int POSTINGSIGN_AD_Reference_ID=541699; /** DR = D */ public static final String POSTINGSIGN_DR = "D"; /** CR = C */ public static final String POSTINGSIGN_CR = "C"; @Override public void setPostingSign (final java.lang.String PostingSign) { set_Value (CO...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Fact_Acct_UserChange.java
1
请完成以下Java代码
public final class Account { @Getter @NonNull private final AccountId accountId; @Getter @With @Nullable private final AccountConceptualName accountConceptualName; private Account( @NonNull final AccountId accountId, @Nullable final AccountConceptualName accountConceptualName) { this.accountId = accountId;...
{ return Optional.empty(); } final AccountConceptualName accountConceptualName = AccountConceptualName.ofNullableString(accountConceptualNameStr); return Optional.of(of(accountId, accountConceptualName)); } @NonNull public static Account of(@NonNull final AccountId accountId, @NonNull final AccountConcept...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\Account.java
1
请完成以下Java代码
public GatewayFilter apply(RouteCacheConfiguration config) { LocalResponseCacheProperties cacheProperties = mapRouteCacheConfig(config); Caffeine caffeine = LocalResponseCacheUtils.createCaffeine(cacheProperties); String cacheName = config.getRouteId() + "-cache"; caffeineCacheManager.registerCustomCache(cache...
} public RouteCacheConfiguration setSize(@Nullable DataSize size) { this.size = size; return this; } public @Nullable Duration getTimeToLive() { return timeToLive; } public RouteCacheConfiguration setTimeToLive(@Nullable Duration timeToLive) { this.timeToLive = timeToLive; return this; } ...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\cache\LocalResponseCacheGatewayFilterFactory.java
1
请在Spring Boot框架中完成以下Java代码
public long put(@RequestBody Person person) { Person p = personService.save(person); return p.getId(); } @RequestMapping("/able") public Person cacheable(Person person) { String a = "a"; String[] b = {"1", "2"}; List<Long> c = new ArrayList<>(); c.add(3L); ...
return personService.findOne1(); } @RequestMapping("/able2") public Person cacheable2(Person person) { return personService.findOne2(person); } @RequestMapping("/evit") public String evit(Long id) { personService.remove(id); return "ok"; } }
repos\spring-boot-student-master\spring-boot-student-cache-caffeine\src\main\java\com\xiaolyuh\controller\CacheController.java
2
请在Spring Boot框架中完成以下Java代码
public Date getPaySuccessTime() { return paySuccessTime; } public void setPaySuccessTime(Date paySuccessTime) { this.paySuccessTime = paySuccessTime; } public Date getCompleteTime() { return completeTime; } public void setCompleteTime(Date completeTime) { this.completeTime = completeTime; } public S...
} public void setRefundTimes(Short refundTimes) { this.refundTimes = refundTimes; } public BigDecimal getSuccessRefundAmount() { return successRefundAmount; } public void setSuccessRefundAmount(BigDecimal successRefundAmount) { this.successRefundAmount = successRefundAmount; } }
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckMistakeScratchPool.java
2
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } public String getName() { return name; } ...
this.name = name; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public List<OptimisticLockingCourse> getCourses() { return courses; } public void setCourses(List<OptimisticLockingCours...
repos\tutorials-master\persistence-modules\hibernate-jpa\src\main\java\com\baeldung\hibernate\optimisticlocking\OptimisticLockingStudent.java
1
请完成以下Java代码
public void removeChild(MigratingScopeInstance migratingScopeInstance) { childInstances.remove(migratingScopeInstance); } @Override public void addChild(MigratingScopeInstance migratingScopeInstance) { if (migratingScopeInstance instanceof MigratingEventScopeInstance) { childInstances.add((Migratin...
setParent(null); } @Override public Collection<MigratingProcessElementInstance> getChildren() { Set<MigratingProcessElementInstance> children = new HashSet<MigratingProcessElementInstance>(childInstances); children.addAll(childCompensationSubscriptionInstances); return children; } @Override pu...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingEventScopeInstance.java
1
请完成以下Java代码
protected void addExtensionElement(String name, JsonNode elementNode, UserTask task) { if (elementNode != null && !elementNode.isNull() && StringUtils.isNotEmpty(elementNode.asText())) { addExtensionElement(name, elementNode.asText(), task); } } protected void addExtensionElement(St...
) { List<ExtensionElement> extensionElementList = task.getExtensionElements().get(extensionElementName); if (CollectionUtils.isNotEmpty(extensionElementList)) { elementNode.put(propertyName, extensionElementList.get(0).getElementText()); } } @Override public void setForm...
repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\UserTaskJsonConverter.java
1
请完成以下Java代码
private int tryGetRetryCountOrFail(MessageAndChannel mac, Throwable originalError) throws Throwable { MessageProperties props = mac.message.getMessageProperties(); String xRetriedCountHeader = (String) props.getHeader("x-retried-count"); final int xRetriedCount = xRetriedCountHeader == null ? 0...
mac.channel.basicReject(mac.message.getMessageProperties() .getDeliveryTag(), false); } private class MessageAndChannel { private Message message; private Channel channel; private MessageAndChannel(Message message, Channel channel) { this.message = message; ...
repos\tutorials-master\messaging-modules\spring-amqp\src\main\java\com\baeldung\springamqp\exponentialbackoff\RetryQueuesInterceptor.java
1
请在Spring Boot框架中完成以下Java代码
public class App { private static final Logger LOGGER = LoggerFactory.getLogger(App.class); public static void main(final String[] args) { // Spring Java config final AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(); context.getEnvironment().addActi...
} private static void runJob(AnnotationConfigApplicationContext context, String batchJobName) { final JobLauncher jobLauncher = (JobLauncher) context.getBean("jobLauncher"); final Job job = (Job) context.getBean(batchJobName); LOGGER.info("Starting the batch job: {}", batchJobName); ...
repos\tutorials-master\spring-batch\src\main\java\com\baeldung\batch\App.java
2
请在Spring Boot框架中完成以下Java代码
InitializrModule InitializrJacksonModule() { return new InitializrModule(); } } /** * Initializr cache configuration. */ @Configuration @ConditionalOnClass(javax.cache.CacheManager.class) static class InitializrCacheConfiguration { @Bean JCacheManagerCustomizer initializrCacheManagerCustomizer() { ...
createMissingCache(cacheManager, "initializr.dependency-metadata", this::config); createMissingCache(cacheManager, "initializr.project-resources", this::config); createMissingCache(cacheManager, "initializr.templates", this::config); } private void createMissingCache(javax.cache.CacheManager cacheManager, St...
repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\autoconfigure\InitializrAutoConfiguration.java
2
请完成以下Java代码
public void setC_Async_Batch_ID (final int C_Async_Batch_ID) { if (C_Async_Batch_ID < 1) set_Value (COLUMNNAME_C_Async_Batch_ID, null); else set_Value (COLUMNNAME_C_Async_Batch_ID, C_Async_Batch_ID); } @Override public int getC_Async_Batch_ID() { return get_ValueAsInt(COLUMNNAME_C_Async_Batch_ID); } ...
@Override public void setC_Invoice_Candidate_Recompute_ID (final int C_Invoice_Candidate_Recompute_ID) { if (C_Invoice_Candidate_Recompute_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Invoice_Candidate_Recompute_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Invoice_Candidate_Recompute_ID, C_Invoice_Candidate_Rec...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\invoicecandidate\model\X_C_Invoice_Candidate_Recompute.java
1
请完成以下Java代码
public class EntityViewInfoEntity extends AbstractEntityViewEntity<EntityViewInfo> { public static final Map<String,String> entityViewInfoColumnMap = new HashMap<>(); static { entityViewInfoColumnMap.put("customerTitle", "c.title"); } private String customerTitle; private boolean customerI...
Object customerAdditionalInfo) { super(entityViewEntity); this.customerTitle = customerTitle; if (customerAdditionalInfo != null && ((JsonNode)customerAdditionalInfo).has("isPublic")) { this.customerIsPublic = ((JsonNode)customerAdditionalInfo).get("isPublic").asBoolean(); } ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\EntityViewInfoEntity.java
1
请在Spring Boot框架中完成以下Java代码
public class GatewaySwaggerResourcesProvider implements SwaggerResourcesProvider { private final RouteLocator routeLocator; public GatewaySwaggerResourcesProvider(RouteLocator routeLocator) { this.routeLocator = routeLocator; } @Override public List<SwaggerResource> get() { List<S...
routes.forEach(route -> { resources.add(swaggerResource(route.getId(), route.getFullPath().replace("**", "v2/api-docs"))); }); return resources; } private SwaggerResource swaggerResource(String name, String location) { SwaggerResource swaggerResource = new SwaggerResource()...
repos\tutorials-master\jhipster-modules\jhipster-uaa\gateway\src\main\java\com\baeldung\jhipster\gateway\config\apidoc\GatewaySwaggerResourcesProvider.java
2
请完成以下Java代码
public OrderCheckupBuilder addOrderLine(@NonNull final I_C_OrderLine orderLine) { assertNotBuilt(); Check.assume(getC_Order().getC_Order_ID() == orderLine.getC_Order_ID(), "order line shall be part of provided order"); _orderLines.add(orderLine); return this; } private final List<I_C_OrderLine> getOrderLin...
public OrderCheckupBuilder setReponsibleUserId(UserId reponsibleUserId) { this._reponsibleUserId = reponsibleUserId; return this; } private UserId getReponsibleUserId() { return _reponsibleUserId; } public OrderCheckupBuilder setDocumentType(String documentType) { this._documentType = documentType; r...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\ordercheckup\impl\OrderCheckupBuilder.java
1
请完成以下Java代码
public void setM_AttributeSetInstance_ID (final int M_AttributeSetInstance_ID) { if (M_AttributeSetInstance_ID < 0) set_Value (COLUMNNAME_M_AttributeSetInstance_ID, null); else set_Value (COLUMNNAME_M_AttributeSetInstance_ID, M_AttributeSetInstance_ID); } @Override public int getM_AttributeSetInstance_...
{ 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); } @Override public void setQty (final BigDecimal Qty) { set_Value...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Item_Storage.java
1
请完成以下Java代码
public String getExecutionId() { Execution e = getExecution(); return e != null ? e.getId() : null; } /** * Returns the {@link ProcessInstance} currently associated or 'null' * * @throws FlowableCdiException if no {@link Execution} is associated. Use {@link #isAssociated()} to ch...
} } protected void assertTaskAssociated() { if (associationManager.getTask() == null) { throw new FlowableCdiException("No task associated. Call businessProcess.startTask() first."); } } protected Map<String, Object> getCachedVariables() { return associationManager....
repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\BusinessProcess.java
1
请完成以下Java代码
public class LoadPORequestHandler extends ReplRequestHandlerAdapter { protected final transient Logger logger = LogManager.getLogger(getClass()); /** * Returns the given <code>po</code> and the <code>EXP_Format</code> specified by the <code>IMP_RequestHandler</code> that we are called with. * * @param po * ...
po.get_ID(), false // createError ); if (!allowResponse) { logger.warn("Response not allowed because there is no access to '{}'", po); return result; } final PO poToSend = createResponse(ctx, po); result.setPOToExport(poToSend); return result; } protected PO createResponse(IReplReq...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\process\rpl\requesthandler\spi\impl\LoadPORequestHandler.java
1
请完成以下Java代码
public class FreeMarkerScriptEngineFactory implements ScriptEngineFactory { public final static String NAME = "freemarker"; public final static String VERSION = "2.3.29"; public final static List<String> names; public final static List<String> extensions; public final static List<String> mimeTypes; stati...
return getEngineName(); } else if (key.equals(ScriptEngine.ENGINE_VERSION)) { return getEngineVersion(); } else if (key.equals(ScriptEngine.LANGUAGE)) { return getLanguageName(); } else if (key.equals(ScriptEngine.LANGUAGE_VERSION)) { return getLanguageVersion(); } else if (key.equals(...
repos\camunda-bpm-platform-master\freemarker-template-engine\src\main\java\org\camunda\templateengines\FreeMarkerScriptEngineFactory.java
1
请完成以下Java代码
public T deserialize(JsonParser parser, DeserializationContext context) throws IOException { //NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only //string values have to be adjusted to the configured TZ. switch (parser.getCurrentTokenId()) { case JsonTokenId.ID_NUMBER_FLO...
} throw context.mappingException("Expected type float, integer, or string."); } private ZoneId getZone(DeserializationContext context) { // Instants are always in UTC, so don't waste compute cycles return (_valueClass == Instant.class) ? null : DateTimeUtils.toZoneId(context.getTimeZone()); } priv...
repos\tutorials-master\spring-swagger-codegen-modules\spring-openapi-generator-api-client\src\main\java\com\baeldung\petstore\client\invoker\CustomInstantDeserializer.java
1
请完成以下Java代码
public class HTMLSanitizer { private static final PolicyFactory POLICY = Sanitizers.FORMATTING.and(Sanitizers.LINKS); private static final PolicyFactory HTML_POLICY = new HtmlPolicyBuilder().allowCommonBlockElements() .allowCommonInlineFormattingElements() .toFactory(); private static fina...
public static String sanitizeUsingHTMLPolicy(String html) { return HTML_POLICY.sanitize(html); } public static String sanitizeUsingCustomPolicy(String html) { return CUSTOM_POLICY.sanitize(html); } public static String sanitizeUsingJsoup(String html) { Safelist safelist = Safel...
repos\tutorials-master\jsoup\src\main\java\com\baeldung\jsoup\HTMLSanitizer.java
1
请完成以下Java代码
public PlanItemInstanceEntityBuilder stagePlanItemInstance(PlanItemInstance stagePlanItemInstance) { this.stagePlanItemInstance = stagePlanItemInstance; return this; } @Override public PlanItemInstanceEntityBuilder tenantId(String tenantId) { this.tenantId = tenantId; return ...
} public String getCaseInstanceId() { return caseInstanceId; } public PlanItemInstance getStagePlanItemInstance() { return stagePlanItemInstance; } public String getTenantId() { return tenantId; } public Map<String, Object> getLocalVariables() { return localVa...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\PlanItemInstanceEntityBuilderImpl.java
1
请完成以下Java代码
public String getSummary() { StringBuffer sb = new StringBuffer(); sb.append(getName()); // : Total Lines = 123.00 (#1) sb.append(": ") .append(Msg.translate(getCtx(), "BeginningBalance")).append("=").append(getBeginningBalance()) .append(",") .append(Msg.translate(getCtx(), "EndingBalance")).appen...
public int getDoc_User_ID() { return getCreatedBy(); } // getDoc_User_ID /** * Get Document Approval Amount * * @return amount difference */ @Override public BigDecimal getApprovalAmt() { return getStatementDifference(); } // getApprovalAmt /** * Get Currency * * @return Currency */ @Ov...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MCash.java
1
请完成以下Java代码
private Object convertValueToFieldType(@Nullable final Object value) { Object valueConv = DataTypes.convertToValueClass( getFieldName(), value, getWidgetType(), getValueClass(), getLookupDataSource().orElse(null)); // Convert empty string to null // This is a workaround until task https://gi...
} public Builder displayName(final AdMessageKey displayName) { return displayName(TranslatableStrings.adMessage(displayName)); } public ITranslatableString getDisplayName() { return displayName; } public Builder lookupDescriptor(@NonNull final Optional<LookupDescriptor> lookupDescriptor) { t...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\DocumentFilterParamDescriptor.java
1