instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public void setM_HU_PI_Version(final de.metas.handlingunits.model.I_M_HU_PI_Version M_HU_PI_Version)
{
set_ValueFromPO(COLUMNNAME_M_HU_PI_Version_ID, de.metas.handlingunits.model.I_M_HU_PI_Version.class, M_HU_PI_Version);
}
@Override
public void setM_HU_PI_Version_ID (final int M_HU_PI_Version_ID)
{
if (M_HU_... | public void setM_Product_ID (final int M_Product_ID)
{
throw new IllegalArgumentException ("M_Product_ID is virtual column"); }
@Override
public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setSerialNo (final @Nullable java.lang.String SerialNo)
{
thro... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class LMQRCode implements IHUQRCode
{
@NonNull GlobalQRCode code;
@NonNull BigDecimal weightInKg;
@Nullable LocalDate bestBeforeDate;
@Nullable String lotNumber;
@Nullable String productNo;
public static boolean isHandled(@NonNull final GlobalQRCode globalQRCode)
{
return LMQRCodeParser.isHandled(globa... | @Deprecated
public String toString() {return getAsString();}
@Override
public String getAsString() {return code.getAsString();}
public boolean isWeightRequired() {return true;}
@Override
public Optional<BigDecimal> getWeightInKg() {return Optional.of(weightInKg);}
@Override
public Optional<LocalDate> getBes... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\leich_und_mehl\LMQRCode.java | 2 |
请完成以下Java代码 | public class HttpHeaderSecurityFilter implements Filter {
protected final List<HeaderSecurityProvider> headerSecurityProviders = new ArrayList<HeaderSecurityProvider>() {{
add(new XssProtectionProvider());
add(new ContentSecurityPolicyProvider());
add(new ContentTypeOptionsProvider());
add(new Stric... | for (HeaderSecurityProvider provider : headerSecurityProviders) {
if (!provider.isDisabled()) {
String headerName = provider.getHeaderName();
String headerValue = provider.getHeaderValue(request.getServletContext());
httpResponse.setHeader(headerName, headerValue);
}
... | repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\filter\headersec\HttpHeaderSecurityFilter.java | 1 |
请完成以下Java代码 | public CustomizedRedisCache getMissingCache(String cacheName) {
// 有效时间,初始化获取默认的有效时间
Long expirationSecondTime = getExpirationSecondTime(cacheName);
// 自动刷新时间,默认是0
Long preloadSecondTime = getPreloadSecondTime(cacheName);
logger.info("缓存 cacheName:{},过期时间:{}, 自动刷新时间:{}", cacheN... | *
* @param defaultExpireTime
*/
@Override
public void setDefaultExpiration(long defaultExpireTime) {
super.setDefaultExpiration(defaultExpireTime);
this.defaultExpiration = defaultExpireTime;
}
@Deprecated
@Override
public void setExpires(Map<String, Long> expires) {
... | repos\spring-boot-student-master\spring-boot-student-cache-redis-2\src\main\java\com\xiaolyuh\redis\cache\CustomizedRedisCacheManager.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class Unpick
{
@Nullable String unpickToTargetQRCode;
}
@Nullable
Unpick unpick;
@Value
@Builder
@Jacksonized
public static class DropTo
{
@Nullable ScannedCode qrCode;
}
@Nullable DropTo dropTo;
@Builder
@Jacksonized
private JsonDistributionEvent(
@NonNull final String wfProcessI... | }
this.wfProcessId = wfProcessId;
this.wfActivityId = wfActivityId;
this.lineId = lineId;
this.distributionStepId = distributionStepId;
//
this.pickFrom = pickFrom;
this.dropTo = dropTo;
this.unpick = unpick;
}
@NonNull
@JsonIgnore
public DropTo getDropToNonNull()
{
return Check.assumeNotNull(d... | repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\rest_api\json\JsonDistributionEvent.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Date getCreateTime() {
return job.getCreateTime();
}
@Override
public String getId() {
return job.getId();
}
@Override
public int getRetries() {
return job.getRetries();
}
@Override
public String getExceptionMessage() {
return job.getExceptio... | }
@Override
public String getCustomValues() {
return job.getCustomValues();
}
@Override
public String getLockOwner() {
return job.getLockOwner();
}
@Override
public Date getLockExpirationTime() {
return job.getLockExpirationTime();
}
@Override
... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\AcquiredExternalWorkerJobImpl.java | 2 |
请完成以下Java代码 | public class Book {
@PrimaryKeyColumn(name = "id", ordinal = 0, type = PrimaryKeyType.CLUSTERED, ordering = Ordering.DESCENDING)
private UUID id;
@PrimaryKeyColumn(name = "title", ordinal = 1, type = PrimaryKeyType.PARTITIONED)
private String title;
@PrimaryKeyColumn(name = "publisher", ordinal =... | return title;
}
public String getPublisher() {
return publisher;
}
public Set getTags() {
return tags;
}
public void setId(final UUID id) {
this.id = id;
}
public void setTitle(final String title) {
this.title = title;
}
public void setPublish... | repos\tutorials-master\persistence-modules\spring-data-cassandra\src\main\java\com\baeldung\spring\data\cassandra\model\Book.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public PaymentDocumentType getType()
{
return PaymentDocumentType.RegularPayment;
}
@Override
public final String getDocumentNo()
{
if (!Check.isEmpty(documentNo, true))
{
return documentNo;
}
final TableRecordReference reference = getReference();
if (reference != null)
{
return "<" + referen... | return dateTrx;
}
@Override
public boolean isFullyAllocated()
{
return getAmountToAllocate().signum() == 0;
}
private Money getOpenAmtRemaining()
{
final Money totalAllocated = allocatedAmt;
return openAmtInitial.subtract(totalAllocated);
}
@Override
public Money calculateProjectedOverUnderAmt(@NonNu... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\metas\banking\payment\paymentallocation\service\PaymentDocument.java | 2 |
请完成以下Java代码 | public Class<? extends BaseElement> getHandledType() {
return ThrowEvent.class;
}
@Override
protected void executeParse(BpmnParse bpmnParse, ThrowEvent intermediateEvent) {
ActivityImpl nestedActivityImpl = createActivityOnCurrentScope(bpmnParse, intermediateEvent, BpmnXMLConstants.ELEMENT... | // if (StringUtils.isNotEmpty(eventDefinition.getActivityRef())) {
// if (scopeElement.findActivity(eventDefinition.getActivityRef()) == null) {
// bpmnParse.getBpmnModel().addProblem("Invalid attribute value for 'activityRef': no activity with id '" + eventDefinition.getActivityRef() +
// "' in current sco... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\handler\IntermediateThrowEventParseHandler.java | 1 |
请完成以下Java代码 | public Timestamp getDateNextRun(boolean requery)
{
if (requery)
{
InterfaceWrapperHelper.refresh(impProcessor);
}
return impProcessor.getDateNextRun();
}
@Override
public void setDateNextRun(Timestamp dateNextWork)
{
impProcessor.setDateNextRun(dateNextWork);
}
@Override
public Timestamp getDateL... | }
@Override
public boolean saveOutOfTrx()
{
InterfaceWrapperHelper.save(impProcessor, ITrx.TRXNAME_None);
return true;
}
@Override
public AdempiereProcessorLog[] getLogs()
{
final List<AdempiereProcessorLog> list = Services.get(IIMPProcessorDAO.class).retrieveAdempiereProcessorLogs(impProcessor);
retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\server\rpl\api\impl\IMPProcessorAdempiereProcessorAdapter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class InventoryValuationService
{
private static final String SQL_SELECT = "SELECT * FROM de_metas_acct.report_InventoryValue("
+ " p_DateAcct => ?,"
+ " p_M_Product_ID => ?,"
+ " p_M_Warehouse_ID => ?,"
+ " p_AD_Language => ?"
+ ")";
public InventoryValuationResponse report(final InventoryValu... | .accounted(retrieveAmounts(rs, "Acct"))
.costing(retrieveAmounts(rs, "Costing"))
.inventoryValueAcctAmt(retrieveBigDecimalOrZero(rs, "InventoryValueAcctAmt"))
.build();
}
private static InventoryValue.Amounts retrieveAmounts(@NonNull final ResultSet rs, @NonNull final String prefix) throws SQLException
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\inventory\InventoryValuationService.java | 2 |
请完成以下Java代码 | private boolean detachAndDropPartition(String table, long partitionTs) {
Map<Long, SqlPartition> cachedPartitions = tablesPartitions.get(table);
if (cachedPartitions != null) cachedPartitions.remove(partitionTs);
String tablePartition = table + "_" + partitionTs;
String detachPsqlStmtSt... | }
}
return partitions;
}
public long calculatePartitionStartTime(long ts, long partitionDuration) {
return ts - (ts % partitionDuration);
}
private synchronized int getCurrentServerVersion() {
if (currentServerVersion == null) {
try {
current... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sqlts\insert\sql\SqlPartitioningRepository.java | 1 |
请完成以下Java代码 | public void addMissingAcctRecords()
{
// NOTE: a step forward would be to use POAccountingInfo and do something similar to PO.insert_Accounting
DB.executeFunctionCallEx(ITrx.TRXNAME_None, "select createM_Product_Category_Acct()", null);
Loggables.addLog("Added missing M_Product_Category_Acct records");
}
@Val... | public ProductCategoryAccountsCollection(final List<ProductCategoryAccounts> list)
{
this.map = Maps.uniqueIndex(
list,
productCategoryAcct -> ProductCategoryIdAndAcctSchemaId.of(productCategoryAcct.getProductCategoryId(), productCategoryAcct.getAcctSchemaId()));
}
public Optional<ProductCategoryAcc... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\accounts\ProductCategoryAccountsRepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ProductService {
private final Set<Product> products = new HashSet<>();
{
products.add(new Product("Book", 23.90, 1));
products.add(new Product("Pen", 44.34, 2));
}
public Product findById(int id) {
return products.stream()
.filter(obj -> obj.getId() =... | }
public Product save(Product product) {
if (!StringUtils.hasLength(product.getName()) || product.getPrice() == 0.0) {
throw new IllegalArgumentException();
}
int newId = products.stream()
.mapToInt(Product::getId)
.max()
.getAsInt() + 1;
... | repos\tutorials-master\spring-boot-modules\spring-boot-mvc-2\src\main\java\com\baeldung\springbootmvc\svc\ProductService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Article {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String title;
private String body;
private String author;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String g... | this.title = title;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
} | repos\tutorials-master\persistence-modules\spring-boot-persistence-5\src\main\java\com\baeldung\db2database\entity\Article.java | 2 |
请完成以下Java代码 | public void setIncludeSubDomains(boolean includeSubDomains) {
this.subdomain = includeSubDomains ? " ; includeSubDomains" : "";
updateDelegate();
}
/**
* <p>
* Sets if preload should be included. Default is false
* </p>
*
* <p>
* See <a href="https://hstspreload.org/">Website hstspreload.org</a> for ... | updateDelegate();
}
private void updateDelegate() {
Builder builder = StaticServerHttpHeadersWriter.builder();
builder.header(STRICT_TRANSPORT_SECURITY, this.maxAge + this.subdomain + this.preload);
this.delegate = builder.build();
}
private boolean isSecure(ServerWebExchange exchange) {
String scheme = e... | repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\header\StrictTransportSecurityServerHttpHeadersWriter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private TreeSet<TransactionDetail> extractAllTransactionDetails(
@NonNull final Candidate candidate,
@NonNull final TransactionDetail changedTransactionDetail)
{
final ImmutableList<TransactionDetail> otherTransactionDetails = candidate.getTransactionDetails()
.stream()
.filter(transactionDetail -> tra... | if (quantity.signum() <= 0)
{
final CandidateType type = transactionCreatedEvent.getInventoryLineId() > 0 ? CandidateType.INVENTORY_DOWN : CandidateType.UNEXPECTED_DECREASE;
return builder.type(type)
.materialDescriptor(transactionCreatedEvent.getMaterialDescriptor().withQuantity(quantity.negate()))
.... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\TransactionEventHandler.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String buildPermissionTree(String roleIds) throws PermissionException {
List treeData = null;
try {
treeData = pmsMenuService.listByRoleIds(roleIds);
if (StringUtil.isEmpty(treeData)) {
LOG.error("用户没有分配菜单权限");
throw new PermissionException(PermissionException.PERMISSION_USER_NOT_MENU, "该用户没有分配... | if ("1".equals(level)) {
treeBuf.append("</div>");
}
}
}
/**
* 根据(pId)获取(menuList)中的所有子菜单集合.
*
* @param pId
* 父菜单ID.
* @param menuList
* 菜单集合.
* @return sonMenuList.
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
private List<Map> getSonMenuListByPid(String pId, L... | repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\controller\login\LoginController.java | 2 |
请完成以下Java代码 | public String[] getWhereClauses(final List<Object> params)
{
return new String[0];
}
@Override
public String getText()
{
return null;
}
@Override
public void save(final Properties ctx, final int windowNo, final IInfoWindowGridRowBuilders builders)
{
for (final Map.Entry<Integer, Integer> e : recordId2a... | editor.putClientProperty(IVPAttributeContext.ATTR_NAME, attributeContext);
// nothing
}
@Override
public String getProductCombinations()
{
// nothing to do
return null;
}
@Override
public String toString()
{
return ObjectUtils.toString(this);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\InfoProductASIController.java | 1 |
请完成以下Java代码 | public String getHelp ()
{
return (String)get_Value(COLUMNNAME_Help);
}
/** Set Import Processor Type.
@param IMP_Processor_Type_ID Import Processor Type */
public void setIMP_Processor_Type_ID (int IMP_Processor_Type_ID)
{
if (IMP_Processor_Type_ID < 1)
set_ValueNoCheck (COLUMNNAME_IMP_Processor_Typ... | return (String)get_Value(COLUMNNAME_JavaClass);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (Stri... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_IMP_Processor_Type.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CassandraBufferedRateReadExecutor extends AbstractBufferedRateExecutor<CassandraStatementTask, TbResultSetFuture, TbResultSet> {
public CassandraBufferedRateReadExecutor(
@Value("${cassandra.query.buffer_size}") int queueLimit,
@Value("${cassandra.query.concurrent_limit}") int ... | super.stop();
}
@Override
protected SettableFuture<TbResultSet> create() {
return SettableFuture.create();
}
@Override
protected TbResultSetFuture wrap(CassandraStatementTask task, SettableFuture<TbResultSet> future) {
return new TbResultSetFuture(future);
}
@Override
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\nosql\CassandraBufferedRateReadExecutor.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class CustomersInterfaceImpl implements CustomersInterface {
Logger logger= LoggerFactory.getLogger(this.getClass());
@Autowired
private CustomerRepository customerRepository;
@Override
public List<Customer> searchCity(Integer pageNumber, Integer pageSize, String searchContent) {
/* /... | ScoreFunctionBuilders.weightFactorFunction(100));
// 创建搜索 DSL 查询
SearchQuery searchQuery = new NativeSearchQueryBuilder()
.withPageable(pageable)
.withQuery(functionScoreQueryBuilder).build();
logger.info("\n searchCity(): searchContent [" + searchContent + "] \n... | repos\spring-boot-leaning-master\2.x_42_courses\第 4-8 课:Spring Boot 集成 ElasticSearch\spring-boot-elasticsearch\src\main\java\com\neo\service\impl\CustomersInterfaceImpl.java | 2 |
请完成以下Java代码 | public String getServerID()
{
return "WorkflowProcessor" + get_ID();
} // getServerID
/**
* Get Date Next Run
*
* @param requery requery
* @return date next run
*/
@Override
public Timestamp getDateNextRun(boolean requery)
{
if (requery)
load(get_TrxName());
return getDateNextRun();
} // getD... | MWorkflowProcessorLog[] retValue = new MWorkflowProcessorLog[list.size()];
list.toArray(retValue);
return retValue;
} // getLogs
/**
* Delete old Request Log
*
* @return number of records
*/
public int deleteLog()
{
if (getKeepLogDays() < 1)
return 0;
String sql = "DELETE FROM AD_WorkflowProcess... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\wf\MWorkflowProcessor.java | 1 |
请完成以下Java代码 | public void onR_StandardResponse_ID(final I_R_Request request, final ICalloutField calloutField)
{
final I_R_StandardResponse standardResponse = request.getR_StandardResponse();
if (standardResponse == null)
{
return;
}
String txt = standardResponse.getResponseText();
txt = Env.parseContext(calloutFiel... | final int R_RequestType_ID = request.getR_RequestType_ID();
if (R_RequestType_ID <= 0)
{
return;
}
final Properties ctx = InterfaceWrapperHelper.getCtx(request);
final MRequestType requestType = MRequestType.get(ctx, R_RequestType_ID);
final int R_Status_ID = requestType.getDefaultR_Status_ID();
if (R... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\request\callout\R_Request.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public List<PredicateProperties> getPredicates() {
return predicates;
}
public void setPredicates(List<PredicateProperties> predicates) {
this.predicates = predicates;
}
public List<FilterProperties> getFil... | public void setMetadata(Map<String, Object> metadata) {
this.metadata = metadata;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RouteProperties that = (RouteProperties) o;
return this.order == that.ord... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\config\RouteProperties.java | 2 |
请完成以下Java代码 | public boolean isMember(Long OrganizationId) {
final User user = ((MyUserPrincipal) this.getPrincipal()).getUser();
return user.getOrganization().getId().longValue() == OrganizationId.longValue();
}
@Override
public Object getFilterObject() {
return this.filterObject;
}
@Ov... | @Override
public Object getThis() {
return this;
}
@Override
public void setFilterObject(Object obj) {
this.filterObject = obj;
}
@Override
public void setReturnObject(Object obj) {
this.returnObject = obj;
}
} | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\custom\security\CustomMethodSecurityExpressionRoot.java | 1 |
请完成以下Java代码 | protected String doIt()
{
log.info("From PP_Product_BOM_ID=" + fromProductBOMId + " to " + toProductBOMId);
if (toProductBOMId == 0)
{
throw new AdempiereException("Target PP_Product_BOM_ID == 0");
}
if (fromProductBOMId == 0)
{
throw new AdempiereException("Source PP_Product_BOM_ID == 0");
}
if ... | final I_PP_Product_BOM toBOM = productBOMsRepo.getById(toProductBOMId);
if (!productBOMsRepo.retrieveLines(toBOM).isEmpty())
{
throw new AdempiereException("@Error@ Existing BOM Line(s)");
}
for (final I_PP_Product_BOMLine fromBOMLine : productBOMsRepo.retrieveLines(fromBom))
{
final I_PP_Product_BOMLi... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\process\CopyFromBOM.java | 1 |
请完成以下Java代码 | public class C_Dunning_Candidate_MassWriteOff extends JavaProcess
{
final public static String MSG_DODISMISSAL = "StartMassDismissal";
@Override
protected void prepare()
{
// Nothing to do.
}
@Override
protected String doIt()
{ | final boolean doWriteOff = Services.get(IClientUI.class).ask(0, MSG_DODISMISSAL);
if (!doWriteOff)
{
return "Canceled";
}
final Properties ctx = getCtx();
final String writeOffDescription = getProcessInfo().getTitle() + " #" + getPinstanceId().getRepoId();
final int writeOffCount = Services.get(IInvoic... | repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java\de\metas\dunning\writeoff\invoice\process\C_Dunning_Candidate_MassWriteOff.java | 1 |
请完成以下Java代码 | public int getAD_DocType_BoilerPlate_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_DocType_BoilerPlate_ID);
}
@Override
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);
}
@... | {
return get_ValueAsInt(COLUMNNAME_C_DocType_ID);
}
@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_AD_DocType_BoilerPlate.java | 1 |
请完成以下Spring Boot application配置 | mybatis.config-location=classpath:mybatis/mybatis-config.xml
mybatis.mapper-locations=classpath:mybatis/mapper/*.xml
mybatis.type-aliases-package=com.neo.model
spring.datasource.url=jdbc:mysql://localhost:3306/test?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&useSSL=true
spring.datasource.usernam | e=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
logging.level.com.neo.mapper=debug | repos\spring-boot-leaning-master\2.x_42_courses\第 3-2 课: 如何优雅的使用 MyBatis XML 配置版\spring-boot-mybatis-xml\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public I_M_Product getM_Product()
{
return product;
}
@Override
public BigDecimal getQty()
{
return qty;
}
@Override
public I_C_UOM getC_UOM()
{
return uom;
}
@Override
public ProductionMaterialType getType()
{
return type;
}
@Override
public void setQM_QtyDeliveredPercOfRaw(final BigDecimal... | public void setQM_QtyDeliveredAvg(final BigDecimal qtyDeliveredAvg)
{
Check.assumeNotNull(qtyDeliveredAvg, "qtyDeliveredAvg not null");
this.qtyDeliveredAvg = qtyDeliveredAvg;
}
@Override
public BigDecimal getQM_QtyDeliveredAvg()
{
return qtyDeliveredAvg;
}
@Override
public String getVariantGroup()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\PlainProductionMaterial.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isIgnoreWarnings() {
return this.ignoreWarnings;
}
public void setIgnoreWarnings(boolean ignoreWarnings) {
this.ignoreWarnings = ignoreWarnings;
}
public int getFetchSize() {
return this.fetchSize;
}
public void setFetchSize(int fetchSize) {
this.fetchSize = fetchSize;
}
p... | this.queryTimeout = queryTimeout;
}
public boolean isSkipResultsProcessing() {
return this.skipResultsProcessing;
}
public void setSkipResultsProcessing(boolean skipResultsProcessing) {
this.skipResultsProcessing = skipResultsProcessing;
}
public boolean isSkipUndeclaredResults() {
return this.s... | repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\autoconfigure\JdbcProperties.java | 2 |
请完成以下Spring Boot application配置 | spring.datasource.url=jdbc:postgresql://localhost:5432/sample-baeldung-db
spring.datasource.username=postgres
spring.datasource.password=root
spring.datasource.driver-class-name=org.postgresq | l.Driver
spring.datasource.hikari.data-source-properties.reWriteBatchedInserts=true | repos\tutorials-master\persistence-modules\spring-jdbc\src\main\resources\com\baeldung\spring\jdbc\batch\application.properties | 2 |
请完成以下Java代码 | protected String[] nextWords(int n, String msg)
{
System.out.println(msg + " ('q' to break): ");
String[] words = new String[n];
for (int i = 0; i < n; i++)
{
String word = nextWord();
if (word == null) return null;
words[i] = word;
}
... | if (dist > bestd[j])
{
for (int k = N - 1; k > j; k--)
{
bestd[k] = bestd[k - 1];
bestw[k] = bestw[k - 1];
}
bestd[j] = ... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\AbstractClosestVectors.java | 1 |
请完成以下Java代码 | public CorrelationKey newInstance(ModelTypeInstanceContext instanceContext) {
return new CorrelationKeyImpl(instanceContext);
}
});
nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME)
.build();
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
correlatio... | public CorrelationKeyImpl(ModelTypeInstanceContext instanceContext) {
super(instanceContext);
}
public String getName() {
return nameAttribute.getValue(this);
}
public void setName(String name) {
nameAttribute.setValue(this, name);
}
public Collection<CorrelationProperty> getCorrelationProper... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\CorrelationKeyImpl.java | 1 |
请完成以下Java代码 | private int computeToRealValueMultiplier()
{
int multiplier = 1;
// Adjust by SOTrx if needed
if (!isAPAdjusted)
{
final int multiplierAP = soTrx.isPurchase() ? -1 : +1;
multiplier *= multiplierAP;
}
// Adjust by Credit Memo if needed
if (!isCreditMemoAdjusted)
{
final int multiplierCM = isC... | // Do we have to adjust by Credit Memo?
if (isCreditMemoAdjusted)
{
final int multiplierCM = isCreditMemo ? -1 : +1;
multiplier *= multiplierCM;
}
return multiplier;
}
/**
* @return {@code true} for purchase-invoice and sales-creditmemo. {@code false} otherwise.
*/
public boolean isOutgoingMoney()... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\InvoiceAmtMultiplier.java | 1 |
请完成以下Java代码 | public static class ExistingWebApplicationScopes {
private static final Set<String> SCOPES;
static {
Set<String> scopes = new LinkedHashSet<>();
scopes.add(WebApplicationContext.SCOPE_REQUEST);
scopes.add(WebApplicationContext.SCOPE_SESSION);
SCOPES = Collections.unmodifiableSet(scopes);
}
privat... | if (scope != null) {
this.scopes.put(scopeName, scope);
}
}
}
public void restore() {
this.scopes.forEach((key, value) -> {
if (logger.isInfoEnabled()) {
logger.info("Restoring user defined scope " + key);
}
this.beanFactory.registerScope(key, value);
});
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\servlet\context\ServletWebServerApplicationContext.java | 1 |
请完成以下Java代码 | public int getM_Product_ID()
{
return rs.getM_Product_ID();
}
@Override
public I_M_AttributeSetInstance getM_AttributeSetInstance()
{
return Services.get(IReceiptScheduleBL.class).getM_AttributeSetInstance_Effective(rs);
}
@Override
public int getM_AttributeSetInstance_ID()
{
return Services.get(IRecei... | @Override
public void setM_AttributeSetInstance(@Nullable final I_M_AttributeSetInstance asi)
{
AttributeSetInstanceId asiId = asi == null
? AttributeSetInstanceId.NONE
: AttributeSetInstanceId.ofRepoIdOrNone(asi.getM_AttributeSetInstance_ID());
receiptScheduleBL.setM_AttributeSetInstance_Effective(rs, as... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\ReceiptScheduleASIAware.java | 1 |
请完成以下Java代码 | public final class KotlinFunctionDeclaration implements Annotatable {
private final AnnotationContainer annotations = new AnnotationContainer();
private final String name;
private final String returnType;
private final List<KotlinModifier> modifiers;
private final List<Parameter> parameters;
private final C... | private List<Parameter> parameters = new ArrayList<>();
private List<KotlinModifier> modifiers = new ArrayList<>();
private String returnType;
private Builder(String name) {
this.name = name;
}
/**
* Sets the modifiers.
* @param modifiers the modifiers
* @return this for method chaining
*/
... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\kotlin\KotlinFunctionDeclaration.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static String toString(@NonNull final Document document) throws TransformerException
{
final TransformerFactory transformerFactory = TransformerFactory.newInstance();
final Transformer transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, XML_PRO... | final Element element = node instanceof Document
? ((Document)node).getDocumentElement()
: (Element)node;
final NodeList nodeList = element.getElementsByTagName(tagName);
if (nodeList.getLength() == 0)
{
return null;
}
final Node childNode = nodeList.item(0);
return (Element)childNode;
}
@... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-leichundmehl\src\main\java\de\metas\camel\externalsystems\leichundmehl\to_leichundmehl\util\XMLUtil.java | 2 |
请完成以下Java代码 | final class LdapEncoder {
private static final String[] FILTER_ESCAPE_TABLE = new String['\\' + 1];
static {
// fill with char itself
for (char c = 0; c < FILTER_ESCAPE_TABLE.length; c++) {
FILTER_ESCAPE_TABLE[c] = String.valueOf(c);
}
// escapes (RFC2254)
FILTER_ESCAPE_TABLE['*'] = "\\2a";
FILTER_ES... | /**
* Escape a value for use in a filter.
* @param value the value to escape.
* @return a properly escaped representation of the supplied value.
*/
static String filterEncode(String value) {
if (value == null) {
return null;
}
StringBuilder encodedValue = new StringBuilder(value.length() * 2);
int l... | repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\LdapEncoder.java | 1 |
请完成以下Java代码 | public HUMoveToDirectWarehouseService setHUView(final HUEditorView huView)
{
this.huView = huView;
return this;
}
private void notifyHUMoved(final I_M_HU hu)
{
final HuId huId = HuId.ofRepoId(hu.getM_HU_ID());
//
// Invalidate all documents which are about this HU.
if (documentsCollection != null)
{... | // if (huView != null) { huView.removeHUIds(ImmutableSet.of(huId)); }
}
/**
* @return target warehouse where the HUs will be moved to.
*/
@NonNull
private LocatorId getTargetLocatorId()
{
if (_targetLocatorId == null)
{
_targetLocatorId = huMovementBL.getDirectMoveLocatorId();
}
return _targetLocat... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\HUMoveToDirectWarehouseService.java | 1 |
请完成以下Java代码 | public void addGridTabRowBuilder(final IGridTabRowBuilder builder)
{
if (builder == null)
{
return;
}
if (builders.contains(builder))
{
return;
}
builders.add(builder);
}
@Override
public void apply(final Object model)
{
for (final IGridTabRowBuilder builder : builders)
{
if (!builder.... | }
if (!builder.isCreateNewRecord())
{
createNewRecord = false;
}
}
return createNewRecord;
}
/**
* @return true if at least one builder is valid
*/
@Override
public boolean isValid()
{
for (final IGridTabRowBuilder builder : builders)
{
if (builder.isValid())
{
return true;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\apps\search\impl\CompositeGridTabRowBuilder.java | 1 |
请完成以下Java代码 | public void processDestinationTopicProperties(Consumer<DestinationTopic.Properties> destinationPropertiesProcessor,
Context context) {
context
.properties
.forEach(destinationPropertiesProcessor);
}
@Override
public void registerDestinationTopic(String mainTopicName, @Nullable String destinati... | context
.destinationsByTopicMap
.values()
.forEach(topicDestinations -> this.destinationTopicResolver.addDestinationTopics(
context.listenerId, topicDestinations));
topicsCallback.accept(getAllTopicsNamesForThis(context));
}
private List<String> getAllTopicsNamesForThis(Context context) {
retur... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\DefaultDestinationTopicProcessor.java | 1 |
请完成以下Java代码 | public String getFrontendURL()
{
final String url = StringUtils.trimBlankToNull(sysConfigBL.getValue(SYSCONFIG_FRONTEND_URL));
if (url == null || "-".equals(url))
{
logger.warn("{} is not configured. Features like CORS, document links in emails etc will not work", SYSCONFIG_FRONTEND_URL);
return null;
}
... | @Nullable
public String getViewUrl(@NonNull final String windowId, @NonNull final String viewId)
{
return getFrontendURL(SYSCONFIG_VIEW_PATH, ImmutableMap.<String, Object>builder()
.put(PARAM_windowId, windowId)
.put(PARAM_viewId, viewId)
.build());
}
@Nullable
public String getResetPasswordUrl(fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\ui\web\WebuiURLs.java | 1 |
请完成以下Java代码 | public class IntermediateCatchConditionalEventActivityBehavior extends IntermediateCatchEventActivityBehavior {
private static final long serialVersionUID = 1L;
protected ConditionalEventDefinition conditionalEventDefinition;
protected String conditionExpression;
protected String conditionLanguage;
... | Expression expression = processEngineConfiguration.getExpressionManager().createExpression(conditionExpression);
Object result = expression.getValue(execution);
if (result instanceof Boolean && (Boolean) result) {
ExecutionEntity executionEntity = (ExecutionEntity) execution;
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\behavior\IntermediateCatchConditionalEventActivityBehavior.java | 1 |
请完成以下Java代码 | public NamePair get (final IValidationContext evalCtx, Object key)
{
// linear search in m_data
final int size = getSize();
for (int i = 0; i < size; i++)
{
Object oo = getElementAt(i);
if (oo != null && oo instanceof NamePair)
{
NamePair pp = (NamePair)oo;
if (pp.getID().equals(key))
re... | @Override
public String getTableName()
{
if (Check.isEmpty(m_keyColumn, true))
{
return null;
}
return MQuery.getZoomTableName(m_keyColumn);
}
/**
* Get underlying fully qualified Table.Column Name
* @return column name
*/
@Override
public String getColumnName()
{
return m_keyColumn;
} /... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\XLookup.java | 1 |
请完成以下Java代码 | private JsonHUProduct toJsonProduct(@NonNull final ProductId productId)
{
final I_M_Product product = productBL.getById(productId);
final I_C_UOM uom = productBL.getStockUOM(product);
return JsonHUProduct.builder()
.productValue(product.getValue())
.productName(product.getName())
.qty("0")
.uom(... | final String adLanguage = Env.getADLanguageOrBaseLanguage();
final AttributeCode attributeCode = huQRCodeAttribute.getCode();
return JsonHUAttribute.builder()
.code(attributeCode.getCode())
.caption(attributeDAO.getAttributeByCode(attributeCode).getDisplayName().translate(adLanguage))
.value(huQRCodeAtt... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.mobileui\src\main\java\de\metas\handlingunits\rest_api\HandlingUnitsRestController.java | 1 |
请完成以下Java代码 | public String getReferenceId() {
return referenceId;
}
@Override
public String getReferenceType() {
return referenceType;
}
@Override
public boolean isCompletable() {
return completable;
}
@Override
public String getEntryCriterionId() {
return entry... | @Override
public Object getVariable(String variableName) {
return variables.get(variableName);
}
@Override
public String getTenantId() {
return tenantId;
}
@Override
public Set<String> getVariableNames() {
return variables.keySet();
}
@Override
public M... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\delegate\ReadOnlyDelegatePlanItemInstanceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public UserVO exception01() {
throw new NullPointerException("没有粗面鱼丸");
}
/**
* 测试抛出 ServiceException 异常
*/
@GetMapping("/exception-02")
public UserVO exception02() {
throw new ServiceException(ServiceExceptionEnum.USER_NOT_FOUND);
}
// @PostMapping(value = "/add",
// ... | // // ↓ 增加 "application/xml"、"application/json" ,针对 Accept 请求头
// produces = {MediaType.APPLICATION_XML_VALUE, MediaType.APPLICATION_JSON_VALUE}
// )
@PostMapping(value = "/add",
// ↓ 增加 "application/xml"、"application/json" ,针对 Content-Type 请求头
consumes = {MediaType... | repos\SpringBoot-Labs-master\lab-27\lab-27-webflux-02\src\main\java\cn\iocoder\springboot\lab27\springwebflux\controller\UserController.java | 2 |
请完成以下Java代码 | public static StatusInfo ofUnknown() {
return valueOf(STATUS_UNKNOWN, null);
}
public static StatusInfo ofUp() {
return ofUp(null);
}
public static StatusInfo ofDown() {
return ofDown(null);
}
public static StatusInfo ofOffline() {
return ofOffline(null);
}
public static StatusInfo ofUp(@Nullable Ma... | public static Comparator<String> severity() {
return Comparator.comparingInt(STATUS_ORDER::indexOf);
}
@SuppressWarnings("unchecked")
public static StatusInfo from(Map<String, ?> body) {
Map<String, ?> details = Collections.emptyMap();
/*
* Key "details" is present when accessing Spring Boot Actuator Heal... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\domain\values\StatusInfo.java | 1 |
请完成以下Java代码 | public void setJwtAssertionResolver(Function<OAuth2AuthorizationContext, Jwt> jwtAssertionResolver) {
Assert.notNull(jwtAssertionResolver, "jwtAssertionResolver cannot be null");
this.jwtAssertionResolver = jwtAssertionResolver;
}
/**
* Sets the maximum acceptable clock skew, which is used when checking the
... | Assert.isTrue(clockSkew.getSeconds() >= 0, "clockSkew must be >= 0");
this.clockSkew = clockSkew;
}
/**
* Sets the {@link Clock} used in {@link Instant#now(Clock)} when checking the access
* token expiry.
* @param clock the clock
*/
public void setClock(Clock clock) {
Assert.notNull(clock, "clock cannot... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\JwtBearerOAuth2AuthorizedClientProvider.java | 1 |
请完成以下Java代码 | public boolean inPeriod (Timestamp date)
{
if (date == null)
return false;
if (date.before(m_StartDate))
return false;
if (date.after(m_EndDate))
return false;
return true;
} // inPeriod
/**
* Get Name
* @return name
*/
public String getName()
{
return m_Name;
}
/**
* Get C_Period_I... | public Timestamp getStartDate()
{
return m_StartDate;
}
/**
* Get Year Start Date
* @return year start date
*/
public Timestamp getYearStartDate()
{
return m_YearStartDate;
}
/**
* Get natural balance dateacct filter
* @param alias table name or alias name
* @return is balance sheet a/c and <= ... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-legacy\org\compiere\report\FinReportPeriod.java | 1 |
请完成以下Java代码 | public byte[] getModulus() {
return modulus;
}
/**
* Sets the value of the modulus property.
*
* @param value
* allowed object is
* byte[]
*/
public void setModulus(byte[] value) {
this.modulus = value;
}
/**
* Gets the value of the expon... | * byte[]
*/
public byte[] getExponent() {
return exponent;
}
/**
* Sets the value of the exponent property.
*
* @param value
* allowed object is
* byte[]
*/
public void setExponent(byte[] value) {
this.exponent = value;
}
} | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\RSAKeyValueType.java | 1 |
请完成以下Java代码 | public void migrateState() {
// update activity reference
String activityId = targetScope.getId();
jobEntity.setActivityId(activityId);
migrateJobHandlerConfiguration();
if (targetJobDefinitionEntity != null) {
jobEntity.setJobDefinition(targetJobDefinitionEntity);
}
// update proces... | }
}
public void remove() {
jobEntity.delete();
}
public boolean migrates() {
return targetScope != null;
}
public ScopeImpl getTargetScope() {
return targetScope;
}
public JobDefinitionEntity getTargetJobDefinitionEntity() {
return targetJobDefinitionEntity;
}
protected abstract... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingJobInstance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public JsonScannedBarcodeSuggestions getScannedBarcodeSuggestions(
@PathVariable("wfProcessId") final String wfProcessIdStr,
@PathVariable("wfActivityId") final String wfActivityIdStr)
{
final WFProcessId wfProcessId = WFProcessId.ofString(wfProcessIdStr);
assertAccess(wfProcessId.getApplicationId());
fin... | .forEach(errorManager::insertRemoteIssue);
}
private static InsertRemoteIssueRequest toInsertRemoteIssueRequest(final JsonErrorItem jsonErrorItem)
{
return InsertRemoteIssueRequest.builder()
.issueCategory(jsonErrorItem.getIssueCategory())
.issueSummary(StringUtils.trimBlankToOptional(jsonErrorItem.getMes... | repos\metasfresh-new_dawn_uat\backend\de.metas.workflow.rest-api\src\main\java\de\metas\workflow\rest_api\controller\v2\WorkflowRestController.java | 2 |
请完成以下Java代码 | public class X_ExternalSystem_Config_Shopware6_UOM extends org.compiere.model.PO implements I_ExternalSystem_Config_Shopware6_UOM, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = 1127010332L;
/** Standard Constructor */
public X_ExternalSystem_Config_Shopware6_UOM (final Prope... | public void setExternalSystem_Config_Shopware6_ID (final int ExternalSystem_Config_Shopware6_ID)
{
if (ExternalSystem_Config_Shopware6_ID < 1)
set_Value (COLUMNNAME_ExternalSystem_Config_Shopware6_ID, null);
else
set_Value (COLUMNNAME_ExternalSystem_Config_Shopware6_ID, ExternalSystem_Config_Shopware6_ID);... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config_Shopware6_UOM.java | 1 |
请完成以下Java代码 | public void setPayPal_ClientId (final java.lang.String PayPal_ClientId)
{
set_Value (COLUMNNAME_PayPal_ClientId, PayPal_ClientId);
}
@Override
public java.lang.String getPayPal_ClientId()
{
return get_ValueAsString(COLUMNNAME_PayPal_ClientId);
}
@Override
public void setPayPal_ClientSecret (final java.la... | }
@Override
public void setPayPal_PaymentApprovedCallbackUrl (final @Nullable java.lang.String PayPal_PaymentApprovedCallbackUrl)
{
set_Value (COLUMNNAME_PayPal_PaymentApprovedCallbackUrl, PayPal_PaymentApprovedCallbackUrl);
}
@Override
public java.lang.String getPayPal_PaymentApprovedCallbackUrl()
{
retu... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java-gen\de\metas\payment\paypal\model\X_PayPal_Config.java | 1 |
请完成以下Java代码 | public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public Long getCreationTime() {
return this.creationTime;
}
public void setCreationTime(Long creationTime) {
this.creationTime = creationTime;
}
public... | }
public void setMode(GameMode mode) {
this.mode = mode;
}
public int getMaxPlayers() {
return this.maxPlayers;
}
public void setMaxPlayers(int maxPlayers) {
this.maxPlayers = maxPlayers;
}
public List<PlayerDTO> getPlayers() {
return this.players;
}
... | repos\tutorials-master\libraries-data\src\main\java\com\baeldung\modelmapper\dto\GameDTO.java | 1 |
请完成以下Java代码 | public static List<String> toSentenceList(String content)
{
return toSentenceList(content.toCharArray(), true);
}
/**
* 文本分句
*
* @param content 文本
* @param shortest 是否切割为最细的单位(将逗号也视作分隔符)
* @return
*/
public static List<String> toSentenceList(String content, boolea... | sb = new StringBuilder();
break;
}
}
if (sb.length() > 0)
{
insertIntoList(sb, sentences);
}
return sentences;
}
private static void insertIntoList(StringBuilder sb, List<String> sentences)
{
String content = sb.t... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\utility\SentencesUtil.java | 1 |
请完成以下Java代码 | public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public org.compiere.model.I_S_Resource getPP_Plant()
{
return get_ValueAsPO(COLUMNNAME_PP_Plant_ID, org.compiere... | set_Value (COLUMNNAME_Separator, Separator);
}
@Override
public java.lang.String getSeparator()
{
return get_ValueAsString(COLUMNNAME_Separator);
}
@Override
public void setValue (final java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
@Override
public java.lang.String getValue()
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Warehouse.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PostController {
private final PostDao postDao;
private final AuthorDao authorDao;
public PostController(PostDao postDao, AuthorDao authorDao) {
this.postDao = postDao;
this.authorDao = authorDao;
}
@QueryMapping
public List<Post> recentPosts(@Argument int count, ... | @SchemaMapping(typeName="Post", field="first_author")
public Author getFirstAuthor(Post post) {
return authorDao.getAuthor(post.getAuthorId());
}
@MutationMapping
public Post createPost(@Argument String title, @Argument String text,
@Argument String category, @Argument String authorId) {
... | repos\tutorials-master\spring-boot-modules\spring-boot-graphql\src\main\java\com\baeldung\graphql\intro\PostController.java | 2 |
请完成以下Java代码 | public int getC_CompensationGroup_Schema_ID()
{
return get_ValueAsInt(COLUMNNAME_C_CompensationGroup_Schema_ID);
}
@Override
public void setC_Order_CompensationGroup_ID (final int C_Order_CompensationGroup_ID)
{
if (C_Order_CompensationGroup_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Order_CompensationGroup_... | @Override
public int getM_Product_Category_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_Category_ID);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Order_CompensationGroup.java | 1 |
请完成以下Java代码 | public FlatrateUserNotificationsProducer notifyUser(
final I_C_Flatrate_Term contract,
final UserId recipientUserId,
@NonNull final AdMessageKey message)
{
if (contract == null)
{
return this;
}
try
{
postNotification(createFlatrateTermGeneratedEvent(contract, recipientUserId, message));
}
... | return null;
}
final TableRecordReference flatrateTermRef = TableRecordReference.of(contract);
return newUserNotificationRequest()
.recipientUserId(recipientUserId)
.contentADMessage(message)
.targetAction(TargetRecordAction.ofRecordAndWindow(flatrateTermRef, Contracts_Constants.CONTRACTS_WINDOW_ID)... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\event\FlatrateUserNotificationsProducer.java | 1 |
请完成以下Java代码 | public LUTUAssignBuilder setTUsToAssign(final Collection<I_M_HU> tusToAssign)
{
assertConfigurable();
_tusToAssign = new ArrayList<>(tusToAssign);
return this;
}
private List<I_M_HU> getTUsToAssign()
{
Check.assumeNotEmpty(_tusToAssign, "_tusToAssign not empty");
return _tusToAssign;
}
public final LU... | {
return _bpLocationId;
}
public LUTUAssignBuilder setM_Locator(final I_M_Locator locator)
{
assertConfigurable();
_locatorId = LocatorId.ofRecordOrNull(locator);
return this;
}
private LocatorId getLocatorId()
{
Check.assumeNotNull(_locatorId, "_locatorId not null");
return _locatorId;
}
public ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\impl\LUTUAssignBuilder.java | 1 |
请完成以下Java代码 | public class HandlerAdapter {
private final @Nullable InvocableHandlerMethod invokerHandlerMethod;
private final @Nullable DelegatingInvocableHandler delegatingHandler;
private final boolean asyncReplies;
/**
* Construct an instance with the provided method.
* @param invokerHandlerMethod the method.
*/
p... | public String getMethodAsString(Object payload) {
if (this.invokerHandlerMethod != null) {
return this.invokerHandlerMethod.getMethod().toGenericString();
}
else {
return Objects.requireNonNull(this.delegatingHandler).getMethodNameFor(payload);
}
}
public Object getBean() {
if (this.invokerHandlerMet... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\adapter\HandlerAdapter.java | 1 |
请完成以下Java代码 | private static final class ModelsScheduler<ModelType> extends WorkpackagesOnCommitSchedulerTemplate<ModelType>
{
private final Class<ModelType> modelType;
private final boolean collectModels;
public ModelsScheduler(final Class<? extends IWorkpackageProcessor> workpackageProcessorClass, final Class<ModelType> mo... | @Override
protected String extractTrxNameFromItem(final ModelType item)
{
return InterfaceWrapperHelper.getTrxName(item);
}
@Nullable
@Override
protected Object extractModelToEnqueueFromItem(final Collector collector, final ModelType item)
{
return collectModels ? item : null;
}
@Override
pr... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\spi\WorkpackagesOnCommitSchedulerTemplate.java | 1 |
请完成以下Java代码 | private static String removeEmbeddedSlashDotDotSlash(String path) {
int index;
while ((index = path.indexOf("/../")) >= 0) {
int priorSlash = path.lastIndexOf('/', index - 1);
String after = path.substring(index + 3);
path = (priorSlash >= 0) ? path.substring(0, priorSlash) + after : after;
}
return pa... | private static String removeTrailingSlashDot(String path) {
return (!path.endsWith("/.")) ? path : path.substring(0, path.length() - 1);
}
private static String removeTrailingSlashDotDot(String path) {
int index;
while (path.endsWith("/..")) {
index = path.indexOf("/..");
int priorSlash = path.lastIndexO... | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\net\protocol\jar\Canonicalizer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public JsonProductToAddResponse getProductsNotFavorite()
{
final User user = loginService.getLoggedInUser();
final List<Product> productsContracted = contractsService.getContracts(user.getBpartner()).getProducts();
final List<Product> productsFavorite = productSuppliesService.getUserFavoriteProducts(user);
fin... | {
return products.stream()
.map(product -> toJsonProduct(product, locale))
.sorted(Comparator.comparing(JsonProduct::getProductName))
.collect(Collectors.toCollection(ArrayList::new));
}
private static JsonProduct toJsonProduct(@NonNull final Product product, @NonNull final Locale locale)
{
return J... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\rest\products\ProductsRestController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getDeploymentId() {
return deploymentId;
}
public void setDeploymentId(String deploymentId) {
this.deploymentId = deploymentId;
this.deploymentChanged = true;
}
public void setTenantId(String tenantId) {
tenantChanged = true;
this.tenantId = tenant... | public boolean isNameChanged() {
return nameChanged;
}
@JsonIgnore
public boolean isVersionChanged() {
return versionChanged;
}
@JsonIgnore
public boolean isDeploymentChanged() {
return deploymentChanged;
}
@JsonIgnore
public boolean isTenantIdChanged() {
... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\repository\ModelRequest.java | 2 |
请完成以下Java代码 | private void close(final PickingCandidate pickingCandidate)
{
try
{
pickingCandidate.assertProcessed();
final PickingSlotId pickingSlotId = pickingCandidate.getPickingSlotId();
if (pickingSlotId != null)
{
huPickingSlotBL.addToPickingSlotQueue(pickingSlotId, pickingCandidate.getPackedToHuId());
... | {
throw AdempiereException.wrapIfNeeded(ex).setParameter("pickingCandidate", pickingCandidate);
}
else
{
logger.warn("Failed closing {}. Skipped", pickingCandidate, ex);
}
}
}
private void changeStatusToProcessedAndSave(final PickingCandidate pickingCandidate)
{
pickingCandidate.changeStatus... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\candidate\commands\ClosePickingCandidateCommand.java | 1 |
请完成以下Java代码 | protected void executeParse(BpmnParse bpmnParse, BoundaryEvent boundaryEvent) {
if (boundaryEvent.getAttachedToRef() == null) {
logger.warn(
"Invalid reference in boundary event. Make sure that the referenced activity " +
"is defined in the same scope as the boundary ... | if (
eventDefinition instanceof TimerEventDefinition ||
eventDefinition instanceof ErrorEventDefinition ||
eventDefinition instanceof SignalEventDefinition ||
eventDefinition instanceof CancelEventDefinition ||
eventDefinition instanceof MessageEventDefinition... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\bpmn\parser\handler\BoundaryEventParseHandler.java | 1 |
请完成以下Java代码 | public StartupTimeline getTimeline() {
return this.timeline;
}
}
static class StartupEndpointRuntimeHints implements RuntimeHintsRegistrar {
private static final TypeReference DEFAULT_TAG = TypeReference
.of("org.springframework.boot.context.metrics.buffering.BufferedStartupStep$DefaultTag");
private ... | private static final TypeReference FLIGHT_RECORDER_STARTUP_STEP = TypeReference
.of("org.springframework.core.metrics.jfr.FlightRecorderStartupStep");
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
hints.reflection()
.registerType(DEFAULT_TAG, (typeHint) -> t... | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\startup\StartupEndpoint.java | 1 |
请完成以下Java代码 | public void setNameLikeIgnoreCase(String nameLikeIgnoreCase) {
this.nameLikeIgnoreCase = nameLikeIgnoreCase;
}
public String getDeploymentId() {
return deploymentId;
}
public void setDeploymentId(String deploymentId) {
this.deploymentId = deploymentId;
}
public List<St... | }
public boolean isWithLocalizationFallback() {
return withLocalizationFallback;
}
public String getCallbackId() {
return callbackId;
}
public Set<String> getCallBackIds() {
return callbackIds;
}
public String getCallbackType() {
return callbackType;
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\ExecutionQueryImpl.java | 1 |
请完成以下Java代码 | public JAXBElement<DeleteEmployee> createDeleteEmployee(DeleteEmployee value) {
return new JAXBElement<DeleteEmployee>(_DeleteEmployee_QNAME, DeleteEmployee.class, null, value);
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link UpdateEmployeeResponse }{@code >}}
*
*/
... | */
@XmlElementDecl(namespace = "http://bottomup.server.jaxws.baeldung.com/", name = "getAllEmployees")
public JAXBElement<GetAllEmployees> createGetAllEmployees(GetAllEmployees value) {
return new JAXBElement<GetAllEmployees>(_GetAllEmployees_QNAME, GetAllEmployees.class, null, value);
}
/**
... | repos\tutorials-master\web-modules\jee-7\src\main\java\com\baeldung\jaxws\client\ObjectFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Collection<Class<? extends DDOrderDeletedEvent>> getHandledEventType()
{
return ImmutableList.of(DDOrderDeletedEvent.class);
}
@Override
public void handleEvent(final DDOrderDeletedEvent event)
{
final OrgId orgId = event.getOrgId();
final ZoneId timeZone = orgDAO.getTimeZone(orgId);
for (final DD... | private void deleteCandidates(final int ddOrderId, @NonNull final DDOrderLine ddOrderLine)
{
final CandidatesQuery query = CandidatesQuery
.builder()
.distributionDetailsQuery(DistributionDetailsQuery.builder()
.ddOrderId(ddOrderId)
.ddOrderLineId(ddOrderLine.getDdOrderLineId())
... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\ddorder\DDOrderDeletedEventHandler.java | 2 |
请完成以下Java代码 | public boolean isAllowRetryOnError()
{
return false;
}
@Override
public Result processWorkPackage(final I_C_Queue_WorkPackage workpackage_NOTUSED, final String localTrxName_NOTUSED)
{
//
// Retrieve enqueued HUs
final List<I_M_HU> hus = retrieveItems(I_M_HU.class);
if (hus.isEmpty())
{
Loggables.ad... | * task http://dewiki908/mediawiki/index.php/09216_Async_-_Need_SPI_to_decide_if_packets_can_be_processed_in_parallel_of_not_%28106397206117%29
*/
@Override
public ILatchStragegy getLatchStrategy()
{
return CreateShipmentLatch.INSTANCE;
}
/**
* Gets the {@link InOutGenerateResult} created by {@link #processW... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\async\GenerateInOutFromHU.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public JwtResponse dynamicBuilderSpecific(@RequestBody Map<String, Object> claims) throws UnsupportedEncodingException {
JwtBuilder builder = Jwts.builder();
claims.forEach((key, value) -> {
switch (key) {
case "iss":
ensureType(key, value, String.class);
... | builder.setId((String) value);
break;
default:
builder.claim(key, value);
}
});
builder.signWith(SignatureAlgorithm.HS256, secretService.getHS256SecretBytes());
return new JwtResponse(builder.compact());
}
private void ensureType... | repos\tutorials-master\security-modules\jjwt\src\main\java\io\jsonwebtoken\jjwtfun\controller\DynamicJWTController.java | 2 |
请完成以下Java代码 | private static InventoryValue retrieveInventoryValueRow(final ResultSet rs) throws SQLException
{
return InventoryValue.builder()
.combination(rs.getString("combination"))
.description(rs.getString("description"))
.activityName(rs.getString("ActivityName"))
.warehouseName(rs.getString("WarehouseName"... | private static InventoryValue.Amounts retrieveAmounts(@NonNull final ResultSet rs, @NonNull final String prefix) throws SQLException
{
return InventoryValue.Amounts.builder()
.costPrice(retrieveBigDecimalOrZero(rs, prefix + "_CostPrice"))
.expectedAmt(retrieveBigDecimalOrZero(rs, prefix + "_ExpectedAmt"))
... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\inventory\InventoryValuationService.java | 1 |
请完成以下Java代码 | public String getHelp ()
{
return (String)get_Value(COLUMNNAME_Help);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String get... | {
return new KeyNamePair(get_ID(), getName());
}
/** Set Ratio.
@param PA_Ratio_ID
Performace Ratio
*/
public void setPA_Ratio_ID (int PA_Ratio_ID)
{
if (PA_Ratio_ID < 1)
set_ValueNoCheck (COLUMNNAME_PA_Ratio_ID, null);
else
set_ValueNoCheck (COLUMNNAME_PA_Ratio_ID, Integer.valueOf(P... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_Ratio.java | 1 |
请完成以下Java代码 | public String getIpAddress() {
return ipAddress;
}
public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getLatitude() {
... | }
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
} | repos\tutorials-master\spring-web-modules\spring-mvc-xml-2\src\main\java\com\baeldung\spring\form\GeoIP.java | 1 |
请完成以下Java代码 | protected String getDefaultMessage() {
return DEFAULT_MESSAGE;
}
public void setRestTemplate(RestTemplate restTemplate) {
this.restTemplate = restTemplate;
}
@Nullable
public URI getUrl() {
return url;
}
public void setUrl(@Nullable URI url) {
this.url = url;
}
public String getUsername() {
retur... | this.username = username;
}
@Nullable
public String getRoom() {
return room;
}
public void setRoom(@Nullable String room) {
this.room = room;
}
@Nullable
public String getToken() {
return token;
}
public void setToken(@Nullable String token) {
this.token = token;
}
} | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\notify\LetsChatNotifier.java | 1 |
请完成以下Java代码 | void section(int nclusters)
{
if (size() < nclusters)
throw new IllegalArgumentException("簇数目小于文档数目");
sectioned_clusters_ = new ArrayList<Cluster<K>>(nclusters);
List<Document> centroids = new ArrayList<Document>(nclusters);
// choose_randomly(nclusters, centroids);
... | double similarity = SparseVector.inner_product(d.feature(), centroids.get(j).feature());
if (max_similarity < similarity)
{
max_similarity = similarity;
max_index = j;
}
}
sectioned_clusters_.get(max_index).a... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\cluster\Cluster.java | 1 |
请完成以下Java代码 | public int getAD_Role_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Role_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_AD_User getAD_User() throws RuntimeException
{
return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name)
.getPO(getAD_User_ID(), get_TrxName()); }
... | /** Get User/Contact.
@return User within the system - Internal or Business Partner Contact
*/
public int getAD_User_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_AlertRecipient.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void deleteVariablesByTaskId(String taskId) {
DbSqlSession dbSqlSession = getDbSqlSession();
if (isEntityInserted(dbSqlSession, "task", taskId)) {
deleteCachedEntities(dbSqlSession, variableInstanceByTaskIdMatcher, taskId);
} else {
bulkDelete("deleteVariableInstan... | bulkDelete("deleteVariablesByScopeIdAndScopeTypes", variableInstanceByScopeIdAndScopeTypesMatcher, params);
}
@Override
public void deleteBySubScopeIdAndScopeTypes(String subScopeId, Collection<String> scopeTypes) {
Map<String, Object> params = new HashMap<>(3);
params.put("subScopeId", su... | repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\persistence\entity\data\impl\MybatisVariableInstanceDataManager.java | 2 |
请完成以下Java代码 | public BigDecimal getLastDifference()
{
return m_lastDifference;
} // getLastDifference
/**
* Set Last Allocation Difference
* @param difference difference
*/
public void setLastDifference(BigDecimal difference)
{
m_lastDifference = difference;
} // setLastDifference
/**
* Get Max Allocation
... | public MProduct getProduct()
{
if (m_product == null)
m_product = MProduct.get(getCtx(), getM_Product_ID());
return m_product;
} // getProduct
/**
* Get Product Standard Precision
* @return standard precision
*/
public int getUOMPrecision()
{
return getProduct().getUOMPrecision();
} // getUOMPre... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MDistributionRunLine.java | 1 |
请完成以下Java代码 | public boolean isColumnPrinted(final int col)
{
MPrintFormatItem item = m_printFormat.getItem(col);
return item.isPrinted();
}
@Override
public boolean isPageBreak(final int row, final int col)
{
PrintDataElement pde = getPDE(row, col);
return pde != null ? pde.isPageBreak() : false;
}
@Override
publi... | paperSize = PrintSetup.ENVELOPE_10_PAPERSIZE;
}
// else if (MediaSizeName..equals(mediaSizeName)) {
// paperSize = PrintSetup.ENVELOPE_DL_PAPERSIZE;
// }
// else if (MediaSizeName..equals(mediaSizeName)) {
// paperSize = PrintSetup.ENVELOPE_CS_PAPERSIZE;
// }
else if (MediaSizeName.MONARCH_ENVELOPE.equa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\print\export\PrintDataExcelExporter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
}
private String username;
private String password;
private Server server;
public String getUsername() {
return username;
}
public void setUse... | }
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Server getServer() {
return server;
}
public void setServer(Server server) {
this.server = server;
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-autoconfiguration\src\main\java\com\baeldung\autoconfiguration\annotationprocessor\DatabaseProperties.java | 2 |
请完成以下Java代码 | public ALayoutConstraint createNext()
{
return new ALayoutConstraint(m_row, m_col+1);
} // createNext
private int m_row;
private int m_col;
/**
* Get Row
* @return roe no
*/
public int getRow()
{
return m_row;
} // getRow
/**
* Get Column
* @return col no
*/
public int getCol()
{... | comp = (ALayoutConstraint)o;
if (comp == null)
return +111;
// Row compare
int rowComp = m_row - comp.getRow();
if (rowComp != 0)
return rowComp;
// Column compare
return m_col - comp.getCol();
} // compareTo
/**
* Is Object Equal
* @param o
* @return true if equal
*/
public boole... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\ALayoutConstraint.java | 1 |
请完成以下Java代码 | public void setAD_WF_Process_ID (final int AD_WF_Process_ID)
{
if (AD_WF_Process_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_WF_Process_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_WF_Process_ID, AD_WF_Process_ID);
}
@Override
public int getAD_WF_Process_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_WF... | public java.lang.String getAttributeName()
{
return get_ValueAsString(COLUMNNAME_AttributeName);
}
@Override
public void setAttributeValue (final java.lang.String AttributeValue)
{
set_Value (COLUMNNAME_AttributeValue, AttributeValue);
}
@Override
public java.lang.String getAttributeValue()
{
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_ProcessData.java | 1 |
请完成以下Java代码 | public static Long getCurrentUserId() {
return getCurrentUserId(getToken());
}
/**
* 获取用户ID
* @return 系统用户ID
*/
public static Long getCurrentUserId(String token) {
JWT jwt = JWTUtil.parseToken(token);
return Long.valueOf(jwt.getPayload("userId").toString());
}
... | /**
* 获取Token
* @return /
*/
public static String getToken() {
HttpServletRequest request = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder
.getRequestAttributes())).getRequest();
String bearerToken = request.getHeader(header);
if (beare... | repos\eladmin-master\eladmin-common\src\main\java\me\zhengjie\utils\SecurityUtils.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class InvoiceReferenceNo
{
String bankAccount;
String org;
/** Last 8 digits of the C_BPArtner_ID; lpadded with 0 */
String bPartnerHint;
/** Last 8 digits of the C_Invoice_ID; lpadded with 0 */
String invoiceHint;
int checkDigit;
private InvoiceReferenceNo(
@NonNull final String bankAccount,
... | final int checkDigit)
{
this.bankAccount = bankAccount;
this.org = org;
this.bPartnerHint = bPartnerHint;
this.invoiceHint = invoiceHint;
this.checkDigit = checkDigit;
}
public String asString()
{
return new StringBuilder()
.append(bankAccount)
.append(org)
.append(bPartnerHint)
.append... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\api\InvoiceReferenceNo.java | 2 |
请完成以下Java代码 | abstract class AbstractExpressionAttributeRegistry<T extends ExpressionAttribute> {
private final Map<MethodClassKey, T> cachedAttributes = new ConcurrentHashMap<>();
private MethodSecurityExpressionHandler expressionHandler = new DefaultMethodSecurityExpressionHandler();
/**
* Returns an {@link ExpressionAttri... | MethodSecurityExpressionHandler getExpressionHandler() {
return this.expressionHandler;
}
void setExpressionHandler(MethodSecurityExpressionHandler expressionHandler) {
Assert.notNull(expressionHandler, "expressionHandler cannot be null");
this.expressionHandler = expressionHandler;
}
abstract void setTempl... | repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\method\AbstractExpressionAttributeRegistry.java | 1 |
请完成以下Java代码 | public Iterator<Cookie> iterator() {
return cookieMap.values().iterator();
}
public Cookie[] toArray() {
Cookie[] cookies = new Cookie[cookieMap.size()];
return toArray(cookies);
}
@Override
public <T> T[] toArray(T[] ts) {
return cookieMap.values().toArray(ts);
... | return true;
}
@Override
public boolean addAll(Collection<? extends Cookie> collection) {
boolean result = false;
for(Cookie cookie : collection) {
result|= add(cookie);
}
return result;
}
@Override
public boolean removeAll(Collection<?> collection) ... | repos\tutorials-master\jhipster-modules\jhipster-uaa\gateway\src\main\java\com\baeldung\jhipster\gateway\security\oauth2\CookieCollection.java | 1 |
请完成以下Java代码 | public class HistoryCleanupConfigurationDto {
protected Date batchWindowStartTime;
protected Date batchWindowEndTime;
protected boolean enabled;
public Date getBatchWindowStartTime() {
return batchWindowStartTime;
}
public void setBatchWindowStartTime(Date batchWindowStartTime) {
this.batchWindowStartTime ... | }
public void setBatchWindowEndTime(Date batchWindowEndTime) {
this.batchWindowEndTime = batchWindowEndTime;
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
} | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoryCleanupConfigurationDto.java | 1 |
请完成以下Java代码 | public void invokeLater(final int windowNo, final Runnable runnable)
{
getCurrentInstance().invokeLater(windowNo, runnable);
}
@Override
public Thread createUserThread(final Runnable runnable, final String threadName)
{
return getCurrentInstance().createUserThread(runnable, threadName);
}
@Override
public... | @Override
public void executeLongOperation(final Object component, final Runnable runnable)
{
getCurrentInstance().executeLongOperation(component, runnable);
}
@Override
public IClientUIInvoker invoke()
{
return getCurrentInstance().invoke();
}
@Override
public IClientUIAsyncInvoker invokeAsync()
{
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\form\AbstractClientUI.java | 1 |
请完成以下Java代码 | public Set<LogLevel> getSupportedLogLevels() {
return EnumSet.allOf(LogLevel.class);
}
/**
* Sets the logging level for a given logger.
* @param loggerName the name of the logger to set ({@code null} can be used for the
* root logger).
* @param level the log level ({@code null} can be used to remove any cu... | }
catch (Exception ex) {
throw new IllegalStateException(ex);
}
}
/**
* {@link LoggingSystem} that does nothing.
*/
static class NoOpLoggingSystem extends LoggingSystem {
@Override
public void beforeInitialize() {
}
@Override
public void setLogLevel(@Nullable String loggerName, @Nullable Log... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\logging\LoggingSystem.java | 1 |
请完成以下Java代码 | public abstract class BPartnerException extends AdempiereException
{
BPartnerException(
@NonNull final AdMessageKey adMessage,
@Nullable final I_C_BPartner bpartner)
{
super(buildMsg(adMessage, extractBPartnerName(bpartner)), getErrorCode(adMessage));
}
BPartnerException(
@NonNull final AdMessageKey adM... | }
private static ITranslatableString buildMsg(
@NonNull final AdMessageKey adMessage,
@Nullable final String bpartnerName)
{
final TranslatableStringBuilder builder = TranslatableStrings.builder()
.appendADMessage(adMessage);
if (Check.isNotBlank(bpartnerName))
{
builder.append(": ").append(bpart... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\bpartner\exceptions\BPartnerException.java | 1 |
请完成以下Java代码 | public MenuType getType() {
return type;
}
public void setType(MenuType type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getKey() {
return key;
}
... | public void setUrl(String url) {
this.url = url;
}
public String getMediaId() {
return mediaId;
}
public void setMediaId(String mediaId) {
this.mediaId = mediaId;
}
public List<MenuButton> getSubButton() {
return subButton;
}
public void setSubButton(L... | repos\spring-boot-quick-master\quick-wx-public\src\main\java\com\wx\pn\api\model\MenuButton.java | 1 |
请完成以下Java代码 | public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Valid from.
@param ValidFrom
Valid from including this date (first day)
*/
public void setValidFrom (String ValidFrom)
{
set_Value (COLUMNNAME_ValidFrom, Valid... | return (Timestamp)get_Value(COLUMNNAME_ValidTo);
}
/** 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 key for the record in the format re... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_QM_SpecificationLine.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.