instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
protected Map<String, List<Incident>> groupIncidentIdsByExecutionId(CommandContext commandContext) { List<IncidentEntity> incidents = commandContext.getIncidentManager().findIncidentsByProcessInstance(processInstanceId); Map<String, List<Incident>> result = new HashMap<>(); for (IncidentEntity incidentEntit...
} else { return Collections.emptyList(); } } public static class ExecutionIdComparator implements Comparator<ExecutionEntity> { public static final ExecutionIdComparator INSTANCE = new ExecutionIdComparator(); @Override public int compare(ExecutionEntity o1, ExecutionEntity o2) { retu...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\GetActivityInstanceCmd.java
1
请完成以下Java代码
public void setAD_PInstance(final org.compiere.model.I_AD_PInstance AD_PInstance) { set_ValueFromPO(COLUMNNAME_AD_PInstance_ID, org.compiere.model.I_AD_PInstance.class, AD_PInstance); } @Override public void setAD_PInstance_ID (final int AD_PInstance_ID) { if (AD_PInstance_ID < 1) set_Value (COLUMNNAME_AD...
} @Override public java.lang.String getChunkUUID() { return get_ValueAsString(COLUMNNAME_ChunkUUID); } @Override public de.metas.inoutcandidate.model.I_M_ShipmentSchedule getM_ShipmentSchedule() { return get_ValueAsPO(COLUMNNAME_M_ShipmentSchedule_ID, de.metas.inoutcandidate.model.I_M_ShipmentSchedule.cla...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_ShipmentSchedule_Recompute.java
1
请完成以下Java代码
public String getBatchId() { return batchId; } public void setBatchId(String batchId) { this.batchId = batchId; } public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } public String getRootProcessInstanceId() { ret...
+ ", jobDefinitionId=" + jobDefinitionId + ", batchId=" + batchId + ", operationId=" + operationId + ", operationType=" + operationType + ", userId=" + userId + ", timestamp=" + timestamp + ", property=" + property + ", orgValue=" + orgValue + ", newValue=...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\UserOperationLogEntryEventEntity.java
1
请完成以下Java代码
public EmptiesMovementProducer newEmptiesMovementProducer() { return EmptiesMovementProducer.newInstance(); } @Override public void generateMovementFromEmptiesInout(@NonNull final I_M_InOut emptiesInOut) { // // Fetch shipment/receipt lines and convert them to packing material line candidates. final List<...
public IReturnsInOutProducer newReturnsInOutProducer(final Properties ctx) { return new EmptiesInOutProducer(ctx); } @Override @Nullable public I_M_InOut createDraftEmptiesInOutFromReceiptSchedule(@NonNull final I_M_ReceiptSchedule receiptSchedule, @NonNull final String movementType) { // // Create a draft...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\empties\impl\HUEmptiesService.java
1
请在Spring Boot框架中完成以下Java代码
public class Post { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private long id; @Column(name = "title") private String title; @Column(name = "description") private String description; @OneToMany(cascade = CascadeType.ALL) @JoinColumn( name = "pc_fid", referencedColumnName = "id") List<Com...
public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public List<Comment> getComments() { return comments; } public void setComments(List<Comment> comments)...
repos\Spring-Boot-Advanced-Projects-main\springboot-hibernate-one-many-mapping\src\main\java\net\alanbinu\springboot\entity\Post.java
2
请完成以下Java代码
public List<IdentityLink> execute(CommandContext commandContext) { ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext); TaskEntity task = processEngineConfiguration.getTaskServiceConfiguration().getTaskService().getTask(taskId); ...
identityLink.setTaskId(task.getId()); identityLinks.add(identityLink); } if (task.getOwner() != null) { IdentityLinkEntity identityLink = processEngineConfiguration.getIdentityLinkServiceConfiguration().getIdentityLinkService().createIdentityLink(); identityLink.setUs...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\GetIdentityLinksForTaskCmd.java
1
请在Spring Boot框架中完成以下Java代码
public class EmployeeRepositoryImpl implements EmployeeRepository { private List<Employee> employeeList; public EmployeeRepositoryImpl() { employeeList = new ArrayList<Employee>(); employeeList.add(new Employee(1, "Jane")); employeeList.add(new Employee(2, "Jack")); employeeList...
for (Employee emp : employeeList) { if (emp.getId() == id) { employeeList.remove(emp); return; } } throw new EmployeeNotFound(); } public void addEmployee(Employee employee) { for (Employee emp : employeeList) { if (emp...
repos\tutorials-master\spring-web-modules\spring-jersey\src\main\java\com\baeldung\server\repository\EmployeeRepositoryImpl.java
2
请完成以下Java代码
public class SignalEventDefinitionParser extends BaseChildElementParser { public String getElementName() { return ELEMENT_EVENT_SIGNALDEFINITION; } public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception { if (!(parentElement instance...
StringUtils.isNotEmpty( xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_ACTIVITY_ASYNCHRONOUS) ) ) { eventDefinition.setAsync( Boolean.parseBoolean( xtr.getAttributeValue(ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_ACTIVITY_...
repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\child\SignalEventDefinitionParser.java
1
请在Spring Boot框架中完成以下Java代码
public class MD_Stock { private final ITrxManager trxManager = Services.get(ITrxManager.class); private final AvailableForSalesService availableForSalesService; private final AvailableForSalesConfigRepo availableForSalesConfigRepo; private final AvailableForSalesUtil availableForSalesUtil; public MD_Stock( @N...
{ return; // nothing to do } final Properties ctx = Env.copyCtx(InterfaceWrapperHelper.getCtx(stockRecord)); final ProductId productId = ProductId.ofRepoId(stockRecord.getM_Product_ID()); final OrgId orgId = OrgId.ofRepoId(stockRecord.getAD_Org_ID()); final AttributesKey attributesKey = AttributesKey.ofSt...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\stock\interceptor\MD_Stock.java
2
请在Spring Boot框架中完成以下Java代码
RabbitTemplate rabbitTemplate(RabbitTemplateConfigurer configurer, ConnectionFactory connectionFactory, ObjectProvider<RabbitTemplateCustomizer> customizers) { RabbitTemplate template = new RabbitTemplate(); configurer.configure(template, connectionFactory); customizers.orderedStream().forEach((customizer)...
} @Configuration(proxyBeanMethods = false) @ConditionalOnClass(RabbitMessagingTemplate.class) @ConditionalOnMissingBean(RabbitMessagingTemplate.class) @Import(RabbitTemplateConfiguration.class) protected static class RabbitMessagingTemplateConfiguration { @Bean @ConditionalOnSingleCandidate(RabbitTemplate.cl...
repos\spring-boot-4.0.1\module\spring-boot-amqp\src\main\java\org\springframework\boot\amqp\autoconfigure\RabbitAutoConfiguration.java
2
请完成以下Java代码
public void setDescription (String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Beschreibung. @return Optional short description of the record */ public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set Konnektor. @param ImpEx_Connec...
else set_Value (COLUMNNAME_ImpEx_ConnectorType_ID, Integer.valueOf(ImpEx_ConnectorType_ID)); } /** Get Konnektor-Typ. @return Konnektor-Typ */ public int getImpEx_ConnectorType_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_ImpEx_ConnectorType_ID); if (ii == null) return 0; return ii.intValu...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\impex\model\X_ImpEx_Connector.java
1
请完成以下Java代码
public void setMovementType (java.lang.String MovementType) { set_ValueNoCheck (COLUMNNAME_MovementType, MovementType); } /** Get Bewegungs-Art. @return Method of moving the inventory */ @Override public java.lang.String getMovementType () { return (java.lang.String)get_Value(COLUMNNAME_MovementType);...
{ Integer ii = (Integer)get_Value(COLUMNNAME_M_Transaction_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.eevolution.model.I_PP_Cost_Collector getPP_Cost_Collector() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_PP_Cost_Collector_ID, org.eevolution.model.I_PP_Co...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Transaction.java
1
请完成以下Java代码
public JSONWriter value(boolean b) throws JSONException { return this.append(b ? "true" : "false"); } /** * Append a double value. * * @param d * A double. * @return this * @throws JSONException * If the number is not finite. */ public JSON...
*/ public JSONWriter value(long l) throws JSONException { return this.append(Long.toString(l)); } /** * Append an object value. * * @param o * The object to append. It can be null, or a Boolean, Number, String, JSONObject, or JSONArray, or an object with a toJSONString(...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\json\JSONWriter.java
1
请完成以下Java代码
private void turnOnDynamicAllocation(@NonNull final I_M_PickingSlot pickingSlot) { pickingSlot.setIsDynamic(true); pickingSlotRepository.save(pickingSlot); } private void turnOffDynamicAllocation(@NonNull final I_M_PickingSlot pickingSlot) { final PickingSlotId pickingSlotId = PickingSlotId.ofRepoId(pickingS...
.pickingSlotId(PickingSlotId.ofRepoId(pickingSlot.getM_PickingSlot_ID())) .reservationValue(extractReservationValue(pickingSlot)) .build(); } private static PickingSlotReservationValue extractReservationValue(final I_M_PickingSlot pickingSlot) { final BPartnerId bpartnerId = BPartnerId.ofRepoIdOrNull(pick...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\slot\PickingSlotService.java
1
请在Spring Boot框架中完成以下Java代码
public static class TableNameAndAlias { public static TableNameAndAlias ofTableNameAndAlias(final String tableName, final String alias) { return new TableNameAndAlias(tableName, alias); } public static TableNameAndAlias ofTableName(final String tableName) { final String synonym = ""; return new Tab...
{ return sql.indexOf(" WHERE ") >= 0; } public String getFirstTableAliasOrTableName() { if (tableNameAndAliases.isEmpty()) // TODO check if we still need this check! { return ""; } return tableNameAndAliases.get(0).getAliasOrTableName(); } public String getFirstTableNameOrEmpty() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\impl\ParsedSql.java
2
请完成以下Java代码
public void handleEvent(ProjectRequestEvent event) { String json = null; try { ProjectRequestDocument document = this.documentFactory.createDocument(event); if (logger.isDebugEnabled()) { logger.debug("Publishing " + document); } json = toJson(document); RequestEntity<String> request = RequestEn...
String userInfo = uriComponentsBuilder.build().getUserInfo(); if (StringUtils.hasText(userInfo)) { String[] credentials = userInfo.split(":"); return restTemplateBuilder.basicAuthentication(credentials[0], credentials[1]); } else if (StringUtils.hasText(elastic.getUsername())) { return restTemplateBuilde...
repos\initializr-main\initializr-actuator\src\main\java\io\spring\initializr\actuate\stat\ProjectGenerationStatPublisher.java
1
请完成以下Java代码
public void setDLM_Referenced_Table(final org.compiere.model.I_AD_Table DLM_Referenced_Table) { set_ValueFromPO(COLUMNNAME_DLM_Referenced_Table_ID, org.compiere.model.I_AD_Table.class, DLM_Referenced_Table); } /** * Set Referenzierte Tabelle. * * @param DLM_Referenced_Table_ID Referenzierte Tabelle */ @...
} } /** * Get Referenzierende Spalte. * * @return Referenzierende Spalte */ @Override public int getDLM_Referencing_Column_ID() { final Integer ii = (Integer)get_Value(COLUMNNAME_DLM_Referencing_Column_ID); if (ii == null) { return 0; } return ii.intValue(); } /** * Set Partitionsgrenze...
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition_Config_Reference.java
1
请完成以下Java代码
public ObjectMapper getObjectMapper() { return objectMapper; } public void setObjectMapper(ObjectMapper objectMapper) { this.objectMapper = objectMapper; } // helper functions ////////////////////////////////////////// @SuppressWarnings("unchecked") public JsonNode createJsonNode(Object parameter...
return objectMapper.getNodeFactory().numberNode(parameter); } public JsonNode createJsonNode(Boolean parameter) { return objectMapper.getNodeFactory().booleanNode(parameter); } public JsonNode createJsonNode(List<Object> parameter) { if (parameter != null) { ArrayNode node = objectMapper.getNode...
repos\camunda-bpm-platform-master\spin\dataformat-json-jackson\src\main\java\org\camunda\spin\impl\json\jackson\format\JacksonJsonDataFormat.java
1
请完成以下Java代码
public class CriterionUtil { public static String generateEntryCriterionId(HasEntryCriteria hasEntryCriteria) { return "entryCriterion_" + hasEntryCriteria.getId() + "_" + (hasEntryCriteria.getEntryCriteria().size() + 1); } public static String generateExitCriterionId(HasExitCriteria hasExitCriter...
return false; } public static boolean criterionHasOnPartDependingOnPlanItem(Criterion criterion, PlanItem planItem, String event) { Sentry sentry = criterion.getSentry(); if (sentry != null) { for (SentryOnPart sentryOnPart : sentry.getOnParts()) { if (sentryOnPart.g...
repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\util\CriterionUtil.java
1
请完成以下Spring Boot application配置
logging.level.org.springframework=INFO logging.level.com.mkyong=INFO logging.level.root=ERROR # logging.pattern.console=%-5level %logger{36} - %msg%n #logging.level.org.springfram
ework.beans.factory=DEBUG # db.init.enabled=true # spring.profiles.active=dev
repos\spring-boot-master\spring-boot-commandlinerunner\src\main\resources\application.properties
2
请完成以下Java代码
public static NoDataFoundHandlers get() { return INSTANCE; } private NoDataFoundHandlers() { } public NoDataFoundHandlers addHandler(final INoDataFoundHandler handler) { noDataFoundHandlers.add(handler); return this; } /** * Invoke all registered handlers on the given parameters. If one of them retu...
for (final Object id : ids) { keyBuilder.append(id); } final ArrayKey key = keyBuilder.build(); final Set<ArrayKey> currentlyInvokedOnRecords = currentlyActiveHandlers.get() .computeIfAbsent(handler, h -> new HashSet<>()); if (!currentlyInvokedOnRecords.add(key)) { logger.debug( "The curren...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\po\NoDataFoundHandlers.java
1
请完成以下Java代码
private void rankResponseHeaders(final I_C_RfQ rfq, final List<I_C_RfQResponse> rfqResponses) { int ranking = 1; // Responses Ordered by Price for (final I_C_RfQResponse rfqResponse : rfqResponses) { final BigDecimal reponsePrice = rfqResponse.getPrice(); if (reponsePrice != null && reponsePrice.signum()...
// if (!rfqBL.isValidAmt(q1)) { return -99; } if (!rfqBL.isValidAmt(q2)) { return +99; } final BigDecimal net1 = rfqBL.calculatePriceWithoutDiscount(q1); if (net1 == null) { return -9; } final BigDecimal net2 = rfqBL.calculatePriceWithoutDiscount(q2); if (net2 == null) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\impl\DefaultRfQResponseRankingStrategy.java
1
请完成以下Java代码
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 setSelectionActive(boolean active) { m_selectionActive = acti...
} 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 List<InOutAndLineId> retrieveValidLinesToExport(final ImmutableList<InOutId> selectedShipments) { final ImmutableList<InOutId> validShipments = selectedShipments .stream() .filter(this::isValidShipment) .collect(ImmutableList.toImmutableList()); final List<InOutAndLineId> shipmentLinesToExport ...
if (shipmentLineRecord.getC_OrderLine_ID() <= 0) { return false; } return true; } private boolean isValidShipment(final InOutId shipmentId) { final IInOutBL inOutBL = Services.get(IInOutBL.class); final IInOutDAO inOutDAO = Services.get(IInOutDAO.class); final I_M_InOut shipment = inOutDAO.getById(...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\customs\process\ShipmentLinesForCustomsInvoiceRepo.java
1
请在Spring Boot框架中完成以下Java代码
public String getBearerToken() { return bearerToken; } /** * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. * * @param bearerToken The bearer token to send in the Authorization header */ public void setBearerToken(String bearerToken) { this.beare...
@Override public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) { if (bearerToken == null) { return; } headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); } private static String upperCas...
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\invoker\auth\HttpBearerAuth.java
2
请完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getText() { return text; }
public void setText(String text) { this.text = text; } public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } public String getAuthor() { return author; } public void setAuthor(String aut...
repos\tutorials-master\spring-boot-modules\spring-boot-graphql-2\src\main\java\com\baeldung\returnnull\Post.java
1
请在Spring Boot框架中完成以下Java代码
public int getMaxSize() { return this.maxSize; } public void setMaxSize(int maxSize) { this.maxSize = maxSize; } public @Nullable String getValidationQuery() { return this.validationQuery; } public void setValidationQuery(@Nullable String validationQuery) { this.validationQuery = validationQu...
} public void setValidationDepth(ValidationDepth validationDepth) { this.validationDepth = validationDepth; } public boolean isEnabled() { return this.enabled; } public void setEnabled(boolean enabled) { this.enabled = enabled; } } }
repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\autoconfigure\R2dbcProperties.java
2
请完成以下Java代码
public static MRegion get (Properties ctx, int C_Region_ID) { if (s_regions == null || s_regions.size() == 0) loadAllRegions(ctx); String key = String.valueOf(C_Region_ID); MRegion r = s_regions.get(key); if (r != null) return r; r = new MRegion (ctx, C_Region_ID, null); if (r.getC_Region_ID() == C_R...
/** * Create Region from current row in ResultSet * @param ctx context * @param rs result set * @param trxName transaction */ public MRegion (Properties ctx, ResultSet rs, String trxName) { super(ctx, rs, trxName); } // MRegion /** * Parent Constructor * @param country country * @param regionN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MRegion.java
1
请完成以下Java代码
public Long getBalanceBegin() { return balanceBegin; } public void setBalanceBegin(Long balanceBegin) { this.balanceBegin = balanceBegin; } public Long getBalanceEnd() { return balanceEnd; } public void setBalanceEnd(Long balanceEnd) { this.balanceEnd = balance...
public void setCreateDateBegin(String createDateBegin) { this.createDateBegin = createDateBegin; } public String getCreateDateEnd() { return createDateEnd; } public void setCreateDateEnd(String createDateEnd) { this.createDateEnd = createDateEnd; } @Override public...
repos\spring-boot-leaning-master\2.x_data\2-4 MongoDB 支持动态 SQL、分页方案\spring-boot-mongodb-page\src\main\java\com\neo\param\AccountPageParam.java
1
请完成以下Java代码
public class MIssue extends X_AD_Issue { public MIssue(Properties ctx, int AD_Issue_ID, String trxName) { super(ctx, AD_Issue_ID, trxName); if (is_new()) { setProcessed(false); // N setSystemStatus(SYSTEMSTATUS_Evaluation); try { init(ctx); } catch (Exception e) { System.err.println...
@Override public void setIssueSummary(String IssueSummary) { final int maxLength = getPOInfo().getFieldLength(COLUMNNAME_IssueSummary); super.setIssueSummary(truncateExceptionsRelatedString(IssueSummary, maxLength)); } @Override public void setStackTrace(String StackTrace) { final int maxLength = getPOInfo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MIssue.java
1
请在Spring Boot框架中完成以下Java代码
public void setApplicationContext(ApplicationContext applicationContext) { this.applicationContext = applicationContext; } @Bean public ViewResolver htmlViewResolver() { ThymeleafViewResolver resolver = new ThymeleafViewResolver(); resolver.setTemplateEngine(templateEngine(htmlTempl...
SessionLocaleResolver localeResolver = new SessionLocaleResolver(); localeResolver.setDefaultLocale(new Locale("en")); return localeResolver; } @Bean public LocaleChangeInterceptor localeChangeInterceptor() { LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeIntercep...
repos\tutorials-master\spring-web-modules\spring-thymeleaf-5\src\main\java\com\baeldung\thymeleaf\config\WebMVCConfig.java
2
请完成以下Java代码
public class EscalationEventDefinitionFinder implements TreeVisitor<PvmScope> { protected EscalationEventDefinition escalationEventDefinition; protected final String escalationCode; protected final PvmActivity throwEscalationActivity; public EscalationEventDefinitionFinder(String escalationCode, PvmActivity ...
protected boolean isMatchingEscalationCode(EscalationEventDefinition escalationEventDefinition) { String escalationCode = escalationEventDefinition.getEscalationCode(); return escalationCode == null || escalationCode.equals(this.escalationCode); } protected boolean isReThrowingEscalationEventSubprocess(Esc...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\helper\EscalationEventDefinitionFinder.java
1
请完成以下Java代码
public Criteria andProductAttrNotIn(List<String> values) { addCriterion("product_attr not in", values, "productAttr"); return (Criteria) this; } public Criteria andProductAttrBetween(String value1, String value2) { addCriterion("product_attr between", value1, value2,...
this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.list...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsCartItemExample.java
1
请完成以下Java代码
public void on(ProductCountIncrementedEvent event) { this.count++; } @EventSourcingHandler public void on(ProductCountDecrementedEvent event) { this.count--; } @EventSourcingHandler public void on(OrderConfirmedEvent event) { this.orderConfirmed = true; } @Over...
if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OrderLine orderLine = (OrderLine) o; return Objects.equals(productId, orderLine.productId) && Objects.equals(count, orderLine.count); } @Override pu...
repos\tutorials-master\patterns-modules\axon\src\main\java\com\baeldung\axon\commandmodel\order\OrderLine.java
1
请在Spring Boot框架中完成以下Java代码
public void setIncludeStacktrace(IncludeAttribute includeStacktrace) { this.includeStacktrace = includeStacktrace; } public IncludeAttribute getIncludeMessage() { return this.includeMessage; } public void setIncludeMessage(IncludeAttribute includeMessage) { this.includeMessage = includeMessage; } public ...
* Add error attribute when the appropriate request parameter is not "false". */ ON_PARAM } public static class Whitelabel { /** * Whether to enable the default error page displayed in browsers in case of a * server error. */ private boolean enabled = true; public boolean isEnabled() { retur...
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\web\ErrorProperties.java
2
请完成以下Java代码
private void closeResources(Connection connection, ResultSet resultSet, PreparedStatement preparedStatement) { try { resultSet.close(); preparedStatement.close(); connection.close(); logger.info("Resources closed"); } catch (SQLException e) { t...
preparedStatement.setFetchSize(5000); ResultSet resultSet = preparedStatement.executeQuery(); return JdbcStream.stream(resultSet) .map(r -> { try { return createCityRecord(resultSet); } catch (SQLException e) { throw new RuntimeE...
repos\tutorials-master\persistence-modules\core-java-persistence-3\src\main\java\com\baeldung\resultset\streams\JDBCStreamAPIRepository.java
1
请完成以下Java代码
public int getDHL_ShipmentOrderRequest_ID() { return get_ValueAsInt(COLUMNNAME_DHL_ShipmentOrderRequest_ID); } @Override public void setDurationMillis (final int DurationMillis) { set_Value (COLUMNNAME_DurationMillis, DurationMillis); } @Override public int getDurationMillis() { return get_ValueAsInt...
{ set_Value (COLUMNNAME_RequestMessage, RequestMessage); } @Override public java.lang.String getRequestMessage() { return get_ValueAsString(COLUMNNAME_RequestMessage); } @Override public void setResponseMessage (final @Nullable java.lang.String ResponseMessage) { set_Value (COLUMNNAME_ResponseMessage, ...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java-gen\de\metas\shipper\gateway\dhl\model\X_Dhl_ShipmentOrder_Log.java
1
请完成以下Java代码
public static void sendMessageToAll(String message) { for (VxeSocket socketItem : socketPool.values()) { socketItem.sendMessage(message); } } /** * websocket 开启连接 */ @OnOpen public void onOpen(Session session, @PathParam("userId") String userId, @PathParam("pageId"...
try { json = JSON.parseObject(message); } catch (Exception e) { log.warn("【vxeSocket】收到不合法的消息:" + message); return; } String type = json.getString(VxeSocketConst.TYPE); switch (type) { // 心跳检测 case VxeSocketConst.TYPE_HB: ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-module\jeecg-module-demo\src\main\java\org\jeecg\modules\demo\mock\vxe\websocket\VxeSocket.java
1
请完成以下Java代码
private void sendUserNotifications( final I_C_Queue_WorkPackage notifiableWP, final SeenPrintPackages seenPrintPackages, final I_C_Async_Batch asyncBatch) { if (seenPrintPackages.isEmpty()) { return; } final INotificationBL notificationBL = Services.get(INotificationBL.class); final IArchiveBL a...
// set printing queue to processed printingQueueItem.setProcessed(true); InterfaceWrapperHelper.save(printingQueueItem); } } @lombok.ToString private static class SeenPrintPackages { private final Map<Integer, Integer> countersByPrintPackageId = new HashMap<>(); public boolean isEmpty() { return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\async\spi\impl\PDFPrintingAsyncBatchListener.java
1
请在Spring Boot框架中完成以下Java代码
public at.erpel.schemas._1p0.documents.extensions.edifact.ShipperExtensionType getShipperExtension() { return shipperExtension; } /** * Sets the value of the shipperExtension property. * * @param value * allowed object is * {@link at.erpel.schemas._1p0.documents.extens...
return erpelShipperExtension; } /** * Sets the value of the erpelShipperExtension property. * * @param value * allowed object is * {@link CustomType } * */ public void setErpelShipperExtension(CustomType value) { this.erpelShipperExtension = value; ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ext\ShipperExtensionType.java
2
请完成以下Java代码
public VariableSerializers removeSerializer(TypedValueSerializer<?> serializer) { serializerList.remove(serializer); serializerMap.remove(serializer.getName()); return this; } public VariableSerializers join(VariableSerializers other) { DefaultVariableSerializers copy = new DefaultVariableSerialize...
} // add all "other" serializers that did not exist before to the end of the list for (TypedValueSerializer<?> otherSerializer : other.getSerializers()) { if (!copy.serializerMap.containsKey(otherSerializer.getName())) { copy.addSerializer(otherSerializer); } } return copy; } ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\variable\serializer\DefaultVariableSerializers.java
1
请在Spring Boot框架中完成以下Java代码
private ExecuteShellUtil getExecuteShellUtil(String ip) { ServerDeployDto serverDeployDTO = serverDeployService.findByIp(ip); if (serverDeployDTO == null) { sendMsg("IP对应服务器信息不存在:" + ip, MsgType.ERROR); throw new BadRequestException("IP对应服务器信息不存在:" + ip); } return new ExecuteShellUtil(ip, serverDeployDTO....
sendMsg(sb.toString(), MsgType.INFO); } else { sb.append("<br>启动失败!"); sendMsg(sb.toString(), MsgType.ERROR); } } @Override public void download(List<DeployDto> queryAll, HttpServletResponse response) throws IOException { List<Map<String, Object>> list = new ArrayList<>(); for (DeployDto deployDto : q...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\maint\service\impl\DeployServiceImpl.java
2
请完成以下Java代码
public class MustacheView extends AbstractTemplateView { private @Nullable Compiler compiler; private @Nullable String charset; /** * Set the Mustache compiler to be used by this view. * <p> * Typically this property is not set directly. Instead a single {@link Compiler} is * expected in the Spring applic...
private @Nullable Resource getResource() { ApplicationContext applicationContext = getApplicationContext(); String url = getUrl(); if (applicationContext == null || url == null) { return null; } Resource resource = applicationContext.getResource(url); return (resource.exists()) ? resource : null; } pr...
repos\spring-boot-4.0.1\module\spring-boot-mustache\src\main\java\org\springframework\boot\mustache\servlet\view\MustacheView.java
1
请完成以下Java代码
public void setLastname (java.lang.String Lastname) { set_Value (COLUMNNAME_Lastname, Lastname); } /** Get Nachname. @return Nachname */ @Override public java.lang.String getLastname () { return (java.lang.String)get_Value(COLUMNNAME_Lastname); } /** Set Login. @param Login Used for login. See H...
public void setProcessed (boolean Processed) { set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed)); } /** Get Verarbeitet. @return Checkbox sagt aus, ob der Beleg verarbeitet wurde. */ @Override public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_User.java
1
请完成以下Java代码
public abstract class AbstractDataSourcePoolMetadata<T extends DataSource> implements DataSourcePoolMetadata { private final T dataSource; /** * Create an instance with the data source to use. * @param dataSource the data source */ protected AbstractDataSourcePoolMetadata(T dataSource) { this.dataSource = ...
return null; } if (maxSize < 0) { return -1f; } if (currentSize == 0) { return 0f; } return (float) currentSize / (float) maxSize; } protected final T getDataSource() { return this.dataSource; } }
repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\metadata\AbstractDataSourcePoolMetadata.java
1
请在Spring Boot框架中完成以下Java代码
public class BookRepository { private List<Book> items; @PostConstruct public void init() { Faker faker = new Faker(Locale.ENGLISH); final com.github.javafaker.Book book = faker.book(); this.items = IntStream.range(1, faker.random() .nextInt(10, 20)) .mapToO...
} public Optional<Book> getById(int id) { return this.items.stream() .filter(item -> id == item.getId()) .findFirst(); } public void save(int id, Book book) { IntStream.range(0, items.size()) .filter(i -> items.get(i) .getId() == id) ...
repos\tutorials-master\spring-web-modules\spring-5-mvc\src\main\java\com\baeldung\idc\BookRepository.java
2
请完成以下Java代码
private Optional<InvoiceId> retrieveInvoice(final IdentifierString invoiceIdentifier, final OrgId orgId, final DocBaseAndSubType docType) { final InvoiceQuery invoiceQuery = createInvoiceQuery(invoiceIdentifier, orgId, docType); return invoiceDAO.retrieveIdByInvoiceQuery(invoiceQuery); } private InvoiceQuery cr...
break; case EXTERNAL_ID: invoiceQueryBuilder.externalId(identifierString.asExternalId()); break; case DOC: invoiceQueryBuilder.documentNo(identifierString.asDoc()); break; default: throw new AdempiereException("Invalid identifierString: " + identifierString); } return invoiceQueryBuilde...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\invoice\impl\JsonInvoiceService.java
1
请在Spring Boot框架中完成以下Java代码
public Optional<TimeBooking> getByIdOptional(@NonNull final TimeBookingId timeBookingId) { return queryBL .createQueryBuilder(I_S_TimeBooking.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_S_TimeBooking.COLUMNNAME_S_TimeBooking_ID, timeBookingId.getRepoId()) .create() .firstOnlyOptional(...
.map(this::buildTimeBooking) .collect(ImmutableList.toImmutableList()); } private TimeBooking buildTimeBooking(@NonNull final I_S_TimeBooking record) { return TimeBooking.builder() .timeBookingId(TimeBookingId.ofRepoId(record.getS_TimeBooking_ID())) .issueId(IssueId.ofRepoId(record.getS_Issue_ID())) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\timebooking\TimeBookingRepository.java
2
请在Spring Boot框架中完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } @ApiModelProperty(example = "5") public String getProcessInstanceId() { return processInstanceId; } public void setProcessInstanceId(String processInstanceId) { this.process...
public void setTaskUrl(String taskUrl) { this.taskUrl = taskUrl; } @ApiModelProperty(example = "2013-04-17T10:17:43.902+0000") public Date getTime() { return time; } public void setTime(Date time) { this.time = time; } @ApiModelProperty(example = "variableUpdate") ...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricDetailResponse.java
2
请完成以下Java代码
public static ExecutionEntity getCompensatingExecution(EventSubscriptionEntity eventSubscription) { String configuration = eventSubscription.getConfiguration(); if (configuration != null) { return Context.getCommandContext().getExecutionManager().findExecutionById(configuration); } else { re...
ActivityImpl flowScope = (ActivityImpl) activityToCompensate.getFlowScope(); return flowScope.getActivityId(); } else { ActivityImpl compensationHandler = activityToCompensate.findCompensationHandler(); if (compensationHandler != null) { return compensationHandler.getActivityId(); }...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\helper\CompensationUtil.java
1
请完成以下Java代码
public Builder setDescription(final ITranslatableString description) { this.description = description; return this; } public Builder notFoundMessages(@Nullable NotFoundMessages notFoundMessages) { this.notFoundMessages = notFoundMessages; return this; } public Builder addSection(@NonNull final...
} public Builder addSections(@NonNull final Collection<DocumentLayoutSectionDescriptor.Builder> sectionBuildersToAdd) { sectionBuilders.addAll(sectionBuildersToAdd); return this; } public boolean isEmpty() { return sectionBuilders.isEmpty(); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentLayoutSingleRow.java
1
请完成以下Java代码
public PickingJobOptions getPickingJobOptions(@Nullable final BPartnerId customerId) {return configService.getPickingJobOptions(customerId);} @NonNull public List<HuId> getClosedLUs( @NonNull final PickingJob pickingJob, @Nullable final PickingJobLineId lineId) { final Set<HuId> pickedHuIds = pickingJob.get...
.filter(huId -> !HuId.equals(huId, currentlyOpenedLUId)) .collect(ImmutableList.toImmutableList()); } public PickingSlotSuggestions getPickingSlotsSuggestions(@NonNull final PickingJob pickingJob) { return pickingJobService.getPickingSlotsSuggestions(pickingJob); } public PickingJob pickAll(@NonNull final ...
repos\metasfresh-new_dawn_uat\backend\de.metas.picking.rest-api\src\main\java\de\metas\picking\workflow\PickingJobRestService.java
1
请在Spring Boot框架中完成以下Java代码
public class DefaultDocumentDescriptorFactory implements DocumentDescriptorFactory { @NonNull private final DataEntrySubTabBindingDescriptorBuilder dataEntrySubTabBindingDescriptorBuilder; @NonNull private final LayoutFactoryProvider layoutFactoryProvider; private final CCache<WindowId, DocumentDescriptor> document...
} private DefaultDocumentDescriptorLoader newLoader(@NonNull final WindowId windowId) { return DefaultDocumentDescriptorLoader.builder() .layoutFactoryProvider(layoutFactoryProvider) .dataEntrySubTabBindingDescriptorBuilder(dataEntrySubTabBindingDescriptorBuilder) .adWindowId(windowId.toAdWindowId()) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\factory\standard\DefaultDocumentDescriptorFactory.java
2
请完成以下Java代码
public class SetAnnotationForIncidentCmd implements Command<Void> { protected String incidentId; protected String annotation; public SetAnnotationForIncidentCmd(String incidentId, String annotation) { this.incidentId = incidentId; this.annotation = annotation; } @Override public Void execute(Comm...
return null; } protected void triggerHistoryEvent(CommandContext commandContext, IncidentEntity incident) { HistoryLevel historyLevel = commandContext.getProcessEngineConfiguration().getHistoryLevel(); if (historyLevel.isHistoryEventProduced(HistoryEventTypes.INCIDENT_UPDATE, incident)) { HistoryEven...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SetAnnotationForIncidentCmd.java
1
请完成以下Java代码
public String getProductChanges(@PathVariable int productId) { Product product = storeService.findProductById(productId); QueryBuilder jqlQuery = QueryBuilder.byInstance(product); Changes changes = javers.findChanges(jqlQuery.build()); return javers.getJsonConverter().toJson(changes); ...
public String getStoreShadows(@PathVariable int storeId) { Store store = storeService.findStoreById(storeId); JqlQuery jqlQuery = QueryBuilder.byInstance(store) .withChildValueObjects().build(); List<Shadow<Store>> shadows = javers.findShadows(jqlQuery); return javers.get...
repos\tutorials-master\spring-boot-modules\spring-boot-data-2\src\main\java\com\baeldung\javers\web\StoreController.java
1
请完成以下Java代码
private void createLogMgtPage_CacheReset(final table table) { if (!isAllowCacheReset()) { return; } tr line = new tr(); line.addElement(new th().addElement(CacheMgt.get().toStringX())); line.addElement(new td().addElement(new a(NAME + "?CacheReset=Yes", "Reset Cache"))); table.addElement(line); } ...
{ final long sizeMb = sizeKb / 1024; return sizeMb + "M"; } } } /************************************************************************** * Init * * @param config config * @throws javax.servlet.ServletException */ @Override public void init(ServletConfig config) throws ServletException { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\serverRoot\de.metas.adempiere.adempiere.serverRoot.base\src\main\java-legacy\org\adempiere\serverRoot\servlet\ServerMonitor.java
1
请完成以下Java代码
public String getRequestedSessionId() { if (this.requestedSessionId == null) { getRequestedSession(); } return this.requestedSessionId; } @Override public RequestDispatcher getRequestDispatcher(String path) { RequestDispatcher requestDispatcher = super.getRequestDispatcher(path); return new Se...
SessionRepositoryFilter.this.sessionRepository.deleteById(getId()); } } /** * Ensures session is committed before issuing an include. * * @since 1.3.4 */ private final class SessionCommittingRequestDispatcher implements RequestDispatcher { private final RequestDispatcher delegate; Session...
repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\http\SessionRepositoryFilter.java
1
请在Spring Boot框架中完成以下Java代码
public BatchPartEntity createBatchPart(BatchEntity parentBatch, String status, String scopeId, String subScopeId, String scopeType) { BatchPartEntity batchPartEntity = dataManager.create(); batchPartEntity.setBatchId(parentBatch.getId()); batchPartEntity.setType(parentBatch.getBatchType()); ...
batchPartEntity.setResultDocumentJson(resultJson, serviceConfiguration.getEngineName()); return batchPartEntity; } @Override public void deleteBatchPartEntityAndResources(BatchPartEntity batchPartEntity) { ByteArrayRef resultDocRefId = batchPartEntity.getResultDocRefId(); ...
repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\persistence\entity\BatchPartEntityManagerImpl.java
2
请完成以下Java代码
public class MustacheTemplateRenderer implements TemplateRenderer { private final Compiler mustache; private final Function<String, String> keyGenerator; private final Cache templateCache; /** * Create a new instance with the resource prefix and the {@link Cache} to use. * @param resourcePrefix the resource...
} private Template getTemplate(String name) { try { if (this.templateCache != null) { try { return this.templateCache.get(this.keyGenerator.apply(name), () -> loadTemplate(name)); } catch (ValueRetrievalException ex) { throw ex.getCause(); } } return loadTemplate(name); } catc...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\io\template\MustacheTemplateRenderer.java
1
请在Spring Boot框架中完成以下Java代码
public Boolean getIncludeTaskLocalVariables() { return includeTaskLocalVariables; } public void setIncludeTaskLocalVariables(Boolean includeTaskLocalVariables) { this.includeTaskLocalVariables = includeTaskLocalVariables; } public Boolean getIncludeProcessVariables() { return i...
public String getPlanItemInstanceId() { return planItemInstanceId; } public void setPlanItemInstanceId(String planItemInstanceId) { this.planItemInstanceId = planItemInstanceId; } public String getRootScopeId() { return rootScopeId; } public void setRootScopeId(String ...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\task\HistoricTaskInstanceQueryRequest.java
2
请完成以下Java代码
public void onSuccess() { } @Override public void onFailure(RuleEngineException e) { } }; void onSuccess(); void onFailure(RuleEngineException e); default void onRateLimit(RuleEngineException e) { onFailure(e); };
/** * Returns 'true' if rule engine is expecting the message to be processed, 'false' otherwise. * message may no longer be valid, if the message pack is already expired/canceled/failed. * * @return 'true' if rule engine is expecting the message to be processed, 'false' otherwise. */ defaul...
repos\thingsboard-master\common\message\src\main\java\org\thingsboard\server\common\msg\queue\TbMsgCallback.java
1
请完成以下Java代码
protected ObjectNode getMsgDataAsObjectNode(TbMsg msg) { var msgDataNode = JacksonUtil.toJsonNode(msg.getData()); if (msgDataNode == null || !msgDataNode.isObject()) { throw new IllegalArgumentException("Message body is not an object!"); } return (ObjectNode) msgDataNode; ...
protected TbPair<Boolean, JsonNode> upgradeRuleNodesWithOldPropertyToUseFetchTo( JsonNode oldConfiguration, String oldProperty, String ifTrue, String ifFalse ) throws TbNodeException { var newConfig = (ObjectNode) oldConfiguration; if (!newConfig.has(o...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\metadata\TbAbstractNodeWithFetchTo.java
1
请完成以下Java代码
public DocumentQueryOrderByList getDefaultOrderBys() { return DocumentQueryOrderByList.EMPTY; } @Override public SqlViewRowsWhereClause getSqlWhereClause(final DocumentIdsSelection rowIds, final SqlOptions sqlOpts) { // TODO Auto-generated method stub return null; } @Override public <T> List<T> retrieve...
final boolean watchedByFrontend) { // TODO Auto-generated method stub } @Override public List<RelatedProcessDescriptor> getAdditionalRelatedProcessDescriptors() { return additionalRelatedProcessDescriptors; } /** * @return the {@code M_ShipmentSchedule_ID} of the packageable line that is currently selec...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\PickingSlotView.java
1
请完成以下Java代码
public SetJobRetriesByProcessAsyncBuilder historicProcessInstanceQuery(HistoricProcessInstanceQuery query) { this.historicProcessInstanceQuery = query; return this; } @Override public SetJobRetriesByProcessAsyncBuilder dueDate(Date dueDate) { this.dueDate = dueDate; isDueDateSet = true; retur...
historicProcessInstanceQuery, retries, dueDate, isDueDateSet)); } protected void validateParameters() { ensureNotNull("commandExecutor", commandExecutor); ensureNotNull("retries", retries); boolean isProcessInstanceIdsNull = processInstanceIds == null || processInstanceIds.isEmpty(); boolean isPro...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\management\SetJobRetriesByProcessAsyncBuilderImpl.java
1
请完成以下Java代码
public String getTaskId() { return taskId; } public void setTaskId(String taskId) { this.taskId = taskId; } public Date getTimestamp() { return timestamp; } public void setTimestamp(Date timestamp) { this.timestamp = timestamp; } public String getTenantId() { return tenantId; }...
.getCommandContext() .getDbEntityManager() .delete(this); } @Override public String toString() { return this.getClass().getSimpleName() + "[activityInstanceId=" + activityInstanceId + ", taskId=" + taskId + ", timestamp=" + timestamp + ", eventType=" + ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricDetailEventEntity.java
1
请完成以下Spring Boot application配置
############### JSP #################### spring.mvc.view.suffix=/WEB-INF/jsp/ spring.mvc.view.prefix=.jsp logging.level.org.springframework=INFO ################### Data Configuration ######################### spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306...
ng.datasource.password=posilka2020 ############################Hibernate Configuration ################ spring.jpa.hibernate.ddl-auto=update spring.jpa.show-sql=true
repos\SpringBoot-Projects-FullStack-master\Part-5 Spring Boot Web Application\SpringMVC+DB\src\main\resources\application.properties
2
请完成以下Java代码
public void afterLoad(final IHUContext huContext, final List<IAllocationResult> loadResults) { for (final IHUTrxListener listener : listeners) { listener.afterLoad(huContext, loadResults); } } @Override public void onUnloadLoadTransaction(final IHUContext huContext, final IHUTransactionCandidate unloadTrx...
@Override public void onSplitTransaction(final IHUContext huContext, final IHUTransactionCandidate unloadTrx, final IHUTransactionCandidate loadTrx) { for (final IHUTrxListener listener : listeners) { listener.onSplitTransaction(huContext, unloadTrx, loadTrx); } } @Override public String toString() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\CompositeHUTrxListener.java
1
请完成以下Java代码
protected CaseExecutionImpl createCaseExecution(CmmnActivity activity) { CaseExecutionImpl child = newCaseExecution(); // set activity to execute child.setActivity(activity); // handle child/parent-relation child.setParent(this); getCaseExecutionsInternal().add(child); // set case instanc...
} } protected String getToStringIdentity() { return Integer.toString(System.identityHashCode(this)); } public String getId() { return String.valueOf(System.identityHashCode(this)); } public ProcessEngineServices getProcessEngineServices() { throw LOG.unsupportedTransientOperationException(Pro...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\execution\CaseExecutionImpl.java
1
请完成以下Java代码
public void setWhereClause (java.lang.String WhereClause) { set_Value (COLUMNNAME_WhereClause, WhereClause); } /** Get Sql WHERE. @return Fully qualified SQL WHERE clause */ @Override public java.lang.String getWhereClause () { return (java.lang.String)get_Value(COLUMNNAME_WhereClause); } /** * No...
/** Warning = Warning */ public static final String NOTIFICATIONSEVERITY_Warning = "Warning"; /** Error = Error */ public static final String NOTIFICATIONSEVERITY_Error = "Error"; @Override public void setNotificationSeverity (final java.lang.String NotificationSeverity) { set_Value (COLUMNNAME_NotificationSeve...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Note.java
1
请完成以下Java代码
public static boolean equals(VariableContainer variableContainer, String variableName, Object comparedValue) { Object variableValue = getVariableValue(variableContainer, variableName); if (comparedValue != null && variableValue != null) { // Numbers are not necessarily ...
return ((Number) variableValue).shortValue() == ((Number) comparedValue).shortValue(); } // Other subtypes possible (e.g. BigDecimal, AtomicInteger, etc.), will fall back to default comparison } } return defaultEqual...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\el\function\VariableEqualsExpressionFunction.java
1
请完成以下Java代码
public int getS_Resource_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_S_Resource_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Setup Time. @param SetupTime Setup time before starting Production */ @Override public void setSetupTime (int SetupTime) { set_Value (COLUMNNA...
{ set_Value (COLUMNNAME_WorkingTime, Integer.valueOf(WorkingTime)); } /** Get Working Time. @return Workflow Simulation Execution Time */ @Override public int getWorkingTime () { Integer ii = (Integer)get_Value(COLUMNNAME_WorkingTime); if (ii == null) return 0; return ii.intValue(); } /** Set...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Order_Workflow.java
1
请完成以下Java代码
public boolean isFailedJobsToInclude() { return includeFailedJobs; } public boolean isIncidentsToInclude() { return includeIncidents || includeIncidentsForType != null; } protected void checkQueryOk() { super.checkQueryOk(); if (includeIncidents && includeIncidentsForType != null) { thro...
this.jobPermissionChecks = jobPermissionChecks; } public void addJobPermissionCheck(List<PermissionCheck> permissionChecks) { jobPermissionChecks.addAll(permissionChecks); } public List<PermissionCheck> getIncidentPermissionChecks() { return incidentPermissionChecks; } public void setIncidentPerm...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\DeploymentStatisticsQueryImpl.java
1
请完成以下Java代码
protected void prepare() { for (final ProcessInfoParameter para : getParametersAsArray()) { if (para.getParameter() == null) { continue; } else if (PARAM_SeqNo.equals(para.getParameterName())) { p_SeqNo_From = para.getParameterAsInt(); p_SeqNo_To = para.getParameter_ToAsInt(); } el...
} if (p_SeqNo_To <= 0) { p_SeqNo_To = IPrintingDAO.SEQNO_Last; } final UserId adUserToPrintId = UserId.ofRepoIdOrNull(getAD_User_ID()); // create those instructions just for us and don't let some other printing client running with the same user-id snatch it from us. final boolean createWithSpecificHost...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\process\C_Print_Job_Instructions_Create.java
1
请在Spring Boot框架中完成以下Java代码
public class PersistenceProductAutoConfiguration { @Autowired private Environment env; public PersistenceProductAutoConfiguration() { super(); } // @Bean public LocalContainerEntityManagerFactoryBean productEntityManager() { final LocalContainerEntityManagerFactoryBean em ...
return em; } @Bean @ConfigurationProperties(prefix="spring.second-datasource") public DataSource productDataSource() { return DataSourceBuilder.create().build(); } @Bean public PlatformTransactionManager productTransactionManager() { final JpaTransactionManager transact...
repos\tutorials-master\persistence-modules\spring-data-jpa-enterprise\src\main\java\com\baeldung\multipledb\PersistenceProductAutoConfiguration.java
2
请完成以下Java代码
public class FilterContextEditorAction extends AbstractContextMenuAction { public FilterContextEditorAction() { super(); } @Override public String getName() { return "Filter"; } @Override public String getIcon() { return null; // no icon } @Override public boolean isAvailable() { return isGridM...
} final String m_columnName = getColumnName(); final Object m_value = getFieldValue(); final VEditor editor = getEditor(); final String columnDisplayName = gridField.getHeader(); final Object valueDisplay = editor == null ? m_value : editor.getDisplay(); final MQuery queryInitial = new MQuery(gridTab.ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\org\compiere\grid\ed\FilterContextEditorAction.java
1
请在Spring Boot框架中完成以下Java代码
public class CustomMongoConfiguration { @Bean public MongoCustomConversions customConversions() { return new MongoCustomConversions(Collections.singletonList(DocumentToMoneyConverter.INSTANCE)); } @ReadingConverter enum DocumentToMoneyConverter implements Converter<Document, Money> { ...
return Money.of(getCurrency(money), getAmount(money)); } private CurrencyUnit getCurrency(Document money) { Document currency = money.get("currency", Document.class); String currencyCode = currency.getString("code"); return CurrencyUnit.of(currencyCode); } ...
repos\tutorials-master\patterns-modules\ddd\src\main\java\com\baeldung\ddd\order\config\CustomMongoConfiguration.java
2
请完成以下Java代码
public static UserEntityManager getUserEntityManager() { return getUserEntityManager(getCommandContext()); } public static UserEntityManager getUserEntityManager(CommandContext commandContext) { return getIdmEngineConfiguration(commandContext).getUserEntityManager(); } public s...
return getIdmEngineConfiguration(commandContext).getPrivilegeMappingEntityManager(); } public static TokenEntityManager getTokenEntityManager() { return getTokenEntityManager(getCommandContext()); } public static TokenEntityManager getTokenEntityManager(CommandContext commandContext) {...
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\util\CommandContextUtil.java
1
请完成以下Java代码
private void selectFocus(final ICalloutField calloutField) { final I_C_Order order = calloutField.getModel(I_C_Order.class); final Integer bPartnerId = order.getC_BPartner_ID(); final GridTab mTab = getGridTab(calloutField); if (mTab == null) { return; } if (bPartnerId <= 0 && mTab.getField(COLUMNNA...
@Deprecated public static void clearFields(final ICalloutRecord calloutRecord, final boolean save) { final GridTab gridTab = GridTab.fromCalloutRecordOrNull(calloutRecord); if (gridTab == null) { return; } handlers.clearFields(gridTab); if (save) { gridTab.dataSave(true); } } @Deprecated pr...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\callout\OrderFastInput.java
1
请完成以下Java代码
public BooleanWithReason checkAllowDeleteFromDB() { return isNew() ? BooleanWithReason.TRUE : BooleanWithReason.falseBecause("Payments with status " + this + " cannot be deleted from DB"); } public BooleanWithReason checkAllowDelete(final POSPaymentMethod paymentMethod) { if (checkAllowDeleteFromDB().isTrue())...
else if (isCanceled() || isFailed()) { return BooleanWithReason.TRUE; } else { return BooleanWithReason.falseBecause("Payments with status " + this + " cannot be deleted"); } } public boolean isAllowRefund() { return isSuccessful(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSPaymentProcessingStatus.java
1
请完成以下Java代码
public int getShelfLifeMinPct() { return get_ValueAsInt(COLUMNNAME_ShelfLifeMinPct); } @Override public void setUPC (final @Nullable java.lang.String UPC) { set_Value (COLUMNNAME_UPC, UPC); } @Override public java.lang.String getUPC() { return get_ValueAsString(COLUMNNAME_UPC); } @Override public...
@Override public boolean isUsedForVendor() { return get_ValueAsBoolean(COLUMNNAME_UsedForVendor); } @Override public void setVendorCategory (final @Nullable java.lang.String VendorCategory) { set_Value (COLUMNNAME_VendorCategory, VendorCategory); } @Override public java.lang.String getVendorCategory() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Product.java
1
请完成以下Java代码
public void setReplicationType (final java.lang.String ReplicationType) { set_Value (COLUMNNAME_ReplicationType, ReplicationType); } @Override public java.lang.String getReplicationType() { return get_ValueAsString(COLUMNNAME_ReplicationType); } @Override public void setTableName (final java.lang.String ...
{ return get_ValueAsString(COLUMNNAME_TooltipType); } @Override public void setWEBUI_View_PageLength (final int WEBUI_View_PageLength) { set_Value (COLUMNNAME_WEBUI_View_PageLength, WEBUI_View_PageLength); } @Override public int getWEBUI_View_PageLength() { return get_ValueAsInt(COLUMNNAME_WEBUI_View_P...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Table.java
1
请在Spring Boot框架中完成以下Java代码
public class AdminSettingsDataValidator extends DataValidator<AdminSettings> { private final AdminSettingsService adminSettingsService; @Override protected void validateCreate(TenantId tenantId, AdminSettings adminSettings) { AdminSettings existingSettings = adminSettingsService.findAdminSettingsB...
if (!existentAdminSettings.getKey().equals(adminSettings.getKey())) { throw new DataValidationException("Changing key of admin settings entry is prohibited!"); } } return existentAdminSettings; } @Override protected void validateDataImpl(TenantId tenantId, AdminS...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\service\validator\AdminSettingsDataValidator.java
2
请完成以下Java代码
public void add(String key) { TermFrequency termFrequency = trie.get(key); if (termFrequency == null) { termFrequency = new TermFrequency(key); trie.put(key, termFrequency); } else { termFrequency.increase(); } } @O...
for (Map.Entry<String, TermFrequency> entry : trie.entrySet()) { keyList.add(entry.getKey()); } return IOUtil.saveCollectionToTxt(keyList, path); } /** * 按照频率从高到低排序的条目 * @return */ public TreeSet<TermFrequency> values() { TreeSet<TermFrequency>...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\TFDictionary.java
1
请完成以下Java代码
public String getOrgType() { return orgType; } public void setOrgType(String orgType) { this.orgType = orgType; } public String getOrgCode() { return orgCode; } public void setOrgCode(String orgCode) { this.orgCode = orgCode; } public String getMobile(...
return address; } public void setAddress(String address) { this.address = address; } public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } }
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\system\vo\SysDepartModel.java
1
请完成以下Java代码
public int getErrorCode() { return errorCode; } public String getSqlState() { return sqlState; } protected boolean equals(int errorCode, String sqlState) { return this.getErrorCode() == errorCode && this.getSqlState().equals(sqlState); } } public static boolean checkDeadloc...
* exception is always a {@link ProcessEngineException} with a generic message. Like this, SQL * details are never disclosed to potential attackers. * * @param supplier which calls MyBatis API * @param <T> is the type of the return value * @return the value returned by the supplier * @throws ProcessEng...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\ExceptionUtil.java
1
请完成以下Java代码
public String toString() { return "LPAD[size=" + size + ", padStr=" + padStr + "]"; } private final String buildSql(final String column) { return "LPAD(TRIM(" + column + "), " + size + ", " + DB.TO_STRING(padStr) + ")"; } @Override public @NonNull String getColumnSql(@NonNull String columnName) { return...
else { valueSql = "?"; params.add(value); } return buildSql(valueSql); } @Nullable @Override public Object convertValue(@Nullable final String columnName, @Nullable final Object value, final @Nullable Object model) { if (value == null) { return null; } final String str = (String)value; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\LpadQueryFilterModifier.java
1
请完成以下Java代码
public boolean supports(Class<?> clazz) { return true; } @Override public int vote(Authentication authentication, Object object, Collection<ConfigAttribute> attributes) { int result = ACCESS_ABSTAIN; for (ConfigAttribute attribute : attributes) { if (this.supports(attribute)) { result = ACCESS_DENIED; ...
|| isFullyAuthenticated(authentication)) { return ACCESS_GRANTED; } } if (IS_AUTHENTICATED_ANONYMOUSLY.equals(attribute.getAttribute())) { if (this.authenticationTrustResolver.isAnonymous(authentication) || isFullyAuthenticated(authentication) || this.authenticationTrustResolver.is...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\vote\AuthenticatedVoter.java
1
请在Spring Boot框架中完成以下Java代码
public static ResourcePlanningPrecision ofCodeOrMinute(@Nullable final String code) { final String codeNorm = StringUtils.trimBlankToNull(code); if (codeNorm == null || codeNorm.equals(MINUTE.getCode())) { return MINUTE; } else if (codeNorm.equals(MINUTE_15.getCode())) { return MINUTE_15; } else ...
@NonNull public ImmutableSet<Integer> getMinutes() { switch (this) { case MINUTE_15: return ImmutableSet.of(0, 15, 30, 45); case MINUTE: return IntStream.rangeClosed(0, 59) .boxed() .collect(ImmutableSet.toImmutableSet()); default: throw new AdempiereException("Unknown " + Resourc...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\productioncandidate\service\ResourcePlanningPrecision.java
2
请完成以下Spring Boot application配置
spring: thymeleaf: mode: HTML5 encoding: UTF-8 cache: false datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/spring-security?useUni
code=true&characterEncoding=utf-8&useSSL=false username: root password: root
repos\SpringBootLearning-master (1)\springboot-security\src\main\resources\application.yml
2
请完成以下Java代码
public class NativeDeploymentQueryImpl extends AbstractNativeQuery<NativeDeploymentQuery, Deployment> implements NativeDeploymentQuery { private static final long serialVersionUID = 1L; public NativeDeploymentQueryImpl(CommandContext commandContext) { super(commandContext); } public N...
public List<Deployment> executeList( CommandContext commandContext, Map<String, Object> parameterMap, int firstResult, int maxResults ) { return commandContext .getDeploymentEntityManager() .findDeploymentsByNativeQuery(parameterMap, firstResult, maxRe...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\NativeDeploymentQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public Map<String, MetadataReportConfig> getMetadataReports() { return metadataReports; } public void setMetadataReports(Map<String, MetadataReportConfig> metadataReports) { this.metadataReports = metadataReports; } static class Config { /** * Indicates multiple prope...
static class Scan { /** * The basePackages to scan , the multiple-value is delimited by comma * * @see EnableDubbo#scanBasePackages() */ private Set<String> basePackages = new LinkedHashSet<>(); public Set<String> getBasePackages() { return baseP...
repos\dubbo-spring-boot-project-master\dubbo-spring-boot-compatible\autoconfigure\src\main\java\org\apache\dubbo\spring\boot\autoconfigure\DubboConfigurationProperties.java
2
请完成以下Java代码
public abstract class AbstractScriptsApplierTemplate implements Runnable { private Logger _logger = LoggerFactory.getLogger(getClass()); protected abstract IScriptFactory createScriptFactory(); protected abstract IScriptScanner createScriptScanner(final IScriptScannerFactory scriptScannerFactory); protected abst...
scriptsApplier.setListener(createScriptsApplierListener()); // // Execute ScriptException error = null; try { scriptsApplier.apply(scriptsProvider); } catch (final ScriptException e) { error = e; // let it fail throw e; } finally { logger.info("Evaluated " + scriptsApplier.getCoun...
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\impl\AbstractScriptsApplierTemplate.java
1
请完成以下Java代码
private final class StrictFirewallHttpHeaders extends HttpHeaders { private StrictFirewallHttpHeaders(HttpHeaders delegate) { super(delegate); } @Override public @Nullable String getFirst(String headerName) { validateAllowedHeaderName(headerName); String headerValue = super.getFirst(hea...
public Builder path(String path) { return new StrictFirewallBuilder(this.delegate.path(path)); } @Override public Builder contextPath(String contextPath) { return new StrictFirewallBuilder(this.delegate.contextPath(contextPath)); } @Override public Builder header(String headerName, S...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\firewall\StrictServerWebExchangeFirewall.java
1
请完成以下Java代码
protected DeploymentBuilder loadApplicationUpgradeContext(DeploymentBuilder deploymentBuilder) { if (applicationUpgradeContextService != null) { loadProjectManifest(deploymentBuilder); loadEnforcedAppVersion(deploymentBuilder); } return deploymentBuilder; } priva...
} } } private void loadEnforcedAppVersion(DeploymentBuilder deploymentBuilder) { if (applicationUpgradeContextService.hasEnforcedAppVersion()) { deploymentBuilder.setEnforcedAppVersion(applicationUpgradeContextService.getEnforcedAppVersion()); LOGGER.warn( ...
repos\Activiti-develop\activiti-core\activiti-spring\src\main\java\org\activiti\spring\autodeployment\AbstractAutoDeploymentStrategy.java
1
请完成以下Java代码
public void setComments(List<Comment> comments) { this.comments = comments; } public void setAuthor(User author) { this.author = author; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != ...
Post post = (Post) o; return Objects.equals(id, post.id); } @Override public int hashCode() { return id != null ? id.hashCode() : 0; } public String toString() { return "Post(id=" + this.getId() + ", content=" + this.getContent() + ", comments=" + this.getComments() + ", a...
repos\tutorials-master\persistence-modules\spring-boot-persistence-4\src\main\java\com\baeldung\listvsset\eager\list\fulldomain\Post.java
1
请完成以下Java代码
public PageData<Domain> findByTenantId(TenantId tenantId, PageLink pageLink) { return DaoUtil.toPageData(domainRepository.findByTenantId(tenantId.getId(), pageLink.getTextSearch(), DaoUtil.toPageable(pageLink))); } @Override public int countDomainByTenantIdAndOauth2Enabled(TenantId tenantId, boolea...
@Override public void removeOauth2Client(DomainOauth2Client domainOauth2Client) { domainOauth2ClientRepository.deleteById(new DomainOauth2ClientCompositeKey(domainOauth2Client.getDomainId().getId(), domainOauth2Client.getOAuth2ClientId().getId())); } @Override public void delete...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\domain\JpaDomainDao.java
1
请完成以下Java代码
public String getCamundaFormKey() { return camundaFormKeyAttribute.getValue(this); } public void setCamundaFormKey(String camundaFormKey) { camundaFormKeyAttribute.setValue(this, camundaFormKey); } public String getCamundaPriority() { return camundaPriorityAttribute.getValue(this); } public v...
.namespace(CAMUNDA_NS) .build(); camundaFormKeyAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_FORM_KEY) .namespace(CAMUNDA_NS) .build(); camundaPriorityAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_PRIORITY) .namespace(CAMUNDA_NS) .build(); SequenceBui...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\HumanTaskImpl.java
1
请完成以下Java代码
public EndpointServlet withInitParameters(Map<String, String> initParameters) { Assert.notNull(initParameters, "'initParameters' must not be null"); boolean hasEmptyName = initParameters.keySet().stream().anyMatch((name) -> !StringUtils.hasText(name)); Assert.isTrue(!hasEmptyName, "'initParameters' must not conta...
return new EndpointServlet(this.servlet, this.initParameters, loadOnStartup); } Servlet getServlet() { return this.servlet; } Map<String, String> getInitParameters() { return this.initParameters; } int getLoadOnStartup() { return this.loadOnStartup; } }
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\web\EndpointServlet.java
1
请完成以下Java代码
public class DemoExceptionHandler { private static final String DEFAULT_ERROR_VIEW = "error"; /** * 统一 json 异常处理 * * @param exception JsonException * @return 统一返回 json 格式 */ @ExceptionHandler(value = JsonException.class) @ResponseBody public ApiResponse jsonErrorHandler(Jso...
/** * 统一 页面 异常处理 * * @param exception PageException * @return 统一跳转到异常页面 */ @ExceptionHandler(value = PageException.class) public ModelAndView pageErrorHandler(PageException exception) { log.error("【DemoPageException】:{}", exception.getMessage()); ModelAndView view = new ...
repos\spring-boot-demo-master\demo-exception-handler\src\main\java\com\xkcoding\exception\handler\handler\DemoExceptionHandler.java
1
请完成以下Java代码
public void example5_methodReferences() { // Original way without lambdas and method references List<String> names = Arrays.asList("ross", "joey", "chandler"); List<String> upperCaseNames = new ArrayList<>(); for(String name : names) { upperCaseNames.add(name.toUpperCase()); ...
return new Random().nextBoolean(); } private Connection getConnection() { return null; } private static interface Animal { } private static class Dog implements Animal { } private static class Cat implements Animal { } private static class Parrot implements Animal ...
repos\tutorials-master\core-java-modules\core-java-lang-operators-2\src\main\java\com\baeldung\colonexamples\ColonExamples.java
1