instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public static class EntityManagerFilter implements ContainerRequestFilter, ContainerResponseFilter { private static final Logger log = LoggerFactory.getLogger(EntityManagerFilter.class); public static final String EM_REQUEST_ATTRIBUTE = EntityManagerFilter.class.getName() + "_ENTITY_MANAGER"; ...
if (!"GET".equalsIgnoreCase(requestContext.getMethod())) { EntityTransaction t = em.getTransaction(); if (t.isActive()) { if (!t.getRollbackOnly()) { t.commit(); } } } em.close(); ...
repos\tutorials-master\apache-olingo\src\main\java\com\baeldung\examples\olingo2\JerseyConfig.java
1
请在Spring Boot框架中完成以下Java代码
OtelTracer micrometerOtelTracer(Tracer tracer, EventPublisher eventPublisher, OtelCurrentTraceContext otelCurrentTraceContext) { List<String> remoteFields = this.tracingProperties.getBaggage().getRemoteFields(); List<String> tagFields = this.tracingProperties.getBaggage().getTagFields(); return new OtelTracer(...
return new Slf4JEventListener(); } @Bean @ConditionalOnMissingBean(SpanCustomizer.class) OtelSpanCustomizer otelSpanCustomizer() { return new OtelSpanCustomizer(); } static class OTelEventPublisher implements EventPublisher { private final List<EventListener> listeners; OTelEventPublisher(List<EventList...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing-opentelemetry\src\main\java\org\springframework\boot\micrometer\tracing\opentelemetry\autoconfigure\OpenTelemetryTracingAutoConfiguration.java
2
请完成以下Java代码
public PickingSlotRow getRootRowWhichIncludes(@NonNull final PickingSlotRowId rowId) { final PickingSlotRow rootRow = getRowsIndex().getRootRow(rowId); if (rootRow == null) { throw new AdempiereException("No root row found which includes " + rowId); } return rootRow; } public PickingSlotRowId getRootRo...
public PickingSlotRow getRow(final PickingSlotRowId rowId) { return rowsById.get(rowId); } @Nullable public PickingSlotRow getRootRow(final PickingSlotRowId rowId) { final PickingSlotRowId rootRowId = getRootRowId(rowId); if (rootRowId == null) { return null; } return getRow(rootRowId);...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\PickingSlotRowsCollection.java
1
请完成以下Java代码
public String getJobDefinitionId() { return jobDefinitionId; } public void setJobDefinitionId(String jobDefinitionId) { this.jobDefinitionId = jobDefinitionId; } public String getJobDefinitionType() { return jobDefinitionType; } public void setJobDefinitionType(String jobDefinitionType) { ...
} public String getHostname() { return hostname; } public void setHostname(String hostname) { this.hostname = hostname; } public boolean isCreationLog() { return state == JobState.CREATED.getStateCode(); } public boolean isFailureLog() { return state == JobState.FAILED.getStateCode(); ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricJobLogEvent.java
1
请完成以下Java代码
public Map<String, String> evaluate(String task) { return loop(task, new HashMap<>(), ""); } private Map<String, String> loop(String task, Map<String, String> latestSuggestions, String evaluation) { latestSuggestions = generate(task, latestSuggestions, evaluation); Map<String, String> e...
Map<String, String> response = responseSpec.entity(mapClass); System.out.println("PR REVIEW OUTCOME: " + response); return response; } private Map<String, String> evaluate(Map<String, String> latestSuggestions, String task) { String request = EVALUATE_PROPOSED_IMPROVEMENTS_PROMPT + ...
repos\tutorials-master\spring-ai-modules\spring-ai-agentic-patterns\src\main\java\com\baeldung\springai\agenticpatterns\workflows\evaluator\EvaluatorOptimizerWorkflow.java
1
请完成以下Java代码
public static HistoricCaseInstanceMigrationDocument convertFromJson(String jsonCaseInstanceMigrationDocument) { try { JsonNode rootNode = objectMapper.readTree(jsonCaseInstanceMigrationDocument); HistoricCaseInstanceMigrationDocumentBuilderImpl documentBuilder = new HistoricCaseInstance...
if (jsonNode.has(propertyName) && !jsonNode.get(propertyName).isNull()) { return jsonNode.get(propertyName).asString(); } return null; } protected static Integer getJsonPropertyAsInteger(String propertyName, JsonNode jsonNode) { if (jsonNode.has(propertyName) &&...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\migration\HistoricCaseInstanceMigrationDocumentConverter.java
1
请完成以下Java代码
public void setParent_HU_Trx_Line_ID (final int Parent_HU_Trx_Line_ID) { if (Parent_HU_Trx_Line_ID < 1) set_ValueNoCheck (COLUMNNAME_Parent_HU_Trx_Line_ID, null); else set_ValueNoCheck (COLUMNNAME_Parent_HU_Trx_Line_ID, Parent_HU_Trx_Line_ID); } @Override public int getParent_HU_Trx_Line_ID() { ret...
set_ValueFromPO(COLUMNNAME_ReversalLine_ID, de.metas.handlingunits.model.I_M_HU_Trx_Line.class, ReversalLine); } @Override public void setReversalLine_ID (final int ReversalLine_ID) { if (ReversalLine_ID < 1) set_Value (COLUMNNAME_ReversalLine_ID, null); else set_Value (COLUMNNAME_ReversalLine_ID, Reve...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Trx_Line.java
1
请完成以下Java代码
protected boolean isApproveForInvoicing() { return true; } /** * Implementation detail: during `checkPreconditionsApplicable` `getProcessInfo` throws exception because it is not configured for the Process, so we ignore it. */ @Override protected IQuery<I_C_Invoice_Candidate> retrieveQuery(final boolean incl...
if (!selectedRowIds.isAll()) { final Set<Integer> invoiceCandidateIds = selectedRowIds.toIntSet(); if (invoiceCandidateIds.isEmpty()) { // shall not happen throw new AdempiereException("@NoSelection@"); } queryBuilder.addInArrayFilter(I_C_Invoice_Candidate.COLUMN_C_Invoice_Candidate_ID, invoic...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\invoicecandidate\process\C_Invoice_Candidate_ApproveForInvoicing.java
1
请完成以下Java代码
public void notifyRecordsChangedAsync(@NonNull final TableRecordReferenceSet recordRefs) { if (recordRefs.isEmpty()) { logger.trace("No changed records provided. Skip notifying views."); return; } async.execute(() -> notifyRecordsChangedNow(recordRefs)); } @Override public void notifyRecordsChangedN...
final MutableInt notifiedCount = MutableInt.zero(); for (final IView view : views) { try { final boolean watchedByFrontend = isWatchedByFrontend(view.getViewId()); view.notifyRecordsChanged(recordRefs, watchedByFrontend); notifiedCount.incrementAndGet(); } catch (final Exception ex) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewsRepository.java
1
请完成以下Java代码
public class ViewChanges { private final ViewId viewId; private boolean fullyChanged; private boolean headerPropertiesChanged; private Set<DocumentId> changedRowIds = null; public ViewChanges(@NonNull final ViewId viewId) { this.viewId = viewId; } public void collectFrom(final ViewChanges changes) { if ...
} if (rowIds == null || rowIds.isEmpty()) { return; } else if (rowIds.isAll()) { fullyChanged = true; changedRowIds = null; } else { if (changedRowIds == null) { changedRowIds = new HashSet<>(); } changedRowIds.addAll(rowIds.toSet()); } } public void addChangedRowIds(fina...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\event\ViewChanges.java
1
请完成以下Java代码
public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public Date getTargetDate() { return targetDate; } public void setTargetDate(Date targetDate) { this.targetDate = targetDate; } public boolean isDone() { ...
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } Todo other = (Todo) obj; if (id != other.id) { ...
repos\SpringBootForBeginners-master\02.Spring-Boot-Web-Application\src\main\java\com\in28minutes\springboot\web\model\Todo.java
1
请完成以下Java代码
public String getBusinessKey() { return businessKey; } public String getCaseInstanceId() { return caseInstanceId; } public Map<String, Object> getVariables() { return modificationBuilder.getProcessVariables(); } public String getTenantId() { return tenantId; } public String getProces...
public void setRestartedProcessInstanceId(String restartedProcessInstanceId){ this.restartedProcessInstanceId = restartedProcessInstanceId; } public String getRestartedProcessInstanceId(){ return restartedProcessInstanceId; } public static ProcessInstantiationBuilder createProcessInstanceById(Comman...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessInstantiationBuilderImpl.java
1
请在Spring Boot框架中完成以下Java代码
public int getFailedAttempts() { return failedAttempts; } public void setFailedAttempts(int failedAttempts) { this.failedAttempts = failedAttempts; } public String getPassword() { return password; } public void setPassword(String password) { this.password = pas...
} public int getConnectionPoolSize() { return connectionPoolSize; } public void setConnectionPoolSize(int connectionPoolSize) { this.connectionPoolSize = connectionPoolSize; } public int getDatabase() { return database; } public void setDatabase(int database) { ...
repos\kkFileView-master\server\src\main\java\cn\keking\config\RedissonConfig.java
2
请完成以下Java代码
public final void setJwtDecoderFactory(JwtDecoderFactory<ClientRegistration> jwtDecoderFactory) { Assert.notNull(jwtDecoderFactory, "jwtDecoderFactory cannot be null"); this.jwtDecoderFactory = jwtDecoderFactory; } /** * Sets the {@link GrantedAuthoritiesMapper} used for mapping * {@link OidcUser#getAuthorit...
private Jwt getJwt(OAuth2AccessTokenResponse accessTokenResponse, JwtDecoder jwtDecoder) { try { Map<String, Object> parameters = accessTokenResponse.getAdditionalParameters(); return jwtDecoder.decode((String) parameters.get(OidcParameterNames.ID_TOKEN)); } catch (JwtException ex) { OAuth2Error invalidI...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\oidc\authentication\OidcAuthorizationCodeAuthenticationProvider.java
1
请完成以下Java代码
public void login() { Credential credential = new UsernamePasswordCredential(username, new Password(password)); AuthenticationStatus status = securityContext.authenticate( getHttpRequestFromFacesContext(), getHttpResponseFromFacesContext(), withParams().cr...
.getResponse(); } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = passwo...
repos\tutorials-master\security-modules\java-ee-8-security-api\app-auth-custom-form-store-custom\src\main\java\com\baeldung\javaee\security\LoginBean.java
1
请完成以下Java代码
public class X_M_Product_Relationship extends org.compiere.model.PO implements I_M_Product_Relationship, org.compiere.model.I_Persistent { private static final long serialVersionUID = -1246567907L; /** Standard Constructor */ public X_M_Product_Relationship (final Properties ctx, final int M_Product_Relatio...
set_ValueNoCheck (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() { return get_ValueAsInt(COLUMNNAME_M_Product_ID); } @Override public void setM_Product_Relationship_ID (final int M_Product_Relationship_ID) { if (M_Product_Relationship_ID < 1) set_ValueNoCheck (COLUMN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Relationship.java
1
请在Spring Boot框架中完成以下Java代码
public class Comment { @Id @GeneratedValue private Long id; private String country; private String description; @JdbcTypeCode(SqlTypes.VECTOR) @Array(length = 5) private float[] embedding; public Comment() {} public Comment(String country, String description, float[] embedding) { this.country = country; ...
public String getCountry() { return country; } public String getDescription() { return description; } public float[] getEmbedding() { return embedding; } @Override public String toString() { return "%s (%s)".formatted(getDescription(), getCountry()); } }
repos\spring-data-examples-main\jpa\vector-search\src\main\java\example\springdata\vector\Comment.java
2
请完成以下Java代码
public boolean isImmutable(@NonNull final Class<?> clazz) { // Primitive types are always immutable if (clazz.isPrimitive()) { return true; } // Assume IDs are immutable if (RepoIdAware.class.isAssignableFrom(clazz)) { return true; } for (final Class<?> immutableClass : immutableClasses) { ...
} } return false; } /** * Register a new immutable class. * * WARNING: to be used only if it's really needed because this is kind of dirty hack which could affect our caching system. * * @param immutableClass */ public void registerImmutableClass(@NonNull final Class<?> immutableClass) { immutab...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\interceptor\CacheImmutableClassesIndex.java
1
请在Spring Boot框架中完成以下Java代码
public ResponseEntity<Employee> getEmployeeById(@PathVariable(value = "id") Long employeeId) throws ResourceNotFoundException{ Employee employee = employeeRepository.findById(employeeId) .orElseThrow(()-> new ResourceNotFoundException("Employee not found for this id: " + employeeId)); retur...
final Employee updateEmployee = employeeRepository.save(employee); return ResponseEntity.ok(updateEmployee); } @DeleteMapping("/emp/{id}") public Map<String, Boolean> deleteEmployee(@PathVariable(value = "id") Long employeeId) throws ResourceNotFoundException { Employee employee = employeeR...
repos\SpringBoot-Projects-FullStack-master\Part-4 Spring Boot REST API\SpringRestDB\src\main\java\spring\restdb\controller\EmployeeController.java
2
请在Spring Boot框架中完成以下Java代码
private static void addSuperTypesForClass(ResolvableType resolvableType, Set<Class<?>> supertypesToAdd, Set<Class<?>> genericsToAdd) { ResolvableType superType = resolvableType.getSuperType(); if (!ResolvableType.NONE.equals(superType)) { addGenericsForClass(genericsToAdd, superType); supertypesToAdd.add(s...
} } } return classesToAdd; } private static boolean shouldRegisterClass(Class<?> clazz) { Set<String> conditionClasses = beansConditionalOnClasses.getOrDefault(clazz, Collections.emptySet()); for (String conditionClass : conditionClasses) { try { ConfigurableHintsRegistrationProcessor.class.getClas...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\ConfigurableHintsRegistrationProcessor.java
2
请完成以下Java代码
public boolean recomputeIsDocumentAcknowledged() { final boolean isDocumentAcknowledged_refreshedValue = lines.stream().allMatch(RemittanceAdviceLine::isReadyForCompletion); final boolean hasAcknowledgedStatusChanged = isDocumentAcknowledged != isDocumentAcknowledged_refreshedValue; this.isDocumentAcknowledged...
final boolean currenciesReadOnlyFlag_refreshedValue = lines.stream().anyMatch(RemittanceAdviceLine::isInvoiceResolved); final boolean currenciesReadOnlyFlagChanged = currenciesReadOnlyFlag != currenciesReadOnlyFlag_refreshedValue; this.currenciesReadOnlyFlag = currenciesReadOnlyFlag_refreshedValue; return curr...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\remittanceadvice\RemittanceAdvice.java
1
请在Spring Boot框架中完成以下Java代码
private SecretKey getSigningKey() { byte[] keyBytes = Decoders.BASE64.decode(jwtSecret); return Keys.hmacShaKeyFor(keyBytes); } public String getUserNameFromJwtToken(String token) { return Jwts.parser() .verifyWith(getSigningKey()) .build() .parseSign...
} catch (SignatureException e) { logger.error("Invalid JWT signature: {}", e.getMessage()); } catch (MalformedJwtException e) { logger.error("Invalid JWT token: {}", e.getMessage()); } catch (ExpiredJwtException e) { logger.error("JWT token is expired: {}", e.getMessa...
repos\tutorials-master\spring-security-modules\spring-security-core\src\main\java\com\baeldung\jwtsignkey\jwtconfig\JwtUtils.java
2
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getIsbn() { return isbn; } public void ...
} if (getClass() != obj.getClass()) { return false; } return id != null && id.equals(((Book) obj).id); } @Override public int hashCode() { return 2021; } @Override public String toString() { return "Book{" + "id=" + id + ", title=" + title ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootCloneEntity\src\main\java\com\bookstore\entity\Book.java
1
请完成以下Java代码
public class DateUtil { private static final SimpleDateFormat sdf = new SimpleDateFormat("dd-M月-y hh.mm.ss.S a", Locale.CHINA); private static final SimpleDateFormat sdf2 = new SimpleDateFormat("dd-M月 -y hh.mm.ss.S a", Locale.CHINA); public static synchronized Date parseDatetime(String dateStr) { t...
return new Timestamp(sdf2.parse(dateStr).getTime()); } catch (ParseException ee) { return new Timestamp(System.currentTimeMillis()); } } } public static synchronized String formatTimestamp(Timestamp date) { return sdf.format(date); } public stati...
repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\common\DateUtil.java
1
请在Spring Boot框架中完成以下Java代码
static class ThreadPoolTaskSchedulerBuilderConfiguration { @Bean @ConditionalOnMissingBean ThreadPoolTaskSchedulerBuilder threadPoolTaskSchedulerBuilder(TaskSchedulingProperties properties, ObjectProvider<TaskDecorator> taskDecorator, ObjectProvider<ThreadPoolTaskSchedulerCustomizer> threadPoolTaskSchedu...
this.taskSchedulerCustomizers = taskSchedulerCustomizers; } @Bean @ConditionalOnMissingBean @ConditionalOnThreading(Threading.PLATFORM) SimpleAsyncTaskSchedulerBuilder simpleAsyncTaskSchedulerBuilder() { return builder(); } @Bean(name = "simpleAsyncTaskSchedulerBuilder") @ConditionalOnMissingBean ...
repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\task\TaskSchedulingConfigurations.java
2
请完成以下Java代码
public class MaterialTrackingInvoiceCandidateListener implements IInvoiceCandidateListener { public static final MaterialTrackingInvoiceCandidateListener instance = new MaterialTrackingInvoiceCandidateListener(); private MaterialTrackingInvoiceCandidateListener() { } @Override public void onBeforeInvoiceLineCre...
return null; } final I_M_Material_Tracking materialTracking = InterfaceWrapperHelper.create(invoiceCandidates.get(0), de.metas.materialtracking.model.I_C_Invoice_Candidate.class).getM_Material_Tracking(); for (final I_C_Invoice_Candidate fromInvoiceCandidate : invoiceCandidates) { final de.metas.materialtra...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\ic\spi\impl\MaterialTrackingInvoiceCandidateListener.java
1
请完成以下Java代码
public HUAttributeQueryFilterVO assertAttributeValueType(@NonNull final String attributeValueType) { Check.assume( Objects.equals(this.attributeValueType, attributeValueType), "Invalid attributeValueType for {}. Expected: {}", this, attributeValueType); return this; } private ModelColumn<I_M_HU_Att...
final Set<Object> valuesAndSubstitutes = new HashSet<>(); // // 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)...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUAttributeQueryFilterVO.java
1
请完成以下Java代码
public Set<ConvertiblePair> getConvertibleTypes() { Set<ConvertiblePair> convertibleTypes = new LinkedHashSet<>(); convertibleTypes.add(new ConvertiblePair(Object.class, List.class)); convertibleTypes.add(new ConvertiblePair(Object.class, Collection.class)); return convertibleTypes; } @Override public boole...
if (source == null) { return null; } if (source instanceof Collection) { Collection<String> results = new ArrayList<>(); for (Object object : ((Collection<?>) source)) { if (object != null) { results.add(object.toString()); } } return results; } return Collections.singletonList(sourc...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\converter\ObjectToListStringConverter.java
1
请完成以下Java代码
protected void doClose() { if (isActive()) { AvailabilityChangeEvent.publish(this, ReadinessState.REFUSING_TRAFFIC); } super.doClose(); WebServer webServer = getWebServer(); if (webServer != null) { webServer.destroy(); } } /** * Returns the {@link WebServer} that was created by the context or {@...
public @Nullable WebServer getWebServer() { WebServerManager serverManager = this.serverManager; return (serverManager != null) ? serverManager.getWebServer() : null; } @Override public @Nullable String getServerNamespace() { return this.serverNamespace; } @Override public void setServerNamespace(@Nullabl...
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\reactive\context\ReactiveWebServerApplicationContext.java
1
请完成以下Java代码
public class LexicalAnalyzerPipe implements Pipe<List<IWord>, List<IWord>> { /** * 代理的词法分析器 */ protected LexicalAnalyzer analyzer; public LexicalAnalyzerPipe(LexicalAnalyzer analyzer) { this.analyzer = analyzer; } @Override public List<IWord> flow(List<IWord> input) {...
while (listIterator.hasNext()) { IWord wordOrSentence = listIterator.next(); if (wordOrSentence.getLabel() != null) continue; // 这是别的管道已经处理过的单词,跳过 listIterator.remove(); // 否则是句子 String sentence = wordOrSentence.getValue(); for (IWord w...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\tokenizer\pipe\LexicalAnalyzerPipe.java
1
请完成以下Java代码
public class PoiUtils { private PoiUtils() { } private static void newCell(Row row, String value) { short cellNum = row.getLastCellNum(); if (cellNum == -1) cellNum = 0; Cell cell = row.createCell(cellNum); cell.setCellValue(value); } public static Row...
public static CellStyle boldFontStyle(Workbook workbook) { Font boldFont = workbook.createFont(); boldFont.setBold(true); CellStyle boldStyle = workbook.createCellStyle(); boldStyle.setFont(boldFont); return boldStyle; } public static void write(Workbook workbook, Path...
repos\tutorials-master\apache-poi-3\src\main\java\com\baeldung\poi\rowstyle\PoiUtils.java
1
请完成以下Java代码
public int idOf(String string) { return dat.get(string); } @Override public int size() { return dat.size(); } @Override public Set<Map.Entry<String, Integer>> entrySet() { return dat.entrySet(); }
@Override public void save(DataOutputStream out) throws IOException { tagSet.save(out); dat.save(out); } @Override public boolean load(ByteArray byteArray) { loadTagSet(byteArray); return dat.load(byteArray); } }
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\perceptron\feature\ImmutableFeatureMDatMap.java
1
请完成以下Java代码
public void setCol_8 (BigDecimal Col_8) { set_Value (COLUMNNAME_Col_8, Col_8); } /** Get Col_8. @return Col_8 */ public BigDecimal getCol_8 () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Col_8); if (bd == null) return Env.ZERO; return bd; } /** Set Payroll List Line. @param HR_ListLin...
public BigDecimal getMaxValue () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MaxValue); if (bd == null) return Env.ZERO; return bd; } /** Set Min Value. @param MinValue Min Value */ public void setMinValue (BigDecimal MinValue) { set_Value (COLUMNNAME_MinValue, MinValue); } /** Get Min ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_ListLine.java
1
请完成以下Java代码
public SubProcessBuilder builder() { return new SubProcessBuilder((BpmnModelInstance) modelInstance, this); } public boolean triggeredByEvent() { return triggeredByEventAttribute.getValue(this); } public void setTriggeredByEvent(boolean triggeredByEvent) { triggeredByEventAttribute.setValue(this, ...
return artifactCollection.get(this); } /** camunda extensions */ /** * @deprecated use isCamundaAsyncBefore() instead. */ @Deprecated public boolean isCamundaAsync() { return camundaAsyncAttribute.getValue(this); } /** * @deprecated use setCamundaAsyncBefore(isCamundaAsyncBefore) instead. ...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\SubProcessImpl.java
1
请完成以下Java代码
class DiscoveredWebEndpoint extends AbstractDiscoveredEndpoint<WebOperation> implements ExposableWebEndpoint { private final String rootPath; private Collection<AdditionalPathsMapper> additionalPathsMappers; DiscoveredWebEndpoint(EndpointDiscoverer<?, ?> discoverer, Object endpointBean, EndpointId id, String root...
} @Override public List<String> getAdditionalPaths(WebServerNamespace webServerNamespace) { return this.additionalPathsMappers.stream() .flatMap((mapper) -> getAdditionalPaths(webServerNamespace, mapper)) .toList(); } private Stream<String> getAdditionalPaths(WebServerNamespace webServerNamespace, Additio...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\web\annotation\DiscoveredWebEndpoint.java
1
请完成以下Java代码
public class Person { private String name; private int age; Person(String name, int age) { super(); this.name = name; this.age = age; } public Person() { super(); } public String getName() { return name; } public void setName(String name) {
this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } @Override public String toString() { return "Person [name=" + name + ", age=" + age + "]"; } }
repos\tutorials-master\vavr-modules\vavr\src\main\java\com\baeldung\vavr\Person.java
1
请完成以下Java代码
public java.lang.String getapplicationID() { return get_ValueAsString(COLUMNNAME_applicationID); } @Override public void setApplicationToken (final @Nullable java.lang.String ApplicationToken) { set_Value (COLUMNNAME_ApplicationToken, ApplicationToken); } @Override public java.lang.String getApplicationT...
@Override public void setM_Shipper(final org.compiere.model.I_M_Shipper M_Shipper) { set_ValueFromPO(COLUMNNAME_M_Shipper_ID, org.compiere.model.I_M_Shipper.class, M_Shipper); } @Override public void setM_Shipper_ID (final int M_Shipper_ID) { if (M_Shipper_ID < 1) set_Value (COLUMNNAME_M_Shipper_ID, null...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java-gen\de\metas\shipper\gateway\dhl\model\X_DHL_Shipper_Config.java
1
请完成以下Java代码
public ExecutionDto getExecution() { RuntimeService runtimeService = engine.getRuntimeService(); Execution execution = runtimeService.createExecutionQuery().executionId(executionId).singleResult(); if (execution == null) { throw new InvalidRequestException(Status.NOT_FOUND, "Execution with id " + exe...
} @Override public EventSubscriptionResource getMessageEventSubscription(String messageName) { return new MessageEventSubscriptionResource(engine, executionId, messageName, objectMapper); } @Override public IncidentDto createIncident(CreateIncidentDto createIncidentDto) { Incident newIncident = null...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\runtime\impl\ExecutionResourceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class CounterController { private static final String HEADER_ONE = "<h1>%s</h1>"; private final CounterService counterService; public CounterController(CounterService counterService) { Assert.notNull(counterService, "CounterService is required"); this.counterService = counterService; } @GetMapping...
return String.format(HEADER_ONE, this.counterService.getCount(counterName)); } @GetMapping("counter/{name}/cached") public String getCachedCount(@PathVariable("name") String counterName) { return String.format(HEADER_ONE, this.counterService.getCachedCount(counterName)); } @GetMapping("counter/{name}/reset") ...
repos\spring-boot-data-geode-main\spring-geode-samples\caching\look-aside\src\main\java\example\app\caching\lookaside\controller\CounterController.java
2
请完成以下Java代码
public SpinDataFormatException multipleProvidersForDataformat(String dataFormatName) { return new SpinDataFormatException(exceptionMessage("008", "Multiple providers found for dataformat '{}'", dataFormatName)); } public void logDataFormats(Collection<DataFormat<?>> formats) { if (isInfoEnabled()) { ...
} @SuppressWarnings("rawtypes") public void logDataFormatConfigurator(DataFormatConfigurator configurator) { if (isInfoEnabled()) { logInfo("011", "Discovered Spin data format configurator: {}[dataformat = {}]", configurator.getClass(), configurator.getDataFormatClass().getName()); } } ...
repos\camunda-bpm-platform-master\spin\core\src\main\java\org\camunda\spin\impl\logging\SpinCoreLogger.java
1
请完成以下Java代码
public static <T> ExtendedMemorizingSupplier<T> of(final java.util.function.Supplier<T> supplier) { if (supplier instanceof ExtendedMemorizingSupplier) { return (ExtendedMemorizingSupplier<T>)supplier; } return new ExtendedMemorizingSupplier<>(supplier); } private final java.util.function.Supplier<T> del...
{ // https://github.com/metasfresh/metasfresh-webui-api/issues/787 - similar to the code of get(); // if the instance known to not be initialized // then don't attempt to acquire lock (and to other time consuming stuff..) if (initialized) { synchronized (this) { if (initialized) { final T v...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\lang\ExtendedMemorizingSupplier.java
1
请完成以下Java代码
private class SumTask implements Callable<Long> { private int[] numbers; private int from; private int to; public SumTask(int[] numbers, int from, int to) { this.numbers = numbers; this.from = from; this.to = to; } public Long call() ...
from = (i - 1) * chunk; to = i * chunk; } tasks.add(new SumTask(numbers, from, to)); } try { List<Future<Long>> futures = pool.invokeAll(tasks); long total = 0L; for (Future<Long> future : futures) { total += fu...
repos\SpringBootBucket-master\springboot-echarts\src\main\java\com\xncoding\benchmark\sum\calc\impl\MultithreadCalculator.java
1
请完成以下Java代码
public void setC_UOM_ID (final int C_UOM_ID) { if (C_UOM_ID < 1) set_Value (COLUMNNAME_C_UOM_ID, null); else set_Value (COLUMNNAME_C_UOM_ID, C_UOM_ID); } @Override public int getC_UOM_ID() { return get_ValueAsInt(COLUMNNAME_C_UOM_ID); } @Override public I_ExternalSystem_Config_Shopware6 getExte...
@Override public int getExternalSystem_Config_Shopware6_ID() { return get_ValueAsInt(COLUMNNAME_ExternalSystem_Config_Shopware6_ID); } @Override public void setExternalSystem_Config_Shopware6_UOM_ID (final int ExternalSystem_Config_Shopware6_UOM_ID) { if (ExternalSystem_Config_Shopware6_UOM_ID < 1) set_...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_Shopware6_UOM.java
1
请完成以下Java代码
public static boolean getBoolean(Map<String, String> requestParams, String name, boolean defaultValue) { boolean value = defaultValue; if (requestParams.get(name) != null) { value = Boolean.valueOf(requestParams.get(name)); } return value; } public static int getInte...
return parsedInteger; } public static Date parseToDate(String date) { Date parsedDate = null; try { parsedDate = shortDateFormat.parse(date); } catch (Exception e) { } return parsedDate; } public static List<String> parseToList(String value) { ...
repos\flowable-engine-main\modules\flowable-common-rest\src\main\java\org\flowable\common\rest\api\RequestUtil.java
1
请在Spring Boot框架中完成以下Java代码
public class SingleHUInventoryLineAggregator implements InventoryLineAggregator { @VisibleForTesting public static final SingleHUInventoryLineAggregator INSTANCE = new SingleHUInventoryLineAggregator(); private SingleHUInventoryLineAggregator() { } @Override public InventoryLineAggregationKey createAggregation...
return AggregationType.SINGLE_HU; } @Value private static class SingleHUInventoryLineInventoryLineAggregationKey implements InventoryLineAggregationKey { @Nullable HuId huId; @Nullable HUQRCode huQRCode; @NonNull ProductId productId; SingleHUInventoryLineInventoryLineAggregationKey( @Nullable final Hu...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\draftlinescreator\aggregator\SingleHUInventoryLineAggregator.java
2
请在Spring Boot框架中完成以下Java代码
public String getName() { return name; } /** * Sets the value of the name property. * * @param value * allowed object is * {@link String } * */ public void setName(String value) { this.name = value; } /** * Free text description...
*/ public String getMimeType() { return mimeType; } /** * Sets the value of the mimeType property. * * @param value * allowed object is * {@link String } * */ public void setMimeType(String value) { this.mimeType = 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\AttachmentType.java
2
请完成以下Java代码
public <RecordType> void appendFilter(@NonNull final IQueryBuilder<RecordType> queryBuilder, @NonNull final String columnName) { map(new CaseMappingFunction<T, Void>() { @Override public Void anyValue() { // do nothing return null; } @Override public Void valueIsNull() { queryBui...
public Void valueEqualsTo(@NonNull final T value) { queryBuilder.addEqualsFilter(columnName, value); return null; } @Override public Void valueEqualsToOrNull(@NonNull final T value) { //noinspection unchecked queryBuilder.addInArrayFilter(columnName, null, value); return null; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dao\ValueRestriction.java
1
请完成以下Java代码
public void updateQtyToOrderFromQtyToOrderTU(final I_PMM_PurchaseCandidate candidate) { final I_M_HU_PI_Item_Product huPIItemProduct = getM_HU_PI_Item_Product_Effective(candidate); if (huPIItemProduct != null) { final BigDecimal qtyToOrderTU = candidate.getQtyToOrder_TU(); final BigDecimal tuCapacity = huP...
if (hupipOverride != null) { // return M_HU_PI_Item_Product_Override if set return hupipOverride; } // return M_HU_PI_Item_Product return candidate.getM_HU_PI_Item_Product(); } @Override public int getM_HU_PI_Item_Product_Effective_ID(final I_PMM_PurchaseCandidate candidate) { final int hupipOver...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\impl\PMMPurchaseCandidateBL.java
1
请完成以下Java代码
public <T> T getDynAttribute(@NonNull final Object model, @NonNull final String attributeName) { return getHelperThatCanHandle(model) .getDynAttribute(model, attributeName); } @Override public Object setDynAttribute(final Object model, final String attributeName, final Object value) { return getHelperThat...
{ if (model == null) { return null; } else if (model instanceof Evaluatee) { final Evaluatee evaluatee = (Evaluatee)model; return evaluatee; } return getHelperThatCanHandle(model) .getEvaluatee(model); } @Override public boolean isCopy(@NonNull final Object model) { return getHelperTh...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\wrapper\CompositeInterfaceWrapperHelper.java
1
请完成以下Java代码
public int getM_AttributeSetInstance_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeSetInstance_ID); if (ii == null) return 0; return ii.intValue(); } public I_M_CostElement getM_CostElement() throws RuntimeException { return (I_M_CostElement)MTable.get(getCtx(), I_M_CostElement.Tabl...
@return Product, Service, Item */ public int getM_Product_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Quantity. @param Qty Quantity */ public void setQty (BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_LandedCostAllocation.java
1
请完成以下Java代码
public final class DocumentToInvalidate { private final TableRecordReference recordRef; @Getter private boolean invalidateDocument; private final HashMap<String, IncludedDocumentToInvalidate> includedDocumentsByTableName = new HashMap<>(); public DocumentToInvalidate(@NonNull final TableRecordReference rootRecor...
} public DocumentId getDocumentId() { return DocumentId.of(recordRef.getRecord_ID()); } public Collection<IncludedDocumentToInvalidate> getIncludedDocuments() { return includedDocumentsByTableName.values(); } DocumentToInvalidate combine(@NonNull final DocumentToInvalidate other) { Check.assumeEquals(t...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\invalidation\DocumentToInvalidate.java
1
请完成以下Java代码
public boolean isSOTrx(@NonNull final String docBaseType) { return X_C_DocType.DOCBASETYPE_SalesOrder.equals(docBaseType) || X_C_DocType.DOCBASETYPE_MaterialDelivery.equals(docBaseType) || docBaseType.startsWith("AR"); // Account Receivables (Invoice, Payment Receipt) } @Override public boolean isPrepay(...
public boolean isCallOrder(@NonNull final DocTypeId docTypeId) { final I_C_DocType dt = docTypesRepo.getById(docTypeId); return (X_C_DocType.DOCBASETYPE_SalesOrder.equals(dt.getDocBaseType()) || X_C_DocType.DOCBASETYPE_PurchaseOrder.equals(dt.getDocBaseType())) && X_C_DocType.DOCSUBTYPE_CallOrder.equals(dt.ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\impl\DocTypeBL.java
1
请完成以下Java代码
public void setDate(final Timestamp date) { dateFField.setValue(date); dateTField.setValue(date); refresh(); } /************************************************************************** * Refresh - Create Query and refresh grid */ private void refresh() { final Object organization = orgField.getValu...
*/ @Override public void zoom() { super.zoom(); // Zoom panel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); AWindow frame = new AWindow(); if (!frame.initWindow(adWindowId, query)) { panel.setCursor(Cursor.getDefaultCursor()); return; } AEnv.addToWindowManager(frame); AEnv.show...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\VTrxMaterial.java
1
请完成以下Java代码
public Quantity getMovementQtyInStockingUOM(final I_M_InventoryLine inventoryLine) { ProductId productId = ProductId.ofRepoId(inventoryLine.getM_Product_ID()); final Quantity movementQty = getMovementQty(inventoryLine); return Services.get(IUOMConversionBL.class).convertToProductUOM(movementQty, productId); } ...
final char counterIdentifier = (char)('A' + i); assignInventoryLinesToCounterIdentifiers(linesToLocators.get(locatorId), counterIdentifier); i++; } } private void assignInventoryLinesToCounterIdentifiers(final List<I_M_InventoryLine> list, final char counterIdentifier) { list.forEach(inventoryLine -> { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inventory\impl\InventoryBL.java
1
请在Spring Boot框架中完成以下Java代码
public void setSupplierGTINCU(String value) { this.supplierGTINCU = value; } /** * Gets the value of the invoicableQtyBasedOn property. * * @return * possible object is * {@link InvoicableQtyBasedOnEnum } * */ public InvoicableQtyBasedOnEnum getInvoi...
* Sets the value of the qtyEnteredInBPartnerUOM property. * * @param value * allowed object is * {@link BigDecimal } * */ public void setQtyEnteredInBPartnerUOM(BigDecimal value) { this.qtyEnteredInBPartnerUOM = value; } /** * Gets the value of the e...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDICctopInvoic500VType.java
2
请完成以下Java代码
public String getTenantId() { return tenantId; } @Override public void setTenantId(String tenantId) { this.tenantId = tenantId; } public String getLocalizedName() { return localizedName; } @Override public void setLocalizedName(String localizedName) { t...
return queryVariables; } public void setQueryVariables(List<HistoricVariableInstanceEntity> queryVariables) { this.queryVariables = queryVariables; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("HistoricPlanItemInstance with id: ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\HistoricPlanItemInstanceEntityImpl.java
1
请完成以下Java代码
default B credentials(@Nullable Object credentials) { throw new UnsupportedOperationException( String.format("%s does not store credentials", this.getClass().getSimpleName())); } /** * Use this details object. * <p> * Implementations may choose to use these {@code details} in combination with any ...
* @see Authentication#getPrincipal */ B principal(@Nullable Object principal); /** * Mark this authentication as authenticated or not * @param authenticated whether this is an authenticated {@link Authentication} * instance * @return the {@link Builder} for additional configuration * @see Authent...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\Authentication.java
1
请完成以下Java代码
private Set<String> getValidDocActionsForCurrentDocStatus() { if (isInvalid()) { return ImmutableSet.of(ACTION_Prepare, ACTION_Invalidate, ACTION_Unlock, ACTION_Void); } if (isDrafted()) { return ImmutableSet.of(ACTION_Prepare, ACTION_Invalidate, ACTION_Complete, ACTION_Unlock, ACTION_Void); } if...
{ return ImmutableSet.of(ACTION_Post, ACTION_UnClose); } if (isReversed() || isVoided()) { return ImmutableSet.of(ACTION_Post); } return ImmutableSet.of(); } /** * @return true if given docAction is valid for current docStatus. */ private boolean isValidDocAction(final String docAction) { f...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\document\engine\impl\DocumentEngine.java
1
请在Spring Boot框架中完成以下Java代码
public Date getDueDate() { return dueDate; } public void setDueDate(Date dueDate) { this.dueDate = dueDate; duedateSet = true; } public int getPriority() { return priority; } public void setPriority(int priority) { this.priority = priority; prio...
public boolean isDelegationStateSet() { return delegationStateSet; } public boolean isNameSet() { return nameSet; } public boolean isDescriptionSet() { return descriptionSet; } public boolean isDuedateSet() { return duedateSet; } public boolean isPrior...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\task\TaskRequest.java
2
请完成以下Java代码
public String getTaskCompleterVariableName() { return taskCompleterVariableName; } public void setTaskCompleterVariableName(String taskCompleterVariableName) { this.taskCompleterVariableName = taskCompleterVariableName; } public List<String> getCandidateUsers() { return candida...
public void setTaskListeners(List<FlowableListener> taskListeners) { this.taskListeners = taskListeners; } @Override public HumanTask clone() { HumanTask clone = new HumanTask(); clone.setValues(this); return clone; } public void setValues(HumanTask otherElement) { ...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\HumanTask.java
1
请完成以下Java代码
public String getIcon() { return icon; } public void setIcon(String icon) { this.icon = icon; } public Integer getSubjectCount() { return subjectCount; } public void setSubjectCount(Integer subjectCount) { this.subjectCount = subjectCount; } public Int...
public Integer getSort() { return sort; } public void setSort(Integer sort) { this.sort = sort; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = "...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsSubjectCategory.java
1
请在Spring Boot框架中完成以下Java代码
static class HikariDataSourceMeterBinder implements MeterBinder { private static final Log logger = LogFactory.getLog(HikariDataSourceMeterBinder.class); private final ObjectProvider<DataSource> dataSources; HikariDataSourceMeterBinder(ObjectProvider<DataSource> dataSources) { this.dataSources = dataSou...
}); } private void bindMetricsRegistryToHikariDataSource(HikariDataSource hikari, MeterRegistry registry) { if (hikari.getMetricRegistry() == null && hikari.getMetricsTrackerFactory() == null) { try { hikari.setMetricsTrackerFactory(new MicrometerMetricsTrackerFactory(registry)); } catch...
repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\autoconfigure\metrics\DataSourcePoolMetricsAutoConfiguration.java
2
请完成以下Java代码
public BatchDto setRemovalTimeAsync(SetRemovalTimeToHistoricDecisionInstancesDto dto) { HistoryService historyService = processEngine.getHistoryService(); HistoricDecisionInstanceQuery historicDecisionInstanceQuery = null; if (dto.getHistoricDecisionInstanceQuery() != null) { historicDecisionInstanc...
} if (dto.isClearedRemovalTime()) { builder.clearedRemovalTime(); } builder.byIds(dto.getHistoricDecisionInstanceIds()); builder.byQuery(historicDecisionInstanceQuery); if (dto.isHierarchical()) { builder.hierarchical(); } Batch batch = builder.executeAsync(); return Ba...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\history\HistoricDecisionInstanceRestServiceImpl.java
1
请完成以下Java代码
public class SingletonIterator<E> implements Iterator<E> { private final E element; private boolean consumed = false; public SingletonIterator(E element) { this.element = element; } @Override public boolean hasNext() { return !consumed; } @Override public E next() { if (consumed)
{ throw new NoSuchElementException(); } consumed = true; return element; } @Override public void remove() { throw new UnsupportedOperationException(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\SingletonIterator.java
1
请完成以下Java代码
public List<MigrationInstruction> asMigrationInstructions() { List<MigrationInstruction> instructions = new ArrayList<MigrationInstruction>(); for (ValidatingMigrationInstruction instruction : this.instructions) { instructions.add(instruction.toMigrationInstruction()); } return instructions; }...
return instructionsBySourceScope.containsKey(sourceScope); } protected boolean isValidInstruction(ValidatingMigrationInstruction instruction, ValidatingMigrationInstructions instructions, List<MigrationInstructionValidator> migrationInstructionValidators) { return !validateInstruction(instruction, instructions...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\validation\instruction\ValidatingMigrationInstructions.java
1
请完成以下Spring Boot application配置
security: basic: enabled: true spring: datasource: driver-class-name: com.mysql.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/security?useUnicode=yes&ch
aracterEncoding=UTF-8&useSSL=false username: root password: 123456
repos\SpringAll-master\37.Spring-Security-RememberMe\src\main\resources\application.yml
2
请完成以下Java代码
public static class Builder extends AbstractBuilder<Builder> { protected @Nullable Predicate<ServerWebExchange> predicate; @Override protected Builder getThis() { return this; } @Override public AsyncPredicate<ServerWebExchange> getPredicate() { return ServerWebExchangeUtils.toAsyncPredicate(this.p...
return this; } public Builder or(Predicate<ServerWebExchange> predicate) { Objects.requireNonNull(this.predicate, "can not call or() on null predicate"); this.predicate = this.predicate.or(predicate); return this; } public Builder negate() { Objects.requireNonNull(this.predicate, "can not call neg...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\route\Route.java
1
请在Spring Boot框架中完成以下Java代码
public static GrpcRequestScope grpcRequestScope() { return new GrpcRequestScope(); } @ConditionalOnMissingBean @Bean public GrpcServerProperties defaultGrpcServerProperties() { return new GrpcServerProperties(); } /** * Lazily creates a {@link SelfNameResolverFactory} bean...
@ConditionalOnMissingBean @Bean public GrpcServiceDiscoverer defaultGrpcServiceDiscoverer() { return new AnnotationGrpcServiceDiscoverer(); } @ConditionalOnBean(CompressorRegistry.class) @Bean public GrpcServerConfigurer compressionServerConfigurer(final CompressorRegistry registry) { ...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\autoconfigure\GrpcServerAutoConfiguration.java
2
请完成以下Java代码
public boolean isReadOnly() { return IsReadOnly; } public boolean isUpdateable() { return IsUpdateable; } public boolean isAlwaysUpdateable() { return IsAlwaysUpdateable; } public boolean isKey() { return IsKey; } public boolean isEncryptedField()
{ return IsEncryptedField; } public boolean isEncryptedColumn() { return IsEncryptedColumn; } public boolean isSelectionColumn() { return defaultFilterDescriptor != null; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\GridFieldVO.java
1
请完成以下Java代码
public static Builder builder() { return new Builder(); } public static class Builder { private TenantId tenantId; private EntityId entityId; private AttributeScope scope; private List<String> keys; private boolean notifyDevice; private List<CalculatedFi...
} public Builder tbMsgType(TbMsgType tbMsgType) { this.tbMsgType = tbMsgType; return this; } public Builder callback(FutureCallback<Void> callback) { this.callback = callback; return this; } public Builder future(SettableFuture<V...
repos\thingsboard-master\rule-engine\rule-engine-api\src\main\java\org\thingsboard\rule\engine\api\AttributesDeleteRequest.java
1
请完成以下Java代码
protected boolean beforeSave(final boolean newRecord) { final String elementType = getElementType(); // Natural Account if (ELEMENTTYPE_UserDefined.equals(elementType) && isNaturalAccount()) { setIsNaturalAccount(false); } // Tree validation int adTreeId = getAD_Tree_ID(); if (adTreeId <= 0) { ...
else { throw new AdempiereException("@TreeType@ <> @ElementType@ (U)"); } } else { if (!X_AD_Tree.TREETYPE_ElementValue.equals(treeType)) { throw new AdempiereException("@TreeType@ <> @ElementType@ (A)"); } } return true; } } // MElement
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MElement.java
1
请在Spring Boot框架中完成以下Java代码
public boolean logout(JWToken jwToken) { try { String jwTokenWithoutSignature = JWTUtils.removeSignature(jwToken.getToken()); Jwt jwt = Jwts.parserBuilder().build().parse(jwTokenWithoutSignature); DefaultClaims body = (DefaultClaims) jwt.getBody(); String subject ...
} catch (Exception e) { LOG.warn("JWT verification failed for {} not found !", userId.getId()); } } else { LOG.warn("key for user {} not found !", userId.getId()); } } else { LOG.warn("user data f...
repos\spring-examples-java-17\spring-security-jwt\src\main\java\itx\examples\springboot\security\springsecurity\jwt\services\UserAccessServiceImpl.java
2
请完成以下Java代码
default void setInitializers(List<? extends ServletContextInitializer> initializers) { getSettings().setInitializers(initializers); } /** * Add {@link ServletContextInitializer}s to those that should be applied in addition * to {@link ServletWebServerFactory#getWebServer(ServletContextInitializer...)} * para...
*/ default void setInitParameters(Map<String, String> initParameters) { getSettings().setInitParameters(initParameters); } /** * Sets {@link CookieSameSiteSupplier CookieSameSiteSuppliers} that should be used to * obtain the {@link SameSite} attribute of any added cookie. This method will replace * any prev...
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\servlet\ConfigurableServletWebServerFactory.java
1
请在Spring Boot框架中完成以下Java代码
public static class Config implements HasRouteId { private @Nullable String name; private @Nullable URI fallbackUri; private @Nullable String routeId; private Set<String> statusCodes = new HashSet<>(); private boolean resumeWithoutError = false; @Override public void setRouteId(String routeId) { ...
public Set<String> getStatusCodes() { return statusCodes; } public Config setStatusCodes(Set<String> statusCodes) { this.statusCodes = statusCodes; return this; } public Config addStatusCode(String statusCode) { this.statusCodes.add(statusCode); return this; } public boolean isResumeWithou...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\SpringCloudCircuitBreakerFilterFactory.java
2
请完成以下Java代码
public void setFileName (java.lang.String FileName) { set_Value (COLUMNNAME_FileName, FileName); } /** Get File Name. @return Name of the local file or URL */ @Override public java.lang.String getFileName () { return (java.lang.String)get_Value(COLUMNNAME_FileName); } /** Set Datensatz-ID. @param ...
/** Set Art. @param Type Art */ @Override public void setType (java.lang.String Type) { set_ValueNoCheck (COLUMNNAME_Type, Type); } /** Get Art. @return Art */ @Override public java.lang.String getType () { return (java.lang.String)get_Value(COLUMNNAME_Type); } /** Set URL. @param URL Ful...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_AttachmentEntry_ReferencedRecord_v.java
1
请完成以下Java代码
public void createPost(String author, String title, String contents) throws ExecutionException, InterruptedException { faunaClient.query( Create(Collection("posts"), Obj( "data", Obj( "title", Value(t...
) ) ).get(); } private Post parsePost(Value entry) { var author = entry.at("author"); var post = entry.at("post"); return new Post( post.at("ref").to(Value.RefV.class).get().getId(), post.at("data", "title").to(String.class).get()...
repos\tutorials-master\persistence-modules\fauna\src\main\java\com\baeldung\faunablog\posts\PostsService.java
1
请完成以下Java代码
public int getAD_Client_ID() { return m_AD_Client_ID; } @Override public String login(int AD_Org_ID, int AD_Role_ID, int AD_User_ID) { // nothing return null; } @Override public String modelChange(PO po, int type) throws Exception { final int idxProcessed = po.get_ColumnIndex("Processed"); if (typ...
} /** * Register table doc validators. Private because it is called automatically on {@link #initialize(ModelValidationEngine, MClient)}. */ private void register() { for (int tableId : instance.getAssignedTableIds()) { final String tableName = adTableDAO.retrieveTableName(tableId); if (documentBL.is...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.refid\src\main\java\de\metas\document\refid\modelvalidator\ReferenceNoGeneratorInstanceValidator.java
1
请完成以下Java代码
public final class TenantProfileEntity extends BaseSqlEntity<TenantProfile> { @Column(name = ModelConstants.TENANT_PROFILE_NAME_PROPERTY) private String name; @Column(name = ModelConstants.TENANT_PROFILE_DESCRIPTION_PROPERTY) private String description; @Column(name = ModelConstants.TENANT_PROFIL...
this.setUuid(tenantProfile.getId().getId()); } this.setCreatedTime(tenantProfile.getCreatedTime()); this.name = tenantProfile.getName(); this.description = tenantProfile.getDescription(); this.isDefault = tenantProfile.isDefault(); this.isolatedTbRuleEngine = tenantProfil...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\TenantProfileEntity.java
1
请完成以下Java代码
public void afterPropertiesSet() throws Exception { processApplicationNameFromAnnotation(applicationContext) .apply(springApplicationName) .ifPresent(this::setBeanName); if (camundaBpmProperties.getGenerateUniqueProcessApplicationName()) { setBeanName(CamundaBpmProperties.getUniqueName(Camund...
public void onPostDeploy(ProcessEngine processEngine) { eventPublisher.publishEvent(new PostDeployEvent(processEngine)); } @PreUndeploy public void onPreUndeploy(ProcessEngine processEngine) { eventPublisher.publishEvent(new PreUndeployEvent(processEngine)); } @ConditionalOnWebApplication @Configu...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\SpringBootProcessApplication.java
1
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this) .addValue(values) .toString(); } @Override public int hashCode() { return Objects.hash(values); } @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) ...
@Override public String get_ValueAsString(final String variableName) { return values.get(variableName); } @Override public boolean has_Variable(final String variableName) { return values.containsKey(variableName); } @Override public String get_ValueOldAsString(final String variableName) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\CachedStringExpression.java
1
请在Spring Boot框架中完成以下Java代码
public class PermissionService { private final IUserRolePermissionsDAO userRolePermissionsRepo = Services.get(IUserRolePermissionsDAO.class); private final UserRolePermissionsKey userRolePermissionsKey; @Getter private final OrgId defaultOrgId; private final HashSet<PermissionRequest> permissionsGranted = new Ha...
if (canAccessProcess) { permissionsGranted.add(permissionRequest); } return canAccessProcess; } private void assertPermission(@NonNull final PermissionRequest request) { if (permissionsGranted.contains(request)) { return; } final IUserRolePermissions userPermissions = userRolePermissionsRepo.g...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions2\PermissionService.java
2
请完成以下Java代码
public class Student { private int id; private String firstName; private String lastName; public Student(int id, String firstName, String lastName) { super(); this.id = id; this.firstName = firstName; this.lastName = lastName; } public int getId() { ret...
return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } }
repos\tutorials-master\web-modules\jakarta-servlets-2\src\main\java\com\baeldung\mvc\Student.java
1
请在Spring Boot框架中完成以下Java代码
public Object get(final String key) { Object result = null; ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue(); result = operations.get(key); return result; } /** * remove single key * @param key */ public void remove(final String k...
ListOperations<String, Object> list = redisTemplate.opsForList(); list.rightPush(k,v); } /** * list range * @param k * @param l * @param l1 * @return */ public List<Object> range(String k, long l, long l1){ ListOperations<String, Object> list = redisTemplate.o...
repos\spring-boot-leaning-master\1.x\第09课:如何玩转 Redis\spring-boot-redis\src\main\java\com\neo\service\RedisService.java
2
请完成以下Java代码
public void run() { try { logger.debug("execute - Going to invoke command.run() within delegate thread-pool"); command.run(); logger.debug("execute - Done invoking command.run() within delegate thread-pool"); } catch (final Throwable t) { logger.error("execute - Caught throwab...
}; try { delegate.execute(r); // don't expect RejectedExecutionException because delegate has a small queue that can hold runnables after semaphore-release and before they can actually start } catch (final RejectedExecutionException e) { semaphore.release(); logger.error("execute - Caught RejectedExe...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\concurrent\BlockingExecutorWrapper.java
1
请完成以下Java代码
void submit(String task) { tasksQueue.add(task); } Runnable batchHandling(Consumer<List<String>> executionLogic) { return () -> { while (!batchThread.isInterrupted()) { long startTime = System.currentTimeMillis(); while (tasksQueue.size() < executionT...
List<String> tasks = new ArrayList<>(executionThreshold); while (tasksQueue.size() > 0 && tasks.size() < executionThreshold) { tasks.add(tasksQueue.poll()); } working = true; executionLogic.accept(tasks); working = false...
repos\tutorials-master\patterns-modules\design-patterns-behavioral-2\src\main\java\com\baeldung\smartbatching\MicroBatcher.java
1
请在Spring Boot框架中完成以下Java代码
public class WorkplaceService { @NonNull private final IWarehouseBL warehouseBL = Services.get(IWarehouseBL.class); @NonNull private final WorkplaceRepository workplaceRepository; @NonNull private final WorkplaceUserAssignRepository workplaceUserAssignRepository; public Workplace create(@NonNull final WorkplaceCre...
{ workplaceUserAssignRepository.create(request); } public boolean isUserAssigned(@NonNull final UserId userId, @NonNull final WorkplaceId expectedWorkplaceId) { final WorkplaceId workplaceId = workplaceUserAssignRepository.getWorkplaceIdByUserId(userId).orElse(null); return WorkplaceId.equals(workplaceId, exp...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workplace\WorkplaceService.java
2
请完成以下Java代码
public void afterUnclose(final I_PP_Order ppOrder) { final IMaterialTrackingPPOrderDAO materialTrackingPPOrderDAO = Services.get(IMaterialTrackingPPOrderDAO.class); final IMaterialTrackingPPOrderBL materialTrackingPPOrderBL = Services.get(IMaterialTrackingPPOrderBL.class); materialTrackingPPOrderDAO.deleteInvoi...
new PPOrderReportWriter(ppOrder).deleteReportLines(); // task 09502 IT-2: make sure that existing invoice candidates are braught up to date final IInvoiceCandidateHandlerBL invoiceCandidateHandlerBL = Services.get(IInvoiceCandidateHandlerBL.class); invoiceCandidateHandlerBL.invalidateCandidatesFor(ppOrder); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\model\validator\PP_Order.java
1
请在Spring Boot框架中完成以下Java代码
public class QuartzConfig { @Autowired private Job quartzJobOne; @Autowired private Job quartzJobTwo; @Bean public JobDetail job1Detail() { return JobBuilder.newJob() .ofType(quartzJobOne.getClass()) .withIdentity("quartzJobOne", "group1") .storeDur...
.withSchedule(CronScheduleBuilder.cronSchedule("0/10 * * * * ?")) .build(); } @Bean public Trigger job2Trigger(JobDetail job2Detail) { return TriggerBuilder.newTrigger() .forJob(job2Detail) .withIdentity("quartzJobTwoTrigger", "group1") .withSchedule(...
repos\tutorials-master\spring-batch-2\src\main\java\com\baeldung\springbatch\jobs\quartz\QuartzConfig.java
2
请完成以下Java代码
public void notifySalesRepChanged(@NonNull final RequestSalesRepChanged event) { final Set<UserId> userIdsToNotify = extractUserIdsToNotify(event); if (userIdsToNotify.isEmpty()) { return; } final List<UserNotificationRequest> notifications = new ArrayList<>(); for (final UserId userIdToNotify : userId...
.subjectADMessageParam(getUserFullname(event.getChangedById())) .subjectADMessageParam(getUserFullname(event.getFromSalesRepId())) .subjectADMessageParam(getUserFullname(event.getToSalesRepId())) // .contentADMessage(MSG_RequestActionTransfer) .contentADMessageParam(event.getRequestDocumentNo()) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\request\notifications\RequestNotificationsSender.java
1
请完成以下Java代码
public void setB_Topic_ID (int B_Topic_ID) { if (B_Topic_ID < 1) set_Value (COLUMNNAME_B_Topic_ID, null); else set_Value (COLUMNNAME_B_Topic_ID, Integer.valueOf(B_Topic_ID)); } /** Get Topic. @return Auction Topic */ public int getB_Topic_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_B_To...
Private Note - not visible to the other parties */ public void setPrivateNote (String PrivateNote) { set_Value (COLUMNNAME_PrivateNote, PrivateNote); } /** Get Private Note. @return Private Note - not visible to the other parties */ public String getPrivateNote () { return (String)get_Value(COLUMNNA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_B_Bid.java
1
请完成以下Java代码
public class M_HU_MultipleSelection_Report_Print_Label extends JavaProcess implements IProcessPrecondition { private final HULabelService labelService = SpringContextHolder.instance.getBean(HULabelService.class); private final HUQRCodesService huqrCodesService = SpringContextHolder.instance.getBean(HUQRCodesService.c...
final Set<HuId> huIdSet = hus.stream().map(HUToReport::getHUId).collect(ImmutableSet.toImmutableSet()); huqrCodesService.generateForExistingHUs(huIdSet); topLevelHus.stream() .sorted(Comparator.comparing(hu -> hu.getHUId().getRepoId())) .forEach(topLevelHu -> { labelService.printNow(HULabelDirectPrint...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\process\M_HU_MultipleSelection_Report_Print_Label.java
1
请在Spring Boot框架中完成以下Java代码
public ResponseEntity<ApiResponse> deleteJob(JobForm form) throws SchedulerException { if (StrUtil.hasBlank(form.getJobGroupName(), form.getJobClassName())) { return new ResponseEntity<>(ApiResponse.msg("参数不能为空"), HttpStatus.BAD_REQUEST); } jobService.deleteJob(form); return...
@PutMapping(params = "cron") public ResponseEntity<ApiResponse> cronJob(@Valid JobForm form) { try { jobService.cronJob(form); } catch (Exception e) { return new ResponseEntity<>(ApiResponse.msg(e.getMessage()), HttpStatus.INTERNAL_SERVER_ERROR); } return new...
repos\spring-boot-demo-master\demo-task-quartz\src\main\java\com\xkcoding\task\quartz\controller\JobController.java
2
请完成以下Java代码
public class HashSetBenchmark { @State(Scope.Thread) public static class MyState { private Set<Employee> employeeSet1 = new HashSet<>(); private List<Employee> employeeList1 = new ArrayList<>(); private Set<Employee> employeeSet2 = new HashSet<>(); private List<Employee> employe...
for (long i = 0; i < set4Size; i++) { employeeSet4.add(new Employee(i, RandomStringUtils.random(7, true, false))); } } } @Benchmark public boolean given_SizeOfHashsetGreaterThanSizeOfCollection_When_RemoveAllFromHashSet_Then_GoodPerformance(MyState state) { ret...
repos\tutorials-master\core-java-modules\core-java-collections-3\src\main\java\com\baeldung\collections\removeallperformance\HashSetBenchmark.java
1
请完成以下Java代码
public void afterPropertiesSet() throws ServletException { super.afterPropertiesSet(); updateFactory(); } private void updateFactory() { String rolePrefix = this.rolePrefix; this.requestFactory = createServlet3Factory(rolePrefix); } /** * Sets the {@link AuthenticationTrustResolver} to be used. The defa...
Assert.notNull(trustResolver, "trustResolver cannot be null"); this.trustResolver = trustResolver; updateFactory(); } private HttpServletRequestFactory createServlet3Factory(String rolePrefix) { HttpServlet3RequestFactory factory = new HttpServlet3RequestFactory(rolePrefix, this.securityContextRepository); f...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\servletapi\SecurityContextHolderAwareRequestFilter.java
1
请完成以下Java代码
public void setA_Salvage_Value (BigDecimal A_Salvage_Value) { set_Value (COLUMNNAME_A_Salvage_Value, A_Salvage_Value); } /** Get Salvage Value. @return Salvage Value */ public BigDecimal getA_Salvage_Value () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Salvage_Value); if (bd == null) retur...
/** Actual = A */ public static final String POSTINGTYPE_Actual = "A"; /** Budget = B */ public static final String POSTINGTYPE_Budget = "B"; /** Commitment = E */ public static final String POSTINGTYPE_Commitment = "E"; /** Statistical = S */ public static final String POSTINGTYPE_Statistical = "S"; /** Reserv...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Acct.java
1
请完成以下Java代码
public boolean supports(ConfigAttribute attribute) { return (attribute.getAttribute() != null) && attribute.getAttribute().startsWith(getRolePrefix()); } /** * This implementation supports any type of class, because it does not query the * presented secure object. * @param clazz the secure object * @return...
Collection<? extends GrantedAuthority> authorities = extractAuthorities(authentication); for (ConfigAttribute attribute : attributes) { if (this.supports(attribute)) { result = ACCESS_DENIED; // Attempt to find a matching granted authority for (GrantedAuthority authority : authorities) { if (attri...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\vote\RoleVoter.java
1
请在Spring Boot框架中完成以下Java代码
public class UserService { private static final Logger LOG = LoggerFactory.getLogger(UserService.class); private final Map<String, User> usersCache; private final ObjectMapper objectMapper; public UserService(ObjectMapper objectMapper) { this.usersCache = new HashMap<>(); this.object...
try { File file = new ClassPathResource("users.json").getFile(); String usersData = new String(Files.readAllBytes(file.toPath())); List<User> users = objectMapper.readValue(usersData, new TypeReference<List<User>>() { }); User user = users.stream() ...
repos\tutorials-master\spring-reactive-modules\spring-reactive-4\src\main\java\com\baeldung\switchIfEmpty\service\UserService.java
2
请完成以下Java代码
protected AgeRange computeAgeRangeForProducts( @NonNull final Set<ProductId> productIds, @NonNull final Set<BPartnerId> bPartnerIds) { if (Check.isEmpty(productIds)) { return AgeRange.builder() .pickingAgeTolerance_BeforeMonths(0) .pickingAgeTolerance_AfterMonths(0) .build(); } int pic...
boolean bPartnerProductWasFound = false; for (final BPartnerId bpartnerId : bPartnerIds) { if (bpartnerId == null) { continue; } final I_C_BPartner partner = partnerDAO.getById(bpartnerId); final I_C_BPartner_Product bPartnerProduct = bpartnerProductDAO.retrieveBPProductForCustomer(partner, pro...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\age\AgeAttributesService.java
1
请完成以下Java代码
private Collection<TableRecordReference> extractRecordRefs(final DataItem dataItem) { return adapter.extractRecordRefs(dataItem); } /** Convenient method to be used as {@link CacheAdditionListener} */ public void add(final CacheKey ignored, @NonNull final DataItem dataItem) { add(dataItem); } public void a...
removeDataItemId(dataItemId, cacheKey, recordRefs); } private synchronized void removeDataItemId( final DataItemId dataItemId, final CacheKey cacheKey, final Collection<TableRecordReference> recordRefs) { logger.debug("Removing pair from index: {}, {}", dataItemId, cacheKey); _dataItemId_to_cacheKey.re...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\CacheIndex.java
1
请完成以下Java代码
public class CaseDefinitionBuilder { protected CmmnCaseDefinition caseDefinition; protected CmmnActivity casePlanModel; protected Deque<CmmnActivity> activityStack = new ArrayDeque<>(); protected CoreModelElement processElement = caseDefinition; public CaseDefinitionBuilder() { this(null); } public...
public CaseDefinitionBuilder behavior(CmmnActivityBehavior behavior) { getActivity().setActivityBehavior(behavior); return this; } public CaseDefinitionBuilder autoComplete(boolean autoComplete) { getActivity().setProperty("autoComplete", autoComplete); return this; } protected CmmnActivity ge...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\model\CaseDefinitionBuilder.java
1