instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_GL_Budget[")
.append(get_ID()).append("]");
return sb.toString();
}
/** BudgetStatus AD_Reference_ID=178 */
public static final int BUDGETSTATUS_AD_Reference_ID=178;
/** Draft = D */
public static final String BUDGETSTATU... | @return General Ledger Budget
*/
public int getGL_Budget_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_GL_Budget_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Primary.
@param IsPrimary
Indicates if this is the primary budget
*/
public void setIsPrimary (boolean IsPrimar... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_GL_Budget.java | 1 |
请完成以下Java代码 | public abstract class JobRetryCmd implements Command<Object> {
protected static final long serialVersionUID = 1L;
protected String jobId;
protected Throwable exception;
public JobRetryCmd(String jobId, Throwable exception) {
this.jobId = jobId;
this.exception = exception;
}
protected JobEntity ge... | protected String getExceptionStacktrace() {
return ExceptionUtil.getExceptionStacktrace(exception);
}
protected boolean shouldDecrementRetriesFor(Throwable t) {
return !(t instanceof OptimisticLockingException);
}
protected void notifyAcquisition(CommandContext commandContext) {
JobExecutor jobExe... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\JobRetryCmd.java | 1 |
请完成以下Java代码 | public PublicKeyCredentialRequestOptionsBuilder userVerification(UserVerificationRequirement userVerification) {
this.userVerification = userVerification;
return this;
}
/**
* Sets the {@link #getExtensions()} property
* @param extensions the extensions
* @return the {@link PublicKeyCredentialReques... | Consumer<PublicKeyCredentialRequestOptionsBuilder> customizer) {
customizer.accept(this);
return this;
}
/**
* Builds a new {@link PublicKeyCredentialRequestOptions}
* @return a new {@link PublicKeyCredentialRequestOptions}
*/
public PublicKeyCredentialRequestOptions build() {
if (this.challeng... | repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\PublicKeyCredentialRequestOptions.java | 1 |
请完成以下Java代码 | private static boolean isLoopbackAddress(String host) {
if (!StringUtils.hasText(host)) {
return false;
}
// IPv6 loopback address should either be "0:0:0:0:0:0:0:1" or "::1"
if ("[0:0:0:0:0:0:0:1]".equals(host) || "[::1]".equals(host)) {
return true;
}
// IPv4 loopback address ranges from 127.0.0.1 t... | ? authorizationCodeRequestAuthentication.getRedirectUri()
: registeredClient.getRedirectUris().iterator().next();
if (error.getErrorCode().equals(OAuth2ErrorCodes.INVALID_REQUEST)
&& parameterName.equals(OAuth2ParameterNames.REDIRECT_URI)) {
redirectUri = null; // Prevent redirects
}
OAuth2Authorizati... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2AuthorizationCodeRequestAuthenticationValidator.java | 1 |
请完成以下Java代码 | public boolean onSent(R request) {
client.lock();
try {
UUID rpcId = new UUID(this.request.getRequestIdMSB(), this.request.getRequestIdLSB());
if (rpcId.equals(client.getLastSentRpcId())) {
log.debug("[{}]][{}] Rpc has already sent!", client.getEndpoint(), rpcId);... | protected void reply(LwM2MRpcResponseBody response) {
TransportProtos.ToDeviceRpcResponseMsg.Builder msg = TransportProtos.ToDeviceRpcResponseMsg.newBuilder().setRequestId(request.getRequestId());
String responseAsString = JacksonUtil.toString(response);
if (StringUtils.isEmpty(response.getError... | repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\rpc\RpcDownlinkRequestCallbackProxy.java | 1 |
请完成以下Java代码 | public static class InstanceResponse {
private final InstanceId instanceId;
private final int status;
@Nullable
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private final String body;
@Nullable
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private final String contentType;
} | @lombok.Data
@lombok.Builder(builderClassName = "Builder")
public static class ForwardRequest {
private final URI uri;
private final HttpMethod method;
private final HttpHeaders headers;
private final BodyInserter<?, ? super ClientHttpRequest> body;
}
} | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\web\InstanceWebProxy.java | 1 |
请完成以下Java代码 | public class LocalizedException extends Exception {
private static final long serialVersionUID = 1L;
private final String messageKey;
private final Locale locale;
public LocalizedException(String messageKey) {
this(messageKey, Locale.getDefault());
}
public LocalizedException(Str... | /*
* This is a deliberate role reversal of the default implementation of getLocalizedMessage.
* some logging frameworks like Log4J 1 & 2 and Logback will use getMessage instead of
* getLocalizedMessage when logging Throwables. If we want to use these frameworks in client
* applicatio... | repos\tutorials-master\core-java-modules\core-java-exceptions-3\src\main\java\com\baeldung\exceptions\localization\LocalizedException.java | 1 |
请完成以下Java代码 | public void setLetterBody (java.lang.String LetterBody)
{
set_Value (COLUMNNAME_LetterBody, LetterBody);
}
/** Get Body.
@return Body */
@Override
public java.lang.String getLetterBody ()
{
return (java.lang.String)get_Value(COLUMNNAME_LetterBody);
}
/** Set Body (parsed).
@param LetterBodyParsed B... | }
/** Get Subject.
@return Subject */
@Override
public java.lang.String getLetterSubject ()
{
return (java.lang.String)get_Value(COLUMNNAME_LetterSubject);
}
/** Set Datensatz-ID.
@param Record_ID
Direct internal record ID
*/
@Override
public void setRecord_ID (int Record_ID)
{
if (Record_ID... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\letters\model\X_C_Letter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setSuperProcessInstanceId(String superProcessInstanceId) {
this.superProcessInstanceId = superProcessInstanceId;
}
public List<RestVariable> getVariables() {
return variables;
}
public void setVariables(List<RestVariable> variables) {
this.variables = variables;
... | public void setCallbackId(String callbackId) {
this.callbackId = callbackId;
}
@ApiModelProperty(example = "cmmn-1.1-to-cmmn-1.1-child-case")
public String getCallbackType() {
return callbackType;
}
public void setCallbackType(String callbackType) {
this.callbackType = call... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\caze\HistoricCaseInstanceResponse.java | 2 |
请完成以下Java代码 | public final class AuthorizeReturnObjectDataHintsRegistrar implements SecurityHintsRegistrar {
private final AuthorizationProxyFactory proxyFactory;
private final SecurityAnnotationScanner<AuthorizeReturnObject> scanner = SecurityAnnotationScanners
.requireUnique(AuthorizeReturnObject.class);
private final Set<... | continue;
}
Class<?> repository = generics[0];
for (Method method : repository.getDeclaredMethods()) {
AuthorizeReturnObject returnObject = this.scanner.scan(method, repository);
if (returnObject == null) {
continue;
}
// optimistically assume that the entity needs wrapping if any of the
... | repos\spring-security-main\data\src\main\java\org\springframework\security\data\aot\hint\AuthorizeReturnObjectDataHintsRegistrar.java | 1 |
请完成以下Java代码 | public static void compressFile(Path file, Path destination) throws IOException, CompressorException {
String format = FileNameUtils.getExtension(destination);
try (OutputStream out = Files.newOutputStream(destination);
BufferedOutputStream buffer = new BufferedOutputStream(out);
... | BufferedInputStream buffer = new BufferedInputStream(input);
ArchiveInputStream<?> archive = new ArchiveStreamFactory().createArchiveInputStream(buffer)) {
ArchiveEntry entry;
while ((entry = archive.getNextEntry()) != null) {
if (entry.getName()
... | repos\tutorials-master\libraries-apache-commons-2\src\main\java\com\baeldung\commons\compress\CompressUtils.java | 1 |
请完成以下Java代码 | public ImmutableList<InOutId> retrieveShipmentsWithoutShipperTransportation(@NonNull final Timestamp date)
{
return queryBL
.createQueryBuilder(de.metas.inout.model.I_M_InOut.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_M_InOut.COLUMNNAME_MovementDate, date)
.addEqualsFilter(I_M_InOut.COLU... | }
if (query.getMovementDateTo() != null)
{
sqlQueryBuilder.addCompareFilter(I_M_InOut.COLUMNNAME_MovementDate, Operator.LESS_OR_EQUAL, query.getMovementDateTo());
}
if (query.getDocStatus() != null)
{
sqlQueryBuilder.addEqualsFilter(I_M_InOut.COLUMNNAME_DocStatus, query.getDocStatus());
}
if (query.... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inout\impl\InOutDAO.java | 1 |
请完成以下Java代码 | public int getM_Material_Tracking_Report_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Material_Tracking_Report_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Verarbeitet.
@param Processed
Checkbox sagt aus, ob der Beleg verarbeitet wurde.
*/
@Override
public void setPro... | @return Checkbox sagt aus, ob der Beleg verarbeitet wurde.
*/
@Override
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java-gen\de\metas\materialtracking\ch\lagerkonf\model\X_M_Material_Tracking_Report.java | 1 |
请完成以下Java代码 | public class Person extends LdapUserDetailsImpl {
private static final long serialVersionUID = 620L;
private String givenName;
private String sn;
private String description;
private String telephoneNumber;
private List<String> cn = new ArrayList<>();
protected Person() {
}
public String getGivenName() ... | setTelephoneNumber(copyMe.getTelephoneNumber());
((Person) this.instance).cn = new ArrayList<>(copyMe.cn);
}
@Override
protected LdapUserDetailsImpl createTarget() {
return new Person();
}
public void setGivenName(String givenName) {
((Person) this.instance).givenName = givenName;
}
public voi... | repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\userdetails\Person.java | 1 |
请完成以下Java代码 | public boolean accept(final T model)
{
throw new UnsupportedOperationException();
}
@Override
public String getSql()
{
final IValidationRuleFactory validationRuleFactory = Services.get(IValidationRuleFactory.class);
final IValidationContext evalCtx = validationRuleFactory.createValidationContext(evaluatee);... | {
final String prefilterWhereClauseDefault = "1=0";
logger.warn("Cannot evaluate {} using {}. Returning {}.", prefilterWhereClauseExpr, evalCtx, prefilterWhereClauseDefault);
return prefilterWhereClauseDefault;
}
return prefilterWhereClause;
}
@Override
public List<Object> getSqlParams(final Propertie... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\ValidationRuleQueryFilter.java | 1 |
请完成以下Java代码 | public Object invoke(final Object self, final Method thisMethod, final Method proceed, final Object[] methodArgs) throws Throwable
{
@SuppressWarnings("unchecked")
final T serviceInstance = (T)self;
return invokeForJavassist0(interceptorInstance, serviceInstance, thisMethod, proceed, methodArgs);... | * Called when there we got an error/warning while creating the intercepted class.
*
* @param ex
*/
private final void onException(final ServicesException ex)
{
if (FAIL_ON_ERROR)
{
throw ex;
}
else
{
ex.printStackTrace(System.err);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\proxy\impl\JavaAssistInterceptor.java | 1 |
请完成以下Java代码 | public void addStockRecord(@NonNull final I_MD_Stock stockRecord)
{
final I_C_UOM uom = cache.getUomByProductId(ProductId.ofRepoId(stockRecord.getM_Product_ID()));
qtyOnHandStock = addToNullable(qtyOnHandStock, stockRecord.getQtyOnHand(), uom);
stockRecordIds.add(stockRecord.getMD_Stock_ID());
}
public Mate... | .pmmQtyPromisedAtDate(getPmmQtyPromisedAtDate())
.qtyMaterialentnahmeAtDate(getQtyMaterialentnahmeAtDate())
.qtyDemandPPOrderAtDate(getQtyDemandPPOrderAtDate())
.qtySupplyPurchaseOrderAtDate(getQtySupplyPurchaseOrderAtDate())
.qtySupplyPurchaseOrder(getQtySupplyPurchaseOrder())
.qtyDemandSalesOrderA... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\material\cockpit\rowfactory\DimensionGroupSubRowBucket.java | 1 |
请完成以下Java代码 | private static void unlockAllNoFail(final List<Lock> locks)
{
if (locks.isEmpty())
{
return;
}
for (final Lock lock : locks)
{
if (lock.isClosed())
{
continue;
}
try
{
lock.unlockAll();
}
catch (Exception ex)
{
logger.warn("Failed to unlock {}. Ignored", lock, ex);
... | {
return;
}
unlockAll();
}
private void assertHasRealOwner()
{
final LockOwner owner = getOwner();
Check.assume(owner.isRealOwner(), "lock {} shall have an owner", this);
}
@Override
public ILockAutoCloseable asAutoCloseable()
{
return new LockAutoCloseable(this);
}
@Override
public ILockAuto... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\lock\api\impl\Lock.java | 1 |
请完成以下Java代码 | public String getTarget() {
return target;
}
/**
* Sets the value of the target property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTarget(String value) {
this.target = value;
}
/**
* Gets the va... | }
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new att... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\EncryptionPropertyType.java | 1 |
请完成以下Java代码 | public final class UUIDs
{
public static int toId(final UUID uuid)
{
// System.out.println("toId: " + uuid + "====================================");
if (uuid.version() != 3)
{
throw new RuntimeException("not valid uuid: " + uuid + ": version != 3");
}
final long msb = uuid.getMostSignificantBits();
/... | private static final String toString(byte[] data)
{
StringBuilder sb = new StringBuilder();
for (final byte b : data)
{
if (sb.length() > 0)
{
sb.append(", ");
}
sb.append(b);
}
return sb
.insert(0, "[" + data.length + "] ")
.toString();
}
@SuppressWarnings("unused")
private stati... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-procurement\src\main\java\de\metas\common\procurement\sync\util\UUIDs.java | 1 |
请完成以下Java代码 | public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
if (SpringBeanHolder.applicationContext != null) {
log.warn("SpringContextHolder中的ApplicationContext被覆盖, 原有ApplicationContext为:" + SpringBeanHolder.applicationContext);
}
SpringBeanHolder... | /**
* 回调执行方法
*/
void executor();
/**
* 本回调任务名称
* @return /
*/
default String getCallBackName() {
return Thread.currentThread().getId() + ":" + this.getClass().getName();
}
}
} | repos\eladmin-master\eladmin-common\src\main\java\me\zhengjie\utils\SpringBeanHolder.java | 1 |
请完成以下Java代码 | private boolean schemaBreakMatches(
final PricingConditionsBreak schemaBreak,
final BigDecimal breakValue,
final PricingConditionsBreakQuery query)
{
final PricingConditionsBreakMatchCriteria matchCriteria = schemaBreak.getMatchCriteria();
return matchCriteria.breakValueMatches(breakValue)
&& matchCri... | }
public Stream<PricingConditionsBreak> streamBreaksMatchingAnyOfProducts(final Set<ProductAndCategoryAndManufacturerId> products)
{
Check.assumeNotEmpty(products, "products is not empty");
return getBreaks()
.stream()
.filter(schemaBreak -> schemaBreak.getMatchCriteria().productMatchesAnyOf(products));... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\PricingConditions.java | 1 |
请完成以下Java代码 | public String getEncodedData() {
return Optional.ofNullable(data)
.map(Base64.getEncoder()::encodeToString)
.orElse(null);
}
@JsonSetter("data")
public void setEncodedData(String data) {
this.data = Optional.ofNullable(data)
.map(Base64.getDec... | this.preview = Optional.ofNullable(preview)
.map(Base64.getDecoder()::decode)
.orElse(null);
}
@JsonIgnore
public TbResourceDataInfo toResourceDataInfo() {
return new TbResourceDataInfo(data, getDescriptor());
}
@Override
public String toString() {
... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\TbResource.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class CacheManagerValidator implements InitializingBean {
private final CacheProperties cacheProperties;
private final ObjectProvider<CacheManager> cacheManager;
CacheManagerValidator(CacheProperties cacheProperties, ObjectProvider<CacheManager> cacheManager) {
this.cacheProperties = cacheProperties;... | */
static class CacheConfigurationImportSelector implements ImportSelector {
@Override
public String[] selectImports(AnnotationMetadata importingClassMetadata) {
CacheType[] types = CacheType.values();
String[] imports = new String[types.length];
for (int i = 0; i < types.length; i++) {
imports[i] = ... | repos\spring-boot-4.0.1\module\spring-boot-cache\src\main\java\org\springframework\boot\cache\autoconfigure\CacheAutoConfiguration.java | 2 |
请完成以下Java代码 | public void setTenantIdIn(List<String> tenantIds) {
this.tenantIds = tenantIds;
}
@CamundaQueryParam(value = "withoutTenantId", converter = BooleanConverter.class)
public void setWithoutTenantId(Boolean withoutTenantId) {
this.withoutTenantId = withoutTenantId;
}
@CamundaQueryParam(value = "includeJ... | if (TRUE.equals(active)) {
query.active();
}
if (TRUE.equals(suspended)) {
query.suspended();
}
if (TRUE.equals(withOverridingJobPriority)) {
query.withOverridingJobPriority();
}
if (tenantIds != null && !tenantIds.isEmpty()) {
query.tenantIdIn(tenantIds.toArray(new St... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\management\JobDefinitionQueryDto.java | 1 |
请完成以下Java代码 | public String getOperator()
{
return operator;
}
@Override
public String toString()
{
return getExpressionString();
}
@Override
public ILogicExpression evaluatePartial(final Evaluatee ctx)
{
if (isConstant())
{
return this;
}
final ILogicExpression leftExpression = getLeft();
final ILogicEx... | final String logicOperator = getOperator();
if (newLeftExpression.isConstant() && newRightExpression.isConstant())
{
final BooleanEvaluator logicExprEvaluator = LogicExpressionEvaluator.getBooleanEvaluatorByOperator(logicOperator);
final boolean result = logicExprEvaluator.evaluateOrNull(newLeftExpression::c... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\LogicExpression.java | 1 |
请完成以下Java代码 | public List<EventSubscriptionEntity> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
return commandContext.getEventSubscriptionEntityManager().findEventSubscriptionsByQueryCriteria(this, page);
}
// getters //////////////////////////////////////////
public String ge... | public String getExecutionId() {
return executionId;
}
public String getProcessInstanceId() {
return processInstanceId;
}
public String getActivityId() {
return activityId;
}
public String getConfiguration() {
return configuration;
}
} | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\EventSubscriptionQueryImpl.java | 1 |
请完成以下Spring Boot application配置 | #
# Copyright 2015-2023 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | -aliases-package=sample.mybatis.thymeleaf.domain
mybatis.scripting-language-driver.thymeleaf.template-file.base-dir=mappers/
mybatis.scripting-language-driver.thymeleaf.template-file.path-provider.includes-package-path=false
mybatis.scripting-language-driver.thymeleaf.template-file.path-provider.separate-directory-per... | repos\spring-boot-starter-master\mybatis-spring-boot-samples\mybatis-spring-boot-sample-thymeleaf\src\main\resources\application.properties | 2 |
请完成以下Java代码 | private static final class WrappedDocumentFilterList
{
public static WrappedDocumentFilterList ofFilters(final DocumentFilterList filters)
{
if (filters == null || filters.isEmpty())
{
return EMPTY;
}
final ImmutableList<JSONDocumentFilter> jsonFiltersEffective = null;
return new WrappedDocumen... | * empty constructor
*/
private WrappedDocumentFilterList()
{
filters = DocumentFilterList.EMPTY;
jsonFilters = null;
}
public DocumentFilterList unwrap(final DocumentFilterDescriptorsProvider descriptors)
{
if (filters != null)
{
return filters;
}
if (jsonFilters == null || jsonFilt... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\CreateViewRequest.java | 1 |
请完成以下Java代码 | public String getPlanItemInstanceId() {
return planItemInstanceId;
}
@Override
public void setPlanItemInstanceId(String planItemInstanceId) {
this.planItemInstanceId = planItemInstanceId;
}
@Override
public String getOnPartId() {
return onPartId;
}
@Override
... | return ifPartId;
}
@Override
public void setIfPartId(String ifPartId) {
this.ifPartId = ifPartId;
}
@Override
public Date getTimeStamp() {
return timeStamp;
}
@Override
public void setTimeStamp(Date timeStamp) {
this.timeStamp = timeStamp;
}
} | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\SentryPartInstanceEntityImpl.java | 1 |
请完成以下Java代码 | private DestinationTopic.Properties createProperties(long delayMs, String suffix) {
return new DestinationTopic.Properties(delayMs, suffix, getDestinationTopicType(delayMs), this.maxAttempts,
this.numPartitions, this.dltStrategy, this.kafkaOperations, this.shouldRetryOn, this.timeout);
}
private String joinWit... | this.retryTopicSuffix = StringUtils.hasText(retryTopicSuffix)
? retryTopicSuffix
: RetryTopicConstants.DEFAULT_RETRY_SUFFIX;
this.dltSuffix = StringUtils.hasText(dltSuffix) ? dltSuffix : RetryTopicConstants.DEFAULT_DLT_SUFFIX;
}
public String getRetrySuffix() {
return this.retryTopicSuffix;
}
... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\DestinationTopicPropertiesFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DruidOneConfig extends DruidConfig{
private String url;
private String username;
private String password;
private String driverClassName;
private int initialSize;
private int minIdle;
private int maxActive;
public String getUrl() {
return url;
}
public vo... | this.initialSize = initialSize;
}
public int getMinIdle() {
return minIdle;
}
public void setMinIdle(int minIdle) {
this.minIdle = minIdle;
}
public int getMaxActive() {
return maxActive;
}
public void setMaxActive(int maxActive) {
this.maxActive = max... | repos\spring-boot-leaning-master\2.x_42_courses\第 3-7 课: Spring Boot 集成 Druid 监控数据源\spring-boot-multi-Jpa-druid\src\main\java\com\neo\config\druid\DruidOneConfig.java | 2 |
请完成以下Java代码 | public class PlainValidationContext implements IValidationContext
{
private String contextTableName;
private String tableName;
private final Map<String, String> values = new HashMap<String, String>();
@Override
public String get_ValueAsString(String variableName)
{
return values.get(variableName);
}
public ... | {
return tableName;
}
public void setTableName(String tableName)
{
this.tableName = tableName;
}
@Override
public String toString()
{
return String.format("PlainValidationContext [contextTableName=%s, tableName=%s, values=%s]", contextTableName, tableName, values);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\validationRule\impl\PlainValidationContext.java | 1 |
请完成以下Java代码 | public de.metas.printing.model.I_C_Printing_Queue getC_Printing_Queue()
{
return get_ValueAsPO(COLUMNNAME_C_Printing_Queue_ID, de.metas.printing.model.I_C_Printing_Queue.class);
}
@Override
public void setC_Printing_Queue(de.metas.printing.model.I_C_Printing_Queue C_Printing_Queue)
{
set_ValueFromPO(COLUMNNAM... | }
@Override
public void setC_Printing_Queue_Recipient_ID (int C_Printing_Queue_Recipient_ID)
{
if (C_Printing_Queue_Recipient_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Printing_Queue_Recipient_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_Printing_Queue_Recipient_ID, Integer.valueOf(C_Printing_Queue_Recip... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_C_Printing_Queue_Recipient.java | 1 |
请完成以下Java代码 | private boolean isValidHu(@NonNull final PickingSlotRow pickingSlotRowOrHU)
{
if (!pickingSlotRowOrHU.isPickedHURow())
{
return false;
// return ProcessPreconditionsResolution.reject(msgBL.getTranslatableMsgText(MSG_WEBUI_PICKING_SELECT_PICKED_HU));
}
if (!pickingSlotRowOrHU.isTopLevelHU())
{
return... | }
@Override
protected void postProcess(final boolean success)
{
if (!success)
{
return;
}
invalidatePickingSlotsView();
invalidatePackablesView();
}
private boolean checkIsEmpty(final PickingSlotRow pickingSlotRowOrHU)
{
Check.assume(pickingSlotRowOrHU.isPickedHURow(), "Was expecting an HuId but... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\process\WEBUI_Picking_M_Picking_Candidate_Process.java | 1 |
请完成以下Java代码 | public final class ImpFormat
{
@Getter
@NonNull
private final ImpFormatId id;
@Getter
@NonNull
private final String name;
@Getter
@NonNull
private final ImpFormatType formatType;
@Getter
private final boolean multiLine;
@Getter
private final boolean manualImport;
@Getter
@NonNull
private final Charset ... | @NonNull final ImpFormatId id,
@NonNull final String name,
@NonNull final ImpFormatType formatType,
final boolean multiLine,
final boolean manualImport,
@NonNull final ImportTableDescriptor importTableDescriptor,
@NonNull @Singular final List<ImpFormatColumn> columns,
@NonNull final Charset charset... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\format\ImpFormat.java | 1 |
请完成以下Java代码 | public void setAD_JavaClass_Type_ID (int AD_JavaClass_Type_ID)
{
if (AD_JavaClass_Type_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_JavaClass_Type_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_JavaClass_Type_ID, Integer.valueOf(AD_JavaClass_Type_ID));
}
/** Get Java Class Type.
@return Java Class Type */... | @Override
public void setIsInterface (boolean IsInterface)
{
set_Value (COLUMNNAME_IsInterface, Boolean.valueOf(IsInterface));
}
/** Get Interface.
@return Interface */
@Override
public boolean isInterface ()
{
Object oo = get_Value(COLUMNNAME_IsInterface);
if (oo != null)
{
if (oo instanceof Bo... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\javaclasses\model\X_AD_JavaClass.java | 1 |
请完成以下Java代码 | public static void validate(List<? extends KvEntry> tsKvEntries, boolean valueNoXssValidation) {
tsKvEntries.forEach(tsKvEntry -> validate(tsKvEntry, valueNoXssValidation));
}
public static void validate(KvEntry tsKvEntry, boolean valueNoXssValidation) {
if (tsKvEntry == null) {
thr... | }
public static List<AttributeKvEntry> filterChangedAttr(List<AttributeKvEntry> currentAttributes, List<AttributeKvEntry> newAttributes) {
if (currentAttributes == null || currentAttributes.isEmpty()) {
return newAttributes;
}
Map<String, AttributeKvEntry> currentAttrMap = curr... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\util\KvUtils.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private boolean isProductCompatible(
@NonNull final Workplace workplace,
@NonNull final ShipmentSchedule schedule)
{
final ImmutableSet<ProductId> workplaceProducts = workplace.getProductIds();
final ImmutableSet<ProductCategoryId> workplaceCategories = workplace.getProductCategoryIds();
if (workplaceProdu... | return true;
}
final ExternalSystemId externalSystemId = schedule.getExternalSystemId();
if (externalSystemId == null)
{
return false;
}
return workplaceExternalSystems.contains(externalSystemId);
}
private boolean isPriorityCompatible(
@NonNull final Workplace workplace,
@NonNull final Shipme... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job_schedule\service\commands\PickingJobScheduleAutoAssignCommand.java | 2 |
请完成以下Java代码 | public static AttributeSetId ofRepoId(final int repoId)
{
final AttributeSetId id = ofRepoIdOrNull(repoId);
if (id == null)
{
throw new AdempiereException("Invalid repoId: " + repoId);
}
return id;
}
public static AttributeSetId ofRepoIdOrNone(final int repoId)
{
final AttributeSetId id = ofRepoIdOr... | return attributeSetId != null ? attributeSetId.getRepoId() : -1;
}
private AttributeSetId(final int repoId)
{
this.repoId = Check.assumeGreaterOrEqualToZero(repoId, "M_AttributeSet_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
public boolean isNone()
{
return repoId == NONE.... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\mm\attributes\AttributeSetId.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result thread(String arg) {
// 资源的唯一标识
String resourceName = "testSentinel";
int time = random.nextInt(700);
Entry entry = null;
String retVal;
try {
entry = SphU.entry(resourceName, EntryType.IN);
Thread.sleep(time);
if (time > ... | retVal = "blocked";
} catch (Exception e) {
// logger.error("异常 {}", e.getMessage(), e);
// 异常数统计埋点
Tracer.trace(e);
throw new RuntimeException(e);
} finally {
if (entry != null) {
entry.exit();
}
}
re... | repos\spring-boot-student-master\spring-boot-student-sentinel\src\main\java\com\xiaolyuh\service\impl\PersonServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean supportsTemporaryTables() {
return true;
}
public String getCreateTemporaryTableString() {
return "create temporary table if not exists";
}
public boolean dropTemporaryTableAfterUse() {
return false;
}
public boolean supportsCurrentTimestampSelection() {... | }
public String getAddForeignKeyConstraintString(String constraintName,
String[] foreignKey, String referencedTable, String[] primaryKey,
boolean referencesPrimaryKey) {
throw new UnsupportedOperationExcep... | repos\SpringBoot-vue-master\src\main\java\com\boylegu\springboot_vue\config\SQLiteDialect.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class WorkstationRestController
{
@NonNull private final ResourceService resourceService;
@NonNull private final UserWorkstationService userWorkstationService;
@NonNull private final WorkplaceService workplaceService;
@NonNull
private Resource getWorkstationById(final ResourceId workstationId)
{
final R... | return JsonWorkstationSettings.builder()
.assignedWorkstation(userWorkstationService.getUserWorkstationId(Env.getLoggedUserId())
.map(resourceService::getById)
.map(this::toJson)
.orElse(null))
.build();
}
@PostMapping("/assign")
public JsonWorkstation assign(@RequestBody @NonNull final Js... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\workstation\WorkstationRestController.java | 2 |
请完成以下Java代码 | public void setUI_ApplicationId (final @Nullable java.lang.String UI_ApplicationId)
{
set_Value (COLUMNNAME_UI_ApplicationId, UI_ApplicationId);
}
@Override
public java.lang.String getUI_ApplicationId()
{
return get_ValueAsString(COLUMNNAME_UI_ApplicationId);
}
@Override
public void setUI_DeviceId (final... | public void setURL (final @Nullable java.lang.String URL)
{
set_Value (COLUMNNAME_URL, URL);
}
@Override
public java.lang.String getURL()
{
return get_ValueAsString(COLUMNNAME_URL);
}
@Override
public void setUserAgent (final @Nullable java.lang.String UserAgent)
{
set_Value (COLUMNNAME_UserAgent, Use... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_UI_Trace.java | 1 |
请完成以下Java代码 | public class C_OrderLine
{
private final IHUPackingAwareBL packingAwareBL = Services.get(IHUPackingAwareBL.class);
/**
* Task 06915: only updating on QtyEntered, but not on M_HU_PI_Item_Product_ID, because when the HU_PI_Item_Product changes, we want QtyEnteredTU to stay the same.
*
*/
@CalloutMethod(columnN... | @CalloutMethod(columnNames = { I_C_OrderLine.COLUMNNAME_QtyLU, I_C_OrderLine.COLUMNNAME_M_LU_HU_PI_ID })
public void updateQtyTUCU(final I_C_OrderLine orderLine, final ICalloutField field)
{
packingAwareBL.validateLUQty(orderLine.getQtyLU());
final IHUPackingAware packingAware = new OrderLineHUPackingAware(order... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\callout\C_OrderLine.java | 1 |
请完成以下Java代码 | public Criteria andPicNotBetween(String value1, String value2) {
addCriterion("pic not between", value1, value2, "pic");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
... | }
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} e... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsAlbumPicExample.java | 1 |
请完成以下Java代码 | public final Map<String, Parameter> getCurrentParams()
{
return currentParams;
}
@Override
public Parameter getParameter(final String name)
{
return getCurrentParams().get(name);
}
@Override
public boolean hasParameter(final String name)
{
return getCurrentParams().containsKey(name); | }
private static Map<String, Parameter> mkMap(Collection<Parameter> params)
{
final Map<String, Parameter> name2param = new HashMap<String, Parameter>(
params.size());
for (final Parameter param : params)
{
name2param.put(param.name, param);
}
return Collections.unmodifiableMap(name2param);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\impex\spi\impl\BaseConnector.java | 1 |
请完成以下Java代码 | public List<ProcessDefinition> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
return commandContext.getProcessDefinitionEntityManager().findProcessDefinitionsByQueryCriteria(this, page);
}
public void checkQueryOk() {
super.checkQueryOk();
}
// getters ... | public void setSuspensionState(SuspensionState suspensionState) {
this.suspensionState = suspensionState;
}
public String getCategoryNotEquals() {
return categoryNotEquals;
}
public String getTenantId() {
return tenantId;
}
public String getTenantIdLike() {
ret... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\ProcessDefinitionQueryImpl.java | 1 |
请完成以下Java代码 | public void setName (final @Nullable java.lang.String Name)
{
set_ValueNoCheck (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setQty (final BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
@Override
pu... | return get_ValueAsString(COLUMNNAME_UPC);
}
@Override
public void setValidFrom (final java.sql.Timestamp ValidFrom)
{
set_Value (COLUMNNAME_ValidFrom, ValidFrom);
}
@Override
public java.sql.Timestamp getValidFrom()
{
return get_ValueAsTimestamp(COLUMNNAME_ValidFrom);
}
@Override
public void setValid... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PI_Item_Product.java | 1 |
请完成以下Java代码 | public UpdateProcessInstanceSuspensionStateBuilderImpl byProcessDefinitionKey(String processDefinitionKey) {
ensureNotNull("processDefinitionKey", processDefinitionKey);
this.processDefinitionKey = processDefinitionKey;
return this;
}
@Override
public UpdateProcessInstanceSuspensionStateBuilderImpl p... | if (isProcessDefinitionTenantIdSet && (processInstanceId != null || processDefinitionId != null)) {
throw LOG.exceptionUpdateSuspensionStateForTenantOnlyByProcessDefinitionKey();
}
ensureNotNull("commandExecutor", commandExecutor);
}
public String getProcessDefinitionKey() {
return processDefini... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\runtime\UpdateProcessInstanceSuspensionStateBuilderImpl.java | 1 |
请完成以下Java代码 | public ProcessPreconditionsResolution checkPreconditionsApplicable(final IProcessPreconditionsContext context)
{
if (context.isNoSelection())
{
return ProcessPreconditionsResolution.rejectBecauseNoSelection();
}
if (!context.isSingleSelection())
{
return ProcessPreconditionsResolution.rejectBecauseNot... | }
@Override
protected String doIt() throws Exception
{
final I_M_InOut shipment = getRecord(I_M_InOut.class);
final List<I_M_HU> shipmentHandlingUnits = Services.get(IHUInOutDAO.class).retrieveShippedHandlingUnits(shipment);
getResult().setRecordToOpen(RecordsToOpen.builder()
.records(TableRecordReferenc... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_InOut_Shipment_SelectHUs.java | 1 |
请完成以下Java代码 | public String getProcessDefinitionId() {
return processDefinitionId;
}
public String getProcessDefinitionKey() {
return processDefinitionKey;
}
public List<String> getProcessDefinitionKeyIn() {
return processDefinitionKeyIn;
}
public String getProcessDefinitionIdLike()... | return deploymentId;
}
public List<String> getDeploymentIds() {
return deploymentIds;
}
public boolean isFinished() {
return finished;
}
public boolean isUnfinished() {
return unfinished;
}
public boolean isDeleted() {
return deleted;
}
public... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\HistoricProcessInstanceQueryImpl.java | 1 |
请完成以下Java代码 | public Collection<BPartnerContact> getUnusedContacts()
{
return id2UnusedContact.values();
}
public void resetDefaultContactFlags()
{
for (final BPartnerContact bpartnerContact : getUnusedContacts())
{
bpartnerContact.getContactType().setDefaultContact(false);
}
}
public void resetShipToDefaultFlags(... | public void resetSalesDefaultFlags()
{
for (final BPartnerContact bpartnerContact : getUnusedContacts())
{
bpartnerContact.getContactType().setSalesDefault(false);
}
}
public void resetBillToDefaultFlags()
{
for (final BPartnerContact bpartnerContact : getUnusedContacts())
{
bpartnerContact.getCont... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\bpartner\bpartnercomposite\jsonpersister\ShortTermContactIndex.java | 1 |
请完成以下Java代码 | public int getSubProducer_BPartner_ID()
{
return get_ValueAsInt(COLUMNNAME_SubProducer_BPartner_ID);
}
/**
* SubProducerBPartner_Value AD_Reference_ID=138
* Reference name: C_BPartner (Trx)
*/
public static final int SUBPRODUCERBPARTNER_VALUE_AD_Reference_ID=138;
@Override
public void setSubProducerBPa... | public void setWarehouseValue (final @Nullable java.lang.String WarehouseValue)
{
set_Value (COLUMNNAME_WarehouseValue, WarehouseValue);
}
@Override
public java.lang.String getWarehouseValue()
{
return get_ValueAsString(COLUMNNAME_WarehouseValue);
}
@Override
public void setX (final @Nullable java.lang.S... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Inventory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void createNewUser() {
try {
LOGGER.info("Creating new user");
FacesContext context = FacesContext.getCurrentInstance();
boolean operationStatus = userDao.createUser(userName);
context.isValidationFailed();
if (operationStatus) {
... | public void setUserDao(UserManagementDAO userDao) {
this.userDao = userDao;
}
public UserManagementDAO getUserDao() {
return this.userDao;
}
public String getOperationMessage() {
return operationMessage;
}
public void setOperationMessage(String operationMessage) {
... | repos\tutorials-master\web-modules\jsf\src\main\java\com\baeldung\springintegration\controllers\RegistrationBean.java | 2 |
请完成以下Java代码 | public java.lang.String getTaxID()
{
return get_ValueAsString(COLUMNNAME_TaxID);
}
@Override
public void setTitle (final @Nullable java.lang.String Title)
{
set_Value (COLUMNNAME_Title, Title);
}
@Override
public java.lang.String getTitle()
{
return get_ValueAsString(COLUMNNAME_Title);
}
@Override... | @Override
public void setWarehouse_Location_ID (final int Warehouse_Location_ID)
{
if (Warehouse_Location_ID < 1)
set_Value (COLUMNNAME_Warehouse_Location_ID, null);
else
set_Value (COLUMNNAME_Warehouse_Location_ID, Warehouse_Location_ID);
}
@Override
public int getWarehouse_Location_ID()
{
return... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_Order_Header_v.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UnacquireExternalWorkerJobCmd implements Command<Void> {
protected final String jobId;
protected final String workerId;
protected final JobServiceConfiguration jobServiceConfiguration;
public UnacquireExternalWorkerJobCmd(String jobId, String workerId, JobServiceConfiguration jobServiceCo... | if (jobEntity == null) {
throw new FlowableException("Could not find job for id " + jobId);
}
if (!jobEntity.getLockOwner().equals(workerId)) {
throw new FlowableException(jobEntity + " is locked with a different worker id");
}
jobEntity.setLockExpiratio... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\cmd\UnacquireExternalWorkerJobCmd.java | 2 |
请完成以下Java代码 | public static Message ofMissingADMessage(@Nullable final String text)
{
final String textNorm = StringUtils.trimBlankToNull(text);
if (textNorm == null)
{
return EMPTY;
}
return new Message(
null,
AdMessageKey.of(textNorm),
ImmutableTranslatableString.ofDefaultValue(text),
null,
true,... | }
this.missing = missing;
this.errorCode = errorCode;
}
private Message()
{
this.adMessageId = null;
this.adMessage = EMPTY_AD_Message;
this.msgText = TranslatableStrings.empty();
this.msgTip = null;
this.msgTextAndTip = this.msgText;
this.missing = true;
}
public String getMsgText(@NonNull fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\Message.java | 1 |
请完成以下Java代码 | protected void init(String text, Icon icon) {
// substitutes the underlying checkbox model:
// if we had call setModel an exception would be raised
// because setModel calls a getModel that return a
// QuadristateButtonModel, but at this point we
// have a JToggleButtonModel
this.model = new QuadristateButtonMode... | /** No one may add mouse listeners, not even Swing! */
@Override
public void addMouseListener(MouseListener l) {
}
/**
* Set the new state to either CHECKED, UNCHECKED or GREY_CHECKED. If
* state == null, it is treated as GREY_CHECKED.
*/
public void setState(State state)... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\it\cnr\imaa\essi\lablib\gui\checkboxtree\QuadristateCheckbox.java | 1 |
请完成以下Java代码 | public void handleEvent(@NonNull final PPOrderCandidateRequestedEvent event)
{
final I_PP_Order_Candidate createdCandidate = createProductionOrderCandidate(event);
if (event.isDirectlyCreatePPOrder())
{
final ImmutableList<PPOrderCandidateId> ppOrderCandidateIds = ImmutableList.of(PPOrderCandidateId.ofRepoId... | final boolean isSimulated = ppOrderCandidateRequestedEvent.getPpOrderCandidate().isSimulated();
return ppOrderCandidateService.createUpdateCandidate(PPOrderCandidateCreateUpdateRequest.builder()
.clientAndOrgId(ppOrderData.getClientAndOrgId())
.productPlanningId(ProductPlanningId.... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\event\PPOrderCandidateRequestedEventHandler.java | 1 |
请完成以下Java代码 | public Map<String, Object> process(Map<String, Object> inputParams) {
// inputParams: {"bizData":"/xxxx/xxxx/xxxx/xxxx.xls"}
try {
String filePath = (String) inputParams.get("bizData");
if (filePath == null || filePath.isEmpty()) {
throw new IllegalArgumentExcepti... | // 设置导入参数
ImportParams params = new ImportParams();
params.setTitleRows(0); // 没有标题
params.setHeadRows(1); // 第一行是表头
// 读取Excel数据
List<Map<String, Object>> dataList = ExcelImportUtil.importExcel(file, Map.class, params);
// 如果没有数据,返回空结果
if (dataList == null || ... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-module\jeecg-boot-module-airag\src\main\java\org\jeecg\modules\airag\demo\JimuDataReader.java | 1 |
请完成以下Java代码 | public boolean isCreateNewRecord()
{
boolean createNewRecord = true;
for (final IGridTabRowBuilder builder : builders)
{
if (!builder.isValid())
{
createNewRecord = false;
continue;
}
if (!builder.isCreateNewRecord())
{
createNewRecord = false;
}
}
return createNewRecord;
}... | return false;
}
@Override
public void setSource(Object model)
{
for (final IGridTabRowBuilder builder : builders)
{
builder.setSource(model);
}
}
@Override
public String toString()
{
return ObjectUtils.toString(this);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\apps\search\impl\CompositeGridTabRowBuilder.java | 1 |
请完成以下Java代码 | public String getViewIdPart()
{
return parts.get(1);
}
/**
* @return other parts (those which come after viewId part)
*/
@JsonIgnore // IMPORTANT: for some reason, without this annotation the json deserialization does not work even if we have toJson() method annotated with @JsonValue
public ImmutableList<St... | final String newViewId = JOINER.join(newParts);
return new ViewId(newViewId, newParts, newWindowId);
}
public void assertWindowId(@NonNull final WindowId expectedWindowId)
{
if (!windowId.equals(expectedWindowId))
{
throw new AdempiereException("" + this + " does not have expected windowId: " + expectedWi... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewId.java | 1 |
请完成以下Java代码 | protected DmnDecisionLogicEvaluationHandler getDecisionEvaluationHandler(DmnDecision decision) {
Class<? extends DmnDecisionLogic> key = decision.getDecisionLogic().getClass();
if (evaluationHandlers.containsKey(key)) {
return evaluationHandlers.get(key);
} else {
throw LOG.decisionLogicTypeNot... | DmnDecisionLogicEvaluationEvent rootEvaluatedEvent = null;
DmnDecisionEvaluationEventImpl decisionEvaluationEvent = new DmnDecisionEvaluationEventImpl();
long executedDecisionElements = 0L;
for(DmnDecisionLogicEvaluationEvent evaluatedEvent: evaluatedEvents) {
executedDecisionElements += evaluatedEve... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DefaultDmnDecisionContext.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BookstoreService {
private final AuthorRepository authorRepository;
private final BookRepository bookRepository;
public BookstoreService(AuthorRepository authorRepository,
BookRepository bookRepository) {
this.authorRepository = authorRepository;
this.bookReposito... | }
public void displayAllIncludeDeletedAuthors() {
List<Author> authors = authorRepository.findAllIncludingDeleted();
System.out.println("\nAll authors including deleted:");
authors.forEach(a -> System.out.println("Author name: " + a.getName()));
System.out.println();
}
pub... | repos\Hibernate-SpringBoot-master\HibernateSpringBootSoftDeletes\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请完成以下Java代码 | public void useResource() {
// using the resource here
resource.use();
}
@Override
public void close() {
// perform actions to close all underlying resources
this.cleanable.clean();
}
static class CleaningState implements Runnable {
CleaningState() {
... | public void run() {
// some cleanup action
System.out.println("Cleanup done");
}
}
static class Resource {
void use() {
System.out.println("Using the resource");
}
void close() {
System.out.println("Cleanup done");
}
}... | repos\tutorials-master\core-java-modules\core-java-18\src\main\java\com\baeldung\finalization_closeable_cleaner\MyCleanerResourceClass.java | 1 |
请完成以下Java代码 | public String getProcessDefinitionId() {
return processDefinitionId;
}
public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
@Override
public String getActivityId() {
return activityId;
}
public void setActivityId(String activityI... | }
public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public String getDeploymentId() {
return deploymentId;
}
public void setDeploymentId(String deploymentId) {
this.deploymentId = deploymentId;
}
@Override
pub... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\JobDefinitionEntity.java | 1 |
请完成以下Java代码 | public class TbProtoQueueMsg<T extends com.google.protobuf.GeneratedMessageV3> implements TbQueueMsg {
private final UUID key;
protected final T value;
private final TbQueueMsgHeaders headers;
public TbProtoQueueMsg(UUID key, T value) {
this(key, value, new DefaultTbQueueMsgHeaders());
}
... | public UUID getKey() {
return key;
}
@Override
public TbQueueMsgHeaders getHeaders() {
return headers;
}
@Override
public byte[] getData() {
return value != null ? value.toByteArray() : null;
}
} | repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\common\TbProtoQueueMsg.java | 1 |
请完成以下Java代码 | public static DetailId fromAD_Tab_ID(@NonNull final AdTabId adTabId)
{
return new DetailId(PREFIX_AD_TAB_ID, adTabId.getRepoId());
}
public static DetailId fromPrefixAndId(final String prefix, final int id)
{
return new DetailId(prefix, id);
}
@JsonCreator
@Nullable
public static DetailId fromJson(@Nullab... | }
@Nullable
public AdTabId toAdTabId()
{
if (PREFIX_AD_TAB_ID.equals(idPrefix))
{
return AdTabId.ofRepoId(idInt);
}
return null;
}
@Override
public int compareTo(@Nullable final DetailId o)
{
if (o == null)
{
return 1;
}
return Objects.compare(toJson(), o.toJson(), Comparator.naturalOrde... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DetailId.java | 1 |
请完成以下Java代码 | public void setLogoutHandlers(LogoutHandler[] handlers) {
this.handlers = new CompositeLogoutHandler(handlers);
}
/**
* Set list of {@link LogoutHandler}
* @param handlers list of {@link LogoutHandler}
* @since 5.2.0
*/
public void setLogoutHandlers(List<LogoutHandler> handlers) {
this.handlers = new Co... | *
* @author Rob Winch
* @since 4.2
*/
private static final class ResponseBodySessionInformationExpiredStrategy
implements SessionInformationExpiredStrategy {
@Override
public void onExpiredSessionDetected(SessionInformationExpiredEvent event) throws IOException {
HttpServletResponse response = event.g... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\session\ConcurrentSessionFilter.java | 1 |
请完成以下Java代码 | private static @Nullable String getTokenValue(String actualToken, String token) {
byte[] actualBytes;
try {
actualBytes = Base64.getUrlDecoder().decode(actualToken);
}
catch (Exception ex) {
logger.trace(LogMessage.format("Not returning the CSRF token since it's not Base64-encoded"), ex);
return null;
... | private static byte[] xorCsrf(byte[] randomBytes, byte[] csrfBytes) {
Assert.isTrue(randomBytes.length == csrfBytes.length, "arrays must be equal length");
int len = csrfBytes.length;
byte[] xoredCsrf = new byte[len];
System.arraycopy(csrfBytes, 0, xoredCsrf, 0, len);
for (int i = 0; i < len; i++) {
xoredC... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\csrf\XorCsrfTokenRequestAttributeHandler.java | 1 |
请完成以下Java代码 | public class RunnableCompletionCheckerWithThreadPoolExecutor {
private static final Logger LOGGER = LoggerFactory.getLogger(RunnableCompletionCheckerWithThreadPoolExecutor.class);
private static final int NUMBER_OF_RUNNABLES = 5;
private static final int PAUSE_MILLIS = 1000;
private static final int NU... | Thread.sleep(100);
LOGGER.info("After a timeout of 100 milliseconds, every Runnable is done: {}", isEveryRunnableDone(executor, 100));
Thread.sleep(2000);
LOGGER.info("After a timeout of 2 seconds, every Runnable is done: {}", isEveryRunnableDone(executor, 1500));
}
public static Thread... | repos\tutorials-master\core-java-modules\core-java-concurrency-2\src\main\java\com\baeldung\donerunnables\RunnableCompletionCheckerWithThreadPoolExecutor.java | 1 |
请完成以下Java代码 | public List<VerfuegbarkeitsantwortArtikel> getArtikel() {
if (artikel == null) {
artikel = new ArrayList<VerfuegbarkeitsantwortArtikel>();
}
return this.artikel;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {... | /**
* Gets the value of the rTyp property.
*
* @return
* possible object is
* {@link VerfuegbarkeitTyp }
*
*/
public VerfuegbarkeitTyp getRTyp() {
return rTyp;
}
/**
* Sets the value of the rTyp property.
*
* @param value
* a... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\VerfuegbarkeitsanfrageEinzelneAntwort.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static IDataScopeClient getDataScopeClient() {
if (dataScopeClient == null) {
dataScopeClient = SpringUtil.getBean(IDataScopeClient.class);
}
return dataScopeClient;
}
/**
* 获取数据权限
*
* @param mapperId 数据权限mapperId
* @param roleId 用户角色集合
* @return DataScopeModel
*/
public static DataSc... | */
public static DataScopeModel getDataScopeByCode(String code) {
DataScopeModel dataScope = CacheUtil.get(SYS_CACHE, SCOPE_CACHE_CODE, code, DataScopeModel.class);
if (dataScope == null || !dataScope.getSearched()) {
dataScope = getDataScopeClient().getDataScopeByCode(code);
CacheUtil.put(SYS_CACHE, SCOPE_C... | repos\SpringBlade-master\blade-service-api\blade-scope-api\src\main\java\org\springblade\system\cache\DataScopeCache.java | 2 |
请完成以下Spring Boot application配置 | #
# Copyright 2015-2023 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | ee the License for the specific language governing permissions and
# limitations under the License.
#
mybatis.config-location=classpath:mybatis-config.xml
logging.level.root=WARN
logging.level.sample.mybatis.xml.mapper=TRACE | repos\spring-boot-starter-master\mybatis-spring-boot-samples\mybatis-spring-boot-sample-xml\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public void onStart(RuleNodeId ruleNodeId) {
long currentTime = System.currentTimeMillis();
stateLock.lock();
try {
currentRuleNodeId = ruleNodeId;
stateChangeTime = currentTime;
} finally {
stateLock.unlock();
}
}
public long onEnd(Ru... | }
} finally {
stateLock.unlock();
}
}
public Map.Entry<UUID, Long> onTimeout() {
long currentTime = System.currentTimeMillis();
stateLock.lock();
try {
if (currentRuleNodeId != null && stateChangeTime > 0) {
long timeoutTime = curr... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\queue\TbMsgProfilerInfo.java | 2 |
请完成以下Java代码 | public final IClientUIInvoker setInvokeLater(final boolean invokeLater)
{
this.invokeLater = invokeLater;
return this;
}
protected final boolean isInvokeLater()
{
return invokeLater;
}
@Override
public final IClientUIInvoker setLongOperation(final boolean longOperation)
{
this.longOperation = longOper... | @Override
public abstract IClientUIInvoker setParentComponentByWindowNo(final int windowNo);
protected final void setParentComponent(final int windowNo, final Object component)
{
this.parentWindowNo = windowNo;
this.parentComponent = component;
}
protected final Object getParentComponent()
{
return parent... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\form\AbstractClientUIInvoker.java | 1 |
请完成以下Java代码 | String getTrxName()
{
return _trxName;
}
@Override
public IInvoiceCandRecomputeTagger setRecomputeTag(final InvoiceCandRecomputeTag recomputeTag)
{
this._recomputeTagToUseForTagging = recomputeTag;
return this;
}
private void generateRecomputeTagIfNotSet()
{
// Do nothing if the recompute tag was alre... | return setTaggedWith(InvoiceCandRecomputeTag.NULL);
}
@Override
public IInvoiceCandRecomputeTagger setTaggedWithAnyTag()
{
return setTaggedWith(null);
}
/* package */
@Nullable
InvoiceCandRecomputeTag getTaggedWith()
{
return _taggedWith;
}
@Override
public InvoiceCandRecomputeTagger setLimit(final i... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandRecomputeTagger.java | 1 |
请完成以下Java代码 | public void setConverter(HttpMessageConverter<Object> converter) {
Assert.notNull(converter, "converter cannot be null");
this.converter = converter;
}
/**
* Sets the {@link PublicKeyCredentialCreationOptionsRepository} to use. The default
* is {@link HttpSessionPublicKeyCredentialCreationOptionsRepository}.... | static class WebAuthnRegistrationRequest {
private @Nullable RelyingPartyPublicKey publicKey;
@Nullable RelyingPartyPublicKey getPublicKey() {
return this.publicKey;
}
void setPublicKey(RelyingPartyPublicKey publicKey) {
this.publicKey = publicKey;
}
}
public static class SuccessfulUserRegistrati... | repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\registration\WebAuthnRegistrationFilter.java | 1 |
请完成以下Java代码 | public Long getId() {
return authorId;
}
public void setId(Long authorId) {
this.authorId = authorId;
}
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 List<BookDto> getBooks() {
return books;
}
public void setBooks(List<BookDto> books) {
this.books = books;
}
public void addBook(BookDto book) {
books.add(book);
}
@Override
public String toStr... | repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoCustomResultTransformer\src\main\java\com\bookstore\dto\AuthorDto.java | 1 |
请完成以下Java代码 | public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Strin... | this.enabled = enabled;
}
public String getQq() {
return qq;
}
public void setQq(String qq) {
this.qq = qq;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getTel() {
... | repos\MyBatis-Spring-Boot-master\src\main\java\tk\mybatis\springboot\model\UserInfo.java | 1 |
请完成以下Java代码 | public boolean isAllowOverflow() { //
return m_allowOverflow;
}
/**
* Paint Element
* @param g2D graphics
* @param pageNo page no
* @param pageStart page start
* @param ctx context
* @param isView view
*/
public void paint (Graphics2D g2D, int pageNo, Point2D pageStart,
Properties ctx, boolean ... | g2D.drawImage(image, transform, this);
} catch (OutputException e) {
}
} // paint
/**
* String Representation
* @return info
*/
public String toString ()
{
if (m_barcode == null)
return super.toString();
return super.toString() + " " + m_barcode.getData();
} // toString
} // BarcodeElement | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\BarcodeElement.java | 1 |
请完成以下Java代码 | private Map<String, String> processKvEntryMappingPatterns(TbMsg msg) {
var mappingsMap = new HashMap<String, String>();
config.getDataMapping().forEach((sourceKey, targetKey) -> {
String patternProcessedSourceKey = TbNodeUtils.processPattern(sourceKey, msg);
String patternProcess... | );
}
private ListenableFuture<List<KvEntry>> getAttributesAsync(TbContext ctx, EntityId entityId, List<String> attrKeys) {
var latest = ctx.getAttributesService().find(ctx.getTenantId(), entityId, AttributeScope.SERVER_SCOPE, attrKeys);
return Futures.transform(latest, l ->
... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\metadata\TbAbstractGetMappedDataNode.java | 1 |
请完成以下Spring Boot application配置 | spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.maxActive=10
spring.datasource.maxIdle=5
spring.datasource.minIdle=2
spring.datasource.initialSize=5
spring.datasource.removeAbandoned=true
spring.jpa.proper | ties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=update | repos\tutorials-master\spring-cloud-modules\spring-cloud-connectors-heroku\src\main\resources\application.properties | 2 |
请完成以下Java代码 | protected List<I_M_InOutLine> retrieveDocumentLines(final I_M_InOut document)
{
final IInOutDAO inoutDAO = Services.get(IInOutDAO.class);
final List<I_M_InOutLine> documentLines = new ArrayList<I_M_InOutLine>();
for (final I_M_InOutLine iol : inoutDAO.retrieveLines(document, I_M_InOutLine.class))
{
document... | return iolExt.getM_Material_Tracking();
}
// fall-back in case the M_Material_Tracking_ID is not (yet) set
final IMaterialTrackingAttributeBL materialTrackingAttributeBL = Services.get(IMaterialTrackingAttributeBL.class);
final AttributeSetInstanceId asiId = AttributeSetInstanceId.ofRepoIdOrNone(iolExt.getM_A... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\model\validator\M_InOut.java | 1 |
请完成以下Java代码 | public ISqlQueryFilter asPartialSqlQueryFilter()
{
return partialSqlQueryFilter;
}
@Override
public IQueryFilter<T> asPartialNonSqlFilterOrNull()
{
final List<IQueryFilter<T>> nonSqlFilters = getNonSqlFiltersToUse();
if (nonSqlFilters == null || nonSqlFilters.isEmpty())
{
return null;
}
return par... | }
@Override
public CompositeQueryFilter<T> allowSqlFilters(final boolean allowSqlFilters)
{
if (this._allowSqlFilters == allowSqlFilters)
{
return this;
}
this._allowSqlFilters = allowSqlFilters;
_compiled = false;
return this;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\CompositeQueryFilter.java | 1 |
请完成以下Java代码 | public class RulesDeployer implements EngineDeployer {
private static final Logger LOGGER = LoggerFactory.getLogger(RulesDeployer.class);
@Override
public void deploy(EngineDeployment deployment, Map<String, Object> deploymentSettings) {
LOGGER.debug("Processing rules deployment {}", deployment.ge... | knowledgeBuilder.add(droolsResource, ResourceType.DRL);
}
}
if (knowledgeBuilder != null) {
KieBase kieBase = knowledgeBuilder.newKieBase();
deploymentManager.getKnowledgeBaseCache().add(deployment.getId(), kieBase);
}
}
@Override
public void und... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\rules\RulesDeployer.java | 1 |
请完成以下Java代码 | public Collection<Documentation> getDocumentations() {
return documentationCollection.get(this);
}
public ExtensionElements getExtensionElements() {
return extensionElementsChild.getChild(this);
}
public void setExtensionElements(ExtensionElements extensionElements) {
extensionElementsChild.setChi... | idAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_ID)
.idAttribute()
.build();
descriptionAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_DESCRIPTION)
.namespace(CMMN10_NS)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
documentationColle... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CmmnElementImpl.java | 1 |
请完成以下Java代码 | public static ZonedDateTime fromObjectToZonedDateTime(final Object valueObj)
{
return fromObjectTo(valueObj,
ZonedDateTime.class,
de.metas.util.converter.DateTimeConverters::fromJsonToZonedDateTime,
TimeUtil::asZonedDateTime);
}
public static Instant fromObjectToInstant(final Object valueObj)... | }
else
{
return fromJsonConverer.apply(json);
}
}
else if (valueObj instanceof StringLookupValue)
{
final String key = ((StringLookupValue)valueObj).getIdAsString();
if (Check.isEmpty(key))
{
return null;
}
else
{
return fromJsonConverer.apply(key);
}
}
else
{
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\DateTimeConverters.java | 1 |
请完成以下Java代码 | public void processSourceAndItsCandidates(
@NonNull final I_C_DunningDoc dunningDoc,
@NonNull final I_C_DunningDoc_Line_Source source)
{
final IDunningDAO dao = Services.get(IDunningDAO.class);
final I_C_Dunning_Candidate candidate = source.getC_Dunning_Candidate();
candidate.setProcessed(true); // make s... | {
Check.assumeNotNull(candidate, "candidate not null");
if (candidate.isProcessed())
{
// candidate already processed => not expired
return false;
}
if (dunningGraceDate == null)
{
// no dunning grace date => not expired
return false;
}
final Timestamp dunningDate = candidate.getDunningDa... | repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\api\impl\DunningBL.java | 1 |
请完成以下Java代码 | private int findSmallestValue(Node root) {
return root.left == null ? root.value : findSmallestValue(root.left);
}
public void traverseInOrder(Node node) {
if (node != null) {
traverseInOrder(node.left);
visit(node.value);
traverseInOrder(node.right);
... | if(current.left != null)
stack.push(current.left);
}
}
public void traversePostOrderWithoutRecursion() {
Stack<Node> stack = new Stack<>();
Node prev = root;
Node current;
stack.push(root);
while (!stack.isEmpty()) {
current = stack.p... | repos\tutorials-master\algorithms-modules\algorithms-searching\src\main\java\com\baeldung\algorithms\dfs\BinaryTree.java | 1 |
请完成以下Java代码 | public void onRemoteSessionCloseCommand(UUID sessionId, TransportProtos.SessionCloseNotificationProto sessionCloseNotification) {
}
@Override
public void onDeviceDeleted(DeviceId deviceId) {
}
@Override
public void onToDeviceRpcRequest(UUID sessionId, TransportProtos.ToDeviceRpcRequestMsg to... | public static boolean isConRequest(TbCoapObservationState state) {
if (state != null) {
return state.getExchange().advanced().getRequest().isConfirmable();
} else {
return false;
}
}
public static boolean isMulticastRequest(TbCoapObservationState state) {
... | repos\thingsboard-master\common\transport\coap\src\main\java\org\thingsboard\server\transport\coap\callback\AbstractSyncSessionCallback.java | 1 |
请完成以下Java代码 | public int getSuspensionState() {
return suspensionState;
}
public void setSuspensionState(int suspensionState) {
this.suspensionState = suspensionState;
}
@Override
public boolean isSuspended() {
return suspensionState == SuspensionState.SUSPENDED.getStateCode();
}
... | return candidateStarterGroupIdExpressions;
}
public void addCandidateStarterGroupIdExpression(Expression groupId) {
candidateStarterGroupIdExpressions.add(groupId);
}
@Override
public String getEngineVersion() {
return engineVersion;
}
public void setEngineVersion(String e... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\ProcessDefinitionEntity.java | 1 |
请完成以下Java代码 | private final static void initData() {
Country usa = new Country();
usa.setName("USA");
usa.setCapital("Washington D.C.");
usa.setCurrency(Currency.USD);
usa.setPopulation(323947000);
countries.put(usa.getName(), usa);
Country india = new Country();
indi... | countries.put(india.getName(), india);
Country france = new Country();
france.setName("France");
france.setCapital("Paris");
france.setCurrency(Currency.EUR);
france.setPopulation(66710000);
countries.put(france.getName(), france);
}
public Country findCountry(... | repos\tutorials-master\core-java-modules\core-java-11-2\src\main\java\com\baeldung\soap\ws\server\CountryRepository.java | 1 |
请完成以下Java代码 | public class ComputeFunction {
public static void compute(Integer v) {
try {
System.out.println("compute integer v: " + v);
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public static void compute(List<Integer> v)... | Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public static void compute(Long v) {
try {
System.out.println("compute integer v: " + v);
Thread.sleep(1000);
} catch (InterruptedException e) {
e.prin... | repos\tutorials-master\rxjava-modules\rxjava-core\src\main\java\com\baeldung\rxjava\ComputeFunction.java | 1 |
请完成以下Java代码 | public class ActivateTaskCmd implements Command<Void> {
protected String taskId;
protected String userId;
public ActivateTaskCmd(String taskId, String userId) {
this.taskId = taskId;
this.userId = userId;
}
@Override
public Void execute(CommandContext commandContext) {
... | task.setSuspendedBy(null);
if (task.getInProgressStartTime() != null) {
task.setState(Task.IN_PROGRESS);
} else if (task.getClaimTime() != null) {
task.setState(Task.CLAIMED);
} else {
task.setState(Task.CREATED);
}
task.setSuspensionState(Susp... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\ActivateTaskCmd.java | 1 |
请完成以下Java代码 | public String getDirectorUserIds() {
return directorUserIds;
}
public void setDirectorUserIds(String directorUserIds) {
this.directorUserIds = directorUserIds;
}
public String getPositionId() {
return positionId;
}
public void setPositionId(String positionId) {
... | Objects.equals(departNameEn, model.departNameEn) &&
Objects.equals(departNameAbbr, model.departNameAbbr) &&
Objects.equals(departOrder, model.departOrder) &&
Objects.equals(description, model.description) &&
Objects.equals(orgCategory, model.orgCategory) &... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\model\SysDepartTreeModel.java | 1 |
请完成以下Java代码 | public class City {
/**
* 城市编号
*/
private Long id;
/**
* 省份编号
*/
private Long provinceId;
/**
* 城市名称
*/
private String cityName;
/**
* 描述
*/
private String description;
public Long getId() {
return id;
}
public void setId(... | public Long getProvinceId() {
return provinceId;
}
public void setProvinceId(Long provinceId) {
this.provinceId = provinceId;
}
public String getCityName() {
return cityName;
}
public void setCityName(String cityName) {
this.cityName = cityName;
}
publ... | repos\springboot-learning-example-master\springboot-freemarker\src\main\java\org\spring\springboot\domain\City.java | 1 |
请完成以下Java代码 | private static void assertContextInjected() {
if (applicationContext == null) {
throw new IllegalStateException("applicaitonContext属性未注入, 请在applicationContext" +
".xml中定义SpringContextHolder或在SpringBoot启动类中注册SpringContextHolder.");
}
}
/**
* 清除SpringContextHo... | }
SpringBeanHolder.addCallback = false;
}
/**
* 获取 @Service 的所有 bean 名称
* @return /
*/
public static List<String> getAllServiceBeanName() {
return new ArrayList<>(Arrays.asList(applicationContext
.getBeanNamesForAnnotation(Service.class)));
}
interfac... | repos\eladmin-master\eladmin-common\src\main\java\me\zhengjie\utils\SpringBeanHolder.java | 1 |
请完成以下Java代码 | public I_M_ShipmentSchedule getM_ShipmentSchedule()
{
return sched;
}
@Override
public String getTableName()
{
return I_M_ShipmentSchedule.Table_Name;
}
@Override
public int getRecord_ID()
{
return sched.getM_ShipmentSchedule_ID();
}
@Override
public ZonedDateTime getDeliveryDate()
{
return ship... | }
@Override
public int getM_Product_ID()
{
return sched.getM_Product_ID();
}
@Override
public boolean isToBeFetched()
{
// Shipment Schedules are about sending materials to customer
return false;
}
@Override
public int getAD_Org_ID()
{
return sched.getAD_Org_ID();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\tourplanning\api\impl\ShipmentScheduleDeliveryDayAllocable.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.