instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | private final void clearQueuedEvents()
{
queuedEvents.clear();
}
private final List<Event> getQueuedEventsAndClear()
{
if (queuedEvents.isEmpty())
{
return Collections.emptyList();
}
final List<Event> copy = new ArrayList<>(queuedEvents);
queuedEvents.clear();
return copy;
}
/**
* Post all q... | for (final Event event : queuedEventsList)
{
super.processEvent(event);
}
}
@Override
public String toString()
{
final Topic topic = getTopic();
return MoreObjects.toStringHelper(this)
.omitNullValues()
.add("topicName", topic.getName())
.add("type", topic.getType())
.add("destroyed", i... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\QueueableForwardingEventBus.java | 1 |
请完成以下Java代码 | public boolean lock() {
return po.lock(); // lock
}
/**
* UnLock it
* @return true if unlocked (false only if unlock fails)
*/
public boolean unlock(String trxName) {
return po.unlock(trxName); // unlock
}
/**
* Set Trx
* @param trxName transaction | */
public void set_TrxName(String trxName) {
po.set_TrxName(trxName); // setTrx
}
/**
* Get Trx
* @return transaction
*/
public String get_TrxName() {
return po.get_TrxName(); // getTrx
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\wrapper\AbstractPOWrapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getTriggerFile() {
return this.triggerFile;
}
public void setTriggerFile(@Nullable String triggerFile) {
this.triggerFile = triggerFile;
}
public List<File> getAdditionalPaths() {
return this.additionalPaths;
}
public void setAdditionalPaths(List<File> additionalPaths) {
... | public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public int getPort() {
return this.port;
}
public void setPort(int port) {
this.port = port;
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\autoconfigure\DevToolsProperties.java | 2 |
请完成以下Java代码 | public Optional<I_C_UOM> getByX12DE355IfExists(@NonNull final X12DE355 x12de355)
{
return getUomIdByX12DE355IfExists(x12de355)
.map(this::getById);
}
@Override
public I_C_UOM getEachUOM()
{
return getByX12DE355(X12DE355.EACH);
}
@Override
public TemporalUnit getTemporalUnitByUomId(@NonNull final UomId... | public boolean isUOMForTUs(@NonNull final UomId uomId)
{
final I_C_UOM uom = getById(uomId);
return isUOMForTUs(uom);
}
public static boolean isUOMForTUs(@NonNull final I_C_UOM uom)
{
final X12DE355 x12de355 = X12DE355.ofCode(uom.getX12DE355());
return X12DE355.COLI.equals(x12de355) || X12DE355.TU.equals(x... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\uom\impl\UOMDAO.java | 1 |
请完成以下Java代码 | private ImmutableList<DocumentFilterDescriptor> getFilters()
{
if (filters == null || filters.isEmpty())
{
return ImmutableList.of();
}
else
{
return filters.stream()
.sorted(Comparator.comparing(DocumentFilterDescriptor::getSortNo))
.collect(ImmutableList.toImmutableList());
}
... | }
allowedViewCloseActions.add(viewCloseAction);
return this;
}
private ImmutableSet<ViewCloseAction> getAllowedViewCloseActions()
{
return allowedViewCloseActions != null
? ImmutableSet.copyOf(allowedViewCloseActions)
: DEFAULT_allowedViewCloseActions;
}
public Builder setHasTreeSupport... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\descriptor\ViewLayout.java | 1 |
请完成以下Java代码 | public void setC_DocType_ID (final int C_DocType_ID)
{
if (C_DocType_ID < 0)
set_Value (COLUMNNAME_C_DocType_ID, null);
else
set_Value (COLUMNNAME_C_DocType_ID, C_DocType_ID);
}
@Override
public int getC_DocType_ID()
{
return get_ValueAsInt(COLUMNNAME_C_DocType_ID);
}
@Override
public void setD... | return get_ValueAsInt(COLUMNNAME_DocumentCopies_Override);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_PrintFormat.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PaymentReservationId implements RepoIdAware
{
@JsonCreator
public static PaymentReservationId ofRepoId(final int repoId)
{
return new PaymentReservationId(repoId);
}
public static PaymentReservationId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new PaymentReservationId(repoId) : null;... | int repoId;
private PaymentReservationId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "C_Payment_Reservation_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\reservation\PaymentReservationId.java | 2 |
请完成以下Java代码 | public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
beanFactory.registerScope(ProcessScope.PROCESS_SCOPE_NAME, this);
Assert.isInstanceOf(BeanDefinitionRegistry.class, beanFactory, "BeanFactory was not a BeanDefinitionRegistry, so ProcessScope cannot be used.");... | Object result = methodInvocation.proceed();
persistVariable(name, scopedObject);
return result;
}
});
return proxyFactoryBean.getProxy(this.classLoader);
}
private void persistVariable(String variableName, Object scopedObject) {
ProcessInstance processInstance = Context.getExecutionContext().getProc... | repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\components\scope\ProcessScope.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int updateNewStatus(List<Long> ids, Integer newStatus) {
PmsProduct record = new PmsProduct();
record.setNewStatus(newStatus);
PmsProductExample example = new PmsProductExample();
example.createCriteria().andIdIn(ids);
return productMapper.updateByExampleSelective(record, ... | /**
* 建立和插入关系表操作
*
* @param dao 可以操作的dao
* @param dataList 要插入的数据
* @param productId 建立关系的id
*/
private void relateAndInsertList(Object dao, List dataList, Long productId) {
try {
if (CollectionUtils.isEmpty(dataList)) return;
for (Object item : d... | repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\PmsProductServiceImpl.java | 2 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getIsbn() {
return isbn;
}
public void ... | public double getPrice() {
return price;
}
public void setPrice(double price) {
this.price = price;
}
@Transient
public double getDiscounted() {
return discounted;
}
@Override
public String toString() {
return "Book{" + "id=" + id + ", title=" + title +... | repos\Hibernate-SpringBoot-master\HibernateSpringBootCalculatePropertyFormula\src\main\java\com\bookstore\entity\Book.java | 1 |
请完成以下Java代码 | public List<HistoricJobLog> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
return commandContext
.getHistoricJobLogManager()
.findHistoricJobLogsByQueryCriteria(this, page);
}
// getter //////////////////////////////////
public boolean isTenantIdSet() {
retur... | return processDefinitionId;
}
public String getProcessDefinitionKey() {
return processDefinitionKey;
}
public String getDeploymentId() {
return deploymentId;
}
public JobState getState() {
return state;
}
public String[] getTenantIds() {
return tenantIds;
}
public String getHost... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricJobLogQueryImpl.java | 1 |
请完成以下Spring Boot application配置 | spring:
profiles:
active: prod
datasource:
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/dbgirl?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8
usern | ame: root
password: 123
jpa:
hibernate:
ddl-auto: create
show-sql: true | repos\SpringBootLearning-master\firstspringboot-2h\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public static String processStatements (String sqlStatements, boolean allowDML)
{
if (sqlStatements == null || sqlStatements.length() == 0)
return "";
StringBuffer result = new StringBuffer();
//
StringTokenizer st = new StringTokenizer(sqlStatements, ";", false);
while (st.hasMoreTokens())
{
result.... | boolean OK = stmt.execute(sql);
int count = stmt.getUpdateCount();
if (count == -1)
{
result.append("---> ResultSet");
}
else
result.append("---> Result=").append(count);
}
catch (SQLException e)
{
log.error("process statement: " + sql + " - " + e.toString());
result.append("===> ").a... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\form\VSQLProcess.java | 1 |
请完成以下Java代码 | public final C_AllocationLine_Builder invoiceId(@Nullable final InvoiceId invoiceId)
{
return invoiceId(InvoiceId.toRepoId(invoiceId));
}
public final C_AllocationLine_Builder invoiceId(final int invoiceId)
{
allocLine.setC_Invoice_ID(invoiceId);
return this;
}
public final C_AllocationLine_Builder paymen... | // NOTE: don't check the OverUnderAmt because that amount is not affecting allocation,
// so an allocation is Zero with our without the over/under amount.
return allocLine.getAmount().signum() == 0
&& allocLine.getDiscountAmt().signum() == 0
&& allocLine.getWriteOffAmt().signum() == 0
//
&& allocLin... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\allocation\api\C_AllocationLine_Builder.java | 1 |
请完成以下Java代码 | protected void exceptionRejectedTakeBuffer(RingBuffer ringBuffer) {
LOGGER.warn("Rejected take buffer. {}", ringBuffer);
throw new RuntimeException("Rejected take buffer. " + ringBuffer);
}
/**
* Initialize flags as CAN_PUT_FLAG
*/
private PaddedAtomicLong[] initFlags(int buff... | /**
* Setters
*/
public void setBufferPaddingExecutor(BufferPaddingExecutor bufferPaddingExecutor) {
this.bufferPaddingExecutor = bufferPaddingExecutor;
}
public void setRejectedPutHandler(RejectedPutBufferHandler rejectedPutHandler) {
this.rejectedPutHandler = rejectedPutHandler;... | repos\Spring-Boot-In-Action-master\id-spring-boot-starter\src\main\java\com\baidu\fsg\uid\buffer\RingBuffer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CmmnDeploymentBuilder disableSchemaValidation() {
this.isCmmn20XsdValidationEnabled = false;
return this;
}
@Override
public CmmnDeploymentBuilder tenantId(String tenantId) {
deployment.setTenantId(tenantId);
return this;
}
@Override
public CmmnDeployment... | }
@Override
public CmmnDeployment deploy() {
return repositoryService.deploy(this);
}
public CmmnDeploymentEntity getDeployment() {
return deployment;
}
public boolean isCmmnXsdValidationEnabled() {
return isCmmn20XsdValidationEnabled;
}
public boolean isD... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\repository\CmmnDeploymentBuilderImpl.java | 2 |
请完成以下Java代码 | public ResponseEntity updateProfile(@AuthenticationPrincipal User currentUser,
@RequestHeader("Authorization") String token,
@Valid @RequestBody UpdateUserParam updateUserParam,
BindingResult bindingR... | }
}
private Map<String, Object> userResponse(UserWithToken userWithToken) {
return new HashMap<String, Object>() {{
put("user", userWithToken);
}};
}
}
@Getter
@JsonRootName("user")
@NoArgsConstructor
class UpdateUserParam {
@Email(message = "should be an email")
privat... | repos\spring-boot-realworld-example-app-master (1)\src\main\java\io\spring\api\CurrentUserApi.java | 1 |
请完成以下Java代码 | public static <T extends AuthenticatorResponse> PublicKeyCredentialBuilder<T> builder() {
return new PublicKeyCredentialBuilder<>();
}
/**
* The {@link PublicKeyCredentialBuilder}
*
* @param <R> the response type
* @author Rob Winch
* @since 6.4
*/
public static final class PublicKeyCredentialBuilder<... | */
public PublicKeyCredentialBuilder rawId(Bytes rawId) {
this.rawId = rawId;
return this;
}
/**
* Sets the {@link #getResponse()} property.
* @param response the response
* @return the PublicKeyCredentialBuilder
*/
public PublicKeyCredentialBuilder response(R response) {
this.response = r... | repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\PublicKeyCredential.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class QrtzScheduler {
Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private ApplicationContext applicationContext;
@PostConstruct
public void init() {
logger.info("Hello world from Quartz...");
}
@Bean
public SpringBeanJobFactory springBeanJobFactory(... | }
public Properties quartzProperties() throws IOException {
PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
propertiesFactoryBean.setLocation(new ClassPathResource("/quartz.properties"));
propertiesFactoryBean.afterPropertiesSet();
return propertiesFactory... | repos\tutorials-master\spring-quartz\src\main\java\org\baeldung\springquartz\basics\scheduler\QrtzScheduler.java | 2 |
请完成以下Java代码 | public UserId getUpdatedBy() {return UserId.ofRepoIdOrSystem(po.getUpdatedBy());}
@Override
@Nullable
public DocStatus getDocStatus()
{
final int index = po.get_ColumnIndex("DocStatus");
return index >= 0
? DocStatus.ofNullableCodeOrUnknown((String)po.get_Value(index))
: null;
}
@Override
public bo... | return idOrNullMapper.apply(valueInt);
}
@Override
@Nullable
public LocalDateAndOrgId getValueAsLocalDateOrNull(@NonNull final String columnName, @NonNull final Function<OrgId, ZoneId> timeZoneMapper)
{
final int index = po.get_ColumnIndex(columnName);
if (index != -1)
{
final Timestamp ts = po.get_Value... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\doc\POAcctDocModel.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void execute0()
{
job = job.withChangedRawMaterialsIssueStep(
request.getActivityId(),
request.getIssueScheduleId(),
(step) -> {
if (processed)
{
// shall not happen
logger.warn("Ignoring request because was already processed: request={}, step={}", request, step);
retu... | private RawMaterialsIssueStep issueToStep(final RawMaterialsIssueStep step)
{
step.assertNotIssued();
final PPOrderIssueSchedule issueSchedule = ppOrderIssueScheduleService.issue(request);
this.processed = true;
return step.withIssued(issueSchedule.getIssued());
}
private void save()
{
newSaver().saveAc... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\commands\issue\IssueRawMaterialsCommand.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void close() throws IOException {
}
@Override
public SSLEngine createClientSslEngine(String peerHost, int peerPort, String endpointIdentification) {
SslBundle sslBundle = this.sslBundle;
Assert.state(sslBundle != null, "'sslBundle' must not be null");
SSLEngine sslEngine = sslBundle.createSslContext()... | return Set.of(SSL_BUNDLE_CONFIG_NAME);
}
@Override
public @Nullable KeyStore keystore() {
SslBundle sslBundle = this.sslBundle;
Assert.state(sslBundle != null, "'sslBundle' must not be null");
return sslBundle.getStores().getKeyStore();
}
@Override
public @Nullable KeyStore truststore() {
SslBundle sslB... | repos\spring-boot-4.0.1\module\spring-boot-kafka\src\main\java\org\springframework\boot\kafka\autoconfigure\SslBundleSslEngineFactory.java | 2 |
请在Spring Boot框架中完成以下Java代码 | protected @NonNull Object configureAsLocalClientRegion(@NonNull Environment environment,
@NonNull Object clientRegion) {
return clientRegion instanceof ClientRegionFactoryBean
? configureAsLocalClientRegion(environment, (ClientRegionFactoryBean<?, ?>) clientRegion)
: configureAsLocalClientRegion(environment... | @Conditional(NotKubernetesEnvironmentCondition.class)
static class IsNotKubernetesEnvironmentCondition { }
}
public static final class ClusterNotAvailableCondition extends ClusterAwareConfiguration.ClusterAwareCondition {
@Override
public synchronized boolean matches(@NonNull ConditionContext conditionContex... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\config\annotation\ClusterNotAvailableConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public final class HibernateMetricsAutoConfiguration implements SmartInitializingSingleton {
private static final String ENTITY_MANAGER_FACTORY_SUFFIX = "entityManagerFactory";
private final Map<String, EntityManagerFactory> entityManagerFactories;
private final MeterRegistry meterRegistry;
HibernateMetricsAuto... | String entityManagerFactoryName = getEntityManagerFactoryName(beanName);
try {
new HibernateMetrics(entityManagerFactory.unwrap(SessionFactory.class), entityManagerFactoryName,
Collections.emptyList())
.bindTo(registry);
}
catch (PersistenceException ex) {
// Continue
}
}
/**
* Get the name ... | repos\spring-boot-4.0.1\module\spring-boot-hibernate\src\main\java\org\springframework\boot\hibernate\autoconfigure\metrics\HibernateMetricsAutoConfiguration.java | 2 |
请完成以下Java代码 | public String getAmount ()
{
return (String)get_Value(COLUMNNAME_Amount);
}
/** Set Bank statement line.
@param C_BankStatementLine_ID
Line on a statement from this Bank
*/
public void setC_BankStatementLine_ID (int C_BankStatementLine_ID)
{
if (C_BankStatementLine_ID < 1)
set_Value (COLUMNNAME_C... | @return Copy of the *.dta stored as plain text
*/
public String getDtafile ()
{
return (String)get_Value(COLUMNNAME_Dtafile);
}
/** Set IsRemittance.
@param IsRemittance IsRemittance */
public void setIsRemittance (boolean IsRemittance)
{
set_Value (COLUMNNAME_IsRemittance, Boolean.valueOf(IsRemittan... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-gen\org\compiere\model\X_C_DirectDebit.java | 1 |
请完成以下Java代码 | public IMigrationExecutorProvider getMigrationExecutorProvider()
{
return factory;
}
@Override
public void setMigrationOperation(MigrationOperation operation)
{
Check.assumeNotNull(operation, "operation not null");
this.migrationOperation = operation;
}
@Override
public boolean isApplyDML()
{
return ... | public boolean isSkipMissingTables()
{
// TODO configuration to be implemented
return true;
}
@Override
public void addPostponedExecutable(IPostponedExecutable executable)
{
Check.assumeNotNull(executable, "executable not null");
postponedExecutables.add(executable);
}
@Override
public List<IPostponed... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\MigrationExecutorContext.java | 1 |
请完成以下Java代码 | public void localVariableMultithreading() {
boolean run = true;
executor.execute(() -> {
while (run) {
// do operation
}
});
// commented because it doesn't compile, it's just an example of non-final local variables in lambdas
// run = fals... | holder[0] = 0;
System.out.println(sums.sum());
}
/**
* WARNING: always avoid this workaround!!
*/
public void workaroundMultithreading() {
int[] holder = new int[] { 2 };
Runnable runnable = () -> System.out.println(IntStream
.of(1, 2, 3)
.map(val -> v... | repos\tutorials-master\core-java-modules\core-java-lambdas-2\src\main\java\com\baeldung\lambdas\LambdaVariables.java | 1 |
请完成以下Java代码 | public boolean isExecution() {
return BooleanUtils.isTrue(execution);
}
public void setExecution(Boolean execution) {
this.execution = execution;
}
public Boolean isTask() {
return BooleanUtils.isTrue(task);
}
public void setTask(Boolean task) {
this.task = task;
}
public Boolean isH... | }
public void setSkippable(Boolean skippable) {
this.skippable = skippable;
}
@Override
public String toString() {
return joinOn(this.getClass())
.add("execution=" + execution)
.add("task=" + task)
.add("history=" + history)
.add("skippable=" + skippable)
.toString();
}... | repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\EventingProperty.java | 1 |
请完成以下Java代码 | private ILUTUProducerAllocationDestination createLUTUProducerDestination()
{
final ILUTUProducerAllocationDestination destination;
{
final IHUSplitDefinition splitDefinition = createSplitDefinition(luPIItem, tuPIItem, cuProductId, cuUOM, cuPerTU, tuPerLU, maxLUToAllocate);
//
// Create and configure dest... | final I_C_UOM cuUOM,
final BigDecimal cuPerTU,
final BigDecimal tuPerLU,
final BigDecimal maxLUToAllocate)
{
return new HUSplitDefinition(luPIItem, tuPIItem, cuProductId, cuUOM, cuPerTU, tuPerLU, maxLUToAllocate);
}
/**
* Create an allocation request for the cuQty of the builder
*
* @param huContex... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\impl\HUSplitBuilder.java | 1 |
请完成以下Java代码 | public ProcessPreconditionsResolution toInternal()
{
// makes no sense to change the internal flag if accepted
if (accepted)
{
return this;
}
if (internal)
{
return this;
}
return toBuilder().internal(true).build();
}
public String computeCaption(@NonNull final ITranslatableString originalPr... | }
public ProcessPreconditionsResolution withCaptionMapper(@Nullable final ProcessCaptionMapper captionMapper)
{
return toBuilder().captionMapper(captionMapper).build();
}
/**
* Override default SortNo used with ordering related processes
*/
public ProcessPreconditionsResolution withSortNo(final int sortNo)... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessPreconditionsResolution.java | 1 |
请完成以下Java代码 | public org.eevolution.model.I_PP_Order getPP_Order()
{
return get_ValueAsPO(COLUMNNAME_PP_Order_ID, org.eevolution.model.I_PP_Order.class);
}
@Override
public void setPP_Order(final org.eevolution.model.I_PP_Order PP_Order)
{
set_ValueFromPO(COLUMNNAME_PP_Order_ID, org.eevolution.model.I_PP_Order.class, PP_Or... | set_ValueNoCheck (COLUMNNAME_PP_OrderCandidate_PP_Order_ID, PP_OrderCandidate_PP_Order_ID);
}
@Override
public int getPP_OrderCandidate_PP_Order_ID()
{
return get_ValueAsInt(COLUMNNAME_PP_OrderCandidate_PP_Order_ID);
}
@Override
public void setQtyEntered (final @Nullable BigDecimal QtyEntered)
{
set_Valu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_OrderCandidate_PP_Order.java | 1 |
请完成以下Java代码 | public void mousePressed(MouseEvent e) {
grabFocus();
getModel().nextState();
}
});
// Reset the keyboard action map
ActionMap map = new ActionMapUIResource();
map.put("pressed", new AbstractAction() {
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public void action... | @Deprecated
public void setModel(ButtonModel model) {
// if (!(model instanceof TristateButtonModel))
// useless: Java always calls the most specific method
super.setModel(model);
}
/** No one may add mouse listeners, not even Swing! */
@Override
public void addMouseListener(MouseListener l) {
... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\it\cnr\imaa\essi\lablib\gui\checkboxtree\QuadristateCheckbox.java | 1 |
请完成以下Java代码 | private SimpleCookie sessionIdCookie() {
SimpleCookie cookie = new SimpleCookie();
cookie.setName("JSESSIONID");
cookie.setHttpOnly(true);
cookie.setMaxAge(10800000);
return cookie;
}
@Bean
public ShiroFilterFactoryBean shiroFilterFactoryBean(SecurityManager securityManager) {
ShiroFilterFactoryBean shi... | filterChainDefinitionMap.put("/v2/**", "anon");
filterChainDefinitionMap.put("/webjars/**", "anon");
filterChainDefinitionMap.put("/swagger-resources/configuration/ui/**", "anon");
filterChainDefinitionMap.put("/swagger-resources/configuration/security/**", "anon");
filterChainDefinitionMap.put("/**", "authc");... | repos\spring-boot-quick-master\quick-framework\base-adapter\src\main\java\com\base\adapter\ShiroConfig.java | 1 |
请完成以下Java代码 | public void setIsSaveInHistoric (boolean IsSaveInHistoric)
{
set_Value (COLUMNNAME_IsSaveInHistoric, Boolean.valueOf(IsSaveInHistoric));
}
/** Get Save In Historic.
@return Save In Historic */
public boolean isSaveInHistoric ()
{
Object oo = get_Value(COLUMNNAME_IsSaveInHistoric);
if (oo != null)
{
... | return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Search Key.
@param Value
Search key for the record in the format required - must be unique
*/
public void setValue (String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
/** Get Search Key.
@return Search ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_HouseKeeping.java | 1 |
请完成以下Java代码 | public int getSource_Column_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Source_Column_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Source Table.
@param Source_Table_ID Source Table */
@Override
public void setSource_Table_ID (int Source_Table_ID)
{
if (Source_Table_ID < ... | Integer ii = (Integer)get_Value(COLUMNNAME_Source_Table_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set SQL to get Target Record IDs by Source Record IDs.
@param SQL_GetTargetRecordIdBySourceRecordId SQL to get Target Record IDs by Source Record IDs */
@Override
public void setSQL_GetTar... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_SQLColumn_SourceTableColumn.java | 1 |
请完成以下Java代码 | public class RuecknahmeangebotAnfordern {
@XmlElement(namespace = "", required = true)
protected String clientSoftwareKennung;
@XmlElement(namespace = "", required = true)
protected Ruecknahmeangebot ruecknahmeangebot;
/**
* Gets the value of the clientSoftwareKennung property.
*
*... | * possible object is
* {@link Ruecknahmeangebot }
*
*/
public Ruecknahmeangebot getRuecknahmeangebot() {
return ruecknahmeangebot;
}
/**
* Sets the value of the ruecknahmeangebot property.
*
* @param value
* allowed object is
* {@link Ru... | 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\RuecknahmeangebotAnfordern.java | 1 |
请完成以下Java代码 | protected void prepare ()
{
// prepare
}
/**
* Process
* @return info
* @throws Exception
*/
protected String doIt ()
throws Exception
{
int year_ID = getRecord_ID();
MHRYear year = new MHRYear (getCtx(), getRecord_ID(), get_TrxName());
if (year.get_ID() <= 0 || year.get_ID() != year_ID)
... | return "No Created, The Period's exist";
log.info(year.toString());
//
if (year.createPeriods())
{
//arhipac: Cristina Ghita -- because of the limitation of UI, you can not enter more records on a tab which has
//TabLevel>0 and there are just processed records, so we have not to set year processed
//t... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.libero.liberoHR\src\main\java\org\eevolution\process\HRCreatePeriods.java | 1 |
请完成以下Java代码 | private static LocalDate toLocalDate(@NonNull final String yyMMdd)
{
if (yyMMdd.length() != 6)
{
throw new AdempiereException("Invalid expire date format: " + yyMMdd);
}
final String dd = yyMMdd.substring(4, 6);
if (dd.endsWith("00")) // last day of month indicator
{
final String yyMM = yyMMdd.subst... | {
return FORMAT_yyMMdd.format(localDate);
}
}
@JsonValue
public String toJson()
{
return toYYMMDDString();
}
public String toYYMMDDString()
{
return yyMMdd;
}
public LocalDate toLocalDate()
{
return localDate;
}
public Timestamp toTimestamp()
{
return TimeUtil.asTimestamp(toLocalDate());
... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\client\schema\JsonExpirationDate.java | 1 |
请完成以下Java代码 | public void setAssortmentType (final String AssortmentType)
{
set_Value (COLUMNNAME_AssortmentType, AssortmentType);
}
@Override
public String getAssortmentType()
{
return get_ValueAsString(COLUMNNAME_AssortmentType);
}
@Override
public void setM_Product_AlbertaArticle_ID (final int M_Product_AlbertaArtic... | public static final String PURCHASERATING_E = "E";
/** F = F */
public static final String PURCHASERATING_F = "F";
/** G = G */
public static final String PURCHASERATING_G = "G";
@Override
public void setPurchaseRating (final @Nullable String PurchaseRating)
{
set_Value (COLUMNNAME_PurchaseRating, PurchaseRati... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_M_Product_AlbertaArticle.java | 1 |
请完成以下Java代码 | public static final <IT, RT> ITrxItemChunkProcessor<IT, RT> wrapIfNeeded(@NonNull final ITrxItemProcessor<IT, RT> processor)
{
if (processor instanceof ITrxItemChunkProcessor)
{
final ITrxItemChunkProcessor<IT, RT> chunkProcessor = (ITrxItemChunkProcessor<IT, RT>)processor;
return chunkProcessor;
}
else
... | {
return processor.getResult();
}
/**
* @return always return <code>false</code>. Each item is a separated chunk
*/
@Override
public boolean isSameChunk(final IT item)
{
return false;
}
@Override
public void newChunk(final IT item)
{
// nothing
}
@Override
public void completeChunk()
{
// no... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\processor\api\impl\TrxItemProcessor2TrxItemChunkProcessorWrapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public UserValuePreferences build()
{
if (isEmpty())
{
return UserValuePreferences.EMPTY;
}
return new UserValuePreferences(this);
}
public boolean isEmpty()
{
return name2value.isEmpty();
}
public UserValuePreferencesBuilder add(final I_AD_Preference adPreference)
{
final Optional... | }
public UserValuePreferencesBuilder addAll(final UserValuePreferencesBuilder fromBuilder)
{
if (fromBuilder == null || fromBuilder.isEmpty())
{
return this;
}
if (!isEmpty() && !adWindowIdOptional.equals(fromBuilder.adWindowIdOptional))
{
throw new IllegalArgumentException("Builder " + fro... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\service\impl\ValuePreferenceBL.java | 2 |
请完成以下Spring Boot application配置 | logging.level.org.springframework.data=INFO
logging.level.org.springframework.jdbc.core.JdbcTemplate=DEBUG
logging.level.example.springdata. | jdbc.mybatis=TRACE
mybatis.config-location=mybatis-config.xml | repos\spring-data-examples-main\jdbc\mybatis\src\main\resources\application.properties | 2 |
请完成以下Java代码 | private List<AttributeSetInstanceId> createAllASIs(@NonNull final List<ImmutableAttributeSet> attributeSets)
{
final ImmutableList.Builder<AttributeSetInstanceId> result = ImmutableList.builder();
for (final ImmutableAttributeSet attributeSet : attributeSets)
{
final I_M_AttributeSetInstance asiRecord = attri... | return ImmutableList.of(BPartnerDepartment.none(bPartnerId));
}
return departments;
}
@Value
static class FlatrateDataEntryDetailKey
{
@NonNull
BPartnerDepartmentId bPartnerDepartmentId;
@NonNull
AttributesKey attributesKey;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\flatrate\dataEntry\FlatrateDataEntryService.java | 1 |
请完成以下Java代码 | public String resolveKey(ServerWebExchange exchange, List<String> varyOnHeaders) {
return cacheKeyGenerator.generateKey(exchange.getRequest(), varyOnHeaders);
}
Mono<Void> processFromCache(ServerWebExchange exchange, String metadataKey, CachedResponse cachedResponse) {
final ServerHttpResponse response = exchang... | HttpHeaders headers = response.getHeaders();
List<String> varyValues = headers.getOrEmpty(HttpHeaders.VARY);
return varyValues.stream().anyMatch(VARY_WILDCARD::equals);
}
private boolean isCacheControlAllowed(HttpMessage request) {
HttpHeaders headers = request.getHeaders();
List<String> cacheControlHeader ... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\cache\ResponseCacheManager.java | 1 |
请完成以下Java代码 | public boolean isSOTrx ()
{
Object oo = get_Value(COLUMNNAME_IsSOTrx);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
@Override
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException
{
ret... | /** Set Einzelpreis.
@param PriceActual
Effektiver Preis
*/
@Override
public void setPriceActual (java.math.BigDecimal PriceActual)
{
set_ValueNoCheck (COLUMNNAME_PriceActual, PriceActual);
}
/** Get Einzelpreis.
@return Effektiver Preis
*/
@Override
public java.math.BigDecimal getPriceActual () ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_Product_Stats_Invoice_Online_V.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ProcessApplicationDeploymentBuilderImpl name(String name) {
return (ProcessApplicationDeploymentBuilderImpl) super.name(name);
}
@Override
public ProcessApplicationDeploymentBuilderImpl tenantId(String tenantId) {
return (ProcessApplicationDeploymentBuilderImpl) super.tenantId(tenantId);
}
@O... | return (ProcessApplicationDeploymentBuilderImpl) super.addDeploymentResourcesById(deploymentId, resourceIds);
}
@Override
public ProcessApplicationDeploymentBuilderImpl addDeploymentResourceByName(String deploymentId, String resourceName) {
return (ProcessApplicationDeploymentBuilderImpl) super.addDeployment... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\repository\ProcessApplicationDeploymentBuilderImpl.java | 2 |
请完成以下Java代码 | private void createAndLinkElementsForTabs()
{
final IADWindowDAO adWindowDAO = Services.get(IADWindowDAO.class);
final IADElementDAO adElementsRepo = Services.get(IADElementDAO.class);
for (final AdTabId tabId : adWindowDAO.retrieveTabIdsWithMissingADElements())
{
final I_AD_Tab tab = adWindowDAO.getTabByI... | .help(window.getHelp())
.build());
updateElementTranslationsFromWindow(elementId, windowId);
DYNATTR_AD_Window_UpdateTranslations.setValue(window, false);
window.setAD_Element_ID(elementId.getRepoId());
save(window);
}
}
private void createAndLinkElementsForMenus()
{
final I... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\translation\api\impl\ElementTranslationBL.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PaginationService
{
private static final transient Logger logger = LogManager.getLogger(PaginationService.class);
private final PageDescriptorRepository pageDescriptorRepository;
public PaginationService(@NonNull final PageDescriptorRepository pageDescriptorRepository)
{
this.pageDescriptorReposito... | true /* joinByAnd */,
QuerySelectionHelper.SELECTION_LINE_ALIAS + " > " + currentPageDescriptor.getOffset())
.setLimit(currentPageSize)
.list(clazz);
final int actualPageSize = items.size();
logger.debug("Loaded next page: bufferSize={}, offset={} -> {} records",
currentPageSize, currentPageDesc... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dao\selection\pagination\PaginationService.java | 2 |
请完成以下Java代码 | private static JSONIncludedTabInfo createIncludedTabInfo(final DocumentChanges.IncludedDetailInfo includedDetailInfo)
{
final JSONIncludedTabInfo tabInfo = JSONIncludedTabInfo.newInstance(includedDetailInfo.getDetailId());
if (includedDetailInfo.isStale())
{
tabInfo.markAllRowsStaled();
}
final LogicExpr... | }
else
{
return null;
}
}
private void setValidStatus(final JSONDocumentValidStatus validStatus)
{
this.validStatus = validStatus;
}
private void setSaveStatus(final JSONDocumentSaveStatus saveStatus)
{
this.saveStatus = saveStatus;
}
public void addIncludedTabInfo(final JSONIncludedTabInfo tabI... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONDocument.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<String> retrieveNamesForPrefix(
@NonNull final String prefix,
@NonNull final ClientAndOrgId clientAndOrgId)
{
return getMap().getNamesForPrefix(prefix, clientAndOrgId);
}
private SysConfigMap getMap()
{
return cache.getOrLoad(0, this::retrieveMap);
}
private SysConfigMap retrieveMap()
{
... | pstmt = DB.prepareStatement(sql, ITrx.TRXNAME_None);
rs = pstmt.executeQuery();
while (rs.next())
{
final String name = rs.getString("Name");
final String value = rs.getString("Value");
final ClientAndOrgId clientAndOrgId = ClientAndOrgId.ofClientAndOrg(
ClientId.ofRepoId(rs.getInt("AD_Client... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\service\impl\SysConfigDAO.java | 2 |
请完成以下Java代码 | public boolean isI_IsImported ()
{
Object oo = get_Value(COLUMNNAME_I_IsImported);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
public I_M_InOutLineConfirm getM_InOutLineConfirm() throws RuntimeException
{
... | }
/** Set Process Now.
@param Processing Process Now */
public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing ()
{
Object oo = get_Value(COLUMNNAME_Processing);
if... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_InOutLineConfirm.java | 1 |
请完成以下Java代码 | public class PlainMRPDAO extends MRPDAO
{
private final Map<ArrayKey, BigDecimal> qtysOnHandsMap = new HashMap<>();
@Override
public final BigDecimal getQtyOnHand(final Properties ctx, final int M_Warehouse_ID, final int M_Product_ID, final String trxName)
{
final ArrayKey key = Util.mkKey(M_Warehouse_ID, M_Prod... | if (qtyOnHand == null)
{
return BigDecimal.ZERO;
}
return qtyOnHand;
}
public final void setQtyOnHand(final I_M_Warehouse warehouse, final I_M_Product product, final BigDecimal qtyOnHand)
{
final ArrayKey key = mkKey(warehouse, product);
qtysOnHandsMap.put(key, qtyOnHand);
}
private ArrayKey mkKey(f... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\mrp\api\impl\PlainMRPDAO.java | 1 |
请完成以下Java代码 | public boolean learn(String segmentedSentence)
{
return learn(segmentedSentence.split("\\s+"));
}
/**
* 在线学习
*
* @param words 分好词的句子
* @return 是否学习成功(失败的原因是参数错误)
*/
public boolean learn(String... words)
{
// for (int i = 0; i < words.length; i++) // 防止传入带词性的词... | return learn(new CWSInstance(words, model.featureMap));
}
@Override
protected Instance createInstance(Sentence sentence, FeatureMap featureMap)
{
return CWSInstance.create(sentence, featureMap);
}
@Override
public double[] evaluate(String corpora) throws IOException
{
/... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\perceptron\PerceptronSegmenter.java | 1 |
请完成以下Java代码 | public String getDeploymentId() {
return deploymentId;
}
public String getTenantId() {
return tenantId;
}
public String getHostname() {
return hostname;
}
public String getRootProcessInstanceId() {
return rootProcessInstanceId;
}
public String getBatchId() {
return batchId;
}
... | result.jobDefinitionType = historicJobLog.getJobDefinitionType();
result.jobDefinitionConfiguration = historicJobLog.getJobDefinitionConfiguration();
result.activityId = historicJobLog.getActivityId();
result.failedActivityId = historicJobLog.getFailedActivityId();
result.executionId = historicJobLog.g... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricJobLogDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<BusinessEntityType> getAdditionalBusinessPartner() {
if (additionalBusinessPartner == null) {
additionalBusinessPartner = new ArrayList<BusinessEntityType>();
}
return this.additionalBusinessPartner;
}
/**
* Other references if no dedicated field is availabl... | * </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ReferenceType }
*
*
*/
public List<ReferenceType> getAdditionalReference() {
if (additionalReference == null) {
additionalReference = new ArrayList<ReferenceType>();... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\SLSRPTListLineExtensionType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Tracing tracing(@Value("${spring.application.name}") String serviceName) {
return Tracing.newBuilder()
.localServiceName(serviceName)
// .currentTraceContext(ThreadLocalCurrentTraceContext.newBuilder()
// .addScopeDecorator(MDCScopeDecorator.create())... | // @see SpringMvcConfiguration 类上的,@Import(SpanCustomizingAsyncHandlerInterceptor.class)
// ==================== HttpClient 相关 ====================
@Bean
public RestTemplateCustomizer useTracedHttpClient(HttpTracing httpTracing) {
// 创建 CloseableHttpClient 对象,内置 HttpTracing 进行 HTTP 链路追踪。
f... | repos\SpringBoot-Labs-master\lab-40\lab-40-demo\src\main\java\cn\iocoder\springboot\lab40\zipkindemo\config\ZipkinConfiguration.java | 2 |
请完成以下Java代码 | public final class ModelTypeInstanceContext {
private final ModelInstanceImpl model;
private final DomElement domElement;
private final ModelElementTypeImpl modelType;
public ModelTypeInstanceContext(DomElement domElement, ModelInstanceImpl model, ModelElementTypeImpl modelType) {
this.domElement = domEle... | /**
* @return the model
*/
public ModelInstanceImpl getModel() {
return model;
}
/**
* @return the modelType
*/
public ModelElementTypeImpl getModelType() {
return modelType;
}
} | repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\instance\ModelTypeInstanceContext.java | 1 |
请完成以下Java代码 | public void setValues(SubProcess otherElement) {
super.setValues(otherElement);
/*
* This is required because data objects in Designer have no DI info and are added as properties, not flow elements
*
* Determine the differences between the 2 elements' data object
*/
... | }
}
flowElementList.clear();
for (FlowElement flowElement : otherElement.getFlowElements()) {
addFlowElement(flowElement);
}
artifactList.clear();
for (Artifact artifact : otherElement.getArtifacts()) {
addArtifact(artifact);
}
}
... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\SubProcess.java | 1 |
请完成以下Java代码 | protected <C> C readValue(String value, JavaType type) {
try {
return objectMapper.readValue(value, type);
}
catch (JsonParseException e) {
throw LOG.unableToReadValue(value, e);
}
catch (JsonMappingException e) {
throw LOG.unableToReadValue(value, e);
}
catch (IOException ... | }
public String getCanonicalTypeName(Object value) {
ensureNotNull("value", value);
for (TypeDetector typeDetector : typeDetectors) {
if (typeDetector.canHandle(value)) {
return typeDetector.detectType(value);
}
}
throw LOG.unableToDetectCanonicalType(value);
}
} | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\variable\impl\format\json\JacksonJsonDataFormat.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CurrentChargesResponse fetch(CurrentChargesRequest request) {
List<String> subscriptions = request.getSubscriptionIds();
if (subscriptions == null || subscriptions.isEmpty()) {
System.out.println("Fetching ALL charges for customer: " + request.getCustomerId());
subscripti... | private List<LineItem> mockLineItems(List<String> subscriptions) {
return subscriptions
.stream()
.map(subscription -> LineItem.builder()
.subscriptionId(subscription)
.quantity(current().nextInt(20))
.amount(new BigDecimal(current().nextDouble(1_000)))
... | repos\tutorials-master\libraries-cli\src\main\java\com\baeldung\jcommander\usagebilling\service\DefaultFetchCurrentChargesService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Sender sender() {
return OkHttpSender.create("http://127.0.0.1:9411/api/v2/spans");
}
/**
* Configuration for how to buffer spans into messages for Zipkin
*/
@Bean
public AsyncReporter<Span> spanReporter() {
return AsyncReporter.create(sender());
}
/**
* C... | * Creates server spans for http requests
*/
@Bean
public Filter tracingFilter(HttpTracing httpTracing) {
return TracingFilter.create(httpTracing);
}
// ==================== SpringMVC 相关 ====================
// @see SpringMvcConfiguration 类上的,@Import(SpanCustomizingAsyncHandlerIntercept... | repos\SpringBoot-Labs-master\lab-40\lab-40-demo\src\main\java\cn\iocoder\springboot\lab40\zipkindemo\config\ZipkinConfiguration.java | 2 |
请完成以下Java代码 | public Date getGlueUpdatetime() {
return glueUpdatetime;
}
public void setGlueUpdatetime(Date glueUpdatetime) {
this.glueUpdatetime = glueUpdatetime;
}
public String getChildJobId() {
return childJobId;
}
public void setChildJobId(String childJobId) {
this.childJobId = childJobId;
}
public int getTr... | public long getTriggerLastTime() {
return triggerLastTime;
}
public void setTriggerLastTime(long triggerLastTime) {
this.triggerLastTime = triggerLastTime;
}
public long getTriggerNextTime() {
return triggerNextTime;
}
public void setTriggerNextTime(long triggerNextTime) {
this.triggerNextTime = trigge... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\model\XxlJobInfo.java | 1 |
请完成以下Java代码 | public List<Import> getImports() {
return imports;
}
public void setImports(List<Import> imports) {
this.imports = imports;
}
public List<Interface> getInterfaces() {
return interfaces;
}
public void setInterfaces(List<Interface> interfaces) {
this.interfaces =... | public List<String> getUserTaskFormTypes() {
return userTaskFormTypes;
}
public void setUserTaskFormTypes(List<String> userTaskFormTypes) {
this.userTaskFormTypes = userTaskFormTypes;
}
public List<String> getStartEventFormTypes() {
return startEventFormTypes;
}
public... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\BpmnModel.java | 1 |
请完成以下Java代码 | public void setTwnNm(String value) {
this.twnNm = value;
}
/**
* Gets the value of the ctrySubDvsn property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCtrySubDvsn() {
return ctrySubDvsn;
}
/**
* Se... | * {@link String }
*
*/
public void setCtry(String value) {
this.ctry = value;
}
/**
* Gets the value of the adrLine property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to th... | 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\PostalAddress6.java | 1 |
请完成以下Java代码 | public class AuthenticationResult {
protected boolean isAuthenticated;
protected String authenticatedUser;
protected List<String> groups;
protected List<String> tenants;
public AuthenticationResult(String authenticatedUser, boolean isAuthenticated) {
this.authenticatedUser = authenticatedUser;
this... | }
public List<String> getTenants() {
return tenants;
}
public void setTenants(List<String> tenants) {
this.tenants = tenants;
}
public static AuthenticationResult successful(String userId) {
return new AuthenticationResult(userId, true);
}
public static AuthenticationResult unsuccessful() ... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\security\auth\AuthenticationResult.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public JwtSettings reloadJwtSettings() {
log.trace("Executing reloadJwtSettings");
var settings = getJwtSettings(true);
jwtTokenFactory.ifPresent(JwtTokenFactory::reload);
return settings;
}
@Override
public JwtSettings getJwtSettings() {
log.trace("Executing getJwtS... | return adminJwtSettings != null ? mapAdminToJwtSettings(adminJwtSettings) : null;
}
private JwtSettings mapAdminToJwtSettings(AdminSettings adminSettings) {
Objects.requireNonNull(adminSettings, "adminSettings for JWT is null");
return JacksonUtil.treeToValue(adminSettings.getJsonValue(), JwtSe... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\jwt\settings\DefaultJwtSettingsService.java | 2 |
请完成以下Java代码 | public static String get36UUID() {
return UUID.randomUUID().toString();
}
/**
* 验证一个字符串是否完全由纯数字组成的字符串,当字符串为空时也返回false.
*
* @author WuShuicheng .
* @param str
* 要判断的字符串 .
* @return true or false .
*/
public static boolean isNumeric(String str) {
... | */
public static List<String> getInParam(String param) {
boolean flag = param.contains(",");
List<String> list = new ArrayList<String>();
if (flag) {
list = Arrays.asList(param.split(","));
} else {
list.add(param);
}
return list;
}
/*... | repos\roncoo-pay-master\roncoo-pay-common-core\src\main\java\com\roncoo\pay\common\core\utils\StringUtil.java | 1 |
请完成以下Java代码 | public void setResourceId(String resourceId) {
this.resourceId = resourceId;
}
/**
* @return the name of the violated permission if there
* is only one {@link MissingAuthorizationDto}, {@code null} otherwise
*
* @deprecated Use {@link #getMissingAuthorizations()} to get the name of the violated per... | @Deprecated
public void setPermissionName(String permissionName) {
this.permissionName = permissionName;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
/**
* @return Disjunctive list of {@link MissingAuthorizationDto} from
* ... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\AuthorizationExceptionDto.java | 1 |
请完成以下Java代码 | public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID)
{
if (M_AttributeSetInstance_ID < 0)
set_ValueNoCheck (COLUMNNAME_M_AttributeSetInstance_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_AttributeSetInstance_ID, Integer.valueOf(M_AttributeSetInstance_ID));
}
/** Get Merkmale.
@re... | /** Get Datum.
@return Datum */
@Override
public java.sql.Timestamp getValueDate ()
{
return (java.sql.Timestamp)get_Value(COLUMNNAME_ValueDate);
}
/** Set Zahlwert.
@param ValueNumber
Numeric Value
*/
@Override
public void setValueNumber (java.math.BigDecimal ValueNumber)
{
set_Value (COLUMNN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_AttributeInstance.java | 1 |
请完成以下Java代码 | public class LogFileWebEndpoint {
private static final Log logger = LogFactory.getLog(LogFileWebEndpoint.class);
private final @Nullable LogFile logFile;
private final @Nullable File externalFile;
public LogFileWebEndpoint(@Nullable LogFile logFile, @Nullable File externalFile) {
this.logFile = logFile;
thi... | return logFileResource;
}
private @Nullable Resource getLogFileResource() {
if (this.externalFile != null) {
return new FileSystemResource(this.externalFile);
}
if (this.logFile == null) {
logger.debug("Missing 'logging.file.name' or 'logging.file.path' properties");
return null;
}
return new File... | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\logging\LogFileWebEndpoint.java | 1 |
请完成以下Java代码 | public void build()
{
markAsBuilt();
if (parameterName2valueMap.isEmpty())
{
return;
}
final I_C_Queue_WorkPackage workpackage = getC_Queue_WorkPackage();
for (final Map.Entry<String, Object> parameterName2value : parameterName2valueMap.entrySet())
{
final String parameterName = parameterName2val... | return this;
}
@Override
public IWorkPackageParamsBuilder setParameters(final Map<String, ?> parameters)
{
assertNotBuilt();
if (parameters == null || parameters.isEmpty())
{
return this;
}
for (final Map.Entry<String, ?> param : parameters.entrySet())
{
final String parameterName = param.getKe... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\api\impl\WorkPackageParamsBuilder.java | 1 |
请完成以下Java代码 | public class MigrationExecutionDto {
protected MigrationPlanDto migrationPlan;
protected List<String> processInstanceIds;
protected ProcessInstanceQueryDto processInstanceQuery;
protected boolean skipIoMappings;
protected boolean skipCustomListeners;
public MigrationPlanDto getMigrationPlan() {
return... | public boolean isSkipIoMappings() {
return skipIoMappings;
}
public void setSkipIoMappings(boolean skipIoMappings) {
this.skipIoMappings = skipIoMappings;
}
public boolean isSkipCustomListeners() {
return skipCustomListeners;
}
public void setSkipCustomListeners(boolean skipCustomListeners) {... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\migration\MigrationExecutionDto.java | 1 |
请完成以下Java代码 | public ParamsBuilder value(@NonNull final String parameterName, final boolean valueBoolean)
{
return valueObj(parameterName, valueBoolean);
}
public ParamsBuilder value(@NonNull final String parameterName, @Nullable final BigDecimal valueBD)
{
return valueObj(parameterName, valueBD);
}
public Params... | {
values.put(parameterName, value);
}
else
{
values.remove(parameterName);
}
return this;
}
public ParamsBuilder valueObj(@NonNull final Object value)
{
return valueObj(toParameterName(value.getClass()), value);
}
public ParamsBuilder putAll(@NonNull final IParams params)
{
f... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\api\Params.java | 1 |
请完成以下Java代码 | private ICNetAmtToInvoiceChecker getICNetAmtToInvoiceChecker(final IWorkPackageBuilder group)
{
final ICNetAmtToInvoiceChecker netAmtToInvoiceChecker = group2netAmtToInvoiceChecker.get(group);
Check.assumeNotNull(netAmtToInvoiceChecker, "netAmtToInvoiceChecker not null for {}", group);
return netAmtToInvoiceChec... | return this;
}
public InvoiceCandidate2WorkpackageAggregator setPriority(final IWorkpackagePrioStrategy priority)
{
workpackagePriority = priority;
return this;
}
public InvoiceCandidate2WorkpackageAggregator setInvoicingParams(@NonNull final IInvoicingParams invoicingParams)
{
this.invoicingParams = invo... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\api\impl\InvoiceCandidate2WorkpackageAggregator.java | 1 |
请完成以下Java代码 | public Criteria andRoleIdIn(List<Long> values) {
addCriterion("role_id in", values, "roleId");
return (Criteria) this;
}
public Criteria andRoleIdNotIn(List<Long> values) {
addCriterion("role_id not in", values, "roleId");
return (Criteria) this;
... | }
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHan... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsAdminRoleRelationExample.java | 1 |
请完成以下Java代码 | public void setUserType(String userType) {
this.userType = userType;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getEmail() {
return email;
}
public void setEma... | this.age = age;
}
public Date getRegTime() {
return regTime;
}
public void setRegTime(Date regTime) {
this.regTime = regTime;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
} | repos\spring-boot-leaning-master\2.x_42_courses\第 5-7 课: 综合实战客户管理系统(一)\user-manage\src\main\java\com\neo\model\User.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getUserName() {
return this.userName;
}
public void setUserName(@Nullable String userName) {
this.userName = userName;
}
public @Nullable String getPassword() {
return this.password;
}
public void setPassword(@Nullable String password) {
this.password = password;
}
public @Nu... | return this.apiKeyCredentials;
}
public void setApiKeyCredentials(@Nullable String apiKeyCredentials) {
this.apiKeyCredentials = apiKeyCredentials;
}
public boolean isEnableSource() {
return this.enableSource;
}
public void setEnableSource(boolean enableSource) {
this.enableSource = enableSource;
}
} | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\elastic\ElasticProperties.java | 2 |
请完成以下Java代码 | public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public Date getRegTime() {
return regTime;
} | public void setRegTime(Date regTime) {
this.regTime = regTime;
}
public String getState() {
return state;
}
public void setState(String state) {
this.state = state;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
... | repos\spring-boot-leaning-master\1.x\第16课:综合实战用户管理系统\user-manage\src\main\java\com\neo\entity\UserEntity.java | 1 |
请完成以下Java代码 | public MetricsCollectionTask getMetricsCollectionTask() {
return metricsCollectionTask;
}
public void setMetricsCollectionTask(MetricsCollectionTask metricsCollectionTask) {
this.metricsCollectionTask = metricsCollectionTask;
}
public void setReporterId(String reporterId) {
this.reporterId = repor... | protected String name;
protected long value;
public ReportDbMetricsValueCmd(String name, long value) {
this.name = name;
this.value = value;
}
@Override
public Void execute(CommandContext commandContext) {
commandContext.getMeterLogManager().insert(new MeterLogEntity(name, report... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\metrics\reporter\DbMetricsReporter.java | 1 |
请完成以下Java代码 | public class Fresh_QtyOnHand_Line
{
@Init
public void registerCallout()
{
Services.get(IProgramaticCalloutProvider.class).registerAnnotatedCallout(this);
}
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE })
public void onBeforeSave(final I_Fresh_QtyOnHand_Line line)
... | @ModelChange(timings = {
ModelValidator.TYPE_BEFORE_CHANGE,
ModelValidator.TYPE_BEFORE_NEW
}, ifColumnsChanged = {
I_Fresh_QtyOnHand_Line.COLUMNNAME_M_Warehouse_ID,
})
@CalloutMethod(columnNames = I_Fresh_QtyOnHand_Line.COLUMNNAME_M_Warehouse_ID)
public void fireWarehouseChanges(@NonNull final I_Fresh_QtyO... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\freshQtyOnHand\model\validator\Fresh_QtyOnHand_Line.java | 1 |
请完成以下Java代码 | public CaseInstanceMigrationBuilder withCaseInstanceVariables(Map<String, Object> variables) {
this.caseInstanceMigrationDocumentDocumentBuilder.addCaseInstanceVariables(variables);
return this;
}
@Override
public CaseInstanceMigrationDocument getCaseInstanceMigrationDocument() {
re... | @Override
public Batch batchMigrateCaseInstances(String caseDefinitionKey, int caseDefinitionVersion, String caseDefinitionTenantId) {
return getCmmnMigrationService().batchMigrateCaseInstancesOfCaseDefinition(caseDefinitionKey, caseDefinitionVersion, caseDefinitionTenantId, getCaseInstanceMigrationDocument... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\migration\CaseInstanceMigrationBuilderImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getInternalId() {
return internalId;
}
/**
* Sets the value of the internalId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setInternalId(String value) {
this.internalId = value;
}
/*... | public String getInternalSubId() {
return internalSubId;
}
/**
* Sets the value of the internalSubId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setInternalSubId(String value) {
this.internalSubId = value... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\messaging\header\SenderType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class FormServiceImpl extends CommonEngineServiceImpl<ProcessEngineConfigurationImpl> implements FormService {
@Override
public Object getRenderedStartForm(String processDefinitionId) {
return commandExecutor.execute(new GetRenderedStartFormCmd(processDefinitionId, null));
}
@Override
... | @Override
public ProcessInstance submitStartFormData(String processDefinitionId, String businessKey, Map<String, String> properties) {
return commandExecutor.execute(new SubmitStartFormCmd(processDefinitionId, businessKey, properties));
}
@Override
public void submitTaskFormData(String taskId, ... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\FormServiceImpl.java | 2 |
请完成以下Java代码 | public void setAuthorizedClientProvider(ReactiveOAuth2AuthorizedClientProvider authorizedClientProvider) {
Assert.notNull(authorizedClientProvider, "authorizedClientProvider cannot be null");
this.authorizedClientProvider = authorizedClientProvider;
}
/**
* Sets the {@code Function} used for mapping attribute(... | * </p>
* @param authorizationFailureHandler the handler that handles authorization failures.
* @since 5.3
* @see RemoveAuthorizedClientReactiveOAuth2AuthorizationFailureHandler
*/
public void setAuthorizationFailureHandler(ReactiveOAuth2AuthorizationFailureHandler authorizationFailureHandler) {
Assert.notNul... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\AuthorizedClientServiceReactiveOAuth2AuthorizedClientManager.java | 1 |
请完成以下Java代码 | private ListenableFuture<TbMsg> getDetails(TbContext ctx, TbMsg msg, ObjectNode messageData) {
ListenableFuture<? extends ContactBased<I>> contactBasedFuture = getContactBasedFuture(ctx, msg);
return Futures.transformAsync(contactBasedFuture, contactBased -> {
if (contactBased == null) {
... | case ADDITIONAL_INFO:
if (contactBased.getAdditionalInfo().hasNonNull("description")) {
value = contactBased.getAdditionalInfo().get("description").asText();
}
break;
}
if (value == null) {
contin... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\metadata\TbAbstractGetEntityDetailsNode.java | 1 |
请完成以下Java代码 | public DmnTransformFactory getTransformFactory() {
return transformFactory;
}
public List<DmnTransformListener> getTransformListeners() {
return transformListeners;
}
public void setTransformListeners(List<DmnTransformListener> transformListeners) {
this.transformListeners = transformListeners;
... | public void setDataTypeTransformerRegistry(DmnDataTypeTransformerRegistry dataTypeTransformerRegistry) {
this.dataTypeTransformerRegistry = dataTypeTransformerRegistry;
}
public DmnTransformer dataTypeTransformerRegistry(DmnDataTypeTransformerRegistry dataTypeTransformerRegistry) {
setDataTypeTransformerRe... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\transform\DefaultDmnTransformer.java | 1 |
请完成以下Java代码 | public java.math.BigDecimal getInvoicedQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_InvoicedQty);
if (bd == null)
return BigDecimal.ZERO;
return bd;
}
/** Set Zeilennetto.
@param LineNetAmt
Nettowert Zeile (Menge * Einzelpreis) ohne Fracht und Gebühren
*/
@Override
public void setL... | @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.compiere.model.I_M_Product M_Product)
{
set_ValueFromPO(COLUMNNAME_M_Product_ID, org.compiere.... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Customs_Invoice_Line.java | 1 |
请完成以下Java代码 | public ReentrantLock getLock() {
return lock;
}
boolean isLocked() {
return lock.isLocked();
}
boolean hasQueuedThreads() {
return lock.hasQueuedThreads();
}
int getCounter() {
return counter;
} | public static void main(String[] args) {
final int threadCount = 2;
final ExecutorService service = Executors.newFixedThreadPool(threadCount);
final SharedObjectWithLock object = new SharedObjectWithLock();
service.execute(object::perform);
service.execute(object::performTryLoc... | repos\tutorials-master\core-java-modules\core-java-concurrency-advanced\src\main\java\com\baeldung\concurrent\locks\SharedObjectWithLock.java | 1 |
请完成以下Java代码 | public @Nullable PrivateKey getPrivateKey(@Nullable String password) {
return PemPrivateKeyParser.parse(this.text, password);
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
return Objects.equals(t... | * @param path a path to load the content from
* @return the loaded PEM content
* @throws IOException on IO error
*/
public static PemContent load(Path path) throws IOException {
Assert.notNull(path, "'path' must not be null");
try (InputStream in = Files.newInputStream(path, StandardOpenOption.READ)) {
re... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\ssl\pem\PemContent.java | 1 |
请完成以下Java代码 | public class CharStackWithArray {
private char[] elements;
private int size;
public CharStackWithArray() {
size = 0;
elements = new char[4];
}
public int size() {
return size;
}
public char peek() {
if (size == 0) {
throw new EmptyStackExceptio... | throw new EmptyStackException();
}
return elements[--size];
}
public void push(char item) {
ensureCapacity(size + 1);
elements[size] = item;
size++;
}
private void ensureCapacity(int newSize) {
char newBiggerArray[];
if (elements.length < newSi... | repos\tutorials-master\core-java-modules\core-java-collections-7\src\main\java\com\baeldung\charstack\CharStackWithArray.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getMessageFunction() {
return messageFunction;
}
/**
* Sets the value of the messageFunction property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setMessageFunction(String value) {
this.messageFuncti... | public void setConsignmentReference(String value) {
this.consignmentReference = value;
}
/**
* Free text information.Gets the value of the freeText property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you m... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\ORDRSPExtensionType.java | 2 |
请完成以下Java代码 | public void setHelp (String Help)
{
set_Value (COLUMNNAME_Help, Help);
}
/** Get Comment/Help.
@return Comment or Hint
*/
public String getHelp ()
{
return (String)get_Value(COLUMNNAME_Help);
}
public I_M_Product getM_Product() throws RuntimeException
{
return (I_M_Product)MTable.get(getCtx(), ... | }
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Category.
@param R_Category_ID
Request Category
*/
public void setR_Category_ID (int R_Category_ID)
{
if (R_Cate... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_Category.java | 1 |
请完成以下Spring Boot application配置 | server.port=8888
spring.cloud.config.server.git.uri=
spring.cloud.bus.enabled=true
spring.security.user.name=root
spring.security.user.password=s3cr3t
spring.rabbitmq.host=localhost
spring.rabbitmq.port=5672
spring.rabbitmq.username=guest
spring.rabbitmq.password=guest
encrypt.key-store.location=classpath:/config | -server.jks
encrypt.key-store.password=my-s70r3-s3cr3t
encrypt.key-store.alias=config-server-key
encrypt.key-store.secret=my-k34-s3cr3t | repos\tutorials-master\spring-cloud-modules\spring-cloud-bus\spring-cloud-bus-server\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public String determineCompatibilityRangeRequirement() {
return this.range.toString();
}
public static Mapping create(String range, String version) {
return new Mapping(range, version);
}
public static Mapping create(String range, String version, String... repositories) {
return new Mapping(range, ve... | return this.additionalBoms;
}
public VersionRange getRange() {
return this.range;
}
public void setRepositories(List<String> repositories) {
this.repositories = repositories;
}
public void setAdditionalBoms(List<String> additionalBoms) {
this.additionalBoms = additionalBoms;
}
public void s... | repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\BillOfMaterials.java | 1 |
请在Spring Boot框架中完成以下Java代码 | final void addMapping(int index, UrlMapping urlMapping) {
this.urlMappings.add(index, urlMapping);
}
/**
* Creates the mapping of {@link RequestMatcher} to {@link Collection} of
* {@link ConfigAttribute} instances
* @return the mapping of {@link RequestMatcher} to {@link Collection} of
* {@link ConfigAttri... | UrlMapping(RequestMatcher requestMatcher, Collection<ConfigAttribute> configAttrs) {
this.requestMatcher = requestMatcher;
this.configAttrs = configAttrs;
}
RequestMatcher getRequestMatcher() {
return this.requestMatcher;
}
Collection<ConfigAttribute> getConfigAttrs() {
return this.configAttrs;
... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\AbstractConfigAttributeRequestMatcherRegistry.java | 2 |
请完成以下Java代码 | public class MicroBatcher {
Queue<String> tasksQueue = new ConcurrentLinkedQueue<>();
Thread batchThread;
int executionThreshold;
int timeoutThreshold;
boolean working = false;
MicroBatcher(int executionThreshold, int timeoutThreshold, Consumer<List<String>> executionLogic) {
batchThrea... | List<String> tasks = new ArrayList<>(executionThreshold);
while (tasksQueue.size() > 0 && tasks.size() < executionThreshold) {
tasks.add(tasksQueue.poll());
}
working = true;
executionLogic.accept(tasks);
working = false... | repos\tutorials-master\patterns-modules\design-patterns-behavioral-2\src\main\java\com\baeldung\smartbatching\MicroBatcher.java | 1 |
请完成以下Java代码 | public class DocumentLineType1Choice {
@XmlElement(name = "Cd")
protected String cd;
@XmlElement(name = "Prtry")
protected String prtry;
/**
* Gets the value of the cd property.
*
* @return
* possible object is
* {@link String }
*
*/
public Stri... | /**
* Gets the value of the prtry property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPrtry() {
return prtry;
}
/**
* Sets the value of the prtry property.
*
* @param value
* allowed object is
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-xjc_camt054_001_06\de\metas\payment\camt054_001_06\DocumentLineType1Choice.java | 1 |
请完成以下Java代码 | public byte[] serialize(Object value, ValueFields valueFields) {
if (value == null) {
return null;
}
ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream oos = null;
try {
oos = createObjectOutputStream(baos);
oos.writeO... | } catch (Exception e) {
throw new ActivitiException("Couldn't deserialize object in variable '" + valueFields.getName() + "'", e);
} finally {
IoUtil.closeSilently(bais);
}
}
public boolean isAbleToStore(Object value) {
// TODO don't we need null support here?
... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\variable\SerializableType.java | 1 |
请完成以下Java代码 | public void setProcessed (boolean Processed)
{
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
}
/** Get Verarbeitet.
@return Checkbox sagt aus, ob der Beleg verarbeitet wurde.
*/
@Override
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
... | @param ProductValue
Schlüssel des Produktes
*/
@Override
public void setProductValue (java.lang.String ProductValue)
{
set_Value (COLUMNNAME_ProductValue, ProductValue);
}
/** Get Produktschlüssel.
@return Schlüssel des Produktes
*/
@Override
public java.lang.String getProductValue ()
{
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_DiscountSchema.java | 1 |
请完成以下Java代码 | public class EDIExport extends JavaProcess
{
private int recordId = -1;
// Services
private final IEDIDocumentBL ediDocumentBL = Services.get(IEDIDocumentBL.class);
@Override
protected void prepare()
{
recordId = getRecord_ID();
}
@Override
protected String doIt()
{
final IExport<? extends I_EDI_Docume... | final I_EDI_Document document = export.getDocument();
document.setEDIErrorMsg(errorMessage);
saveRecord(document);
throw new AdempiereException(errorTitle + "\n" + errorMessage).markAsUserValidationError();
}
private String buildAndTrlTitle(final String tableNameIdentifier, final I_EDI_Document document)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\EDIExport.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.