instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public String toString()
{
return "Fact[" + m_doc
+ "," + getAcctSchema()
+ ",PostType=" + getPostingType()
+ "]";
}
public boolean isEmpty()
{
return m_lines.isEmpty();
}
public ImmutableList<FactLine> getLines()
{
return ImmutableList.copyOf(m_lines);
}
public void mapEachLine(final Unar... | {
//
// Case: 1 debit line, one or more credit lines
if (factTrxLines.getType() == FactTrxLinesType.Debit)
{
final FactLine drLine = factTrxLines.getDebitLine();
saveNew(drLine);
factTrxLines.forEachCreditLine(crLine -> {
crLine.setCounterpart_Fact_Acct_ID(drLine.getIdNotNull());
saveNew(crLin... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\acct\Fact.java | 1 |
请完成以下Java代码 | public MQuery getZoomQuery()
{
return null;
} // getZoomQuery
/**
* Get Data Direct from Table. Default implementation - does not requery
*
* @param evalCtx evaluation context to be used
* @param key key
* @param saveInCache save in cache for r/w
* @param cacheLocal cache locally for r/o
* @return v... | * Is this lookup model populated
* @return boolean
*/
public boolean isLoaded()
{
return m_loaded;
}
/**
* Returns a list of parameters on which this lookup depends.
*
* Those parameters will be fetched from context on validation time.
*
* @return list of parameter names
*/
public Set<String> ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\Lookup.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class YamlFooProperties {
private String name;
private List<String> aliases;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public List<String> getAliases() { | return aliases;
}
public void setAliases(List<String> aliases) {
this.aliases = aliases;
}
@Override
public String toString() {
return "YamlFooProperties{" +
"name='" + name + '\'' +
", aliases=" + aliases +
'}';
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-properties-2\src\main\java\com\baeldung\properties\yaml\YamlFooProperties.java | 2 |
请完成以下Java代码 | static HttpGraphQlClient create(WebClient webClient) {
return builder(webClient.mutate()).build();
}
/**
* Return a builder to initialize an {@link HttpGraphQlClient} with.
*/
static Builder<?> builder() {
return new DefaultHttpGraphQlClientBuilder();
}
/**
* Variant of {@link #builder()} with a pre-co... | * base URL, headers, and codecs can be customized through this builder.
* @param webClient the function for customizing the {@code WebClient.Builder} that's used to build the HTTP client
* @see #url(String)
* @see #header(String, String...)
* @see #codecConfigurer(Consumer)
*/
B webClient(Consumer<WebC... | repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\client\HttpGraphQlClient.java | 1 |
请完成以下Java代码 | protected Date calculateNextTimer() {
BusinessCalendar businessCalendar = Context
.getProcessEngineConfiguration()
.getBusinessCalendarManager()
.getBusinessCalendar(getBusinessCalendarName(TimerEventHandler.geCalendarNameFromConfiguration(jobHandlerConfiguration)... | public String getLockOwner() {
return null;
}
public void setLockOwner(String lockOwner) {
// Nothing to do
}
public Date getLockExpirationTime() {
return null;
}
public void setLockExpirationTime(Date lockExpirationTime) {
// Nothing to do
}
} | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\persistence\entity\TimerJobEntity.java | 1 |
请完成以下Java代码 | public void setIsReadOnlyValues (final boolean IsReadOnlyValues)
{
set_Value (COLUMNNAME_IsReadOnlyValues, IsReadOnlyValues);
}
@Override
public boolean isReadOnlyValues()
{
return get_ValueAsBoolean(COLUMNNAME_IsReadOnlyValues);
}
@Override
public void setIsStorageRelevant (final boolean IsStorageReleva... | set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setPrintValue_Override (final @Nullable java.lang.String PrintValue_Override)
{
set_Value (COLUMNNAME_PrintValue_Override, PrintValue_Override);
}
@Over... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Attribute.java | 1 |
请完成以下Java代码 | public void setKPI_DataSource_Type (final java.lang.String KPI_DataSource_Type)
{
set_Value (COLUMNNAME_KPI_DataSource_Type, KPI_DataSource_Type);
}
@Override
public java.lang.String getKPI_DataSource_Type()
{
return get_ValueAsString(COLUMNNAME_KPI_DataSource_Type);
}
@Override
public void setName (fina... | set_Value (COLUMNNAME_SQL_GroupAndOrderBy, SQL_GroupAndOrderBy);
}
@Override
public java.lang.String getSQL_GroupAndOrderBy()
{
return get_ValueAsString(COLUMNNAME_SQL_GroupAndOrderBy);
}
@Override
public void setSQL_WhereClause (final @Nullable java.lang.String SQL_WhereClause)
{
set_Value (COLUMNNAME_S... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java-gen\de\metas\ui\web\base\model\X_WEBUI_KPI.java | 1 |
请完成以下Java代码 | private Jwt resolveJwtAssertion(OAuth2AuthorizationContext context) {
if (!(context.getPrincipal().getPrincipal() instanceof Jwt)) {
return null;
}
return (Jwt) context.getPrincipal().getPrincipal();
}
private OAuth2AccessTokenResponse getTokenResponse(ClientRegistration clientRegistration,
JwtBearerGran... | *
* <p>
* An access token is considered expired if
* {@code OAuth2AccessToken#getExpiresAt() - clockSkew} is before the current time
* {@code clock#instant()}.
* @param clockSkew the maximum acceptable clock skew
*/
public void setClockSkew(Duration clockSkew) {
Assert.notNull(clockSkew, "clockSkew canno... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\JwtBearerOAuth2AuthorizedClientProvider.java | 1 |
请完成以下Java代码 | public class GreedyAlgorithm {
int currentLevel = 0;
final int maxLevel = 3;
SocialConnector sc;
FollowersPath fp;
public GreedyAlgorithm(SocialConnector sc) {
super();
this.sc = sc;
this.fp = new FollowersPath();
}
public long findMostFollowersPath(String... | if (followersCount > max) {
toFollow = el;
max = followersCount;
}
}
if (currentLevel < maxLevel - 1) {
currentLevel++;
max += findMostFollowersPath(toFollow.getUsername());
return max;
} else {
... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-6\src\main\java\com\baeldung\algorithms\greedy\GreedyAlgorithm.java | 1 |
请完成以下Java代码 | public Boolean isOpen() {
return open;
}
public Boolean isDeleted() {
return deleted;
}
public Boolean isResolved() {
return resolved;
}
public String getAnnotation() {
return annotation;
}
public static HistoricIncidentDto fromHistoricIncident(HistoricIncident historicIncident) {
... | dto.incidentType = historicIncident.getIncidentType();
dto.failedActivityId = historicIncident.getFailedActivityId();
dto.activityId = historicIncident.getActivityId();
dto.causeIncidentId = historicIncident.getCauseIncidentId();
dto.rootCauseIncidentId = historicIncident.getRootCauseIncidentId();
d... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricIncidentDto.java | 1 |
请完成以下Java代码 | public String getISIN() {
return isin;
}
/**
* Sets the value of the isin property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setISIN(String value) {
this.isin = value;
}
/**
* Gets the value of the... | public AlternateSecurityIdentification2 getPrtry() {
return prtry;
}
/**
* Sets the value of the prtry property.
*
* @param value
* allowed object is
* {@link AlternateSecurityIdentification2 }
*
*/
public void setPrtry(AlternateSecurityIdentificatio... | 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\SecurityIdentification4Choice.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result info(@PathVariable("id") Long id) {
NewsCategory newsCategory = categoryService.queryById(id);
return ResultGenerator.genSuccessResult(newsCategory);
}
/**
* 分类添加
*/
@RequestMapping(value = "/categories/save", method = RequestMethod.POST)
@ResponseBody
publi... | @RequestParam("categoryName") String categoryName) {
if (!StringUtils.hasText(categoryName)) {
return ResultGenerator.genFailResult("参数异常!");
}
if (categoryService.updateCategory(categoryId, categoryName)) {
return ResultGenerator.genSuccessResult();
} else {
... | repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\controller\admin\CategoryController.java | 2 |
请完成以下Java代码 | public class TablePrinter
{
@NonNull private final Table table;
private int ident = 0;
@NonNull private final HashMap<String, Integer> columnWidths = new HashMap<>(); // lazy
TablePrinter(@NonNull final Table table)
{
this.table = table;
}
public TablePrinter ident(int ident)
{
this.ident = ident;
retur... | }
return writer.getAsString();
}
int getColumnWidth(final String columnName)
{
return columnWidths.computeIfAbsent(columnName, this::computeColumnWidth);
}
private int computeColumnWidth(final String columnName)
{
int maxWidth = columnName.length();
for (final Row row : table.getRowsList())
{
ma... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\text\tabular\TablePrinter.java | 1 |
请完成以下Java代码 | public AppDefinitionEntity findAppDefinitionByDeploymentAndKeyAndTenantId(String deploymentId, String appDefinitionKey, String tenantId) {
return dataManager.findAppDefinitionByDeploymentAndKeyAndTenantId(deploymentId, appDefinitionKey, tenantId);
}
@Override
public AppDefinition findAppDefinitionB... | @Override
public AppDefinitionQuery createAppDefinitionQuery() {
return new AppDefinitionQueryImpl(engineConfiguration.getCommandExecutor());
}
@Override
public List<AppDefinition> findAppDefinitionsByQueryCriteria(AppDefinitionQuery appDefinitionQuery) {
return dataManager.findAppDefin... | repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\persistence\entity\AppDefinitionEntityManagerImpl.java | 1 |
请完成以下Java代码 | protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_M_PackageTree[")
.append(get_ID()).append("]");
return sb.toString();
}
public o... | /** Set PackstĂĽck.
@param M_Package_ID
Shipment Package
*/
public void setM_Package_ID (int M_Package_ID)
{
if (M_Package_ID < 1)
set_Value (COLUMNNAME_M_Package_ID, null);
else
set_Value (COLUMNNAME_M_Package_ID, Integer.valueOf(M_Package_ID));
}
/** Get PackstĂĽck.
@return Shipment Package... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\compiere\model\X_M_PackageTree.java | 1 |
请完成以下Java代码 | public PlatformTransactionManager getTransactionManager() {
return transactionManager;
}
public void setTransactionManager(PlatformTransactionManager transactionManager) {
this.transactionManager = transactionManager;
}
public String getDeploymentName() {
return deploymentName;
}
public void ... | public String getDeploymentTenantId() {
return deploymentTenantId;
}
public void setDeploymentTenantId(String deploymentTenantId) {
this.deploymentTenantId = deploymentTenantId;
}
public boolean isDeployChangedOnly() {
return deployChangedOnly;
}
public void setDeployChangedOnly(boolean deplo... | repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\SpringTransactionsProcessEngineConfiguration.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getBrandEntityID() {
return brandEntityID;
}
public void setBrandEntityID(String brandEntityID) {
this.brandEntityID = brandEntityID;
}
public Integer getProdState() {
return prodState;
}
public void setProdState(Integer prodState) {
this.prodStat... | @Override
public String toString() {
return "ProdInsertReq{" +
"id='" + id + '\'' +
", prodName='" + prodName + '\'' +
", marketPrice='" + marketPrice + '\'' +
", shopPrice='" + shopPrice + '\'' +
", stock=" + stock +
... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\product\ProdInsertReq.java | 2 |
请完成以下Java代码 | public boolean contains(Object object) {
for (Object element : internal) {
if (object.equals(element)) {
return true;
}
}
return false;
}
@Override
public boolean containsAll(Collection<?> collection) {
for (Object element : collection... | }
System.arraycopy(internal, 0, array, 0, internal.length);
if (array.length > internal.length) {
array[internal.length] = null;
}
return array;
}
@Override
public Iterator<E> iterator() {
return new CustomIterator();
}
@Override
public List... | repos\tutorials-master\core-java-modules\core-java-collections-list-7\src\main\java\com\baeldung\list\CustomList.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) throws IOException {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
// 错误信息
List<String> errorMessage = new ArrayList<... | }
/**
* 立即执行
* @param id
* @return
*/
//@RequiresRoles("admin")
@RequiresPermissions("system:quartzJob:execute")
@GetMapping("/execute")
public Result<?> execute(@RequestParam(name = "id", required = true) String id) {
QuartzJob quartzJob = quartzJobService.getById(id);
if (quartzJob == null) {
... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\quartz\controller\QuartzJobController.java | 2 |
请完成以下Java代码 | public void setDefinitionRef(CaseFileItemDefinition caseFileItemDefinition) {
definitionRefAttribute.setReferenceTargetElement(this, caseFileItemDefinition);
}
public CaseFileItem getSourceRef() {
return sourceRefAttribute.getReferenceTargetElement(this);
}
public void setSourceRef(CaseFileItem source... | definitionRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_DEFINITION_REF)
.qNameAttributeReference(CaseFileItemDefinition.class)
.build();
sourceRefAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_SOURCE_REF)
.namespace(CMMN10_NS)
.idAttributeReference(CaseFileItem.c... | repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CaseFileItemImpl.java | 1 |
请完成以下Java代码 | private PrinterQueue getOrCreateQueue(final HardwarePrinter printer)
{
return queuesMap.computeIfAbsent(printer.getId(), k -> new PrinterQueue(printer));
}
public void clear()
{
queuesMap.clear();
}
public FrontendPrinterData toFrontendPrinterData()
{
return queuesMap.values()
.stream()
... | pdfWriter.addArchivePartToPDF(printingDataAndSegment.getPrintingData(), printingDataAndSegment.getSegment());
}
}
return baos.toByteArray();
}
private String suggestFilename()
{
final ImmutableSet<String> filenames = segments.stream()
.map(PrintingDataAndSegment::getDocumentFileName)
.coll... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\frontend\FrontendPrinter.java | 1 |
请完成以下Java代码 | public String modelChange(final PO po, final int typeInt)
{
final ModelChangeType type = ModelChangeType.valueOf(typeInt);
if (InterfaceWrapperHelper.isInstanceOf(po, I_C_OrderLine.class))
{
if (type.isNew() && type.isBefore() && !po.isCopying())
{
final I_C_OrderLine orderLine = InterfaceWrapperHelpe... | }
return null;
}
private void updateOrderLineAddresses(final I_C_OrderLine orderLine)
{
// bpartner address
if (orderLine.getC_BPartner_Location_ID() > 0)
{
final String bpartnerAddress = orderLine.getBPartnerAddress();
if (Check.isBlank(bpartnerAddress))
{
documentLocationBL.updateRenderedAdd... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\modelvalidator\Order.java | 1 |
请完成以下Java代码 | public static boolean isNotEmpty(@Nullable byte[] array) {
return array != null && array.length > 0;
}
/**
* Null-safe operation to determine whether the given {@link Resource} is readable.
*
* @param resource {@link Resource} to evaluate.
* @return a boolean value indicating whether the given {@link Resou... | * @see org.springframework.core.io.WritableResource#isWritable()
* @see org.springframework.core.io.WritableResource
* @see org.springframework.core.io.Resource
*/
public static boolean isWritable(@Nullable Resource resource) {
return resource instanceof WritableResource && ((WritableResource) resource).isWrit... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\io\support\ResourceUtils.java | 1 |
请完成以下Java代码 | public Msv3FaultInfo getAuftragsfehler() {
return auftragsfehler;
}
/**
* Sets the value of the auftragsfehler property.
*
* @param value
* allowed object is
* {@link Msv3FaultInfo }
*
*/
public void setAuftragsfehler(Msv3FaultInfo value) {
t... | *
* @param value
* allowed object is
* {@link String }
*
*/
public void setAuftragskennung(String value) {
this.auftragskennung = value;
}
/**
* Gets the value of the gebindeId property.
*
* @return
* possible object is
* {@li... | 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\BestellungAntwortAuftrag.java | 1 |
请完成以下Java代码 | public SqlDocumentQueryBuilder setOrderBys(final DocumentQueryOrderByList orderBys)
{
// Don't throw exception if noSorting is true. Just do nothing.
// REASON: it gives us better flexibility when this builder is handled by different methods, each of them adding stuff to it
// Check.assume(!noSorting, "sorting e... | }
final ImmutableSet.Builder<String> keyColumnNames = ImmutableSet.builder();
final ImmutableMap.Builder<String, Object> values = ImmutableMap.builder();
for (int i = 0; i < count; i++)
{
final SqlEntityFieldBinding keyField = keyFields.get(i);
final String keyColumnName = keyField.getColumnName();
ke... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\sql\SqlDocumentQueryBuilder.java | 1 |
请完成以下Java代码 | private void loadCustomDic(String customPath, boolean isCache)
{
if (TextUtility.isBlank(customPath))
{
return;
}
logger.info("开始加载自定义词典:" + customPath);
DoubleArrayTrie<CoreDictionary.Attribute> dat = new DoubleArrayTrie<CoreDictionary.Attribute>();
Strin... | // {
// LinkedList<Vertex> nodeArray = nodes[i];
// if (nodeArray == null) continue;
// for (Vertex node : nodeArray)
// {
// if (node.from == null) continue;
// if (node.isNew)
// {
// for (Vertex to : no... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\Viterbi\ViterbiSegment.java | 1 |
请完成以下Java代码 | public class Source {
private final String[] keys;
private Source(@NonNull String[] keys) {
Assert.notNull(keys, "The String array of keys must not be null");
this.keys = keys;
}
public void to(String key) {
to(key, v -> v);
}
public void to(@NonNull String key, @NonNull Function<String, Obje... | if (Arrays.stream(keys).allMatch(source::containsKey)) {
getTarget().put(key, function.apply(source.get(keys[0])));
}
}
public void to(String key, TriFunction<String, String, String, Object> function) {
String[] keys = this.keys;
Assert.state(keys.length == 3,
String.format("Source size [%d] can... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-cloud\src\main\java\org\springframework\geode\cloud\bindings\MapMapper.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Channel articleHttpFeed() {
List<Article> items = new ArrayList<>();
Article item1 = new Article();
item1.setLink("http://www.baeldung.com/netty-exception-handling");
item1.setTitle("Exceptions in Netty");
item1.setDescription("In this quick article, we’ll be looking at ex... | item.setLink(article.getLink());
item.setTitle(article.getTitle());
Description description1 = new Description();
description1.setValue(article.getDescription());
item.setDescription(description1);
item.setPubDate(article.getPublishedDate());
item.... | repos\tutorials-master\spring-web-modules\spring-mvc-basics-2\src\main\java\com\baeldung\spring\controller\rss\ArticleRssController.java | 2 |
请完成以下Java代码 | private Mono<Void> validateToken(ServerWebExchange exchange) {
return this.csrfTokenRepository.loadToken(exchange)
.switchIfEmpty(Mono.defer(() -> Mono.error(new CsrfException("An expected CSRF token cannot be found"))))
.filterWhen((expected) -> containsValidCsrfToken(exchange, expected))
.switchIfEmpty(Mon... | byte[] expectedBytes = Utf8.encode(expected);
byte[] actualBytes = Utf8.encode(actual);
return MessageDigest.isEqual(expectedBytes, actualBytes);
}
private Mono<CsrfToken> generateToken(ServerWebExchange exchange) {
return this.csrfTokenRepository.generateToken(exchange)
.delayUntil((token) -> this.csrfToke... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\csrf\CsrfWebFilter.java | 1 |
请完成以下Java代码 | public abstract class CommonDictionaryMaker implements ISaveAble
{
public boolean verbose = false;
/**
* 语料库中的单词
*/
EasyDictionary dictionary;
/**
* 输出词典
*/
DictionaryMaker dictionaryMaker;
/**
* 2元文法词典
*/
NGramDictionaryMaker nGramDictionaryMaker;
public C... | }
compute(s);
}
/**
* 同compute
* @param sentences
*/
public void learn(Sentence ... sentences)
{
learn(Arrays.asList(sentences));
}
/**
* 训练
* @param corpus 语料库路径
*/
public void train(String corpus)
{
CorpusLoader.walk(corpus, new C... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\CommonDictionaryMaker.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getSpbillCreateIp() {
return spbillCreateIp;
}
public void setSpbillCreateIp(String spbillCreateIp) {
this.spbillCreateIp = spbillCreateIp;
}
public String getTimeStart() {
return timeStart;
}
public void setTimeStart(String timeStart) {
this.time... | }
public void setTradeType(WeiXinTradeTypeEnum tradeType) {
this.tradeType = tradeType;
}
public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
}
public String getLimitPay() {
return lim... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\entity\weixinpay\WeiXinPrePay.java | 2 |
请完成以下Java代码 | private void handlerMap() {
if (instanceMap.size() <= 0)
return;
for (Map.Entry<String, Object> entry : instanceMap.entrySet()) {
if (entry.getValue().getClass().isAnnotationPresent(Schema.class)) {
Schema schema = entry.getValue().getClass().getAnnotation(Schema.... | }
Method method = handlerMap.get(path);
Object schema = instanceMap.get(pathArray[1]);
//查找不到映射Bean和Method不做处理
if (method == null || schema == null) {
return;
}
try {
long begin = System.currentTimeMillis();
logger.info("integrate data:... | repos\spring-boot-leaning-master\2.x_data\3-4 解决后期业务变动导致的数据结构不一致的问题\spring-boot-canal-mongodb-cascade\src\main\java\com\neo\util\SpringUtil.java | 1 |
请完成以下Java代码 | public class ChangePlanItemStateCmd implements Command<Void> {
protected CmmnEngineConfiguration cmmnEngineConfiguration;
protected ChangePlanItemStateBuilderImpl changePlanItemStateBuilder;
public ChangePlanItemStateCmd(ChangePlanItemStateBuilderImpl changePlanItemStateBuilder, CmmnEngineConfigurati... | changePlanItemStateBuilder.getChangeToAvailableStatePlanItemDefinitions().size() == 0 &&
changePlanItemStateBuilder.getWaitingForRepetitionPlanItemDefinitions().size() == 0 &&
changePlanItemStateBuilder.getRemoveWaitingForRepetitionPlanItemDefinitions().size() == 0) {
... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\ChangePlanItemStateCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class JsonAlbertaProductInfo
{
@JsonProperty("albertaProductId")
@JsonInclude(JsonInclude.Include.NON_NULL)
String albertaProductId;
@JsonProperty("productGroupId")
@JsonInclude(JsonInclude.Include.NON_NULL)
@Nullable
String productGroupId;
@JsonProperty("additionalDescription")
@JsonInclude(JsonInclu... | @JsonProperty("stars")
@JsonInclude(JsonInclude.Include.NON_NULL)
BigDecimal stars;
@JsonProperty("pharmacyPrice")
@JsonInclude(JsonInclude.Include.NON_NULL)
BigDecimal pharmacyPrice;
@JsonProperty("fixedPrice")
@JsonInclude(JsonInclude.Include.NON_NULL)
BigDecimal fixedPrice;
@JsonProperty("therapyIds")
@... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-product\src\main\java\de\metas\common\product\v2\response\alberta\JsonAlbertaProductInfo.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class MultipleCrawlerController {
public static void main(String[] args) throws Exception {
File crawlStorageBase = new File("src/test/resources/crawler4j");
CrawlConfig htmlConfig = new CrawlConfig();
CrawlConfig imageConfig = new CrawlConfig();
htmlConfig.setCrawlSt... | CrawlerStatistics stats = new CrawlerStatistics();
CrawlController.WebCrawlerFactory<HtmlCrawler> htmlFactory = () -> new HtmlCrawler(stats);
File saveDir = new File("src/test/resources/crawler4j");
CrawlController.WebCrawlerFactory<ImageCrawler> imageFactory = () -> new ImageCrawler(sa... | repos\tutorials-master\libraries-4\src\main\java\com\baeldung\crawler4j\MultipleCrawlerController.java | 2 |
请完成以下Java代码 | private void setContractStatusForCurrentOrder(@NonNull final I_C_Order contractOrder, @NonNull final I_C_Flatrate_Term term)
{
// set status for the current order
final List<I_C_Flatrate_Term> terms = contractsDAO.retrieveFlatrateTermsForOrderIdLatestFirst(OrderId.ofRepoId(contractOrder.getC_Order_ID()));
final ... | final I_C_Order parentOrder = orders.get(1);
if (isActiveParentContractOrder(parentOrder, contractOrder))
{
contractOrderService.setOrderContractStatusAndSave(parentOrder, I_C_Order.CONTRACTSTATUS_Active);
}
}
private boolean isActiveParentContractOrder(@NonNull final I_C_Order parentOrder, @NonNull final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\order\UpdateContractOrderStatus.java | 1 |
请完成以下Java代码 | public I_AD_Table getAD_Table() throws RuntimeException
{
return (I_AD_Table)MTable.get(getCtx(), I_AD_Table.Table_Name)
.getPO(getAD_Table_ID(), get_TrxName()); }
/** Set Table.
@param AD_Table_ID
Database Table information
*/
public void setAD_Table_ID (int AD_Table_ID)
{
if (AD_Table_ID < 1)
... | /** Get Document No.
@return Document sequence number of the document
*/
public String getDocumentNo ()
{
return (String)get_Value(COLUMNNAME_DocumentNo);
}
/** Set Record ID.
@param Record_ID
Direct internal record ID
*/
public void setRecord_ID (int Record_ID)
{
if (Record_ID < 0)
set_Val... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Sequence_Audit.java | 1 |
请完成以下Java代码 | protected static TenantId getTenantId(UUID uuid) {
if (uuid != null && !uuid.equals(EntityId.NULL_UUID)) {
return TenantId.fromUUID(uuid);
} else {
return TenantId.SYS_TENANT_ID;
}
}
protected JsonNode toJson(Object value) {
if (value != null) {
... | } else {
return "";
}
}
protected <E> List<E> listFromString(String string, Function<String, E> mappingFunction) {
if (string != null) {
return Arrays.stream(StringUtils.split(string, ','))
.filter(StringUtils::isNotBlank)
.map(map... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\model\BaseSqlEntity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ConcurrencyControlConfigurer maximumSessions(SessionLimit sessionLimit) {
SessionManagementConfigurer.this.sessionLimit = sessionLimit;
return this;
}
/**
* The URL to redirect to if a user tries to access a resource and their session
* has been expired due to too many sessions for the current u... | * intervene or wait till their session expires.
* @param maxSessionsPreventsLogin true to have an error at time of
* authentication, else false (default)
* @return the {@link ConcurrencyControlConfigurer} for further customizations
*/
public ConcurrencyControlConfigurer maxSessionsPreventsLogin(boolean ma... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\SessionManagementConfigurer.java | 2 |
请完成以下Java代码 | class AnsiString {
private final Terminal terminal;
private final StringBuilder value = new StringBuilder();
/**
* Create a new {@link AnsiString} for the given {@link Terminal}.
* @param terminal the terminal used to test if {@link Terminal#isAnsiSupported() ANSI
* is supported}.
*/
AnsiString(Terminal ... | if (code.isColor()) {
if (code.isBackground()) {
return ansi.bg(code.getColor());
}
return ansi.fg(code.getColor());
}
return ansi.a(code.getAttribute());
}
private boolean isAnsiSupported() {
return this.terminal.isAnsiSupported();
}
@Override
public String toString() {
return this.value.to... | repos\spring-boot-4.0.1\cli\spring-boot-cli\src\main\java\org\springframework\boot\cli\command\shell\AnsiString.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Dao<T, ID extends Serializable> implements GenericDao<T, ID> {
private static final Logger logger = Logger.getLogger(Dao.class.getName());
private static final int BATCH_SIZE = 30;
@PersistenceContext
private EntityManager entityManager;
@Override
public <S extend... | if (i % session.getJdbcBatchSize() == 0 && i > 0) {
logger.log(Level.INFO,
"Flushing the EntityManager containing {0} entities ...", i);
entityManager.flush();
entityManager.clear();
i = 0;
}
}
... | repos\Hibernate-SpringBoot-master\HibernateSpringBootBatchInsertsViaSession\src\main\java\com\bookstore\dao\Dao.java | 2 |
请完成以下Java代码 | public void replayApiRequests(@NonNull final ImmutableList<ApiRequestAudit> apiRequestAuditTimeSortedList)
{
apiRequestAuditTimeSortedList.forEach(this::replayActionNoFailing);
}
private void replayActionNoFailing(@NonNull final ApiRequestAudit apiRequestAudit)
{
final ApiAuditLoggable loggable = apiAuditServi... | {
try
{
final ApiResponse apiResponse = apiAuditService.executeHttpCall(apiRequestAudit);
final ApiAuditConfig apiAuditConfig = apiAuditConfigRepository.getConfigById(apiRequestAudit.getApiAuditConfigId());
apiAuditService.auditResponse(apiAuditConfig, apiResponse, apiRequestAudit);
}
catch (final Ex... | repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\audit\ApiRequestReplayService.java | 1 |
请完成以下Java代码 | public class DomXmlAttributeIterable implements Iterable<SpinXmlAttribute> {
protected final NodeList nodeList;
protected final DomXmlDataFormat dataFormat;
protected final String namespace;
protected final boolean validating;
public DomXmlAttributeIterable(NodeList nodeList, DomXmlDataFormat dataFormat) {
... | }
protected SpinXmlAttribute getCurrent() {
if (attributes != null) {
Attr attribute = (Attr) attributes.item(index);
SpinXmlAttribute current = dataFormat.createAttributeWrapper(attribute);
if (!validating || (current.hasNamespace(namespace))) {
return current;
... | repos\camunda-bpm-platform-master\spin\dataformat-xml-dom\src\main\java\org\camunda\spin\impl\xml\dom\DomXmlAttributeIterable.java | 1 |
请完成以下Java代码 | public CostingMethod getCostingMethod()
{
return CostingMethod.LastInvoice;
}
@Override
protected CostDetailCreateResult createCostForMatchInvoice_MaterialCosts(final CostDetailCreateRequest request)
{
final CurrentCost currentCosts = utils.getCurrentCost(request);
final CostDetailPreviousAmounts previousCo... | final CurrentCost currentCosts = utils.getCurrentCost(request);
final CostDetailPreviousAmounts previousCosts = CostDetailPreviousAmounts.of(currentCosts);
final CostDetailCreateResult result = utils.createCostDetailRecordWithChangedCosts(request, previousCosts);
currentCosts.addToCurrentQtyAndCumulate(request.... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\methods\LastInvoiceCostingMethodHandler.java | 1 |
请完成以下Java代码 | private static long getPartitionEndTime(long startTime, long partitionDurationMs) {
return startTime + partitionDurationMs;
}
public List<Long> fetchPartitions(String table) {
List<Long> partitions = new ArrayList<>();
List<String> partitionsTables = getJdbcTemplate().queryForList(SELEC... | try {
currentServerVersion = getJdbcTemplate().queryForObject("SELECT current_setting('server_version_num')", Integer.class);
} catch (Exception e) {
log.warn("Error occurred during fetch of the server version", e);
}
if (currentServerVersion == null) ... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sqlts\insert\sql\SqlPartitioningRepository.java | 1 |
请完成以下Java代码 | public void migrateProcessInstance(String processInstanceId, ProcessInstanceMigrationDocument processInstanceMigrationDocument) {
commandExecutor.execute(new ProcessInstanceMigrationCmd(processInstanceId, processInstanceMigrationDocument));
}
@Override
public void migrateProcessInstancesOfProcessDe... | public Batch batchMigrateProcessInstancesOfProcessDefinition(String processDefinitionId, ProcessInstanceMigrationDocument processInstanceMigrationDocument) {
return commandExecutor.execute(new ProcessInstanceMigrationBatchCmd(processDefinitionId, processInstanceMigrationDocument));
}
@Override
publ... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\ProcessMigrationServiceImpl.java | 1 |
请完成以下Java代码 | public static DataEntryDetailsView cast(@NonNull final Object viewObj)
{
return (DataEntryDetailsView)viewObj;
}
@Override
public LookupValuesPage getFieldTypeahead(final RowEditingContext ctx, final String fieldName, final String query)
{
return null;
}
@Override
public LookupValuesList getFieldDropdown(... | }
@Nullable
@Override
public String getTableNameOrNull(@Nullable final DocumentId documentId_ignored)
{
return I_C_Flatrate_DataEntry_Detail.Table_Name;
}
@Override
public List<RelatedProcessDescriptor> getAdditionalRelatedProcessDescriptors()
{
return processes;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\contract\flatrate\view\DataEntryDetailsView.java | 1 |
请完成以下Java代码 | default String getZoneInfo() {
return this.getClaimAsString(StandardClaimNames.ZONEINFO);
}
/**
* Returns the user's locale {@code (locale)}.
* @return the user's locale
*/
default String getLocale() {
return this.getClaimAsString(StandardClaimNames.LOCALE);
}
/**
* Returns the user's preferred phone... | default Boolean getPhoneNumberVerified() {
return this.getClaimAsBoolean(StandardClaimNames.PHONE_NUMBER_VERIFIED);
}
/**
* Returns the user's preferred postal address {@code (address)}.
* @return the user's preferred postal address
*/
default AddressStandardClaim getAddress() {
Map<String, Object> addres... | repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\StandardClaimAccessor.java | 1 |
请完成以下Java代码 | protected void onUpdate() {
updatedAt = LocalDateTime.now();
}
// Getters and setters
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
... | }
public void setCreatedAt(LocalDateTime createdAt) {
this.createdAt = createdAt;
}
public LocalDateTime getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(LocalDateTime updatedAt) {
this.updatedAt = updatedAt;
}
@Override
public String toString() {... | repos\tutorials-master\persistence-modules\spring-jpa-3\src\main\java\com\baeldung\jpa\localdatetimequery\Event.java | 1 |
请完成以下Java代码 | public void setNameLike(String nameLike) {
this.nameLike = nameLike;
}
@CamundaQueryParam("owner")
public void setOwner(String owner) {
this.owner = owner;
}
protected boolean isValidSortByValue(String value) {
return VALID_SORT_BY_VALUES.contains(value);
}
protected FilterQuery createNewQu... | if (nameLike != null) {
query.filterNameLike(nameLike);
}
if (owner != null) {
query.filterOwner(owner);
}
}
protected void applySortBy(FilterQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) {
if (sortBy.equals(SORT_BY_ID_VALUE)) {
query.orderByFil... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\FilterQueryDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HelloController {
// Get the SLF4J logger interface, default Logback, a SLF4J implementation
private static final Logger logger = LoggerFactory.getLogger(HelloController.class);
@GetMapping("/")
public String hello() {
logger.debug("Debug level - Hello Logback");
logger.... | // Log variables
@GetMapping("/hello/{name}")
String find(@PathVariable String name) {
logger.debug("Debug level - Hello Logback {}", name);
logger.info("Info level - Hello Logback {}", name);
logger.error("Error level - Hello Logback {}", name);
return "Hello SLF4J" + name;
... | repos\spring-boot-master\spring-boot-logging-slf4j-logback\src\main\java\com\mkyong\HelloController.java | 2 |
请完成以下Java代码 | public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getEmail() {
return email;
}
public void setEmail(final String email) {
this.email = email;
}
public Set<Role> getRole... | if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final User user = (User) obj;
if (!email.equals(user.email)) {
return false;
}
... | repos\tutorials-master\spring-katharsis\src\main\java\com\baeldung\persistence\model\User.java | 1 |
请完成以下Java代码 | public List<IncludedDetailInfo> getIncludedDetailInfos()
{
return ImmutableList.copyOf(includedDetailInfos.values());
}
/* package */ final IncludedDetailInfo includedDetailInfo(final DetailId detailId)
{
Check.assumeNotNull(detailId, "Parameter detailId is not null");
return includedDetailInfos.computeIfAbs... | return stale;
}
public LogicExpressionResult getAllowNew()
{
return allowNew;
}
IncludedDetailInfo setAllowNew(final LogicExpressionResult allowNew)
{
this.allowNew = allowNew;
return this;
}
public LogicExpressionResult getAllowDelete()
{
return allowDelete;
}
IncludedDetailInfo s... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentChanges.java | 1 |
请完成以下Java代码 | protected String doIt() throws Exception
{
final I_C_Flatrate_Term term = createTermInOwnTrx();
// TODO check out and cleanup those different methods
final int adWindowId = getProcessInfo().getAD_Window_ID();
if (adWindowId > 0 && !Ini.isSwingClient())
{
// this works for the webui
getResult().setReco... | // the default config is fine for us
final ITrxRunConfig config = trxManager.newTrxRunConfigBuilder().build();
return trxManager.call(ITrx.TRXNAME_None, config, callable);
}
/**
* If the given <code>parameterName</code> is {@value #PARAM_NAME_AD_USER_IN_CHARGE_ID},<br>
* then the method returns the user from... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\process\C_Flatrate_Term_Create_ProcurementContract.java | 1 |
请完成以下Java代码 | public void onAfterReverse(final I_C_Payment payment)
{
//
// Auto-reconcile the payment and it's reversal if the payment is not present on bank statements
final PaymentId paymentId = PaymentId.ofRepoId(payment.getC_Payment_ID());
if (!bankStatementBL.isPaymentOnBankStatement(paymentId))
{
final PaymentId... | if (!paymentBL.isCashTrx(payment))
{
return;
}
if (bankStatementBL.isPaymentOnBankStatement(PaymentId.ofRepoId(payment.getC_Payment_ID())))
{
return;
}
cashStatementBL.createCashStatementLine(payment);
}
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_CHANGE }, ifColumnsChanged = { I_C_Paymen... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\modelvalidator\C_Payment.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DeliveryRecipientType
extends BusinessEntityType
{
@XmlElement(name = "DeliveryRecipientExtension", namespace = "http://erpel.at/schemas/1p0/documents/ext")
protected DeliveryRecipientExtensionType deliveryRecipientExtension;
/**
* Gets the value of the deliveryRecipientExtension pro... | return deliveryRecipientExtension;
}
/**
* Sets the value of the deliveryRecipientExtension property.
*
* @param value
* allowed object is
* {@link DeliveryRecipientExtensionType }
*
*/
public void setDeliveryRecipientExtension(DeliveryRecipientExtensionType... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\DeliveryRecipientType.java | 2 |
请完成以下Java代码 | private void add(final int rowProductId, final int rowUomId, final BigDecimal rowQty)
{
// If this aggregation is no longer valid => do nothing
if (!valid)
{
return;
}
final boolean isInitialized = product != null;
if (!isInitialized)
{
uomConversionCtx = UOMConversionContext.of(rowProductId);
... | // Update UOM column
// FIXME: dirty hack
{
final KeyNamePair uomKNP = new KeyNamePair(uom.getC_UOM_ID(), uom.getName());
setRowValueOrNull(metadata, groupRow, COLUMNNAME_C_UOM_ID, uomKNP);
}
return qty;
}
private final int getM_Product_ID(final IRModelMetadata metadata, final List<Object> row)
{
f... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\compiere\report\core\ProductQtyRModelAggregatedValue.java | 1 |
请完成以下Java代码 | public Map<String, Object> toJson()
{
return toJson(Function.identity());
}
public Map<String, Object> toJson(@NonNull final Function<Object, Object> toJsonConverter)
{
final LinkedHashMap<String, Object> result = new LinkedHashMap<>(parameterNames.size());
for (final String parameterName : parameterNames)
... | public <T extends RepoIdAware> ParamsBuilder value(@NonNull final String parameterName, @Nullable final T id)
{
return valueObj(parameterName, id);
}
public ParamsBuilder value(@NonNull final String parameterName, final boolean valueBoolean)
{
return valueObj(parameterName, valueBoolean);
}
public P... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\api\Params.java | 1 |
请完成以下Java代码 | public int getId() {
return 1;
}
public String getName() {
return ProcessEngineConfiguration.HISTORY_ACTIVITY;
}
public boolean isHistoryEventProduced(HistoryEventType eventType, Object entity) {
return PROCESS_INSTANCE_START == eventType
|| PROCESS_INSTANCE_UPDATE == eventType
|| ... | || ACTIVITY_INSTANCE_START == eventType
|| ACTIVITY_INSTANCE_UPDATE == eventType
|| ACTIVITY_INSTANCE_MIGRATE == eventType
|| ACTIVITY_INSTANCE_END == eventType
|| CASE_INSTANCE_CREATE == eventType
|| CASE_INSTANCE_UPDATE == eventType
|| CASE_INSTANCE_CLOSE == eventType
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\HistoryLevelActivity.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class CacheMetricsRegistrarConfiguration {
private static final String CACHE_MANAGER_SUFFIX = "cacheManager";
private final MeterRegistry registry;
private final CacheMetricsRegistrar cacheMetricsRegistrar;
private final Map<String, CacheManager> cacheManagers;
CacheMetricsRegistrarConfiguration(MeterRegistry... | this.cacheMetricsRegistrar.bindCacheToRegistry(cache, cacheManagerTag);
}
/**
* Get the name of a {@link CacheManager} based on its {@code beanName}.
* @param beanName the name of the {@link CacheManager} bean
* @return a name for the given cache manager
*/
private String getCacheManagerName(String beanName... | repos\spring-boot-4.0.1\module\spring-boot-cache\src\main\java\org\springframework\boot\cache\autoconfigure\metrics\CacheMetricsRegistrarConfiguration.java | 2 |
请完成以下Java代码 | 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 boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public Boolean getCompleted() {
return completed;
}
public void setCompleted(Boolean completed) {
this.completed = completed;
}
} | repos\tutorials-master\spring-quartz\src\main\java\org\baeldung\recovery\custom\ApplicationJob.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public EntityMetaData scanClass(Class<?> clazz) {
EntityMetaData metaData = new EntityMetaData();
// in case with JPA Enhancement method should iterate over superclasses list
// to find @Entity and @Id annotations
while (clazz != null && !clazz.equals(Object.class)) {
// Cla... | }
return idMethod;
}
private Field getIdField(Class<?> clazz) {
Field idField = null;
Field[] fields = clazz.getDeclaredFields();
Id idAnnotation = null;
for (Field field : fields) {
idAnnotation = field.getAnnotation(Id.class);
if (idAnnotation !... | repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\JPAEntityScanner.java | 2 |
请完成以下Java代码 | public String getName() {
return name;
}
@Override
public void setName(String name) {
this.name = name;
}
@Override
public void setDescription(String description) {
this.description = description;
}
@Override
public String getDescription() {
return ... | @Override
public void setDiagramResourceName(String diagramResourceName) {
this.diagramResourceName = diagramResourceName;
}
@Override
public String getTenantId() {
return tenantId;
}
@Override
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
... | repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\persistence\entity\DecisionEntityImpl.java | 1 |
请完成以下Java代码 | private ProductsToPickRow applyFieldChangeRequests(@NonNull final ProductsToPickRow row, final List<JSONDocumentChangedEvent> fieldChangeRequests)
{
Check.assumeNotEmpty(fieldChangeRequests, "fieldChangeRequests is not empty");
fieldChangeRequests.forEach(JSONDocumentChangedEvent::assertReplaceOperation);
Produ... | return DocumentIdsSelection.EMPTY;
}
return getAllRowsByIdNoUpdate()
.values()
.stream()
.filter(row -> pickingCandidateIds.contains(row.getPickingCandidateId()))
.map(ProductsToPickRow::getId)
.collect(DocumentIdsSelection.toDocumentIdsSelection());
}
@Override
public void invalidateAll()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\rows\ProductsToPickRowsData.java | 1 |
请完成以下Java代码 | public class CopySets {
// Copy Constructor
public static <T> Set<T> copyByConstructor(Set<T> original) {
Set<T> copy = new HashSet<>(original);
return copy;
}
// Set.addAll
public static <T> Set<T> copyBySetAddAll(Set<T> original) {
Set<T> copy = new HashSet<>();
c... | return copy;
}
// Apache Commons Lang
public static <T extends Serializable> Set<T> copyByApacheCommonsLang(Set<T> original) {
Set<T> copy = new HashSet<>();
for (T item : original) {
copy.add((T) SerializationUtils.clone(item));
}
return copy;
}
// Coll... | repos\tutorials-master\core-java-modules\core-java-collections-set-2\src\main\java\com\baeldung\set\CopySets.java | 1 |
请完成以下Java代码 | public void setQM_SpecificationLine_ID (int QM_SpecificationLine_ID)
{
if (QM_SpecificationLine_ID < 1)
set_ValueNoCheck (COLUMNNAME_QM_SpecificationLine_ID, null);
else
set_ValueNoCheck (COLUMNNAME_QM_SpecificationLine_ID, Integer.valueOf(QM_SpecificationLine_ID));
}
/** Get QM_SpecificationLine_ID.
... | /** Set Valid to.
@param ValidTo
Valid to including this date (last day)
*/
public void setValidTo (Timestamp ValidTo)
{
set_Value (COLUMNNAME_ValidTo, ValidTo);
}
/** Get Valid to.
@return Valid to including this date (last day)
*/
public Timestamp getValidTo ()
{
return (Timestamp)get_Value(C... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_QM_SpecificationLine.java | 1 |
请完成以下Java代码 | public static final class Builder
{
private static final AtomicInteger nextQuickInputDocumentId = new AtomicInteger(1);
private DocumentPath _rootDocumentPath;
private QuickInputDescriptor _quickInputDescriptor;
private Builder()
{
super();
}
public QuickInput build()
{
return new QuickInput(t... | {
Check.assumeNotNull(_quickInputDescriptor, "Parameter quickInputDescriptor is not null");
return _quickInputDescriptor;
}
private DetailId getTargetDetailId()
{
final DetailId targetDetailId = getQuickInputDescriptor().getDetailId();
Check.assumeNotNull(targetDetailId, "Parameter targetDetailId is ... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\quickinput\QuickInput.java | 1 |
请完成以下Java代码 | public static SessionFactory getSessionFactory(Strategy strategy) {
return buildSessionFactory(strategy);
}
private static SessionFactory buildSessionFactory(Strategy strategy) {
try {
ServiceRegistry serviceRegistry = configureServiceRegistry();
MetadataSources metadat... | return new StandardServiceRegistryBuilder().applySettings(properties)
.build();
}
private static Properties getProperties() throws IOException {
Properties properties = new Properties();
URL propertiesURL = Thread.currentThread()
.getContextClassLoader()
... | repos\tutorials-master\persistence-modules\hibernate-jpa\src\main\java\com\baeldung\hibernate\onetoone\HibernateUtil.java | 1 |
请完成以下Java代码 | public void addMigratingDependentInstance(MigratingInstance migratingInstance) {
migratingDependentInstances.add(migratingInstance);
}
public List<MigratingInstance> getMigratingDependentInstances() {
return migratingDependentInstances;
}
@Override
public void migrateState() {
ExecutionEntity re... | */
public boolean isAsyncAfter() {
return jobInstance.isAsyncAfter();
}
public boolean isAsyncBefore() {
return jobInstance.isAsyncBefore();
}
public MigratingJobInstance getJobInstance() {
return jobInstance;
}
@Override
public void setParent(MigratingScopeInstance parentInstance) {
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingTransitionInstance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isEnabled() {
return (this.enabled != null) ? this.enabled : this.bundle != null;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public @Nullable String getBundle() {
return this.bundle;
}
public void setBundle(@Nullable String bundle) {
this.bundle = bun... | }
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public @Nullable Resource getSchema() {
return this.schema;
}
public void setSchema(@Nullable Resource schema) {
this.schema = schema;
}
}
} | repos\spring-boot-main\module\spring-boot-ldap\src\main\java\org\springframework\boot\ldap\autoconfigure\embedded\EmbeddedLdapProperties.java | 2 |
请完成以下Java代码 | public String getA_Term ()
{
return (String)get_Value(COLUMNNAME_A_Term);
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Option... | /** Get Processed.
@return The document has been processed
*/
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Depreciation_Table_Header.java | 1 |
请完成以下Java代码 | public IAutoCloseable switchContext(final Properties ctx)
{
Check.assumeNotNull(ctx, "ctx not null");
// If we were asked to set the context proxy (the one which we are returning everytime),
// then it's better to do nothing because this could end in a StackOverflowException.
if (ctx == ctxProxy)
{
retur... | temporaryCtxHolder.set(previousTempCtx);
}
else
{
temporaryCtxHolder.remove();
}
closed = true;
}
};
}
@Override
public void reset()
{
temporaryCtxHolder.remove();
rootCtx.clear();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\context\SwingContextProvider.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected void doInTransactionWithoutResult(TransactionStatus status) {
Author authorB = authorRepository.findById(1L).orElseThrow();
authorB.setName("Alicia Tom");
System.out.println("Author B: " + authorB.getName() + "\n");
}... | // SQL entity queries take advantage of session-level repeatable reads
// The data snapshot returned by the triggered SELECT is ignored
Author authorViaSql = authorRepository.fetchByIdSql(1L);
System.out.println("Author via SQL: " + authorViaSql.getName() + "\n");
... | repos\Hibernate-SpringBoot-master\HibernateSpringBootSessionRepeatableReads\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请完成以下Spring Boot application配置 | #\u8FD9\u91CC\u4EE5qq\u90AE\u7BB1\u4E3A\u4F8B
# qq\u90AE\u7BB1\u670D\u52A1\u5668
spring.mail.host=smtp.qq.com
# \u4F60\u7684qq\u90AE\u7BB1\u8D26\u6237
spring.mail.username=yourAccount@qq.com
# \u4F60\u7684qq\u90AE\u7BB1\u7B2C\u4E09\u65B9\u6388\u6743\u7801
spring.mail.password= | yourPassword
# \u7F16\u7801\u7C7B\u578B
spring.mail.default-encoding=UTF-8
spring.thymeleaf.prefix=classpath:/template/ | repos\springboot-demo-master\mail\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public abstract class AbstractTbRuleEngineSubmitStrategy implements TbRuleEngineSubmitStrategy {
protected final String queueName;
protected List<IdMsgPair<TransportProtos.ToRuleEngineMsg>> orderedMsgList;
private volatile boolean stopped;
public AbstractTbRuleEngineSubmitStrategy(String queueName) {
... | }
}
}
orderedMsgList = newOrderedMsgList;
}
@Override
public void onSuccess(UUID id) {
if (!stopped) {
doOnSuccess(id);
}
}
@Override
public void stop() {
stopped = true;
}
} | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\queue\processing\AbstractTbRuleEngineSubmitStrategy.java | 2 |
请完成以下Java代码 | public static FAOpenItemKey parse(@NonNull final String string)
{
final String stringNorm = StringUtils.trimBlankToNull(string);
if (stringNorm == null)
{
throw new AdempiereException("empty/null Open Item Key is not allowed");
}
try
{
final List<String> parts = SPLITTER.splitToList(stringNorm);
... | public Optional<InvoiceId> getInvoiceId()
{
return I_C_Invoice.Table_Name.equals(tableName)
? InvoiceId.optionalOfRepoId(recordId)
: Optional.empty();
}
public Optional<PaymentId> getPaymentId()
{
return I_C_Payment.Table_Name.equals(tableName)
? PaymentId.optionalOfRepoId(recordId)
: Optional.... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\open_items\FAOpenItemKey.java | 1 |
请完成以下Java代码 | public void run() {
LOG.info(cacheThreadPool.getActiveCount() + "---------");
tasks.remove(task);
task.run();
}
});
... | paramMap.put("statusList", status);
paramMap.put("notifyTimeList", notifyTime);
PageBean<RpNotifyRecord> pager = cacheRpNotifyService.queryNotifyRecordListPage(pageParam, paramMap);
int totalSize = (pager.getNumPerPage() - 1) / numPerPage + 1;//总页数
while (pageNum <= totalSize) {
... | repos\roncoo-pay-master\roncoo-pay-app-notify\src\main\java\com\roncoo\pay\AppNotifyApplication.java | 1 |
请完成以下Java代码 | private MInOut getCreateHeader(MInvoice invoice)
{
if (m_inout != null)
{
return m_inout;
}
m_inout = new MInOut(invoice, 0, null, p_M_Warehouse_ID);
m_inout.saveEx();
return m_inout;
}
/**
* Create shipment/receipt line
*
* @return shipment/receipt line
*/
private MInOutLine createLine(MInv... | // If is fully matched don't create anything
if (qtyNotMatched.signum() == 0)
{
return null;
}
MInOut inout = getCreateHeader(invoice);
MInOutLine sLine = new MInOutLine(inout);
sLine.setInvoiceLine(invoiceLine, 0, // Locator
invoice.isSOTrx() ? qtyNotMatched.getStockQty().toBigDecimal() : ZERO);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\process\InvoiceCreateInOut.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void createAlarmSubscriptions() {
for (EntityId entityId : entitiesIds) {
createAlarmSubscriptionForEntity(entityId);
}
}
private void createAlarmSubscriptionForEntity(EntityId entityId) {
int subIdx = sessionRef.getSessionSubIdSeq().incrementAndGet();
subToEn... | .updateProcessor((sub, update) -> fetchAlarmCount())
.build();
localSubscriptionService.addSubscription(subscription, sessionRef);
}
public void clearAlarmSubscriptions() {
if (subToEntityIdMap != null) {
for (Integer subId : subToEntityIdMap.keySet()) {
... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\subscription\TbAlarmCountSubCtx.java | 2 |
请完成以下Java代码 | public void timeStamp() {
if (inserted == 0) {
inserted = System.currentTimeMillis();
}
}
public Long getId() {
return this.id;
}
public String getName() {
return this.name;
}
public String getDescription() {
return this.description;
}
public LocalDateTime getCreated() {
return this.created;... | public void setDescription(String description) {
this.description = description;
}
public void setCreated(LocalDateTime created) {
this.created = created;
}
public void setInserted(Long inserted) {
this.inserted = inserted;
}
public Category withId(Long id) {
return this.id == id ? this : new Category(... | repos\spring-data-examples-main\jdbc\aot-optimization\src\main\java\example\springdata\aot\Category.java | 1 |
请完成以下Java代码 | public void setSelectionColumnSeqNo (final @Nullable BigDecimal SelectionColumnSeqNo)
{
set_Value (COLUMNNAME_SelectionColumnSeqNo, SelectionColumnSeqNo);
}
@Override
public BigDecimal getSelectionColumnSeqNo()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_SelectionColumnSeqNo);
return bd != nul... | public BigDecimal getSortNo()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_SortNo);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setSpanX (final int SpanX)
{
set_Value (COLUMNNAME_SpanX, SpanX);
}
@Override
public int getSpanX()
{
return get_ValueAsInt(COLUMNNAME_Sp... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Field.java | 1 |
请完成以下Java代码 | public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public Boolean getGenerateUniqueProcessEngineName() {
return generateUniqueProcessEngineName;
}
public void setGenerateUniqueProcessEngineName(Boolean generateUniqueProcessEngine... | .add("enabled=" + enabled)
.add("processEngineName=" + processEngineName)
.add("generateUniqueProcessEngineName=" + generateUniqueProcessEngineName)
.add("generateUniqueProcessApplicationName=" + generateUniqueProcessApplicationName)
.add("historyLevel=" + historyLevel)
.add("historyLevelD... | repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\property\CamundaBpmProperties.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static Map<String, Object> doExtraProperties(ConfigurableEnvironment environment) {
Map<String, Object> properties = new LinkedHashMap<>(); // orderly
Map<String, PropertySource<?>> map = doGetPropertySources(environment);
for (PropertySource<?> source : map.values()) {
i... | private static Map<String, PropertySource<?>> doGetPropertySources(ConfigurableEnvironment environment) {
Map<String, PropertySource<?>> map = new LinkedHashMap<String, PropertySource<?>>();
MutablePropertySources sources = environment.getPropertySources();
for (PropertySource<?> source : source... | repos\dubbo-spring-boot-project-master\dubbo-spring-boot-compatible\autoconfigure\src\main\java\org\apache\dubbo\spring\boot\util\EnvironmentUtils.java | 2 |
请在Spring Boot框架中完成以下Java代码 | default I_AD_Client getById(int adClientId)
{
return getById(ClientId.ofRepoId(adClientId));
}
List<I_AD_Client> getByIds(@NonNull Set<ClientId> adClientIds);
@Deprecated
I_AD_Client retriveClient(Properties ctx, int adClientId);
/**
* Retrieves currently login {@link I_AD_Client}.
*
* @return context ... | List<I_AD_Client> retrieveAllClients(Properties ctx);
/** @return client/tenant info for context AD_Client_ID; never returns null */
I_AD_ClientInfo retrieveClientInfo(Properties ctx);
/** @return client/tenant info for given AD_Client_ID; never returns null */
I_AD_ClientInfo retrieveClientInfo(Properties ctx, i... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\service\IClientDAO.java | 2 |
请完成以下Java代码 | public void delete(EntityImpl entity) {
delete(entity, true);
}
@Override
public void delete(EntityImpl entity, boolean fireDeleteEvent) {
getDataManager().delete(entity);
FlowableEventDispatcher eventDispatcher = getEventDispatcher();
if (fireDeleteEvent && eventDispatcher... | protected FlowableEntityEvent createEntityEvent(FlowableEngineEventType eventType, Entity entity) {
return new FlowableEntityEventImpl(entity, eventType);
}
protected DM getDataManager() {
return dataManager;
}
protected void setDataManager(DM dataManager) {
this.dataManager = ... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\persistence\entity\AbstractEntityManager.java | 1 |
请完成以下Java代码 | public class RelatedEntitiesParser {
private final Map<String, String> allEntityIdsAndTypes = new HashMap<>();
private final Map<String, EntityType> tableNameAndEntityType = Map.ofEntries(
Map.entry("COPY public.alarm ", EntityType.ALARM),
Map.entry("COPY public.asset ", EntityType.... | private void processAllTables(LineIterator lineIterator) throws IOException {
String currentLine;
try {
while (lineIterator.hasNext()) {
currentLine = lineIterator.nextLine();
for(Map.Entry<String, EntityType> entry : tableNameAndEntityType.entrySet()) {
... | repos\thingsboard-master\tools\src\main\java\org\thingsboard\client\tools\migrator\RelatedEntitiesParser.java | 1 |
请完成以下Java代码 | public Optional<UserDashboardDataProvider> getData(@NonNull final UserDashboardKey userDashboardKey)
{
return userDashboardRepository.getUserDashboardId(userDashboardKey)
.map(this::getData);
}
public UserDashboardDataProvider getData(@NonNull final UserDashboardId dashboardId)
{
return providers.getOrLoad... | .dashboardId(dashboardId)
.build();
}
public KPIDataResult getKPIData(@NonNull final KPIId kpiId, @NonNull final KPIDataContext kpiDataContext)
{
return kpiDataProvider.getKPIData(KPIDataRequest.builder()
.kpiId(kpiId)
.timeRangeDefaults(KPITimeRangeDefaults.DEFAULT)
.context(kpiDataContext)
.... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dashboard\UserDashboardDataService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BookstoreService {
private final BookRepositoryFetchModeJoin bookRepositoryFetchModeJoin;
private final BookRepositoryEntityGraph bookRepositoryEntityGraph;
private final BookRepositoryJoinFetch bookRepositoryJoinFetch;
public BookstoreService(BookRepositoryFetchModeJoin bookRepositoryFet... | List<Book> books = bookRepositoryFetchModeJoin.findAll(isPriceGt35()); // N+1
displayBooks(books);
}
public void displayBooksViaEntityGraph() {
List<Book> books = bookRepositoryEntityGraph.findAll(); // LEFT JOIN
displayBooks(books);
}
public void displayBooksB... | repos\Hibernate-SpringBoot-master\HibernateSpringBootFetchJoinAndQueries\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public MetricRegistry getMetricRegistry() {
return metricRegistry;
}
@Override
@Bean
public HealthCheckRegistry getHealthCheckRegistry() {
return healthCheckRegistry;
}
@PostConstruct
public void init() {
log.debug("Registering JVM gauges");
metricRegistry.r... | if (jHipsterProperties.getMetrics().getJmx().isEnabled()) {
log.debug("Initializing Metrics JMX reporting");
JmxReporter jmxReporter = JmxReporter.forRegistry(metricRegistry).build();
jmxReporter.start();
}
if (jHipsterProperties.getMetrics().getLogs().isEnabled()) {
... | repos\tutorials-master\jhipster-modules\jhipster-uaa\gateway\src\main\java\com\baeldung\jhipster\gateway\config\MetricsConfiguration.java | 2 |
请完成以下Java代码 | public void notify(final DelegateTask delegateTask){
if(delegateTask.getExecution() == null) {
LOG.taskNotRelatedToExecution(delegateTask);
} else {
final DelegateExecution execution = delegateTask.getExecution();
Callable<Void> notification = new Callable<Void>() {
public Void call() ... | executionListener.notify(execution);
} else {
LOG.paDoesNotProvideExecutionListener(processApp.getName());
}
} catch (ProcessApplicationUnavailableException e) {
// Process Application unavailable => ignore silently
LOG.cannotInvokeListenerPaUnavailable(processApp.getName(), e);
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\application\impl\event\ProcessApplicationEventListenerDelegate.java | 1 |
请完成以下Java代码 | public class JWTUtil {
private static Logger log = LoggerFactory.getLogger(JWTUtil.class);
private static final long EXPIRE_TIME = SpringContextUtil.getBean(SystemProperties.class).getJwtTimeOut() * 1000;
/**
* 校验 token是否正确
*
* @param token 密钥
* @param secret 用户的密码
* @return 是否正... | DecodedJWT jwt = JWT.decode(token);
return jwt.getClaim("username").asString();
} catch (JWTDecodeException e) {
log.error("error:{}", e.getMessage());
return null;
}
}
/**
* 生成 token
*
* @param username 用户名
* @param secret 用户的密码
* ... | repos\SpringAll-master\62.Spring-Boot-Shiro-JWT\src\main\java\com\example\demo\authentication\JWTUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Runnable getExecuteJobsRunnable(List<String> jobIds, ProcessEngineImpl processEngine) {
return new ExecuteJobsRunnable(jobIds, processEngine);
}
public boolean schedule(Runnable runnable, boolean isLongRunning) {
if(isLongRunning) {
return scheduleLongRunningWork(runnable);
}... | boolean rejected = false;
try {
// wait for 2 seconds for the job to be accepted by the pool.
managedQueueExecutorService.executeBlocking(runnable, 2, TimeUnit.SECONDS);
} catch (InterruptedException e) {
// the acquisition thread is interrupted, this probably means the app serve... | repos\camunda-bpm-platform-master\distro\wildfly26\subsystem\src\main\java\org\camunda\bpm\container\impl\jboss\service\MscExecutorService.java | 2 |
请完成以下Java代码 | public class ToDoItem {
private int userId;
private int id;
private String title;
private boolean completed;
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public int getId() {
return id;
}
pub... | public void setTitle(String title) {
this.title = title;
}
public boolean isCompleted() {
return completed;
}
public void setCompleted(boolean completed) {
this.completed = completed;
}
@Override
public String toString() {
return "ToDoItem{"
+ "us... | repos\tutorials-master\aws-modules\aws-lambda-modules\todo-reminder-lambda\ToDoFunction\src\main\java\com\baeldung\lambda\todo\api\ToDoItem.java | 1 |
请完成以下Java代码 | public void setName(String name) {
this.name = name;
}
public Optional<String> getGenre() {
return Optional.ofNullable(genre);
}
public void setGenre(String genre) {
this.genre = genre;
}
public int getAge() {
return age;
}
public void setAge(int age) ... | public List<Book> getBooks() {
return books;
}
public void setBooks(List<Book> books) {
this.books = books;
}
@Override
public String toString() {
return "Author{" + "id=" + id + ", name=" + name
+ ", genre=" + genre + ", age=" + age + '}';
}
} | repos\Hibernate-SpringBoot-master\HibernateSpringBootOptional\src\main\java\com\bookstore\entity\Author.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isIgnoreUnreadFields() {
return this.ignoreUnreadFields;
}
public void setIgnoreUnreadFields(boolean ignoreUnreadFields) {
this.ignoreUnreadFields = ignoreUnreadFields;
}
public boolean isPersistent() {
return this.persistent;
}
public void setPersistent(boolean persistent) {
this.persis... | public boolean isReadSerialized() {
return this.readSerialized;
}
public void setReadSerialized(boolean readSerialized) {
this.readSerialized = readSerialized;
}
public String getSerializerBeanName() {
return this.serializerBeanName;
}
public void setSerializerBeanName(String serializerBeanName) {
this... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\PdxProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String sleep() throws InterruptedException {
Thread.sleep(100L);
return "sleep";
}
// 测试热点参数限流
@GetMapping("/product_info")
@SentinelResource("demo_product_info_hot")
public String productInfo(Integer id) {
return "商品编号:" + id;
}
// 手动使用 Sentinel 客户端 API
... | }
}
}
// 测试 @SentinelResource 注解
@GetMapping("/annotations_demo")
@SentinelResource(value = "annotations_demo_resource",
blockHandler = "blockHandler",
fallback = "fallback")
public String annotationsDemo(@RequestParam(required = false) Integer id) throws Interrupted... | repos\SpringBoot-Labs-master\lab-46\lab-46-sentinel-demo\src\main\java\cn\iocoder\springboot\lab46\sentineldemo\controller\DemoController.java | 2 |
请完成以下Java代码 | public int getC_CompensationGroup_SchemaLine_ID()
{
return get_ValueAsInt(COLUMNNAME_C_CompensationGroup_SchemaLine_ID);
}
@Override
public void setC_Flatrate_Conditions_ID (final int C_Flatrate_Conditions_ID)
{
if (C_Flatrate_Conditions_ID < 1)
set_Value (COLUMNNAME_C_Flatrate_Conditions_ID, null);
el... | public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
/**
* Type AD_Reference_ID=540836
* Reference name: C_CompensationGroup_SchemaLine_Type
*/
public static final int TYPE_AD_Reference_ID=540836;
/** Revenue = R */
public static final String TYPE_Revenue = "R";
/** Flatrate = F */
publ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\order\model\X_C_CompensationGroup_SchemaLine.java | 1 |
请完成以下Java代码 | public class SuperHero extends Person {
/**
* The public name of a hero that is common knowledge
*/
private String heroName;
private String uniquePower;
private int health;
private int defense;
/**
* <p>This is a simple description of the method. . .
* <a href="http://www.... | public void setUniquePower(String uniquePower) {
this.uniquePower = uniquePower;
}
public int getHealth() {
return health;
}
public void setHealth(int health) {
this.health = health;
}
public int getDefense() {
return defense;
}
public void setDefense(int defense) {
this.defense = defense;
}
} | repos\tutorials-master\core-java-modules\core-java-documentation\src\main\java\com\baeldung\javadoc\SuperHero.java | 1 |
请完成以下Java代码 | public void setPassword (java.lang.String Password)
{
set_Value (COLUMNNAME_Password, Password);
}
/** Get Kennwort.
@return Kennwort */
@Override
public java.lang.String getPassword ()
{
return (java.lang.String)get_Value(COLUMNNAME_Password);
}
/** Set Grund der Anfrage.
@param RequestReason Grun... | /** Set Creditpass-Prüfung wiederholen .
@param RetryAfterDays Creditpass-Prüfung wiederholen */
@Override
public void setRetryAfterDays (java.math.BigDecimal RetryAfterDays)
{
set_Value (COLUMNNAME_RetryAfterDays, RetryAfterDays);
}
/** Get Creditpass-Prüfung wiederholen .
@return Creditpass-Prüfung wie... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.creditscore\creditpass\src\main\java-gen\de\metas\vertical\creditscore\creditpass\model\X_CS_Creditpass_Config.java | 1 |
请完成以下Java代码 | public String getReferenceId() {
return referenceId;
}
public String getReferenceType() {
return referenceType;
}
public String getTenantId() {
return tenantId;
}
public String getTenantIdLike() {
return tenantIdLike;
}
public String getTenantI... | public String getDeploymentId() {
return deploymentId;
}
public List<String> getDeploymentIds() {
return deploymentIds;
}
public Set<String> getCaseInstanceIds() {
return caseInstanceIds;
}
public boolean isNeedsCaseDefinitionOuterJoin() {
if (isNeedsPaging()) ... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\history\HistoricCaseInstanceQueryImpl.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.