instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public class SecurityConfig {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http, LogoutSuccessHandler webSecurityUserLogoutHandler)
throws Exception {
http
.authorizeHttpRequests((authz) -> authz
.requestMatchers("/").hasRole("USER")
.requestMatche... | @Bean
@Profile("jdbc")
public UserDetailsManager jdbcUserDetailsManager(DataSource dataSource, PasswordEncoder passwordEncoder) {
JdbcUserDetailsManager jdbcUserDetailsManager = new JdbcUserDetailsManager(dataSource);
UserDetails user = User.builder()
.username("user")
.passw... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-5\src\main\java\com\baeldung\securityconfig\configuration\SecurityConfig.java | 2 |
请完成以下Java代码 | public int getProcessVariablesIndex() {
return processVariablesIndex;
}
public int getProcessIdIndex() {
return processIdIndex;
}
public boolean requiresProcessId() {
return this.processIdIndex > -1;
}
public boolean requiresProcessVariablesMap() {
return processVariablesIndex > -1;
}
public String ... | return stateName;
}
public String getProcessName() {
return processName;
}
@Override
public String toString() {
return super.toString() + "["
+ "processVariablesExpected=" + processVariablesExpected + ", "
+ "handlerMethod=" + handlerMethod + ", "
+ "handler=" + handler + ", "
... | repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\components\registry\ActivitiStateHandlerRegistration.java | 1 |
请完成以下Java代码 | protected static String getValue(String attrName, Attributes attributes) {
Attribute attribute = attributes.get(attrName);
if (attribute != null) {
try {
return (String) attribute.get();
} catch (NamingException e) {
throw new IdentityProviderException("Error occurred while retrievin... | if (attributes != null) {
Attribute memberAttribute = attributes.get(attributeId);
if (memberAttribute != null) {
try {
return (NamingEnumeration<String>) memberAttribute.getAll();
} catch (NamingException e) {
throw new IdentityProviderException("Value couldn't be retrie... | repos\camunda-bpm-platform-master\engine-plugins\identity-ldap\src\main\java\org\camunda\bpm\identity\impl\ldap\LdapClient.java | 1 |
请完成以下Java代码 | public Integer getHistoryTimeToLive() {
return historyTimeToLive;
}
public void setHistoryTimeToLive(Integer historyTimeToLive) {
this.historyTimeToLive = historyTimeToLive;
}
public long getFinishedBatchesCount() {
return finishedBatchesCount;
}
public void setFinishedBatchesCount(long finis... | return engine.getHistoryService().createCleanableHistoricBatchReport();
}
public static List<CleanableHistoricBatchReportResultDto> convert(List<CleanableHistoricBatchReportResult> reportResult) {
List<CleanableHistoricBatchReportResultDto> dtos = new ArrayList<CleanableHistoricBatchReportResultDto>();
for ... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\batch\CleanableHistoricBatchReportResultDto.java | 1 |
请完成以下Java代码 | public void createOrUpdatePayment(@NonNull final POSPaymentExternalId externalId, @NonNull final UnaryOperator<POSPayment> updater)
{
final int paymentIdx = getPaymentIndexByExternalId(externalId).orElse(-1);
updatePaymentByIndex(paymentIdx, updater);
}
public void updatePaymentByExternalId(@NonNull final POSPa... | }
throw new AdempiereException("No payment found for " + posPaymentId + " in " + payments);
}
private OptionalInt getPaymentIndexByExternalId(final @NonNull POSPaymentExternalId externalId)
{
for (int i = 0; i < payments.size(); i++)
{
if (POSPaymentExternalId.equals(payments.get(i).getExternalId(), exter... | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSOrder.java | 1 |
请完成以下Java代码 | public class MResourceUnAvailable extends X_S_ResourceUnAvailable
{
/**
*
*/
private static final long serialVersionUID = 5532695704071630122L;
/**
* Check if a resource is not available
*/
public static boolean isUnAvailable(final int resourceRepoId, @NonNull Instant date)
{
Check.assumeGreaterThanZer... | protected boolean beforeSave(boolean newRecord)
{
if (getDateTo() == null)
setDateTo(getDateFrom());
if (getDateFrom().after(getDateTo()))
{
throw new AdempiereException("@DateTo@ > @DateFrom@");
}
return true;
} // beforeSave
/**
* Check if the resource is unavailable for date
* @return true if... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MResourceUnAvailable.java | 1 |
请完成以下Spring Boot application配置 | spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/springbatch
username: root
password: 123456
batch:
jdbc:
schema: classpath:org/springframework/batch/core/schema-mysql.sql
initialize- | schema: always #Since Spring Boot 2.5.0 use spring.batch.jdbc.initialize-schema=never
job:
enabled: true | repos\springboot-demo-master\SpringBatch\src\main\resources\application.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable Boolean getSignRequest() {
return this.signRequest;
}
public void setSignRequest(@Nullable Boolean signRequest) {
this.signRequest = signRequest;
}
}
/**
* Verification details for an Identity Provider.
*/
public static class Verification {
/**
* Credentials used... | * Location where SAML2 LogoutRequest gets sent to.
*/
private @Nullable String url;
/**
* Location where SAML2 LogoutResponse gets sent to.
*/
private @Nullable String responseUrl;
/**
* Whether to redirect or post logout requests.
*/
private @Nullable Saml2MessageBinding binding;
public @... | repos\spring-boot-4.0.1\module\spring-boot-security-saml2\src\main\java\org\springframework\boot\security\saml2\autoconfigure\Saml2RelyingPartyProperties.java | 2 |
请完成以下Java代码 | public void info(final int WindowNo, final String AD_Message, final String message)
{
getCurrentInstance().info(WindowNo, AD_Message, message);
}
@Override
public IAskDialogBuilder ask()
{
return getCurrentInstance().ask();
}
@Override
public boolean ask(final int WindowNo, final String AD_Message)
{
r... | getCurrentInstance().downloadNow(content, contentType, filename);
}
@Override
public void invokeLater(final int windowNo, final Runnable runnable)
{
getCurrentInstance().invokeLater(windowNo, runnable);
}
@Override
public Thread createUserThread(final Runnable runnable, final String threadName)
{
return g... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\form\AbstractClientUI.java | 1 |
请完成以下Java代码 | public void setM_Nutrition_Fact_ID (int M_Nutrition_Fact_ID)
{
if (M_Nutrition_Fact_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Nutrition_Fact_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Nutrition_Fact_ID, Integer.valueOf(M_Nutrition_Fact_ID));
}
/** Get Nutrition Fact.
@return Nutrition Fact */
@Ove... | */
@Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
@Override
public java.lang.String getName ()
{
return (java.lang.String)get_Value(COLUMNNAME_Name);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Nutrition_Fact.java | 1 |
请完成以下Java代码 | public class InvoiceCalculateTax extends JavaProcess
{
public static final String PARAM_C_Invoice_ID = "C_Invoice_ID";
private int p_C_Invoice_ID = 0;
@Override
protected void prepare()
{
for (final ProcessInfoParameter para : getParametersAsArray())
{
final String name = para.getParameterName();
if (p... | //
// Delete accounting /UnPost
MPeriod.testPeriodOpen(invoice.getCtx(), invoice.getDateAcct(), invoice.getC_DocType_ID(), invoice.getAD_Org_ID());
Services.get(IFactAcctDAO.class).deleteForDocument(invoice);
//
// Update Invoice
invoice.calculateTaxTotal();
invoice.setPosted(false);
invoice.saveEx();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\eevolution\process\InvoiceCalculateTax.java | 1 |
请完成以下Java代码 | public void setSalesRep_ID (int SalesRep_ID)
{
if (SalesRep_ID < 1)
set_Value (COLUMNNAME_SalesRep_ID, null);
else
set_Value (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID));
}
/** Get Aussendienst.
@return Aussendienst */
@Override
public int getSalesRep_ID ()
{
Integer ii = (Integer)ge... | }
/**
* TaskStatus AD_Reference_ID=366
* Reference name: R_Request TaskStatus
*/
public static final int TASKSTATUS_AD_Reference_ID=366;
/** 0% Not Started = 0 */
public static final String TASKSTATUS_0NotStarted = "0";
/** 100% Complete = D */
public static final String TASKSTATUS_100Complete = "D";
/*... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_Request.java | 1 |
请完成以下Java代码 | private Comparator<CCacheStats> getActualComparator()
{
Comparator<CCacheStats> comparator = this._actualComparator;
if (comparator == null)
{
comparator = this._actualComparator = createActualComparator();
}
return comparator;
}
private Comparator<CCacheStats> createActualComparator()
{
Comparator<... | comparator = Comparator.comparing(CCacheStats::getHitRate);
break;
case missRate:
comparator = Comparator.comparing(CCacheStats::getMissRate);
break;
default:
throw new AdempiereException("Unknown field type!");
}
if (!ascending)
{
comparator = comparator.reversed();
}
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\CCacheStatsOrderBy.java | 1 |
请完成以下Java代码 | public MFColor setLineDistance(final int distance)
{
if (!isLine())
{
return this;
}
return toBuilder().lineDistance(distance).build();
}
public MFColor toFlatColor()
{
switch (getType())
{
case FLAT:
return this;
case GRADIENT:
return ofFlatColor(getGradientUpperColor());
case LIN... | public String toHexString()
{
final Color awtColor = toFlatColor().getFlatColor();
return toHexString(awtColor.getRed(), awtColor.getGreen(), awtColor.getBlue());
}
public static String toHexString(final int red, final int green, final int blue)
{
Check.assume(red >= 0 && red <= 255, "Invalid red value: {}",... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\util\MFColor.java | 1 |
请完成以下Java代码 | public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) {
return Optional.ofNullable(findDashboardById(tenantId, new DashboardId(entityId.getId())));
}
@Override
public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId entityId) {
return FluentF... | protected void removeEntity(TenantId tenantId, DashboardInfo entity) {
unassignDashboardFromCustomer(customer.getTenantId(), new DashboardId(entity.getUuidId()), this.customer.getId());
}
}
private class CustomerDashboardsUpdater extends PaginatedRemover<Customer, DashboardInfo> {
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\dashboard\DashboardServiceImpl.java | 1 |
请完成以下Java代码 | public java.math.BigDecimal getPriceList ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceList);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Standardpreis.
@param PriceStd
Standardpreis
*/
@Override
public void setPriceStd (java.math.BigDecimal PriceStd)
{
set_Value (COLU... | return Env.ZERO;
return bd;
}
/** Set Menge.
@param Qty
Menge
*/
@Override
public void setQty (java.math.BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
/** Get Menge.
@return Menge
*/
@Override
public java.math.BigDecimal getQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\model\X_M_ProductScalePrice.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void validate() {
StringBuilder validationErrorBuilder = new StringBuilder("Process engine configuration is invalid: \n");
boolean isValid = true;
if(datasourceJndiName == null || datasourceJndiName.isEmpty()) {
isValid = false;
validationErrorBuilder.append(" property 'datasourc... | if (isAutoSchemaUpdate != null) {
result.put(PROP_IS_AUTO_SCHEMA_UPDATE, isAutoSchemaUpdate);
}
if (isActivateJobExecutor != null) {
result.put(PROP_IS_ACTIVATE_JOB_EXECUTOR, isActivateJobExecutor);
}
if (isIdentityUsed != null) {
result.put(PROP_IS_IDENTITY_USED, isIdent... | repos\camunda-bpm-platform-master\distro\wildfly\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\config\ManagedProcessEngineMetadata.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class BookSearchController {
private final VectorStore vectorStore;
private final ChatClient chatClient;
public BookSearchController(VectorStore vectorStore, ChatClient.Builder chatClientBuilder) {
this.vectorStore = vectorStore;
this.chatClient = chatClientBuilder.build();
}
... | }
@PostMapping("/enhanced-search")
String enhancedSearch(@RequestBody String query) {
String context = vectorStore.similaritySearch(SearchRequest.builder()
.query(query)
.topK(3)
.build())
.stream()
.map(Document::getText)
... | repos\tutorials-master\spring-ai-modules\spring-ai\src\main\java\com\baeldung\springai\semanticsearch\BookSearchController.java | 2 |
请完成以下Java代码 | public String getClientSoftwareKennung() {
return clientSoftwareKennung;
}
/**
* Sets the value of the clientSoftwareKennung property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setClientSoftwareKennung(String value) {
... | }
/**
* Sets the value of the retourenavisAnfrageType property.
*
* @param value
* allowed object is
* {@link RetourenavisAnfrageType }
*
*/
public void setRetourenavisAnfrageType(RetourenavisAnfrageType value) {
this.retourenavisAnfrageType = value;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v2\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v2\RetourenavisAnfragen.java | 1 |
请完成以下Java代码 | public void setRememberMeRequestAttribute(String rememberMeRequestAttribute) {
if (rememberMeRequestAttribute == null) {
throw new IllegalArgumentException("rememberMeRequestAttribute cannot be null");
}
this.rememberMeRequestAttribute = rememberMeRequestAttribute;
}
/**
* Set the value for the {@code Sam... | /**
* Gets the name of the request attribute that is checked to see if the cookie should
* be written with {@link Integer#MAX_VALUE}.
* @return the remember me request attribute
* @since 3.2
*/
public String getRememberMeRequestAttribute() {
return this.rememberMeRequestAttribute;
}
/**
* Allows defin... | repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\web\http\DefaultCookieSerializer.java | 1 |
请完成以下Java代码 | public BasicPrincipalAuthenticator basicPrincipalAuthenticator(
SecuritySettings securitySettings, CredentialsStrategy credentialsStrategy,
@Named("restx.admin.passwordHash") String defaultAdminPasswordHash, ObjectMapper mapper) {
return new StdBasicPrincipalAuthenticator(new StdUserServ... | new StdUser("admin", ImmutableSet.<String>of("*")),
// the path where users are stored
Paths.get("data/users.json"),
// the path where credentials are stored. isolating both is a good practice in terms of security
// it is... | repos\tutorials-master\web-modules\restx\src\main\java\restx\demo\AppModule.java | 1 |
请完成以下Java代码 | public static void closeQuietly(InputStream is)
{
try
{
if (is != null) is.close();
}
catch (IOException ignored)
{
}
}
public static void closeQuietly(Reader r)
{
try
{
if (r != null) r.close();
}
c... | catch (IOException ignored)
{
}
}
/**
* 数组分割
*
* @param from 源
* @param to 目标
* @param <T> 类型
* @return 目标
*/
public static <T> T[] shrink(T[] from, T[] to)
{
assert to.length <= from.length;
System.arraycopy(from, 0, to, 0, to.lengt... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\Utility.java | 1 |
请完成以下Java代码 | public Map<String, Object> getDebugProperties()
{
final ImmutableMap.Builder<String, Object> debugProperties = ImmutableMap.builder();
if (debugProcessClassname != null)
{
debugProperties.put("debug-classname", debugProcessClassname);
}
return debugProperties.build();
}
public boolean isDisplayedOn(@... | public static <T> ValueAndDuration<T> fromSupplier(final Supplier<T> supplier)
{
final Stopwatch stopwatch = Stopwatch.createStarted();
final T value = supplier.get();
final Duration duration = Duration.ofNanos(stopwatch.stop().elapsed(TimeUnit.NANOSECONDS));
return new ValueAndDuration<>(value, duration)... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\descriptor\WebuiRelatedProcessDescriptor.java | 1 |
请完成以下Java代码 | public PlanItemTransition getStandardEvent() {
PlanItemTransitionStandardEvent child = standardEventChild.getChild(this);
return child.getValue();
}
public void setStandardEvent(PlanItemTransition standardEvent) {
PlanItemTransitionStandardEvent child = standardEventChild.getChild(this);
child.setV... | .build();
sentryRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SENTRY_REF)
.namespace(CMMN10_NS)
.idAttributeReference(Sentry.class)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
standardEventChild = sequenceBuilder.element(PlanItemTransitionStanda... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\PlanItemOnPartImpl.java | 1 |
请完成以下Java代码 | public Object getValue(VariableContainer variableContainer) {
ELContext elContext = Context.getProcessEngineConfiguration().getExpressionManager().getElContext((VariableScope) variableContainer);
try {
ExpressionGetInvocation invocation = new ExpressionGetInvocation(valueExpression, elContex... | }
@Override
public String toString() {
if (valueExpression != null) {
return valueExpression.getExpressionString();
}
return super.toString();
}
@Override
public String getExpressionText() {
return expressionText;
}
} | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\el\JuelExpression.java | 1 |
请完成以下Java代码 | public void processOpts() {
super.processOpts();
// Handle sourceFolder config option
if (additionalProperties().containsKey(CodegenConstants.SOURCE_FOLDER)) {
sourceFolder = ((String) additionalProperties().get(CodegenConstants.SOURCE_FOLDER));
}
}
/**
* Escap... | * Use this callback to extend the standard set of lambdas available to templates.
* @return
*/
@Override
protected ImmutableMap.Builder<String, Mustache.Lambda> addMustacheLambdas() {
// Start with parent lambdas
ImmutableMap.Builder<String, Mustache.Lambda> builder = super.addMustache... | repos\tutorials-master\spring-swagger-codegen-modules\openapi-custom-generator\src\main\java\com\baeldung\openapi\generators\camelclient\JavaCamelClientGenerator.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getCategoryId() {
return categoryId;
}
public void setCategoryId(Long categoryId) {
this.categoryId = categoryId;
}
public String getName() {
return nam... | this.readCount = readCount;
}
public String getAwardName() {
return awardName;
}
public void setAwardName(String awardName) {
this.awardName = awardName;
}
public String getAttendType() {
return attendType;
}
public void setAttendType(String attendType) {
... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsTopic.java | 1 |
请完成以下Java代码 | public class KPIPermissionsProvider
{
@NonNull private final IUserRolePermissionsDAO userRolePermissionsDAO;
public IUserRolePermissions getUserRolePermissions(@NonNull final KPIDataContext context)
{
// assume all these context values are set
// see de.metas.ui.web.kpi.descriptor.sql.SQLDatasourceDescriptor.PE... | userId,
clientId,
SystemTime.asLocalDate());
}
public String addAccessSQL(
@NonNull final String sql,
@NonNull final String sourceTableName,
@NonNull final KPIDataContext context)
{
final IUserRolePermissions permissions = getUserRolePermissions(context);
return permissions.addAccessSQL(sql, so... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\kpi\data\KPIPermissionsProvider.java | 1 |
请完成以下Java代码 | public void setRuleColumn(String ruleColumn) {
this.ruleColumn = ruleColumn;
}
public String getRuleConditions() {
return ruleConditions;
}
public void setRuleConditions(String ruleConditions) {
this.ruleConditions = ruleConditions;
}
public String getRuleValue() {
... | public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
} | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\system\vo\SysPermissionDataRuleModel.java | 1 |
请完成以下Java代码 | public synchronized final void cancelAndReset()
{
// Eagerly mark as done.
final boolean alreadyDone = done.getAndSet(true);
//
// If not already done, try stop the current running future (if any)
if (!alreadyDone)
{
final ScheduledFuture<?> future = this.future;
if (future != null && !future.isDone... | {
future.get();
}
catch (Exception e)
{
e.printStackTrace();
}
}
}
}
// Create a new instance of "done" flag and set it to false.
// We do this because existing enqueued tasks will work with the old "done" reference which was set to "true".
done = new AtomicBoolean(false)... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\concurrent\DelayedRunnableExecutor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CCacheStats
{
//
// Cache Info
long cacheId;
@NonNull String name;
@NonNull ImmutableSet<CacheLabel> labels;
@NonNull CCacheConfig config;
@Nullable String debugAcquireStacktrace;
//
// Actual Stats
long size;
long hitCount;
long missCount;
@NonNull Percent hitRate;
@NonNull Percent missRate... | @Nullable final ImmutableSet<CacheLabel> labels,
@NonNull final CCacheConfig config,
@Nullable final String debugAcquireStacktrace,
final long size,
final long hitCount,
final long missCount)
{
this.cacheId = cacheId;
this.name = name;
this.labels = labels != null ? labels : ImmutableSet.of();
t... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\CCacheStats.java | 2 |
请完成以下Java代码 | public UIComponent getUIComponent(
final @NonNull WFProcess wfProcess,
final @NonNull WFActivity wfActivity,
final @NonNull JsonOpts jsonOpts)
{
return UserConfirmationSupportUtil.createUIComponent(
UserConfirmationSupportUtil.UIComponentProps.builderFrom(wfActivity).build()
);
}
@Override
public ... | private static ManufacturingJobActivity extractManufacturingJobActivity(final @NotNull UserConfirmationRequest request)
{
final ManufacturingJob job = extractManufacturingJob(request);
final ManufacturingJobActivityId manufacturingJobActivityId = extractManufacturingJobActivityId(request);
return job.getActivity... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\issue\RawMaterialsIssueOnlyWhatWasReceivedActivityHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private Object createInstance(String configurationClassName) {
try {
Class<?> configurationClass = getClass().getClassLoader().loadClass(configurationClassName);
return configurationClass.newInstance();
} catch (Exception e) {
throw new ProcessEngineException("Could not load '"+configurationC... | serviceBuilder.addDependency(ServiceName.JBOSS.append("txn").append("TransactionManager"), TransactionManager.class, service.getTransactionManagerInjector())
.addDependency(datasourceBindInfo.getBinderServiceName(), DataSourceReferenceFactoryService.class, service.getDatasourceBinderServiceInjector())
.addD... | repos\camunda-bpm-platform-master\distro\wildfly26\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\MscManagedProcessEngineController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class DemoActivitiesImpl implements DemoActivities {
private static final Logger log = LoggerFactory.getLogger(DemoActivitiesImpl.class);
/**
* Activity executed before waiting for the signal.
*
* <p>Intentionally minimal implementation for demo purposes.
* In production, this would ... | }
/**
* Activity executed after receiving the signal.
*
* <p>Intentionally minimal implementation for demo purposes.
* In production, this would contain post-signal business logic.
*
* @param cloudEvent the CloudEvent containing input data
*/
@Override
public void after(C... | repos\spring-boot-demo-main\src\main\java\com\temporal\demos\temporalspringbootdemo\activities\DemoActivitiesImpl.java | 2 |
请完成以下Java代码 | public HistoricCaseActivityInstanceEntity findHistoricCaseActivityInstance(String caseActivityId, String caseInstanceId) {
Map<String, String> parameters = new HashMap<String, String>();
parameters.put("caseActivityId", caseActivityId);
parameters.put("caseInstanceId", caseInstanceId);
return (Historic... | return getDbEntityManager().selectList("selectHistoricCaseActivityInstancesByQueryCriteria", historicCaseActivityInstanceQuery, page);
}
@SuppressWarnings("unchecked")
public List<HistoricCaseActivityInstance> findHistoricCaseActivityInstancesByNativeQuery(Map<String, Object> parameterMap, int firstResult, int m... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricCaseActivityInstanceManager.java | 1 |
请完成以下Java代码 | public final IPricingContext create()
{
//
// Create Pricing Context
final IEditablePricingContext pricingCtx = pricingBL.createInitialContext(
-1, // AD_Org_ID - will be set later
-1, // M_Product_ID - will be set later
-1, // billBPartnerId - will be set later
-1, // C_UOM_ID - will be set late... | * <li>will NOT be set: product
* </ul>
*
* @param pricingCtx
*/
private void updatePricingContextFromVendorInvoicingInfo(final IEditablePricingContext pricingCtx)
{
final IVendorInvoicingInfo vendorInvoicingInfo = getVendorInvoicingInfo();
//
// Extract infos from original invoice candidate
final BPa... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\PricingContextBuilder.java | 1 |
请完成以下Java代码 | public static <T> InSetPredicate<T> onlyOrAny(@Nullable final T value)
{
return value != null ? only(value) : any();
}
public static <T> InSetPredicate<T> onlyOrNone(@Nullable final T value)
{
return value != null ? only(value) : none();
}
private static <T> Set<T> toUnmodifiableSet(@NonNull final Collectio... | return intersectWith(only(onlyValues));
}
public InSetPredicate<T> intersectWith(@NonNull final InSetPredicate<T> other)
{
if (isNone() || other.isNone())
{
return none();
}
if (isAny())
{
return other;
}
else if (other.isAny())
{
return this;
}
return only(Sets.intersection(this.toSe... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\InSetPredicate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class M_Inventory
{
public static final AdMessageKey MSG_NOT_ALL_LINES_COUNTED = AdMessageKey.of("de.metas.inventory.interceptor.NotAllLinesCounted");
@Init
public void onInit()
{
// Setup event bus topics on which swing client notification listener shall subscribe
Services.get(IEventBusFactory.class).a... | }
}
private boolean isPhysicalInventoryDocType(final I_M_Inventory inventoryRecord)
{
final DocTypeId docTypeId = DocTypeId.ofRepoIdOrNull(inventoryRecord.getC_DocType_ID());
if (docTypeId == null)
{
return false;
}
final IDocTypeDAO docTypesRepo = Services.get(IDocTypeDAO.class);
final DocBaseAndSu... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inventory\interceptor\M_Inventory.java | 2 |
请完成以下Java代码 | public Collection<CaseFileItemDefinition> getCaseFileItemDefinitions() {
return caseFileItemDefinitionCollection.get(this);
}
public Collection<Case> getCases() {
return caseCollection.get(this);
}
public Collection<Process> getProcesses() {
return processCollection.get(this);
}
public Collec... | exporterAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_EXPORTER)
.build();
exporterVersionAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_EXPORTER_VERSION)
.build();
authorAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_AUTHOR)
.build();
SequenceBuilder seque... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\DefinitionsImpl.java | 1 |
请完成以下Java代码 | public void execute(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity) {
CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration(commandContext);
if (cmmnEngineConfiguration.isLoggingSessionEnabled()) {
CmmnLoggingSessionUtil... | if (throwable == null) {
planItemJavaDelegate.afterExecution(planItemInstance, value);
if (loggingSessionEnabled) {
CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration();
CmmnLoggingSessionUtil.addLogging... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\behavior\impl\PlanItemFutureJavaDelegateActivityBehavior.java | 1 |
请完成以下Java代码 | private static final ZonedDateTime max(final ZonedDateTime date1, final ZonedDateTime date2)
{
if (date1 == null)
{
return date2;
}
else if (date2 == null)
{
return date1;
}
else
{
return date1.isAfter(date2) ? date1 : date2;
}
}
public void updateLastSalesInvoiceInfo(@NonNull final LastI... | if (other == null)
{
return true;
}
else if (this.invoiceDate.compareTo(other.invoiceDate) > 0)
{
return true;
}
else if (this.invoiceDate.compareTo(other.invoiceDate) == 0)
{
return this.invoiceId.getRepoId() > other.invoiceId.getRepoId();
}
else // if(this.invoiceDate.compareTo(... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\product\stats\BPartnerProductStats.java | 1 |
请完成以下Java代码 | public double doubleValue()
{
return value.doubleValue();
}
@Override
public float floatValue()
{
return value.floatValue();
}
@Override
public int intValue()
{
return value.intValue();
}
@Override
public long longValue()
{
return value.longValue();
}
@Override
public short shortValue()
{
... | }
public void divide(final BigDecimal divisor, final int scale, final RoundingMode roundingMode)
{
value = value.divide(divisor, scale, roundingMode);
}
public boolean comparesEqualTo(final BigDecimal val)
{
return value.compareTo(val) == 0;
}
public int signum()
{
return value.signum();
}
public Mu... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\lang\MutableBigDecimal.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<PmsProduct> list(String keyword) {
PmsProductExample productExample = new PmsProductExample();
PmsProductExample.Criteria criteria = productExample.createCriteria();
criteria.andDeleteStatusEqualTo(0);
if(!StrUtil.isEmpty(keyword)){
criteria.andNameLike("%" + keyw... | for (Object item : dataList) {
Method setId = item.getClass().getMethod("setId", Long.class);
setId.invoke(item, (Long) null);
Method setProductId = item.getClass().getMethod("setProductId", Long.class);
setProductId.invoke(item, productId);
}
... | repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\PmsProductServiceImpl.java | 2 |
请完成以下Java代码 | private Node rotateRight(Node y) {
Node x = y.left;
Node z = x.right;
x.right = y;
y.left = z;
updateHeight(y);
updateHeight(x);
return x;
}
private Node rotateLeft(Node y) {
Node x = y.right;
Node z = x.left;
x.left = y;
y... | return x;
}
private void updateHeight(Node n) {
n.height = 1 + Math.max(height(n.left), height(n.right));
}
private int height(Node n) {
return n == null ? -1 : n.height;
}
public int getBalance(Node n) {
return (n == null) ? 0 : height(n.right) - height(n.left);
}... | repos\tutorials-master\data-structures-2\src\main\java\com\baeldung\avltree\AVLTree.java | 1 |
请完成以下Java代码 | public class CellValues
{
public static int extractDisplayTypeFromValue(final Object value)
{
if (value == null)
{
return -1;
}
else if (value instanceof Timestamp)
{
return DisplayType.Date;
// TODO: handle DateTime
}
else if (value instanceof Number)
{
if (value instanceof Integer)
{
... | return null;
}
final int displayType = extractDisplayTypeFromValue(value);
return toCellValue(value, displayType);
}
public static CellValue toCellValue(final Object value, final int displayType)
{
if (value == null)
{
return null;
}
if (DisplayType.isDate(displayType))
{
final Date date = T... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\excel\CellValues.java | 1 |
请完成以下Java代码 | private ImmutableListMultimap<ProductId, JsonProductBPartner> retrieveJsonProductVendors(final Set<ProductId> productIds)
{
return servicesFacade.getBPartnerProductRecords(productIds)
.stream()
.collect(ImmutableListMultimap.toImmutableListMultimap(
record -> ProductId.ofRepoId(record.getM_Product_ID()... | .productNo(record.getProductNo())
.productName(trls.getColumnTrl(I_C_BPartner_Product.COLUMNNAME_ProductName, record.getProductName()).translate(adLanguage))
.productDescription(trls.getColumnTrl(I_C_BPartner_Product.COLUMNNAME_ProductDescription, record.getProductDescription()).translate(adLanguage))
.prod... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\product\command\GetProductsCommand.java | 1 |
请完成以下Java代码 | public class BPMNTimerConverter {
public TimerPayload convertToTimerPayload(AbstractJobEntity jobEntity) {
TimerPayload timerPayload = new TimerPayload();
timerPayload.setDuedate(jobEntity.getDuedate());
timerPayload.setEndDate(jobEntity.getEndDate());
timerPayload.setRetries(jobEn... | BPMNTimerImpl timer = new BPMNTimerImpl(
TimerEventHandler.getActivityIdFromConfiguration(jobEntity.getJobHandlerConfiguration())
);
timer.setProcessDefinitionId(internalEvent.getProcessDefinitionId());
timer.setProcessInstanceId(internalEvent.getProcessInstanceId());
timer.s... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\event\impl\BPMNTimerConverter.java | 1 |
请完成以下Java代码 | public class FileWritingBolt extends BaseRichBolt {
public static Logger logger = LoggerFactory.getLogger(FileWritingBolt.class);
private BufferedWriter writer;
private String filePath;
private ObjectMapper objectMapper;
@Override
public void prepare(Map map, TopologyContext topologyContext, Ou... | public FileWritingBolt(String filePath) {
this.filePath = filePath;
}
@Override
public void cleanup() {
try {
writer.close();
} catch (IOException e) {
logger.error("Failed to close the writer!");
}
}
@Override
public void declareOutputFi... | repos\tutorials-master\libraries-data-3\src\main\java\com\baeldung\storm\bolt\FileWritingBolt.java | 1 |
请完成以下Java代码 | public String getSkipExpression() {
return skipExpression;
}
public void setSkipExpression(String skipExpression) {
this.skipExpression = skipExpression;
}
@Override
public String getValidateFormFields() {
return validateFormFields;
}
@Override
public void setVa... | super.setValues(otherElement);
setAssignee(otherElement.getAssignee());
setOwner(otherElement.getOwner());
setFormKey(otherElement.getFormKey());
setSameDeployment(otherElement.isSameDeployment());
setDueDate(otherElement.getDueDate());
setPriority(otherElement.getPriorit... | repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\UserTask.java | 1 |
请完成以下Java代码 | public boolean isPickedFrom() {return pickedHUs != null;}
public void assertNotPickedFrom()
{
if (isPickedFrom()) {throw new AdempiereException("Already Picked From");}
}
public void assertNotStarted()
{
Check.assume(status == DDOrderMoveScheduleStatus.NOT_STARTED, "Expected status NOT_STARTED but was {}", s... | public void markAsDroppedTo(@NonNull LocatorId dropToLocatorId, @NonNull final MovementId dropToMovementId)
{
assertInTransit();
final DDOrderMoveSchedulePickedHUs pickedHUs = Check.assumeNotNull(this.pickedHUs, "Expected to be already picked: {}", this);
pickedHUs.setDroppedTo(dropToLocatorId, dropToMovementId... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\movement\schedule\DDOrderMoveSchedule.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SecurityConfiguration extends ResourceServerConfigurerAdapter {
private final OAuth2Properties oAuth2Properties;
public SecurityConfiguration(OAuth2Properties oAuth2Properties) {
this.oAuth2Properties = oAuth2Properties;
}
@Override
public void configure(HttpSecurity http) thr... | @Bean
public TokenStore tokenStore(JwtAccessTokenConverter jwtAccessTokenConverter) {
return new JwtTokenStore(jwtAccessTokenConverter);
}
@Bean
public JwtAccessTokenConverter jwtAccessTokenConverter(OAuth2SignatureVerifierClient signatureVerifierClient) {
return new OAuth2JwtAccessToke... | repos\tutorials-master\jhipster-modules\jhipster-uaa\quotes\src\main\java\com\baeldung\jhipster\quotes\config\SecurityConfiguration.java | 2 |
请完成以下Java代码 | public List<HistoricVariableInstance> findHistoricVariableInstancesByQueryCriteria(
HistoricVariableInstanceQueryImpl historicProcessVariableQuery,
Page page
) {
return historicVariableInstanceDataManager.findHistoricVariableInstancesByQueryCriteria(
historicProcessVariableQuery,... | );
}
@Override
public long findHistoricVariableInstanceCountByNativeQuery(Map<String, Object> parameterMap) {
return historicVariableInstanceDataManager.findHistoricVariableInstanceCountByNativeQuery(parameterMap);
}
public HistoricVariableInstanceDataManager getHistoricVariableInstanceDat... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricVariableInstanceEntityManagerImpl.java | 1 |
请完成以下Java代码 | public int getAD_Table_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Table_ID);
}
@Override
public void setLog_ID (final int Log_ID)
{
if (Log_ID < 1)
set_ValueNoCheck (COLUMNNAME_Log_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Log_ID, Log_ID);
}
@Override
public int getLog_ID()
{
return get_... | public void setRecord_ID (final int Record_ID)
{
if (Record_ID < 0)
set_Value (COLUMNNAME_Record_ID, null);
else
set_Value (COLUMNNAME_Record_ID, Record_ID);
}
@Override
public int getRecord_ID()
{
return get_ValueAsInt(COLUMNNAME_Record_ID);
}
@Override
public void setWarnings (final @Nullable... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PInstance_Log.java | 1 |
请完成以下Java代码 | public void setRenderedAddressAndCapturedLocation(final @NonNull RenderedAddressAndCapturedLocation from)
{
IDocumentBillLocationAdapter.super.setRenderedAddressAndCapturedLocation(from);
}
@Override
public void setRenderedAddress(final @NonNull RenderedAddressAndCapturedLocation from)
{
IDocumentBillLocation... | }
@Override
public Optional<DocumentLocation> toPlainDocumentLocation(final IDocumentLocationBL documentLocationBL)
{
return documentLocationBL.toPlainDocumentLocation(this);
}
@Override
public OverrideBillLocationAdapter toOldValues()
{
InterfaceWrapperHelper.assertNotOldValues(delegate);
return new Ove... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\location\adapter\OverrideBillLocationAdapter.java | 1 |
请完成以下Java代码 | public boolean isDltTopic() {
return Type.DLT.equals(this.type);
}
public boolean isRetryTopic() {
return Type.RETRY.equals(this.type) || Type.REUSABLE_RETRY_TOPIC.equals(this.type);
}
public String suffix() {
return this.suffix;
}
public long delay() {
return this.delayMs;
}
/**
* Re... | this.dltStrategy, this.kafkaOperations);
}
@Override
public String toString() {
return "Properties{" +
"delayMs=" + this.delayMs +
", suffix='" + this.suffix + '\'' +
", type=" + this.type +
", maxAttempts=" + this.maxAttempts +
", numPartitions=" + this.numPartitions +
", dltStr... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\DestinationTopic.java | 1 |
请完成以下Java代码 | public Date getDeploymentTime() {
return activiti5Deployment.getDeploymentTime();
}
@Override
public String getCategory() {
return activiti5Deployment.getCategory();
}
@Override
public String getKey() {
return null;
}
@Override
public String getTenantId() {... | }
@Override
public String getDerivedFrom() {
return null;
}
@Override
public String getDerivedFromRoot() {
return null;
}
@Override
public String getParentDeploymentId() {
return null;
}
@Override
public String getEngineVersion() {
... | repos\flowable-engine-main\modules\flowable5-compatibility\src\main\java\org\flowable\compatibility\wrapper\Flowable5DeploymentWrapper.java | 1 |
请完成以下Java代码 | public static float bytesHighFirstToFloat(byte[] bytes, int start)
{
int l = bytesHighFirstToInt(bytes, start);
return Float.intBitsToFloat(l);
}
/**
* 无符号整型输出
* @param out
* @param uint
* @throws IOException
*/
public static void writeUnsignedInt(DataOutputStre... | public static int convertTwoCharToInt(char high, char low)
{
int result = high << 16;
result |= low;
return result;
}
public static char[] convertIntToTwoChar(int n)
{
char[] result = new char[2];
result[0] = (char) (n >>> 16);
result[1] = (char) (0x0000F... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\utility\ByteUtil.java | 1 |
请完成以下Java代码 | public boolean isCamundaAsyncBefore() {
return camundaAsyncBefore.getValue(this);
}
public void setCamundaAsyncBefore(boolean isCamundaAsyncBefore) {
camundaAsyncBefore.setValue(this, isCamundaAsyncBefore);
}
public boolean isCamundaAsyncAfter() {
return camundaAsyncAfter.getValue(this);
}
pu... | public String getCamundaCollection() {
return camundaCollection.getValue(this);
}
public void setCamundaCollection(String expression) {
camundaCollection.setValue(this, expression);
}
public String getCamundaElementVariable() {
return camundaElementVariable.getValue(this);
}
public void setCa... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\MultiInstanceLoopCharacteristicsImpl.java | 1 |
请完成以下Java代码 | public BaseElement getBpmnElement() {
return bpmnElementAttribute.getReferenceTargetElement(this);
}
public void setBpmnElement(BaseElement bpmnElement) {
bpmnElementAttribute.setReferenceTargetElement(this, bpmnElement);
}
public DiagramElement getSourceElement() {
return sourceElementAttribute.g... | targetElementAttribute.setReferenceTargetElement(this, targetElement);
}
public MessageVisibleKind getMessageVisibleKind() {
return messageVisibleKindAttribute.getValue(this);
}
public void setMessageVisibleKind(MessageVisibleKind messageVisibleKind) {
messageVisibleKindAttribute.setValue(this, messag... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\bpmndi\BpmnEdgeImpl.java | 1 |
请完成以下Java代码 | public class X_ExternalSystem_Config_WooCommerce extends org.compiere.model.PO implements I_ExternalSystem_Config_WooCommerce, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = -1117767929L;
/** Standard Constructor */
public X_ExternalSystem_Config_WooCommerce (final Properties... | @Override
public void setExternalSystem_Config_ID (final int ExternalSystem_Config_ID)
{
if (ExternalSystem_Config_ID < 1)
set_ValueNoCheck (COLUMNNAME_ExternalSystem_Config_ID, null);
else
set_ValueNoCheck (COLUMNNAME_ExternalSystem_Config_ID, ExternalSystem_Config_ID);
}
@Override
public int getExte... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_WooCommerce.java | 1 |
请完成以下Java代码 | public class DataObjectReferenceImpl extends FlowElementImpl implements DataObjectReference {
protected static AttributeReference<ItemDefinition> itemSubjectRefAttribute;
protected static AttributeReference<DataObject> dataObjectRefAttribute;
protected static ChildElement<DataState> dataStateChild;
public sta... | public ItemDefinition getItemSubject() {
return itemSubjectRefAttribute.getReferenceTargetElement(this);
}
public void setItemSubject(ItemDefinition itemSubject) {
itemSubjectRefAttribute.setReferenceTargetElement(this, itemSubject);
}
public DataState getDataState() {
return dataStateChild.getChi... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\DataObjectReferenceImpl.java | 1 |
请完成以下Java代码 | public Integer getShowStatus() {
return showStatus;
}
public void setShowStatus(Integer showStatus) {
this.showStatus = showStatus;
}
public Integer getForwardCount() {
return forwardCount;
}
public void setForwardCount(Integer forwardCount) {
this.forwardCount... | public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", categoryId=").append(categoryId);
sb.append(", title=").... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsSubject.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getParentUrl() {
return parentUrl;
}
public void setParentUrl(String parentUrl) {
this.parentUrl = parentUrl;
}
@ApiModelProperty(example = "null")
public String getSuperExecutionId() {
return superExecutionId;
}
public void setSuperExecutionId(String... | public String getProcessInstanceUrl() {
return processInstanceUrl;
}
public void setProcessInstanceUrl(String processInstanceUrl) {
this.processInstanceUrl = processInstanceUrl;
}
public boolean isSuspended() {
return suspended;
}
public void setSuspended(boolean suspe... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\ExecutionResponse.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public int getC_POS_ID()
{
return get_ValueAsInt(COLUMNNAME_C_POS_ID);
}
@Override
public void setC_POS_Journal_ID (final int C_POS_Journal_ID)
{
if (C_POS_Journal_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_POS_Journal_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_POS_Journal_ID, C_POS_Journal_ID);
}... | {
set_Value (COLUMNNAME_DocumentNo, DocumentNo);
}
@Override
public java.lang.String getDocumentNo()
{
return get_ValueAsString(COLUMNNAME_DocumentNo);
}
@Override
public void setIsClosed (final boolean IsClosed)
{
set_Value (COLUMNNAME_IsClosed, IsClosed);
}
@Override
public boolean isClosed()
{... | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java-gen\de\metas\pos\repository\model\X_C_POS_Journal.java | 2 |
请完成以下Java代码 | private void saveCandidateAndPostCreatedEvent(
@NonNull final PurchaseCandidateRequestedEvent requestedEvent,
@NonNull final PurchaseCandidate newPurchaseCandidate)
{
try
{
INTERCEPTOR_SHALL_POST_EVENT_FOR_PURCHASE_CANDIDATE_RECORD.set(false);
final PurchaseCandidateId newPurchaseCandidateId = purchas... | }
}
@VisibleForTesting
static PurchaseCandidateCreatedEvent createCandidateCreatedEvent(
@NonNull final PurchaseCandidateRequestedEvent requestedEvent,
@NonNull final BPartnerId vendorId,
@NonNull final PurchaseCandidateId newPurchaseCandidateId)
{
return PurchaseCandidateCreatedEvent.builder()
.eve... | repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\material\event\PurchaseCandidateRequestedHandler.java | 1 |
请完成以下Java代码 | public static void main(String[] args) throws Exception {
Options opt = new OptionsBuilder()
.include(SecondBenchmark.class.getSimpleName())
.forks(1)
.warmupIterations(5)
.measurementIterations(2)
.build();
Collection<RunRe... | }
@Setup
public void prepare() {
numbers = IntStream.rangeClosed(1, length).toArray();
singleThreadCalc = new SinglethreadCalculator();
multiThreadCalc = new MultithreadCalculator(Runtime.getRuntime().availableProcessors());
}
@TearDown
public void shutdown() {
sing... | repos\SpringBootBucket-master\springboot-echarts\src\main\java\com\xncoding\benchmark\sum\SecondBenchmark.java | 1 |
请完成以下Java代码 | public String[] getProcessDefinitionIdIn() {
return processDefinitionIdIn;
}
public String[] getProcessDefinitionKeyIn() {
return processDefinitionKeyIn;
}
public String[] getTenantIdIn() {
return tenantIdIn;
}
public void setTenantIdIn(String[] tenantIdIn) {
this.tenantIdIn = tenantIdIn;... | public boolean isCompact() {
return isCompact;
}
protected void provideHistoryCleanupStrategy(CommandContext commandContext) {
String historyCleanupStrategy = commandContext.getProcessEngineConfiguration()
.getHistoryCleanupStrategy();
isHistoryCleanupStrategyRemovalTimeBased = HISTORY_CLEANUP_S... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\CleanableHistoricProcessInstanceReportImpl.java | 1 |
请完成以下Java代码 | public void validate(MigratingActivityInstance migratingInstance, MigratingProcessInstance migratingProcessInstance, MigratingActivityInstanceValidationReportImpl instanceReport) {
if (isInvalid(migratingInstance)) {
instanceReport.addFailure("There is no migration instruction for this instance's activity");
... | + "There is no migration instruction for the compensation start event");
}
}
protected boolean isInvalid(MigratingActivityInstance migratingInstance) {
return hasNoInstruction(migratingInstance) && migratingInstance.getChildren().isEmpty();
}
protected boolean isInvalid(MigratingEventScopeInstance mig... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\validation\instance\NoUnmappedLeafInstanceValidator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class ElasticsearchClientConfigurations {
@Import({ JacksonJsonpMapperConfiguration.class, Jackson2JsonpMapperConfiguration.class,
JsonbJsonpMapperConfiguration.class, SimpleJsonpMapperConfiguration.class })
static class JsonpMapperConfiguration {
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnMiss... | }
@Configuration(proxyBeanMethods = false)
@ConditionalOnMissingBean(ElasticsearchTransport.class)
static class ElasticsearchTransportConfiguration {
@Bean
Rest5ClientTransport restClientTransport(Rest5Client restClient, JsonpMapper jsonMapper,
ObjectProvider<Rest5ClientOptions> restClientOptions) {
ret... | repos\spring-boot-4.0.1\module\spring-boot-elasticsearch\src\main\java\org\springframework\boot\elasticsearch\autoconfigure\ElasticsearchClientConfigurations.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class BookstoreService {
private final AuthorRepository authorRepository;
public BookstoreService(AuthorRepository authorRepository) {
this.authorRepository = authorRepository;
}
public void newAuthor() {
Author author = new Author();
author.setId(1L);
author.s... | }
public void fetchAuthor() {
Author author = authorRepository.findById(1L).orElseThrow();
System.out.println(author);
}
@Transactional
public void updateAuthor() {
Author author = authorRepository.findById(1L).orElseThrow();
author.setAge(45);
}
public void de... | repos\Hibernate-SpringBoot-master\HibernateSpringBootImmutableEntity\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请完成以下Java代码 | public class AD_Table_CopyColumnsToAllImportTables extends JavaProcess implements IProcessPrecondition
{
private final IADTableDAO adTablesRepo = Services.get(IADTableDAO.class);
private static final String TABLENAME_X_ImportTableTemplate = "X_ImportTableTemplate";
@Override
public ProcessPreconditionsResolution ... | {
final I_AD_Table importTableTemplate = adTablesRepo.retrieveTable(TABLENAME_X_ImportTableTemplate);
final List<I_AD_Column> importTableTemplateColumns = adTablesRepo.retrieveColumnsForTable(importTableTemplate);
for (final I_AD_Table importTable : adTablesRepo.retrieveAllImportTables())
{
final CopyColumn... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\AD_Table_CopyColumnsToAllImportTables.java | 1 |
请完成以下Java代码 | protected List<CellValue> getNextRow()
{
return CellValues.toCellValues(getNextRawDataRow());
}
private List<Object> getNextRawDataRow()
{
try
{
final List<Object> row = new ArrayList<>();
for (int col = 1; col <= getColumnCount(); col++)
{
final Object o = m_resultSet.getObject(col);
row.ad... | throw DBException.wrapIfNeeded(e);
}
}
@Override
protected boolean hasNextRow()
{
try
{
return m_resultSet.next();
}
catch (SQLException e)
{
throw DBException.wrapIfNeeded(e);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\spreadsheet\excel\JdbcExcelExporter.java | 1 |
请完成以下Java代码 | public boolean isManual ()
{
Object oo = get_Value(COLUMNNAME_IsManual);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Sales Transaction.
@param IsSOTrx
This is a Sales Transaction
*/
@Override
p... | public void setTaxAmt (java.math.BigDecimal TaxAmt)
{
set_ValueNoCheck (COLUMNNAME_TaxAmt, TaxAmt);
}
/** Get Steuerbetrag.
@return Tax Amount for a document
*/
@Override
public java.math.BigDecimal getTaxAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TaxAmt);
if (bd == null)
return En... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_TaxDeclarationLine.java | 1 |
请完成以下Java代码 | public void setIsAddressLinesReverse (boolean IsAddressLinesReverse)
{
set_Value (COLUMNNAME_IsAddressLinesReverse, Boolean.valueOf(IsAddressLinesReverse));
}
/** Get Reverse Address Lines.
@return Print Address in reverse Order
*/
@Override
public boolean isAddressLinesReverse ()
{
Object oo = get_Val... | {
return (java.lang.String)get_Value(COLUMNNAME_Name);
}
/** Set Region.
@param RegionName
Name of the Region
*/
@Override
public void setRegionName (java.lang.String RegionName)
{
set_Value (COLUMNNAME_RegionName, RegionName);
}
/** Get Region.
@return Name of the Region
*/
@Override
public... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Country.java | 1 |
请完成以下Java代码 | public Object invoke(
Bindings bindings,
ELContext context,
Class<?> returnType,
Class<?>[] paramTypes,
Object[] paramValues
) {
return child.invoke(bindings, context, returnType, paramTypes, paramValues);
}
public Class<?> getType(Bindings bindings, ELContex... | public boolean isReadOnly(Bindings bindings, ELContext context) {
return child.isReadOnly(bindings, context);
}
public void setValue(Bindings bindings, ELContext context, Object value) {
child.setValue(bindings, context, value);
}
public int getCardinality() {
return 1;
}
... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\tree\impl\ast\AstEval.java | 1 |
请完成以下Java代码 | public WFProcess pickAll(@NonNull final WFProcessId wfProcessId, @NonNull final UserId callerId)
{
final PickingJobId pickingJobId = toPickingJobId(wfProcessId);
final PickingJob pickingJob = pickingJobRestService.pickAll(pickingJobId, callerId);
return toWFProcess(pickingJob);
}
public PickingJobQtyAvailable... | final GetNextEligibleLineToPackResponse response = pickingJobRestService.getNextEligibleLineToPack(
GetNextEligibleLineToPackRequest.builder()
.callerId(callerId)
.pickingJobId(toPickingJobId(request.getWfProcessId()))
.excludeLineId(request.getExcludeLineId())
.huScannedCode(request.getHuSc... | repos\metasfresh-new_dawn_uat\backend\de.metas.picking.rest-api\src\main\java\de\metas\picking\workflow\handlers\PickingMobileApplication.java | 1 |
请完成以下Java代码 | public int getDataEntry_Record_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_DataEntry_Record_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set DataEntry_RecordData.
@param DataEntry_RecordData
Holds the (JSON-)data of all fields for a data entry. The json is supposed to be rendere... | else
set_ValueNoCheck (COLUMNNAME_DataEntry_SubTab_ID, Integer.valueOf(DataEntry_SubTab_ID));
}
/** Get Unterregister.
@return Unterregister */
@Override
public int getDataEntry_SubTab_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_DataEntry_SubTab_ID);
if (ii == null)
return 0;
return ii.i... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_DataEntry_Record.java | 1 |
请完成以下Java代码 | public class BusinessKnowledgeModelImpl extends DrgElementImpl implements BusinessKnowledgeModel {
protected static ChildElement<EncapsulatedLogic> encapsulatedLogicChild;
protected static ChildElement<Variable> variableChild;
protected static ChildElementCollection<KnowledgeRequirement> knowledgeRequirementColl... | }
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(BusinessKnowledgeModel.class, DMN_ELEMENT_BUSINESS_KNOWLEDGE_MODEL)
.namespaceUri(LATEST_DMN_NS)
.extendsType(DrgElement.class)
.instanceProvider(new ModelTypeInstancePro... | repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\BusinessKnowledgeModelImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void init(AuthenticationManagerBuilder auth) {
auth.apply(new InitializeAuthenticationProviderManagerConfigurer());
}
class InitializeAuthenticationProviderManagerConfigurer extends GlobalAuthenticationConfigurerAdapter {
private final Log logger = LogFactory.getLog(getClass());
@Override
public voi... | + "Consider publishing a single AuthenticationProvider bean, or wiring your Providers directly "
+ "using the DSL.", beanNames.length, Arrays.toString(beanNames)));
return;
}
AuthenticationProvider authenticationProvider = InitializeAuthenticationProviderBeanManagerConfigurer.this.context
.getBean(b... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\authentication\configuration\InitializeAuthenticationProviderBeanManagerConfigurer.java | 2 |
请完成以下Java代码 | public class CoapAdaptorUtils {
public static TransportProtos.GetAttributeRequestMsg toGetAttributeRequestMsg(Request inbound) throws AdaptorException {
List<String> queryElements = inbound.getOptions().getUriQuery();
TransportProtos.GetAttributeRequestMsg.Builder result = TransportProtos.GetAttrib... | private static Set<String> toKeys(List<String> queryElements, String attributeName) throws AdaptorException {
String keys = null;
for (String queryElement : queryElements) {
String[] queryItem = queryElement.split("=");
if (queryItem.length == 2 && queryItem[0].equals(attributeNa... | repos\thingsboard-master\common\transport\coap\src\main\java\org\thingsboard\server\transport\coap\adaptors\CoapAdaptorUtils.java | 1 |
请完成以下Java代码 | public int getC_Currency_ID_To ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID_To);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Divisor.
@param DivideRate
To convert Source number to Target number, the Source is divided
*/
@Override
public void setDivideRate (java.ma... | @param ValidFrom
Valid from including this date (first day)
*/
@Override
public void setValidFrom (java.sql.Timestamp ValidFrom)
{
set_Value (COLUMNNAME_ValidFrom, ValidFrom);
}
/** Get Gültig ab.
@return Valid from including this date (first day)
*/
@Override
public java.sql.Timestamp getValidFrom... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Conversion_Rate.java | 1 |
请完成以下Java代码 | public class SetMaxAgeHeaderAfterCacheExchangeMutator implements AfterCacheExchangeMutator {
private static final String MAX_AGE_PREFIX = "max-age=";
private final Duration configuredTimeToLive;
private final Clock clock;
private final boolean ignoreNoCacheUpdate;
public SetMaxAgeHeaderAfterCacheExchangeMutat... | && headers.getCacheControl().contains(MAX_AGE_PREFIX);
List<String> newCacheControlDirectives = new ArrayList<>();
if (isMaxAgePresent) {
List<String> cacheControlHeaders = headers.get(HttpHeaders.CACHE_CONTROL);
cacheControlHeaders = cacheControlHeaders == null ? Collections.emptyList() : cacheControlHeader... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\cache\postprocessor\SetMaxAgeHeaderAfterCacheExchangeMutator.java | 1 |
请完成以下Java代码 | public int getAD_Process_Access_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Process_Access_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_AD_Process getAD_Process() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_AD_Process_ID, org.com... | /** Set Rolle.
@param AD_Role_ID
Responsibility Role
*/
@Override
public void setAD_Role_ID (int AD_Role_ID)
{
if (AD_Role_ID < 0)
set_ValueNoCheck (COLUMNNAME_AD_Role_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_Role_ID, Integer.valueOf(AD_Role_ID));
}
/** Get Rolle.
@return Responsibili... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Process_Access.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<FileEvidence> getFiles()
{
return files;
}
public void setFiles(List<FileEvidence> files)
{
this.files = files;
}
public AddEvidencePaymentDisputeRequest lineItems(List<OrderLineItems> lineItems)
{
this.lineItems = lineItems;
return this;
}
public AddEvidencePaymentDisputeRequest addLin... | {
return Objects.hash(evidenceType, files, lineItems);
}
@Override
public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("class AddEvidencePaymentDisputeRequest {\n");
sb.append(" evidenceType: ").append(toIndentedString(evidenceType)).append("\n");
sb.append(" files: ").appe... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\AddEvidencePaymentDisputeRequest.java | 2 |
请完成以下Java代码 | public void setC_OLCand_ID (final int C_OLCand_ID)
{
if (C_OLCand_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_OLCand_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_OLCand_ID, C_OLCand_ID);
}
@Override
public int getC_OLCand_ID()
{
return get_ValueAsInt(COLUMNNAME_C_OLCand_ID);
}
/**
* DocStatus AD... | public static final String DOCSTATUS_Reversed = "RE";
/** Closed = CL */
public static final String DOCSTATUS_Closed = "CL";
/** Unknown = ?? */
public static final String DOCSTATUS_Unknown = "??";
/** InProgress = IP */
public static final String DOCSTATUS_InProgress = "IP";
/** WaitingPayment = WP */
public s... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Contract_Term_Alloc.java | 1 |
请完成以下Java代码 | public void setSortOrder(String sortOrder) {
if (!VALID_SORT_ORDER_VALUES.contains(sortOrder)) {
throw new InvalidRequestException(Status.BAD_REQUEST, "sortOrder parameter has invalid value: " + sortOrder);
}
this.sortOrder = sortOrder;
}
public void setSorting(List<SortingDto> sorting) {
thi... | applySortBy(query, sortingBy, sorting.getParameters(), engine);
}
if (sortingOrder != null) {
applySortOrder(query, sortingOrder);
}
}
}
}
protected abstract void applySortBy(T query, String sortBy, Map<String, Object> parameters, ProcessEngine engine);
protected void... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\AbstractQueryDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AlipayCore {
/**
* 调试用,创建TXT日志文件夹路径
*/
private static final String LOG_PATH = AlipayConfigUtil.readConfig("log_path");
/**
* 除去数组中的空值和签名参数
* @param sArray 签名参数组
* @return 去掉空值与签名参数后的新签名参数组
*/
public static Map<String, String> paraFilter(Map<String, Strin... | writer.write(sWord);
} catch (Exception e) {
e.printStackTrace();
} finally {
if (writer != null) {
try {
writer.close();
} catch (IOException e) {
e.printStackTrace();
}
}
... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\utils\alipay\AlipayCore.java | 2 |
请完成以下Java代码 | private ViewId createView(final KPIZoomIntoDetailsInfo detailsInfo)
{
final WindowId targetWindowId = getTargetWindowId(detailsInfo);
return viewRepo.createView(CreateViewRequest.builder(targetWindowId)
.addStickyFilters(DocumentFilter.builder()
.filterId("userDashboardItem")
.caption(detail... | userSession.assertLoggedIn();
//
// Change the dashboard item
final UserDashboardItemChangeRequest request = UserDashboardItemChangeRequest.of(widgetType, itemId, userSession.getAD_Language(), events);
final UserDashboardItemChangeResult changeResult = dashboardRepo.changeUserDashboardItem(getUserDashboard().g... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dashboard\DashboardRestController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class UpdateShipmentScheduleRequest
{
@NonNull
ShipmentScheduleId shipmentScheduleId;
@Nullable
ZonedDateTime deliveryDate;
@Nullable
LocationBasicInfo bPartnerLocation;
@Nullable
String bPartnerCode;
@Nullable
List<CreateAttributeInstanceReq> attributes;
@Nullable
DeliveryRule deliveryRule;
@Nullabl... | throw new AdempiereException("Invalid request! The bPartenr cannot be changed without changing the location!");
}
if (deliveryDate == null
&& bPartnerLocation == null
&& Check.isBlank(bPartnerCode)
&& Check.isEmpty(attributes)
&& deliveryRule == null
&& shipperId == null)
{
throw new... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\shipping\UpdateShipmentScheduleRequest.java | 2 |
请完成以下Java代码 | public DetailsBuilder waitTimeInMillis(int waitTimeInMillis) {
this.waitTimeInMillis = waitTimeInMillis;
return this;
}
public DetailsBuilder processEngineName(String processEngineName) {
if (this.processEngineNames == null) {
this.processEngineNames = new HashSet<String>(... | public String getLockOwner() {
return lockOwner;
}
public int getLockTimeInMillis() {
return lockTimeInMillis;
}
public int getMaxJobsPerAcquisition() {
return maxJobsPerAcquisition;
}
public int getWaitTimeInMillis() {
return waitTimeInMillis;
}
public Set<St... | repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\actuator\JobExecutorHealthIndicator.java | 1 |
请完成以下Java代码 | public Attachment getAttachment(String attachmentId) {
return commandExecutor.execute(new GetAttachmentCmd(attachmentId));
}
public Attachment getTaskAttachment(String taskId, String attachmentId) {
return commandExecutor.execute(new GetTaskAttachmentCmd(taskId, attachmentId));
}
public List<Attachmen... | }
@Override
public void handleBpmnError(String taskId, String errorCode, String errorMessage) {
commandExecutor.execute(new HandleTaskBpmnErrorCmd(taskId, errorCode, errorMessage));
}
@Override
public void handleBpmnError(String taskId, String errorCode, String errorMessage, Map<String, Object> variable... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\TaskServiceImpl.java | 1 |
请完成以下Java代码 | public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(... | return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
EventSubscriptionEntity other = (EventSubscriptionEntity) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equa... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\EventSubscriptionEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class Propagation {
/**
* Tracing context propagation types produced and consumed by the application.
* Setting this property overrides the more fine-grained propagation type
* properties.
*/
private @Nullable List<PropagationType> type;
/**
* Tracing context propagation types produ... | return this.consume;
}
/**
* Supported propagation types. The declared order of the values matter.
*/
public enum PropagationType {
/**
* <a href="https://www.w3.org/TR/trace-context/">W3C</a> propagation.
*/
W3C,
/**
* <a href="https://github.com/openzipkin/b3-propagation#single-hea... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing\src\main\java\org\springframework\boot\micrometer\tracing\autoconfigure\TracingProperties.java | 2 |
请完成以下Java代码 | public static boolean ask (final int WindowNo, final Container c, final String AD_Message, final String msg)
{
return new SwingAskDialogBuilder()
.setParentWindowNo(WindowNo)
.setParentComponent(c)
.setAD_Message(AD_Message)
.setAdditionalMessage(msg)
.getAnswer();
} // ask
/**
* Ask Questio... | } // ask
/**************************************************************************
* Beep
*/
public static void beep()
{
Toolkit.getDefaultToolkit().beep();
} // beep
// metas: begin
public static void error (int WindowNo, Container c, Throwable ex)
{
String adMessage = "Error";
String msg = ex.getL... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ADialog.java | 1 |
请完成以下Java代码 | public String toString()
{
final ImmutableList<String> nextNodeNames = getTransitions(ClientId.SYSTEM)
.stream()
.map(transition -> transition.getNextNode().getName().getDefaultValue())
.collect(ImmutableList.toImmutableList());
return MoreObjects.toStringHelper(this)
.add("name", getName().getDef... | public void setXPosition(final int x) { this.xPosition = x; }
public int getYPosition() {return yPosition != null ? yPosition : node.getYPosition();}
public void setYPosition(final int y) { this.yPosition = y; }
public @NonNull ImmutableList<WorkflowNodeTransitionModel> getTransitions(@NonNull final ClientId clie... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\wf\WorkflowNodeModel.java | 1 |
请完成以下Spring Boot application配置 | spring:
mvc:
throw-exception-if-no-handler-found: true
jackson:
deserialization:
FAIL_ON_UNKNOWN_PROPERTIES: true
property-naming-strategy: SNAKE_CASE
jpa:
open-in-view: false
generate-ddl: true
show-sql: true
hibernate:
ddl-auto: update
properties:
hibernate:
... | figure:
exclude: org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration
cors:
allow:
origins: ${CORS_ALLOWED_ORIGINS:*}
credentials: ${CORS_ALLOW_CREDENTIALS:false} | repos\tutorials-master\spring-boot-modules\spring-boot-3\src\main\resources\application.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | public class UOMConversionsMap
{
public static final UOMConversionsMap EMPTY = new UOMConversionsMap();
ProductId productId;
ImmutableMap<FromAndToUomIds, UOMConversionRate> rates;
/**
* {@code true} if this map is about a productId *and* contains at least one mapping besides the trivial times-one-mapping to a... | }
public boolean isEmpty()
{
return rates.isEmpty();
}
public ImmutableSet<UomId> getCatchUomIds()
{
if (rates.isEmpty())
{
return ImmutableSet.of();
}
return rates.values()
.stream()
.filter(UOMConversionRate::isCatchUOMForProduct)
.map(UOMConversionRate::getToUomId)
.collect(Imm... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\uom\UOMConversionsMap.java | 2 |
请完成以下Java代码 | public void invalidateShipmentSchedsForLines(final I_M_InOut inoutRecord)
{
try (final MDCCloseable inoutRecordMDC = TableRecordMDC.putTableRecordReference(inoutRecord))
{
// Only if it's a shipment
if (!inoutRecord.isSOTrx())
{
return;
}
// we only need to invalidate for the respective lines, b... | public void updateM_ShipmentSchedule_QtyPicked_Processed(final I_M_InOut inoutRecord)
{
try (final MDCCloseable inoutRecordMDC = TableRecordMDC.putTableRecordReference(inoutRecord))
{
if (!inoutRecord.isSOTrx())
{
return;
}
final IShipmentScheduleAllocDAO shipmentScheduleAllocDAO = Services.get(IS... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\modelvalidator\M_InOut_Shipment.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CommentCollectionResource {
private List<CommentResource> taskComments;
/**
* Adds the comment.
*
* @param comment
* the comment
*/
public void addComment(CommentResource comment) {
if (this.taskComments == null) {
this.taskComments = new ArrayList<>();
}
this.taskComments... | return true;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "CommentCollectionResource [taskComments=" + taskComments + "]";
}
}
/**
* Inner class to perform the de-serialization of the comments array
*
* @author anilallewar
*
*/
class Co... | repos\spring-boot-microservices-master\task-webservice\src\main\java\com\rohitghatol\microservices\task\model\CommentCollectionResource.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Application {
@Bean("writer1")
public Writer getWriter1() {
return new Writer("Writer 1");
}
@Bean("writer2")
public Writer getWriter2() {
return new Writer("Writer 2");
}
public static void main(String[] args) {
ApplicationContext ctx = SpringApplica... | /*
This method shows how to set lazy initialization and start the application using SpringApplicationBuilder
*/
private static ApplicationContext runUsingSpringApplicationBuilder(String[] args){
return new SpringApplicationBuilder(Application.class)
.lazyInitialization(true)
... | repos\tutorials-master\spring-boot-modules\spring-boot-performance\src\main\java\com\baeldung\lazyinitialization\Application.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.