instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public Object getPersistentState() {
Map<String, Object> persistentState = new HashMap<>();
persistentState.put("executionId", executionId);
persistentState.put("processDefinitionId", processDefinitionId);
persistentState.put("activityId", activityId);
persistentState.put("jobDefinitionId", jobDefin... | + ", jobDefinitionId=" + jobDefinitionId
+ ", failedActivityId=" + failedActivityId
+ ", annotation=" + annotation
+ "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\IncidentEntity.java | 1 |
请完成以下Java代码 | public class QualityNoteDAO implements IQualityNoteDAO
{
public static final AttributeCode QualityNoteAttribute = AttributeCode.ofString("QualityNotice");
@Override
public I_M_QualityNote getById(@NonNull final QualityNoteId qualityNoteId)
{
return loadOutOfTrx(qualityNoteId, I_M_QualityNote.class);
}
@Overri... | final AttributeId attributeId = getQualityNoteAttributeId();
attributesRepo.deleteAttributeValueByCode(attributeId, qualityNote.getValue());
}
@Override
public void modifyAttributeValueName(final I_M_QualityNote qualityNote)
{
final AttributeListValue attributeValueForQualityNote = retrieveAttribueValueForQual... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inout\api\impl\QualityNoteDAO.java | 1 |
请完成以下Java代码 | public boolean isEmpty() {
return deque.isEmpty();
}
public String getCurrentValue() {
return deque.peekFirst();
}
public void pushCurrentValue(String value) {
deque.addFirst(value != null ? value : NULL_VALUE);
updateMdcWithCurrentValue();
}
/**
* @return true i... | /**
* Keeps track of when we added values to which stack (as we do not add
* a new value to every stack with every update, but only changed values)
*/
protected Deque<List<ProcessDataStack>> sections = new ArrayDeque<>();
protected boolean currentSectionSealed = true;
/**
* Adds a stac... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\interceptor\ProcessDataContext.java | 1 |
请完成以下Java代码 | public Q head() {
return method(HttpHead.METHOD_NAME);
}
public Q options() {
return method(HttpOptions.METHOD_NAME);
}
public Q trace() {
return method(HttpTrace.METHOD_NAME);
}
public Map<String, Object> getConfigOptions() {
return getRequestParameter(HttpBaseRequest.PARAM_NAME_REQUEST... | }
return null;
}
@SuppressWarnings("unchecked")
public Q configOption(String field, Object value) {
if (field == null || field.isEmpty() || value == null) {
LOG.ignoreConfig(field, value);
} else {
Map<String, Object> config = getConfigOptions();
if (config == null) {
confi... | repos\camunda-bpm-platform-master\connect\http-client\src\main\java\org\camunda\connect\httpclient\impl\AbstractHttpRequest.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setConnectionTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
}
public int getTimeout() {
return timeout;
}
public void setTimeout(int timeout) {
this.timeout = timeout;
}
/**
* @return Returns the charset.
*/
publi... | }
/**
* @param charset The charset to set.
*/
public void setCharset(String charset) {
this.charset = charset;
}
public HttpResultType getResultType() {
return resultType;
}
public void setResultType(HttpResultType resultType) {
this.resultType = resultType;
... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\utils\alipay\httpClient\HttpRequest.java | 2 |
请完成以下Java代码 | public class ScheduledTask {
private ListenableFuture<?> scheduledFuture;
private boolean stopped = false;
public void init(AsyncCallable<Void> task, long delayMs, ScheduledExecutorService scheduler) {
schedule(task, delayMs, scheduler);
}
private void schedule(AsyncCallable<Void> task, lo... | return Futures.immediateFailedFuture(t);
}
}, delayMs, TimeUnit.MILLISECONDS, scheduler);
if (!stopped) {
scheduledFuture.addListener(() -> schedule(task, delayMs, scheduler), MoreExecutors.directExecutor());
}
}
public void cancel() {
stopped = true;
... | repos\thingsboard-master\common\transport\snmp\src\main\java\org\thingsboard\server\transport\snmp\session\ScheduledTask.java | 1 |
请完成以下Java代码 | private void pushToTarget(TopicPartitionInfo tpi, TbMsg msg, EntityId target, String fromRelationType) {
if (tpi.isMyPartition()) {
switch (target.getEntityType()) {
case RULE_NODE:
pushMsgToNode(nodeActors.get(new RuleNodeId(target.getId())), msg, fromRelationTyp... | private void pushMsgToNode(RuleNodeCtx nodeCtx, TbMsg msg, String fromRelationType) {
if (nodeCtx != null) {
var tbCtx = new DefaultTbContext(systemContext, ruleChainName, nodeCtx);
nodeCtx.getSelfActor().tell(new RuleChainToRuleNodeMsg(tbCtx, msg, fromRelationType));
} else {
... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\actors\ruleChain\RuleChainActorMessageProcessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class InfoContributorAutoConfiguration {
/**
* The default order for the core {@link InfoContributor} beans.
*/
public static final int DEFAULT_ORDER = Ordered.HIGHEST_PRECEDENCE + 10;
@Bean
@ConditionalOnEnabledInfoContributor(value = "env", fallback = InfoContributorFallback.DISABLE)
@Order(DE... | @Bean
@ConditionalOnEnabledInfoContributor(value = "process", fallback = InfoContributorFallback.DISABLE)
@Order(DEFAULT_ORDER)
ProcessInfoContributor processInfoContributor() {
return new ProcessInfoContributor();
}
@Bean
@ConditionalOnEnabledInfoContributor(value = "ssl", fallback = InfoContributorFallback.D... | repos\spring-boot-4.0.1\module\spring-boot-actuator-autoconfigure\src\main\java\org\springframework\boot\actuate\autoconfigure\info\InfoContributorAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private Factory createThrowAwayFactory() {
return new Factory() {
@Override
public @Nullable Propagation<String> get() {
return null;
}
};
}
@Bean
BaggagePropagationCustomizer remoteFieldsBaggagePropagationCustomizer() {
return (builder) -> {
List<String> remoteFields = this.traci... | .flushOnUpdate()
.build();
builder.add(correlationField);
}
};
}
@Bean
@ConditionalOnMissingBean(CorrelationScopeDecorator.class)
ScopeDecorator correlationScopeDecorator(CorrelationScopeDecorator.Builder builder) {
return builder.build();
}
}
/**
* Propagates neither traces nor ba... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing-brave\src\main\java\org\springframework\boot\micrometer\tracing\brave\autoconfigure\BravePropagationConfigurations.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ProductUpsertProcessor implements Processor
{
private final ProcessLogger processLogger;
public ProductUpsertProcessor(@NonNull final ProcessLogger processLogger)
{
this.processLogger = processLogger;
}
@Override
public void process(final Exchange exchange) throws Exception
{
final ImportProdu... | final JsonRequestProductUpsert productRequestProducerResult = productUpsertRequestProducer.run();
if (productRequestProducerResult.getRequestItems().isEmpty())
{
exchange.getIn().setBody(null);
return;
}
final ProductUpsertCamelRequest productUpsertCamelRequest = ProductUpsertCamelRequest.builder()
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\product\processor\ProductUpsertProcessor.java | 2 |
请完成以下Java代码 | public Page<User> findAll(User sample, PageRequest pageRequest) {
return userRepo.findAll(whereSpec(sample), pageRequest);
}
private Specification<User> whereSpec(final User sample){
return (root, query, cb) -> {
List<Predicate> predicates = new ArrayList<>();
if (sample... | };
}
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
User sample = new User();
sample.setUsername(username);
User user = findBySample(sample);
if( user == null ){
throw new UsernameNotFoundException(String.form... | repos\spring-boot-quick-master\quick-oauth2\quick-github-oauth\src\main\java\com\github\oauth\user\UserService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PickingJobLockService
{
@NonNull private final ILockManager lockManager = Services.get(ILockManager.class);
@NonNull private final ShipmentScheduleLockRepository shipmentScheduleLockRepository;
public ScheduledPackageableLocks getLocks(@NonNull final ShipmentScheduleAndJobScheduleIdSet scheduleIds)
{
... | {
return;
}
this.unlockSchedules(pickingJob.getScheduleIds(), pickingJob.getLockedBy());
}
public void unlockSchedules(
final @NonNull ShipmentScheduleAndJobScheduleIdSet scheduleIds,
final @NonNull UserId lockedBy)
{
shipmentScheduleLockRepository.unlock(
ShipmentScheduleUnLockRequest.builder()... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\PickingJobLockService.java | 2 |
请完成以下Java代码 | private String getBottomText()
{
if (Check.isEmpty(bottomURL, true))
{
return null;
}
final String bottomURLText;
if (html)
{
bottomURLText = new a(bottomURL, bottomURL).toString();
}
else
{
bottomURLText = bottomURL;
}
String bottomText = msgBL.getTranslatableMsgText(MSG_BottomText, b... | public String replaceAll(@NonNull final String string)
{
if (map.isEmpty())
{
return string;
}
String result = string;
for (final Map.Entry<String, String> e : map.entrySet())
{
result = result.replace(e.getKey(), e.getValue());
}
return result;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\notification\NotificationMessageFormatter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setPublished(LocalDate published) {
this.published = published;
}
public Integer getQuantity() {
return quantity;
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
public Double getPrice() {
return price;
}
public vo... | @Override
public int hashCode() {
return Objects.hashCode(getId());
}
@Override
public String toString() {
return "BookDTO{" +
"id=" + getId() +
", title='" + getTitle() + "'" +
", author='" + getAuthor() + "'" +
", published='" + getPubli... | repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\service\dto\BookDTO.java | 2 |
请在Spring Boot框架中完成以下Java代码 | class HmacSHA256JWTService implements JWTSerializer, JWTDeserializer {
private static final String JWT_HEADER = base64URLFromString("{\"alg\":\"HS256\",\"type\":\"JWT\"}");
private static final String BASE64URL_PATTERN = "[\\w_\\-]+";
private static final Pattern JWT_PATTERN = compile(format("^(%s\\.)(%s\\... | @Override
public JWTPayload jwtPayloadFromJWT(String jwtToken) {
if (!JWT_PATTERN.matcher(jwtToken).matches()) {
throw new IllegalArgumentException("Malformed JWT: " + jwtToken);
}
final var splintedTokens = jwtToken.split("\\.");
if (!splintedTokens[0].equals(JWT_HEADER... | repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\infrastructure\jwt\HmacSHA256JWTService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Book {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private String uuid;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() { | return name;
}
public void setName(String name) {
this.name = name;
}
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
} | repos\tutorials-master\persistence-modules\read-only-transactions\src\main\java\com\baeldung\readonlytransactions\h2\Book.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class CommonPayComponent extends BaseComponent {
@Autowired
private AlipayComponent alipayComponent;
@Autowired
private WechatPayComponent wechatPayComponent;
@Autowired
private UnionPayComponent unionPayComponent;
@Override
public void handle(OrderProcessContext orderProcessCon... | * @param orderProcessContext
* @return
*/
private PayModeEnum getPayModeEnum(OrderProcessContext orderProcessContext) {
// 获取OrderInsertReq
OrderInsertReq orderInsertReq = (OrderInsertReq) orderProcessContext.getOrderProcessReq().getReqData();
// 获取支付方式Code
Integer payMode... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Order\src\main\java\com\gaoxi\order\component\pay\CommonPayComponent.java | 2 |
请完成以下Java代码 | default Builder<?> toBuilder() {
return new SimpleAuthentication.Builder(this);
}
/**
* A builder based on a given {@link Authentication} instance
*
* @author Josh Cummings
* @since 7.0
*/
interface Builder<B extends Builder<B>> {
/**
* Mutate the authorities with this {@link Consumer}.
* <p>
... | * principal from the pre-existing {@link Authentication} instance.
* </p>
* @param details the details to use
* @return the {@link Builder} for additional configuration
* @see Authentication#getDetails
*/
B details(@Nullable Object details);
/**
* Use this principal.
* <p>
* Note that in ma... | repos\spring-security-main\core\src\main\java\org\springframework\security\core\Authentication.java | 1 |
请完成以下Java代码 | public String toString()
{
return "BlackListItem ["
+ " packageProcessorId=" + packageProcessorId
+ ", classname=" + classname
+ ", hitCount=" + hitCount
+ ", dateFirstRequest=" + dateFirstRequest
+ ", dateLastRequest=" + dateLastRequest
+ ", exception=" + exception
+ "]";
}
... | final BlackListItem blacklistItemToAdd = new BlackListItem(packageProcessorId, packageProcessorClassname, exception);
blacklist.put(packageProcessorId, blacklistItemToAdd);
logger.warn("Processor blacklisted: " + blacklistItemToAdd, exception);
}
public void removeFromBlacklist(final int packageProcessorId)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\processor\impl\WorkpackageProcessorBlackList.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CurrencyConversionTypeId implements RepoIdAware
{
@JsonCreator
public static CurrencyConversionTypeId ofRepoId(final int repoId)
{
return new CurrencyConversionTypeId(repoId);
}
@Nullable
public static CurrencyConversionTypeId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? ofRepoId(repo... | private CurrencyConversionTypeId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "C_ConversionType_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
public static boolean equals(@Nullable final CurrencyConversionTypeId currencyConversionTypeId1, @Nullable final C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\money\CurrencyConversionTypeId.java | 2 |
请完成以下Java代码 | public synchronized void schedule(final ScheduledRequest request)
{
this.requestsQueue.add(request);
if (executorFuture.isDone())
{
executorFuture = executorFuture.thenRunAsync(this::run, executor);
}
}
private void run()
{
try
{
while (!requestsQueue.isEmpty())
{
final ScheduledRequest s... | {
final ApiResponse response = scheduleRequest.getHttpResponseSupplier().get();
scheduleRequest.getCompletableFuture().complete(response);
}
catch (final Exception exception)
{
scheduleRequest.getCompletableFuture().completeExceptionally(exception);
}
}
}
finally
{
executorFu... | repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\audit\HttpCallScheduler.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setAD_User_ID (final int AD_User_ID)
{
if (AD_User_ID < 0)
set_ValueNoCheck (COLUMNNAME_AD_User_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_ID, ... | @Override
public org.compiere.model.I_S_Resource getWorkStation()
{
return get_ValueAsPO(COLUMNNAME_WorkStation_ID, org.compiere.model.I_S_Resource.class);
}
@Override
public void setWorkStation(final org.compiere.model.I_S_Resource WorkStation)
{
set_ValueFromPO(COLUMNNAME_WorkStation_ID, org.compiere.model... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PP_Workstation_UserAssign.java | 1 |
请完成以下Java代码 | public void afterSave(final I_C_AcctSchema_Element element)
{
// Default Value
if (element.isMandatory() && InterfaceWrapperHelper.isValueChanged(element, COLUMNNAME_IsMandatory))
{
final AcctSchemaElementType elementType = AcctSchemaElementType.ofCode(element.getElementType());
if (AcctSchemaElementType.A... | */
private void updateData(final String element, final int id, final I_C_AcctSchema_Element elementRecord)
{
MAccount.updateValueDescription(Env.getCtx(), element + "=" + id, ITrx.TRXNAME_ThreadInherited);
//
{
final int clientId = elementRecord.getAD_Client_ID();
final String sql = "UPDATE C_ValidCombin... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\interceptor\C_AcctSchema_Element.java | 1 |
请完成以下Java代码 | public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
public DynamicEmbeddedSubProcessBuilder processDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
return this;
}
public Str... | return nextId("endEvent", flowElementMap);
}
protected String nextId(String prefix, Map<String, FlowElement> flowElementMap) {
String nextId = null;
boolean nextIdNotFound = true;
while (nextIdNotFound) {
if (!flowElementMap.containsKey(prefix + counter)) {
n... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\dynamic\DynamicEmbeddedSubProcessBuilder.java | 1 |
请完成以下Java代码 | public String getElementVariable() {
return elementVariable;
}
public void setElementVariable(String elementVariable) {
this.elementVariable = elementVariable;
}
public String getElementIndexVariable() {
return elementIndexVariable;
}
public void setElementIndexVariabl... | public String getOutputDataItem() {
return outputDataItem;
}
public void setOutputDataItem(String outputDataItem) {
this.outputDataItem = outputDataItem;
}
public MultiInstanceLoopCharacteristics clone() {
MultiInstanceLoopCharacteristics clone = new MultiInstanceLoopCharacteri... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\MultiInstanceLoopCharacteristics.java | 1 |
请完成以下Java代码 | public List<TransactionInterest2> getIntrst() {
if (intrst == null) {
intrst = new ArrayList<TransactionInterest2>();
}
return this.intrst;
}
/**
* Gets the value of the ntryDtls property.
*
* <p>
* This accessor method returns a reference to the live li... | * Gets the value of the addtlNtryInf property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAddtlNtryInf() {
return addtlNtryInf;
}
/**
* Sets the value of the addtlNtryInf property.
*
* @param value
* ... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\ReportEntry2.java | 1 |
请完成以下Java代码 | public PlainTrxManager setFailCommitIfTrxNotStarted(final boolean failCommitIfTrxNotStarted)
{
this.failCommitIfTrxNotStarted = failCommitIfTrxNotStarted;
return this;
}
public boolean isFailCommitIfTrxNotStarted()
{
return failCommitIfTrxNotStarted;
}
public PlainTrxManager setFailRollbackIfTrxNotStarted... | * Those events will be visible on {@link PlainTrx#toString()}.
*
* @param debugTrxLog
*/
public void setDebugTrxLog(boolean debugTrxLog)
{
this.debugTrxLog = debugTrxLog;
}
/**
* @see #setDebugTrxLog(boolean)
*/
public boolean isDebugTrxLog()
{
return debugTrxLog;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\api\impl\PlainTrxManager.java | 1 |
请完成以下Java代码 | public class SwaggerDocConstants
{
public static final String BPARTNER_IDENTIFIER_DOC = "Identifier of the bPartner in question. Can be\n"
+ "* a plain `<C_BPartner_ID>`\n"
+ "* or something like `ext-<C_Bartner.ExternalId>` (This is deprecated and will no longer be available with v2)\n"
+ "* or something lik... | + "* or something like `ext-<C_BPartner_Location_ID.ExternalId>` (This is deprecated and will no longer be available with v2)\n"
+ "* or something like `gln-<C_BPartner_Location_ID.GLN>`\n";
public static final String DATASOURCE_IDENTIFIER_DOC = "An identifier can be\n"
+ "* a plain `<AD_InputDataSource_ID>`\n"... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-rest_api\src\main\java\de\metas\common\rest_api\v1\SwaggerDocConstants.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class TaskletsConfig {
@Bean
public LinesReader linesReader() {
return new LinesReader();
}
@Bean
public LinesProcessor linesProcessor() {
return new LinesProcessor();
}
@Bean
public LinesWriter linesWriter() {
return new LinesWriter();
}
@Bean
... | .build();
}
@Bean
protected Step writeLines(JobRepository jobRepository, PlatformTransactionManager transactionManager) {
return new StepBuilder("writeLines", jobRepository)
.tasklet(linesWriter(), transactionManager)
.build();
}
@Bean
public Job job(JobRepository j... | repos\tutorials-master\spring-batch\src\main\java\com\baeldung\taskletsvschunks\config\TaskletsConfig.java | 2 |
请完成以下Java代码 | public int getRoundToPrecision()
{
return roundToPrecision;
}
/**
* This value is used to configure the {@link ScalesGetWeightHandler}.
*
* @param roundToPrecision may be <code>null</code> in that case, not rounding will be done.
* @see ScalesGetWeightHandler#setroundWeightToPrecision(int)
*/
public vo... | }
};
}
@Override
public IDeviceRequestHandler<DeviceRequestConfigureDevice, IDeviceResponse> getConfigureDeviceHandler()
{
return new ConfigureDeviceHandler(this);
}
@Override
public String toString()
{
return getClass().getSimpleName() + " with Endpoint " + endPoint.toString();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.device.scales\src\main\java\de\metas\device\scales\AbstractTcpScales.java | 1 |
请完成以下Java代码 | public void onCreate(VariableInstanceEntity variable, AbstractVariableScope sourceScope) {
handleEvent(new VariableEvent(variable, VariableListener.CREATE, sourceScope));
}
@Override
public void onUpdate(VariableInstanceEntity variable, AbstractVariableScope sourceScope) {
handleEvent(new VariableEvent(v... | }
} else if(sourceScope.getParentVariableScope() instanceof ExecutionEntity) {
addEventToScopeExecution((ExecutionEntity)sourceScope.getParentVariableScope(), event);
}
else {
throw new ProcessEngineException("BPMN execution scope expected");
}
}
protected void addEventToScopeExecution(... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\variable\scope\VariableListenerInvocationListener.java | 1 |
请完成以下Java代码 | public String getExecutionExceptionTypeHeaderName() {
return executionExceptionTypeHeaderName;
}
public void setExecutionExceptionTypeHeaderName(String executionExceptionTypeHeaderName) {
this.executionExceptionTypeHeaderName = executionExceptionTypeHeaderName;
}
public String getExecutionExceptionMessa... | return rootCauseExceptionTypeHeaderName;
}
public void setRootCauseExceptionTypeHeaderName(String rootCauseExceptionTypeHeaderName) {
this.rootCauseExceptionTypeHeaderName = rootCauseExceptionTypeHeaderName;
}
public String getRootCauseExceptionMessageHeaderName() {
return rootCauseExceptionMessageHeade... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\FallbackHeadersGatewayFilterFactory.java | 1 |
请完成以下Java代码 | public class MHRConceptCategory extends X_HR_Concept_Category
{
/**
*
*/
private static final long serialVersionUID = 8470029939291479283L;
private static CCache<Integer, MHRConceptCategory> s_cache = new CCache<Integer, MHRConceptCategory>(Table_Name, 20);
private static CCache<String, MHRConceptCategory> ... | if (value == null)
{
return null;
}
final int AD_Client_ID = Env.getAD_Client_ID(ctx);
// Try cache
final String key = AD_Client_ID+"#"+value;
MHRConceptCategory cc = s_cacheValue.get(key);
if (cc != null)
{
return cc;
}
// Try database
final String whereClause = COLUMNNAME_Value+"=? AND AD_... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.libero.liberoHR\src\main\java\org\eevolution\model\MHRConceptCategory.java | 1 |
请完成以下Java代码 | public JobDeclaration<BatchJobContext, MessageEntity> getJobDeclaration() {
return JOB_DECLARATION;
}
@Override
protected DeleteProcessInstanceBatchConfiguration createJobConfiguration(DeleteProcessInstanceBatchConfiguration configuration, List<String> processIdsForJob) {
return new DeleteProcessInstance... | batchConfiguration.isSkipIoMappings()
));
}
@Override
protected void createJobEntities(BatchEntity batch, DeleteProcessInstanceBatchConfiguration configuration, String deploymentId, List<String> processIds,
int invocationsPerBatchJob) {
// handle legacy batch entities (no up-front deployment ma... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\deletion\DeleteProcessInstancesJobHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void saveOrUpdate(
@Nullable final StockChangeDetail stockChangeDetail,
@NonNull final I_MD_Candidate candidateRecord)
{
if (stockChangeDetail == null)
{
return;
}
final CandidateId candidateId = CandidateId.ofRepoId(candidateRecord.getMD_Candidate_ID());
I_MD_Candidate_StockChange_Detail re... | return null;
}
final Integer computedFreshQtyOnHandId = NumberUtils.asIntegerOrNull(record.getFresh_QtyOnHand_ID());
final Integer computedFreshQtyOnHandLineId = NumberUtils.asIntegerOrNull(record.getFresh_QtyOnHand_Line_ID());
return StockChangeDetail.builder()
.candidateStockChangeDetailId(CandidateStoc... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java\de\metas\material\dispo\commons\repository\repohelpers\StockChangeDetailRepo.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getTown() {
return town;
}
/**
* Sets the value of the town property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTown(String value) {
this.town = value;
}
/**
* ZIP code.
*
... | /**
* Sets the value of the country property.
*
* @param value
* allowed object is
* {@link CountryType }
*
*/
public void setCountry(CountryType value) {
this.country = value;
}
/**
* Any further elements or attributes which are necessary for a... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\AddressType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class UnpaidInvoiceMatchingAmtQuery
{
@Nullable
IQueryFilter<I_C_Invoice> additionalFilter;
@NonNull
ImmutableSet<DocStatus> onlyDocStatuses;
@NonNull
QueryLimit queryLimit;
@Nullable
Amount openAmountAtDate;
@Nullable
ZonedDateTime openAmountEvaluationDate;
@Builder
private UnpaidInvoiceMatchin... | @NonNull
public Optional<CurrencyCode> getCurrencyCode()
{
return Optional.ofNullable(openAmountAtDate).map(Amount::getCurrencyCode);
}
@NonNull
public UnpaidInvoiceQuery getUnpaidInvoiceQuery()
{
return UnpaidInvoiceQuery.builder()
.additionalFilter(additionalFilter)
.onlyDocStatuses(onlyDocStatuses... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\invoice\UnpaidInvoiceMatchingAmtQuery.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class GraphiteProperties {
/**
* Whether exporting of metrics to Graphite is enabled.
*/
private boolean enabled = true;
/**
* Step size (i.e. reporting frequency) to use.
*/
private Duration step = Duration.ofMinutes(1);
/**
* Base time unit used to report rates.
*/
private TimeUnit rateUni... | public void setDurationUnits(TimeUnit durationUnits) {
this.durationUnits = durationUnits;
}
public String getHost() {
return this.host;
}
public void setHost(String host) {
this.host = host;
}
public Integer getPort() {
return this.port;
}
public void setPort(Integer port) {
this.port = port;
}
... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\graphite\GraphiteProperties.java | 2 |
请完成以下Java代码 | public boolean isEnableConfiguratorServiceLoader() {
return enableConfiguratorServiceLoader;
}
public AbstractEngineConfiguration setEnableConfiguratorServiceLoader(boolean enableConfiguratorServiceLoader) {
this.enableConfiguratorServiceLoader = enableConfiguratorServiceLoader;
ret... | return this;
}
public EngineConfigurator getEventRegistryConfigurator() {
return eventRegistryConfigurator;
}
public AbstractEngineConfiguration setEventRegistryConfigurator(EngineConfigurator eventRegistryConfigurator) {
this.eventRegistryConfigurator = eventRegistryConfigurator;
... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\AbstractEngineConfiguration.java | 1 |
请完成以下Java代码 | public class SpringBeanFactoryProxyMap implements Map<Object, Object> {
protected BeanFactory beanFactory;
public SpringBeanFactoryProxyMap(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
}
public Object get(Object key) {
if ((key == null) || (!String.class.isAssignableFrom... | throw new ActivitiException("can't search values in configuration beans");
}
public Set<Map.Entry<Object, Object>> entrySet() {
throw new ActivitiException("unsupported operation on configuration beans");
}
public boolean isEmpty() {
throw new ActivitiException("unsupported operation o... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cfg\SpringBeanFactoryProxyMap.java | 1 |
请完成以下Java代码 | public List<Fact> createFacts(final AcctSchema as)
{
setC_Currency_ID(as.getCurrencyId());
final Fact fact = new Fact(this, as, PostingType.Actual);
getDocLines().forEach(line -> createFactsForInventoryLine(fact, line));
return ImmutableList.of(fact);
}
/**
* <pre>
* Inventory
* Inventory ... | .setAccount(line.getAccount(ProductAcctType.P_Asset_Acct, as))
.setAmtSourceDrOrCr(costs.toMoney())
.setQty(line.getQty())
.locatorId(line.getM_Locator_ID())
.buildAndAdd();
//
// Charge/InventoryDiff CR/DR
final Account invDiff = line.getInvDifferencesAccount(as, costs.toBigDecimal().negate());
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Doc_Inventory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class InvoiceDimensionFactory implements DimensionFactory<I_C_Invoice>
{
@Override
public String getHandledTableName()
{
return I_C_Invoice.Table_Name;
}
@Override
@NonNull
public Dimension getFromRecord(@NonNull final I_C_Invoice record)
{
return Dimension.builder()
.projectId(ProjectId.ofRepoI... | .user1_ID(record.getUser1_ID())
.user2_ID(record.getUser2_ID())
.build();
}
@Override
public void updateRecord(@NonNull final I_C_Invoice record, @NonNull final Dimension from)
{
record.setC_Project_ID(ProjectId.toRepoId(from.getProjectId()));
record.setC_Campaign_ID(from.getCampaignId());
record.set... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\document\dimension\InvoiceDimensionFactory.java | 2 |
请完成以下Java代码 | public void setRfQ_SelectedWinners_Count (int RfQ_SelectedWinners_Count)
{
throw new IllegalArgumentException ("RfQ_SelectedWinners_Count is virtual column"); }
/** Get Selected winners count.
@return Selected winners count */
@Override
public int getRfQ_SelectedWinners_Count ()
{
Integer ii = (Integer)g... | }
/** Get Use line quantity.
@return Use line quantity */
@Override
public boolean isUseLineQty ()
{
Object oo = get_Value(COLUMNNAME_UseLineQty);
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.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQLine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class H2InitDemoApplication {
public static void main(String[] args) {
ApplicationContext ctx = SpringApplication.run(H2InitDemoApplication.class, args);
initDatabaseUsingPlainJDBCWithURL();
initDatabaseUsingPlainJDBCWithFile();
initDatabaseUsingSpring(ctx.getBean(DataSource.... | conn.createStatement().execute("insert into users (name, email) values ('Mike', 'mike@baeldung.com')");
System.out.println("Added user mike");
}
catch (Exception e) {
e.printStackTrace();
}
}
/**
* Initialize in-memory database using Spring Boot
* prope... | repos\tutorials-master\libraries-data-db\src\main\java\com\baeldung\libraries\h2\H2InitDemoApplication.java | 2 |
请完成以下Java代码 | public java.lang.String getDK_CustomerNumber ()
{
return (java.lang.String)get_Value(COLUMNNAME_DK_CustomerNumber);
}
/** Set Gewünschte Lieferuhrzeit von.
@param DK_DesiredDeliveryTime_From Gewünschte Lieferuhrzeit von */
@Override
public void setDK_DesiredDeliveryTime_From (java.sql.Timestamp DK_DesiredD... | /** Get EMail Empfänger.
@return EMail address to send requests to - e.g. edi@manufacturer.com
*/
@Override
public java.lang.String getEMail_To ()
{
return (java.lang.String)get_Value(COLUMNNAME_EMail_To);
}
@Override
public org.compiere.model.I_M_Shipper getM_Shipper() throws RuntimeException
{
retu... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.derkurier\src\main\java-gen\de\metas\shipper\gateway\derkurier\model\X_DerKurier_Shipper_Config.java | 1 |
请完成以下Java代码 | public void setLastAccessedTime(Instant lastAccessedTime) {
this.lastAccessedTime = lastAccessedTime;
}
@Override
public Instant getCreationTime() {
return this.creationTime;
}
@Override
public String getId() {
return this.id;
}
/**
* Get the original session id.
* @return the original session id
... | * Sets the time that this {@link Session} was created. The default is when the
* {@link Session} was instantiated.
* @param creationTime the time that this {@link Session} was created.
*/
public void setCreationTime(Instant creationTime) {
this.creationTime = creationTime;
}
/**
* Sets the identifier for ... | repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\MapSession.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getREFERENCEQUAL() {
return referencequal;
}
/**
* Sets the value of the referencequal property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setREFERENCEQUAL(String value) {
this.referencequal = value... | *
*/
public String getREFERENCEDATE1() {
return referencedate1;
}
/**
* Sets the value of the referencedate1 property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setREFERENCEDATE1(String value) {
thi... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DREFE1.java | 2 |
请完成以下Java代码 | public ImmutableList<RuntimeParameter> getByConfigIdAndRequest(@NonNull final ExternalSystemParentConfigId configId, @NonNull final String externalRequest)
{
return queryBL.createQueryBuilder(I_ExternalSystem_RuntimeParameter.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_ExternalSystem_RuntimeParam... | .value(record.getValue())
.build();
}
@NonNull
private Optional<I_ExternalSystem_RuntimeParameter> getRecordByUniqueKey(@NonNull final RuntimeParamUniqueKey uniqueKey)
{
return queryBL.createQueryBuilder(I_ExternalSystem_RuntimeParameter.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_Externa... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\runtimeparameters\RuntimeParametersRepository.java | 1 |
请完成以下Java代码 | public DelegateExecution getExecution() {
return execution;
}
public void setExecution(DelegateExecution execution) {
this.execution = execution;
}
@Override
public String getSignalName() {
return signalName;
}
public void setSignalName(String signalName) {
... | }
public void setSignalData(Object signalData) {
this.signalData = signalData;
}
@Override
public void doNotLeave() {
shouldLeave = false;
}
public boolean shouldLeave() {
return shouldLeave;
}
} | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\delegate\TriggerableJavaDelegateContextImpl.java | 1 |
请完成以下Java代码 | public List<PrinterHWMediaSize> getPrinterHWMediaSizes()
{
return this.printerHWMediaSizes;
}
public void setPrinterHWMediaSizes(List<PrinterHWMediaSize> printerHWMediaSizes)
{
this.printerHWMediaSizes = printerHWMediaSizes;
}
public List<PrinterHWMediaTray> getPrinterHWMediaTrays()
{
return this.printer... | public static class PrinterHWMediaTray implements Serializable
{
/**
*
*/
private static final long serialVersionUID = -1833627999553124042L;
private String name;
private String trayNumber;
private String isDefault;
public String getName()
{
return name;
}
public void setName(String name)... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.api\src\main\java\de\metas\printing\esb\api\PrinterHW.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static ToCoreNotificationMsg toProto(EntityId entityId, List<TsKvEntry> updates) {
return toProto(true, null, entityId, updates);
}
static ToCoreNotificationMsg toProto(String scope, EntityId entityId, List<TsKvEntry> updates) {
return toProto(false, scope, entityId, updates);
}
static... | dataBuilder.addAllTsValue(value);
builder.addData(dataBuilder.build());
});
var result = TransportProtos.LocalSubscriptionServiceMsgProto.newBuilder();
if (timeSeries) {
result.setTsUpdate(builder);
} else {
builder.setScope(scope);
result... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\subscription\TbSubscriptionUtils.java | 2 |
请完成以下Java代码 | protected void checkReadProcessDefinition(ActivityStatisticsQueryImpl query) {
CommandContext commandContext = getCommandContext();
if (isAuthorizationEnabled() && getCurrentAuthentication() != null && commandContext.isAuthorizationCheckEnabled()) {
String processDefinitionId = query.getProcessDefinitionI... | }
protected void checkReadDecisionRequirementsDefinition(HistoricDecisionInstanceStatisticsQueryImpl query) {
CommandContext commandContext = getCommandContext();
if (isAuthorizationEnabled() && getCurrentAuthentication() != null && commandContext.isAuthorizationCheckEnabled()) {
String decisionRequire... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\StatisticsManager.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO (Properties ctx)
{
org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName());
return poi;
}
/** Set Beschreibung.
@param Description Beschreibung */
@Override
public void setDescription (java.lang.String De... | @Override
public int getM_AttributeValue_Mapping_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_AttributeValue_Mapping_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Merkmals-Wert Nach.
@param M_AttributeValue_To_ID
Product Attribute Value To
*/
@Override
public void setM... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeValue_Mapping.java | 1 |
请完成以下Java代码 | public List<CashBalance3> getBal() {
if (bal == null) {
bal = new ArrayList<CashBalance3>();
}
return this.bal;
}
/**
* Gets the value of the txsSummry property.
*
* @return
* possible object is
* {@link TotalTransactions2 }
*
... | return this.ntry;
}
/**
* Gets the value of the addtlStmtInf property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getAddtlStmtInf() {
return addtlStmtInf;
}
/**
* Sets the value of the addtlStmtInf property.
... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\AccountStatement2.java | 1 |
请完成以下Java代码 | public int getDIM_Dimension_Type_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_DIM_Dimension_Type_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Interner Name.
@param InternalName
Generally used to give records a name that can be safely referenced from code.
*/
@Override
pu... | public java.lang.String getInternalName ()
{
return (java.lang.String)get_Value(COLUMNNAME_InternalName);
}
/** Set Name.
@param Name Name */
@Override
public void setName (java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Name */
@Override
public java.lang.Str... | repos\metasfresh-new_dawn_uat\backend\de.metas.dimension\src\main\java-gen\de\metas\dimension\model\X_DIM_Dimension_Type.java | 1 |
请完成以下Java代码 | public Money getFreightRate(
@NonNull final ShipperId shipperId,
@NonNull final CountryId countryId,
@NonNull final LocalDate date,
@NonNull final Money shipmentValueAmt)
{
return getBreak(shipperId, countryId, date, shipmentValueAmt)
.map(FreightCostBreak::getFreightRate)
.orElseGet(shipmentValu... | Optional<FreightCostShipper> shipperIfExists = getShipperIfExists(shipperId, date);
return shipperIfExists.orElseThrow(() -> new AdempiereException("@NotFound@ @M_FreightCostShipper_ID@ (@M_Shipper_ID@:" + shipperId + ", @M_FreightCost_ID@:" + getName() + ")"));
}
public Optional<FreightCostShipper> getShipperIfE... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\freighcost\FreightCost.java | 1 |
请完成以下Java代码 | public String getLocatorName(final LocatorId locatorId)
{
return getWarehouseLocators(locatorId.getWarehouseId()).getLocatorName(locatorId);
}
private WarehouseLocatorsInfo getWarehouseLocators(@NonNull final WarehouseId warehouseId)
{
return locatorsByWarehouseId.computeIfAbsent(warehouseId, this::retrieveWar... | .stream()
.map(WarehousesLoadingCache::fromRecord)
.collect(ImmutableList.toImmutableList()))
.build();
}
private static LocatorInfo fromRecord(final I_M_Locator record)
{
return LocatorInfo.builder()
.locatorId(LocatorId.ofRepoId(record.getM_Warehouse_ID(), record.getM_Locator_ID()))
.lo... | repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\deps\warehouse\WarehousesLoadingCache.java | 1 |
请完成以下Java代码 | private ITranslatableString getAttributeValueAsDisplayString()
{
final AttributeValueType valueType = attribute.getValueType();
if (AttributeValueType.STRING.equals(valueType))
{
final String valueStr = attributeValue != null ? attributeValue.toString() : null;
return ASIDescriptionBuilderCommand.formatStr... | {
return ASIDescriptionBuilderCommand.formatDateValue(valueDate);
}
}
else if (AttributeValueType.LIST.equals(valueType))
{
final AttributeListValue attributeValue = attributeValueId != null ? attributesRepo.retrieveAttributeValueOrNull(attribute, attributeValueId) : null;
if (attributeValue != null)... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\api\impl\AttributeDescriptionPatternEvalCtx.java | 1 |
请完成以下Java代码 | public void setSchemaLocations(@Nullable List<String> schemaLocations) {
this.schemaLocations = schemaLocations;
}
/**
* Returns the locations of data (DML) scripts to apply to the database.
* @return the locations of the data scripts
*/
public @Nullable List<String> getDataLocations() {
return this.dataL... | }
/**
* Returns the encoding to use when reading the schema and data scripts.
* @return the script encoding
*/
public @Nullable Charset getEncoding() {
return this.encoding;
}
/**
* Sets the encoding to use when reading the schema and data scripts.
* @param encoding encoding to use when reading the sc... | repos\spring-boot-4.0.1\module\spring-boot-sql\src\main\java\org\springframework\boot\sql\init\DatabaseInitializationSettings.java | 1 |
请完成以下Java代码 | public void setStatisticsInfo (String StatisticsInfo)
{
set_ValueNoCheck (COLUMNNAME_StatisticsInfo, StatisticsInfo);
}
/** Get Statistics.
@return Information to help profiling the system for solving support issues
*/
public String getStatisticsInfo ()
{
return (String)get_Value(COLUMNNAME_StatisticsIn... | /** Production = P */
public static final String SYSTEMSTATUS_Production = "P";
/** Set System Status.
@param SystemStatus
Status of the system - Support priority depends on system status
*/
public void setSystemStatus (String SystemStatus)
{
set_Value (COLUMNNAME_SystemStatus, SystemStatus);
}
/** Ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_IssueSystem.java | 1 |
请完成以下Java代码 | public void afterPropertiesSet() {
Assert.notNull(this.key,
"A Key is required and should match that configured for the RunAsImplAuthenticationProvider");
}
@Override
public @Nullable Authentication buildRunAs(Authentication authentication, Object object,
Collection<ConfigAttribute> attributes) {
List<Gr... | * to an empty value, although this is usually not desirable.
* @param rolePrefix the new prefix
*/
public void setRolePrefix(String rolePrefix) {
this.rolePrefix = rolePrefix;
}
@Override
public boolean supports(ConfigAttribute attribute) {
return attribute.getAttribute() != null && attribute.getAttribute(... | repos\spring-security-main\access\src\main\java\org\springframework\security\access\intercept\RunAsManagerImpl.java | 1 |
请完成以下Java代码 | class MariaDbJdbcDockerComposeConnectionDetailsFactory
extends DockerComposeConnectionDetailsFactory<JdbcConnectionDetails> {
protected MariaDbJdbcDockerComposeConnectionDetailsFactory() {
super("mariadb");
}
@Override
protected JdbcConnectionDetails getDockerComposeConnectionDetails(DockerComposeConnectionSo... | }
@Override
public String getPassword() {
return this.environment.getPassword();
}
@Override
public String getJdbcUrl() {
return this.jdbcUrl;
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\docker\compose\MariaDbJdbcDockerComposeConnectionDetailsFactory.java | 1 |
请完成以下Java代码 | private void createAndSaveDetailRecords(
@NonNull final I_C_Invoice_Candidate newInvoiceCandidate,
@NonNull final FlatrateDataEntry entry,
@NonNull final List<FlatrateDataEntryDetail> matchingDetails,
@NonNull final ICsCreationContext context)
{
for (final FlatrateDataEntryDetail detail : matchingDetail... | {
newDetailRecord.setDropShip_Location_ID(dropShipLocation.getBpartnerLocationId().getRepoId());
newDetailRecord.setDropShip_BPartner_ID(dropShipLocation.getBpartnerId().getRepoId());
}
InterfaceWrapperHelper.saveRecord(newDetailRecord);
}
}
@Data
private static class ICsCreationContext
{
@NonNul... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\flatrate\dataEntry\invoice\FlatrateDataEntryToICService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ReconciliationFactoryImpl implements ReconciliationFactory, ApplicationContextAware {
private static ApplicationContext applicationContext;
/**
* 去Spring容器中根据beanName获取对象(也可以直接根据名字创建实例,可以参考后面流程中的parser)
*
* @param payInterface
* @return
*/
public Object getService(String payInterface) {
r... | * 账单日
*/
public File fileDown(String payInterface, Date billDate) throws Exception {
// 找到具体的FileDown实现,做向上转型
FileDown fileDown = (FileDown) this.getService(payInterface);
// 加载配置文件,获取下载的对账文件保存路径
String dir = ReconciliationConfigUtil.readConfig("dir") + payInterface.toLowerCase();
return fileDow... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\fileDown\impl\ReconciliationFactoryImpl.java | 2 |
请完成以下Java代码 | public String getTableName()
{
return I_C_Invoice_Candidate.Table_Name;
}
@Override
public List<String> getDependsOnColumnNames()
{
return columnNames;
}
@Override
public AggregationKey buildAggregationKey(I_C_Invoice_Candidate model)
{
final List<Object> keyValues = getValues(model);
final ArrayKey ... | values.add(null); // ic.getDateInvoiced());
values.add(null); // ic.getDateAcct()); // task 08437
// IsSOTrx
values.add(ic.isSOTrx());
// Pricing System
final int pricingSystemId = IPriceListDAO.M_PricingSystem_ID_None; // 08511 workaround
values.add(pricingSystemId);
values.add(invoiceCandBL.isTaxIncl... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\agg\key\impl\ICHeaderAggregationKeyBuilder_OLD.java | 1 |
请完成以下Java代码 | public class Result<T> implements Serializable {
private static final long serialVersionUID = 5925101851082556646L;
private T data;
private Status status;
private String code;
private String message;
public static Result success() {
Result result = new Result<>();
result.setCode... | public Status getStatus() {
return status;
}
public void setStatus(Status status) {
this.status = status;
}
public static enum Status {
SUCCESS("OK"),
ERROR("ERROR");
private String code;
private Status(String code) {
this.code = code;
... | repos\spring-boot-student-master\spring-boot-student-hystrix\src\main\java\com\xiaolyuh\entity\Result.java | 1 |
请完成以下Java代码 | public void actionPerformed(ActionEvent e) {
continueB_actionPerformed(e);
}
});
continueB.setText(Local.getString("Find next"));
continueB.setPreferredSize(new Dimension(120, 26));
continueB.setMinimumSize(new Dimension(80, 26));
continueB.setMaximumSize(new Dimensio... | buttonsPanel.add(continueB, null);
buttonsPanel.add(cancelB, null);
this.add(buttonsPanel, BorderLayout.EAST);
}
void cancelB_actionPerformed(ActionEvent e) {
cont = true;
cancel = true;
thread.resume();
}
void continueB_actionPerformed(ActionEvent e) {
cont = true;
thr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\net\sf\memoranda\ui\htmleditor\ContinueSearchDialog.java | 1 |
请完成以下Java代码 | public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setM_Warehouse_ID (int M_Warehouse_ID)
{
if (M_Warehouse_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Warehouse_ID, Integer.valueOf(M_Warehouse_I... | }
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
@Override
public void setStorageAttributesKey (java.lang.String StorageAttributesKey)
{
set_ValueNoCheck (COLUMNNAME_StorageAttributesKey, StorageAttributesKey);
}
@Override
public java.lang.String getStorageAttributesKey()... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java-gen\de\metas\material\dispo\model\X_MD_Candidate_ATP_QueryResult.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class KeyVaultProperties {
private String vaultUrl;
private String tenantId;
private String clientId;
private String clientSecret;
public KeyVaultProperties(String vaultUrl, String tenantId, String clientId, String clientSecret) {
this.vaultUrl = vaultUrl;
this.tenantId = ten... | public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getClientSecret() {
return clientSecret;
}
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;... | repos\tutorials-master\spring-cloud-modules\spring-cloud-azure\src\main\java\com\baeldung\spring\cloud\azure\keyvault\data\KeyVaultProperties.java | 2 |
请完成以下Java代码 | public String getBPartnerAddress()
{
return delegate.getBPartnerAddress_Override();
}
@Override
public void setBPartnerAddress(final String address)
{
delegate.setBPartnerAddress_Override(address);
}
}
@Override
public int updateDatePromisedOverrideAndPOReference(@NonNull final PInstanceId pinsta... | {
updater.addSetColumnValue(I_M_ReceiptSchedule.COLUMNNAME_DatePromised_Override, datePromisedOverride);
}
if (!Check.isBlank(poReference))
{
updater.addSetColumnValue(I_M_ReceiptSchedule.COLUMNNAME_POReference, poReference);
}
return queryBL.createQueryBuilder(I_M_ReceiptSchedule.class)
.setOnlyS... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\ReceiptScheduleBL.java | 1 |
请完成以下Java代码 | public final String getDescription()
{
return m_description;
}
/**
* Returns Key or Value as String
*
* @return String or null
*/
public abstract String getID();
/**
* Comparator Interface (based on toString value)
*
* @param o1 Object 1
* @param o2 Object 2
* @return compareTo value
*/
@O... | * @param o the Object to be compared.
* @return a negative integer, zero, or a positive integer as this object
* is less than, equal to, or greater than the specified object.
*/
public final int compareTo(NamePair o)
{
return compare(this, o);
} // compareTo
/**
* To String - returns name
*/... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\NamePair.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class FTSJoinColumnList implements Iterable<FTSJoinColumn>
{
private final ImmutableList<FTSJoinColumn> joinColumns;
private FTSJoinColumnList(@NonNull final List<FTSJoinColumn> joinColumns)
{
Check.assumeNotEmpty(joinColumns, "at least one JOIN column shall be defined");
this.joinColumns = ImmutableList... | {
if (sql.length() > 0)
{
sql.append(" AND ");
}
if (joinColumn.isNullable())
{
sql.append("(")
.append(selectionTableNameOrAliasWithDot).append(joinColumn.getSelectionTableColumnName()).append(" IS NULL")
.append(" OR ")
.append(targetTableNameOrAlias).append(".").append(joinC... | repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java\de\metas\fulltextsearch\config\FTSJoinColumnList.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void withThreadContextClassLoader(ClassLoader classLoader, Runnable action) {
ClassLoader previous = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(classLoader);
action.run();
}
finally {
Thread.currentThread().setContextClassLoader(pre... | return "'" + connection.getMetaData().getURL() + "'";
}
catch (Exception ex) {
return null;
}
}
private void log(List<String> urls, String path) {
if (!urls.isEmpty()) {
logger.info(LogMessage.format("H2 console available at '%s'. %s available at %s", path,
(urls.size() > 1) ? "Databases"... | repos\spring-boot-4.0.1\module\spring-boot-h2console\src\main\java\org\springframework\boot\h2console\autoconfigure\H2ConsoleAutoConfiguration.java | 2 |
请完成以下Java代码 | public I_PP_Product_BOM createBOM(@NonNull final BOMCreateRequest request)
{
final ProductId productId = request.getProductId();
final ProductBOMVersionsId bomVersionsId = bomVersionsDAO.retrieveBOMVersionsId(productId)
.orElseGet(() -> bomVersionsDAO.createBOMVersions(BOMVersionsCreateRequest.of(request)));
... | final AttributesKey planningAttributesKeys = AttributesKeys.createAttributesKeyFromASIStorageAttributes(planningASIId).orElse(AttributesKey.NONE);
if (planningAttributesKeys.isNone())
{
return;
}
final AttributeSetInstanceId productBomASIId = AttributeSetInstanceId.ofRepoIdOrNone(productBom.getM_AttributeS... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\eevolution\api\impl\ProductBOMService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class RedisController {
private RedisTemplate<String, String> redisTemplate;
public RedisController(RedisTemplate<String, String> redisTemplate) {
this.redisTemplate = redisTemplate;
}
@GetMapping("/publish")
public void publish(@RequestParam String message)... | @Service
static class MessageSubscriber {
public MessageSubscriber(RedisTemplate redisTemplate) {
RedisConnection redisConnection = redisTemplate.getConnectionFactory().getConnection();
redisConnection.subscribe(new MessageListener() {
@Override
publi... | repos\SpringBoot-Learning-master\2.x\chapter5-5\src\main\java\com\didispace\chapter55\Chapter55Application.java | 2 |
请完成以下Java代码 | public String getOptionType() {
return optionType;
}
public void setOptionType(String optionType) {
this.optionType = optionType;
}
public Boolean getHasEmptyValue() {
return hasEmptyValue;
}
public void setHasEmptyValue(Boolean hasEmptyValue) {
this.hasEmptyVa... | }
public void setOptions(List<Option> options) {
this.options = options;
}
public String getOptionsExpression() {
return optionsExpression;
}
public void setOptionsExpression(String optionsExpression) {
this.optionsExpression = optionsExpression;
}
} | repos\flowable-engine-main\modules\flowable-form-model\src\main\java\org\flowable\form\model\OptionFormField.java | 1 |
请完成以下Java代码 | public String getFormat() {
String raw = "Your response should be in JSON format.\nThe data structure for the JSON should match this Java class: %s\n" +
"For the map values, here is the JSON Schema instance your output must adhere to:\n```%s```\n" +
"Do not include any explanations, only... | private String generateJsonSchemaForValueType(Class<V> valueType) {
try {
JacksonModule jacksonModule = new JacksonModule();
SchemaGeneratorConfig config = new SchemaGeneratorConfigBuilder(SchemaVersion.DRAFT_2020_12, OptionPreset.PLAIN_JSON)
.with(jacksonModule)
... | repos\tutorials-master\spring-ai-modules\spring-ai-3\src\main\java\com\baeldung\springaistructuredoutput\converters\GenericMapOutputConverter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class User {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String firstName;
private String lastName;
private String email;
private String password;
public void setId(Long id) {
this.id = id;
}
public String getFirstName() {
... | @ManyToMany(fetch = FetchType.EAGER, cascade = CascadeType.ALL)
@JoinTable(
name = "users_roles",
joinColumns = @JoinColumn(
name = "user_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(
name = "role_id", referencedColum... | repos\Spring-Boot-Advanced-Projects-main\Springboot-Registration-Project\src\main\java\spring\security\model\User.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class DataRestController {
private static final Logger LOG = LoggerFactory.getLogger(DataRestController.class);
@Autowired
private DataService dataService;
@Secured({"ROLE_USER", "ROLE_ADMIN"})
@GetMapping("/users/all")
public ResponseEntity<ServerData> getForUsersData(Authentication a... | return ResponseEntity.ok().body(dataService.getSecuredData("Secured for ADMIN " + authentication.getName()));
}
@Secured("ROLE_ADMIN")
@PutMapping("/admins/state/{state}")
public ResponseEntity<ServerData> setStateForAdmins(Authentication authentication, @PathVariable String state) {
LOG.info("... | repos\spring-examples-java-17\spring-jcasbin\src\main\java\itx\examples\springboot\security\rest\DataRestController.java | 2 |
请完成以下Java代码 | public String getA_Entry_Type ()
{
return (String)get_Value(COLUMNNAME_A_Entry_Type);
}
/** Set Period/Yearly.
@param A_Period Period/Yearly */
public void setA_Period (int A_Period)
{
set_Value (COLUMNNAME_A_Period, Integer.valueOf(A_Period));
}
/** Get Period/Yearly.
@return Period/Yearly */
pu... | /** Get Depreciate.
@return The asset will be depreciated
*/
public boolean isDepreciated ()
{
Object oo = get_Value(COLUMNNAME_IsDepreciated);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set PostingTy... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Depreciation_Exp.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets the value of the type prop... | }
/**
* Gets the value of the encoding property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getEncoding() {
return encoding;
}
/**
* Sets the value of the encoding property.
*
* @param value
* ... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\EncryptedType.java | 1 |
请完成以下Java代码 | public ChequeType2Code getChqTp() {
return chqTp;
}
/**
* Sets the value of the chqTp property.
*
* @param value
* allowed object is
* {@link ChequeType2Code }
*
*/
public void setChqTp(ChequeType2Code value) {
this.chqTp = value;
}
... | */
public ChequeDeliveryMethod1Choice getDlvryMtd() {
return dlvryMtd;
}
/**
* Sets the value of the dlvryMtd property.
*
* @param value
* allowed object is
* {@link ChequeDeliveryMethod1Choice }
*
*/
public void setDlvryMtd(ChequeDeliveryMethod1... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\Cheque6CH.java | 1 |
请完成以下Java代码 | public void setPP_Plant(final org.compiere.model.I_S_Resource PP_Plant)
{
set_ValueFromPO(COLUMNNAME_PP_Plant_ID, org.compiere.model.I_S_Resource.class, PP_Plant);
}
@Override
public void setPP_Plant_ID (final int PP_Plant_ID)
{
if (PP_Plant_ID < 1)
set_Value (COLUMNNAME_PP_Plant_ID, null);
else
set_V... | {
throw new IllegalArgumentException ("ProductName is virtual column"); }
@Override
public java.lang.String getProductName()
{
return get_ValueAsString(COLUMNNAME_ProductName);
}
@Override
public void setQtyCount (final BigDecimal QtyCount)
{
set_Value (COLUMNNAME_QtyCount, QtyCount);
}
@Override
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java-gen\de\metas\fresh\model\X_Fresh_QtyOnHand_Line.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@ApiModelProperty(example = "flowable-app-examples")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@ApiModelProper... | public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
@ApiModelProperty(example = "http://localhost:8081/app-api/app-repository/deployments/10")
public String getUrl() {
return url;
}
public void set... | repos\flowable-engine-main\modules\flowable-app-engine-rest\src\main\java\org\flowable\app\rest\service\api\repository\AppDeploymentResponse.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public DynatraceApiVersion apiVersion() {
return obtain((properties) -> (properties.getV1().getDeviceId() != null) ? DynatraceApiVersion.V1
: DynatraceApiVersion.V2, DynatraceConfig.super::apiVersion);
}
@Override
public String metricKeyPrefix() {
return obtain(v2(V2::getMetricKeyPrefix), DynatraceConfig.su... | @Override
public boolean exportMeterMetadata() {
return obtain(v2(V2::isExportMeterMetadata), DynatraceConfig.super::exportMeterMetadata);
}
private <V> Getter<DynatraceProperties, V> v1(Getter<V1, V> getter) {
return (properties) -> getter.get(properties.getV1());
}
private <V> Getter<DynatraceProperties, V... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\dynatrace\DynatracePropertiesConfigAdapter.java | 2 |
请完成以下Java代码 | public int getRevision() {
return revision;
}
@Override
public void setRevision(int revision) {
this.revision = revision;
}
@Override
public String getVariableName() {
return name;
}
@Override
public void setName(String name) {
this.name = name;
... | this.cachedValue = cachedValue;
}
// common methods ///////////////////////////////////////////////////////////////
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("HistoricDetailVariableInstanceUpdateEntity[");
sb.append("id=").append(id)... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\HistoricDetailVariableInstanceUpdateEntityImpl.java | 1 |
请完成以下Java代码 | public boolean contains(@NonNull final String contextVariable)
{
if (contextVariables.contains(contextVariable))
{
return true;
}
if (knownMissing.contains(contextVariable))
{
return true;
}
return parent != null && parent.contains(contextVariable);
}
@Override
@Deprecated
public String toSt... | {
StringBuilder sb = new StringBuilder();
sb.append(name).append(":");
sb.append("\n\tContext variables: ").append(String.join(",", contextVariables));
if (!knownMissing.isEmpty())
{
sb.append("\n\tKnown missing context variables: ").append(String.join(",", knownMissing));
}
if (parent != null)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\health\ContextVariables.java | 1 |
请完成以下Java代码 | public int getM_Warehouse_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID);
}
@Override
public void setMD_Available_For_Sales_ID (final int MD_Available_For_Sales_ID)
{
if (MD_Available_For_Sales_ID < 1)
set_ValueNoCheck (COLUMNNAME_MD_Available_For_Sales_ID, null);
else
set_ValueNoCheck (CO... | @Override
public BigDecimal getQtyToBeShipped()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyToBeShipped);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setStorageAttributesKey (final java.lang.String StorageAttributesKey)
{
set_Value (COLUMNNAME_StorageAttributesKey, St... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MD_Available_For_Sales.java | 1 |
请完成以下Java代码 | public String getClickTargetURL()
{
getMClickCount();
if (m_clickCount == null)
return "-";
return m_clickCount.getTargetURL();
} // getClickTargetURL
/**
* Set Click Target URL (in ClickCount)
* @param TargetURL url
*/
public void setClickTargetURL(String TargetURL)
{
getMClickCount();
if (m... | public MCounterCount getMCounterCount()
{
if (getW_CounterCount_ID() == 0)
return null;
if (m_counterCount == null)
m_counterCount = new MCounterCount (getCtx(), getW_CounterCount_ID(), get_TrxName());
return m_counterCount;
} // MCounterCount
/**
* Get Sales Rep ID.
* (AD_User_ID of oldest BP use... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MAdvertisement.java | 1 |
请完成以下Java代码 | public SolrProductDO setDescription(String description) {
this.description = description;
return this;
}
public Integer getCid() {
return cid;
}
public SolrProductDO setCid(Integer cid) {
this.cid = cid;
return this;
}
public String getCategoryName() {
... | this.categoryName = categoryName;
return this;
}
@Override
public String toString() {
return "SolrProductDO{" +
"id=" + id +
", name='" + name + '\'' +
", description='" + description + '\'' +
", cid=" + cid +
"... | repos\SpringBoot-Labs-master\lab-66\lab-66-spring-data-solr\src\main\java\cn\iocoder\springboot\lab15\springdatasolr\dataobject\SolrProductDO.java | 1 |
请完成以下Java代码 | public Object getPrincipal() {
return this.principal;
}
@Override
public Object getCredentials() {
return "";
}
/**
* Returns the authorization URI.
* @return the authorization URI
*/
public String getAuthorizationUri() {
return this.authorizationUri;
}
/**
* Returns the client identifier.
* ... | * Returns the state.
* @return the state
*/
@Nullable
public String getState() {
return this.state;
}
/**
* Returns the requested (or authorized) scope(s).
* @return the requested (or authorized) scope(s), or an empty {@code Set} if not
* available
*/
public Set<String> getScopes() {
return this.s... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\AbstractOAuth2AuthorizationCodeRequestAuthenticationToken.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<Job> executeList(CommandContext commandContext) {
return jobServiceConfiguration.getDeadLetterJobEntityManager().findJobsByQueryCriteria(this);
}
// getters //////////////////////////////////////////
public String getProcessInstanceId() {
return processInstanceId;
}
... | return scopeType;
}
public boolean isWithoutScopeType() {
return withoutScopeType;
}
public String getScopeDefinitionId() {
return scopeDefinitionId;
}
public String getCaseDefinitionKey() {
return caseDefinitionKey;
}
public String getCorrelationId() {
... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\DeadLetterJobQueryImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public UserDetailsManager users(HttpSecurity http) throws Exception {
AuthenticationManagerBuilder authenticationManagerBuilder = http.getSharedObject(AuthenticationManagerBuilder.class);
authenticationManagerBuilder.userDetailsService(userDetailsService).passwordEncoder(encoder());
authenticati... | @Bean
public DaoAuthenticationProvider authenticationProvider() {
final DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider();
authProvider.setUserDetailsService(userDetailsService);
authProvider.setPasswordEncoder(encoder());
return authProvider;
}
@Bean
... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-3\src\main\java\com\baeldung\relationships\SpringSecurityConfig.java | 2 |
请完成以下Java代码 | public static List<String> getTimeLine() throws TwitterException {
Twitter twitter = getTwitterinstance();
List<Status> statuses = twitter.getHomeTimeline();
return statuses.stream().map(
item -> item.getText()).collect(
Collectors.toList());
}
public static String sendDirectMessage(String recipient... | System.out.println("Got a status deletion notice id:" + arg.getStatusId());
}
@Override
public void onScrubGeo(long userId, long upToStatusId) {
System.out.println("Got scrub_geo event userId:" + userId + " upToStatusId:" + upToStatusId);
}
@Override
public void onSta... | repos\tutorials-master\saas-modules\twitter4j\src\main\java\com\baeldung\Application.java | 1 |
请完成以下Java代码 | private static String getHint(LoadBalancerClientFactory clientFactory, String serviceId) {
LoadBalancerProperties loadBalancerProperties = clientFactory.getProperties(serviceId);
Map<String, String> hints = loadBalancerProperties.getHint();
String defaultHint = hints.getOrDefault("default", "default");
String h... | }
@Override
public boolean isSecure() {
// TODO: move to map
if ("https".equals(this.overrideScheme) || "wss".equals(this.overrideScheme)) {
return true;
}
return delegate.isSecure();
}
@Override
public URI getUri() {
return delegate.getUri();
}
@Override
public @Nullable Map<Strin... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\filter\LoadBalancerFilterFunctions.java | 1 |
请完成以下Java代码 | public java.lang.String getLot ()
{
return (java.lang.String)get_Value(COLUMNNAME_Lot);
}
@Override
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_M_Product_ID, org.compiere.model.I_M_Product.class);
}
@Override
public void setM_Product(org.... | @Override
public int getM_Product_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set M_Product_LotNumber_Quarantine.
@param M_Product_LotNumber_Quarantine_ID M_Product_LotNumber_Quarantine */
@Override
public void setM_Produc... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\product\model\X_M_Product_LotNumber_Quarantine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MainApplication {
private final BookstoreService bookstoreService;
public MainApplication(BookstoreService bookstoreService) {
this.bookstoreService = bookstoreService;
}
public static void main(String[] args) {
SpringApplication.run(MainApplication.class, args);
}
... | Page<Author> authorseg = bookstoreService.fetchWithBooksByGenreEG();
authorseg.forEach(a -> System.out.println(a.getName() + ": " + a.getBooks()));
System.out.println("Number of elements: " + authorseg.getNumberOfElements());
System.out.println("Total elements: " + authorseg.getTotal... | repos\Hibernate-SpringBoot-master\HibernateSpringBootJoinFetchPageable\src\main\java\com\bookstore\MainApplication.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void init(Workbook workbook) {
this.headerStyle = initHeaderStyle(workbook);
this.titleStyle = initTitleStyle(workbook);
}
@Override
public CellStyle getHeaderStyle(short color) {
return headerStyle;
}
@Override
public CellStyle getTitleStyle(short color) {
... | */
private CellStyle initTitleStyle(Workbook workbook) {
CellStyle style = getBaseCellStyle(workbook);
style.setFont(getFont(workbook, FONT_SIZE_ELEVEN, false));
// ForegroundColor
style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
style.setFillPattern(Fi... | repos\springboot-demo-master\eaypoi\src\main\java\com\et\easypoi\service\ExcelExportStyler.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class WorkspaceMigrateConfig
{
public static final String PROP_DB_URL_DEFAULT = "jdbc:postgresql://localhost/metasfresh";
public static final String PROP_DB_USERNAME_DEFAULT = "metasfresh";
public static final String PROP_DB_PASSWORD_DEFAULT = "metasfresh";
public static final String PROP_LABELS_DEFAULT = "m... | boolean dryRunMode;
boolean skipExecutingAfterScripts;
@NonNull
@Builder.Default
ImmutableSet<Label> labels = Label.ofCommaSeparatedString(PROP_LABELS_DEFAULT);
public enum OnScriptFailure
{
ASK, FAIL;
}
@NonNull
@Builder.Default
OnScriptFailure onScriptFailure = OnScriptFailure.ASK;
} | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.cli\src\main\java\de\metas\migration\cli\workspace_migrate\WorkspaceMigrateConfig.java | 2 |
请完成以下Java代码 | private void addTransitionFeatures(TagSet tagSet)
{
for (int i = 0; i < tagSet.size(); i++)
{
idOf("BL=" + tagSet.stringOf(i));
}
idOf("BL=_BL_");
}
public MutableFeatureMap(TagSet tagSet, Map<String, Integer> featureIdMap)
{
super(tagSet);
th... | {
return featureIdMap.size();
}
public Set<String> featureSet()
{
return featureIdMap.keySet();
}
@Override
public int[] allLabels()
{
return tagSet.allTags();
}
@Override
public int bosTag()
{
return tagSet.size();
}
} | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\perceptron\feature\MutableFeatureMap.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.