instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class Comment { @Id private Integer id; private Integer year; private boolean approved; private String content; @ManyToOne private Post post; public Comment() { } public Comment(int id, int year, boolean approved, String content, Post post) { this.id = id; ...
} public Post getPost() { return post; } public void setPost(Post post) { this.post = post; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Comment)) { return false; } ...
repos\tutorials-master\persistence-modules\spring-data-jpa-simple\src\main\java\com\baeldung\jpa\aggregation\model\Comment.java
2
请完成以下Java代码
public WFProcessHeaderProperties getHeaderProperties(final @NonNull WFProcess wfProcess) { final WarehousesLoadingCache warehouses = warehouseService.newLoadingCache(); final Inventory inventory = getInventory(wfProcess); return WFProcessHeaderProperties.builder() .entry(WFProcessHeaderProperty.builder() ...
.build(); } @NonNull public static Inventory getInventory(final @NonNull WFProcess wfProcess) { return wfProcess.getDocumentAs(Inventory.class); } public static WFProcess mapJob(@NonNull final WFProcess wfProcess, @NonNull final UnaryOperator<Inventory> mapper) { final Inventory inventory = getInventory(wf...
repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\InventoryMobileApplication.java
1
请完成以下Java代码
public class CustomKafkaListener implements Runnable { private static final Logger log = Logger.getLogger(CustomKafkaListener.class.getName()); private final String topic; private final KafkaConsumer<String, String> consumer; private Consumer<String> recordConsumer; public CustomKafkaListener(Stri...
return new KafkaConsumer<>(props); } public CustomKafkaListener onEach(Consumer<String> newConsumer) { recordConsumer = recordConsumer.andThen(newConsumer); return this; } @Override public void run() { consumer.subscribe(Arrays.asList(topic)); while (true) { ...
repos\tutorials-master\apache-kafka-2\src\main\java\com\baeldung\kafka\consumer\CustomKafkaListener.java
1
请完成以下Java代码
public void notifyDecommissionFailed( @NonNull final UserId responsibleId, @NonNull final DecommissionResponse response) { sendNotification( responsibleId, MSG_SECURPHARM_ACTION_RESULT_ERROR_NOTIFICATION_MESSAGE, TableRecordReference.of(org.compiere.model.I_M_Inventory.Table_Name, response.getInven...
private void sendNotification( @NonNull final UserId recipientUserId, @NonNull final String notificationADMessage, @NonNull final TableRecordReference recordRef) { final String message = Services.get(IMsgBL.class).getMsg(Env.getCtx(), notificationADMessage); final UserNotificationRequest userNotification...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\notifications\DefaultSecurPharmUserNotifications.java
1
请完成以下Java代码
public List<I_M_InOut> getReceiptsToReverse(final Collection<? extends IHUAware> huAwareList) { if (huAwareList == null || huAwareList.isEmpty()) { return ImmutableList.of(); } return getReceiptsToReverse(huAwareList .stream() .map(huAware -> huAware.getM_HU().getM_HU_ID())); } public List<I_M_I...
private boolean tolerateNoHUsFound = false; private Builder() { super(); } public ReceiptCorrectHUsProcessor build() { return new ReceiptCorrectHUsProcessor(this); } public Builder setM_ReceiptSchedule(final I_M_ReceiptSchedule receiptSchedule) { this.receiptSchedule = receiptSchedule; re...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\ReceiptCorrectHUsProcessor.java
1
请在Spring Boot框架中完成以下Java代码
public class Event { @Id @Column(name = "event_id") private Long id; @Column(name = "title") private String title; @ElementCollection @Immutable private Set<String> guestList; public Event() {} public Event(Long id, String title, Set<String> guestList) { this.id = id...
return title; } public void setTitle(String title) { this.title = title; } @Cascade({ CascadeType.SAVE_UPDATE, CascadeType.DELETE }) public Set<String> getGuestList() { return guestList; } public void setGuestList(Set<String> guestList) { this.guestList = guestList...
repos\tutorials-master\persistence-modules\hibernate-annotations-2\src\main\java\com\baeldung\hibernate\immutable\entities\Event.java
2
请在Spring Boot框架中完成以下Java代码
public class CamundaBpmAutoConfiguration { @SuppressWarnings("SpringJavaInjectionPointsAutowiringInspection") @Configuration class ProcessEngineConfigurationImplDependingConfiguration { @Autowired protected ProcessEngineConfigurationImpl processEngineConfigurationImpl; @Bean public ProcessEngin...
return processEngineConfigurationImpl.getCommandExecutorTxRequiresNew(); } @Bean public CommandExecutor commandExecutorSchemaOperations() { return processEngineConfigurationImpl.getCommandExecutorSchemaOperations(); } } @Bean public CamundaBpmVersion camundaBpmVersion() { return new Ca...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\CamundaBpmAutoConfiguration.java
2
请完成以下Java代码
public class X_C_Workplace_ProductCategory extends org.compiere.model.PO implements I_C_Workplace_ProductCategory, org.compiere.model.I_Persistent { private static final long serialVersionUID = -1076525619L; /** Standard Constructor */ public X_C_Workplace_ProductCategory (final Properties ctx, final int C_...
@Override public void setC_Workplace_ProductCategory_ID (final int C_Workplace_ProductCategory_ID) { if (C_Workplace_ProductCategory_ID < 1) set_ValueNoCheck (COLUMNNAME_C_Workplace_ProductCategory_ID, null); else set_ValueNoCheck (COLUMNNAME_C_Workplace_ProductCategory_ID, C_Workplace_ProductCategory_ID)...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Workplace_ProductCategory.java
1
请完成以下Java代码
public String getId() { return id; } public String getCaseDefinitionId() { return caseDefinitionId; } public String getBusinessKey() { return businessKey; } public String getTenantId() { return tenantId; } public boolean isActive() { return active; } public boolean isComplet...
} public static CaseInstanceDto fromCaseInstance(CaseInstance instance) { CaseInstanceDto result = new CaseInstanceDto(); result.id = instance.getId(); result.caseDefinitionId = instance.getCaseDefinitionId(); result.businessKey = instance.getBusinessKey(); result.tenantId = instance.getTenantId...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\CaseInstanceDto.java
1
请完成以下Java代码
public List<Student> getStudentsOfGradeStateAndGenderWithPositionalParams(int grade, String state, String gender) { String sql = "select student_id, student_name, age, grade, gender, state from student" + " where grade = ? and state = ? and gender = ?"; return jdbcClient.sql(sql) .pa...
public int getCountOfStudentsOfGradeStateAndGenderWithNamedParam(int grade, String state, String gender) { String sql = "select student_id, student_name, age, grade, gender, state from student" + " where grade = :grade and state = :state and gender = :gender"; RowCountCallbackHandler countCall...
repos\tutorials-master\persistence-modules\spring-jdbc-2\src\main\java\com\baeldung\jdbcclient\dao\StudentDao.java
1
请完成以下Java代码
public class ApiError { private HttpStatus status; private String message; private List<String> errors; // public ApiError() { super(); } public ApiError(final HttpStatus status, final String message, final List<String> errors) { super(); this.status = status; ...
public void setMessage(final String message) { this.message = message; } public List<String> getErrors() { return errors; } public void setErrors(final List<String> errors) { this.errors = errors; } public void setError(final String error) { errors = Arrays.asL...
repos\tutorials-master\spring-security-modules\spring-security-web-rest\src\main\java\com\baeldung\errorhandling\ApiError.java
1
请完成以下Java代码
public boolean containsValue(Object value) { return false; } @Override public V get(Object key) { return get(key.toString()); } @Override public int build(TreeMap<String, V> keyValueMap) { int size = keyValueMap.size(); int[] indexArray = new int[siz...
} return resultList; } public ArrayList<Pair<String, V>> commonPrefixSearch(String key) { return commonPrefixSearch(key, 0, Integer.MAX_VALUE); } @Override public V put(String key, V value) { throw new UnsupportedOperationException("双数组不支持增量式插入"); } @Overri...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\DartMap.java
1
请完成以下Java代码
public int getSuspendedJobCount() { return suspendedJobCount; } public void setSuspendedJobCount(int suspendedJobCount) { this.suspendedJobCount = suspendedJobCount; } public int getDeadLetterJobCount() { return deadLetterJobCount; } public void setDeadLetterJobCount(i...
//toString ///////////////////////////////////////////////////////////////// public String toString() { if (isProcessInstanceType()) { return "ProcessInstance[" + getId() + "]"; } else { StringBuilder strb = new StringBuilder(); if (isScope) { str...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ExecutionEntityImpl.java
1
请完成以下Java代码
public String getNbOfDays() { return nbOfDays; } /** * Sets the value of the nbOfDays property. * * @param value * allowed object is * {@link String } * */ public void setNbOfDays(String value) { this.nbOfDays = value; } /** * G...
public XMLGregorianCalendar getActlDt() { return actlDt; } /** * Sets the value of the actlDt property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setActlDt(XMLGregorianCalendar value) { this.actlDt ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\CashBalanceAvailabilityDate1.java
1
请完成以下Java代码
public BPartnerContact extract(@NonNull final ExternalIdentifier contactIdentifier) { final BPartnerContact result = extract0(contactIdentifier); if (result != null) { id2UnusedContact.remove(result.getId()); } return result; } private BPartnerContact extract0(@NonNull final ExternalIdentifier contactI...
return contact; } public Collection<BPartnerContact> getUnusedContacts() { return id2UnusedContact.values(); } public void resetDefaultContactFlags() { for (final BPartnerContact bpartnerContact : getUnusedContacts()) { bpartnerContact.getContactType().setDefaultContact(false); } } public void res...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\bpartner\bpartnercomposite\jsonpersister\ShortTermContactIndex.java
1
请完成以下Java代码
String readSocketResponse(@NonNull final InputStream in) throws IOException { return readLineSocketResponse(in); } @Nullable private String readLineSocketResponse(@NonNull final InputStream in) throws IOException { try (final BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in, ICmd.D...
@Nullable private String readLineWithTimeout(@NonNull final BufferedReader in) throws IOException { try { final String lastReadLine = in.readLine(); logger.debug("Read line from the socket: {}", lastReadLine); return lastReadLine; } catch (final SocketTimeoutException e) { logger.debug("Socket t...
repos\metasfresh-new_dawn_uat\backend\de.metas.device.scales\src\main\java\de\metas\device\scales\endpoint\TcpConnectionReadLineEndPoint.java
1
请完成以下Java代码
public static final class Builder { private final String registeredClientId; private final String principalName; private final Set<GrantedAuthority> authorities = new HashSet<>(); private Builder(String registeredClientId, String principalName) { this(registeredClientId, principalName, Collections.emptyS...
public Builder authority(GrantedAuthority authority) { this.authorities.add(authority); return this; } /** * A {@code Consumer} of the {@code authorities}, allowing the ability to add, * replace or remove. * @param authoritiesConsumer a {@code Consumer} of the {@code authorities} * @return the {@...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\OAuth2AuthorizationConsent.java
1
请完成以下Java代码
public void setRef_OrderLine_ID (int Ref_OrderLine_ID) { if (Ref_OrderLine_ID < 1) set_Value (COLUMNNAME_Ref_OrderLine_ID, null); else set_Value (COLUMNNAME_Ref_OrderLine_ID, Integer.valueOf(Ref_OrderLine_ID)); } /** Get Referenced Order Line. @return Reference to corresponding Sales/Purchase Order ...
set_Value (COLUMNNAME_S_ResourceAssignment_ID, null); else set_Value (COLUMNNAME_S_ResourceAssignment_ID, Integer.valueOf(S_ResourceAssignment_ID)); } /** Get Ressourcenzuordnung. @return Ressourcenzuordnung */ public int getS_ResourceAssignment_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_S_Re...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_RV_C_OrderLine_Overview.java
1
请完成以下Java代码
public void setM_ProductGroup_ID (final int M_ProductGroup_ID) { if (M_ProductGroup_ID < 1) set_Value (COLUMNNAME_M_ProductGroup_ID, null); else set_Value (COLUMNNAME_M_ProductGroup_ID, M_ProductGroup_ID); } @Override public int getM_ProductGroup_ID() { return get_ValueAsInt(COLUMNNAME_M_ProductGro...
@Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\invoicecandidate\model\X_C_Invoice_Candidate_Agg.java
1
请完成以下Java代码
public void setType_Conditions (final java.lang.String Type_Conditions) { set_ValueNoCheck (COLUMNNAME_Type_Conditions, Type_Conditions); } @Override public java.lang.String getType_Conditions() { return get_ValueAsString(COLUMNNAME_Type_Conditions); } /** * Type_Flatrate AD_Reference_ID=540264 * Ref...
public static final String TYPE_FLATRATE_Corridor_Percent = "LIPE"; /** Reported Quantity = RPTD */ public static final String TYPE_FLATRATE_ReportedQuantity = "RPTD"; @Override public void setType_Flatrate (final java.lang.String Type_Flatrate) { set_Value (COLUMNNAME_Type_Flatrate, Type_Flatrate); } @Overri...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Flatrate_Conditions.java
1
请完成以下Java代码
public class SyncInfoVo { /** * 成功的信息 */ private List<String> successInfo; /** * 失败的信息 */ private List<String> failInfo; public SyncInfoVo() { this.successInfo = new ArrayList<>(); this.failInfo = new ArrayList<>(); }
public SyncInfoVo(List<String> successInfo, List<String> failInfo) { this.successInfo = successInfo; this.failInfo = failInfo; } public SyncInfoVo addSuccessInfo(String info) { this.successInfo.add(info); return this; } public SyncInfoVo addFailInfo(String info) { ...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\vo\thirdapp\SyncInfoVo.java
1
请完成以下Java代码
public Document initializeAsNewDocument(final DocumentId newDocumentId, final String version) { return initializeAsNewDocument(new SimpleDocumentValuesSupplier(newDocumentId, version)); } public Document initializeAsNewDocument(final Supplier<DocumentId> newDocumentIdSupplier, final String version) { ret...
_windowNo = parentDocument.getWindowNo(); } } return _windowNo; } private boolean isWritable() { final Document parentDocument = getParentDocument(); if (parentDocument == null) { return isNewDocument(); } else { return parentDocument.isWritable(); } } private Reentran...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\Document.java
1
请完成以下Java代码
public String getStrokeValue() { return "none"; } @Override public String getDValue() { return "M 10 0 C 4.4771525 0 0 4.4771525 0 10 C 0 15.522847 4.4771525 20 10 20 C 15.522847 20 20 15.522847 20 10 C 20 4.4771525 15.522847 1.1842379e-15 10 0 z M 9.09375 1.03125 C 9.2292164 1.0174926 9.36...
public String getStyleValue() { return null; } @Override public Integer getWidth() { return 20; } @Override public Integer getHeight() { return 20; } @Override public String getStrokeWidth() { return null; } }
repos\Activiti-develop\activiti-core\activiti-image-generator\src\main\java\org\activiti\image\impl\icon\TimerIconType.java
1
请完成以下Java代码
public void setIsEmployee (boolean IsEmployee) { set_Value (COLUMNNAME_IsEmployee, Boolean.valueOf(IsEmployee)); } /** Get Employee. @return Indicates if this Business Partner is an employee */ public boolean isEmployee () { Object oo = get_Value(COLUMNNAME_IsEmployee); if (oo != null) { if (o...
public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNam...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Job.java
1
请在Spring Boot框架中完成以下Java代码
private ObservationRegistry getObservationRegistry() { ApplicationContext context = getBuilder().getSharedObject(ApplicationContext.class); String[] names = context.getBeanNamesForType(ObservationRegistry.class); if (names.length == 1) { return context.getBean(ObservationRegistry.class); } else { return...
} private static final class SpaCsrfTokenRequestHandler implements CsrfTokenRequestHandler { private final CsrfTokenRequestAttributeHandler plain = new CsrfTokenRequestAttributeHandler(); private final CsrfTokenRequestAttributeHandler xor = new XorCsrfTokenRequestAttributeHandler(); SpaCsrfTokenRequestHandle...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\CsrfConfigurer.java
2
请完成以下Java代码
protected String getPropertyValueAsString(String name, JsonNode objectNode) { return JsonConverterUtil.getPropertyValueAsString(name, objectNode); } protected boolean getPropertyValueAsBoolean(String name, JsonNode objectNode) { return JsonConverterUtil.getPropertyValueAsBoolean(name, objectNod...
protected String convertListToCommaSeparatedString(List<String> stringList) { String resultString = null; if (stringList != null && stringList.size() > 0) { StringBuilder expressionBuilder = new StringBuilder(); for (String singleItem : stringList) { if (expressio...
repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\BaseBpmnJsonConverter.java
1
请在Spring Boot框架中完成以下Java代码
FileSystemWatcherFactory getFileSystemWatcherFactory() { return this::newFileSystemWatcher; } private FileSystemWatcher newFileSystemWatcher() { Restart restartProperties = this.properties.getRestart(); FileSystemWatcher watcher = new FileSystemWatcher(true, restartProperties.getPollInterval(), resta...
@Bean ClassPathRestartStrategy classPathRestartStrategy() { return new PatternClassPathRestartStrategy(this.properties.getRestart().getAllExclude()); } @Bean ClassPathChangeUploader classPathChangeUploader(ClientHttpRequestFactory requestFactory, @Value("${remoteUrl}") String remoteUrl) { String url ...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\remote\client\RemoteClientConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public SpringIdmEngineConfiguration idmEngineConfiguration(DataSource dataSource, PlatformTransactionManager platformTransactionManager) { SpringIdmEngineConfiguration configuration = new SpringIdmEngineConfiguration(); configuration.setTransactionManager(platformTransactionManager); configureE...
} } @Configuration(proxyBeanMethods = false) @ConditionalOnBean(type = { "org.flowable.app.spring.SpringAppEngineConfiguration" }) public static class IdmEngineAppConfiguration extends BaseEngineConfigurationWithConfigurers<SpringIdmEngineConfiguration> { @Bean @Conditi...
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\idm\IdmEngineAutoConfiguration.java
2
请完成以下Java代码
default void setBatchingStrategy(BatchingStrategy batchingStrategy) { } /** * Return this endpoint's batching strategy, or null. * @return the strategy. * @since 2.4.7 */ default @Nullable BatchingStrategy getBatchingStrategy() { return null; } /** * Override the container factory's {@link Acknowledg...
return null; } /** * Get the reply content type. * @return the content type. * @since 2.3 */ default @Nullable String getReplyContentType() { return null; } /** * Return whether the content type set by a converter prevails or not. * @return false to always apply the reply content type. * @since 2...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\listener\RabbitListenerEndpoint.java
1
请在Spring Boot框架中完成以下Java代码
public BankAccount getBankAccountById(@NonNull final BankAccountId bankAccountId) { return bpBankAccountDAO.getById(bankAccountId); } public List<I_C_BankStatementLine> getBankStatementLinesByBankStatementId(@NonNull final BankStatementId bankStatementId) { return bankStatementBL.getLinesByBankStatementId(bank...
{ paymentBL.markReconciled(requests); } public void markBankStatementLinesAsProcessed(final BankStatementId bankStatementId) { final boolean processed = true; bankStatementDAO.updateBankStatementLinesProcessedFlag(bankStatementId, processed); } public void deleteFactsForBankStatement(final I_C_BankStatemen...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\service\BankStatementDocumentHandlerRequiredServicesFacade.java
2
请在Spring Boot框架中完成以下Java代码
public String getUsername2() { SecurityContext securityContext = SecurityContextHolder.getContext(); return securityContext.getAuthentication().getName(); } @RolesAllowed({ "ROLE_VIEWER", "ROLE_EDITOR" }) public boolean isValidUsername2(String username) { return userRoleRepository.i...
@PreFilter(value = "filterObject != authentication.principal.username", filterTarget = "usernames") public String joinUsernamesAndRoles(List<String> usernames, List<String> roles) { return usernames.stream().collect(Collectors.joining(";")) + ":" + roles.stream().collect(Collectors.joining(";")); } ...
repos\tutorials-master\spring-security-modules\spring-security-core\src\main\java\com\baeldung\methodsecurity\service\UserRoleService.java
2
请完成以下Java代码
public class SequenceFlowParseHandler extends AbstractBpmnParseHandler<SequenceFlow> { public static final String PROPERTYNAME_CONDITION = "condition"; public static final String PROPERTYNAME_CONDITION_TEXT = "conditionText"; @Override public Class<? extends BaseElement> getHandledType() { ret...
TransitionImpl transition = sourceActivity.createOutgoingTransition(sequenceFlow.getId(), skipExpression); bpmnParse.getSequenceFlows().put(sequenceFlow.getId(), transition); transition.setProperty("name", sequenceFlow.getName()); transition.setProperty("documentation", sequenceFlow.getDocumenta...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\handler\SequenceFlowParseHandler.java
1
请完成以下Java代码
public boolean isEnabled(@NonNull final UserId userId) { return getSecretKey(userId).isPresent(); } public boolean isDisabled(@NonNull final UserId userId) { return !isEnabled(userId); } private Optional<SecretKey> getSecretKey(final @NonNull UserId userId) { return extractSecretKey(userDAO.getById(userI...
} public void disable(@NonNull final UserId userId) { final I_AD_User user = userDAO.getById(userId); user.setSecretKey_2FA(null); userDAO.save(user); } public boolean isValidOTP(@NonNull final UserId userId, @NonNull final OTP otp) { final SecretKey secretKey = getSecretKey(userId).orElse(null); if (s...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\user_2fa\User2FAService.java
1
请完成以下Java代码
void reportProgress(final PPOrderActivityProcessReport report) { changeStatusTo(PPOrderRoutingActivityStatus.IN_PROGRESS); if (getDateStart() == null) { setDateStart(report.getFinishDate().minus(report.getDuration())); } if (getDateFinish() == null || getDateFinish().isBefore(report.getFinishDate())) {...
if (getStatus() != PPOrderRoutingActivityStatus.CLOSED) { logger.warn("Only Closed activities can be unclosed - {}", this); return; } changeStatusTo(PPOrderRoutingActivityStatus.IN_PROGRESS); } void voidIt() { if (getStatus() == PPOrderRoutingActivityStatus.VOIDED) { logger.warn("Activity alread...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\PPOrderRoutingActivity.java
1
请完成以下Java代码
public IRfQResponseProducer newRfQResponsesProducerFor(final I_C_RfQ rfq) { if (!Services.get(IPMM_RfQ_BL.class).isProcurement(rfq)) { return null; } return new PMMRfQResponseProducer(); } private static class PMMRfQResponseProducer extends DefaultRfQResponseProducer { @Override protected I_C_RfQRe...
if (rfqResponseLine == null) { return null; } final I_C_RfQResponseLine pmmRfqResponseLine = InterfaceWrapperHelper.create(rfqResponseLine, I_C_RfQResponseLine.class); // // From RfQ Line final I_C_RfQLine pmmRfqLine = InterfaceWrapperHelper.create(rfqLine, I_C_RfQLine.class); pmmRfqResponseLi...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\rfq\PMMRfQResponseProducerFactory.java
1
请完成以下Java代码
public String createNext() { return encodeUsingDigits(nextViewId.getAndIncrement(), VIEW_DIGITS); } @VisibleForTesting String encodeUsingDigits(final long value, char[] digits) { if (value == 0) { return String.valueOf(digits[0]); } final int base = digits.length; final StringBuilder buf = new Str...
public void setRandomUUIDSource(@NonNull final Supplier<String> newRandomUUIDSource) { randomUUIDSource = newRandomUUIDSource; } public void reset() { nextViewId.set(1); randomUUIDSource = null; } public String createRandomUUID() { return coalesceSuppliers(randomUUIDSource, DEFAULT_RANDOM_UUID_SOURCE);...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\lang\UIDStringUtil.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isCompleted() { return completed; } /** * Sets the completed. * * @param completed the new completed */ public void setCompleted(boolean completed) { this.completed = completed; } /** * @return the userName */ public String getUserName() { return userName; } /** * @param ...
if (obj == null) return false; if (getClass() != obj.getClass()) return false; TaskDTO other = (TaskDTO) obj; if (comments == null) { if (other.comments != null) return false; } else if (!comments.equals(other.comments)) return false; if (completed != other.completed) return false; if (de...
repos\spring-boot-microservices-master\task-webservice\src\main\java\com\rohitghatol\microservices\task\dtos\TaskDTO.java
2
请完成以下Java代码
public String getCaption(final String adLanguage) { return caption.translate(adLanguage); } public String getDescription(final String adLanguage) { return description.translate(adLanguage); } public List<DocumentLayoutSectionDescriptor> getSections() { return sections; } public List<DocumentLayoutElem...
{ this.windowId = windowId; return this; } public Builder setCaption(final ITranslatableString caption) { this.caption = caption; return this; } public Builder setDescription(final ITranslatableString description) { this.description = description; return this; } public Builder notFo...
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 int getM_Material_Tracking_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Material_Tracking_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Material Tracking Reference. @param M_Material_Tracking_Ref_ID Material Tracking Reference */ @Override public void setM_Material_T...
@param QtyReceived Empfangene Menge */ @Override public void setQtyReceived (java.math.BigDecimal QtyReceived) { throw new IllegalArgumentException ("QtyReceived is virtual column"); } /** Get Empfangene Menge. @return Empfangene Menge */ @Override public java.math.BigDecimal getQtyReceived () { BigD...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java-gen\de\metas\materialtracking\model\X_M_Material_Tracking_Ref.java
1
请完成以下Java代码
public void setCCUser(final I_AD_User ccUser) { setAttribute(VAR_CC_User, ccUser); setAttribute(VAR_CC_User_ID, ccUser != null ? ccUser.getAD_User_ID() : null); } public Builder setEmail(final String email) { setAttribute(VAR_EMail, email); return this; } public Builder setCCEmail(fi...
return new POSourceDocument(po); } } @AllArgsConstructor private static final class POSourceDocument implements SourceDocument { @NonNull private final PO po; @Override public boolean hasFieldValue(final String fieldName) { return po.get_ColumnIndex(fieldName) >= 0; } @Override public Object...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\letters\model\MADBoilerPlate.java
1
请完成以下Java代码
public String getGender() { return gender; } public void setGender(String gender) { this.gender = gender; } public String getName() { return name; } public void setName(String name) { this.name = name; }
public Date getJoinDate() { return joinDate; } public void setJoinDate(Date joinDate) { this.joinDate = joinDate; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }
repos\tutorials-master\persistence-modules\spring-data-jpa-annotations-2\src\main\java\com\baeldung\queryhint\Employee.java
1
请完成以下Java代码
private void assertFieldIsWritable(BeanWrapper beanWrapper, String fieldName) { Supplier<String> pdxFieldNotWritableExceptionMessageSupplier = () -> String.format("Field [%1$s] of Object [%2$s] is not writable", fieldName, getClassName()); assertCondition(beanWrapper.isWritableProperty(fieldName), (...
@Override public Object getObject() { return getParent().getObject(); } @Override public WritablePdxInstance createWriter() { return this; } @Override public boolean hasField(String fieldName) { return getParent().hasField(fieldName); } }; } /** * Determines whether the give...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\pdx\ObjectPdxInstanceAdapter.java
1
请完成以下Java代码
public boolean updateContext(final Properties ctx) { final int sessionId = getAD_Session_ID(); if (sessionId <= 0) { log.warn("Cannot update context because session is not saved yet"); return false; } if (!sessionPO.isActive()) { log.debug("Cannot update context because session is not active"); ...
return false; } final PO po = InterfaceWrapperHelper.getStrictPO(sessionPO); final String columnName = po.get_ColumnName(columnIndex); if (columnName == null) { return false; } if (CTX_IgnoredColumnNames.contains(columnName)) { return false; } final POInfo poInfo = po.getPOInfo(); final i...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\session\MFSession.java
1
请完成以下Java代码
public void setPP_Order_ID (final int PP_Order_ID) { if (PP_Order_ID < 1) set_ValueNoCheck (COLUMNNAME_PP_Order_ID, null); else set_ValueNoCheck (COLUMNNAME_PP_Order_ID, PP_Order_ID); } @Override public int getPP_Order_ID() { return get_ValueAsInt(COLUMNNAME_PP_Order_ID); } @Override public de....
public void setPP_Order_Qty_ID (final int PP_Order_Qty_ID) { if (PP_Order_Qty_ID < 1) set_ValueNoCheck (COLUMNNAME_PP_Order_Qty_ID, null); else set_ValueNoCheck (COLUMNNAME_PP_Order_Qty_ID, PP_Order_Qty_ID); } @Override public int getPP_Order_Qty_ID() { return get_ValueAsInt(COLUMNNAME_PP_Order_Qty...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_PP_Order_Qty.java
1
请完成以下Java代码
public TbQueueConsumer<TbProtoQueueMsg<ToEdqsMsg>> createEdqsEventsConsumer() { return new InMemoryTbQueueConsumer<>(storage, edqsConfig.getEventsTopic()); } @Override public TbQueueConsumer<TbProtoQueueMsg<ToEdqsMsg>> createEdqsEventsToBackupConsumer() { throw new UnsupportedOperationExcep...
.key("edqs") .handler(handler) .requestsTopic(edqsConfig.getRequestsTopic()) .consumerCreator(tpi -> new InMemoryTbQueueConsumer<>(storage, edqsConfig.getRequestsTopic())) .responseProducer(responseProducer) .pollInterval(edqsConfig.getPoll...
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\edqs\InMemoryEdqsQueueFactory.java
1
请完成以下Java代码
protected void deleteProcessDefinitions(ProcessDefinitionGroup group) { ProcessDefinitionEntity newLatestProcessDefinition = findNewLatestProcessDefinition(group); CommandContext commandContext = Context.getCommandContext(); UserOperationLogManager userOperationLogManager = commandContext.getOperationLogMa...
public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ProcessDefinitionGroup other = (ProcessDefinitionGroup) obj; if (key == null) { if (other.key != null) ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\DeleteProcessDefinitionsByIdsCmd.java
1
请在Spring Boot框架中完成以下Java代码
public class ReaderConsumerServiceImpl implements ReaderConsumerService { private final WebClient webClient; private static final ObjectMapper mapper = new ObjectMapper(); public ReaderConsumerServiceImpl(WebClient webClient) { this.webClient = webClient; } @Override public List<Book> ...
.accept(MediaType.APPLICATION_JSON) .retrieve() .bodyToMono(Reader[].class).log(); Reader[] readers = response.block(); return Arrays.stream(readers) .flatMap(reader -> reader.getBooksRead().stream()) .map(Book::getAuthor) .collect(Collectors.toList());...
repos\tutorials-master\spring-reactive-modules\spring-reactive-client\src\main\java\com\baeldung\webclient\json\ReaderConsumerServiceImpl.java
2
请完成以下Java代码
public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public static Integer getOK() { return OK; } public static Integer getERROR() { return ERROR; } public Integer getCode() { return code; } public ...
public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public T getData() { return data; } public void setData(T data) { this.data = data; } }
repos\SpringBoot-Learning-master\1.x\Chapter3-1-6\src\main\java\com\didispace\dto\ErrorInfo.java
1
请完成以下Java代码
public Factory from(Object source) { assertNotNull(source, "Source object to serialize to PDX must not be null"); RegionService regionService = getRegionService(); Optional.of(regionService) .filter(GemFireCache.class::isInstance) .map(GemFireCache.class::cast) .map(GemFireCache::getPdxReadSerialized)...
return target != null ? target.getClass().getName() : null; } @FunctionalInterface public interface Factory { /** * Creates a {@link PdxInstance}. * * @return the created {@link PdxInstance}. * @throws IllegalArgumentException Depending on the implementation, an {@link IllegalArgumentException} * ...
repos\spring-boot-data-geode-main\spring-geode-project\apache-geode-extensions\src\main\java\org\springframework\geode\pdx\PdxInstanceBuilder.java
1
请完成以下Java代码
public String getAttributeValue(String namespace, String name) { List<ExtensionAttribute> attributes = getAttributes().get(name); if (attributes != null && !attributes.isEmpty()) { for (ExtensionAttribute attribute : attributes) { if ((namespace == null && attribute.getNamesp...
for (String key : otherElement.getExtensionElements().keySet()) { List<ExtensionElement> otherElementList = otherElement.getExtensionElements().get(key); if (otherElementList != null && !otherElementList.isEmpty()) { List<ExtensionElement> elementList = new ArrayList<...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\BaseElement.java
1
请完成以下Java代码
public boolean isFailed() { return state == FAILED.getStateCode(); } public boolean isSuspended() { return state == SUSPENDED.getStateCode(); } public boolean isClosed() { return state == CLOSED.getStateCode(); } @Override public String toString() { return this.getClass().getSimpleName(...
+ "[businessKey=" + businessKey + ", startUserId=" + createUserId + ", superCaseInstanceId=" + superCaseInstanceId + ", superProcessInstanceId=" + superProcessInstanceId + ", durationInMillis=" + durationInMillis + ", createTime=" + startTime + ", closeTime=" + endTime + ", id=...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricCaseInstanceEventEntity.java
1
请完成以下Java代码
public void onError(Exception e) { tellFailure(ctx, tbMsg, e); } @Override public void onSuccess(InvokeRequest request, InvokeResult invokeResult) { try { if (config.isTellFailureIfFuncThrowsExc() && invokeResult.getFunctionError()...
.build(); } private TbMsg processException(TbMsg origMsg, InvokeResult invokeResult, Throwable t) { TbMsgMetaData metaData = origMsg.getMetaData().copy(); metaData.putValue("error", t.getClass() + ": " + t.getMessage()); metaData.putValue("requestId", invokeResult.getSdkResponseMetadata...
repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\aws\lambda\TbAwsLambdaNode.java
1
请完成以下Java代码
public class RetourenavisAnfragenResponse { @XmlElement(name = "return", namespace = "") protected RetourenavisAnfrageAntwort _return; /** * Gets the value of the return property. * * @return * possible object is * {@link RetourenavisAnfrageAntwort } * */ ...
} /** * Sets the value of the return property. * * @param value * allowed object is * {@link RetourenavisAnfrageAntwort } * */ public void setReturn(RetourenavisAnfrageAntwort value) { this._return = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v2\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v2\RetourenavisAnfragenResponse.java
1
请完成以下Java代码
public boolean hasErrors() { return parseError != null || (cells != null && cells.stream().anyMatch(ImpDataCell::isCellError)); } public String getErrorMessageAsStringOrNull() { return getErrorMessageAsStringOrNull(-1); } public String getErrorMessageAsStringOrNull(final int maxLength) { final int ma...
public List<Object> getJdbcValues(@NonNull final List<ImpFormatColumn> columns) { final int columnsCount = columns.size(); if (parseError != null) { final ArrayList<Object> nulls = new ArrayList<>(columnsCount); for (int i = 0; i < columnsCount; i++) { nulls.add(null); } return nulls; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\parser\ImpDataLine.java
1
请在Spring Boot框架中完成以下Java代码
private AvailableToPromiseResultGroupBuilder newGroup( @NonNull final AddToResultGroupRequest request, @NonNull final AttributesKey storageAttributesKey) { final AvailableToPromiseResultGroupBuilder group = AvailableToPromiseResultGroupBuilder.builder() .bpartner(request.getBpartner()) .warehouse(Wareh...
.build(); groups.add(group); } @VisibleForTesting boolean isZeroQty() { if (groups.isEmpty()) { return true; } for (AvailableToPromiseResultGroupBuilder group : groups) { if (!group.isZeroQty()) { return false; } } return true; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\atp\AvailableToPromiseResultBucket.java
2
请完成以下Java代码
public static boolean shouldLogJobException(ProcessEngineConfiguration processEngineConfiguration, JobEntity currentJob) { boolean enableReducedJobExceptionLogging = processEngineConfiguration.isEnableReducedJobExceptionLogging(); return currentJob == null || !enableReducedJobExceptionLogging || enableReducedJo...
public void processEngineClosed(String name) { logInfo("007", "Process Engine {} closed", name); } public void historyCleanupJobReconfigurationFailure(Exception exception) { logInfo( "008", "History Cleanup Job reconfiguration failed on Process Engine Bootstrap. Possible concurrent execution wi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessEngineLogger.java
1
请在Spring Boot框架中完成以下Java代码
public XMLGregorianCalendar getTransportDocumentDate() { return transportDocumentDate; } /** * Sets the value of the transportDocumentDate property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setTransportDoc...
return scac; } /** * Sets the value of the scac property. * * @param value * allowed object is * {@link String } * */ public void setSCAC(String value) { this.scac = value; } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\ShipperExtensionType.java
2
请在Spring Boot框架中完成以下Java代码
public final class PackingItemPart { @NonNull private final PackingItemPartId id; @NonNull private final ProductId productId; @NonNull private final BPartnerId bpartnerId; @NonNull private final BPartnerLocationId bpartnerLocationId; @Nullable private final HUPIItemProductId packingMaterialId; @NonNull pri...
{ return id.getShipmentScheduleId(); } public PackingItemPart withQty(@NonNull final Quantity qty) { if (Objects.equals(this.qty, qty)) { return this; } return toBuilder().qty(qty).build(); } public PackingItemPart addQty(@NonNull final Quantity qtyToAdd) { return withQty(this.qty.add(qtyToAdd));...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\picking\service\PackingItemPart.java
2
请完成以下Java代码
public String getLanguageVersion() { return "2.1"; } public String getMethodCallSyntax(String obj, String method, String... arguments) { throw new UnsupportedOperationException("Method getMethodCallSyntax is not supported"); } public List<String> getMimeTypes() { return mimeTyp...
public String getParameter(String key) { if (key.equals(ScriptEngine.NAME)) { return getLanguageName(); } else if (key.equals(ScriptEngine.ENGINE)) { return getEngineName(); } else if (key.equals(ScriptEngine.ENGINE_VERSION)) { return getEngineVersion(); ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\scripting\JuelScriptEngineFactory.java
1
请在Spring Boot框架中完成以下Java代码
static class CustomizerConfiguration { @Bean @ConditionalOnBean(Customizer.class) SpringLiquibaseCustomizer springLiquibaseCustomizer(Customizer<Liquibase> customizer) { return (springLiquibase) -> springLiquibase.setCustomizer(customizer); } } static final class LiquibaseDataSourceCondition extends Any...
return this.properties.getPassword(); } @Override public @Nullable String getJdbcUrl() { return this.properties.getUrl(); } @Override public @Nullable String getDriverClassName() { String driverClassName = this.properties.getDriverClassName(); return (driverClassName != null) ? driverClassName : ...
repos\spring-boot-4.0.1\module\spring-boot-liquibase\src\main\java\org\springframework\boot\liquibase\autoconfigure\LiquibaseAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public DataResponse<HistoricVariableInstanceResponse> getHistoricActivityInstances(@ApiParam(hidden = true) @RequestParam Map<String, String> allRequestParams) { HistoricVariableInstanceQueryRequest query = new HistoricVariableInstanceQueryRequest(); // Populate query based on request if (allRe...
} if (allRequestParams.get("variableName") != null) { query.setVariableName(allRequestParams.get("variableName")); } if (allRequestParams.get("variableNameLike") != null) { query.setVariableNameLike(allRequestParams.get("variableNameLike")); } if (allReq...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\variable\HistoricVariableInstanceCollectionResource.java
2
请完成以下Java代码
private void addSslHostConfig(AbstractHttp11Protocol<?> protocol, String serverName, SslBundle sslBundle) { SSLHostConfig sslHostConfig = new SSLHostConfig(); sslHostConfig.setHostName(serverName); configureSslClientAuth(sslHostConfig); applySslBundle(protocol, sslHostConfig, sslBundle); protocol.addSslHostCo...
} private void configureSslClientAuth(SSLHostConfig config) { config.setCertificateVerification(ClientAuth.map(this.clientAuth, "none", "optional", "required")); } private void configureSslStores(SSLHostConfig sslHostConfig, SSLHostConfigCertificate certificate, SslStoreBundle stores) { try { if (stores....
repos\spring-boot-4.0.1\module\spring-boot-tomcat\src\main\java\org\springframework\boot\tomcat\SslConnectorCustomizer.java
1
请完成以下Java代码
public boolean reActivateIt() { fireDocValidateEvent(ModelValidator.TIMING_BEFORE_REACTIVATE); handler.reactivateIt(model); fireDocValidateEvent(ModelValidator.TIMING_AFTER_REACTIVATE); return true; } @Override public String getSummary() { return handler.getSummary(model); } @Override public String ...
@Override public String getDocAction() { return model.getDocAction(); } @Override public boolean save() { InterfaceWrapperHelper.save(model); return true; } @Override public Properties getCtx() { return InterfaceWrapperHelper.getCtx(model); } @Override public int get_ID() { return InterfaceWr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\DocumentWrapper.java
1
请完成以下Java代码
public List<String> getBundleNames() { List<String> names = new ArrayList<>(this.registeredBundles.keySet()); Collections.sort(names); return Collections.unmodifiableList(names); } private RegisteredSslBundle getRegistered(String name) throws NoSuchSslBundleException { Assert.notNull(name, "'name' must not b...
void update(SslBundle updatedBundle) { Assert.notNull(updatedBundle, "'updatedBundle' must not be null"); this.bundle = updatedBundle; if (this.updateHandlers.isEmpty()) { logger.warn(LogMessage.format( "SSL bundle '%s' has been updated but may be in use by a technology that doesn't support SSL reloa...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ssl\DefaultSslBundleRegistry.java
1
请在Spring Boot框架中完成以下Java代码
public class PPOrderWeightingRunId implements RepoIdAware { @JsonCreator public static PPOrderWeightingRunId ofRepoId(final int repoId) { return new PPOrderWeightingRunId(repoId); } public static PPOrderWeightingRunId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new PPOrderWeightingRunId(repoId) : ...
public static int toRepoId(@Nullable final PPOrderWeightingRunId id) { return id != null ? id.getRepoId() : -1; } int repoId; private PPOrderWeightingRunId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "PP_Order_Weighting_Run_ID"); } @JsonValue public int toJson() { return getR...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\manufacturing\order\weighting\run\PPOrderWeightingRunId.java
2
请完成以下Java代码
public int getC_BPartner_ID() { return get_ValueAsInt(COLUMNNAME_C_BPartner_ID); } /** * CU_TU_PLU AD_Reference_ID=541906 * Reference name: CU_TU_PLU */ public static final int CU_TU_PLU_AD_Reference_ID=541906; /** CU = CU */ public static final String CU_TU_PLU_CU = "CU"; /** TU = TU */ public stati...
@Override public void setLeichMehl_PluFile_ConfigGroup_ID (final int LeichMehl_PluFile_ConfigGroup_ID) { if (LeichMehl_PluFile_ConfigGroup_ID < 1) set_Value (COLUMNNAME_LeichMehl_PluFile_ConfigGroup_ID, null); else set_Value (COLUMNNAME_LeichMehl_PluFile_ConfigGroup_ID, LeichMehl_PluFile_ConfigGroup_ID); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_LeichMehl_ProductMapping.java
1
请在Spring Boot框架中完成以下Java代码
public String takeQueueTask() throws InterruptedException { return blockingQueue.take(); } @SuppressWarnings("unchecked") private Map<String, Integer> getPdfImageCaches() { Map<String, Integer> map = new HashMap<>(); try { map = (Map<String, Integer>) toObject(db.get(FIL...
bis.close(); return obj; } private void cleanPdfCache() throws IOException, RocksDBException { Map<String, String> initPDFCache = new HashMap<>(); db.put(FILE_PREVIEW_PDF_KEY.getBytes(), toByteArray(initPDFCache)); } private void cleanImgCache() throws IOException, RocksDBExcep...
repos\kkFileView-master\server\src\main\java\cn\keking\service\cache\impl\CacheServiceRocksDBImpl.java
2
请完成以下Java代码
public EmptiesInOutLinesProducer create() { super.create(); return this; } /** @return set of M_InOutLine_IDs which were created/updated by this processor */ public Set<Integer> getAffectedInOutLinesId() { return affectedInOutLinesId; } private final I_M_InOut getM_InOut() { return _inoutRef.getValue(...
@Override protected void removeDocumentLine(@NonNull final IPackingMaterialDocumentLine pmLine) { final EmptiesInOutLinePackingMaterialDocumentLine inoutLinePMLine = toImpl(pmLine); final I_M_InOutLine inoutLine = inoutLinePMLine.getM_InOutLine(); if (!InterfaceWrapperHelper.isNew(inoutLine)) { InterfaceWr...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\empties\EmptiesInOutLinesProducer.java
1
请在Spring Boot框架中完成以下Java代码
ManagementErrorEndpoint errorEndpoint(ErrorAttributes errorAttributes, WebProperties webProperties) { return new ManagementErrorEndpoint(errorAttributes, webProperties.getError()); } @Bean @ConditionalOnBean(ErrorAttributes.class) ManagementErrorPageCustomizer managementErrorPageCustomizer(WebProperties webPrope...
@Bean(name = DispatcherServlet.HANDLER_EXCEPTION_RESOLVER_BEAN_NAME) CompositeHandlerExceptionResolver compositeHandlerExceptionResolver() { return new CompositeHandlerExceptionResolver(); } @Bean @ConditionalOnMissingBean({ RequestContextListener.class, RequestContextFilter.class }) RequestContextFilter reques...
repos\spring-boot-4.0.1\module\spring-boot-webmvc\src\main\java\org\springframework\boot\webmvc\autoconfigure\actuate\web\WebMvcEndpointChildContextConfiguration.java
2
请完成以下Java代码
public void setSalesRep_ID (final int SalesRep_ID) { if (SalesRep_ID < 1) set_Value (COLUMNNAME_SalesRep_ID, null); else set_Value (COLUMNNAME_SalesRep_ID, SalesRep_ID); } @Override public int getSalesRep_ID() { return get_ValueAsInt(COLUMNNAME_SalesRep_ID); } @Override public void setSendEMail...
@Override public void setVolume (final @Nullable BigDecimal Volume) { set_Value (COLUMNNAME_Volume, Volume); } @Override public BigDecimal getVolume() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Volume); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setWeight (final @N...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_InOut.java
1
请完成以下Java代码
public int getTotalMethodCount() { return totalMethodCount; } /** * @return the publicMethodCount */ public int getPublicMethodCount() { return publicMethodCount; } /** * @return the protectedMethodCount */ pub...
/** * @return the privateMethodCount */ public int getPrivateMethodCount() { return privateMethodCount; } /** * @return the privateMethodCount */ public int getPackagePrivateMethodCount() { return packagePrivateMethodCount; ...
repos\tutorials-master\libraries-transform\src\main\java\com\baeldung\spoon\ClassReporter.java
1
请完成以下Java代码
private static MailboxRouting fromRecord(final I_AD_MailConfig record) { return MailboxRouting.builder() .mailboxId(MailboxId.ofRepoId(record.getAD_MailBox_ID())) .userToColumnName(StringUtils.trimBlankToNull(record.getColumnUserTo())) .clientId(ClientId.ofRepoId(record.getAD_Client_ID())) .orgId(Org...
} public Mailbox getById(final MailboxId mailboxId) { return getEntryById(mailboxId).getMailbox(); } private MailboxEntry getEntryById(final MailboxId mailboxId) { final MailboxEntry entry = byId.get(mailboxId); if (entry == null) { throw new AdempiereException("No mailbox found for " + mail...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\email\mailboxes\MailboxRepository.java
1
请在Spring Boot框架中完成以下Java代码
private void buildAndAttachContext(@NonNull final Exchange exchange) { final JsonProduct jsonProduct = exchange.getIn().getBody(JsonProduct.class); final PushRawMaterialsRouteContext routeContext = PushRawMaterialsRouteContext.builder() .jsonProduct(jsonProduct) .build(); exchange.setProperty(ROUTE_PRO...
final JsonBPartnerProductAdditionalInfo additionalInfo = bPartnerProduct.getAttachmentAdditionalInfos(); if (additionalInfo == null || Check.isEmpty(additionalInfo.getAttachments())) { exchange.getIn().setBody(ImmutableList.of()); return; } final JsonMetasfreshId bpartnerId = Optional.ofNullable(bPartne...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\from_grs\product\PushRawMaterialsRouteBuilder.java
2
请在Spring Boot框架中完成以下Java代码
public class ProductPrice { @NonNull ProductId productId; @NonNull UomId uomId; @NonNull @Getter(AccessLevel.NONE) Money money; public Money toMoney() { return money; } public BigDecimal toBigDecimal() { return money.toBigDecimal(); } public CurrencyId getCurrencyId() { return money.getCurrenc...
public ProductPrice withValueAndUomId(@NonNull final BigDecimal moneyAmount, @NonNull final UomId uomId) { return toBuilder() .money(Money.of(moneyAmount, getCurrencyId())) .uomId(uomId) .build(); } public ProductPrice negate() { return this.toBuilder().money(money.negate()).build(); } public bo...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\ProductPrice.java
2
请完成以下Java代码
public Object getParameterDefaultValue(@NonNull final IProcessDefaultParameter parameter) { if (PARAM_SINCE.equals(parameter.getColumnName())) { return retrieveSinceValue(); } return IProcessDefaultParametersProvider.DEFAULT_VALUE_NOTAVAILABLE; } /** * Needed so we also have a "since" when the process ...
parameters.putAll(childSpecificParams); } runtimeParametersRepository.getByConfigIdAndRequest(externalSystemParentConfig.getId(), externalRequest) .forEach(runtimeParameter -> parameters.put(runtimeParameter.getName(), runtimeParameter.getValue())); return parameters; } protected String getOrgCode(@NonNu...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\InvokeExternalSystemProcess.java
1
请完成以下Java代码
final class CompositeFlatrateTermEventListener implements IFlatrateTermEventListener { public static final IFlatrateTermEventListener compose(final IFlatrateTermEventListener handler, final IFlatrateTermEventListener handlerToAdd) { if (handler == null) { return handlerToAdd; } if (handlerToAdd == null) ...
handlers.addIfAbsent(handler); } @Override public void beforeFlatrateTermReactivate(final I_C_Flatrate_Term term) { handlers.forEach(h -> h.beforeFlatrateTermReactivate(term)); } @Override public void afterSaveOfNextTermForPredecessor(I_C_Flatrate_Term next, I_C_Flatrate_Term predecessor) { handlers.forEa...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\impl\CompositeFlatrateTermEventListener.java
1
请完成以下Java代码
protected EvaluationContext createEvaluationContext(InstanceEvent event, Instance instance) { Map<String, Object> root = new HashMap<>(); root.put("event", event); root.put("instance", instance); root.put("lastStatus", getLastStatus(event.getInstance())); return SimpleEvaluationContext .forPropertyAccessor...
public void setStatusActivitySubtitle(String statusActivitySubtitle) { this.statusActivitySubtitle = parser.parseExpression(statusActivitySubtitle, ParserContext.TEMPLATE_EXPRESSION); } @Data @Builder public static class Message { private final String summary; private final String themeColor; private fi...
repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\MicrosoftTeamsNotifier.java
1
请完成以下Java代码
public int getAD_Org_ID() { return AD_Org_ID; } @Override public int getC_BPartner_ID() { return C_BPartner_ID; } @Override public int getC_BPartner_Location_ID() { return C_BPatner_Location_ID; } @Override public int getContact_ID() { return Contact_ID; } @Override public int getC_Currency_...
} @Override public int getDaysDue() { return daysDue; } @Override public String getTableName() { return tableName; } @Override public int getRecordId() { return record_id; } @Override public boolean isInDispute() { return inDispute; } @Override public String toString() { return "Dunnab...
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\DunnableDoc.java
1
请完成以下Java代码
protected Package definePackage(String name, Manifest man, URL url) throws IllegalArgumentException { return (!this.exploded) ? super.definePackage(name, man, url) : definePackageForExploded(name, man, url); } private Package definePackageForExploded(String name, Manifest man, URL url) { synchronized (this.defin...
this.definePackageCallType = existingType; } } private Manifest getManifest(Archive archive) { try { return (archive != null) ? archive.getManifest() : null; } catch (IOException ex) { return null; } } /** * The different types of call made to define a package. We track these for exploded * ja...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\launch\LaunchedClassLoader.java
1
请在Spring Boot框架中完成以下Java代码
private void processCreateRequest(@NonNull final Exchange exchange) { final Object request = exchange.getIn().getBody(); if (!(request instanceof ExternalStatusCreateCamelRequest)) { throw new RuntimeCamelException("The route " + ExternalSystemCamelConstants.MF_CREATE_EXTERNAL_SYSTEM_STATUS_V2_CAMEL_URI ...
private void processRetrieveRequest(@NonNull final Exchange exchange) { final Object request = exchange.getIn().getBody(); if (!(request instanceof RetreiveServiceStatusCamelRequest)) { throw new RuntimeCamelException("The route " + ExternalSystemCamelConstants.MF_GET_SERVICE_STATUS_V2_CAMEL_URI + " requires ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\core\src\main\java\de\metas\camel\externalsystems\core\to_mf\v2\ExternalStatusRouteBuilder.java
2
请完成以下Java代码
public class MethodReference { public static final MethodReference of(@NonNull final Method method) { return new MethodReference(method); } private final AtomicReference<WeakReference<Method>> methodRef; private final ClassReference<?> classRef; private final String methodName; private ImmutableList<ClassRef...
{ final Class<?> clazz = classRef.getReferencedClass(); final Class<?>[] parameterTypes = parameterTypeRefs.stream() .map(parameterTypeRef -> parameterTypeRef.getReferencedClass()) .toArray(size -> new Class<?>[size]); final Method methodNew = clazz.getDeclaredMethod(methodName, parameterTypes); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\reflect\MethodReference.java
1
请完成以下Java代码
private static void configureModel(String userName, Model model) { model.setModelVersion("4.0.0"); model.setArtifactId("com." + userName.toLowerCase()); model.setGroupId("learning-project"); model.setVersion("0.0.1-SNAPSHOT"); } private static String generateMainClass(String pac...
Xpp3Dom configuration = new Xpp3Dom("configuration"); Xpp3Dom source = new Xpp3Dom("source"); source.setValue(javaVersion.getVersion()); Xpp3Dom target = new Xpp3Dom("target"); target.setValue(javaVersion.getVersion()); configuration.addChild(source); configuration.addChi...
repos\tutorials-master\maven-modules\maven-exec-plugin\src\main\java\com\baeldung\learningplatform\ProjectBuilder.java
1
请完成以下Java代码
public void invalidPropertyValue(Exception e) { logError("015", "Exception while reading configuration property: {}", e.getMessage()); } /** * Method for logging message when model TTL longer than global TTL. * * @param definitionKey the correlated definition key with which history TTL is related to. ...
return new ProcessEngineException(exceptionMessage("019", "The transaction isolation level set for the database is '{}' which differs from the recommended value. " + "Please change the isolation level to 'READ_COMMITTED' or set property 'skipIsolationLevelCheck' to true. " + "Please keep...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\ConfigurationLogger.java
1
请完成以下Java代码
public void setId(Long id) { this.id = id; } 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 = passWord; } public Use...
public void setNickName(String nickName) { this.nickName = nickName; } @Override public String toString() { return "UserEntity{" + "id=" + id + ", userName='" + userName + '\'' + ", passWord='" + passWord + '\'' + ", userSex=" + userSex + ", nickName='" + nickName + '\'' + '}'; } }
repos\spring-boot-leaning-master\2.x_42_courses\第 3-2 课: 如何优雅的使用 MyBatis XML 配置版\spring-boot-mybatis-xml\src\main\java\com\neo\model\User.java
1
请完成以下Java代码
public void setBPartnerAddress(String address) { delegate.setBPartnerAddress_Override(address); } @Override public void setRenderedAddressAndCapturedLocation(final @NonNull RenderedAddressAndCapturedLocation from) { IDocumentLocationAdapter.super.setRenderedAddressAndCapturedLocation(from); } @Override pu...
} @Override public Optional<DocumentLocation> toPlainDocumentLocation(final IDocumentLocationBL documentLocationBL) { return documentLocationBL.toPlainDocumentLocation(this); } @Override public OverrideLocationAdapter toOldValues() { InterfaceWrapperHelper.assertNotOldValues(delegate); return new Overrid...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\location\adapter\OverrideLocationAdapter.java
1
请完成以下Java代码
public class ScriptCalculatedFieldState extends BaseCalculatedFieldState { protected CalculatedFieldScriptEngine tbelExpression; public ScriptCalculatedFieldState(EntityId entityId) { super(entityId); } @Override public void setCtx(CalculatedFieldCtx ctx, TbActorRef actorCtx) { su...
result -> TelemetryCalculatedFieldResult.builder() .outputStrategy(output.getStrategy()) .type(output.getType()) .scope(output.getScope()) .result(JacksonUtil.valueToTree(result)) .build(), ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\cf\ctx\state\ScriptCalculatedFieldState.java
1
请在Spring Boot框架中完成以下Java代码
public class DummyDiscoveryService implements DiscoveryService { private final TbServiceInfoProvider serviceInfoProvider; private final PartitionService partitionService; public DummyDiscoveryService(TbServiceInfoProvider serviceInfoProvider, PartitionService partitionService) { this.serviceInfoP...
} @Override public boolean isMonolith() { return true; } @Override public void setReady(boolean ready) { boolean changed = serviceInfoProvider.setReady(ready); if (changed) { serviceInfoProvider.generateNewServiceInfoWithCurrentSystemInfo(); } } }
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\discovery\DummyDiscoveryService.java
2
请完成以下Java代码
public void setMandatory(boolean flag) { m_mandatory = flag; } /** * Is lookup model mandatory * @return boolean */ public boolean isMandatory() { return m_mandatory; } /** * Is this lookup model populated * @return boolean */ public boolean isLoaded() { return m_loaded; } /** * Return...
/** * Suggests a valid value for given value * * @param value * @return equivalent valid value or same this value is valid; if there are no suggestions, null will be returned */ public NamePair suggestValidValue(final NamePair value) { return null; } /** * Returns true if given <code>display</code> v...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\Lookup.java
1
请完成以下Java代码
public void run(String... strings) throws Exception { photoService.launchPhotoProcess("one", "two", "three"); } }; } public static void main(String[] args) { SpringApplication.run(Application.class, args); } } @Service @Transactional class PhotoService { p...
taskService.complete(reviewTask.getId(), Collections.singletonMap("approved", (Object) true)); long count = runtimeService.createProcessInstanceQuery().count(); System.out.println("Proc count " + count); } } interface PhotoRepository extends JpaRepository<Photo, Long> { } @Entity class Photo { ...
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-samples\flowable-spring-boot-sample-jpa\src\main\java\flowable\Application.java
1
请完成以下Java代码
public UserOperationLogContextEntryBuilder propertyChanges(List<PropertyChange> propertyChanges) { entry.setPropertyChanges(propertyChanges); return this; } public UserOperationLogContextEntryBuilder propertyChanges(PropertyChange propertyChange) { List<PropertyChange> propertyChanges = new ArrayList<P...
return this; } public UserOperationLogContextEntryBuilder taskId(String taskId) { entry.setTaskId(taskId); return this; } public UserOperationLogContextEntryBuilder caseInstanceId(String caseInstanceId) { entry.setCaseInstanceId(caseInstanceId); return this; } public UserOperationLogConte...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\oplog\UserOperationLogContextEntryBuilder.java
1
请在Spring Boot框架中完成以下Java代码
public class ProcessVariableHeaderMapper implements HeaderMapper<Map<String, Object>> { private final Set<String> keysToPreserve = new ConcurrentSkipListSet<>(); public ProcessVariableHeaderMapper(Set<String> sync) { this.keysToPreserve.addAll(sync); } @Override public void fromHeaders(Me...
source, new HashMap<>()); return matches; } private static Map<String, Object> sync( Set<String> keys, Map<String, Object> in, Map<String, Object> out) { for (String k : keys) if (in.containsKey(k)) out.put(k, in.ge...
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\integration\ProcessVariableHeaderMapper.java
2
请完成以下Java代码
private static class DefaultCacheKey { private final Method method; private final @Nullable Class<?> targetClass; DefaultCacheKey(Method method, @Nullable Class<?> targetClass) { this.method = method; this.targetClass = targetClass; } @Override public boolean equals(Object other) { DefaultCache...
@Override public int hashCode() { return this.method.hashCode() * 21 + ((this.targetClass != null) ? this.targetClass.hashCode() : 0); } @Override public String toString() { String targetClassName = (this.targetClass != null) ? this.targetClass.getName() : "-"; return "CacheKey[" + targetClassName + "...
repos\spring-security-main\access\src\main\java\org\springframework\security\access\method\DelegatingMethodSecurityMetadataSource.java
1
请完成以下Java代码
public long getMaxWait() { return maxWait; } public void setMaxWait(long maxWait) { this.maxWait = maxWait; } public long getMaxBackoff() { return maxBackoff; } public void setMaxBackoff(long maxBackoff) { this.maxBackoff = maxBackoff; } public int getBackoffDecreaseThreshold() { ...
if (jobAcquisitionThread == null) { jobAcquisitionThread = new Thread(acquireJobsRunnable, getName()); jobAcquisitionThread.start(); } } protected void stopJobAcquisitionThread() { try { jobAcquisitionThread.join(); } catch (InterruptedException e) { LOG.interruptedWhileShuttingDownjobExecutor(e...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\JobExecutor.java
1
请完成以下Java代码
public void setQtyReserved (BigDecimal QtyReserved) { set_Value (COLUMNNAME_QtyReserved, QtyReserved); } /** Get Reservierte Menge. @return Reservierte Menge */ public BigDecimal getQtyReserved () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReserved); if (bd == null) return Env.ZERO; r...
public void setRef_OrderLine_ID (int Ref_OrderLine_ID) { if (Ref_OrderLine_ID < 1) set_Value (COLUMNNAME_Ref_OrderLine_ID, null); else set_Value (COLUMNNAME_Ref_OrderLine_ID, Integer.valueOf(Ref_OrderLine_ID)); } /** Get Referenced Order Line. @return Reference to corresponding Sales/Purchase Order ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_RV_C_OrderLine_Overview.java
1
请在Spring Boot框架中完成以下Java代码
private String getDescription(ConnectionFactoryBeanCreationException cause) { StringBuilder description = new StringBuilder(); description.append("Failed to configure a ConnectionFactory: "); if (!StringUtils.hasText(cause.getUrl())) { description.append("'url' attribute is not specified and "); } descript...
} private String getActiveProfiles() { StringBuilder message = new StringBuilder(); String[] profiles = this.environment.getActiveProfiles(); if (ObjectUtils.isEmpty(profiles)) { message.append(" (no profiles are currently active)."); } else { message.append(" (the profiles "); message.append(Strin...
repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\autoconfigure\ConnectionFactoryBeanCreationFailureAnalyzer.java
2
请完成以下Java代码
public abstract class BaseEntityViewProcessor extends BaseEdgeProcessor { @Autowired private DataValidator<EntityView> entityViewValidator; protected Pair<Boolean, Boolean> saveOrUpdateEntityView(TenantId tenantId, EntityViewId entityViewId, EntityViewUpdateMsg entityViewUpdateMsg) { boolean creat...
} return Pair.of(created, entityViewNameUpdated); } private boolean updateEntityViewNameIfDuplicateExists(TenantId tenantId, EntityViewId entityViewId, EntityView entityView) { EntityView entityViewByName = edgeCtx.getEntityViewService().findEntityViewByTenantIdAndName(tenantId, entityView.getN...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\edge\rpc\processor\entityview\BaseEntityViewProcessor.java
1
请完成以下Java代码
protected Iterator<I_M_HU> retrieveHUs() { final IHUQueryBuilder huQueryBuilder = handlingUnitsDAO.createHUQueryBuilder() .setContext(getCtx(), ITrx.TRXNAME_None); // Only top level HUs huQueryBuilder.setOnlyTopLevelHUs(); // Only Active HUs huQueryBuilder.addHUStatusToInclude(X_M_HU.HUSTATUS_Active); ...
} // Only for given SQL where clause if (!Check.isEmpty(p_huWhereClause, true)) { huQueryBuilder.addFilter(TypedSqlQueryFilter.of(p_huWhereClause)); } // Fetch the HUs iterator return huQueryBuilder .createQuery() .setOption(IQuery.OPTION_GuaranteedIteratorRequired, true) // because we might ch...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_HU_MoveToDirectWarehouse_Mass.java
1
请完成以下Java代码
public int getC_Calendar_ID() { if (m_C_Calendar_ID == 0) { MYear year = (MYear) getC_Year(); if (year != null) { m_C_Calendar_ID = year.getC_Calendar_ID(); } else { log.error("@NotFound@ C_Year_ID=" + getC_Year_ID()); } } return m_C_Calendar_ID; } // getC_Calendar_ID /** *...
{ OrgInfo info = Services.get(IOrgDAO.class).getOrgInfoById(orgId); C_Calendar_ID = CalendarId.toRepoId(info.getCalendarId()); } if (C_Calendar_ID <= 0) { I_AD_ClientInfo cInfo = Services.get(IClientDAO.class).retrieveClientInfo(ctx); C_Calendar_I...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MPeriod.java
1
请完成以下Java代码
public void setQtyToPick (final BigDecimal QtyToPick) { set_ValueNoCheck (COLUMNNAME_QtyToPick, QtyToPick); } @Override public BigDecimal getQtyToPick() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyToPick); return bd != null ? bd : BigDecimal.ZERO; } /** * RejectReason AD_Reference_ID=...
* Reference name: DD_OrderLine_Schedule_Status */ public static final int STATUS_AD_Reference_ID=541435; /** NotStarted = NS */ public static final String STATUS_NotStarted = "NS"; /** InProgress = IP */ public static final String STATUS_InProgress = "IP"; /** Completed = CO */ public static final String STATU...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_DD_Order_MoveSchedule.java
1
请完成以下Java代码
public class Application { private static final Logger LOG = LoggerFactory.getLogger(Application.class); public static void main(String[] args) { new Application().run(); } public void run() { CassandraConnector connector = new CassandraConnector(); connector.connect("127.0.0....
VideoRepository videoRepository = new VideoRepository(session); ProductRepository productRepository = new ProductRepository(session); videoRepository.createTable(); productRepository.createProductTableByName("testKeyspace"); videoRepository.insertVideo(new Video("Video Title 1", Instan...
repos\tutorials-master\persistence-modules\java-cassandra\src\main\java\com\baeldung\datastax\cassandra\Application.java
1