instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public String getTrialstatus() { return trialstatus; } public void setTrialstatus(String trialstatus) { this.trialstatus = trialstatus; } public String getFirauditer() { return firauditer; } public void setFirauditer(String firauditer) { this.firauditer = firau...
} public void setEdittime(String edittime) { this.edittime = edittime; } public String getStartdate() { return startdate; } public void setStartdate(String startdate) { this.startdate = startdate; } public String getEnddate() { return enddate; } p...
repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\vtoll\BudgetVtoll.java
1
请在Spring Boot框架中完成以下Java代码
public String getExecutionId() { return executionId; } public String getHandlerType() { return this.handlerType; } public Collection<String> getHandlerTypes() { return handlerTypes; } public Date getNow() { return jobServiceConfiguration.getClock().getCurrentT...
public String getSubScopeId() { return subScopeId; } public String getScopeType() { return scopeType; } public boolean isWithoutScopeType() { return withoutScopeType; } public String getScopeDefinitionId() { return scopeDefinitionId; } public String ge...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\ExternalWorkerJobQueryImpl.java
2
请完成以下Java代码
public List<PermissionCheck> getProcessDefinitionCreatePermissionChecks() { return processDefinitionCreatePermissionChecks; } public boolean isShouldJoinDeploymentTable() { return shouldJoinDeploymentTable; } public void addProcessDefinitionCreatePermissionCheck(CompositePermissionCheck processDefinit...
} if(authorizationUserId != null) { List<Group> groups = Context.getCommandContext() .getReadOnlyIdentityProvider() .createGroupQuery() .groupMember(authorizationUserId) .list(); cachedCandidateGroups = groups.stream().map(Group::getId).collect(Collectors.toList(...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessDefinitionQueryImpl.java
1
请完成以下Java代码
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GatewayFlowRuleEntity that = (GatewayFlowRuleEntity) o; return Objects.equals(id, that.id) && Objects.equals(app, that.app) && ...
return "GatewayFlowRuleEntity{" + "id=" + id + ", app='" + app + '\'' + ", ip='" + ip + '\'' + ", port=" + port + ", gmtCreate=" + gmtCreate + ", gmtModified=" + gmtModified + ", resource='" + resource + '\''...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\gateway\GatewayFlowRuleEntity.java
1
请完成以下Java代码
public Set<UserGroupId> getAssignedGroupIdsByUserId(@NonNull final UserId userId, @NonNull final Instant date) { return assignmentsByUserId .getOrLoad(userId, this::retrieveUserAssignments) .getAssignedGroupIds(date); } @NonNull public UserGroupsCollection getByUserGroupId(@NonNull final UserGroupId user...
private static Range<Instant> extractValidDates(final I_AD_UserGroup_User_Assign record) { final Instant validFrom = TimeUtil.asInstant(record.getValidFrom()); final Instant validTo = TimeUtil.asInstant(record.getValidTo()); if (validFrom == null) { if (validTo == null) { return Range.all(); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\UserGroupRepository.java
1
请完成以下Java代码
public String getCity() { return super.getCity(); } @Schema(description = "Address Line 1", example = "42 Broadway Suite 12-400") @Override public String getAddress() { return super.getAddress(); } @Schema(description = "Address Line 2", example = "") @Override public S...
} @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Customer [title="); builder.append(title); builder.append(", tenantId="); builder.append(tenantId); builder.append(", additionalInfo="); builder.append(get...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\Customer.java
1
请在Spring Boot框架中完成以下Java代码
public GrpcServerConfigurer streamTracerFactoryConfigurer(final MeterRegistry registry) { MetricsServerStreamTracers metricsServerStreamTracers = new MetricsServerStreamTracers( Stopwatch::createUnstarted); return builder -> builder .addStreamTracerFactory(metricsServerSt...
} /** * Gets all method names from the given service descriptor. * * @param serviceDescriptor The service descriptor to get the names from. * @return The newly created and sorted list of the method names. */ protected List<String> collectMethodNamesForService(final ServiceDescriptor se...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\autoconfigure\GrpcServerMetricAutoConfiguration.java
2
请完成以下Java代码
public static BigDecimal centsToYuan(Object obj) { BigDecimal cents = toBigDecimal(obj); return cents.divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP); } /** * 元转分 * @param obj 元的金额 * @return 转换后的分 */ public static Long yuanToCents(Object obj) { BigDecima...
public static void main(String[] args) { BigDecimal num1 = new BigDecimal("10.123"); BigDecimal num2 = new BigDecimal("2.456"); System.out.println("加法结果: " + add(num1, num2)); System.out.println("减法结果: " + subtract(num1, num2)); System.out.println("乘法结果: " + multiply(num1, num2)...
repos\eladmin-master\eladmin-common\src\main\java\me\zhengjie\utils\BigDecimalUtils.java
1
请在Spring Boot框架中完成以下Java代码
public class CustomJsonProperties { private String host; private int port; private boolean resend; private Person sender; public static class Person { private String name; private String address; public String getName() { return name; } pub...
return port; } public void setPort(int port) { this.port = port; } public boolean isResend() { return resend; } public void setResend(boolean resend) { this.resend = resend; } public Person getSender() { return sender; } public void setSender(...
repos\tutorials-master\spring-boot-modules\spring-boot-properties-3\src\main\java\com\baeldung\properties\json\CustomJsonProperties.java
2
请在Spring Boot框架中完成以下Java代码
public class DunningToExport { @NonNull DunningId id; @NonNull Calendar dunningDate; @NonNull Instant dunningTimestamp; @NonNull String documentNumber; @Nullable String dunningText;
@NonNull MetasfreshVersion metasfreshVersion; @NonNull Money amount; @NonNull Money alreadyPaidAmount; @NonNull BPartnerId recipientId; @Singular List<DunningAttachment> dunningAttachments; }
repos\metasfresh-new_dawn_uat\backend\de.metas.dunning_gateway.spi\src\main\java\de\metas\dunning_gateway\spi\model\DunningToExport.java
2
请完成以下Java代码
public int getAD_Ref_List_ID() { return get_ValueAsInt(COLUMNNAME_AD_Ref_List_ID); } @Override public void setDescription (final @Nullable java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return get_ValueAsString(C...
@Override public boolean isTranslated() { return get_ValueAsBoolean(COLUMNNAME_IsTranslated); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Ref_List_Trl.java
1
请完成以下Java代码
public class CalculatedFieldDebugEventEntity extends EventEntity<CalculatedFieldDebugEvent> implements BaseEntity<CalculatedFieldDebugEvent> { @Column(name = EVENT_CALCULATED_FIELD_ID_COLUMN_NAME) private UUID calculatedFieldId; @Column(name = EVENT_ENTITY_ID_COLUMN_NAME) private UUID eventEntityId; ...
this.arguments = event.getArguments(); this.result = event.getResult(); this.error = event.getError(); } @Override public CalculatedFieldDebugEvent toData() { var builder = CalculatedFieldDebugEvent.builder() .id(id) .tenantId(TenantId.fromUUID(tenant...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\sql\CalculatedFieldDebugEventEntity.java
1
请完成以下Java代码
protected void onUnsuccessfulAuthentication( final ServerCall<?, ?> call, final Metadata headers, final AuthenticationException failed) { // Overwrite to add custom behavior. } /** * Wraps the given {@link AccessDeniedException} in an {@link AuthenticationExcept...
@Override protected void detachAuthenticationContext() { SecurityContextHolder.clearContext(); } @Override public void onHalfClose() { try { super.onHalfClose(); } catch (final AccessDeniedException e) { if (this.securi...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\security\interceptors\DefaultAuthenticatingServerInterceptor.java
1
请完成以下Java代码
public I_AD_PrintFormat getRemittance_PrintFormat() throws RuntimeException { return (I_AD_PrintFormat)MTable.get(getCtx(), I_AD_PrintFormat.Table_Name) .getPO(getRemittance_PrintFormat_ID(), get_TrxName()); } /** Set Remittance Print Format. @param Remittance_PrintFormat_ID Print Format for separate Re...
/** Get Shipment Mail Text. @return Email text used for sending delivery notes */ public int getShipment_MailText_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Shipment_MailText_ID); if (ii == null) return 0; return ii.intValue(); } public I_AD_PrintFormat getShipment_PrintFormat() throws Runt...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintForm.java
1
请完成以下Java代码
private void printAllActiveProperties(ConfigurableEnvironment env) { LOGGER.info("************************* ALL PROPERTIES(EVENT) ******************************"); env.getPropertySources() .stream() .filter(ps -> ps instanceof MapPropertySource) .map(ps ...
LOGGER.info("************************* APP PROPERTIES(EVENT) ******************************"); env.getPropertySources() .stream() .filter(ps -> ps instanceof MapPropertySource && ps.getName().contains("application.properties")) .map(ps -> ((MapPropertySource) ps)...
repos\tutorials-master\spring-boot-modules\spring-boot-properties-3\src\main\java\com\baeldung\properties\log\AppContextRefreshedEventPropertiesPrinter.java
1
请完成以下Java代码
public String getHandledTableName() { return I_MD_Candidate.Table_Name; } @Override @NonNull public Dimension getFromRecord(@NonNull final I_MD_Candidate record) { return Dimension.builder() .projectId(ProjectId.ofRepoIdOrNull(record.getC_Project_ID())) .campaignId(record.getC_Campaign_ID()) .act...
@Override public void updateRecord(final I_MD_Candidate record, final Dimension from) { record.setC_Project_ID(ProjectId.toRepoId(from.getProjectId())); record.setC_Campaign_ID(from.getCampaignId()); record.setC_Activity_ID(ActivityId.toRepoId(from.getActivityId())); record.setC_OrderSO_ID(OrderId.toRepoId(fr...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\document\dimension\MDCandidateDimensionFactory.java
1
请完成以下Java代码
public void setOnSunday (boolean OnSunday) { set_Value (COLUMNNAME_OnSunday, Boolean.valueOf(OnSunday)); } /** Get Sonntag. @return Sonntags verfügbar */ @Override public boolean isOnSunday () { Object oo = get_Value(COLUMNNAME_OnSunday); if (oo != null) { if (oo instanceof Boolean) retu...
@param OnWednesday Mittwochs verfügbar */ @Override public void setOnWednesday (boolean OnWednesday) { set_Value (COLUMNNAME_OnWednesday, Boolean.valueOf(OnWednesday)); } /** Get Mittwoch. @return Mittwochs verfügbar */ @Override public boolean isOnWednesday () { Object oo = get_Value(COLUMNNAM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Phonecall_Schema_Version.java
1
请完成以下Java代码
public class Address { String streetNumber; String streetName; String city; public String getStreetNumber() { return streetNumber; } public void setStreetNumber(String streetNumber) { this.streetNumber = streetNumber; } public String getStreetName() {
return streetName; } public void setStreetName(String streetName) { this.streetName = streetName; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } }
repos\tutorials-master\jackson-modules\jackson-conversions\src\main\java\com\baeldung\jackson\xml\Address.java
1
请在Spring Boot框架中完成以下Java代码
public class ZookeeperConfigsInitializer { private static final String CONFIG_BASE_NODE_PATH = "/config"; private static final String APPLICATION_BASE_NODE_PATH = CONFIG_BASE_NODE_PATH + "/application"; @Autowired CuratorFramework client; @EventListener public void appReady(ApplicationReadyEv...
.forPath(path) == null) { client.create() .forPath(path, value.getBytes()); } else { client.setData() .forPath(path, value.getBytes()); } } private void createBaseNodes() throws Exception { if (client.checkExists() .for...
repos\tutorials-master\spring-cloud-modules\spring-cloud-archaius\spring-cloud-archaius-zookeeper-config\src\main\java\com\baeldung\spring\cloud\archaius\zookeeperconfig\config\ZookeeperConfigsInitializer.java
2
请完成以下Java代码
public class ImpliedCurrencyAmountRangeChoice { @XmlElement(name = "FrAmt") protected AmountRangeBoundary1 frAmt; @XmlElement(name = "ToAmt") protected AmountRangeBoundary1 toAmt; @XmlElement(name = "FrToAmt") protected FromToAmountRange frToAmt; @XmlElement(name = "EQAmt") protected Bi...
* Sets the value of the frToAmt property. * * @param value * allowed object is * {@link FromToAmountRange } * */ public void setFrToAmt(FromToAmountRange value) { this.frToAmt = value; } /** * Gets the value of the eqAmt property. * * @ret...
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\ImpliedCurrencyAmountRangeChoice.java
1
请完成以下Java代码
public void setM_HU_PI_Version_ID (final int M_HU_PI_Version_ID) { if (M_HU_PI_Version_ID < 1) set_ValueNoCheck (COLUMNNAME_M_HU_PI_Version_ID, null); else set_ValueNoCheck (COLUMNNAME_M_HU_PI_Version_ID, M_HU_PI_Version_ID); } @Override public int getM_HU_PI_Version_ID() { return get_ValueAsInt(CO...
} @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } @Override public void setSplitterStrategy_JavaClass_ID (final int SplitterStrategy_JavaClass_ID) { if (SplitterStrategy_JavaClass_ID < 1) set_Value (COLUMNNAME_SplitterStrategy_JavaClass_ID, null); else set_Value (COL...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PI_Attribute.java
1
请完成以下Java代码
public JSONLookupValuesPage getFilterParameterTypeahead( @PathVariable("boardId") final int ignoredBoardId, @PathVariable("viewId") final String viewIdStr, @PathVariable("filterId") final String filterId, @PathVariable("parameterName") final String parameterName, @RequestParam(name = "query") final Strin...
//.viewSize(-1) .userSessionCtx(userSession.toEvaluatee()) .build(); } private JSONViewResult toJSONCardsViewResult( final int boardId, final ViewResult viewResult, final JSONOptions jsonOpts, Predicate<Integer> cardIdFilter) { final String adLanguage = jsonOpts.getAdLanguage(); final List<...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\board\BoardRestController.java
1
请完成以下Java代码
protected @Nullable Object getPreAuthenticatedPrincipal(HttpServletRequest request) { String principal = request.getHeader(this.principalRequestHeader); if (principal == null && this.exceptionIfHeaderMissing) { throw new PreAuthenticatedCredentialsNotFoundException( this.principalRequestHeader + " header no...
} public void setCredentialsRequestHeader(String credentialsRequestHeader) { Assert.hasText(credentialsRequestHeader, "credentialsRequestHeader must not be empty or null"); this.credentialsRequestHeader = credentialsRequestHeader; } /** * Defines whether an exception should be raised if the principal header ...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\preauth\RequestHeaderAuthenticationFilter.java
1
请完成以下Java代码
public Optional<ForecastDeletedEvent> createDeletedEvent( @NonNull final I_M_Forecast forecastRecord, @NonNull final DocTimingType timing) { return buildForecast(forecastRecord, timing) .map(forecast -> ForecastDeletedEvent .builder() .forecast(forecast) .eventDescriptor(EventDescriptor.o...
.collect(ImmutableList.toImmutableList())) .build()); } private ForecastLine createForecastLine( @NonNull final I_M_ForecastLine forecastLine, @NonNull final I_M_Forecast forecast) { final ProductDescriptor productDescriptor = productDescriptorFactory.createProductDescriptor(forecastLine); fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\material\interceptor\M_ForecastEventCreator.java
1
请完成以下Java代码
public static void writeValue_C_City_ID(final I_C_Location toLocationRecord, final IDocumentFieldView fromField) { final IntegerLookupValue city = fromField.getValueAs(IntegerLookupValue.class); if (city == null) { toLocationRecord.setC_City_ID(-1); } else if (city.getIdAsInt() <= 0) { toLoc...
else if (country.getIdAsInt() <= 0) { toLocationRecord.setC_Country_ID(-1); } else { toLocationRecord.setC_Country_ID(country.getIdAsInt()); } } private static void writeValue_C_Postal_ID(final I_C_Location toLocationRecord, final IDocumentFieldView fromField) { final IntegerLookupValue...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\address\AddressDescriptorFactory.java
1
请在Spring Boot框架中完成以下Java代码
private ImportIssuesRequest buildImportIssueRequest(@NonNull final ExternalProjectReference externalProjectReference, @NonNull final ImmutableList<String> issueNoList, @Nullable final GithubIssueLinkMatcher githubIssueLinkMatcher) { return ImportIssuesRequest.builder() .externalProjec...
final ImmutableSet.Builder<String> owners = ImmutableSet.builder(); final ImmutableSet.Builder<String> projects = ImmutableSet.builder(); externalProjectReferences.forEach(projectRef -> { owners.add(projectRef.getProjectOwner()); projects.add(projectRef.getExternalProjectReference()); }); return Githu...
repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java\de\metas\serviceprovider\github\GithubImportProcess.java
2
请完成以下Java代码
public String getNote () { return (String)get_Value(COLUMNNAME_Note); } /** Set Process Now. @param Processing Process Now */ public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ public boole...
*/ public String getRemote_Addr () { return (String)get_Value(COLUMNNAME_Remote_Addr); } /** Set Remote Host. @param Remote_Host Remote host Info */ public void setRemote_Host (String Remote_Host) { set_Value (COLUMNNAME_Remote_Host, Remote_Host); } /** Get Remote Host. @return Remote host Info...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Registration.java
1
请完成以下Java代码
public Builder requireProofKey(boolean requireProofKey) { return setting(ConfigurationSettingNames.Client.REQUIRE_PROOF_KEY, requireProofKey); } /** * Set to {@code true} if authorization consent is required when the client * requests access. This applies to {@code authorization_code} flow. * @param re...
return setting(ConfigurationSettingNames.Client.TOKEN_ENDPOINT_AUTHENTICATION_SIGNING_ALGORITHM, authenticationSigningAlgorithm); } /** * Sets the expected subject distinguished name associated to the client * {@code X509Certificate} received during client authentication when using the * {@code tls_c...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\settings\ClientSettings.java
1
请在Spring Boot框架中完成以下Java代码
public RedisServerProperties getRedis() { return this.redisServerProperties; } public static class DeveloperRestApiProperties { private static final boolean DEFAULT_START = false; private boolean start = DEFAULT_START; public boolean isStart() { return this.start; } public void setStart(boolean st...
public void setPort(int port) { this.port = port; } public EnableMemcachedServer.MemcachedProtocol getProtocol() { return this.protocol; } public void setProtocol(EnableMemcachedServer.MemcachedProtocol protocol) { this.protocol = protocol; } } public static class RedisServerProperties { publ...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\ServiceProperties.java
2
请完成以下Java代码
public class ApiUsageStateQueryProcessor extends AbstractSingleEntityTypeQueryProcessor<ApiUsageStateFilter> { public ApiUsageStateQueryProcessor(TenantRepo repo, QueryContext ctx, EdqsQuery query) { super(repo, ctx, query, (ApiUsageStateFilter) query.getEntityFilter()); } @Override protected ...
protected void processAll(Consumer<EntityData<?>> processor) { process(repository.getEntitySet(EntityType.API_USAGE_STATE), processor); } @Override protected boolean matches(EntityData<?> ed) { ApiUsageStateFields entityFields = (ApiUsageStateFields) ed.getFields(); return super.mat...
repos\thingsboard-master\common\edqs\src\main\java\org\thingsboard\server\edqs\query\processor\ApiUsageStateQueryProcessor.java
1
请完成以下Java代码
public static Charset[] getAvailableCharsets() { final Collection<Charset> col = Charset.availableCharsets().values(); final Charset[] arr = new Charset[col.size()]; col.toArray(arr); return arr; } /** * Get current charset * * @return current charset * @since 3.1.4 */ public static Charset getCh...
catch (final Exception ignored) { } return Charset.defaultCharset(); } public static String getPropertyFileName() { return s_propertyFileName; } // public static class IsNotSwingClient implements Condition // { // @Override // public boolean matches(ConditionContext context, AnnotatedTypeMetadata meta...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\Ini.java
1
请完成以下Java代码
public static ProcessEngine getDefaultProcessEngine() { return getProcessEngine(NAME_DEFAULT); } /** * obtain a process engine by name. * * @param processEngineName * is the name of the process engine or null for the default process engine. */ public static Proc...
/** * closes all process engines. This method should be called when the server shuts down. */ public static synchronized void destroy() { if (isInitialized()) { Map<String, ProcessEngine> engines = new HashMap<>(processEngines); processEngines = new HashMap<>(); ...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\ProcessEngines.java
1
请完成以下Java代码
public int getIMP_Processor_Type_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_IMP_Processor_Type_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Java Class. @param JavaClass Java Class */ public void setJavaClass (String JavaClass) { set_Value (COLUMNNAME_JavaClass, JavaClass...
} /** Set Search Key. @param Value Search key for the record in the format required - must be unique */ public void setValue (String Value) { set_Value (COLUMNNAME_Value, Value); } /** Get Search Key. @return Search key for the record in the format required - must be unique */ public String getVa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_IMP_Processor_Type.java
1
请完成以下Java代码
public OutputDataItem getOutputDataItem() { return outputDataItemChild.getChild(this); } public void setOutputDataItem(OutputDataItem outputDataItem) { outputDataItemChild.setChild(this, outputDataItem); } public Collection<ComplexBehaviorDefinition> getComplexBehaviorDefinitions() { return comple...
public void setCamundaAsyncAfter(boolean isCamundaAsyncAfter) { camundaAsyncAfter.setValue(this, isCamundaAsyncAfter); } public boolean isCamundaExclusive() { return camundaExclusive.getValue(this); } public void setCamundaExclusive(boolean isCamundaExclusive) { camundaExclusive.setValue(this, isC...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\MultiInstanceLoopCharacteristicsImpl.java
1
请完成以下Java代码
public Date getCreationDate() { return creationDate; } public void setCreationDate(Date creationDate) { this.creationDate = creationDate; } public List<Case> getCases() { return cases; } public void setCases(List<Case> cases) { this.cases = cases; } public...
if (attributes != null && !attributes.isEmpty()) { for (ExtensionAttribute attribute : attributes) { if (namespace.equals(attribute.getNamespace())) { return attribute.getValue(); } } } return null; } public void addDef...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\CmmnModel.java
1
请完成以下Java代码
public XmlPayload withMod(@Nullable final PayloadMod payloadMod) { if (payloadMod == null) { return this; } final XmlPayloadBuilder builder = toBuilder(); if (payloadMod.getStorno() != null) { builder.storno(payloadMod.getStorno()); } if (payloadMod.getCopy() != null) { builder.copy(payloa...
@Nullable Boolean storno; @Nullable Boolean copy; @Nullable Boolean creditAdvice; @Nullable InvoiceMod invoiceMod; @Nullable XmlReminder reminder; @Nullable BodyMod bodyMod; } }
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_xversion\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_xversion\request\model\XmlPayload.java
1
请在Spring Boot框架中完成以下Java代码
public IncidentDto getIncident() { Incident incident = engine.getRuntimeService().createIncidentQuery().incidentId(incidentId).singleResult(); if (incident == null) { throw new InvalidRequestException(Status.NOT_FOUND, "No matching incident with id " + incidentId); } return IncidentDto.fromInciden...
} } @Override public Response setAnnotation(AnnotationDto annotationDto) { engine.getRuntimeService().setAnnotationForIncidentById(incidentId, annotationDto.getAnnotation()); return Response.noContent().build(); } @Override public Response clearAnnotation() { engine.getRuntimeService().clearAn...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\repository\impl\IncidentResourceImpl.java
2
请完成以下Java代码
protected String getAuthCacheTTL(WebappProperty webapp) { long authCacheTTL = webapp.getAuth().getCache().getTimeToLive(); boolean authCacheTTLEnabled = webapp.getAuth().getCache().isTtlEnabled(); if (authCacheTTLEnabled) { return Long.toString(authCacheTTL); } else { return ""; // Empty st...
log.debug("Filter {} for URL {} registered.", filterName, urlPatterns); } return filterRegistration; } private ServletRegistration registerServlet(final String servletName, final Class<?> applicationClass, final String... urlPatterns) { ServletRegistration servletRegistration = servletContext.getServl...
repos\camunda-bpm-platform-master\spring-boot-starter\starter-webapp-core\src\main\java\org\camunda\bpm\spring\boot\starter\webapp\CamundaBpmWebappInitializer.java
1
请完成以下Java代码
void get_cluster_features(final Context ctx, final List<Integer> cluster4, final List<Integer> cluster6, final List<Integer> cluster, List<Integer> features) { if (!use_cluster) { ...
PUSH(features, CLUSTER(cluster, ctx.N2)); PUSH(features, CLUSTER(cluster, ctx.S0L)); PUSH(features, CLUSTER(cluster, ctx.S0R)); PUSH(features, CLUSTER(cluster, ctx.S0L2)); PUSH(features, CLUSTER(cluster, ctx.S0R2)); PUSH(features, CLUSTER(cluster, ctx.S0LL)); PUSH(feature...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dependency\nnparser\NeuralNetworkParser.java
1
请完成以下Java代码
class DancingNode { DancingNode L, R, U, D; ColumnNode C; DancingNode hookDown(DancingNode node) { assert (this.C == node.C); node.D = this.D; node.D.U = node; node.U = this; this.D = node; return node; } DancingNode hookRight(DancingNode node) { ...
void relinkLR() { this.L.R = this.R.L = this; } void unlinkUD() { this.U.D = this.D; this.D.U = this.U; } void relinkUD() { this.U.D = this.D.U = this; } DancingNode() { L = R = U = D = this; } DancingNode(ColumnNode c) { this(); ...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-2\src\main\java\com\baeldung\algorithms\sudoku\DancingNode.java
1
请完成以下Java代码
public List<FormProperty> getFormProperties() { return formProperties; } public void setFormProperties(List<FormProperty> formProperties) { this.formProperties = formProperties; } public StartEvent clone() { StartEvent clone = new StartEvent(); clone.setValues(this); ...
setFormKey(otherEvent.getFormKey()); setInterrupting(otherEvent.isInterrupting); formProperties = new ArrayList<FormProperty>(); if (otherEvent.getFormProperties() != null && !otherEvent.getFormProperties().isEmpty()) { for (FormProperty property : otherEvent.getFormProperties()) { ...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\StartEvent.java
1
请完成以下Java代码
public final class CrossOriginOpenerPolicyHeaderWriter implements HeaderWriter { private static final String OPENER_POLICY = "Cross-Origin-Opener-Policy"; private @Nullable CrossOriginOpenerPolicy policy; /** * Sets the {@link CrossOriginOpenerPolicy} value to be used in the * {@code Cross-Origin-Opener-Polic...
public String getPolicy() { return this.policy; } public static @Nullable CrossOriginOpenerPolicy from(String openerPolicy) { for (CrossOriginOpenerPolicy policy : values()) { if (policy.getPolicy().equals(openerPolicy)) { return policy; } } return null; } } }
repos\spring-security-main\web\src\main\java\org\springframework\security\web\header\writers\CrossOriginOpenerPolicyHeaderWriter.java
1
请完成以下Java代码
public LexicalAnalyzer getAnalyzer() { for (Pipe<List<IWord>, List<IWord>> pipe : this) { if (pipe instanceof LexicalAnalyzerPipe) { return ((LexicalAnalyzerPipe) pipe).analyzer; } } return null; } @Override public void...
@Override public String[] tag(List<String> wordList) { LexicalAnalyzer analyzer = getAnalyzer(); if (analyzer == null) throw new IllegalStateException("流水线中没有LexicalAnalyzerPipe"); return analyzer.tag(wordList); } @Override public NERTagSet getNERTagSet() { ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\tokenizer\pipe\LexicalAnalyzerPipeline.java
1
请在Spring Boot框架中完成以下Java代码
public String getTableName(final I_AD_InfoWindow infoWindow) { final Properties ctx = InterfaceWrapperHelper.getCtx(infoWindow); return Services.get(IADTableDAO.class).retrieveTableName(infoWindow.getAD_Table_ID()); } @Override public String getTreeColumnName(final I_AD_InfoWindow infoWindow) { final I_AD_I...
{ keyName = "M_ProductCategory_ID"; } final Properties ctx = InterfaceWrapperHelper.getCtx(infoWindow); final int adTreeId = MTree.getDefaultAD_Tree_ID(Env.getAD_Client_ID(ctx), keyName); return adTreeId; } @Override public boolean isShowTotals(final I_AD_InfoWindow infoWindow) { return false; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\service\impl\ADInfoWindowBL.java
2
请在Spring Boot框架中完成以下Java代码
public class Cat { @Value( "${cat.name}" ) private String name; @Value( "${cat.age}" ) private Integer age; public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getAge() { return age;
} public void setAge(Integer age) { this.age = age; } @Override public String toString() { final StringBuilder sb = new StringBuilder( "{\"Cat\":{" ); sb.append( "\"name\":\"" ) .append( name ).append( '\"' ); sb.append( ",\"age\":" ) .ap...
repos\SpringBootLearning-master (1)\springboot-config\src\main\java\com\gf\entity\Cat.java
2
请完成以下Java代码
default LocalDateTime getPreviousBusinessDay(@NonNull final LocalDateTime dateTime, final int targetWorkingDays) { final LocalDate previousDate = getPreviousBusinessDay(dateTime.toLocalDate(), targetWorkingDays); return LocalDateTime.of(previousDate, dateTime.toLocalTime()); } default ZonedDateTime getPrevious...
while (true) { currentDate = currentDate.minusDays(1); final boolean isBusinessDay = isBusinessDay(currentDate); if (isBusinessDay) { workingDays++; } if (workingDays >= targetWorkingDays && isBusinessDay) { return currentDate; } } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\calendar\IBusinessDayMatcher.java
1
请完成以下Java代码
public static void setJwtProperties(JwtProperties properties) { if (JwtUtil.jwtProperties == null) { JwtUtil.jwtProperties = properties; } } /** * 签名加密 */ public static String getBase64Security() { return Base64.getEncoder().encodeToString(getJwtProperties().getSignKey().getBytes(StandardCharsets.UTF_8...
if ((auth != null) && (auth.length() > AUTH_LENGTH)) { String headStr = auth.substring(0, 6).toLowerCase(); return headStr.compareTo(CRYPTO) == 0; } return false; } /** * 解析jsonWebToken * * @param jsonWebToken token串 * @return Claims */ public static Claims parseJWT(String jsonWebToken) { try ...
repos\SpringBlade-master\blade-gateway\src\main\java\org\springblade\gateway\utils\JwtUtil.java
1
请在Spring Boot框架中完成以下Java代码
public class DhlShipperGatewayClientFactory implements ShipperGatewayClientFactory { private final DhlClientConfigRepository configRepo; // Holds the DHL client config public DhlShipperGatewayClientFactory(@NonNull final DhlClientConfigRepository configRepo) { this.configRepo = configRepo; } @Override public...
private RestTemplate buildOAuth2RestTemplate(final DhlClientConfig clientConfig) { final RestTemplate restTemplate = new RestTemplate(); // Add the CustomOAuth2TokenRetriever to handle DHL's OAuth2 flow final CustomOAuth2TokenRetriever tokenRetriever = new CustomOAuth2TokenRetriever(new RestTemplate()); // A...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java\de\metas\shipper\gateway\dhl\DhlShipperGatewayClientFactory.java
2
请完成以下Java代码
protected org.compiere.model.POInfo initPO (Properties ctx) { org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName()); return poi; } /** Set Label. @param Label Label */ @Override public void setLabel (java.lang.String Label) { set_Value (COLUM...
set_ValueNoCheck (COLUMNNAME_M_Label_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Label_ID, Integer.valueOf(M_Label_ID)); } /** Get Label List. @return Label List */ @Override public int getM_Label_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Label_ID); if (ii == null) return 0; ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Label.java
1
请完成以下Java代码
public ResponseEntity<List<RoleDto>> queryAllRole(){ return new ResponseEntity<>(roleService.queryAll(),HttpStatus.OK); } @ApiOperation("查询角色") @GetMapping @PreAuthorize("@el.check('roles:list')") public ResponseEntity<PageResult<RoleDto>> queryRole(RoleQueryCriteria criteria, Pageable page...
} @Log("删除角色") @ApiOperation("删除角色") @DeleteMapping @PreAuthorize("@el.check('roles:del')") public ResponseEntity<Object> deleteRole(@RequestBody Set<Long> ids){ for (Long id : ids) { RoleDto role = roleService.findById(id); getLevels(role.getLevel()); } ...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\rest\RoleController.java
1
请完成以下Java代码
public String readFile() { BufferedReader reader = null; try { reader = new BufferedReader(new FileReader("src/main/resources/input.txt")); String content = readAllLines(reader); return content; } catch (IOException e) { e.printStackTrace(); ...
} } } public String readFileTryWithResources() { try (BufferedReader reader = new BufferedReader(new FileReader("src/main/resources/input.txt"))) { String content = readAllLines(reader); return content; } catch (IOException e) { e.printStackTrace(); ...
repos\tutorials-master\core-java-modules\core-java-io-apis\src\main\java\com\baeldung\bufferedreader\BufferedReaderExample.java
1
请在Spring Boot框架中完成以下Java代码
public void setDescription(String description) { this.description = description; } /** * Checks if is completed. * * @return true, if is completed */ public boolean isCompleted() { return completed; } /** * Sets the completed. * * @param completed the new completed */ public void setComplete...
final int prime = 31; int result = 1; result = prime * result + ((comments == null) ? 0 : comments.hashCode()); result = prime * result + (completed ? 1231 : 1237); result = prime * result + ((description == null) ? 0 : description.hashCode()); result = prime * result + ((taskId == null) ? 0 : taskId.hashCode...
repos\spring-boot-microservices-master\task-webservice\src\main\java\com\rohitghatol\microservices\task\dtos\TaskDTO.java
2
请完成以下Java代码
public class AD_User_Disable2FA_Admin extends JavaProcess implements IProcessPrecondition { private final User2FAService user2FAService = SpringContextHolder.instance.getBean(User2FAService.class); @Override public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsConte...
{ return ProcessPreconditionsResolution.rejectWithInternalReason("Already disabled"); } return ProcessPreconditionsResolution.accept(); } @Override protected String doIt() { final UserId userId = UserId.ofRepoId(getRecord_ID()); user2FAService.disable(userId); return MSG_OK; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\user_2fa\process\AD_User_Disable2FA_Admin.java
1
请在Spring Boot框架中完成以下Java代码
public boolean hasMatchInvs( @NonNull final InvoiceAndLineId invoiceAndLineId, @NonNull final InOutLineId inoutLineId, @Nullable final InOutCostId inoutCostId) { return matchInvoiceRepository.anyMatch( MatchInvQuery.builder() .type(inoutCostId == null ? MatchInvType.Material : MatchInvType.Cost) ...
public Optional<Money> getCostAmountMatched(@NonNull final InOutCostId inoutCostId) { final List<MatchInv> matchInvs = matchInvoiceRepository.list( MatchInvQuery.builder() .type(MatchInvType.Cost) .inoutCostId(inoutCostId) .build()); return matchInvs.stream() .map(matchInv -> matchInv.ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\matchinv\service\MatchInvoiceService.java
2
请完成以下Java代码
private List<String> getColumns(List<Field> fieldList) { // 构造列 List<String> columnList = CollUtil.newArrayList(); for (Field field : fieldList) { Column columnAnnotation = field.getAnnotation(Column.class); String columnName; if (ObjectUtil.isNotNull(columnAn...
Field[] fields = ReflectUtil.getFields(t.getClass()); // 过滤数据库中不存在的字段,以及自增列 List<Field> filterField; Stream<Field> fieldStream = CollUtil.toList(fields).stream().filter(field -> ObjectUtil.isNull(field.getAnnotation(Ignore.class)) || ObjectUtil.isNull(field.getAnnotation(Pk.class))); /...
repos\spring-boot-demo-master\demo-orm-jdbctemplate\src\main\java\com\xkcoding\orm\jdbctemplate\dao\base\BaseDao.java
1
请完成以下Java代码
public boolean isCoProduct() { return getComponentType().isCoProduct(); } public boolean isByProduct() { return getComponentType().isByProduct(); } public boolean isVariant() { return getComponentType().isVariant(); } public Quantity getQtyIncludingScrap() { return getQty().add(getScrapPercent()); ...
if (isByProduct()) { costPrice = costPriceHolder.getCostPrice().withZeroComponentsCostPrice(); } else { costPrice = costPriceHolder.getCostPrice(); } final Quantity qty = getQtyIncludingScrap(); return costPrice.multiply(qty); } void setComponentsCostPrice( @NonNull final CostAmount elementCo...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\costing\BOMLine.java
1
请完成以下Java代码
protected static ActivityExecutionTuple createTuple(ActivityExecution execution) { PvmScope flowScope = getCurrentFlowScope(execution); return new ActivityExecutionTuple(flowScope, execution); } protected static PvmScope getCurrentFlowScope(ActivityExecution execution) { ScopeImpl scope = null; if(...
@Override public void visit(ActivityExecutionTuple tuple) { collector.visit(tuple.getExecution()); } } private class ScopeVisitorWrapper implements TreeVisitor<ActivityExecutionTuple> { private final TreeVisitor<PvmScope> collector; public ScopeVisitorWrapper(TreeVisitor<PvmScope> collector...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\tree\ActivityExecutionHierarchyWalker.java
1
请完成以下Java代码
public class ArrayOperations { public static Integer[] addElementUsingPureJava(Integer[] srcArray, int elementToAdd) { Integer[] destArray = new Integer[srcArray.length + 1]; for (int i = 0; i < srcArray.length; i++) { destArray[i] = srcArray[i]; } destArray[destArray....
destArray[i] = newElement; } else { destArray[i] = srcArray[j]; j++; } } return destArray; } public static int[] prependAnElementToArray(int[] srcArray, int element) { int[] newArray = new int[srcArray.length + 1]; newArr...
repos\tutorials-master\core-java-modules\core-java-arrays-operations-basic-3\src\main\java\com\baeldung\array\operations\ArrayOperations.java
1
请完成以下Java代码
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Notice. @param Notice Contains last write notice */ public void setNotice (String Notice) { set_Value (COLUMNNAME_Notice, Notice); } /** Get Notice. @return Contains last write notice */ ...
{ set_Value (COLUMNNAME_StructureXML, StructureXML); } /** Get StructureXML. @return Autogenerated Containerdefinition as XML Code */ public String getStructureXML () { return (String)get_Value(COLUMNNAME_StructureXML); } /** Set Title. @param Title Name this entity is referred to as */ publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Container.java
1
请在Spring Boot框架中完成以下Java代码
public SysCheckRule getByCode(String ruleCode) { LambdaQueryWrapper<SysCheckRule> queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(SysCheckRule::getRuleCode, ruleCode); return super.getOne(queryWrapper); } /** * 通过用户设定的自定义校验规则校验传入的值 * * @param checkRule * @...
if (CHECK_ALL_SYMBOL.equals(digits)) { checkValue = value; } else { int num = Integer.parseInt(digits); int endIndex = beginIndex + num; // 如果结束下标大于给定的值的长度,则取到最后一位 endIndex = endIn...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysCheckRuleServiceImpl.java
2
请完成以下Java代码
public void setC_Payment_Reservation_ID (final int C_Payment_Reservation_ID) { if (C_Payment_Reservation_ID < 1) set_Value (COLUMNNAME_C_Payment_Reservation_ID, null); else set_Value (COLUMNNAME_C_Payment_Reservation_ID, C_Payment_Reservation_ID); } @Override public int getC_Payment_Reservation_ID() ...
{ return get_ValueAsString(COLUMNNAME_PayPal_OrderJSON); } @Override public void setPayPal_PayerApproveUrl (final @Nullable java.lang.String PayPal_PayerApproveUrl) { set_Value (COLUMNNAME_PayPal_PayerApproveUrl, PayPal_PayerApproveUrl); } @Override public java.lang.String getPayPal_PayerApproveUrl() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java-gen\de\metas\payment\paypal\model\X_PayPal_Order.java
1
请完成以下Java代码
public static Pageable of(int limit, int offset) { return new OffsetBasedPageable(limit, offset, Sort.unsorted()); } public static Pageable of(int limit, int offset, Sort sort) { return new OffsetBasedPageable(limit, offset, sort); } @Override public int getPageNumber() { t...
@Override public Pageable first() { throw unsupportedOperation(); } @Override public Pageable withPage(int pageNumber) { throw unsupportedOperation(); } @Override public boolean hasPrevious() { throw unsupportedOperation(); } private UnsupportedOperationExc...
repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\lib\OffsetBasedPageable.java
1
请完成以下Java代码
final public I_M_Replenish createNewReplenish(@NonNull final I_I_Replenish importRecord) { final I_M_Replenish replenish = InterfaceWrapperHelper.newInstance(I_M_Replenish.class, importRecord); setReplenishmenttValueFields(importRecord, replenish); return replenish; } final public I_M_Replenish uppdateRepleni...
replenish.setReplenishType(importRecord.getReplenishType()); replenish.setTimeToMarket(importRecord.getTimeToMarket()); // optional fields if (importRecord.getM_Locator_ID() > 0) { replenish.setM_Locator_ID(importRecord.getM_Locator_ID()); } if (importRecord.getC_Period_ID() > 0) { replenish.setC_P...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\replenishment\impexp\ReplenishImportHelper.java
1
请完成以下Java代码
private JavaType getClassIdType(String classId) { if (getIdClassMapping().containsKey(classId)) { return TypeFactory.defaultInstance().constructType(getIdClassMapping().get(classId)); } else { try { if (!isTrustedPackage(classId)) { throw new IllegalArgumentException("The class '" + classId ...
@Override public void fromJavaType(JavaType javaType, Headers headers) { String classIdFieldName = getClassIdFieldName(); if (headers.lastHeader(classIdFieldName) != null) { removeHeaders(headers); } addHeader(headers, classIdFieldName, javaType.getRawClass()); if (javaType.isContainerType() && !javaTyp...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\mapping\DefaultJackson2JavaTypeMapper.java
1
请完成以下Java代码
private static class AuthenticatingServerCallListener<ReqT> extends AbstractAuthenticatingServerCallListener<ReqT> { private final SecurityContext securityContext; /** * Creates a new AuthenticatingServerCallListener which will attach the given security context before delegating * to...
SecurityContextHolder.clearContext(); } @Override public void onHalfClose() { try { super.onHalfClose(); } catch (final AccessDeniedException e) { if (this.securityContext.getAuthentication() instanceof AnonymousAuthenticationToken) { ...
repos\grpc-spring-master\grpc-server-spring-boot-starter\src\main\java\net\devh\boot\grpc\server\security\interceptors\DefaultAuthenticatingServerInterceptor.java
1
请完成以下Java代码
public ZonedDateTime getParameterAsZonedDateTime(final String parameterName) { return params.getParameterAsZonedDateTime(parameterName); } @Nullable @Override public Instant getParameterAsInstant(final String parameterName) { return params.getParameterAsInstant(parameterName); } @Override public boolean ...
return params.getParameterAsBool(parameterName); } @Nullable @Override public Boolean getParameterAsBoolean(final String parameterName, @Nullable final Boolean defaultValue) { return params.getParameterAsBoolean(parameterName, defaultValue); } @Override public <T extends Enum<T>> Optional<T> getParameterAsE...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\api\ForwardingParams.java
1
请完成以下Java代码
public KPIDataSet build() { return new KPIDataSet(this); } public KPIDataSetBuilder name(final String name) { this.name = name; return this; } public KPIDataSetBuilder unit(@Nullable final String unit) { this.unit = unit; return this; } public KPIDataSetValuesMap.KPIDataSetValuesMapB...
{ return valuesByKey.computeIfAbsent(dataSetValueKey, KPIDataSetValuesMap::builder); } public void putValue(@NonNull final KPIDataSetValuesAggregationKey dataSetValueKey, @NonNull final String fieldName, @NonNull final KPIDataValue value) { dataSetValue(dataSetValueKey).put(fieldName, value); } public...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\kpi\data\KPIDataSet.java
1
请完成以下Java代码
public I_M_ShipmentSchedule getShipmentScheduleById(@NonNull final ShipmentScheduleId shipmentScheduleId) { return shipmentSchedulesById.computeIfAbsent(shipmentScheduleId, shipmentScheduleBL::getById); } public OrgId getOrgId(@NonNull final ShipmentScheduleId shipmentScheduleId) { final I_M_ShipmentSchedule s...
{ return shipperDAO.getByInternalName(ImmutableSet.of(shipperInternalName)).get(shipperInternalName); } public ProductId getProductId(@NonNull final ShipmentScheduleId shipmentScheduleId) { final I_M_ShipmentSchedule shipmentSchedule = getShipmentScheduleById(shipmentScheduleId); return ProductId.ofRepoId(shi...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\api\ShippingInfoCache.java
1
请完成以下Java代码
public T findOne(final long id) { return (T) getCurrentSession().get(clazz, id); } public List<T> findAll() { return getCurrentSession().createQuery("from " + clazz.getName()).list(); } public T create(final T entity) { Preconditions.checkNotNull(entity); getCurrentSess...
public void delete(final T entity) { Preconditions.checkNotNull(entity); getCurrentSession().delete(entity); } public void deleteById(final long entityId) { final T entity = findOne(entityId); Preconditions.checkState(entity != null); delete(entity); } protected...
repos\tutorials-master\persistence-modules\spring-jpa\src\main\java\com\baeldung\spring\hibernate\AbstractHibernateDao.java
1
请完成以下Java代码
public static final InvoiceCandRecomputeTag ofPInstanceId(@Nullable final PInstanceId pinstanceId) { return new InvoiceCandRecomputeTag(pinstanceId); } /** * Creates an {@link InvoiceCandRecomputeTag} from a string created with {@link InvoiceCandRecomputeTag#asString()}. */ public static final InvoiceCandRec...
private InvoiceCandRecomputeTag(@Nullable final PInstanceId pinstanceId) { this.pinstanceId = pinstanceId; } @Override public final String toString() { return asString(); } /** * @return tag as string * @see #fromString(String) */ public final String asString() { if (pinstanceId == null) { r...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\InvoiceCandRecomputeTag.java
1
请完成以下Java代码
public class PlanItemControl extends CaseElement { protected RequiredRule requiredRule; protected RepetitionRule repetitionRule; protected ManualActivationRule manualActivationRule; protected CompletionNeutralRule completionNeutralRule; protected ParentCompletionRule parentCompletionRule; p...
} public void setCompletionNeutralRule(CompletionNeutralRule completionNeutralRule) { this.completionNeutralRule = completionNeutralRule; } public ParentCompletionRule getParentCompletionRule() { return parentCompletionRule; } public void setParentCompletionRule(ParentCompletionRu...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\PlanItemControl.java
1
请完成以下Java代码
public List<List<String>> getDeployments() { List<Deployment> deployments = repositoryService.createDeploymentQuery().list(); List<List<String>> result = new ArrayList<>(deployments.size()); for (Deployment deployment : deployments) { List<String> item = new ArrayList<>(3); ...
repositoryService.suspendProcessDefinitionByKey(processDefinitionKey); } @ManagedOperation(description = "Activate given process ID") public void activatedProcessDefinitionByKey(String processDefinitionKey) { repositoryService.activateProcessDefinitionByKey(processDefinitionKey); } @Manage...
repos\flowable-engine-main\modules\flowable-jmx\src\main\java\org\flowable\management\jmx\mbeans\ProcessDefinitionsMBean.java
1
请在Spring Boot框架中完成以下Java代码
public class MaterialCockpitViewsIndexStorage implements IViewsIndexStorage { private final DefaultViewsRepositoryStorage defaultViewsRepositoryStorage = new DefaultViewsRepositoryStorage(Duration.ofHours(1)); public MaterialCockpitViewsIndexStorage() { CacheMgt.get().addCacheResetListener(I_MD_Cockpit.Table_Name...
public void put(final IView view) { defaultViewsRepositoryStorage.put(view); } @Nullable @Override public IView getByIdOrNull(final ViewId viewId) { return defaultViewsRepositoryStorage.getByIdOrNull(viewId); } @Override public void closeById(@NonNull final ViewId viewId, @NonNull final ViewCloseAction c...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\MaterialCockpitViewsIndexStorage.java
2
请完成以下Java代码
public int getM_Package_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Package_ID); if (ii == null) return 0; return ii.intValue(); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), S...
@return The detail content of the Package */ public int getM_PackageLine_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_PackageLine_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Quantity. @param Qty Quantity */ public void setQty (BigDecimal Qty) { set_Value (COLUMN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PackageLine.java
1
请完成以下Java代码
public class MybatisSuspendedJobDataManager extends AbstractDataManager<SuspendedJobEntity> implements SuspendedJobDataManager { protected CachedEntityMatcher<SuspendedJobEntity> suspendedJobsByExecutionIdMatcher = new SuspendedJobsByExecutionIdMatcher(); public MybatisSuspendedJobDataManager(...
} @Override public long findJobCountByQueryCriteria(SuspendedJobQueryImpl jobQuery) { return (Long) getDbSqlSession().selectOne("selectSuspendedJobCountByQueryCriteria", jobQuery); } @Override public List<SuspendedJobEntity> findJobsByExecutionId(final String executionId) { return ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\data\impl\MybatisSuspendedJobDataManager.java
1
请完成以下Java代码
public ShipperId getShipperId(@Nullable final String shipperInternalName) { if (Check.isBlank(shipperInternalName)) { return null; } final I_M_Shipper shipper = shipperByInternalName.computeIfAbsent(shipperInternalName, this::loadShipper); return shipper != null ? ShipperId.ofRepoId(shipper....
{ final I_M_Shipper shipper = shipperByInternalName.computeIfAbsent(shipperInternalName, this::loadShipper); return shipper != null ? shipper.getTrackingURL() : null; } @Nullable private I_M_Shipper loadShipper(@NonNull final String shipperInternalName) { return shipperDAO.getByInternalName...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\shipping\ShipmentService.java
1
请完成以下Java代码
public void setDescription (final @Nullable java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return get_ValueAsString(COLUMNNAME_Description); } @Override public void setES_CreateIndexCommand (final java.lang.String ES...
{ if (ES_FTS_Config_ID < 1) set_ValueNoCheck (COLUMNNAME_ES_FTS_Config_ID, null); else set_ValueNoCheck (COLUMNNAME_ES_FTS_Config_ID, ES_FTS_Config_ID); } @Override public int getES_FTS_Config_ID() { return get_ValueAsInt(COLUMNNAME_ES_FTS_Config_ID); } @Override public void setES_Index (final j...
repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java-gen\de\metas\elasticsearch\model\X_ES_FTS_Config.java
1
请在Spring Boot框架中完成以下Java代码
static class InternalInterceptMethodsBeanDefinitionDecorator extends AbstractInterceptorDrivenBeanDefinitionDecorator { static final String ATT_METHOD = "method"; static final String ATT_ACCESS = "access"; private static final String ATT_ACCESS_MGR = "access-decision-manager-ref"; @Override protected B...
// Support inference of class names String methodName = protectmethodElt.getAttribute(ATT_METHOD); if (methodName.lastIndexOf(".") == -1) { if (parentBeanClass != null && !"".equals(parentBeanClass)) { methodName = parentBeanClass + "." + methodName; } } mappings.put(methodName, attribut...
repos\spring-security-main\config\src\main\java\org\springframework\security\config\method\InterceptMethodsBeanDefinitionDecorator.java
2
请在Spring Boot框架中完成以下Java代码
public class AuditEventService { private final PersistenceAuditEventRepository persistenceAuditEventRepository; private final AuditEventConverter auditEventConverter; public AuditEventService( PersistenceAuditEventRepository persistenceAuditEventRepository, AuditEventConverter auditEventC...
.map(auditEventConverter::convertToAuditEvent); } public Page<AuditEvent> findByDates(Instant fromDate, Instant toDate, Pageable pageable) { return persistenceAuditEventRepository.findAllByAuditEventDateBetween(fromDate, toDate, pageable) .map(auditEventConverter::convertToAuditEvent); ...
repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\service\AuditEventService.java
2
请在Spring Boot框架中完成以下Java代码
public String getTaskId() { return taskId; } /** * @param taskId * the taskId to set */ public void setTaskId(String taskId) { this.taskId = taskId; } /** * @return the comment */ @JsonProperty(JP_COMMENT) public String getComment() { return comment; } /** * @param comment * ...
if (getClass() != obj.getClass()) return false; CommentResource other = (CommentResource) obj; if (comment == null) { if (other.comment != null) return false; } else if (!comment.equals(other.comment)) return false; if (posted == null) { if (other.posted != null) return false; } else if (!...
repos\spring-boot-microservices-master\task-webservice\src\main\java\com\rohitghatol\microservices\task\model\CommentResource.java
2
请完成以下Java代码
private boolean hasBusinessPartnerBankAccount(@NonNull final I_C_PaySelectionLine line) { return BankAccountId.ofRepoIdOrNull(line.getC_BP_BankAccount_ID()) != null; } private boolean isOrderPaySelectionLine(@NonNull final I_C_PaySelectionLine line) { return paySelectionBL.extractType(line) == PaySelectionLine...
} private @Nullable String extractSwiftCode(@NonNull final BankAccount bpBankAccount) { return Optional.ofNullable(bpBankAccount.getBankId()) .map(bankRepo::getById) .map(bank -> toNullOrRemoveSpaces(bank.getSwiftCode())) .orElse(null); } @Value @Builder private static class InvoicePaySelectionLin...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java\de\metas\payment\sepa\api\impl\CreateSEPAExportFromPaySelectionCommand.java
1
请在Spring Boot框架中完成以下Java代码
public class BookServiceImpl implements BookService { private final BookRepository bookRepository; public BookServiceImpl(BookRepository bookRepository) { this.bookRepository = bookRepository; } @Override public Collection<Book> getBooks() { return bookRepository.findAll() ...
final Optional<BookData> existingBook = bookRepository.findById(book.getIsbn()); if (existingBook.isPresent()) { throw new DuplicateBookException(book); } final BookData savedBook = bookRepository.add(convertBook(book)); return convertBookData(savedBook); } private ...
repos\tutorials-master\spring-boot-modules\spring-boot-jsp\src\main\java\com\baeldung\boot\jsp\service\impl\BookServiceImpl.java
2
请完成以下Java代码
public void register(final String tableName, final IGridTabSummaryInfoProvider summaryInfoProvider) { final boolean forceOverride = false; register(tableName, summaryInfoProvider, forceOverride); } @Override public void register(final String tableName, final IGridTabSummaryInfoProvider summaryInfoProvider, fin...
} @Override public IGridTabSummaryInfoProvider getSummaryInfoProvider(final GridTab gridTab) { Check.assumeNotNull(gridTab, "gridTab not null"); final ArrayKey key = mkKey(gridTab.getTableName()); final IGridTabSummaryInfoProvider provider = providers.get(key); if (provider == null) { return defaultPr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ui\api\impl\GridTabSummaryInfoFactory.java
1
请在Spring Boot框架中完成以下Java代码
private static class CustomerReturnLineGroupingKey { @NonNull OrgId orgId; @NonNull BPartnerLocationId bPartnerLocationId; @NonNull ReturnedGoodsWarehouseType warehouseType; @Nullable OrderId orderId; @Nullable LocalDate movementDate; @Nullable ZonedDateTime dateReceived; @Nullable St...
String externalResourceURL; public static CustomerReturnLineGroupingKey of(@NonNull final CustomerReturnLineCandidate returnLineCandidate) { return CustomerReturnLineGroupingKey.builder() .orgId(returnLineCandidate.getOrgId()) .bPartnerLocationId(returnLineCandidate.getBPartnerLocationId()) .orde...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\returns\customer\CustomerReturnsWithoutHUsProducer.java
2
请完成以下Java代码
public Object pointcut(ProceedingJoinPoint point) throws Throwable { MethodSignature signature = (MethodSignature) point.getSignature(); Method method = signature.getMethod(); // 通过 AnnotationUtils.findAnnotation 获取 RateLimiter 注解 RateLimiter rateLimiter = AnnotationUtils.findAnnotation(...
private boolean shouldLimited(String key, long max, long timeout, TimeUnit timeUnit) { // 最终的 key 格式为: // limit:自定义key:IP // limit:类名.方法名:IP key = REDIS_LIMIT_KEY_PREFIX + key; // 统一使用单位毫秒 long ttl = timeUnit.toMillis(timeout); // 当前时间毫秒数 long now = Instan...
repos\spring-boot-demo-master\demo-ratelimit-redis\src\main\java\com\xkcoding\ratelimit\redis\aspect\RateLimiterAspect.java
1
请完成以下Java代码
protected String doIt() throws Exception { final InvoiceId fromInvoiceId = InvoiceId.ofRepoId(fromInvoiceRepoId); final InvoiceId toInvoiceID = InvoiceId.ofRepoId(getRecord_ID()); final boolean alreadyExists = recordAlreadyExists(fromInvoiceId, toInvoiceID, relationToCreate); if (alreadyExists) { return ...
if (fromInvoiceId != null) { queryBuilder.addEqualsFilter(I_C_Invoice_Relation.COLUMNNAME_C_Invoice_From_ID, fromInvoiceId); } return queryBuilder.create() .anyMatch(); } private I_C_Invoice_Relation createRelation(@NonNull final I_C_Invoice toInvoice) { final I_C_Invoice_Relation invoiceRelation = I...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\process\C_Invoice_CreateRelation.java
1
请完成以下Java代码
public class ProcessExport implements BpmnXMLConstants { /** * default attributes taken from process instance attributes */ public static final List<ExtensionAttribute> defaultProcessAttributes = asList( new ExtensionAttribute(ATTRIBUTE_ID), new ExtensionAttribute(ATTRIBUTE_NAME), ...
); } if (!process.getCandidateStarterGroups().isEmpty()) { xtw.writeAttribute( ACTIVITI_EXTENSIONS_PREFIX, ACTIVITI_EXTENSIONS_NAMESPACE, ATTRIBUTE_PROCESS_CANDIDATE_GROUPS, BpmnXMLUtil.convertToDelimitedString(process.getCandi...
repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\export\ProcessExport.java
1
请完成以下Java代码
public WindowId getWindowId() { return WINDOW_ID; } @Override public void put(final IView view) { views.put(view); } @Nullable @Override public PaymentsView getByIdOrNull(final ViewId viewId) { return PaymentsView.cast(views.getByIdOrNull(viewId)); } @Override public void closeById(final ViewId vi...
views.closeById(viewId, closeAction); } @Override public Stream<IView> streamAllViews() { return views.streamAllViews(); } @Override public void invalidateView(final ViewId viewId) { views.invalidateView(viewId); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\PaymentsViewFactory.java
1
请完成以下Java代码
public class User extends AbstractAuditModel { /** * 用户名 */ private String name; /** * 加密后的密码 */ private String password; /** * 加密使用的盐 */ private String salt; /** * 邮箱 */ private String email; /** * 手机号码 */ @Column(name = "pho...
/** * 上次登录时间 */ @Column(name = "last_login_time") private Date lastLoginTime; /** * 关联部门表 * 1、关系维护端,负责多对多关系的绑定和解除 * 2、@JoinTable注解的name属性指定关联表的名字,joinColumns指定外键的名字,关联到关系维护端(User) * 3、inverseJoinColumns指定外键的名字,要关联的关系被维护端(Department) * 4、其实可以不使用@JoinTable注解,默认生成的关联表名称为主表表名...
repos\spring-boot-demo-master\demo-orm-jpa\src\main\java\com\xkcoding\orm\jpa\entity\User.java
1
请完成以下Java代码
public FilterDto createFilter(FilterDto filterDto) { FilterService filterService = getProcessEngine().getFilterService(); String resourceType = filterDto.getResourceType(); Filter filter; if (EntityTypes.TASK.equals(resourceType)) { filter = filterService.newTaskFilter(); } else { ...
ResourceOptionsDto resourceOptionsDto = new ResourceOptionsDto(); // GET / URI baseUri = baseUriBuilder.build(); resourceOptionsDto.addReflexiveLink(baseUri, HttpMethod.GET, "list"); // GET /count URI countUri = baseUriBuilder.clone().path("/count").build(); resourceOptionsDto.addReflexiveLink...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\FilterRestServiceImpl.java
1
请完成以下Java代码
public class HeaderEnricherProcessor<K, V> extends ContextualProcessor<K, V, K, V> { private final Map<String, Expression> headerExpressions = new HashMap<>(); /** * Construct an instance with the provided header expressions. * @param headerExpressions the header expressions; name:expression. */ public Heade...
* */ public static final class Container<K, V> { private final ProcessorContext<K, V> context; private final K key; private final V value; private final Record<K, V> record; Container(ProcessorContext<K, V> context, K key, V value, Record<K, V> record) { this.context = context; this.key = key; ...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\streams\HeaderEnricherProcessor.java
1
请在Spring Boot框架中完成以下Java代码
public class M_FreightCostDetail { private final ICountryAreaBL countryAreaBL = Services.get(ICountryAreaBL.class); private final ICountryDAO countryDAO = Services.get(ICountryDAO.class); public M_FreightCostDetail() { final IProgramaticCalloutProvider programaticCalloutProvider = Services.get(IProgramaticCallou...
{ final CountryId countryId = CountryId.ofRepoIdOrNull(detail.getC_Country_ID()); final CountryAreaId countryAreaId = CountryAreaId.ofRepoIdOrNull(detail.getC_CountryArea_ID()); if (countryId != null && countryAreaId != null) { detail.setC_Country_ID(CountryId.toRepoId(null)); } } @ModelChange(timings ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\freighcost\interceptor\M_FreightCostDetail.java
2
请在Spring Boot框架中完成以下Java代码
public boolean isTransacted() { return this.transacted; } public void setTransacted(boolean transacted) { this.transacted = transacted; } } } public enum DeliveryMode { /** * Does not require that the message be logged to stable storage. This is the * lowest-overhead delivery mode but ...
* Instructs the JMS provider to log the message to stable storage as part of the * client's send operation. */ PERSISTENT(2); private final int value; DeliveryMode(int value) { this.value = value; } public int getValue() { return this.value; } } }
repos\spring-boot-4.0.1\module\spring-boot-jms\src\main\java\org\springframework\boot\jms\autoconfigure\JmsProperties.java
2
请在Spring Boot框架中完成以下Java代码
public void setCreater(String creater) { this.creater = creater; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public String getEditor() { return editor; } public void setEditor(String editor) { this.editor = edito...
return editTime; } public void setEditTime(Date editTime) { this.editTime = editTime; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } }
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\entity\PermissionBaseEntity.java
2
请完成以下Java代码
public int getHR_ListLine_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_HR_ListLine_ID); if (ii == null) return 0; return ii.intValue(); } public org.eevolution.model.I_HR_ListVersion getHR_ListVersion() throws RuntimeException { return (org.eevolution.model.I_HR_ListVersion)MTable.get(getCtx(...
@return Min Value */ public BigDecimal getMinValue () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MinValue); if (bd == null) return Env.ZERO; return bd; } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Nam...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_ListLine.java
1
请完成以下Java代码
public class Combinatorics { public static List<List<Integer>> permutations(List<Integer> sequence) { List<List<Integer>> results = new ArrayList<>(); permutationsInternal(sequence, results, 0); return results; } private static void permutationsInternal(List<Integer> sequence, List...
results.add(new ArrayList<>(accumulator)); } else if (leftToAccumulate <= possibleToAcculumate) { combinationsInternal(inputSet, k, results, accumulator, index + 1); accumulator.add(inputSet.get(index)); combinationsInternal(inputSet, k, results, accumulator, index + 1); ...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-5\src\main\java\com\baeldung\algorithms\combinatorics\Combinatorics.java
1
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public String getSource() { return source;
} public void setSource(String source) { this.source = source; } public String getDestination() { return destination; } public void setDestination(String destination) { this.destination = destination; } }
repos\tutorials-master\core-java-modules\core-java-collections-list-3\src\main\java\com\baeldung\list\listvsarraylist\Passenger.java
1
请在Spring Boot框架中完成以下Java代码
private synchronized void rollback() { items.clear(); } /** * Gets the current state for given transactional item. * * @param item * @return current stateș never returns null. */ public synchronized PackingItem getState(final TransactionalPackingItem item) { final long id = item.getId(); ItemState...
private final Reference<TransactionalPackingItem> transactionalItemRef; private final PackingItem state; public ItemState(final TransactionalPackingItem transactionalItem) { super(); // NOTE: we keep a weak reference to our transactional item // because in case nobody is referencing it, there is no poin...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\picking\service\TransactionalPackingItemSupport.java
2
请完成以下Java代码
public I_C_OrderLine getC_OrderLine() { return orderLine; } @Override public List<I_M_HU_PackingMaterial> getM_HU_PackingMaterials() { return packingMaterials; } @Override public BigDecimal getQty() { // TODO: why not using getQtyEnteredTU? // yes, why not indeed? final BigDecimal qtyItemCapacity ...
if (luPIId == null) { return null; } return packingMaterialDAO.getLUPIItemForHUPI(BPartnerId.ofRepoId(orderLine.getC_BPartner_ID()), luPIId) .map(HuPackingMaterial::getProductId) .orElse(null); } @Override public BigDecimal getQtyLU() { return orderLine.getQtyLU(); } @Override public String ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\order\api\impl\OrderLinePackingMaterialDocumentLineSource.java
1
请完成以下Java代码
public boolean isWithoutTenantId() { return withoutTenantId; } public String getAuthorizationUserId() { return authorizationUserId; } public String getProcDefId() { return procDefId; } public String getEventSubscriptionName() { return eventSubscriptionName; ...
return eventSubscriptionType; } public ProcessDefinitionQueryImpl startableByUser(String userId) { if (userId == null) { throw new ActivitiIllegalArgumentException("userId is null"); } this.authorizationUserId = userId; return this; } public ProcessDefinitio...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\ProcessDefinitionQueryImpl.java
1