instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public SimpleRabbitListenerContainerFactory defaultContainerFactory(ConnectionFactory connectionFactory) { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); factory.setConnectionFactory(connectionFactory); return factory; } @Bean public Simp...
throw new Exception("exception occured!"); } @RabbitListener(queues = "non-blocking-queue", containerFactory = "retryQueuesContainerFactory", ackMode = "MANUAL") public void consumeNonBlocking(String payload) throws Exception { logger.info("Processing message from non-blocking-queue: {}", payload);...
repos\tutorials-master\messaging-modules\spring-amqp\src\main\java\com\baeldung\springamqp\exponentialbackoff\RabbitConfiguration.java
2
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(@NonNull final IProcessPreconditionsContext context) { if (context.isNoSelection()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } final boolean someSchedsAreStillNotProcessed = receiptScheduleBL.hasUnProcessedRecords...
{ final int selectionCount = receiptScheduleDAO .createQueryForReceiptScheduleSelection(getCtx(), getProcessInfo().getQueryFilterOrElseFalse()) .create() .createSelection(getPinstanceId()); if (selectionCount <= 0) { throw new AdempiereException(MSG_NO_UNPROCESSED_LINES) .markAsUserValidation...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\process\M_ReceiptSchedule_ChangeDatePromised_OverrideAndPOReference.java
1
请完成以下Java代码
public class NotificationDTO { private Date date; private String format; private String productName; public NotificationDTO(Date date, String format, String productName) { this.date = date; this.format = format; this.productName = productName; } public Date getDate() { ...
public String getFormat() { return format; } public void setFormat(String format) { this.format = format; } public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } }
repos\tutorials-master\spring-boot-modules\spring-boot-libraries\src\main\java\com\baeldung\modulith\notification\NotificationDTO.java
1
请完成以下Java代码
private Timestamp getMovementDate(@NonNull final I_M_ReceiptSchedule receiptSchedule, @NonNull final Properties context) { return movementDateRule.map(new ReceiptMovementDateRule.CaseMapper<Timestamp>() { @Override public Timestamp orderDatePromised() {return getPromisedDate(receiptSchedule, context);} @...
@Override public Timestamp orderDatePromised() {return getPromisedDate(receiptSchedule, context);} @Override public Timestamp externalDateIfAvailable() {return getExternalDateAcct(receiptSchedule, context);} // Use Login Date as movement date because some roles will rely on the fact that they can override...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\InOutProducer.java
1
请在Spring Boot框架中完成以下Java代码
public class WidgetTypeImportService extends BaseEntityImportService<WidgetTypeId, WidgetTypeDetails, WidgetTypeExportData> { private final WidgetTypeService widgetTypeService; @Override protected void setOwner(TenantId tenantId, WidgetTypeDetails widgetsBundle, IdProvider idProvider) { widgetsBun...
} @Override protected CompareResult compare(EntitiesImportCtx ctx, WidgetTypeExportData exportData, WidgetTypeDetails prepared, WidgetTypeDetails existing) { return new CompareResult(true); } @Override protected WidgetTypeDetails deepCopy(WidgetTypeDetails widgetsBundle) { return n...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\sync\ie\importing\impl\WidgetTypeImportService.java
2
请完成以下Spring Boot application配置
server: port: 9000 spring: application: name: Server-Consumer eureka: client: serviceUrl: defaultZone: http://mrbird:123456@peer1:8080/eureka/,http://mrbird:123456@peer2:8081/eureka/ feign: hystrix: enabled: true
logging: level: com: example: demo: service: UserService: debug
repos\SpringAll-master\33.Spring-Cloud-Feign-Declarative-REST-Client\Feign-Consumer\src\main\resources\application.yml
2
请完成以下Java代码
public Course getCourse() { return course; } public void setCourse(Course course) { this.course = course; } @Override public Student clone() { Student student; try { student = (Student) super.clone(); } catch (CloneNotSupportedException e) { ...
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Student that = (Student) o; return Objects.equals(studentId,that.studentId) && Objects.equals(studentName, that.studentName) && ...
repos\tutorials-master\core-java-modules\core-java-lang-oop-patterns-2\src\main\java\com\baeldung\deepcopyarraylist\Student.java
1
请在Spring Boot框架中完成以下Java代码
public class BrandQueryReq extends QueryReq { /** 主键 */ private String id; /** 产品品牌名称 */ private String brand; /** 品牌所属企业 */ private String companyEntityId; public String getId() { return id; } public void setId(String id) { this.id = id; }
public String getBrand() { return brand; } public void setBrand(String brand) { this.brand = brand; } public String getCompanyEntityId() { return companyEntityId; } public void setCompanyEntityId(String companyEntityId) { this.companyEntityId = companyEntityId;...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\product\BrandQueryReq.java
2
请在Spring Boot框架中完成以下Java代码
public void deleteEventSubscription(EventSubscriptionEntity eventSubscription) { getEventSubscriptionEntityManager().delete(eventSubscription); } @Override public void deleteEventSubscriptionsByExecutionId(String executionId) { getEventSubscriptionEntityManager().deleteEventSubscriptionsByE...
@Override public void deleteEventSubscriptionsForProcessDefinitionAndProcessStartEvent(String processDefinitionId, String eventType, String activityId, String configuration) { getEventSubscriptionEntityManager().deleteEventSubscriptionsForProcessDefinitionAndProcessStartEvent(processDefinitionId, eventType,...
repos\flowable-engine-main\modules\flowable-eventsubscription-service\src\main\java\org\flowable\eventsubscription\service\impl\EventSubscriptionServiceImpl.java
2
请完成以下Java代码
public class BankTransactionCodeStructure4 { @XmlElement(name = "Domn") protected BankTransactionCodeStructure5 domn; @XmlElement(name = "Prtry") protected ProprietaryBankTransactionCodeStructure1 prtry; /** * Gets the value of the domn property. * * @return * possible obj...
* Gets the value of the prtry property. * * @return * possible object is * {@link ProprietaryBankTransactionCodeStructure1 } * */ public ProprietaryBankTransactionCodeStructure1 getPrtry() { return prtry; } /** * Sets the value of the prtry property....
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\BankTransactionCodeStructure4.java
1
请完成以下Java代码
public CreditDebitCode getCdtDbtInd() { return cdtDbtInd; } /** * Sets the value of the cdtDbtInd property. * * @param value * allowed object is * {@link CreditDebitCode } * */ public void setCdtDbtInd(CreditDebitCode value) { this.cdtDbtInd ...
/** * Gets the value of the addtlInf property. * * @return * possible object is * {@link String } * */ public String getAddtlInf() { return addtlInf; } /** * Sets the value of the addtlInf property. * * @param value * allowed...
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\DocumentAdjustment1.java
1
请完成以下Java代码
public Builder authenticationMethods(List<String> authenticationMethods) { return claim(IdTokenClaimNames.AMR, authenticationMethods); } /** * Use this authorization code hash in the resulting {@link OidcIdToken} * @param authorizationCodeHash The authorization code hash to use * @return the {@link Bui...
* @return the {@link Builder} for further configurations */ public Builder nonce(String nonce) { return this.claim(IdTokenClaimNames.NONCE, nonce); } /** * Use this subject in the resulting {@link OidcIdToken} * @param subject The subject to use * @return the {@link Builder} for further configurat...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\OidcIdToken.java
1
请在Spring Boot框架中完成以下Java代码
public void add(EntityId profileId, EntityId entityId) { lock.writeLock().lock(); try { if (EntityType.DEVICE.equals(profileId.getEntityType()) || EntityType.ASSET.equals(profileId.getEntityType())) { throw new RuntimeException("Entity type '" + profileId.getEntityType() + "'...
try { var entities = allEntities.getOrDefault(profileId, Collections.emptySet()); List<EntityId> result = new ArrayList<>(entities.size()); result.addAll(entities); return result; } finally { lock.readLock().unlock(); } } private void ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\cf\cache\TenantEntityProfileCache.java
2
请在Spring Boot框架中完成以下Java代码
public String getTimestampFieldName() { return this.timestampFieldName; } public void setTimestampFieldName(String timestampFieldName) { this.timestampFieldName = timestampFieldName; } public boolean isAutoCreateIndex() { return this.autoCreateIndex; } public void setAutoCreateIndex(boolean autoCreateInd...
public @Nullable String getApiKeyCredentials() { return this.apiKeyCredentials; } public void setApiKeyCredentials(@Nullable String apiKeyCredentials) { this.apiKeyCredentials = apiKeyCredentials; } public boolean isEnableSource() { return this.enableSource; } public void setEnableSource(boolean enableSo...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\elastic\ElasticProperties.java
2
请完成以下Java代码
public static void main(String[] args) { try { getMQMsg(); } catch (Exception e) { e.printStackTrace(); } } public static void getMQMsg() throws JMSException { ConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://x....
try { ActiveMQTextMessage msg = (ActiveMQTextMessage)msgs.nextElement(); JSONObject jsonObject = JSON.parseObject(msg.getText()); temp.add(jsonObject.getString("ResumeId")); } catch (Exception e) { e.printStackTrace(); } } ...
repos\spring-boot-quick-master\quick-activemq\src\main\java\com\mq\utils\ExtractMsgUtil.java
1
请完成以下Java代码
public void setProduct_BaseFolderName (final String Product_BaseFolderName) { set_Value (COLUMNNAME_Product_BaseFolderName, Product_BaseFolderName); } @Override public String getProduct_BaseFolderName() { return get_ValueAsString(COLUMNNAME_Product_BaseFolderName); } @Override public void setTCP_Host (fi...
public String getTCP_Host() { return get_ValueAsString(COLUMNNAME_TCP_Host); } @Override public void setTCP_PortNumber (final int TCP_PortNumber) { set_Value (COLUMNNAME_TCP_PortNumber, TCP_PortNumber); } @Override public int getTCP_PortNumber() { return get_ValueAsInt(COLUMNNAME_TCP_PortNumber); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_LeichMehl.java
1
请完成以下Java代码
public class DefaultAdminRuntimeDelegate extends AbstractAppRuntimeDelegate<AdminPlugin> implements AdminRuntimeDelegate { private static final List<String> MAPPING_FILES = List.of( "org/camunda/bpm/admin/plugin/base/queries/metrics.xml" ); protected final Map<String, CommandExecutor> commandExecutors; ...
/** * Create command executor for the engine with the given name * * @param processEngineName the process engine name * @return the command executor */ protected CommandExecutor createCommandExecutor(String processEngineName) { ProcessEngine processEngine = getProcessEngine(processEngineName); ...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\admin\impl\DefaultAdminRuntimeDelegate.java
1
请完成以下Java代码
public class MergeArraysAndRemoveDuplicate { public static int[] removeDuplicateOnSortedArray(int[] arr) { // Initialize a new array to store unique elements int[] uniqueArray = new int[arr.length]; uniqueArray[0] = arr[0]; int uniqueCount = 1; // Iterate through the sorted...
int[] mergedArrays = new int[arr1.length + arr2.length]; System.arraycopy(arr1, 0, mergedArrays, 0, arr1.length); System.arraycopy(arr2, 0, mergedArrays, arr1.length, arr2.length); return mergedArrays; } private static int[] removeDuplicate(int[] arr) { int[] withoutDuplicates =...
repos\tutorials-master\core-java-modules\core-java-arrays-guides\src\main\java\com\baeldung\mergeandremoveduplicate\MergeArraysAndRemoveDuplicate.java
1
请完成以下Java代码
private static final class WarUrlStreamHandlerFactory implements URLStreamHandlerFactory { @Override public @Nullable URLStreamHandler createURLStreamHandler(String protocol) { if ("war".equals(protocol)) { return new WarUrlStreamHandler(); } return null; } } /** * {@link URLStreamHandler} for...
private final URLConnection connection; protected WarURLConnection(URL url) throws IOException { super(url); this.connection = new URL(url.getFile()).openConnection(); } @Override public void connect() throws IOException { if (!this.connected) { this.connection.connect(); this.connected = tru...
repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\servlet\JasperInitializer.java
1
请完成以下Java代码
private ISideActionsGroupModel getCreateSideActionsGroupFor(final IFacetCategory facetCategory) { final String displayName = facetCategory.getDisplayName(); final boolean defaultCollapsed = facetCategory.isCollapsed(); final String groupId = getClass().getName() + "." + displayName; final ISideActionsGroupsLis...
public Set<IFacet<ModelType>> getActiveFacets() { final Set<IFacet<ModelType>> activeFacets = new HashSet<>(); for (final FacetSideAction<ModelType> action : ownActions.values()) { // Skip actions which are not active (i.e. checkbox set by user) if (!action.isToggled()) { continue; } final IF...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\facet\sideactions\impl\SideActionFacetsPool.java
1
请在Spring Boot框架中完成以下Java代码
public class RateLimitsTriggerProcessor implements NotificationRuleTriggerProcessor<RateLimitsTrigger, RateLimitsNotificationRuleTriggerConfig> { private final TenantService tenantService; private final EntityService entityService; @Override public boolean matchesFilter(RateLimitsTrigger trigger, Rate...
limitLevelEntityName = Optional.ofNullable(trigger.getLimitLevelEntityName()) .orElseGet(() -> entityService.fetchEntityName(trigger.getTenantId(), limitLevel).orElse(null)); } return RateLimitsNotificationInfo.builder() .tenantId(trigger.getTenantId()) ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\notification\rule\trigger\RateLimitsTriggerProcessor.java
2
请完成以下Java代码
private static final PlainContextAware createPlainContextAware(final Object model) { final IContextAware contextAware = InterfaceWrapperHelper.getContextAware(model); final PlainContextAware contextAwarePlainCopy = PlainContextAware.newCopy(contextAware); return contextAwarePlainCopy; } /** * Load items fro...
{ return; } final PT parentModel = getParentModel(); final IContextAware ctx = createPlainContextAware(parentModel); final boolean instancesTrackerEnabled = POJOLookupMapInstancesTracker.ENABLED; POJOLookupMapInstancesTracker.ENABLED = false; try { // // Retrieve fresh items final List<T> it...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\cache\AbstractModelListCacheLocal.java
1
请完成以下Java代码
public String getAD_Message() { return adMessage; } public KeyStroke getKeyStroke() { return keyStroke; } } /** * Execute cut/copy/paste action of given type. * * @param actionType */ void executeCopyPasteAction(final CopyPasteActionType actionType); /** * Gets the copy/paste {@link Act...
* * @param actionType * @return action or <code>null</code> */ Action getCopyPasteAction(final CopyPasteActionType actionType); /** * Associate given action with given action type. * * @param actionType * @param action * @param keyStroke optional key stroke to be binded to given action. */ void pu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ui\editor\ICopyPasteSupportEditor.java
1
请完成以下Java代码
public CaseSentryPartQueryImpl orderByCaseInstanceId() { orderBy(CaseSentryPartQueryProperty.CASE_INSTANCE_ID); return this; } public CaseSentryPartQueryImpl orderByCaseExecutionId() { orderBy(CaseSentryPartQueryProperty.CASE_EXECUTION_ID); return this; } public CaseSentryPartQueryImpl orderBy...
return caseInstanceId; } public String getCaseExecutionId() { return caseExecutionId; } public String getSentryId() { return sentryId; } public String getType() { return type; } public String getSourceCaseExecutionId() { return sourceCaseExecutionId; } public String getStandardE...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\runtime\CaseSentryPartQueryImpl.java
1
请完成以下Java代码
public CountResultDto getHistoricTaskInstancesCount(UriInfo uriInfo) { HistoricTaskInstanceQueryDto queryDto = new HistoricTaskInstanceQueryDto(objectMapper, uriInfo.getQueryParameters()); return queryHistoricTaskInstancesCount(queryDto); } @Override public CountResultDto queryHistoricTaskInstancesCount(...
for( HistoricTaskInstanceReportResult result : results ) { dtoList.add(HistoricTaskInstanceReportResultDto.fromHistoricTaskInstanceReportResult(result)); } return dtoList; } protected List<ReportResultDto> generateDurationDto(List<? extends ReportResult> results) { List<ReportResultDto> dtoList ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\history\HistoricTaskInstanceRestServiceImpl.java
1
请完成以下Java代码
public String toString() { return "Graph{" + "vertexes=" + Arrays.toString(vertexes) + ", edgesTo=" + Arrays.toString(edgesTo) + '}'; } public String printByTo() { StringBuffer sb = new StringBuffer(); sb.append("========按终点打印=====...
* @return */ public static String parseResult(List<Vertex> path) { if (path.size() < 2) { throw new RuntimeException("路径节点数小于2:" + path); } StringBuffer sb = new StringBuffer(); for (int i = 1; i < path.size() - 1; ++i) { Vertex v = p...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\common\Graph.java
1
请完成以下Java代码
public static void setCurrentTime(Date currentTime) { DateTimeUtils.setCurrentMillisFixed(currentTime.getTime()); } public static void reset() { resetClock(); } public static Date getCurrentTime() { return now(); } public static Date now() { return new Date(DateTimeUtils.currentTimeMillis...
* * @param offsetInMillis * the offset to move the clock by * @return the new 'now' */ public static Date offset(Long offsetInMillis) { DateTimeUtils.setCurrentMillisOffset(offsetInMillis); return new Date(DateTimeUtils.currentTimeMillis()); } public static Date resetClock() { Da...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\ClockUtil.java
1
请完成以下Java代码
public class PackageItem { private int productId; private float weight; private float estimatedValue; public PackageItem(int productId, float weight, float estimatedValue) { this.productId = productId; this.weight = weight; this.estimatedValue = estimatedValue; } public...
public float getWeight() { return weight; } public void setWeight(float weight) { this.weight = weight; } public float getEstimatedValue() { return estimatedValue; } public void setEstimatedValue(float estimatedValue) { this.estimatedValue = estimatedValue; ...
repos\tutorials-master\patterns-modules\ddd-contexts\ddd-contexts-shippingcontext\src\main\java\com\baeldung\dddcontexts\shippingcontext\model\PackageItem.java
1
请完成以下Java代码
public Mono<UserView> signup(UserRegistrationRequest request) { return credentialsService.signup(request); } public Mono<UserView> login(UserAuthenticationRequest request) { return credentialsService.login(request); } public Mono<UserView> updateUser(UpdateUserRequest request, UserSess...
return userRepository.findByUsernameOrFail(username) .flatMap(userToFollow -> { follower.follow(userToFollow); return userRepository.save(follower).thenReturn(userToFollow); }) .map(ProfileView::toFollowedProfileView); } pu...
repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\user\UserFacade.java
1
请完成以下Java代码
public int getAD_OrgTrx_ID() { Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID); if (ii == null) return 0; return ii.intValue(); } @Override protected final GenericPO newInstance() { return new GenericPO(tableName, getCtx(), ID_NewInstanceNoInit); } @Override public final PO copy() { fin...
/** * Wrapper class to workaround the limit of PO constructor that doesn't take a tableName or * tableID parameter. Note that in the generated class scenario ( X_ ), tableName and tableId * is generated as a static field. * * @author Low Heng Sin * */ final class PropertiesWrapper extends Properties { /** * ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\model\GenericPO.java
1
请在Spring Boot框架中完成以下Java代码
public class Book extends BaseEntity<String> implements Serializable { private static final long serialVersionUID = 1L; private String title; private String isbn; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "author_id") private Author author; public Long getId() { retur...
if (this == obj) { return true; } if (getClass() != obj.getClass()) { return false; } return id != null && id.equals(((Book) obj).id); } @Override public int hashCode() { return 2021; } @Override public String toString() { ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootAudit\src\main\java\com\bookstore\entity\Book.java
2
请完成以下Java代码
public Map<String, String> getVariables() { return this.variables; } /** * Creates an instance of {@link MatchResult} that is a match with no variables */ public static MatchResult match() { return new MatchResult(true, Collections.emptyMap()); } /** * Creates an instance of {@link MatchResul...
public static MatchResult match(Map<String, String> variables) { return new MatchResult(true, variables); } /** * Creates an instance of {@link MatchResult} that is not a match. * @return a {@code MatchResult} with match set to false */ public static MatchResult notMatch() { return new MatchResult...
repos\spring-security-main\messaging\src\main\java\org\springframework\security\messaging\util\matcher\MessageMatcher.java
1
请完成以下Java代码
public class ActionDefinition { private String id; private String name; private String description; private List<VariableDefinition> inputs; private List<VariableDefinition> outputs; public String getId() { return id; } public String getName() { return name; } ...
public void setId(String id) { this.id = id; } public void setName(String name) { this.name = name; } public void setDescription(String description) { this.description = description; } public void setInputs(List<VariableDefinition> inputs) { this.inputs = input...
repos\Activiti-develop\activiti-core-common\activiti-connector-model\src\main\java\org\activiti\core\common\model\connector\ActionDefinition.java
1
请在Spring Boot框架中完成以下Java代码
public BigDecimal toRealValueAsBigDecimal() {return toRealValueAsMoney().toBigDecimal();} public boolean isAP() {return multiplier.isAP();} public boolean isAPAdjusted() {return multiplier.isAPAdjusted();} public boolean isCreditMemo() {return multiplier.isCreditMemo();} public boolean isCMAdjusted() {return mu...
} public InvoiceTotal withCMAdjusted() { if (multiplier.isCreditMemoAdjusted()) { return this; } else if (multiplier.isCreditMemo()) { return new InvoiceTotal(relativeValue.negate(), multiplier.withCMAdjusted(true)); } else { return new InvoiceTotal(relativeValue, multiplier.withCMAdjusted(t...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\service\impl\InvoiceTotal.java
2
请完成以下Java代码
public Double getMultiplier() { return this.multiplier; } /** * Specify a multiplier for a delay for the next retry attempt. * @param multiplier value to multiply the current interval by for each attempt (must * be greater than or equal to 1) */ public void setMultiplier(Double multiplier) { this.multip...
public void setMaxDelay(Duration maxDelay) { this.maxDelay = maxDelay; } /** * Set the factory to use to create the {@link RetryPolicy}, or {@code null} to use * the default. The function takes a {@link Builder RetryPolicy.Builder} initialized * with the state of this instance that can be further configured,...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\retry\RetryPolicySettings.java
1
请完成以下Java代码
public abstract class PvmAtomicOperationCancelActivity implements PvmAtomicOperation { public void execute(PvmExecutionImpl execution) { // Assumption: execution is scope PvmActivity cancellingActivity = execution.getNextActivity(); execution.setNextActivity(null); // first, cancel and destroy the ...
public boolean isAsync(PvmExecutionImpl execution) { return false; } protected void setDelayedPayloadToNewScope(PvmExecutionImpl execution, CoreModelElement scope) { String activityType = (String) scope.getProperty(BpmnProperties.TYPE.getName()); if (ActivityTypes.START_EVENT_MESSAGE.equals(activityTyp...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\operation\PvmAtomicOperationCancelActivity.java
1
请在Spring Boot框架中完成以下Java代码
public static class AppEngineRestApiConfiguration extends BaseRestApiConfiguration { @Bean public ServletRegistrationBean appServlet(FlowableAppProperties properties) { return registerServlet(properties.getServlet(), AppEngineRestConfiguration.class); } } @Configuration(pro...
@Bean public ServletRegistrationBean eventRegistryServlet(FlowableEventRegistryProperties properties) { return registerServlet(properties.getServlet(), EventRegistryRestConfiguration.class); } } @Configuration(proxyBeanMethods = false) @ConditionalOnClass(IdmRestResponseFactory....
repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\RestApiAutoConfiguration.java
2
请完成以下Java代码
private PIAttributes createPIAttributes(final List<I_M_HU_Attribute> huAttributes) { final IHUPIAttributesDAO piAttributesRepo = Services.get(IHUPIAttributesDAO.class); final ImmutableSet<Integer> piAttributeIds = huAttributes.stream().map(I_M_HU_Attribute::getM_HU_PI_Attribute_ID).collect(ImmutableSet.toImmutabl...
final List<I_M_HU_Attribute> huAttributes = retrieveAttributes(hu, attributeId); if (huAttributes.isEmpty()) { return null; } else if (huAttributes.size() == 1) { return huAttributes.get(0); } else { throw new AdempiereException("More than one HU Attributes were found for '" + attributeId + "' ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\HUAttributesDAO.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getEmail() { return email; ...
public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Role getRole() { return role; } public void setRole(Role role) { this.role = role; } }
repos\tutorials-master\spring-security-modules\spring-security-authorization\spring-security-url-http-method-auth\src\main\java\com\baeldung\springsecurity\entity\User.java
1
请完成以下Java代码
public SumQueryAggregateColumnBuilder<SourceModelType, TargetModelType> setDynAttribute(final ModelDynAttributeAccessor<TargetModelType, BigDecimal> dynAttribute) { this.dynAttribute = dynAttribute; return this; } @Override public ModelDynAttributeAccessor<TargetModelType, BigDecimal> getDynAttribute() { Ch...
public void add(final SourceModelType model) { if (filters.accept(model)) { final Optional<BigDecimal> value = InterfaceWrapperHelper.getValue(model, getAmountColumnName()); if (value.isPresent()) { sum = sum.add(value.get()); } } // Update target model's dynamic attribute ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\SumQueryAggregateColumnBuilder.java
1
请完成以下Java代码
public <T extends I_M_ShipmentSchedule_QtyPicked> ImmutableListMultimap<ShipmentScheduleId, T> retrieveNotOnShipmentLineRecordsByScheduleIds( @NonNull final Set<ShipmentScheduleId> scheduleIds, @NonNull Class<T> type) { return retrieveRecordsByScheduleIds( ShipmentScheduleAndJobScheduleIdSet.ofShipmentSche...
public <T extends I_M_ShipmentSchedule_QtyPicked> List<T> retrievePickedOnTheFlyAndNotDelivered( @NonNull final ShipmentScheduleId shipmentScheduleId, @NonNull final Class<T> modelClass) { return queryBL .createQueryBuilder(I_M_ShipmentSchedule_QtyPicked.class) .addOnlyActiveRecordsFilter() .addEqu...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\ShipmentScheduleAllocDAO.java
1
请完成以下Java代码
public static CreateMatchInvoicePlan ofList(List<CreateMatchInvoicePlanLine> lines) { return new CreateMatchInvoicePlan(lines); } public boolean isEmpty() { return lines.isEmpty(); } @Override public Iterator<CreateMatchInvoicePlanLine> iterator() { return lines.iterator(); } public void setCostAmoun...
{ final CreateMatchInvoicePlanLine line = lines.get(i); final Money lineCostAmountInOut = line.getCostAmountInOut(); final Money lineInvoicedAmtDiff; if (i != lastIndex) { final Percent percentage = lineCostAmountInOut.percentageOf(totalCostAmountInOut); lineInvoicedAmtDiff = totalInvoicedAmtDiff...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\invoice\CreateMatchInvoicePlan.java
1
请完成以下Java代码
public Builder setDisplayName(final ITranslatableString displayNameTrls) { this.displayNameTrls = displayNameTrls; return this; } public Builder setDisplayName(final String displayName) { displayNameTrls = TranslatableStrings.constant(displayName); return this; } public Builder setDisplayName(...
{ this.facetFilter = facetFilter; return this; } public boolean hasParameters() { return !parameters.isEmpty(); } public Builder addParameter(final DocumentFilterParamDescriptor.Builder parameter) { parameters.add(parameter); return this; } public Builder addInternalParameter(final Str...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\DocumentFilterDescriptor.java
1
请完成以下Java代码
public MediaSize getMediaSize() { return _mediaSize; } // getMediaSize /** * String Representation * * @return string representation */ @Override public String toString() { return MoreObjects.toStringHelper(this) .omitNullValues() .add("name", m_name) .add("AD_Language", m_AD_Language) ...
/** * Sets default time style to be used when getting DateTime format or Time format. * * @param timeStyle one of {@link DateFormat#SHORT}, {@link DateFormat#MEDIUM}, {@link DateFormat#LONG}. */ public static void setDefaultTimeStyle(final int timeStyle) { timeStyleDefault = timeStyle; } public static in...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\Language.java
1
请完成以下Java代码
public LogicExpressionBuilder addChild(final ILogicExpression child) { if (getLeft() == null) { setLeft(child); } else if (getRight() == null) { setRight(child); } else { throw new ExpressionCompileException("Cannot add " + child + " to " + this + " because both left and right are already fill...
return this; } public ILogicExpression getLeft() { return left; } public ILogicExpression getRight() { return right; } public String getOperator() { return operator; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\LogicExpressionBuilder.java
1
请完成以下Java代码
public class UserAttribute { private List<GrantedAuthority> authorities = new Vector<>(); private @Nullable String password; private boolean enabled = true; public void addAuthority(GrantedAuthority newAuthority) { this.authorities.add(newAuthority); } public List<GrantedAuthority> getAuthorities() { ret...
} } public @Nullable String getPassword() { return this.password; } public boolean isEnabled() { return this.enabled; } public boolean isValid() { return (this.password != null) && (this.authorities.size() > 0); } public void setEnabled(boolean enabled) { this.enabled = enabled; } public void set...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\userdetails\memory\UserAttribute.java
1
请完成以下Java代码
public void setHelp (final @Nullable java.lang.String Help) { set_Value (COLUMNNAME_Help, Help); } @Override public java.lang.String getHelp() { return get_ValueAsString(COLUMNNAME_Help); } @Override public void setIsHUDestroyed (final boolean IsHUDestroyed) { set_Value (COLUMNNAME_IsHUDestroyed, IsHU...
@Override public java.lang.String getRevision() { return get_ValueAsString(COLUMNNAME_Revision); } @Override public void setValidFrom (final @Nullable java.sql.Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); } @Override public java.sql.Timestamp getValidFrom() { return get_ValueA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_NetworkDistribution.java
1
请在Spring Boot框架中完成以下Java代码
class WarehouseQuery { /** * Applied if not empty. {@code AND}ed with {@code externalId} if given. At least one of {@code value} or {@code externalId} needs to be given. */ String value; /** * Applied if not {@code null}. {@code AND}ed with {@code value} if given. At least one of {@code value} or {@cod...
} WarehouseId retrieveQuarantineWarehouseId(); WarehouseId retrieveWarehouseIdBy(WarehouseQuery query); WarehouseAndLocatorValue retrieveWarehouseAndLocatorValueByLocatorRepoId(int locatorRepoId); @NonNull Optional<WarehouseId> getOptionalIdByValue(@NonNull String value); @NonNull Optional<Warehouse> getOpt...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\warehouse\api\IWarehouseDAO.java
2
请完成以下Java代码
public void securityContextChanged(SecurityContextChangedEvent event) { Observation observation = this.registry.getCurrentObservation(); if (observation == null) { return; } if (event.isCleared()) { observation.event(Observation.Event.of(SECURITY_CONTEXT_CLEARED)); return; } Authentication oldAuthe...
return; } observation.event(Observation.Event.of(SECURITY_CONTEXT_CHANGED, "%s [%s] -> [%s]") .format(SECURITY_CONTEXT_CHANGED, oldAuthentication.getClass().getSimpleName(), newAuthentication.getClass().getSimpleName())); } private static @Nullable Authentication getAuthentication(SecurityContext context...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\context\ObservationSecurityContextChangedListener.java
1
请完成以下Java代码
public class JSONNotificationsList { public static final JSONNotificationsList EMPTY = new JSONNotificationsList(); public static final JSONNotificationsList of(final UserNotificationsList notifications, final JSONOptions jsonOpts) { if (notifications.isEmpty()) { return EMPTY; } return new JSONNotifica...
return MoreObjects.toStringHelper(this) .add("totalCount", totalCount) .add("unreadCount", unreadCount) .add("notifications", notifications) .toString(); } public int getTotalCount() { return totalCount; } public int getUnreadCount() { return unreadCount; } public List<JSONNotification>...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\notification\json\JSONNotificationsList.java
1
请完成以下Java代码
public boolean isSendSynchronously() { return sendSynchronously; } public void setSendSynchronously(boolean sendSynchronously) { this.sendSynchronously = sendSynchronously; } public List<IOParameter> getEventInParameters() { return eventInParameters; } public void setE...
return clone; } public void setValues(SendEventServiceTask otherElement) { super.setValues(otherElement); setEventType(otherElement.getEventType()); setTriggerEventType(otherElement.getTriggerEventType()); setSendSynchronously(otherElement.isSendSynchronously()); ...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\SendEventServiceTask.java
1
请完成以下Java代码
public Iterable<? extends DistributedMember> getRemainingMembers() { return this.remainingMembers; } /** * Null-safe builder method used to configure an array of failing {@link DistributedMember peer members} * in the {@link DistributedSystem} on the losing side of a network partition. * * @param failedMem...
/** * Null-safe builder method used to configure an {@link Iterable} of remaining {@link DistributedMember peer members} * in the {@link DistributedSystem} on the winning side of a network partition. * * @param remainingMembers {@link Iterable} of remaining {@link DistributedMember peer members}; * may be {@l...
repos\spring-boot-data-geode-main\spring-geode-project\apache-geode-extensions\src\main\java\org\springframework\geode\distributed\event\support\QuorumLostEvent.java
1
请在Spring Boot框架中完成以下Java代码
public Function<RouteProperties, HandlerFunctionDefinition> streamHandlerFunctionDefinition() { return routeProperties -> { Objects.requireNonNull(routeProperties.getUri(), "routeProperties.uri must not be null"); return new HandlerFunctionDefinition.Default("stream", HandlerFunctions.stream(routePropertie...
return (request, next) -> { MvcUtils.setRouteId(request, id); return next.handle(request); }; } private static HandlerFilterFunction<ServerResponse, ServerResponse> setRequestUrlFilter(@Nullable URI uri) { return (request, next) -> { Objects.requireNonNull(uri, "uri must not be null"); MvcUtils.setRe...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\handler\HandlerFunctionAutoConfiguration.java
2
请完成以下Java代码
public final void setOauth2UserService(OAuth2UserService<OAuth2UserRequest, OAuth2User> oauth2UserService) { Assert.notNull(oauth2UserService, "oauth2UserService cannot be null"); this.oauth2UserService = oauth2UserService; } /** * Sets the factory that provides a {@link Converter} used for type conversion of ...
*/ public final void setRetrieveUserInfo(Predicate<OidcUserRequest> retrieveUserInfo) { Assert.notNull(retrieveUserInfo, "retrieveUserInfo cannot be null"); this.retrieveUserInfo = retrieveUserInfo; } /** * Allows converting from the {@link OidcUserSource} to and {@link OidcUser}. * @param oidcUserConverter...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\oidc\userinfo\OidcUserService.java
1
请完成以下Java代码
public boolean isDraftedInProgressOrInvalid() { return this == Drafted || this == InProgress || this == Invalid; } @SuppressWarnings("BooleanMethodIsAlwaysInverted") public boolean isDraftedInProgressOrCompleted() { return this == Drafted || this == InProgress || this == Completed; }
public boolean isNotProcessed() { return isDraftedInProgressOrInvalid() || this == Approved || this == NotApproved; } public boolean isVoided() {return this == Voided;} public boolean isAccountable() { return this == Completed || this == Reversed || this == Voided; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\DocStatus.java
1
请完成以下Java代码
public int compareTo(@NonNull final AttributesKeyPart other) { final int cmp1 = compareNullsLast(getAttributeValueIdOrSpecialCodeOrNull(), other.getAttributeValueIdOrSpecialCodeOrNull()); if (cmp1 != 0) { return cmp1; } final int cmp2 = compareNullsLast(getAttributeIdOrNull(), getAttributeIdOrNull()); ...
private Integer getAttributeIdOrNull() { return AttributeKeyPartType.AttributeIdAndValue == type ? attributeId.getRepoId() : null; } private static int compareNullsLast(final Integer i1, final Integer i2) { if (i1 == null) { return +1; } else if (i2 == null) { return -1; } else { return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\commons\AttributesKeyPart.java
1
请完成以下Java代码
public class ConditionalEventDefinition extends EventSubscriptionDeclaration implements Serializable { private static final long serialVersionUID = 1L; protected String conditionAsString; protected final Condition condition; protected boolean interrupting; protected String variableName; protected Set<Stri...
} public String getConditionAsString() { return conditionAsString; } public void setConditionAsString(String conditionAsString) { this.conditionAsString = conditionAsString; } public boolean shouldEvaluateForVariableEvent(VariableEvent event) { return ((variableName == null || event.getVari...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\parser\ConditionalEventDefinition.java
1
请完成以下Java代码
public PickingSlotIdAndCaption getPickingSlotIdAndCaption(@NonNull final PickingSlotId pickingSlotId) { return pickingSlotDAO.getPickingSlotIdAndCaption(pickingSlotId); } @Override public Set<PickingSlotIdAndCaption> getPickingSlotIdAndCaptions(@NonNull final PickingSlotQuery query) { return pickingSlotDAO.re...
return isAvailableForAnyBPartner(pickingSlotDAO.getById(pickingSlotId)); } @NonNull public I_M_PickingSlot getById(@NonNull final PickingSlotId pickingSlotId) { return pickingSlotDAO.getById(pickingSlotId); } @Override public boolean isPickingRackSystem(@NonNull final PickingSlotId pickingSlotId) { return...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\picking\api\impl\PickingSlotBL.java
1
请完成以下Java代码
public Set<ShipmentScheduleId> getShipmentScheduleIds() { return byShipmentScheduleId.keySet(); } public ShipmentScheduleId getSingleShipmentScheduleId() { final Set<ShipmentScheduleId> shipmentScheduleIds = getShipmentScheduleIds(); if (shipmentScheduleIds.size() != 1) { throw new AdempiereException("E...
public Optional<PickingJobSchedule> getSingleScheduleByShipmentScheduleId(@NonNull ShipmentScheduleId shipmentScheduleId) { final ImmutableList<PickingJobSchedule> schedules = byShipmentScheduleId.get(shipmentScheduleId); if (schedules.isEmpty()) { return Optional.empty(); } else if (schedules.size() == 1...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\picking\job_schedule\model\PickingJobScheduleCollection.java
1
请完成以下Java代码
public String getDeploymentId() { return deploymentId; } @Override public void setDeploymentId(String deploymentId) { this.deploymentId = deploymentId; } @Override public Date getStartTime() { return startTime; } @Override public void setStartTime(Date star...
} @Override public void setExecutionJson(String executionJson) { this.executionJson = executionJson; } @Override public String getDecisionKey() { return decisionKey; } public void setDecisionKey(String decisionKey) { this.decisionKey = decisionKey; } @Over...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\persistence\entity\HistoricDecisionExecutionEntityImpl.java
1
请完成以下Java代码
public class GetTableNameCmd implements Command<String>, Serializable { private static final long serialVersionUID = 1L; protected Class<?> entityClass; protected boolean withPrefix = true; public GetTableNameCmd(Class<?> entityClass) { this.entityClass = entityClass; } public GetTab...
if (entityClass == null) { throw new FlowableIllegalArgumentException("entityClass is null"); } String databaseTablePrefix = getDbSqlSession(commandContext).getDbSqlSessionFactory().getDatabaseTablePrefix(); String tableName = EntityToTableMap.getTableName(entityClass); if ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\GetTableNameCmd.java
1
请完成以下Java代码
private Optional<DesadvInOutLine> deleteDesadvInOutLineIfExists( @NonNull final InOutLineId shipmentLineId) { final Optional<DesadvInOutLine> desadvInOutLine = desadvInOutLineDAO.getByInOutLineId(shipmentLineId); desadvInOutLine.ifPresent(desadvInOutLineDAO::delete); return desadvInOutLine; } @NonNull pr...
.poReference(poReference) .ctxAware(InterfaceWrapperHelper.getContextAware(inOut)); if (isMatchUsingBPartnerId()) { ediDesadvQueryBuilder.bPartnerId(BPartnerId.ofRepoId(inOut.getC_BPartner_ID())); } return ediDesadvQueryBuilder .build(); } private boolean isMatchUsingBPartnerId() { return sys...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\api\impl\DesadvBL.java
1
请在Spring Boot框架中完成以下Java代码
public class StudentService { // DB repository mock private Map<Long, Student> repository = Arrays.asList( new Student[]{ new Student(1, "Alan","Turing"), new Student(2, "Sebastian","Bach"), new Student(3, "Pablo","Picasso"), }).stream() ...
} public Student create(Student student) { long key = sequence.incrementAndGet(); student.setId(key); repository.put(key, student); return student; } public Student update(Long id, Student student) { student.setId(id); Student oldStudent = repository.rep...
repos\tutorials-master\spring-boot-modules\spring-boot-mvc\src\main\java\com\baeldung\students\StudentService.java
2
请完成以下Java代码
public void setName(String name) { nameAttribute.setValue(this, name); } public Collection<CaseRole> getCaseRoles() { return caseRolesCollection.get(this); } public CaseRoles getRoles() { return caseRolesChild.getChild(this); } public void setRoles(CaseRoles caseRole) { caseRolesChild.set...
.namespaceUri(CMMN11_NS) .instanceProvider(new ModelTypeInstanceProvider<Case>() { public Case newInstance(ModelTypeInstanceContext instanceContext) { return new CaseImpl(instanceContext); } }); nameAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_NAME) ...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CaseImpl.java
1
请完成以下Java代码
public final class JsonExpirationDate { @JsonCreator public static JsonExpirationDate ofJson(@NonNull final String json) { if (json.contains("-")) { final LocalDate localDate = LocalDate.parse(json, FORMAT_yyyy_MM_dd); final String yyMMdd = toYYMMDD(localDate); return new JsonExpirationDate(yyMMdd, loca...
} } private static String toYYMMDD(@NonNull final LocalDate localDate) { if (TimeUtil.isLastDayOfMonth(localDate)) { return FORMAT_yyMM.format(localDate) + "00"; } else { return FORMAT_yyMMdd.format(localDate); } } @JsonValue public String toJson() { return toYYMMDDString(); } public Str...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\client\schema\JsonExpirationDate.java
1
请在Spring Boot框架中完成以下Java代码
public class MapSessionRepository implements SessionRepository<MapSession> { private Duration defaultMaxInactiveInterval = Duration.ofSeconds(MapSession.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS); private final Map<String, Session> sessions; private SessionIdGenerator sessionIdGenerator = UuidSessionIdGenerator.getIn...
return null; } if (saved.isExpired()) { deleteById(saved.getId()); return null; } MapSession result = new MapSession(saved); result.setSessionIdGenerator(this.sessionIdGenerator); return result; } @Override public void deleteById(String id) { this.sessions.remove(id); } @Override public MapS...
repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\MapSessionRepository.java
2
请完成以下Java代码
public int getAD_Client_ID() { return adClientId; } @Override public I_AD_Org getAD_Org() { return adOrg; } @Override public int getAD_Org_ID() { return adOrgId; } @Override public I_M_Warehouse getM_Warehouse() { return warehouse; } @Override public int getM_Warehouse_ID() { return wareh...
if (plant == null || plant.getS_Resource_ID() <= 0) { plantIdNew = -1; } else { plantIdNew = plant.getS_Resource_ID(); } // No change => return this if (plantIdNew == this.plantId) { return this; } final MRPSegment mrpSegmentNew = new MRPSegment(this); mrpSegmentNew.plantId = plantIdNew...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\mrp\api\impl\MRPSegment.java
1
请完成以下Java代码
public void setDescription (java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Beschreibung. @return Beschreibung */ @Override public java.lang.String getDescription () { return (java.lang.String)get_Value(COLUMNNAME_Description); } /** Set Warehouse Picking Gr...
if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ @Override public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ @Override publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Warehouse_PickingGroup.java
1
请在Spring Boot框架中完成以下Java代码
public class User { @Id private Name id; private @Attribute(name = "cn") String username; private @Attribute(name = "sn") String password; public User() { } public User(String username, String password) { this.username = username; this.password = password; ...
} public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Override public String toString() { return username; }...
repos\tutorials-master\spring-security-modules\spring-security-ldap\src\main\java\com\baeldung\ldap\data\repository\User.java
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setIsOneQRCodeForAggregatedHUs (final boolean IsOneQRCodeForAggregatedHUs) { set_Value (COLUMNNAME_IsOneQRCodeForAggregatedHUs, IsOneQRCodeForAggregatedHUs); } ...
@Override public void setName (final String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setQRCode_Configuration_ID (final int QRCode_Configuration_ID) { if (QRCode_Configuration_ID < 1) set_Valu...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_QRCode_Configuration.java
1
请完成以下Java代码
public class IoSpecificationImpl extends BaseElementImpl implements IoSpecification { protected static ChildElementCollection<DataInput> dataInputCollection; protected static ChildElementCollection<DataOutput> dataOutputCollection; protected static ChildElementCollection<InputSet> inputSetCollection; protected...
super(instanceContext); } public Collection<DataInput> getDataInputs() { return dataInputCollection.get(this); } public Collection<DataOutput> getDataOutputs() { return dataOutputCollection.get(this); } public Collection<InputSet> getInputSets() { return inputSetCollection.get(this); } p...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\IoSpecificationImpl.java
1
请完成以下Java代码
public String getName() { return _name; } @Override public InputStream getInputStream() throws IOException { if (_data == null) { throw new IOException("no data"); } // a new stream must be returned each time. return new ByteArrayInputStream(_data); } /** * Throws exception
*/ @Override public OutputStream getOutputStream() throws IOException { throw new IOException("cannot do this"); } /** * Get Content Type * * @return MIME type e.g. text/html */ @Override public String getContentType() { return _mimeType; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\email\ByteArrayBackedDataSource.java
1
请在Spring Boot框架中完成以下Java代码
public class OLCandQuery { /** * ID (e.g. document number), of a source document in a remote system; multiple OLCands can have the same ID */ String externalHeaderId; /** * {@link de.metas.externalsystem.model.I_ExternalSystem#COLUMNNAME_Value} of the external system the candidates in question were added with...
{ if (externalHeaderId != null) { Check.assumeNotEmpty(externalHeaderId, "If externalHeaderId is specified, then it may not be empty"); if (externalSystemType == null && externalLineId == null) { throw new AdempiereException("If externalHeaderId is specified, then externalSystemType or externalLineId ...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\OLCandQuery.java
2
请完成以下Java代码
public List<QualityInspectionLineType> getPPOrderReportLineTypes() { return PP_Order_ReportLineTypes; } @Override public String getFeeNameForProducedProduct(final I_M_Product product) { Check.assumeNotNull(product, "product not null"); // TODO: configure some where // e.g. for product "Futterkarotten" ret...
/** * Returns true if the scrap percentage treshold is less than 100. */ @Override public boolean isFeeForScrap() { return getScrapPercentageTreshold().compareTo(new BigDecimal("100")) < 0; } private DocTypeId loadDocType(final DocSubType docSubType) { final IContextAware context = getContext(); final...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\ch\lagerkonf\impl\AbstractQualityBasedConfig.java
1
请完成以下Java代码
public Builder setFilterDescriptorsProvidersService(final DocumentFilterDescriptorsProvidersService filterDescriptorsProvidersService) { this.filterDescriptorsProvidersService = filterDescriptorsProvidersService; return this; } @NonNull public Builder setDocumentDecorators(final ImmutableList<IDocumentDe...
{ return isCloneEnabled(_tableName); } private static boolean isCloneEnabled(@Nullable final Optional<String> tableName) { if (tableName == null || !tableName.isPresent()) { return false; } return CopyRecordFactory.isEnabledForTableName(tableName.get()); } public DocumentQueryOrderByList...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentEntityDescriptor.java
1
请完成以下Java代码
public InputData getRequiredInput() { return requiredInputRef.getReferenceTargetElement(this); } public void setRequiredInput(InputData requiredInput) { requiredInputRef.setReferenceTargetElement(this, requiredInput); } public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeB...
SequenceBuilder sequenceBuilder = typeBuilder.sequence(); requiredDecisionRef = sequenceBuilder.element(RequiredDecisionReference.class) .uriElementReference(Decision.class) .build(); requiredInputRef = sequenceBuilder.element(RequiredInputReference.class) .uriElementReference(InputData.clas...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\InformationRequirementImpl.java
1
请完成以下Java代码
public class C_BP_BankAccount { private final ICountryDAO countryDAO = Services.get(ICountryDAO.class); @ModelChange( timings = { ModelValidator.TYPE_BEFORE_CHANGE, ModelValidator.TYPE_AFTER_NEW }, ifColumnsChanged = { I_C_BP_BankAccount.COLUMNNAME_IBAN } ) public void validateIBAN(final I_C_BP_BankAccount ...
final int countryId = bp_bankAccount.getA_Country_ID(); if (countryId > 0) { final String countryCode = countryDAO.getCountryCode(CountryId.ofRepoId(countryId)); bp_bankAccount.setA_Country(countryCode); } else { bp_bankAccount.setA_Country(null); } } @ModelChange( timings = { ModelValidator....
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java\de\metas\payment\sepa\model\validator\C_BP_BankAccount.java
1
请完成以下Java代码
public boolean isValid(UpdateUserCommand value, ConstraintValidatorContext context) { String inputEmail = value.getParam().getEmail(); String inputUsername = value.getParam().getUsername(); final User targetUser = value.getTargetUser(); boolean isEmailValid = userRepository.findByEmail(inputEma...
if (!isEmailValid) { context .buildConstraintViolationWithTemplate("email already exist") .addPropertyNode("email") .addConstraintViolation(); } if (!isUsernameValid) { context .buildConstraintViolationWithTemplate("username already exist") ...
repos\spring-boot-realworld-example-app-master\src\main\java\io\spring\application\user\UserService.java
1
请完成以下Java代码
public String getPlantName() { return plantInfo != null ? plantInfo.getCaption() : null; } public Stream<DistributionJobStep> streamSteps() { return lines.stream().flatMap(line -> line.getSteps().stream()); } public boolean isFullyMoved() { return lines.stream().allMatch(DistributionJobLine::isFullyMoved...
{ return lines.stream() .map(DistributionJobLine::getDropToLocator) .distinct() .collect(GuavaCollectors.singleElementOrEmpty()); } @Nullable public ProductId getSingleProductIdOrNull() { return lines.stream() .map(DistributionJobLine::getProductId) .distinct() .collect(GuavaCollectors....
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\job\model\DistributionJob.java
1
请完成以下Java代码
public final class KerberosTicketValidation { private final String username; private final Subject subject; private final byte[] responseToken; private final GSSContext gssContext; private final GSSCredential delegationCredential; public KerberosTicketValidation(String username, String servicePrincipal, byt...
return this.username; } public byte[] responseToken() { return this.responseToken; } public GSSContext getGssContext() { return this.gssContext; } public Subject subject() { return this.subject; } public GSSCredential getDelegationCredential() { return this.delegationCredential; } }
repos\spring-security-main\kerberos\kerberos-core\src\main\java\org\springframework\security\kerberos\authentication\KerberosTicketValidation.java
1
请完成以下Java代码
private void updateOrderState(String orderId, OrderStateEnum targetOrderState) { // 构造OrderStateTimeEntity OrderStateTimeEntity orderStateTimeEntity = buildOrderStateTimeEntity(orderId, targetOrderState); // 删除该订单的该条状态 orderDAO.deleteOrderStateTime(orderStateTimeEntity); // 插入该...
private void checkParam(OrderStateEnum targetOrderState) { if (targetOrderState == null) { throw new CommonSysException(ExpCodeEnum.TARGETSTATE_NULL); } } @Override public void handle(OrderProcessContext orderProcessContext) { // 设置目标状态 setTargetOrderState(); ...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Order\src\main\java\com\gaoxi\order\component\changestate\BaseChangeStateComponent.java
1
请完成以下Java代码
public boolean addAssignedCustomer(Customer customer) { ShortCustomerInfo customerInfo = customer.toShortCustomerInfo(); if (this.assignedCustomers != null && this.assignedCustomers.contains(customerInfo)) { return false; } else { if (this.assignedCustomers == null) { ...
} @Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((tenantId == null) ? 0 : tenantId.hashCode()); result = prime * result + ((title == null) ? 0 : title.hashCode()); return result; } @Override ...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\DashboardInfo.java
1
请完成以下Java代码
public Quantity getQtyAvailableToAllocateInHuUom() { final Quantity qtyStorageInHuUom = getStorageQtyInHuUom(); return qtyAllocatedInHuUom != null ? qtyStorageInHuUom.subtract(qtyAllocatedInHuUom) : qtyStorageInHuUom; } private Quantity getStorageQtyInHuUom() { Quantity storageQtyInHuUom = this._stor...
final Quantity qtyAllocatedToAddInHuUom = uomConverter.convertQuantityTo(qtyAllocatedToAdd0, productId, storageQtyInHuUom.getUomId()); final Quantity newQtyAllocatedInHuUom = this.qtyAllocatedInHuUom != null ? this.qtyAllocatedInHuUom.add(qtyAllocatedToAddInHuUom) : qtyAllocatedToAddInHuUom; if (newQtyAll...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\manufacturing\issue\plan\AllocableHU.java
1
请完成以下Java代码
public IdmEngineConfiguration setTablePrefixIsSchema(boolean tablePrefixIsSchema) { this.tablePrefixIsSchema = tablePrefixIsSchema; return this; } public PasswordEncoder getPasswordEncoder() { return passwordEncoder; } public IdmEngineConfiguration setPasswordEncoder(PasswordEn...
this.enableEventDispatcher = enableEventDispatcher; return this; } @Override public IdmEngineConfiguration setEventDispatcher(FlowableEventDispatcher eventDispatcher) { this.eventDispatcher = eventDispatcher; return this; } @Override public IdmEngineConfiguration setEve...
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\IdmEngineConfiguration.java
1
请完成以下Java代码
public TelemetryDataImpl getTelemetryData() { return telemetryData; } public ProcessEngineConfigurationImpl setTelemetryData(TelemetryDataImpl telemetryData) { this.telemetryData = telemetryData; return this; } public boolean isReevaluateTimeCycleWhenDue() { return reevaluateTimeCycleWhenDue; ...
/** * @return a exception code interceptor. The interceptor is not registered in case * {@code disableExceptionCode} is configured to {@code true}. */ protected ExceptionCodeInterceptor getExceptionCodeInterceptor() { return new ExceptionCodeInterceptor(builtinExceptionCodeProvider, customExceptionCodePr...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\ProcessEngineConfigurationImpl.java
1
请在Spring Boot框架中完成以下Java代码
public Optional<UserId> getDefaultDunningContact(@NonNull final BPartnerId bPartnerId) { return userRepository.getDefaultDunningContact(bPartnerId); } @NonNull @Override public Optional<VATIdentifier> getVATTaxId(@NonNull final BPartnerLocationId bpartnerLocationId) { final I_C_BPartner_Location bpartnerLoca...
public boolean isInvoiceEmailCcToMember(@NonNull final BPartnerId bpartnerId) { final I_C_BPartner bpartner = getById(bpartnerId); return bpartner.isInvoiceEmailCcToMember(); } @Override public I_C_BPartner_Location getBPartnerLocationByIdEvenInactive(@NonNull final BPartnerLocationId bpartnerLocationId) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\service\impl\BPartnerBL.java
2
请完成以下Java代码
public void process(final I_EDI_Desadv desadv) { // make sure the desadvs that don't meet the sum percentage requirement won't get enqueued final BigDecimal currentSumPercentage = desadv.getFulfillmentPercent(); if (currentSumPercentage.compareTo(desadv.getFulfillmentPercentMin()) < 0) { ...
} private void enqueueDesadv( @Nullable final PInstanceId pInstanceId, @NonNull final IWorkPackageQueue queue, @NonNull final I_EDI_Desadv desadv) { final String trxName = InterfaceWrapperHelper.getTrxName(desadv); queue .newWorkPackage() .setAD_PInstance_ID(pInstanceId) .bindToTrxName(trxN...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\export\enqueue\DesadvEnqueuer.java
1
请完成以下Java代码
public class CrudInput { @NotNull private long id; @NotBlank private String title; private String body; private List<URI> tagUris; @JsonCreator public CrudInput(@JsonProperty("id") long id, @JsonProperty("title") String title, @JsonProperty("body") String body, @JsonProperty...
public long getId() { return id; } public void setId(long id) { this.id = id; } public void setTitle(String title) { this.title = title; } public void setBody(String body) { this.body = body; } public void setTagUris(List<URI> tagUris) { this.t...
repos\tutorials-master\spring-5-rest-docs\src\main\java\com\baeldung\restdocs\CrudInput.java
1
请完成以下Java代码
public String getConfigurationLevel () { return (String)get_Value(COLUMNNAME_ConfigurationLevel); } /** Set Description. @param Description Optional short description of the record */ public void setDescription (String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Descr...
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 KeyNamePair getKeyNamePair() { r...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_SysConfig.java
1
请完成以下Java代码
public BPartnerId getBPartnerId(@NonNull final ShipmentScheduleId shipmentScheduleId) { final I_M_ShipmentSchedule shipmentSchedule = getShipmentScheduleById(shipmentScheduleId); return scheduleEffectiveBL.getBPartnerId(shipmentSchedule); } @Nullable public ShipperId getShipperId(@Nullable final String s...
} @Nullable public String getTrackingURL(@NonNull final String shipperInternalName) { final I_M_Shipper shipper = shipperByInternalName.computeIfAbsent(shipperInternalName, this::loadShipper); return shipper != null ? shipper.getTrackingURL() : null; } @Nullable private I_M_Shipper loadSh...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\shipping\ShipmentService.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable String getDeviceId() { return this.deviceId; } public void setDeviceId(@Nullable String deviceId) { this.deviceId = deviceId; } public @Nullable String getGroup() { return this.group; } public void setGroup(@Nullable String group) { this.group = group; } public String ge...
* backend. */ private boolean exportMeterMetadata = true; public @Nullable Map<String, String> getDefaultDimensions() { return this.defaultDimensions; } public void setDefaultDimensions(@Nullable Map<String, String> defaultDimensions) { this.defaultDimensions = defaultDimensions; } public boolea...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\dynatrace\DynatraceProperties.java
2
请完成以下Java代码
public void handleHttpRequest(VariableContainer execution, HttpRequest httpRequest, FlowableHttpClient client) { Object delegate = DelegateExpressionUtil.resolveDelegateExpression(expression, execution, fieldExtensions); if (delegate instanceof HttpRequestHandler) { ((HttpRequestHandler) del...
public static Object resolveDelegateExpression(Expression expression, VariableContainer variableScope, List<FieldExtension> fieldExtensions) { // Note: we can't cache the result of the expression, because the // execution can change: eg. delegateExpres...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\behavior\impl\http\handler\DelegateExpressionHttpHandler.java
1
请完成以下Java代码
public void setM_HU_Item(final de.metas.handlingunits.model.I_M_HU_Item M_HU_Item) { set_ValueFromPO(COLUMNNAME_M_HU_Item_ID, de.metas.handlingunits.model.I_M_HU_Item.class, M_HU_Item); } @Override public void setM_HU_Item_ID (final int M_HU_Item_ID) { if (M_HU_Item_ID < 1) set_ValueNoCheck (COLUMNNAME_M_...
return get_ValueAsInt(COLUMNNAME_M_HU_Item_Storage_ID); } @Override public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Product_ID, M_Product_ID); } @Override public int getM_Product_ID() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Item_Storage.java
1
请完成以下Java代码
public String getCardId() { return cardId; } /** * Sets the value of the cardId property. * * @param value * allowed object is * {@link String } * */ public void setCardId(String value) { this.c...
} /** * Sets the value of the validationId property. * * @param value * allowed object is * {@link String } * */ public void setValidationId(String value) { this.validationId = value; } /** ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\PatientAddressType.java
1
请在Spring Boot框架中完成以下Java代码
public class PeopleController { private static final SecureRandom SECURE_RANDOM = new SecureRandom(); @GetMapping("/people") @Timed(value = "people.all", longTask = true) public List<String> listPeople() throws InterruptedException { int seconds2Sleep = SECURE_RANDOM.nextInt(500); Syst...
System.out.println(seconds2Sleep); TimeUnit.MILLISECONDS.sleep(seconds2Sleep); return Arrays.asList("Jim", "Tom", "Tim"); } @GetMapping("/asset") @Timed(value = "people.asset", longTask = true) public void test() throws Exception { throw new Exception("error!"); } @GetM...
repos\tutorials-master\metrics\src\main\java\com\baeldung\metrics\micrometer\PeopleController.java
2
请完成以下Java代码
default DocumentEntityDescriptor getDocumentEntityDescriptor(final int AD_Window_ID) { final WindowId windowId = WindowId.of(AD_Window_ID); return getDocumentDescriptor(windowId).getEntityDescriptor(); } default DocumentEntityDescriptor getDocumentEntityDescriptor(@NonNull final WindowId windowId) { return g...
if (documentPath.getWindowIdOrNull() == null || !documentPath.getWindowId().isInt()) { return Optional.empty(); } final DocumentEntityDescriptor rootEntityDescriptor = getDocumentEntityDescriptor(documentPath.getWindowId()); if (documentPath.isRootDocument()) { final DocumentId rootDocumentId = docume...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\factory\DocumentDescriptorFactory.java
1
请在Spring Boot框架中完成以下Java代码
public ApplicationFactory applicationFactory(InstanceProperties instance, ManagementServerProperties management, ServerProperties server, PathMappedEndpoints pathMappedEndpoints, WebEndpointProperties webEndpoint, ObjectProvider<List<MetadataContributor>> metadataContributors, WebFluxProperties webFluxPropertie...
return new RestClientRegistrationClient(restClient); } } @Configuration(proxyBeanMethods = false) @ConditionalOnBean(WebClient.Builder.class) public static class ReactiveRegistrationClientConfig { @Bean @ConditionalOnMissingBean public RegistrationClient registrationClient(ClientProperties client, WebCli...
repos\spring-boot-admin-master\spring-boot-admin-client\src\main\java\de\codecentric\boot\admin\client\config\SpringBootAdminClientAutoConfiguration.java
2
请完成以下Java代码
private static PInstanceId createOLCandsSelection(final List<OLCand> olCands) { final ImmutableSet<OLCandId> olCandIds = extractOLCandIds(olCands); return DB.createT_Selection(olCandIds, ITrx.TRXNAME_None); } private static ImmutableSet<OLCandId> extractOLCandIds(final List<OLCand> olCands) { return olCands....
final OrderId salesOrderId = posOrder.getSalesOrderId(); if (salesOrderId == null) { throw new AdempiereException("No sales order generated for " + posOrder); } final List<I_C_Invoice> invoices = invoiceDAO.getInvoicesForOrderIds(ImmutableList.of(salesOrderId)); if (invoices.isEmpty()) { throw new Ad...
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\async\C_POSOrder_CreateInvoiceAndShipment.java
1
请完成以下Java代码
public boolean isDayAvailable(final Instant date) { return isActive() && isDayAvailable(date.atZone(SystemTime.zoneId()).getDayOfWeek()); } public int getAvailableDaysPerWeek() { return availableDaysOfWeek.size(); } public boolean isDayAvailable(@NonNull final DayOfWeek dayOfWeek) { return availableD...
return date.toLocalDate().atTime(getTimeSlotStart()).atZone(date.getZone()); } else { return date.toLocalDate().atStartOfDay().atZone(date.getZone()); } } @Deprecated public Timestamp getDayEnd(final Timestamp date) { final LocalDateTime dayEnd = getDayEnd(TimeUtil.asLocalDateTime(date)); return Tim...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\ResourceType.java
1
请完成以下Java代码
public StringBuilder asStringBuilder() { return sb; } public boolean isAutoAppendSeparator() { return autoAppendSeparator; } public TokenizedStringBuilder setAutoAppendSeparator(boolean autoAppendSeparator) { this.autoAppendSeparator = autoAppendSeparator; return this; } public boolean isLastAppende...
return this; } public TokenizedStringBuilder appendSeparatorIfNeeded() { if (lastAppendedIsSeparator) { return this; } if (sb.length() <= 0) { return this; } sb.append(separator); lastAppendedIsSeparator = true; return this; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\text\TokenizedStringBuilder.java
1