instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public static void setFixedTimeSource(@NonNull final String zonedDateTime) { setTimeSource(FixedTimeSource.ofZonedDateTime(ZonedDateTime.parse(zonedDateTime))); } public static long millis() { return getTimeSource().millis(); } public static ZoneId zoneId() { return getTimeSource().zoneId(); } public ...
public static LocalDate asLocalDate(@NonNull final ZoneId zoneId) { return asZonedDateTime(zoneId).toLocalDate(); } public static ZonedDateTime asZonedDateTime() { return asZonedDateTime(zoneId()); } public static ZonedDateTime asZonedDateTimeAtStartOfDay() { return asZonedDateTime(zoneId()).truncatedTo(...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-util\src\main\java\de\metas\common\util\time\SystemTime.java
1
请完成以下Java代码
public Mono<Map<String, Object>> handle(Map<String, Object> payload) { return handleInternal(payload).map(ExecutionGraphQlResponse::toMap); } /** * Handle a {@code Request-Stream} interaction. For subscriptions. * @param payload the decoded GraphQL request payload */ public Flux<Map<String, Object>> handleS...
} String errorData = encodeErrors(response).toString(StandardCharsets.UTF_8); return Flux.error(new RejectedException(errorData)); }); } private Mono<RSocketGraphQlResponse> handleInternal(Map<String, Object> payload) { String requestId = this.idGenerator.generateId().toString(); return this.execut...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\server\GraphQlRSocketHandler.java
1
请在Spring Boot框架中完成以下Java代码
public Map<String, String> headers() { return obtain(OtlpMetricsProperties::getHeaders, OtlpConfig.super::headers); } @Override public HistogramFlavor histogramFlavor() { return obtain(OtlpMetricsProperties::getHistogramFlavor, OtlpConfig.super::histogramFlavor); } @Override public Map<String, HistogramFlav...
} private <V> Getter<OtlpMetricsProperties, Map<String, V>> perMeter(Getter<Meter, V> getter) { return (properties) -> { if (CollectionUtils.isEmpty(properties.getMeter())) { return null; } Map<String, V> perMeter = new LinkedHashMap<>(); properties.getMeter().forEach((key, meterProperties) -> { ...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\otlp\OtlpMetricsPropertiesConfigAdapter.java
2
请完成以下Java代码
public JavaType typeFromId(DatabindContext context, String id) throws IOException { DeserializationConfig config = (DeserializationConfig) context.getConfig(); JavaType result = this.delegate.typeFromId(context, id); String className = result.getRawClass().getName(); if (isInAllowlist(className)) { retu...
return ALLOWLIST_CLASS_NAMES.contains(id); } @Override public String getDescForKnownTypeIds() { return this.delegate.getDescForKnownTypeIds(); } @Override public JsonTypeInfo.Id getMechanism() { return this.delegate.getMechanism(); } } }
repos\spring-security-main\core\src\main\java\org\springframework\security\jackson2\SecurityJackson2Modules.java
1
请完成以下Java代码
protected POInfo initPO (Properties ctx) { POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); return poi; } public String toString() { StringBuffer sb = new StringBuffer ("X_A_Asset_Use[") .append(get_ID()).append("]"); return sb.toString(); } /** Set As...
} /** Set UseDate. @param UseDate UseDate */ public void setUseDate (Timestamp UseDate) { set_Value (COLUMNNAME_UseDate, UseDate); } /** Get UseDate. @return UseDate */ public Timestamp getUseDate () { return (Timestamp)get_Value(COLUMNNAME_UseDate); } /** Set Use units. @param UseUnits Cu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Use.java
1
请完成以下Java代码
static class IncidentStateImpl implements IncidentState { public final int stateCode; protected final String name; public IncidentStateImpl(int suspensionCode, String string) { this.stateCode = suspensionCode; this.name = string; } public int getStateCode() { return stateCode; ...
if (getClass() != obj.getClass()) return false; IncidentStateImpl other = (IncidentStateImpl) obj; if (stateCode != other.stateCode) return false; return true; } @Override public String toString() { return name; } } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\history\IncidentState.java
1
请完成以下Java代码
public class MiscUtils { public static final Charset UTF8 = Charset.forName("UTF-8"); public static String missingProperty(String propertyName) { return "The " + propertyName + " property need to be set!"; } @SuppressWarnings("deprecation") public static HashFunction forName(String name) ...
} return domainName; } private static boolean needsPort(String scheme, int port) { boolean isHttpDefault = "http".equals(scheme.toLowerCase()) && port == 80; boolean isHttpsDefault = "https".equals(scheme.toLowerCase()) && port == 443; return !isHttpDefault && !isHttpsDefault; ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\utils\MiscUtils.java
1
请在Spring Boot框架中完成以下Java代码
public List<AuthorityDto> buildPermissions(UserDto user) { String key = CacheKey.ROLE_AUTH + user.getId(); List<AuthorityDto> authorityDtos = redisUtils.getList(key, AuthorityDto.class); if (CollUtil.isEmpty(authorityDtos)) { Set<String> permissions = new HashSet<>(); // ...
return roleRepository.findInMenuId(menuIds); } /** * 清理缓存 * @param id / */ public void delCaches(Long id, List<User> users) { users = CollectionUtil.isEmpty(users) ? userRepository.findByRoleId(id) : users; if (CollectionUtil.isNotEmpty(users)) { users.forEach(ite...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\service\impl\RoleServiceImpl.java
2
请完成以下Java代码
public String getContent() { return content; } public void setContent(String content) { this.content = content; } public Book getBook() { return book; } public void setBook(Book book) { this.book = book; } public Article getArticle() { return a...
} public Magazine getMagazine() { return magazine; } public void setMagazine(Magazine magazine) { this.magazine = magazine; } @Override public String toString() { return "Review{" + "id=" + id + ", content=" + content + '}'; } }
repos\Hibernate-SpringBoot-master\HibernateSpringBootChooseOnlyOneAssociation\src\main\java\com\bookstore\entity\Review.java
1
请完成以下Java代码
protected final ProductsProposalView getById(final ViewId viewId) { final ProductsProposalView view = getByIdOrNull(viewId); if (view == null) { throw new EntityNotFoundException("View not found: " + viewId.toJson()); } return view; } @Override public final void closeById(@NonNull final ViewId viewId,...
@Override public final void invalidateView(final ViewId viewId) { final ProductsProposalView view = getById(viewId); view.invalidateAll(); } @lombok.Value(staticConstructor = "of") protected static class ViewLayoutKey { WindowId windowId; JSONViewDataType viewDataType; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\view\ProductsProposalViewFactoryTemplate.java
1
请完成以下Java代码
public void setC_TaxCategory_ID (final int C_TaxCategory_ID) { if (C_TaxCategory_ID < 1) set_ValueNoCheck (COLUMNNAME_C_TaxCategory_ID, null); else set_ValueNoCheck (COLUMNNAME_C_TaxCategory_ID, C_TaxCategory_ID); } @Override public int getC_TaxCategory_ID() { return get_ValueAsInt(COLUMNNAME_C_Tax...
/** Resource = R */ public static final String PRODUCTTYPE_Resource = "R"; /** ExpenseType = E */ public static final String PRODUCTTYPE_ExpenseType = "E"; /** Online = O */ public static final String PRODUCTTYPE_Online = "O"; /** FreightCost = F */ public static final String PRODUCTTYPE_FreightCost = "F"; @Ove...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_TaxCategory.java
1
请在Spring Boot框架中完成以下Java代码
public class TbTimeSeriesSubscription extends TbSubscription<TelemetrySubscriptionUpdate> { @Getter private final long queryTs; @Getter private final boolean allKeys; @Getter private final Map<String, Long> keyStates; @Getter private final long startTime; @Getter private final l...
super(serviceId, sessionId, subscriptionId, tenantId, entityId, TbSubscriptionType.TIMESERIES, updateProcessor); this.queryTs = queryTs; this.allKeys = allKeys; this.keyStates = keyStates; this.startTime = startTime; this.endTime = endTime; this.latestValues = latestValue...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\subscription\TbTimeSeriesSubscription.java
2
请完成以下Java代码
public void setPayPal_Config_ID (final int PayPal_Config_ID) { if (PayPal_Config_ID < 1) set_ValueNoCheck (COLUMNNAME_PayPal_Config_ID, null); else set_ValueNoCheck (COLUMNNAME_PayPal_Config_ID, PayPal_Config_ID); } @Override public int getPayPal_Config_ID() { return get_ValueAsInt(COLUMNNAME_PayPa...
} @Override public java.lang.String getPayPal_PaymentApprovedCallbackUrl() { return get_ValueAsString(COLUMNNAME_PayPal_PaymentApprovedCallbackUrl); } @Override public void setPayPal_Sandbox (final boolean PayPal_Sandbox) { set_Value (COLUMNNAME_PayPal_Sandbox, PayPal_Sandbox); } @Override public bool...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java-gen\de\metas\payment\paypal\model\X_PayPal_Config.java
1
请完成以下Java代码
Properties toProps() { Properties props = new Properties(); if (useConfluent) { props.put("ssl.endpoint.identification.algorithm", sslAlgorithm); props.put("sasl.mechanism", saslMechanism); props.put("sasl.jaas.config", saslConfig); props.put(CommonClient...
* */ public KafkaAdmin getAdmin() { return kafkaAdmin; } protected Properties toAdminProps() { Properties props = toProps(); props.put(AdminClientConfig.BOOTSTRAP_SERVERS_CONFIG, servers); props.put(AdminClientConfig.RETRIES_CONFIG, retries); return props; } ...
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\kafka\TbKafkaSettings.java
1
请完成以下Java代码
private static void increaseFrequency(char c, Map<Character, int[]> storage) { int[] freq = storage.get(c); if (freq == null) { freq = new int[]{1}; storage.put(c, freq); } else { ++freq[0]; } } private float comput...
void computeAggregation(Map<String, WordInfo> word_cands) { if (text.length() == 1) { aggregation = (float) Math.sqrt(p); return; } for (int i = 1; i < text.length(); ++i) { aggregation = Math.min(aggregation, ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word\WordInfo.java
1
请完成以下Java代码
public void load(String trxName) { Services.get(ITrxManager.class).run(trxName, new TrxRunnableAdapter() { @Override public void run(String innerTrxName) { try { load0(innerTrxName); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new A...
} } private InputSource getInputSource() { if (fileName != null) { return new InputSource(fileName); } else if (inputStream != null) { return new InputSource(inputStream); } else { throw new AdempiereException("Cannot identify source"); } } private void addLog(String msg) { logger....
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\xml\XMLLoader.java
1
请在Spring Boot框架中完成以下Java代码
public class BookstoreService { private final AuthorRepository authorRepository; private final BookRepository bookRepository; public BookstoreService(AuthorRepository authorRepository, BookRepository bookRepository) { this.authorRepository = authorRepository; this.bookReposito...
} } public void displayAuthorsAndBooksFetchAllAgeBetween20And40() { List<Author> authors = authorRepository.fetchAllAgeBetween20And40(); for (Author author : authors) { System.out.println("Author: " + author); System.out.println("No of books: " + au...
repos\Hibernate-SpringBoot-master\HibernateSpringBootEntityGraphAttributePaths\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public void prepare(Map map, TopologyContext topologyContext, OutputCollector outputCollector) { objectMapper = new ObjectMapper(); objectMapper.setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY); try { writer = new BufferedWriter(new FileWriter(filePath)); ...
logger.error("Failed to write data to file.", e); } } } public FileWritingBolt(String filePath) { this.filePath = filePath; } @Override public void cleanup() { try { writer.close(); } catch (IOException e) { logger.error("Failed t...
repos\tutorials-master\libraries-data-3\src\main\java\com\baeldung\storm\bolt\FileWritingBolt.java
1
请完成以下Java代码
public static PPOrderRef withPPOrderId(@Nullable final PPOrderRef ppOrderRef, @Nullable final PPOrderId newPPOrderId) { if (ppOrderRef != null) { return ppOrderRef.withPPOrderId(newPPOrderId); } else if (newPPOrderId != null) { return ofPPOrderId(newPPOrderId); } else { return null; } } @...
return ppOrderRef.withPPOrderAndBOMLineId(newPPOrderAndBOMLineId); } else if (newPPOrderAndBOMLineId != null) { return ofPPOrderBOMLineId(newPPOrderAndBOMLineId); } else { return null; } } @Nullable public PPOrderAndBOMLineId getPpOrderAndBOMLineId() {return PPOrderAndBOMLineId.ofNullable(ppOrde...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\pporder\PPOrderRef.java
1
请完成以下Java代码
private boolean isPricingConditionsApplicable( @Nullable final PricingConditionsId pricingConditionsId, @NonNull final LocalDate date, @NonNull final OrgId orgId) { if (pricingConditionsId == null) { return false; } final PricingConditions pricingConditions = pricingConditionsService.getPricingCon...
} pricingResult.setDiscount(pricingConditionsResult.getDiscount()); final BigDecimal priceStdOverride = pricingConditionsResult.getPriceStdOverride(); final BigDecimal priceListOverride = pricingConditionsResult.getPriceListOverride(); final BigDecimal priceLimitOverride = pricingConditionsResult.getPriceLimit...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\Discount.java
1
请完成以下Spring Boot application配置
server.port=8080 eureka.client.serviceUrl.defaultZone=${EUREKA_URI:http://localhost:8761/eureka} eureka.instance.preferIpAddress=false spring.application.name=spring-cloud-eureka-clien
t #--- spring.config.activate.on-profile=dev spring.cloud.discovery.enabled=false
repos\tutorials-master\spring-cloud-modules\spring-cloud-eureka\spring-cloud-eureka-client-profiles\src\main\resources\application.properties
2
请完成以下Java代码
protected void dispatchActivityTimeoutIfNeeded(Job timerEntity, ExecutionEntity execution, CommandContext commandContext) { String nestedActivityId = TimerEventHandler.getActivityIdFromConfiguration(timerEntity.getJobHandlerConfiguration()); ActivityImpl boundaryEventActivity = execution.getProcessDef...
if (activity != null && activity.getActivityBehavior() != null) { dispatchActivityTimeOut(job, activity, execution, commandContext); } } protected void dispatchActivityTimeOut(Job job, ActivityImpl activity, ExecutionEntity execution, CommandContext commandContext) { commandContext....
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\jobexecutor\TimerExecuteNestedActivityJobHandler.java
1
请完成以下Java代码
public class ScannableCodeFormatsCollection { public static ScannableCodeFormatsCollection EMPTY = new ScannableCodeFormatsCollection(ImmutableList.of()); @NonNull ImmutableList<ScannableCodeFormat> formats; private ScannableCodeFormatsCollection(@NonNull final ImmutableList<ScannableCodeFormat> formats) { this...
{ final ExplainedOptional<ParsedScannedCode> result = format.parse(scannedCode); if (result.isPresent()) { return result; } if (!notMatchingExplanation.isEmpty()) { notMatchingExplanation.append(" | "); } notMatchingExplanation.append(format.getName()).append(" ").append(result.getExpla...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\scannable_code\format\ScannableCodeFormatsCollection.java
1
请完成以下Java代码
public Window[] getWindows() { Window[] a = new Window[windows.size()]; return windows.toArray(a); } /** * @return Number of windows managed by this window manager */ public int getWindowCount() { return windows.size(); } /** * Find window by ID * * @param AD_Window_ID * @return AWindow refe...
} @Override public void componentMoved(ComponentEvent e) { } @Override public void componentResized(ComponentEvent e) { } @Override public void componentShown(ComponentEvent e) { } @Override public void windowActivated(WindowEvent e) { } @Override public void windowClosed(WindowEvent e) { Wind...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\WindowManager.java
1
请完成以下Java代码
public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Verarbeiten. @return Verarbeiten */ @Override public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) ...
@Override public void setShowInMenu (boolean ShowInMenu) { set_Value (COLUMNNAME_ShowInMenu, Boolean.valueOf(ShowInMenu)); } /** Get ShowInMenu. @return ShowInMenu */ @Override public boolean isShowInMenu () { Object oo = get_Value(COLUMNNAME_ShowInMenu); if (oo != null) { if (oo instanceof Bo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_InfoWindow.java
1
请完成以下Spring Boot application配置
server: port: 7070 # 避免和本地的 Apollo Portal 端口冲突 app: id: demo-application # 使用的 Apollo 的项目(应用)编号 apollo: meta: http://127.0.0.1:8080 # Apollo Meta Server 地址 bootstrap: enabled: true # 是否开启 Apollo 配置预加载功能。默认为 false。 eagerLoad: enab
le: true # 是否开启 Apollo 支持日志级别的加载时机。默认为 false。 namespaces: application # 使用的 Apollo 的命名空间,默认为 application。
repos\SpringBoot-Labs-master\lab-45\lab-45-apollo-demo\src\main\resources\application.yaml
2
请完成以下Java代码
public Flux<DataBuffer> getBody() { return Mono.fromSupplier(() -> { if (exchange.getAttribute(CACHED_REQUEST_BODY_ATTR) == null) { // probably == downstream closed or no body return null; } if (dataBuffer instanceof NettyDataBuffer) { NettyDataBuffer pdb = (NettyDataBuffer) dataBuf...
* be reused. * @param handler The DispatcherHandler. * @param exchange The ServerWebExchange. * @return value from handler. */ public static Mono<Void> handle(DispatcherHandler handler, ServerWebExchange exchange) { // remove attributes that may disrupt the forwarded request exchange.getAttributes().remove...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\support\ServerWebExchangeUtils.java
1
请完成以下Java代码
public GenericIdentification20 getTp() { return tp; } /** * Sets the value of the tp property. * * @param value * allowed object is * {@link GenericIdentification20 } * */ public void setTp(GenericIdentification20 value) { this.tp = value; ...
* */ public String getNm() { return nm; } /** * Sets the value of the nm property. * * @param value * allowed object is * {@link String } * */ public void setNm(String value) { this.nm = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\SecuritiesAccount13.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable ConfigDataResource getParent() { return this.contributor.getResource(); } @Override public ConfigurableBootstrapContext getBootstrapContext() { return this.contributors.getBootstrapContext(); } } private class InactiveSourceChecker implements BindHandler { private final @Nullable ...
} } return result; } } /** * Binder options that can be used with * {@link ConfigDataEnvironmentContributors#getBinder(ConfigDataActivationContext, BinderOption...)}. */ enum BinderOption { /** * Throw an exception if an inactive contributor contains a bound value. */ FAIL_ON_BIND_TO_INACT...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\ConfigDataEnvironmentContributors.java
2
请完成以下Java代码
public boolean isVirtual() { return isVirtualRepoId(repoId); } public static boolean isVirtualRepoId(final int repoId) { return repoId == VIRTUAL.repoId; } public boolean isRealPackingInstructions() { return isRealPackingInstructionsRepoId(repoId); } public static boolean isRealPackingInstructionsRep...
public HuPackingInstructionsId getKnownPackingInstructionsIdOrNull() { if (isVirtual()) { return HuPackingInstructionsId.VIRTUAL; } if (isTemplate()) { return HuPackingInstructionsId.TEMPLATE; } else { return null; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\HuPackingInstructionsVersionId.java
1
请在Spring Boot框架中完成以下Java代码
public BigInteger getSeqNo() { return seqNo; } /** * Sets the value of the seqNo property. * * @param value * allowed object is * {@link BigInteger } * */ public void setSeqNo(BigInteger value) { this.seqNo = value; } /** * Gets...
* */ public String getMHUPackagingCodeText() { return mhuPackagingCodeText; } /** * Sets the value of the mhuPackagingCodeText property. * * @param value * allowed object is * {@link String } * */ public void setMHUPackagingCodeText(Str...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDIExpDesadvPackType.java
2
请完成以下Java代码
public void setApplicationEventPublisher(ApplicationEventPublisher eventPublisher) { this.eventPublisher = eventPublisher; } /** * Allows control over the destination a remembered user is sent to when they are * successfully authenticated. By default, the filter will just allow the current * request to proce...
/** * Sets the {@link SecurityContextHolderStrategy} to use. The default action is to use * the {@link SecurityContextHolderStrategy} stored in {@link SecurityContextHolder}. * * @since 5.8 */ public void setSecurityContextHolderStrategy(SecurityContextHolderStrategy securityContextHolderStrategy) { Assert...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\rememberme\RememberMeAuthenticationFilter.java
1
请完成以下Java代码
public Object invoke(ELContext context, Object[] paramValues) throws ELException { return node.invoke(bindings, context, type, types, paramValues); } /** * @return <code>true</code> if this is a literal text expression */ @Override public boolean isLiteralText() { return node....
if (!builder.equals(other.builder)) { return false; } if (type != other.type) { return false; } if (!Arrays.equals(types, other.types)) { return false; } return (getStructuralId().equals(other.getStru...
repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\TreeMethodExpression.java
1
请在Spring Boot框架中完成以下Java代码
private Evaluatee createEvaluationContext(final ReportContext reportContext) { final Map<String, Object> reportContextAsMap = createContextAsMap(reportContext); final Evaluatee2 reportContextAsEvaluatee = Evaluatees.ofMap(reportContextAsMap); final Evaluatee ctxEvaluatee = Evaluatees.ofCtx(reportContext.getCtx(...
map.put("Record_ID", reportContext.getRecord_ID()); map.put("AD_Language", reportContext.getAD_Language()); map.put("OutputType", reportContext.getOutputType()); for (final ProcessInfoParameter param : processInfoParams) { final String parameterName = param.getParameterName(); map.put(parameterName, para...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\xls\engine\XlsReportEngine.java
2
请完成以下Java代码
public void setPOSPaymentProcessor (final @Nullable java.lang.String POSPaymentProcessor) { set_Value (COLUMNNAME_POSPaymentProcessor, POSPaymentProcessor); } @Override public java.lang.String getPOSPaymentProcessor() { return get_ValueAsString(COLUMNNAME_POSPaymentProcessor); } @Override public void set...
@Override public void setSUMUP_Config_ID (final int SUMUP_Config_ID) { if (SUMUP_Config_ID < 1) set_Value (COLUMNNAME_SUMUP_Config_ID, null); else set_Value (COLUMNNAME_SUMUP_Config_ID, SUMUP_Config_ID); } @Override public int getSUMUP_Config_ID() { return get_ValueAsInt(COLUMNNAME_SUMUP_Config_ID...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_POS.java
1
请完成以下Java代码
public void setFrequencyType (String FrequencyType) { set_Value (COLUMNNAME_FrequencyType, FrequencyType); } /** Get Frequency Type. @return Frequency of event */ public String getFrequencyType () { return (String)get_Value(COLUMNNAME_FrequencyType); } /** Set Days to keep Log. @param KeepLogDays ...
@param Processing Process Now */ public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_AlertProcessor.java
1
请完成以下Java代码
public String getName() { return "Undeploying process archvie "+processArchvieName; } public void performOperationStep(DeploymentOperation operationContext) { final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer(); final Map<String, DeployedProcessArchive> processArc...
// delete the deployment if not disabled if (PropertyHelper.getBooleanProperty(processArchive.getProperties(), ProcessArchiveXml.PROP_IS_DELETE_UPON_UNDEPLOY, false)) { if (processEngine != null) { // always cascade & skip custom listeners deleteDeployment(deployedProcessArchive.getPrimaryDepl...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\deployment\UndeployProcessArchiveStep.java
1
请在Spring Boot框架中完成以下Java代码
public void setSessionValidationInterval(Integer sessionValidationInterval) { this.sessionValidationInterval = sessionValidationInterval; } public String getFilesUrlPrefix() { return filesUrlPrefix; } public void setFilesUrlPrefix(String filesUrlPrefix) { this.filesUrlPrefix = ...
public String getPicsPath() { return picsPath; } public void setPicsPath(String picsPath) { this.picsPath = picsPath; } public String getPosapiUrlPrefix() { return posapiUrlPrefix; } public void setPosapiUrlPrefix(String posapiUrlPrefix) { this.posapiUrlPrefix ...
repos\SpringBootBucket-master\springboot-shiro\src\main\java\com\xncoding\pos\config\properties\MyProperties.java
2
请完成以下Java代码
public void calloutOnElementIdChanged(final I_AD_Tab tab) { updateTabFromElement(tab); } @ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE }, ifColumnsChanged = I_AD_Tab.COLUMNNAME_AD_Element_ID) public void onBeforeTabSave_WhenElementIdChanged(final I_AD_Tab tab) { up...
} private void updateTranslationsForElement(final I_AD_Tab tab) { if (!IElementTranslationBL.DYNATTR_AD_Tab_UpdateTranslations.getValue(tab, true)) { // do not copy translations from element to tab return; } final AdElementId tabElementId = AdElementId.ofRepoIdOrNull(tab.getAD_Element_ID()); if (tab...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\tab\model\interceptor\AD_Tab.java
1
请完成以下Java代码
public int getM_PropertiesConfig_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_PropertiesConfig_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ @Override public void setName (java.lang.String Name) { set_Value (...
/** Set Suchschlüssel. @param Value Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein */ @Override public void setValue (java.lang.String Value) { set_Value (COLUMNNAME_Value, Value); } /** Get Suchschlüssel. @return Suchschlüssel für den Eintrag im erforderlichen Format - m...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PropertiesConfig.java
1
请在Spring Boot框架中完成以下Java代码
public class BookstoreService { private final AuthorRepository authorRepository; private final BookRepository bookRepository; public BookstoreService(AuthorRepository authorRepository, BookRepository bookRepository) { this.authorRepository = authorRepository; this.bookRepository = bookRepo...
authors.forEach(a -> bookRepository.deleteInBatch(a.getBooks())); } // good if you need to delete in a classical batch approach // deletes are cascaded by CascadeType.REMOVE and batched as well // the DELETE statements are not sorted at all and this causes more batches than needed for this job @Tra...
repos\Hibernate-SpringBoot-master\HibernateSpringBootBatchDeleteOrphanRemoval\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } @Override public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public String getDescription() { ret...
public boolean isAnalytics() { return analytics; } public void setAnalytics(boolean analytics) { this.analytics = analytics; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; ...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\VariableDefinitionImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class GroupCategoryId implements RepoIdAware { int repoId; @JsonCreator public static GroupCategoryId ofRepoId(final int repoId) { return new GroupCategoryId(repoId); } @Nullable public static GroupCategoryId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new GroupCategoryId(repoId) : null;...
} private GroupCategoryId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_CompensationGroup_Schema_Category_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\compensationGroup\GroupCategoryId.java
2
请完成以下Java代码
public boolean isRegistered () { Object oo = get_Value(COLUMNNAME_IsRegistered); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Name. @param Name Alphanumeric identifier of the entity */ public voi...
/** Set Valid from. @param ValidFrom Valid from including this date (first day) */ public void setValidFrom (Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); } /** Get Valid from. @return Valid from including this date (first day) */ public Timestamp getValidFrom () { return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_Concept.java
1
请完成以下Java代码
public String getUserName() { return Env.getContext(getCtx(), Env.CTXNAME_AD_User_Name); } public String getRoleName() { return Env.getContext(getCtx(), Env.CTXNAME_AD_Role_Name); } String getAdLanguage() { return Env.getContext(getCtx(), Env.CTXNAME_AD_Language); } Language getLanguage() { return ...
final Properties ctx = getCtx(); final String adLanguageOld = Env.getContext(ctx, Env.CTXNAME_AD_Language); // // Check the language (and update it if needed) final Language validLang = Env.verifyLanguageFallbackToBase(lang); // // Actual update final String adLanguageNew = validLang.getAD_Language(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\session\InternalUserSessionData.java
1
请完成以下Java代码
public static void givenStack_whenUsingForEach_thenPrintStack() { Stack<Integer> stack = new Stack<>(); stack.push(10); stack.push(20); stack.push(30); List<Integer> result = new ArrayList<>(); for (Integer value : stack) { System.out.print(value + " "); ...
stack.push(20); stack.push(30); Iterator<Integer> iterator = stack.iterator(); while (iterator.hasNext()) { System.out.print(iterator.next() + " "); } } public static void givenStack_whenUsingListIteratorReverseOrder_thenPrintStack() { Stack<Integer> stack =...
repos\tutorials-master\core-java-modules\core-java-collections-7\src\main\java\com\baeldung\PrintStack.java
1
请完成以下Java代码
private void insertRow(int currentRow) { } // inserRow /** * Get Print Data including additional Lines * * @param row * row * @param col * col * @return non null array of print objects (may be empty) */ private Object[] getPrintItems(int row, int col) { ArrayList<ArrayLis...
if (columns == null) { return new Object[] {}; } ArrayList<Object> coordinate = null; if (columns.size() > col) { coordinate = columns.get(col); } if (coordinate == null) { return new Object[] {}; } // return coordinate.toArray(); } // getPrintItems }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\TableElement.java
1
请完成以下Java代码
public int getAD_Client_ID() { return m_AD_Client_ID; } @Override public void initialize(ModelValidationEngine engine, MClient client) { if (client != null) { m_AD_Client_ID = client.getAD_Client_ID(); } engine.addModelChange(I_AD_Tab.Table_Name, this); engine.addModelChange(I_AD_Ref_Table.Table_N...
private void validate(I_AD_Ref_Table refTable) { String whereClause = refTable.getWhereClause(); if (!Check.isEmpty(whereClause, true) && whereClause.indexOf("@") >= 0) { log.warn("Using context variables in table reference where clause is not adviced"); } } private void updateTabFieldColumns(Properties ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\appdict\validation\model\validator\ApplicationDictionary.java
1
请完成以下Java代码
private DraftPPOrderBOMLineQuantities addToNullable( @Nullable final DraftPPOrderBOMLineQuantities line, @NonNull final DraftPPOrderBOMLineQuantities lineToAdd) { return line != null ? line.add(lineToAdd, uomConversionBL) : lineToAdd; } public boolean isReceipt(@NonNull final I_PP_Order_Qty ppOrderQty) { ...
final HashSet<HuId> receivedHUIds = new HashSet<>(); huPPOrderQtyDAO.retrieveOrderQtyForFinishedGoodsReceive(ppOrderId) .stream() .filter(I_PP_Order_Qty::isProcessed) .forEach(processedCandidate -> { final HuId huId = HuId.ofRepoId(processedCandidate.getM_HU_ID()); receivedHUIds.add(huId); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\impl\HUPPOrderQtyBL.java
1
请完成以下Java代码
public static final class AuthenticatorAttestationResponseBuilder { @SuppressWarnings("NullAway.Init") private Bytes attestationObject; private @Nullable List<AuthenticatorTransport> transports; @SuppressWarnings("NullAway.Init") private Bytes clientDataJSON; private AuthenticatorAttestationResponseBuil...
* @param clientDataJSON the client data JSON. * @return the {@link AuthenticatorAttestationResponseBuilder} */ public AuthenticatorAttestationResponseBuilder clientDataJSON(Bytes clientDataJSON) { this.clientDataJSON = clientDataJSON; return this; } /** * Builds a {@link AuthenticatorAssertionResp...
repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\AuthenticatorAttestationResponse.java
1
请在Spring Boot框架中完成以下Java代码
public void initDataManagers() { if (eventSubscriptionDataManager == null) { eventSubscriptionDataManager = new MybatisEventSubscriptionDataManager(this); } } public void initEntityManagers() { if (eventSubscriptionEntityManager == null) { eventSubscriptionEntity...
@Override public ObjectMapper getObjectMapper() { return objectMapper; } @Override public EventSubscriptionServiceConfiguration setObjectMapper(ObjectMapper objectMapper) { this.objectMapper = objectMapper; return this; } public Duration getEventSubscriptionLockTime() {...
repos\flowable-engine-main\modules\flowable-eventsubscription-service\src\main\java\org\flowable\eventsubscription\service\EventSubscriptionServiceConfiguration.java
2
请完成以下Java代码
private static LocalDate retrieveLocalDate(final ResultSet rs) throws SQLException { return TimeUtil.asLocalDate(rs.getTimestamp(1)); } private static LocalTime retrieveLocalTime(final ResultSet rs) throws SQLException { return TimeUtil.asLocalTime(rs.getTimestamp(1)); } private static final Logger logger =...
@Override public Set<CtxName> getParameters() { return stringExpression.getParameters(); } @Override public V evaluate(final Evaluatee ctx, final OnVariableNotFound onVariableNotFound) throws ExpressionEvaluationException { final String sql = stringExpression.evaluate(ctx, onVariableNotFound); if (Check.is...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\SqlDefaultValueExpression.java
1
请在Spring Boot框架中完成以下Java代码
public ViewResolver viewResolver() { final InternalResourceViewResolver bean = new InternalResourceViewResolver(); bean.setViewClass(JstlView.class); bean.setPrefix("/WEB-INF/view/"); bean.setSuffix(".jsp"); bean.setOrder(2); return bean; } /** Static resource lo...
resolver.setCookieName("example-theme-cookie"); return resolver; } @Bean public ThemeChangeInterceptor themeChangeInterceptor() { ThemeChangeInterceptor interceptor = new ThemeChangeInterceptor(); interceptor.setParamName("theme"); return interceptor; } @Override ...
repos\tutorials-master\spring-web-modules\spring-mvc-basics\src\main\java\com\baeldung\spring\web\config\WebConfig.java
2
请完成以下Java代码
public int size() { return cache.size(); } protected ProcessDefinitionInfoCacheObject retrieveProcessDefinitionInfoCacheObject( String processDefinitionId, CommandContext commandContext ) { ProcessDefinitionInfoEntityManager infoEntityManager = commandContext.getProcessDefin...
); if (infoEntity != null && infoEntity.getRevision() != cacheObject.getRevision()) { cacheObject.setRevision(infoEntity.getRevision()); if (infoEntity.getInfoJsonId() != null) { byte[] infoBytes = infoEntityManager.findInfoJsonById(infoEntity.getInfoJsonId()); ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\deploy\ProcessDefinitionInfoCache.java
1
请完成以下Java代码
public List<IPair<IAllocationRequest, IAllocationResult>> unloadAll(final IHUContext huContext) { final List<IPair<IAllocationRequest, IAllocationResult>> result = new ArrayList<>(); final Iterator<IAllocationSource> sourceIterator = sources.iterator(); while (sourceIterator.hasNext()) { final IAllocationS...
{ destionation.loadComplete(huContext); } } @Override public void unloadComplete(final IHUContext huContext) { for (final IAllocationSource source : sources) { source.unloadComplete(huContext); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\GenericListAllocationSourceDestination.java
1
请在Spring Boot框架中完成以下Java代码
public class Employee { @Id @GeneratedValue private int id; private String name; private String title; public Employee() { } public Employee(String name, String title) { this.name = name; this.title = title; } public String getName() {
return name; } public void setName(String name) { this.name = name; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public int getId() { return id; } }
repos\tutorials-master\persistence-modules\spring-boot-persistence\src\main\java\com\baeldung\boot\domain\Employee.java
2
请完成以下Java代码
public int discoverServers(String msg) throws IOException { initializeSocketForBroadcasting(); copyMessageOnBuffer(msg); // When we want to broadcast not just to local network, call listAllBroadcastAddresses() and execute broadcastPacket for each value. broadcastPacket(address); ...
socket.setBroadcast(true); } private void copyMessageOnBuffer(String msg) { buf = msg.getBytes(); } private void broadcastPacket(InetAddress address) throws IOException { DatagramPacket packet = new DatagramPacket(buf, buf.length, address, 4445); socket.send(packet); } ...
repos\tutorials-master\core-java-modules\core-java-networking-5\src\main\java\com\baeldung\networking\udp\broadcast\BroadcastingClient.java
1
请在Spring Boot框架中完成以下Java代码
public class HistoricDetailRestServiceImpl implements HistoricDetailRestService { protected ObjectMapper objectMapper; protected ProcessEngine processEngine; public HistoricDetailRestServiceImpl(ObjectMapper objectMapper, ProcessEngine processEngine) { this.objectMapper = objectMapper; this.processEngin...
public CountResultDto getHistoricDetailsCount(UriInfo uriInfo) { HistoricDetailQueryDto queryDto = new HistoricDetailQueryDto(objectMapper, uriInfo.getQueryParameters()); HistoricDetailQuery query = queryDto.toQuery(processEngine); long count = query.count(); CountResultDto result = new CountResultDto(...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\history\HistoricDetailRestServiceImpl.java
2
请完成以下Java代码
public String getEntityType() { return entityType; } public void setEntityType(String entityType) { this.entityType = entityType; } public List<PropertyChange> getPropertyChanges() { return propertyChanges; } public void setPropertyChanges(List<PropertyChange> propertyChanges) { this.prop...
public void setRootProcessInstanceId(String rootProcessInstanceId) { this.rootProcessInstanceId = rootProcessInstanceId; } public String getExternalTaskId() { return externalTaskId; } public void setExternalTaskId(String externalTaskId) { this.externalTaskId = externalTaskId; } public String ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\oplog\UserOperationLogContextEntry.java
1
请完成以下Java代码
public void invalidateView(final ViewId packingHUsViewId) { getPackingHUsViewIfExists(packingHUsViewId) .ifPresent(packingHUsView -> packingHUsView.invalidateAll()); } private Optional<HUEditorView> getPackingHUsViewIfExists(final ViewId packingHUsViewId) { final PickingSlotsClearingView pickingSlotsCleari...
.addAdditionalRelatedProcessDescriptor(createProcessDescriptor(WEBUI_PackingHUsView_AddHUsToShipperTransportationShipAndInvoice.class)) .setParameter(WEBUI_M_HU_Transform.PARAM_CheckExistingHUsInsideView, true) .build(); return huEditorViewFactory.createView(request); } private RelatedProcessDescriptor cr...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingslotsClearing\PackingHUsViewFactory.java
1
请完成以下Java代码
private void exportInvoice(@NonNull final InvoiceToExport invoiceToExport) { final ILoggable loggable = Loggables.withLogger(logger, Level.DEBUG); final List<InvoiceExportClient> exportClients = invoiceExportServiceRegistry.createExportClients(invoiceToExport); if (exportClients.isEmpty()) { loggable.addLo...
{ byteArrayData = ByteStreams.toByteArray(exportResult.getData()); } catch (final IOException e) { throw AdempiereException.wrapIfNeeded(e); } final AttachmentTags attachmentTag = AttachmentTags.builder() .tag(AttachmentTags.TAGNAME_IS_DOCUMENT, StringUtils.ofBoolean(true)) // other than the "input"...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\export\InvoiceExportService.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public org.compiere.model.I_C_Invoice getC_Invoice_From() { return get_ValueAsPO(COLUMNNAME_C_Invoice_From_ID, org.compiere.model.I_C_Invoice.class); } @Override public vo...
* C_Invoice_Relation_Type AD_Reference_ID=541475 * Reference name: C_Invoice_Relation_Types */ public static final int C_INVOICE_RELATION_TYPE_AD_Reference_ID=541475; /** PurchaseToSales = POtoSO */ public static final String C_INVOICE_RELATION_TYPE_PurchaseToSales = "POtoSO"; @Override public void setC_Invoic...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Invoice_Relation.java
1
请完成以下Java代码
public void actionPerformed(ActionEvent e) { if (e.getSource() == butCall) { callContact(); } else if (e.getSource() == butRefresh) { refreshAll(true); m_updater.start(); } else if (e.getSource() == fShowFromAllBundles) { // fBundles.setEnabled(!fShowFromAllBundles.isSelected()); fBundle...
} // @Override @Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getSource() == m_model.getContactsGridTab() && evt.getPropertyName().equals(GridTab.PROPERTY)) { updateFieldsStatus(); m_model.queryDetails(); vtableAutoSizeAll(); } } public static Image getImage(String fileN...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\callcenter\form\CallCenterForm.java
1
请完成以下Java代码
public final class VersionReference { private final VersionProperty property; private final String value; private VersionReference(VersionProperty property, String value) { this.property = property; this.value = value; } public static VersionReference ofProperty(VersionProperty property) { return new Ver...
} /** * Return the version or {@code null} if this reference is backed by a property. * @return the version or {@code null} */ public String getValue() { return this.value; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) ...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\version\VersionReference.java
1
请在Spring Boot框架中完成以下Java代码
public SecurityPostProcessorProperties getPostProcessor() { return this.securityPostProcessorProperties; } public String getPropertiesFile() { return this.propertiesFile; } public void setPropertiesFile(String propertiesFile) { this.propertiesFile = propertiesFile; } public ApacheShiroProperties getShiro...
public String getFile() { return this.file; } public void setFile(String file) { this.file = file; } public String getLevel() { return this.level; } public void setLevel(String level) { this.level = level; } } public static class SecurityManagerProperties { private String className; ...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\SecurityProperties.java
2
请在Spring Boot框架中完成以下Java代码
public class GatewayNoLoadBalancerClientAutoConfiguration { @Bean @ConditionalOnMissingBean(ReactiveLoadBalancerClientFilter.class) public NoLoadBalancerClientFilter noLoadBalancerClientFilter(GatewayLoadBalancerProperties properties) { return new NoLoadBalancerClientFilter(properties.isUse404()); } protected ...
@Override @SuppressWarnings("Duplicates") public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) { URI url = exchange.getAttribute(GATEWAY_REQUEST_URL_ATTR); String schemePrefix = exchange.getAttribute(GATEWAY_SCHEME_PREFIX_ATTR); if (url == null || (!"lb".equals(url.getScheme()) &&...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\GatewayNoLoadBalancerClientAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public class Chapter24Application { public static void main(String[] args) { SpringApplication.run(Chapter24Application.class, args); } @Api(tags = {"1-教师管理","3-教学管理"}) @RestController @RequestMapping(value = "/teacher") static class TeacherController { @ApiOperation(value = "...
@ApiOperation(value = "获取学生清单", tags = "3-教学管理") @GetMapping("/list") public String bbb() { return "bbb"; } @ApiOperation("获取教某个学生的老师清单") @GetMapping("/his-teachers") public String ccc() { return "ccc"; } @ApiOperation("创建一个学生") ...
repos\SpringBoot-Learning-master\2.x\chapter2-4\src\main\java\com\didispace\chapter24\Chapter24Application.java
2
请完成以下Java代码
public class C_Invoice_RemoveRelation extends JavaProcess implements IProcessPrecondition { private final IQueryBL queryBL = Services.get(IQueryBL.class); @Param(parameterName = I_C_Invoice_Relation.COLUMNNAME_C_Invoice_From_ID, mandatory = true) private int poInvoiceRepoId; @Param(parameterName = I_C_Invoice_Rela...
.create().anyMatch(); if (!invoiceRelationsFound) { return ProcessPreconditionsResolution.rejectWithInternalReason("No invoice relations found."); } return ProcessPreconditionsResolution.accept(); } @Override protected String doIt() throws Exception { removeRelations(); return MSG_OK; } private v...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\process\C_Invoice_RemoveRelation.java
1
请完成以下Spring Boot application配置
spring.datasource.url=jdbc:mysql://localhost:3306/test spring.datasource.username=root spring.datasource.password=root spring.datasource.driver-class-name=com.mysq
l.jdbc.Driver spring.jpa.properties.hibernate.hbm2ddl.auto=create-drop
repos\SpringBoot-Learning-master\1.x\Chapter3-2-2\src\main\resources\application.properties
2
请完成以下Java代码
public Object getPersistentState() { Map<String, Object> persistentState = new HashMap<String, Object>(); persistentState.put("name", name); persistentState.put("description", description); return persistentState; } public int getRevisionNext() { return revision+1; } public String getId() ...
return contentId; } public void setContentId(String contentId) { this.contentId = contentId; } public ByteArrayEntity getContent() { return content; } public void setContent(ByteArrayEntity content) { this.content = content; } public String getTenantId() { return tenantId; } pub...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\AttachmentEntity.java
1
请完成以下Java代码
private ModelColumn<I_M_HU_Attribute, Object> getHUAttributeValueColumn() { return huAttributeValueColumn; } private Set<Object> getValues() { return _values; } private Set<Object> getValuesAndSubstitutes() { if (_valuesAndSubstitutes != null) { return _valuesAndSubstitutes; } final ModelColumn...
// Iterate current values for (final Object value : getValues()) { // Append current value to result valuesAndSubstitutes.add(value); // Search and append it's substitutes too, if found if (isStringValueColumn && value instanceof String) { final String valueStr = value.toString(); final I_M_...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUAttributeQueryFilterVO.java
1
请完成以下Java代码
public class CmsMemberReport implements Serializable { private Long id; @ApiModelProperty(value = "举报类型:0->商品评价;1->话题内容;2->用户评论") private Integer reportType; @ApiModelProperty(value = "举报人") private String reportMemberName; private Date createTime; private String reportObject; @ApiM...
this.reportObject = reportObject; } public Integer getReportStatus() { return reportStatus; } public void setReportStatus(Integer reportStatus) { this.reportStatus = reportStatus; } public Integer getHandleStatus() { return handleStatus; } public void setHandl...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsMemberReport.java
1
请在Spring Boot框架中完成以下Java代码
ProblemDetail onResourceNotFound(HttpServletRequest request, BaseException baseException) { ResponseStatus resp = getResponseStatus(baseException); return handleError(request, baseException, resp.code(), resp.reason()); } static ResponseStatus getResponseStatus(BaseException ex) { retur...
pd.setProperty("series", status.series()); pd.setProperty("rootCause", ExceptionUtils.getRootCause(error).toString()); pd.setProperty("trace", getTraceParent()); return pd; } String getTraceParent() { Span span = tracer.currentSpan(); if (span == null) { ret...
repos\spring-boot-web-application-sample-master\common\src\main\java\gt\common\config\CommonExceptionHandler.java
2
请在Spring Boot框架中完成以下Java代码
public class DruidConfig { /** * 带有广告的common.js全路径,druid-1.1.14 */ private static final String FILE_PATH = "support/http/resources/js/common.js"; /** * 原始脚本,触发构建广告的语句 */ private static final String ORIGIN_JS = "this.buildFooter();"; /** * 替换后的脚本 */ private static f...
final String newJs = text.replace(ORIGIN_JS, NEW_JS); FilterRegistrationBean<RemoveAdFilter> registration = new FilterRegistrationBean<>(); registration.setFilter(new RemoveAdFilter(newJs)); registration.addUrlPatterns(commonJsPattern); return registration; } /** * 删除druid的...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\DruidConfig.java
2
请在Spring Boot框架中完成以下Java代码
public abstract class PurchaseCandidateCreatedOrUpdatedHandler<T extends PurchaseCandidateEvent> implements MaterialEventHandler<T> { private final CandidateChangeService candidateChangeHandler; private final CandidateRepositoryRetrieval candidateRepositoryRetrieval; public PurchaseCandidateCreatedOrUpdatedHandl...
final PurchaseDetail purchaseDetail = purchaseDetailBuilder .qty(materialDescriptor.getQuantity()) .vendorRepoId(event.getVendorId()) .purchaseCandidateRepoId(event.getPurchaseCandidateRepoId()) .advised(Flag.FALSE_DONT_UPDATE) .build(); candidateBuilder .materialDescriptor(materialDescriptor...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\purchasecandidate\PurchaseCandidateCreatedOrUpdatedHandler.java
2
请完成以下Java代码
public static Object defaultInstantiateDelegate(String className, List<FieldDeclaration> fieldDeclarations) { return defaultInstantiateDelegate(className, fieldDeclarations, null); } public static void applyFieldDeclaration(List<FieldDeclaration> fieldDeclarations, Object target) { applyFieldDe...
public static void applyFieldDeclaration(FieldDeclaration declaration, Object target) { applyFieldDeclaration(declaration, target, true); } public static void applyFieldDeclaration(FieldDeclaration declaration, Object target, boolean throwExceptionOnMissingField) { ReflectUtil.invokeSetterOrFie...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\helper\AbstractClassDelegate.java
1
请完成以下Java代码
public Builder formatted(String formatted) { this.formatted = formatted; return this; } /** * Sets the full street address, which may include house number, street name, P.O. * Box, etc. * @param streetAddress the full street address * @return the {@link Builder} */ public Builder streetAddre...
} /** * Sets the country. * @param country the country * @return the {@link Builder} */ public Builder country(String country) { this.country = country; return this; } /** * Builds a new {@link DefaultAddressStandardClaim}. * @return a {@link AddressStandardClaim} */ public Addres...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\DefaultAddressStandardClaim.java
1
请完成以下Java代码
public BPartnerBankAccountImportHelper setProcess(final BPartnerImportProcess process) { this.process = process; return this; } @Nullable public I_C_BP_BankAccount importRecord(final I_I_BPartner importRecord) { final BPartnerId bpartnerId = BPartnerId.ofRepoId(importRecord.getC_BPartner_ID()); I_C_BP_Ba...
bankAccount.setA_Name(importRecord.getSwiftCode()); bankAccount.setC_Currency_ID(currencyBL.getBaseCurrency(process.getCtx()).getId().getRepoId()); final BankId bankId = bankRepository.getBankIdBySwiftCode(importRecord.getSwiftCode()).orElse(null); if (bankId != null) { bankAccount.setC_Bank_ID(bankId.g...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\impexp\BPartnerBankAccountImportHelper.java
1
请完成以下Java代码
public boolean load(String path) { trie = new BinTrie<Byte>(); if (loadDat(path + Predefine.TRIE_EXT)) return true; String line = null; try { BufferedReader bw = new BufferedReader(new InputStreamReader(IOUtil.newInputStream(path))); while ((line = bw....
boolean loadDat(String path) { return trie.load(path); } public Set<String> keySet() { Set<String> keySet = new LinkedHashSet<String>(); for (Map.Entry<String, Byte> entry : trie.entrySet()) { keySet.add(entry.getKey()); } return keySet; ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\common\CommonStringDictionary.java
1
请完成以下Java代码
public int getI_BPartner_GlobalID_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_I_BPartner_GlobalID_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Import-Fehlermeldung. @param I_ErrorMsg Meldungen, die durch den Importprozess generiert wurden */ @Override public void setI_E...
@param Processing Process Now */ @Override 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 ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_BPartner_GlobalID.java
1
请完成以下Java代码
public void setStatusLine(final String text, final boolean error) { mt_error = error; mt_text = text; if (mt_error) { statusLine.setForeground(AdempierePLAF.getTextColor_Issue()); } else { statusLine.setForeground(AdempierePLAF.getTextColor_OK()); } if (mt_text == null || mt_text.length() == 0...
// Save // m_text = text; m_dse = dse; } // setStatusDB /** * Set Status DB Info * * @param text text */ @Override public void setStatusDB(final String text) { setStatusDB(text, null); } // setStatusDB /** * Set Status DB Info * * @param no no */ public void setStatusDB(final int no) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\StatusBar.java
1
请完成以下Spring Boot application配置
spring: # datasource 数据源配置内容,对应 DataSourceProperties 配置属性类 datasource: url: jdbc:mysql://127.0.0.1:3306/lab-20-liquibase?useSSL=false&useUnicode=true&characterEncoding=UTF-8 driver-class-name: com.mysql.jdbc.Driver username: root # 数据库账号 password: # 数据库密码 # Liquibase 配置内容,对应 LiquibaseProperties 配置...
ster.yaml # Liquibase 配置文件地址 url: jdbc:mysql://127.0.0.1:3306/lab-20-liquibase?useSSL=false&useUnicode=true&characterEncoding=UTF-8 # 数据库地址 user: root # 数据库账号 password: # 数据库密码
repos\SpringBoot-Labs-master\lab-20\lab-20-database-version-control-liquibase\src\main\resources\application.yaml
2
请完成以下Java代码
default Document retrieveDocumentById(final DocumentEntityDescriptor entityDescriptor, final DocumentId recordId, final IDocumentChangesCollector changesCollector) { return retrieveDocument(DocumentQuery.ofRecordId(entityDescriptor, recordId).setChangesCollector(changesCollector).build(), changesCollector); } /**...
String retrieveVersion(DocumentEntityDescriptor entityDescriptor, int documentIdAsInt); int retrieveLastLineNo(DocumentQuery query); /** * Can be called to verify that this repository belongs with the given {@code entityDescriptor} */ default void assertThisRepository(@NonNull final DocumentEntityDescriptor en...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentsRepository.java
1
请完成以下Java代码
public final class HUTopLevel implements Comparable<HUTopLevel> { private final I_M_HU topLevelHU; private final I_M_HU luHU; private final I_M_HU tuHU; private final I_M_HU vhu; // pre-built: private final ArrayKey hashKey; private final HuId topLevelHUId; private final HuId luHUId; @Getter private final Hu...
@Override public int compareTo(final HUTopLevel other) { if (this == other) { return 0; } if (other == null) { return +1; // nulls last } return hashKey.compareTo(other.hashKey); } /** * @return top level HU; never return <code>null</code> */ public I_M_HU getM_HU_TopLevel() { return t...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\util\HUTopLevel.java
1
请在Spring Boot框架中完成以下Java代码
public boolean doCatch(Throwable e) { // log the error, return true to rollback the transaction but don't throw it forward log.error(e.getLocalizedMessage() + ", mview=" + mview + ", sourcePO=" + sourcePO + ", trxName=" + trxName, e); ok[0] = false; return true; } @Override public void doFi...
return false; if (changeType == ModelValidator.TYPE_AFTER_NEW || changeType == ModelValidator.TYPE_AFTER_DELETE) { return true; } for (String sourceColumn : sourceColumns) { if (sourcePO.is_ValueChanged(sourceColumn)) { return true; } } return false; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\service\impl\TableMViewBL.java
2
请完成以下Java代码
public String getName() { return name; } } private float duration; private Medium medium; private Level level; private List<Course> prerequisite; public Course(String title, Author author) { super(title, author); } public float getDuration() { retur...
public Level getLevel() { return level; } public void setLevel(Level level) { this.level = level; } public List<Course> getPrerequisite() { return prerequisite; } public void setPrerequisite(List<Course> prerequisite) { this.prerequisite = prerequisite; } }
repos\tutorials-master\video-tutorials\jackson-annotations-video\src\main\java\com\baeldung\jacksonannotation\domain\Course.java
1
请完成以下Java代码
private boolean isMissingObjectTypeMetadata(@Nullable JsonNode node) { return isObjectNode(node) && !node.has(AT_TYPE_METADATA_PROPERTY_NAME); } private boolean isMissingObjectTypeMetadata(@Nullable PdxInstance pdxInstance) { return pdxInstance != null && !pdxInstance.hasField(AT_TYPE_METADATA_PROPERTY_NAME); }...
*/ boolean isObjectNode(@Nullable JsonNode node) { return node != null && (node.isObject() || node instanceof ObjectNode); } /** * Null-safe method to determine whether the given {@link String JSON} is valid. * * @param json {@link String} containing JSON to evaluate. * @return a boolean value indicating ...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\data\json\converter\support\JSONFormatterPdxToJsonConverter.java
1
请完成以下Java代码
public void addTransaction(final IHUTransactionCandidate trx) { transactions.add(trx); } @Override public void addTransactions(final List<IHUTransactionCandidate> trxs) { trxs.forEach(trx -> addTransaction(trx)); } @Override public List<IHUTransactionCandidate> getTransactions() { return transactionsRO...
@Override public List<IHUTransactionAttribute> getAttributeTransactions() { return attributeTransactionsRO; } @Override public void aggregateTransactions() { final IHUTrxBL huTrxBL = Services.get(IHUTrxBL.class); final List<IHUTransactionCandidate> aggregateTransactions = huTrxBL.aggregateTransactions(tran...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\MutableAllocationResult.java
1
请完成以下Java代码
public static ByteArrayEntity createAndInsert(String name, byte[] bytes) { ByteArrayEntity byteArrayEntity = new ByteArrayEntity(name, bytes); Context .getCommandContext() .getDbSqlSession() .insert(byteArrayEntity); return byteArrayEntity; }...
@Override public int getRevision() { return revision; } @Override public void setRevision(int revision) { this.revision = revision; } @Override public String toString() { return "ByteArrayEntity[id=" + id + ", name=" + name + ", size=" + (bytes != null ? bytes.lengt...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ByteArrayEntity.java
1
请在Spring Boot框架中完成以下Java代码
public class VerifyController { private final VerifyService verificationCodeService; private final EmailService emailService; @PostMapping(value = "/resetEmail") @ApiOperation("重置邮箱,发送验证码") public ResponseEntity<Object> resetEmail(@RequestParam String email){ EmailVo emailVo = verification...
} @GetMapping(value = "/validated") @ApiOperation("验证码验证") public ResponseEntity<Object> validated(@RequestParam String email, @RequestParam String code, @RequestParam Integer codeBi){ CodeBiEnum biEnum = CodeBiEnum.find(codeBi); switch (Objects.requireNonNull(biEnum)){ case ONE...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\rest\VerifyController.java
2
请完成以下Java代码
public class Account { private final TxnLong lastUpdate; private final TxnInteger balance; Account(final int balance) { this.lastUpdate = StmUtils.newTxnLong(System.currentTimeMillis()); this.balance = StmUtils.newTxnInteger(balance); } Integer getBalance() { return balanc...
lastUpdate.set(date); if (balance.get() < 0) { throw new IllegalArgumentException("Not enough money"); } }); } void transferTo(final Account other, final int amount) { StmUtils.atomic(() -> { final long date = System.currentTimeMillis(); ...
repos\tutorials-master\libraries-data-3\src\main\java\com\baeldung\stm\Account.java
1
请完成以下Java代码
public void onBeforeSave(BeforeSaveEvent<Object> event) { LOGGER.info("onBeforeSave: {}, {}", event.getSource(), event.getStatement()); } /* * (non-Javadoc) * @see org.springframework.data.cassandra.core.mapping.event.AbstractCassandraEventListener#onAfterSave(org.springframework.data.cassandra.core.mapping.ev...
} /* * (non-Javadoc) * @see org.springframework.data.cassandra.core.mapping.event.AbstractCassandraEventListener#onAfterLoad(org.springframework.data.cassandra.core.mapping.event.AfterLoadEvent) */ @Override public void onAfterLoad(AfterLoadEvent<Object> event) { LOGGER.info("onAfterLoad: {}", event.getSour...
repos\spring-data-examples-main\cassandra\example\src\main\java\example\springdata\cassandra\events\LoggingEventListener.java
1
请完成以下Java代码
public static boolean updateCCM_Bundle_Status(int R_Group_ID, String trxName) { final boolean isActive = "Y".equals(DB.getSQLValueStringEx(trxName, "SELECT IsActive FROM R_Group WHERE R_Group_ID=?", R_Group_ID)); // final String sql = "SELECT" +" b.IsActive" +", b."+R_Group_CCM_Bundle_Status +", COALES...
} else { // should not happen throw new AdempiereException("Unhandled status. Please contact your System Administrator" +" (CountAll="+countAll+", CountClosed="+countClosed+", R_Status_ID="+R_Group_ID+")"); } // If status not found, try it directly // Case: the bundle has no contacts if (oldStat...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\callcenter\model\BundleUtil.java
1
请完成以下Java代码
protected boolean hasExcludingConditions() { return super.hasExcludingConditions() || CompareUtil.areNotInAscendingOrder(createdAfter, createdBefore) || CompareUtil.areNotInAscendingOrder(closedAfter, closedBefore) || CompareUtil.elementIsNotContainedInList(caseInstanceId, caseInstanceIds) |...
return superCaseInstanceId; } public void setSuperCaseInstanceId(String superCaseInstanceId) { this.superCaseInstanceId = superCaseInstanceId; } public List<String> getCaseKeyNotIn() { return caseKeyNotIn; } public Date getCreatedAfter() { return createdAfter; } public Date getCreatedBef...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricCaseInstanceQueryImpl.java
1
请完成以下Java代码
public int getTaskCount() { return taskCount; } public void setTaskCount(int taskCount) { this.taskCount = taskCount; } public int getJobCount() { return jobCount; } public void setJobCount(int jobCount) { this.jobCount = jobCount; } public int getTime...
} @Override public Integer getAppVersion() { return appVersion; } //toString ///////////////////////////////////////////////////////////////// public String toString() { if (isProcessInstanceType()) { return "ProcessInstance[" + getId() + "]"; } else { ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ExecutionEntityImpl.java
1
请在Spring Boot框架中完成以下Java代码
public void setHeaders(Map _headers) { this.headers.putAll(_headers); } public int getReadTimeout() { return readTimeout; } public void setReadTimeout(int readTimeout) { this.readTimeout = readTimeout; } public int getConnectTimeout() { return connectTimeout; } public void setConnectTimeout(int connectT...
return clientKeyStore; } public void setClientKeyStore(ClientKeyStore clientKeyStore) { this.clientKeyStore = clientKeyStore; } public com.roncoo.pay.trade.utils.httpclient.TrustKeyStore getTrustKeyStore() { return TrustKeyStore; } public void setTrustKeyStore(com.roncoo.pay.trade.utils.httpclient.TrustKeySto...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\utils\httpclient\SimpleHttpParam.java
2
请完成以下Java代码
public ClientRegistrationRepository clientRegistrationRepository() { List<ClientRegistration> registrations = clients.stream() .map(c -> getRegistration(c)) .filter(registration -> registration != null) .collect(Collectors.toList()); return new InMemoryClientRegistra...
String clientSecret = env.getProperty(CLIENT_PROPERTY_KEY + client + ".client-secret"); if (client.equals("google")) { return CommonOAuth2Provider.GOOGLE.getBuilder(client) .clientId(clientId) .clientSecret(clientSecret) .build(); } if ...
repos\tutorials-master\spring-security-modules\spring-security-oauth2\src\main\java\com\baeldung\oauth2\CustomRequestSecurityConfig.java
1
请完成以下Java代码
public String getLocationHeaderName() { return locationHeaderName; } public RewriteLocationResponseHeaderConfig setLocationHeaderName(String locationHeaderName) { this.locationHeaderName = locationHeaderName; return this; } public @Nullable String getHostValue() { return hostValue; } public R...
} public RewriteLocationResponseHeaderConfig setProtocolsRegex(String protocolsRegex) { this.protocolsRegex = protocolsRegex; this.hostPortPattern = compileHostPortPattern(protocolsRegex); this.hostPortVersionPattern = compileHostPortVersionPattern(protocolsRegex); return this; } public Pattern getH...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\filter\RewriteLocationResponseHeaderFilterFunctions.java
1
请在Spring Boot框架中完成以下Java代码
public Result<?> add(@RequestBody SysTableWhiteList sysTableWhiteList) { if (sysTableWhiteListService.add(sysTableWhiteList)) { return Result.OK("添加成功!"); } else { return Result.error("添加失败!"); } } /** * 编辑 * * @param sysTableWhiteList * @retu...
return Result.error("删除失败!"); } } /** * 批量删除 * * @param ids * @return */ @AutoLog(value = "系统表白名单-批量删除") @Operation(summary = "系统表白名单-批量删除") // @RequiresRoles("admin") @RequiresPermissions("system:tableWhite:deleteBatch") @DeleteMapping(value = "/deleteBatch"...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysTableWhiteListController.java
2
请完成以下Java代码
public String name() { return attributeNode.getLocalName(); } public String namespace() { return attributeNode.getNamespaceURI(); } public String prefix() { return attributeNode.getPrefix(); } public boolean hasPrefix(String prefix) { String attributePrefix = attributeNode.getPrefix(); ...
public String toString() { return value(); } public void writeToWriter(Writer writer) { try { writer.write(toString()); } catch (IOException e) { throw LOG.unableToWriteAttribute(this, e); } } public <C> C mapTo(Class<C> javaClass) { DataFormatMapper mapper = dataFormat.getMapp...
repos\camunda-bpm-platform-master\spin\dataformat-xml-dom\src\main\java\org\camunda\spin\impl\xml\dom\DomXmlAttribute.java
1