instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public StandardDocumentReportType getStandardDocumentReportType()
{
return StandardDocumentReportType.SHIPMENT;
}
@Override
public @NonNull DocumentReportInfo getDocumentReportInfo(
@NonNull final TableRecordReference recordRef,
@Nullable final PrintFormatId adPrintFormatToUseId, final AdProcessId reportPr... | return DocumentReportInfo.builder()
.recordRef(TableRecordReference.of(I_M_InOut.Table_Name, inoutId))
.reportProcessId(util.getReportProcessIdByPrintFormatId(printFormatId))
.copies(util.getDocumentCopies(docType, bpPrintFormatQuery))
.documentNo(inout.getDocumentNo())
.bpartnerId(bpartnerId)
.... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inout\InOutDocumentReportAdvisor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private ClassPathResource asClassPathResource(LocatedResource locatedResource) {
Location location = locatedResource.location();
String fileNameWithAbsolutePath = location.getRootPath() + "/" + locatedResource.resource().getFilename();
return new ClassPathResource(location, fileNameWithAbsolutePath, this.classLoa... | if (this.failOnMissingLocations) {
throw new FlywayException("Location " + location.getDescriptor() + " doesn't exist");
}
continue;
}
Resource[] resources = getResources(resolver, location, root);
for (Resource resource : resources) {
this.locatedResources.add(new LocatedResource(resource, lo... | repos\spring-boot-4.0.1\module\spring-boot-flyway\src\main\java\org\springframework\boot\flyway\autoconfigure\NativeImageResourceProvider.java | 2 |
请完成以下Java代码 | public String getKeywords() {
return keywords;
}
public void setKeywords(String keywords) {
this.keywords = keywords;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}... | sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", parentId=").append(parentId);
sb.append(", name=").append(name);
sb.append(", level=").append(level);
sb.append(", productCount=").append(productCount);
sb.append(", productUnit=").append... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProductCategory.java | 1 |
请完成以下Java代码 | public void setC_AcctSchema_ID (final int C_AcctSchema_ID)
{
if (C_AcctSchema_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_AcctSchema_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_AcctSchema_ID, C_AcctSchema_ID);
}
@Override
public int getC_AcctSchema_ID()
{
return get_ValueAsInt(COLUMNNAME_C_AcctSchema... | }
@Override
public org.compiere.model.I_C_ValidCombination getP_CostClearing_A()
{
return get_ValueAsPO(COLUMNNAME_P_CostClearing_Acct, org.compiere.model.I_C_ValidCombination.class);
}
@Override
public void setP_CostClearing_A(final org.compiere.model.I_C_ValidCombination P_CostClearing_A)
{
set_ValueFrom... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_CostElement_Acct.java | 1 |
请完成以下Java代码 | public static String getSplitText(List<String> list, String separator) {
if (null != list && list.size() > 0) {
return StringUtils.join(list, separator);
}
return "";
}
/**
* 通过table的条件SQL
*
* @param tableSql sys_user where name = '1212'
* @return name =... | }
}
/**
* 判断两个数组是否存在交集
* @param set1
* @param arr2
* @return
*/
public static boolean hasIntersection(Set<String> set1, String[] arr2) {
if (set1 == null) {
return false;
}
if(set1.size()>0){
for (String str : arr2) {
... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\CommonUtils.java | 1 |
请完成以下Java代码 | public AWindow find(final AdWindowId adWindowId)
{
for (Window w : windows)
{
if (w instanceof AWindow)
{
AWindow a = (AWindow)w;
if (AdWindowId.equals(a.getAdWindowId(), adWindowId))
{
return a;
}
}
}
return null;
}
public FormFrame findForm(int AD_FORM_ID)
{
for (Window w ... | public void componentResized(ComponentEvent e)
{
}
@Override
public void componentShown(ComponentEvent e)
{
}
@Override
public void windowActivated(WindowEvent e)
{
}
@Override
public void windowClosed(WindowEvent e)
{
Window w = e.getWindow();
if (w instanceof Window)
{
w.removeComponentListen... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\WindowManager.java | 1 |
请完成以下Java代码 | public void updateActivity(final I_C_InvoiceLine invoiceLine)
{
if (invoiceLine.getC_Activity_ID() > 0)
{
return; // was already set, so don't try to auto-fill it
}
final ProductId productId = ProductId.ofRepoIdOrNull(invoiceLine.getM_Product_ID());
if (productId == null)
{
return;
}
final Acti... | OrgId.ofRepoId(invoiceLine.getAD_Org_ID()),
productId);
if (productActivityId == null)
{
return;
}
final Dimension orderLineDimension = dimensionService.getFromRecord(invoiceLine);
if (orderLineDimension == null)
{
//nothing to do
return;
}
dimensionService.updateRecord(invoiceLine, orderLi... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\activity\model\validator\C_InvoiceLine.java | 1 |
请完成以下Java代码 | public static byte[] decompress(byte[] input) throws DataFormatException {
Inflater inflater = new Inflater();
inflater.setInput(input);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
byte[] buffer = new byte[1024];
while (!inflater.finished()) {
... | "Spring Security, and RESTful APIs";
byte[] input = inputString.getBytes();
// Compression
byte[] compressedData = compress(input);
// Decompression
byte[] decompressedData = decompress(compressedData);
System.out.println("Original: " + input.length + " bytes");
... | repos\tutorials-master\core-java-modules\core-java-lang-7\src\main\java\com\baeldung\compressbytes\CompressByteArrayUtil.java | 1 |
请完成以下Java代码 | public String getProcessDefinitionName() {
return processDefinitionName;
}
public Integer getProcessDefinitionVersion() {
return processDefinitionVersion;
}
public String getActivityId() {
return activityId;
}
public String getProcessInstanceId() {
return proce... | this.involvedUser = involvedUser;
}
public Set<String> getProcessDefinitionIds() {
return processDefinitionIds;
}
public Set<String> getProcessDefinitionKeys() {
return processDefinitionKeys;
}
public String getParentId() {
return parentId;
}
public String get... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\ExecutionQueryImpl.java | 1 |
请完成以下Java代码 | public void deployProcesses() {
// build a single deployment containing all discovered processes
Set<String> resourceNames = getResourceNames();
if (resourceNames.isEmpty()) {
LOGGER.debug("Not creating a deployment");
return;
}
LOGGER.debug("Start deployi... | Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(processFileUrl.openStream());
NodeList nodeList = document.getElementsByTagName(PROCESS_ELEMENT_NAME);
for (int i = 0; i < nodeList.getLength(); i++) {
Node cn = nodeList.item(i);
... | repos\flowable-engine-main\modules\flowable-cdi\src\main\java\org\flowable\cdi\impl\ProcessDeployer.java | 1 |
请完成以下Java代码 | public void onException(Exception e) {
e.printStackTrace();
}
@Override
public void onDeletionNotice(StatusDeletionNotice arg) {
System.out.println("Got a status deletion notice id:" + arg.getStatusId());
}
@Override
public void onScrubGeo(long userId, long upToSt... | @Override
public void onStatus(Status status) {
System.out.println(status.getUser().getName() + " : " + status.getText());
}
@Override
public void onTrackLimitationNotice(int numberOfLimitedStatuses) {
System.out.println("Got track limitation ... | repos\tutorials-master\saas-modules\twitter4j\src\main\java\com\baeldung\Application.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void sendMessage(Object o) {
Message message = new Message(aLiMqConfig.getStockTopic(), "test", JSON.toJSON(o).toString().getBytes(StandardCharsets.UTF_8));
//向mq发送消息
sendAsync(ProducerBean::isStarted, producer, message);
}
/**
* 向阿里云rocket mq发送消息。
*
* @param predi... | @Override
public void onSuccess(SendResult sendResult) {
logger.info("向mq推送库存消息成功,消息是:{}", sendResult.toString());
}
@Override
public void onException(OnExceptionContext e) {
logger.error("向mq推送库存消息失败,消息id 为 {} 错误是:{... | repos\springBoot-master\springboot-rocketmq-ali\src\main\java\cn\abel\queue\service\ProducerService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class UserController {
// ------------------------
// PUBLIC METHODS
// ------------------------
/**
* /create --> Create a new user and save it in the database.
*
* @param email User's email
* @param name User's name
* @return A string describing if the user is successfully created ... | }
return "The user id is: " + userId;
}
/**
* /update --> Update the email and the name for the user in the database
* having the passed id.
*
* @param id The id for the user to update.
* @param email The new email.
* @param name The new name.
* @return A string describing if the user... | repos\spring-boot-samples-master\spring-boot-mysql-springdatajpa-hibernate\src\main\java\netgloo\controllers\UserController.java | 2 |
请完成以下Java代码 | public int getM_DistributionList_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_DistributionList_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name... | {
Object oo = get_Value(COLUMNNAME_Processing);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Total Ratio.
@param RatioTotal
Total of relative weight in a distribution
*/
public void setRatioTotal (... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_DistributionList.java | 1 |
请完成以下Java代码 | public class WEBUI_C_Flatrate_DataEntry_CompleteIt extends JavaProcess implements IProcessPrecondition
{
private final IDocumentBL documentBL = Services.get(IDocumentBL.class);
@Override
public ProcessPreconditionsResolution checkPreconditionsApplicable(@NonNull final IProcessPreconditionsContext context)
{
fina... | return ProcessPreconditionsResolution.rejectWithInternalReason("C_Flatrate_DataEntry has no details");
}
return ProcessPreconditionsResolution.accept();
}
@Override
protected final String doIt()
{
final I_C_Flatrate_DataEntry entryRecord = ProcessUtil.extractEntry(getProcessInfo());
documentBL.processEx(... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\contract\flatrate\process\WEBUI_C_Flatrate_DataEntry_CompleteIt.java | 1 |
请完成以下Java代码 | public String asString() {
return "messaging.destination.kind";
}
}
}
/**
* Default {@link KafkaTemplateObservationConvention} for Kafka template key values.
*
* @author Gary Russell
* @author Christian Mergenthaler
* @author Wang Zhiyang
*
* @since 3.0
*
*/
public static class DefaultK... | TemplateLowCardinalityTags.MESSAGING_DESTINATION_KIND.withValue("topic"),
TemplateLowCardinalityTags.MESSAGING_DESTINATION_NAME.withValue(context.getDestination()));
}
@Override
public String getContextualName(KafkaRecordSenderContext context) {
return context.getDestination() + " send";
}
@Override... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\micrometer\KafkaTemplateObservation.java | 1 |
请完成以下Java代码 | public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Fully Qualified Domain Name.
@p... | @return Comment or Hint
*/
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 ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_WebProject_Domain.java | 1 |
请完成以下Java代码 | public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result) + intValue;
result = (prime * result) + ((stringValue == null) ? 0 : stringValue.hashCode());
return result;
}
@Override
public boolean equals(final Object obj) {
if (this... | return false;
}
if (stringValue == null) {
if (other.stringValue != null) {
return false;
}
} else if (!stringValue.equals(other.stringValue)) {
return false;
}
return true;
}
@Override
public String toString() {
... | repos\tutorials-master\json-modules\gson-2\src\main\java\com\baeldung\gson\deserialization\Foo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Config {
@Bean
public MyRepoSpring repoSpring(BookRepository repository) {
return new MyRepoSpring(repository);
}
private DataSource dataSource(boolean readOnly, boolean isAutoCommit) {
HikariConfig config = new HikariConfig();
config.setJdbcUrl("jdbc:mysql://local... | .getName());
managerFactoryBean.setDataSource(dataSource);
Properties properties = new Properties();
properties.setProperty("hibernate.dialect", "org.hibernate.dialect.MySQL5Dialect");
properties.setProperty("hibernate.hbm2ddl.auto", "validate");
managerFactoryBean.setJpaPrope... | repos\tutorials-master\persistence-modules\read-only-transactions\src\main\java\com\baeldung\readonlytransactions\mysql\spring\Config.java | 2 |
请完成以下Java代码 | protected Collection<String> getUrlPrefixes() {
return Collections.singleton(name().toLowerCase(Locale.ENGLISH));
}
protected boolean matchProductName(String productName) {
return this.productName != null && this.productName.equalsIgnoreCase(productName);
}
/**
* Return the driver class name.
* @return th... | if (driver != UNKNOWN && urlWithoutPrefix.startsWith(prefix)) {
return driver;
}
}
}
}
return UNKNOWN;
}
/**
* Find a {@link DatabaseDriver} for the given product name.
* @param productName product name
* @return the database driver or {@link #UNKNOWN} if not found
*/
public static Dat... | repos\spring-boot-4.0.1\module\spring-boot-jdbc\src\main\java\org\springframework\boot\jdbc\DatabaseDriver.java | 1 |
请完成以下Java代码 | public class ScriptCondition implements Condition {
private static final long serialVersionUID = 1L;
private final String expression;
private final String language;
public ScriptCondition(String expression, String language) {
this.expression = expression;
this.language = language;
... | throw new ActivitiException("condition script returns non-Boolean: " + result + " (" + result.getClass().getName() + ")");
}
return (Boolean) result;
}
protected String getActiveValue(String originalValue, String propertyName, ObjectNode elementProperties) {
String activeValue = origina... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\scripting\ScriptCondition.java | 1 |
请完成以下Java代码 | public Money convertToBase(@NonNull final CurrencyConversionContext conversionCtx, @NonNull final Money amt)
{
final CurrencyId currencyToId = getBaseCurrencyId(conversionCtx.getClientId(), conversionCtx.getOrgId());
final CurrencyConversionResult currencyConversionResult = convert(conversionCtx, amt, currencyToI... | final CurrencyConversionContext conversionCtx = createCurrencyConversionContext(
LocalDateAndOrgId.ofLocalDate(conversionDate, clientAndOrgId.getOrgId()),
(CurrencyConversionTypeId)null,
clientAndOrgId.getClientId());
final CurrencyConversionResult conversionResult = convert(
conversionCtx,
amoun... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\currency\impl\CurrencyBL.java | 1 |
请完成以下Java代码 | public I_I_Pharma_BPartner getPreviousImportRecord()
{
return previousImportRecord;
}
public void setPreviousImportRecord(@NonNull final I_I_Pharma_BPartner previousImportRecord)
{
this.previousImportRecord = previousImportRecord;
}
public int getPreviousC_BPartner_ID()
{
return previousImportR... | public List<I_I_Pharma_BPartner> getPreviousImportRecordsForSameBP()
{
return previousImportRecordsForSameBP;
}
public void clearPreviousRecordsForSameBP()
{
previousImportRecordsForSameBP = new ArrayList<>();
}
public void collectImportRecordForSameBP(@NonNull final I_I_Pharma_BPartner importRecord... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java\de\metas\impexp\bpartner\IFABPartnerContext.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static SettDailyCollectTypeEnum getEnum(String enumName) {
SettDailyCollectTypeEnum resultEnum = null;
SettDailyCollectTypeEnum[] enumAry = SettDailyCollectTypeEnum.values();
for (int i = 0; i < enumAry.length; i++) {
if (enumAry[i].name().equals(enumName)) {
resultEnum = enumAry[i];
break;
}... | enumMap.put(key, map);
}
return enumMap;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
public static List toList() {
SettDailyCollectTypeEnum[] ary = SettDailyCollectTypeEnum.values();
List list = new ArrayList();
for (int i = 0; i < ary.length; i++) {
Map<String, String> map = new HashMap<String, S... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\account\enums\SettDailyCollectTypeEnum.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getPayKey() {
return payKey;
}
public void setPayKey(String payKey) {
this.payKey = payKey;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public String getUserName() {
... | public String getBankAccountNo() {
return bankAccountNo;
}
public void setBankAccountNo(String bankAccountNo) {
this.bankAccountNo = bankAccountNo;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\vo\AuthParamVo.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private void loadSql(Path sqlFile) {
String sql;
try {
sql = Files.readString(sqlFile);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
jdbcTemplate.execute((StatementCallback<Object>) stmt -> {
stmt.execute(sql);
pri... | jdbcTemplate.execute(statement);
} catch (Exception e) {
if (!ignoreErrors) {
throw e;
}
}
}
private void printWarnings(SQLWarning warnings) {
if (warnings != null) {
log.info("{}", warnings.getMessage());
SQLWarning nextWa... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\install\SqlDatabaseUpgradeService.java | 2 |
请完成以下Java代码 | private Optional<ScaleDevice> getCurrentScaleDevice(final @NonNull WFProcess wfProcess)
{
final ManufacturingJob job = ManufacturingMobileApplication.getManufacturingJob(wfProcess);
return manufacturingJobService.getCurrentScaleDevice(job);
}
private Stream<ScaleDevice> streamAvailableScaleDevices(final @NonNul... | }
@Override
public WFActivityStatus computeActivityState(final WFProcess wfProcess, final WFActivity wfActivity)
{
return getCurrentScaleDevice(wfProcess).isPresent()
? WFActivityStatus.COMPLETED
: WFActivityStatus.NOT_STARTED;
}
@Override
public WFProcess setScannedBarcode(final @NonNull SetScannedBa... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\scanScaleDevice\ScanScaleDeviceActivityHandler.java | 1 |
请完成以下Java代码 | public Builder setC_Flatrate_DataEntry_ID(int C_Flatrate_DataEntry_ID)
{
this.C_Flatrate_DataEntry_ID = C_Flatrate_DataEntry_ID;
return this;
}
public Builder setDate(final Date date)
{
this.date = date;
return this;
}
public Builder setQtyPromised(final BigDecimal qtyPromised, final BigDecima... | public Builder setQtyOrdered(final BigDecimal qtyOrdered, final BigDecimal qtyOrdered_TU)
{
this.qtyOrdered = qtyOrdered;
this.qtyOrdered_TU = qtyOrdered_TU;
return this;
}
public Builder setQtyDelivered(BigDecimal qtyDelivered)
{
this.qtyDelivered = qtyDelivered;
return this;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\balance\PMMBalanceChangeEvent.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static BooleanWithReason checkCanEdit(@NonNull final Document document, @NonNull final IUserRolePermissions permissions)
{
// In case document type is not Window, return OK because we cannot validate
final DocumentPath documentPath = document.getDocumentPath();
if (documentPath.getDocumentType() != Docum... | {
// cannot apply security because this is not table based
return -1; // OK
}
return Services.get(IADTableDAO.class).retrieveTableId(tableName);
}
private static int getRecordId(final Document document)
{
if (document.isNew())
{
return -1;
}
else
{
return document.getDocumentId().toIntOr(... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\controller\DocumentPermissionsHelper.java | 2 |
请完成以下Java代码 | public void setFixedQtyAvailableToPromise (int FixedQtyAvailableToPromise)
{
set_Value (COLUMNNAME_FixedQtyAvailableToPromise, Integer.valueOf(FixedQtyAvailableToPromise));
}
/** Get Konst. Zusagbar (ATP) Wert.
@return Konst. Zusagbar (ATP) Wert */
@Override
public int getFixedQtyAvailableToPromise ()
{
... | @Override
public org.compiere.model.I_M_Warehouse_PickingGroup getM_Warehouse_PickingGroup() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_M_Warehouse_PickingGroup_ID, org.compiere.model.I_M_Warehouse_PickingGroup.class);
}
@Override
public void setM_Warehouse_PickingGroup(org.compiere.model.I_M_War... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer-metasfresh\src\main\java-gen\de\metas\vertical\pharma\msv3\server\model\X_MSV3_Server.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class OAuth2SecurityConfiguration extends WebSecurityConfigurerAdapter {
// 查询用户使用
@Autowired
AccountRepository accountRepository;
@Autowired
public void globalUserDetails(AuthenticationManagerBuilder auth) throws Exception {
// auth.inMemoryAuthentication()
// .withUser("user").password("password").ro... | public UserDetails loadUserByUsername(String name) throws UsernameNotFoundException {
// 通过用户名获取用户信息
Account account = accountRepository.findByName(name);
if (account != null) {
// 创建spring security安全用户
User user = new User(account.getName(), account.getPassword(),
AuthorityUtils.createAuth... | repos\spring-boot-quick-master\quick-oauth2\quick-oauth2-server\src\main\java\com\quick\auth\server\security\OAuth2SecurityConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void createAuthors() throws IOException {
Author mt = new Author();
mt.setId(1L);
mt.setName("Martin Ticher");
mt.setAge(43);
mt.setGenre("Horror");
mt.setAvatar(Files.readAllBytes(new File("avatars/mt.png").toPath()));
Author cd = new Author();
c... | @Transactional(readOnly = true)
public List<Author> fetchAuthorsDetailsByAgeGreaterThanEqual(int age) {
List<Author> authors = authorRepository.findByAgeGreaterThanEqual(40);
// don't do this since this is a N+1 case
authors.forEach(a -> {
a.getAvatar();
});
re... | repos\Hibernate-SpringBoot-master\HibernateSpringBootAttributeLazyLoadingBasic\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请完成以下Java代码 | public void setEmail(String email) {
this.email = email;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getMobilephone() {
return mobilephone;
}
public void setMobilephone(Str... | public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getDisabled() {
return disabled;
}
pub... | repos\springBoot-master\springboot-jpa\src\main\java\com\us\example\bean\User.java | 1 |
请完成以下Java代码 | public java.lang.String getPMM_Trend ()
{
return (java.lang.String)get_Value(COLUMNNAME_PMM_Trend);
}
/** Set Procurement Week.
@param PMM_Week_ID Procurement Week */
@Override
public void setPMM_Week_ID (int PMM_Week_ID)
{
if (PMM_Week_ID < 1)
set_ValueNoCheck (COLUMNNAME_PMM_Week_ID, null);
else... | if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Wochenerster.
@param WeekDate Wochenerster */
@Override
public void setWeekDate (java.sql.Timestamp WeekDate)
{
set_ValueNoCheck (COLUMNNAME_WeekDate, WeekDate);
}
/** Get Wochen... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java-gen\de\metas\procurement\base\model\X_PMM_Week.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setAcceptTasksAfterContextClose(boolean acceptTasksAfterContextClose) {
this.acceptTasksAfterContextClose = acceptTasksAfterContextClose;
}
}
}
public static class Shutdown {
/**
* Whether the executor should wait for scheduled tasks to complete on shutdown.
*/
private boolean await... | public void setAwaitTerminationPeriod(@Nullable Duration awaitTerminationPeriod) {
this.awaitTerminationPeriod = awaitTerminationPeriod;
}
}
/**
* Determine when the task executor is to be created.
*
* @since 3.5.0
*/
public enum Mode {
/**
* Create the task executor if no user-defined executor ... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\task\TaskExecutionProperties.java | 2 |
请完成以下Java代码 | public I_C_Flatrate_Term getC_Flatrate_Term()
{
final I_M_HU_PI_Item_Product hupip = getM_HU_PI_Item_Product();
if (hupip == null)
{
// the procurement product must have an M_HU_PI_Item_Product set
return null;
}
// the product and M_HU_PI_Item_Product must belong to a PMM_ProductEntry that is current... | @Override
public BigDecimal getQty()
{
return orderLine.getQtyOrdered();
}
@Override
public void setM_PricingSystem_ID(int M_PricingSystem_ID)
{
throw new NotImplementedException();
}
@Override
public void setM_PriceList_ID(int M_PriceList_ID)
{
throw new NotImplementedException();
}
/**
* Sets... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\impl\PMMPricingAware_C_OrderLine.java | 1 |
请完成以下Java代码 | public void onParentTermination(CmmnActivityExecution execution) {
if (execution.isCompleted()) {
String id = execution.getId();
throw LOG.executionAlreadyCompletedException("parentTerminate", id);
}
performParentTerminate(execution);
}
public void onExit(CmmnActivityExecution execution) ... | public void onReactivation(CmmnActivityExecution execution) {
throw createIllegalStateTransitionException("reactivate", execution);
}
// sentry ///////////////////////////////////////////////////////////////
protected boolean isAtLeastOneExitCriterionSatisfied(CmmnActivityExecution execution) {
return f... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\behavior\EventListenerOrMilestoneActivityBehavior.java | 1 |
请完成以下Java代码 | public void save(final BOM bom)
{
final Set<CurrentCostId> costIds = bom.getCostIds(CurrentCostId.class);
final Map<CurrentCostId, CurrentCost> existingCostsById = currentCostsRepo.getByIds(costIds)
.stream()
.collect(GuavaCollectors.toImmutableMapByKey(CurrentCost::getId));
bom.streamCostPrices()
... | elementPrice.setId(existingCost.getId());
}
}
private static BOMCostElementPrice toBOMCostElementPrice(@NonNull final CurrentCost currentCost)
{
return BOMCostElementPrice.builder()
.id(currentCost.getId())
.costElementId(currentCost.getCostElementId())
.costPrice(currentCost.getCostPrice())
.bu... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\costing\BatchProcessBOMCostCalculatorRepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static Map<Integer, DesadvLineWithPacks> getLinesWithPacks(@NonNull final List<EDIExpDesadvPackType> packs)
{
final Map<Integer, List<SinglePack>> lineIdToPacksCollector = new HashMap<>();
final Map<Integer, EDIExpDesadvLineType> lineIdToLine = new HashMap<>();
packs.forEach(pack -> {
final SinglePac... | .desadvLine(desadvLine)
.singlePacks(lineIdToPacksCollector.get(desadvLineID))
.build();
lineWithPacksCollector.put(desadvLineID, lineWithPacks);
});
return lineWithPacksCollector.build();
}
@NonNull
private static Map<Integer, EDIExpDesadvLineType> getLinesWithNoPacks(@NonNull final List<EDIExpD... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\desadvexport\helper\DesadvParser.java | 2 |
请完成以下Java代码 | public class User {
private final Logger logger = LoggerFactory.getLogger(User.class);
private long id;
private String name;
private String email;
public User(long id, String name, String email) {
this.id = id;
this.name = name;
this.email = email;
}
@Override
... | return id == user.id && (name.equals(user.name) && email.equals(user.email));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((email == null) ? 0 : email.hashCode());
result = prime * result + (int) (id ^ (id >>> 32));
... | repos\tutorials-master\core-java-modules\core-java-lang-oop-methods\src\main\java\com\baeldung\hashcode\eclipse\User.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class Article {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column(nullable = false)
private String title;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "author_id", nullable = false)
private Author author;
public Long getId() {
retur... | }
public void setTitle(String title) {
this.title = title;
}
public Author getAuthor() {
return author;
}
public void setAuthor(Author author) {
this.author = author;
}
} | repos\tutorials-master\persistence-modules\hibernate6\src\main\java\com\baeldung\statelesssession\Article.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getCharSet() {
return charSet;
}
public void setCharSet(String charSet) {
this.charSet = charSet;
}
public boolean isSslVerify() {
return sslVerify;
}
public void setSslVerify(boolean sslVerify) {
this.sslVerify = sslVerify;
}
public int getMaxResultSize() {
return maxResultSize;
}
pub... | }
public void setPostData(String postData) {
this.postData = postData;
}
public ClientKeyStore getClientKeyStore() {
return clientKeyStore;
}
public void setClientKeyStore(ClientKeyStore clientKeyStore) {
this.clientKeyStore = clientKeyStore;
}
public com.roncoo.pay.trade.utils.httpclient.TrustKeyStore g... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\utils\httpclient\SimpleHttpParam.java | 2 |
请完成以下Java代码 | public void setES_CreateIndexCommand (final java.lang.String ES_CreateIndexCommand)
{
set_Value (COLUMNNAME_ES_CreateIndexCommand, ES_CreateIndexCommand);
}
@Override
public java.lang.String getES_CreateIndexCommand()
{
return get_ValueAsString(COLUMNNAME_ES_CreateIndexCommand);
}
@Override
public void s... | public int getES_FTS_Config_ID()
{
return get_ValueAsInt(COLUMNNAME_ES_FTS_Config_ID);
}
@Override
public void setES_Index (final java.lang.String ES_Index)
{
set_Value (COLUMNNAME_ES_Index, ES_Index);
}
@Override
public java.lang.String getES_Index()
{
return get_ValueAsString(COLUMNNAME_ES_Index);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java-gen\de\metas\elasticsearch\model\X_ES_FTS_Config.java | 1 |
请完成以下Java代码 | public void setMaxLaunchers (final int MaxLaunchers)
{
set_Value (COLUMNNAME_MaxLaunchers, MaxLaunchers);
}
@Override
public int getMaxLaunchers()
{
return get_ValueAsInt(COLUMNNAME_MaxLaunchers);
}
@Override
public void setMaxStartedLaunchers (final int MaxStartedLaunchers)
{
set_Value (COLUMNNAME_Ma... | return get_ValueAsInt(COLUMNNAME_MaxStartedLaunchers);
}
@Override
public void setMobileUI_UserProfile_DD_ID (final int MobileUI_UserProfile_DD_ID)
{
if (MobileUI_UserProfile_DD_ID < 1)
set_ValueNoCheck (COLUMNNAME_MobileUI_UserProfile_DD_ID, null);
else
set_ValueNoCheck (COLUMNNAME_MobileUI_UserProfil... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MobileUI_UserProfile_DD.java | 1 |
请完成以下Java代码 | public void setM_Product_ID (final int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, M_Product_ID);
}
@Override
public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setP... | }
@Override
public java.sql.Timestamp getValidFrom()
{
return get_ValueAsTimestamp(COLUMNNAME_ValidFrom);
}
@Override
public void setValidTo (final java.sql.Timestamp ValidTo)
{
set_Value (COLUMNNAME_ValidTo, ValidTo);
}
@Override
public java.sql.Timestamp getValidTo()
{
return get_ValueAsTimestam... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Campaign_Price.java | 1 |
请完成以下Java代码 | public int getExternalSystem_Outbound_Endpoint_ID()
{
return get_ValueAsInt(COLUMNNAME_ExternalSystem_Outbound_Endpoint_ID);
}
@Override
public void setLoginUsername (final @Nullable String LoginUsername)
{
set_Value (COLUMNNAME_LoginUsername, LoginUsername);
}
@Override
public String getLoginUsername() ... | {
set_Value (COLUMNNAME_SasSignature, SasSignature);
}
@Override
public String getSasSignature()
{
return get_ValueAsString(COLUMNNAME_SasSignature);
}
/**
* Type AD_Reference_ID=542016
* Reference name: ExternalSystem_Outbound_Endpoint_EndpointType
*/
public static final int TYPE_AD_Reference_ID=5... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Outbound_Endpoint.java | 1 |
请完成以下Java代码 | protected void createDefaultAuthorizations(ProcessDefinition processDefinition) {
if(isAuthorizationEnabled()) {
ResourceAuthorizationProvider provider = getResourceAuthorizationProvider();
AuthorizationEntity[] authorizations = provider.newProcessDefinition(processDefinition);
saveDefaultAuthoriz... | @Override
public ProcessDefinitionEntity findLatestDefinitionByKeyAndTenantId(String definitionKey, String tenantId) {
return findLatestProcessDefinitionByKeyAndTenantId(definitionKey, tenantId);
}
@Override
public ProcessDefinitionEntity findDefinitionByKeyVersionAndTenantId(String definitionKey, Integer ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\ProcessDefinitionManager.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class InventoryId implements RepoIdAware
{
@JsonCreator
public static InventoryId ofRepoId(final int repoId)
{
return new InventoryId(repoId);
}
public static InventoryId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? ofRepoId(repoId) : null;
}
public static int toRepoId(@Nullable final Inv... | int repoId;
private InventoryId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "M_Inventory_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\inventory\InventoryId.java | 2 |
请完成以下Java代码 | public Void call() throws Exception {
ScriptInvocation invocation = new ScriptInvocation(script, execution);
Context.getProcessEngineConfiguration().getDelegateInterceptor().handleInvocation(invocation);
Object result = invocation.getInvocationResult();
if (result != null && resultVariab... | * BpmnError was found
*/
protected BpmnError checkIfCauseOfExceptionIsBpmnError(Throwable e) {
if (e instanceof BpmnError) {
return (BpmnError) e;
} else if (e.getCause() == null) {
return null;
}
return checkIfCauseOfExceptionIsBpmnError(e.getCause());
}
public ExecutableS... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\behavior\ScriptTaskActivityBehavior.java | 1 |
请完成以下Java代码 | public BootstrapConfig get(String endpoint) {
return bootstrapByEndpoint.get(endpoint);
}
@Override
public Map<String, BootstrapConfig> getAll() {
readLock.lock();
try {
return super.getAll();
} finally {
readLock.unlock();
}
}
@Overr... | public void addToStore(String endpoint, BootstrapConfig config) throws InvalidConfigurationException {
configChecker.verify(config);
// Check PSK identity uniqueness for bootstrap server:
PskByServer pskToAdd = getBootstrapPskIdentity(config);
if (pskToAdd != null) {
Bootstra... | repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\bootstrap\store\LwM2MInMemoryBootstrapConfigStore.java | 1 |
请完成以下Java代码 | public Pipe<M, M> get(int index)
{
return pipeList.get(index);
}
@Override
public Pipe<M, M> set(int index, Pipe<M, M> element)
{
return pipeList.set(index, element);
}
@Override
public void add(int index, Pipe<M, M> element)
{
pipeList.add(index, element);
... | @Override
public Pipe<M, M> remove(int index)
{
return pipeList.remove(index);
}
@Override
public int indexOf(Object o)
{
return pipeList.indexOf(o);
}
@Override
public int lastIndexOf(Object o)
{
return pipeList.lastIndexOf(o);
}
@Override
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\tokenizer\pipe\Pipeline.java | 1 |
请完成以下Java代码 | public Object invoke(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes, Object[] params) {
Method method = getMethod(bindings, context, returnType, paramTypes);
try {
return method.invoke(null, params);
} catch (IllegalAccessException e) {
throw new ELException(LocalMessages.g... | return index;
}
public String getName() {
return name;
}
public int getCardinality() {
return 0;
}
public AstNode getChild(int i) {
return null;
}
} | repos\camunda-bpm-platform-master\juel\src\main\java\org\camunda\bpm\impl\juel\AstIdentifier.java | 1 |
请完成以下Java代码 | public @Nullable Http2 getHttp2() {
return this.http2;
}
@Override
public void setHttp2(@Nullable Http2 http2) {
this.http2 = http2;
}
public @Nullable Compression getCompression() {
return this.compression;
}
@Override
public void setCompression(@Nullable Compression compression) {
this.compression ... | }
/**
* Return the {@link SslBundle} that should be used with this server.
* @return the SSL bundle
*/
protected final SslBundle getSslBundle() {
return WebServerSslBundle.get(this.ssl, this.sslBundles);
}
protected final Map<String, SslBundle> getServerNameSslBundles() {
Assert.state(this.ssl != null, ... | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\AbstractConfigurableWebServerFactory.java | 1 |
请完成以下Java代码 | protected void publishFailureEvent(UsernamePasswordAuthenticationToken token, AuthenticationException ase) {
// exists for passivity (the superclass does a null check before publishing)
getApplicationEventPublisher().publishEvent(new JaasAuthenticationFailedEvent(token, ase));
}
public Resource getLoginConfig() ... | */
public void setLoginConfig(Resource loginConfig) {
this.loginConfig = loginConfig;
}
/**
* If set, a call to {@code Configuration#refresh()} will be made by
* {@code #configureJaas(Resource) } method. Defaults to {@code true}.
* @param refresh set to {@code false} to disable reloading of the configuratio... | repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\jaas\JaasAuthenticationProvider.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
public String getName() {
return name;
}
public String getCaseInstanceId() {
return caseInstanceId;
}
public String getCaseDefinitionId() {
return caseDefinitionId;
}
public Date getReachedBefore() {
return ... | public Date getReachedAfter() {
return reachedAfter;
}
public String getTenantId() {
return tenantId;
}
public String getTenantIdLike() {
return tenantIdLike;
}
public boolean isWithoutTenantId() {
return withoutTenantId;
}
} | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\history\HistoricMilestoneInstanceQueryImpl.java | 1 |
请完成以下Java代码 | public static DelegateExecution getParentInstanceExecutionInMultiInstance(ExecutionEntity execution) {
ExecutionEntity instanceExecution = null;
ExecutionEntity currentExecution = execution;
while (currentExecution != null && instanceExecution == null && currentExecution.getParentId() != null) {... | String activityId = execution.getCurrentActivityId();
if (StringUtils.isNotEmpty(activityId)) {
List<String> boundaryEventActivityIds = new ArrayList<>();
List<BoundaryEvent> boundaryEvents = process.findFlowElementsOfType(BoundaryEvent.class, true);
for (BoundaryEvent bounda... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\util\ExecutionGraphUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ProxyExchangeWebMvcProperties {
/**
* Properties prefix.
*/
public static final String PREFIX = "spring.cloud.gateway.proxy-exchange.webmvc";
/**
* Contains headers that are considered sensitive by default.
*/
public static Set<String> DEFAULT_SENSITIVE = Set.of("cookie", "authorization");
... | public void setHeaders(Map<String, String> headers) {
this.headers = headers;
}
public Set<String> getAutoForward() {
return autoForward;
}
public void setAutoForward(Set<String> autoForward) {
this.autoForward = autoForward;
}
public Set<String> getSensitive() {
return sensitive;
}
public void setS... | repos\spring-cloud-gateway-main\spring-cloud-gateway-proxyexchange-webmvc\src\main\java\org\springframework\cloud\gateway\mvc\config\ProxyExchangeWebMvcProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | void setSecurityWebFilterChains(List<SecurityWebFilterChain> securityWebFilterChains) {
this.securityWebFilterChains = securityWebFilterChains;
}
@Autowired(required = false)
void setFilterChainPostProcessor(ObjectPostProcessor<WebFilterChainDecorator> postProcessor) {
this.postProcessor = postProcessor;
}
@... | private SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
http.authorizeExchange((authorize) -> authorize.anyExchange().authenticated());
if (isOAuth2Present && OAuth2ClasspathGuard.shouldConfigure(this.context)) {
OAuth2ClasspathGuard.configure(this.context, http);
}
else {
http... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\reactive\WebFluxSecurityConfiguration.java | 2 |
请完成以下Java代码 | public boolean isZeroTax()
{
return getRate().signum() == 0;
} // isZeroTax
@Override
public String toString()
{
StringBuffer sb = new StringBuffer("MTax[")
.append(get_ID())
.append(", Name = ").append(getName())
.append(", SO/PO=").append(getSOPOType())
.append(", Rate=").append(getRate())
.... | * After Save
* @param newRecord new
* @param success success
* @return success
*/
@Override
protected boolean afterSave (boolean newRecord, boolean success)
{
if (newRecord && success)
insert_Accounting("C_Tax_Acct", "C_AcctSchema_Default", null);
return success;
} // afterSave
/**
* Before De... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MTax.java | 1 |
请完成以下Java代码 | public static String key(String name) {
return PREFIX + "." + name;
}
private final String version;
private final boolean isEnterprise;
private final String formattedVersion;
public CamundaBpmVersion() {
this(ProcessEngine.class.getPackage());
}
CamundaBpmVersion(final Package pkg) {
this.v... | return version;
}
public boolean isEnterprise() {
return isEnterprise;
}
public PropertiesPropertySource getPropertiesPropertySource() {
final Properties props = new Properties();
props.put(key(VERSION), version);
props.put(key(IS_ENTERPRISE), isEnterprise);
props.put(key(FORMATTED_VERSION... | repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\util\CamundaBpmVersion.java | 1 |
请完成以下Java代码 | public int getValue()
{
return value;
}
public static boolean equals(@Nullable final JsonMetasfreshId id1, @Nullable final JsonMetasfreshId id2)
{
return Objects.equals(id1, id2);
}
@Nullable
public static Integer toValue(@Nullable final JsonMetasfreshId externalId)
{
if (externalId == null)
{
retu... | @NonNull
public static Optional<Integer> toValueOptional(@Nullable final JsonMetasfreshId externalId)
{
return Optional.ofNullable(toValue(externalId));
}
@Nullable
public static <T> T mapToOrNull(@Nullable final JsonMetasfreshId externalId, @NonNull final Function<Integer, T> mapper)
{
return toValueOptiona... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-rest_api\src\main\java\de\metas\common\rest_api\common\JsonMetasfreshId.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public PlatformTransactionManager hibernateTransactionManager() {
final HibernateTransactionManager transactionManager = new HibernateTransactionManager();
transactionManager.setSessionFactory(sessionFactory().getObject());
return transactionManager;
}
@Bean
public PersistenceExcept... | private final Properties hibernateProperties() {
final Properties hibernateProperties = new Properties();
hibernateProperties.setProperty("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto"));
hibernateProperties.setProperty("hibernate.dialect", env.getProperty("hibernate.dialect"... | repos\tutorials-master\persistence-modules\spring-hibernate-5\src\main\java\com\baeldung\spring\PersistenceConfig.java | 2 |
请完成以下Java代码 | private void publishInvitations(final I_C_RfQResponse rfqResponse)
{
final List<SyncRfQ> syncRfqs = SyncObjectsFactory.newFactory()
.createSyncRfQs(rfqResponse);
if (syncRfqs.isEmpty())
{
logger.debug("Skip publishing the invitations because there are none for {}", rfqResponse);
return;
}
this.syn... | if (!syncRfQsCopy.isEmpty())
{
webuiPush.pushRfQs(syncRfQsCopy);
}
// Push close events
{
final List<SyncRfQCloseEvent> syncRfQCloseEventsCopy = copyAndClear(this.syncRfQCloseEvents);
if (!syncRfQCloseEventsCopy.isEmpty())
{
webuiPush.pushRfQCloseEvents(syncRfQCloseEventsCopy);
}
// Inte... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\rfq\PMMWebuiRfQResponsePublisherInstance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<T> findJobsToExecute(List<String> enabledCategories, Page page) {
return dataManager.findJobsToExecute(enabledCategories, page);
}
@Override
public List<T> findJobsByExecutionId(String executionId) {
return dataManager.findJobsByExecutionId(executionId);
}
@Override
... | public void resetExpiredJob(String jobId) {
dataManager.resetExpiredJob(jobId);
}
@Override
public void bulkUpdateJobLockWithoutRevisionCheck(List<T> jobEntities, String lockOwner, Date lockExpirationTime) {
dataManager.bulkUpdateJobLockWithoutRevisionCheck(jobEntities, lockOwner, lockExpir... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\JobInfoEntityManagerImpl.java | 2 |
请完成以下Java代码 | public void triggerSyncAvailableForSales(@NonNull final I_C_OrderLine orderLineRecord)
{
syncOrderLineWithAvailableForSales(orderLineRecord);
if (!InterfaceWrapperHelper.isNew(orderLineRecord))
{
final I_C_OrderLine orderLineOld = InterfaceWrapperHelper.createOld(orderLineRecord, I_C_OrderLine.class);
sy... | if (!config.isFeatureEnabled())
{
return; // nothing to do
}
availableForSalesUtil.syncAvailableForSalesForOrderLine(orderLineRecord, config);
}
@NonNull
private AvailableForSalesConfig getAvailableForSalesConfig(@NonNull final I_C_OrderLine orderLineRecord)
{
return availableForSalesConfigRepo.getConf... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\availableforsales\interceptor\C_OrderLine.java | 1 |
请完成以下Java代码 | public void setRecordKey(RecordKey recordKey) {
this.recordKey = recordKey;
}
public KafkaPartition getPartition() {
return partition;
}
public void setPartition(KafkaPartition partition) {
this.partition = partition;
}
@JsonInclude(Include.NON_NULL)
public static ... | @JsonInclude(Include.NON_NULL)
public static class RecordKey {
protected String fixedValue;
protected String eventField;
protected String delegateExpression;
public String getFixedValue() {
return fixedValue;
}
public void setFixedValue(String fixedVa... | repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\KafkaOutboundChannelModel.java | 1 |
请完成以下Java代码 | public class GenericIdentification32 {
@XmlElement(name = "Id", required = true)
protected String id;
@XmlElement(name = "Tp")
@XmlSchemaType(name = "string")
protected PartyType3Code tp;
@XmlElement(name = "Issr")
@XmlSchemaType(name = "string")
protected PartyType4Code issr;
@XmlE... | * possible object is
* {@link PartyType4Code }
*
*/
public PartyType4Code getIssr() {
return issr;
}
/**
* Sets the value of the issr property.
*
* @param value
* allowed object is
* {@link PartyType4Code }
*
*/
public... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\GenericIdentification32.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public MedicineProcessor medicineProcessor(@Value("#{jobParameters}") Map<String, Object> jobParameters) {
MedicineProcessor medicineProcessor = new MedicineProcessor();
enrichWithJobParameters(jobParameters, medicineProcessor);
return medicineProcessor;
}
@Bean
@StepScope
publi... | return new JobBuilder("medExpirationJob", jobRepository).incrementer(new RunIdIncrementer())
.start(notifyAboutExpiringMedicine)
.build();
}
private void enrichWithJobParameters(Map<String, Object> jobParameters, ContainsJobParameters container) {
if (jobParameters.get(BatchCons... | repos\tutorials-master\spring-batch\src\main\java\com\baeldung\batchreaderproperties\BatchConfiguration.java | 2 |
请完成以下Java代码 | public class DocumentsType {
@XmlElement(namespace = "http://www.forum-datenaustausch.ch/invoice", required = true)
protected List<DocumentType> document;
@XmlAttribute(name = "number", required = true)
@XmlSchemaType(name = "unsignedLong")
protected BigInteger number;
/**
* Gets the valu... | document = new ArrayList<DocumentType>();
}
return this.document;
}
/**
* Gets the value of the number property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getNumber() {
return number;
}
/**... | 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\DocumentsType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String auditUI(Model model, @RequestParam("id") String id) {
RpSettRecord settRecord = rpSettQueryService.getDataById(id);
model.addAttribute("settRecord", settRecord);
return "sett/audit";
}
/**
* 函数功能说明 : 发起结算
*
* @参数: @return
* @return String
* @throws
*/
@RequiresPermissions("sett:rec... | String remark = request.getParameter("remark");
rpSettHandleService.remit(settId, settStatus, remark);
dwz.setStatusCode(DWZ.SUCCESS);
dwz.setMessage(DWZ.SUCCESS_MSG);
model.addAttribute("dwz", dwz);
return DWZ.AJAX_DONE;
}
/**
* 函数功能说明 :查看
*
* @参数: @return
* @return String
* @throws
*/
@Req... | repos\roncoo-pay-master\roncoo-pay-web-boss\src\main\java\com\roncoo\pay\controller\sett\SettController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class BaseRestApiConfiguration implements ApplicationContextAware {
protected ApplicationContext applicationContext;
protected MultipartConfigElement multipartConfigElement;
@Override
public void setApplicationContext(ApplicationContext applicationContext) {
this.applicationContext = a... | String urlMapping = (path.endsWith("/") ? path + "*" : path + "/*");
ServletRegistrationBean registrationBean = new ServletRegistrationBean(servlet, urlMapping);
registrationBean.setName(servletProperties.getName());
registrationBean.setLoadOnStartup(servletProperties.getLoadOnStartup());
... | repos\flowable-engine-main\modules\flowable-spring-boot\flowable-spring-boot-starters\flowable-spring-boot-autoconfigure\src\main\java\org\flowable\spring\boot\rest\BaseRestApiConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public static PickingLineSortBy ofCode(@NonNull final String code)
{
return index.ofCode(code);
}
@Nullable
public static PickingLineSortBy ofNullableCode(@Nullable final String code)
{
return index.ofNullableCode(code);
}
private final String code;
@NonNull
public List<PickingJobLine> sort(@NonNull fin... | @NonNull
private Comparator<PickingJobLine> getComparator()
{
switch (this)
{
case ORDER_LINE_SEQ_NO:
return Comparator.comparing(PickingJobLine::getOrderLineSeqNo);
case QTY_TO_PICK_ASC:
return Comparator.comparing(PickingJobLine::getQtyToPick);
case QTY_TO_PICK_DESC:
return Comparator.compa... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\config\mobileui\PickingLineSortBy.java | 2 |
请完成以下Java代码 | default List<String> getGrantTypes() {
return getClaimAsStringList(OAuth2ClientMetadataClaimNames.GRANT_TYPES);
}
/**
* Returns the OAuth 2.0 {@code response_type} values that the Client will restrict
* itself to using {@code (response_types)}.
* @return the OAuth 2.0 {@code response_type} values that the Cl... | * @return the OAuth 2.0 {@code scope} values that the Client will restrict itself to
* using
*/
default List<String> getScopes() {
return getClaimAsStringList(OAuth2ClientMetadataClaimNames.SCOPE);
}
/**
* Returns the {@code URL} for the Client's JSON Web Key Set {@code (jwks_uri)}.
* @return the {@code U... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\OAuth2ClientMetadataClaimAccessor.java | 1 |
请完成以下Java代码 | public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append('[');
int i = 1;
for (Word word : innerList)
{
sb.append(word.getValue());
String label = word.getLabel();
if (label != null)
{
sb.appe... | if (cutIndex <= 2 || cutIndex == param.length() - 1) return null;
String wordParam = param.substring(1, cutIndex);
List<Word> wordList = new LinkedList<Word>();
for (String single : wordParam.split("\\s+"))
{
if (single.length() == 0) continue;
Word word = Word.c... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\document\sentence\word\CompoundWord.java | 1 |
请完成以下Java代码 | public class Serie {
private String name;
private String type;
private List<Double> data;
private Label label;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getType() {
return type;
}
... | return data;
}
public void setData(List<Double> data) {
this.data = data;
}
public Label getLabel() {
return label;
}
public void setLabel(Label label) {
this.label = label;
}
} | repos\SpringBootBucket-master\springboot-echarts\src\main\java\com\xncoding\echarts\api\model\jmh\Serie.java | 1 |
请完成以下Java代码 | protected TableRecordReference extractModelToEnqueueFromItem(final Collector collector, final Object model)
{
return TableRecordReference.of(model);
}
@Nullable
@Override
protected UserId extractUserInChargeOrNull(final Object model)
{
final Properties ctx = extractCtxFromItem(model);
return Env.g... | @Override
public Result processWorkPackage(@NonNull final I_C_Queue_WorkPackage workpackage, final String localTrxName)
{
try (final IAutoCloseable ignored = invoiceCandBL.setUpdateProcessInProgress())
{
final List<Object> models = queueDAO.retrieveAllItemsSkipMissing(workpackage, Object.class);
for (final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\async\spi\impl\CreateMissingInvoiceCandidatesWorkpackageProcessor.java | 1 |
请完成以下Java代码 | public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing ()
{
Object oo = get_Value(COLUMNNAME_Processing);
if (oo != null)
{
if (oo instanceof Boolean)
return ... | /** Get Sql WHERE.
@return Fully qualified SQL WHERE clause
*/
public String getWhereClause ()
{
return (String)get_Value(COLUMNNAME_WhereClause);
}
@Override
public String getBeforeChangeWarning()
{
return (String)get_Value(COLUMNNAME_BeforeChangeWarning);
}
@Override
public void setBeforeChangeWa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Index_Table.java | 1 |
请完成以下Java代码 | public String getTenantId() {
return tenantId;
}
public String getProcessDefinitionTenantId() {
return processDefinitionTenantId;
}
public boolean isProcessDefinitionTenantIdSet() {
return isProcessDefinitionTenantIdSet;
}
public void setModificationBuilder(ProcessInstanceModificationBuilderI... | }
public static ProcessInstantiationBuilder createProcessInstanceById(CommandExecutor commandExecutor, String processDefinitionId) {
ProcessInstantiationBuilderImpl builder = new ProcessInstantiationBuilderImpl(commandExecutor);
builder.processDefinitionId = processDefinitionId;
return builder;
}
pu... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ProcessInstantiationBuilderImpl.java | 1 |
请完成以下Java代码 | public class ExchangeRateInformation1 {
@XmlElement(name = "XchgRate")
protected BigDecimal xchgRate;
@XmlElement(name = "RateTp")
@XmlSchemaType(name = "string")
protected ExchangeRateType1Code rateTp;
@XmlElement(name = "CtrctId")
protected String ctrctId;
/**
* Gets the value o... | public void setRateTp(ExchangeRateType1Code value) {
this.rateTp = value;
}
/**
* Gets the value of the ctrctId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCtrctId() {
return ctrctId;
}
/**
... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\ExchangeRateInformation1.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_M_InventoryLine getM_InventoryLine()
{
return get_ValueAsPO(COLUMNNAME_M_InventoryLine_ID, org.compiere.model.I_M_InventoryLine.class);
}
@Override
public void setM_InventoryLine(final org.compiere.model.I_M_InventoryLine M_InventoryLine)
{
set_ValueFromPO(COLUMNNAME_M_InventoryLin... | {
if (MD_Candidate_ID < 1)
set_Value (COLUMNNAME_MD_Candidate_ID, null);
else
set_Value (COLUMNNAME_MD_Candidate_ID, MD_Candidate_ID);
}
@Override
public int getMD_Candidate_ID()
{
return get_ValueAsInt(COLUMNNAME_MD_Candidate_ID);
}
@Override
public void setMD_Candidate_StockChange_Detail_ID (fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java-gen\de\metas\material\dispo\model\X_MD_Candidate_StockChange_Detail.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ServletContextInitializer servletContextInitializer() {
return (servletContext) -> {
ServletRegistration initServlet = servletContext.addServlet("initServlet", InitServlet.class);
initServlet.addMapping("/initServlet");
initServlet.setInitParameter("name", "initServlet... | @Bean
public RestClient defaultRestClient(RestClient.Builder restClientBuilder) {
ClientHttpRequestFactorySettings settings = ClientHttpRequestFactorySettings.DEFAULTS
.withConnectTimeout(Duration.ofSeconds(3))
.withReadTimeout(Duration.ofSeconds(3));
ClientHttpReques... | repos\spring-boot-best-practice-master\spring-boot-web\src\main\java\cn\javastack\springboot\web\config\WebConfig.java | 2 |
请完成以下Java代码 | public LookupValue retrieveLookupValueById(final @NonNull LookupDataSourceContext evalCtx)
{
final Object id = evalCtx.getSingleIdToFilterAsObject();
if (id == null)
{
throw new IllegalStateException("No ID provided in " + evalCtx);
}
return getLookupValueById(id);
}
public LookupValue getLookupValueB... | private LookupValuesList getAllCountriesById()
{
final Object cacheKey = "ALL";
return allCountriesCache.getOrLoad(cacheKey, this::retriveAllCountriesById);
}
private LookupValuesList retriveAllCountriesById()
{
return Services.get(ICountryDAO.class)
.getCountries(Env.getCtx())
.stream()
.map(thi... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\address\AddressCountryLookupDescriptor.java | 1 |
请完成以下Java代码 | public void parseText(char[] text, AhoCorasickDoubleArrayTrie.IHit<V> processor)
{
int length = text.length;
int begin = 0;
BaseNode<V> state = this;
for (int i = begin; i < length; ++i)
{
state = state.transition(text[i]);
if (state != null)
... | if (i == length - 1)
{
i = begin;
++begin;
state = this;
}
}
else
{
i = begin;
++begin;
state = this;
}
}
}
} | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\trie\bintrie\BinTrie.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void deleteDefaultPackPermission(String packCode, String permissionId) {
if (oConvertUtils.isEmpty(packCode)) {
return;
}
//查询当前匹配非默认套餐包的其他默认套餐包
LambdaQueryWrapper<SysTenantPack> query = new LambdaQueryWrapper<>();
query.ne(SysTenantPack::getPackType, CommonCo... | query.ne(SysTenantPack::getPackType, CommonConstant.TENANT_PACK_DEFAULT);
query.eq(SysTenantPack::getPackCode, sysTenantPack.getPackCode());
List<SysTenantPack> relatedPacks = sysTenantPackMapper.selectList(query);
for (SysTenantPack pack : relatedPacks) {
//更新自定义套餐
pack.... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysTenantPackServiceImpl.java | 2 |
请完成以下Java代码 | public int length() {
return this.value.length();
}
@Override
public char charAt(int index) {
return this.value.charAt(index);
}
@Override
public CharSequence subSequence(int start, int end) {
return this.value.subSequence(start, end);
}
public String[] split(... | return this.value.split(regex);
}
/**
* @return 原始字符串
*/
public String get() {
return this.value;
}
@Override
public String toString() {
return this.value;
}
} | repos\SpringBootCodeGenerator-master\src\main\java\com\softdev\system\generator\entity\NonCaseString.java | 1 |
请完成以下Java代码 | public BaseResponse report(@RequestHeader(name="Content-Type", defaultValue = "application/json") String contentType,
@RequestHeader(name="Authorization", defaultValue="token") String token,
@RequestBody ReportParam param) {
_logger.info("定时报告接口 star... | @RequestMapping(value = "/version", method = RequestMethod.POST)
public VersionResult version(@RequestHeader(name="Content-Type", defaultValue = "application/json") String contentType,
@RequestHeader(name="Authorization", defaultValue="token") String token,
... | repos\SpringBootBucket-master\springboot-swagger2\src\main\java\com\xncoding\jwt\api\PublicController.java | 1 |
请完成以下Java代码 | public class MLanguage extends X_AD_Language
{
/**
*
*/
private static final long serialVersionUID = 6415602943484245447L;
private static final Logger s_log = LogManager.getLogger(MLanguage.class);
// metas: begin: base language
/**
* Load the BaseLanguage from AD_Language table and set it to {@link Langua... | if (Check.isEmpty(datePattern))
{
return; // OK
}
if (datePattern.indexOf("MM") == -1)
{
throw new AdempiereException("@Error@ @DatePattern@ - No Month (MM)");
}
if (datePattern.indexOf("dd") == -1)
{
throw new AdempiereException("@Error@ @DatePattern@ - No Day (dd)");
}
if (datePattern.inde... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MLanguage.java | 1 |
请完成以下Java代码 | private AbstractReceiptScheduleEvent createDeletedEvent(@NonNull final I_M_ReceiptSchedule receiptSchedule)
{
final MaterialDescriptor orderedMaterial = createOrderMaterialDescriptor(receiptSchedule);
final MinMaxDescriptor minMaxDescriptor = replenishInfoRepository.getBy(orderedMaterial).toMinMaxDescriptor();
... | final BigDecimal orderedQuantity = receiptScheduleQtysBL.getQtyOrdered(receiptSchedule);
final Timestamp preparationDate = receiptSchedule.getMovementDate();
final ProductDescriptor productDescriptor = productDescriptorFactory.createProductDescriptor(receiptSchedule);
return MaterialDescriptor.builder()
.d... | repos\metasfresh-new_dawn_uat\backend\de.metas.purchasecandidate.base\src\main\java\de\metas\purchasecandidate\material\interceptor\M_ReceiptSchedule_PostMaterialEvent.java | 1 |
请完成以下Java代码 | private static void parseField(final PO po, final String columnName, final Collection<MADBoilerPlateVar> vars)
{
final String text = po.get_ValueAsString(columnName);
if (text == null || Check.isBlank(text))
return;
//
final BoilerPlateContext attributes = BoilerPlateContext.builder()
.setSourceDocument... | m.appendTail(sb);
final String textParsed = sb.toString();
po.set_ValueOfColumn(columnName, textParsed);
}
private static void setDunningRunEntryNote(final I_C_DunningRunEntry dre)
{
final Properties ctx = InterfaceWrapperHelper.getCtx(dre);
final String trxName = InterfaceWrapperHelper.getTrxName(dre);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\letters\model\LettersValidator.java | 1 |
请完成以下Java代码 | public String getValue() {
return this.value;
}
/**
* Gets an instance of {@link AuthenticatorTransport}.
* @param value the value of the {@link AuthenticatorTransport}
* @return the {@link AuthenticatorTransport}
*/
public static AuthenticatorTransport valueOf(String value) {
switch (value) {
case "... | case "smart-card":
return SMART_CARD;
case "hybrid":
return HYBRID;
case "internal":
return INTERNAL;
default:
return new AuthenticatorTransport(value);
}
}
public static AuthenticatorTransport[] values() {
return new AuthenticatorTransport[] { USB, NFC, BLE, HYBRID, INTERNAL };
}
} | repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\AuthenticatorTransport.java | 1 |
请完成以下Java代码 | public void setS_Resource(org.compiere.model.I_S_Resource S_Resource)
{
set_ValueFromPO(COLUMNNAME_S_Resource_ID, org.compiere.model.I_S_Resource.class, S_Resource);
}
/** Set Ressource.
@param S_Resource_ID
Resource
*/
@Override
public void setS_Resource_ID (int S_Resource_ID)
{
if (S_Resource_ID < ... | */
@Override
public void setValue (java.lang.String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
/** Get Suchschlüssel.
@return Search key for the record in the format required - must be unique
*/
@Override
public java.lang.String getValue ()
{
return (java.lang.String)get_Value(COLUMNNAME_Value);... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_MRP.java | 1 |
请完成以下Java代码 | public DocumentValidStatus getValidStatus()
{
return _validStatus;
}
@Override
public DocumentValidStatus updateStatusIfInitialInvalidAndGet(final IDocumentChangesCollector changesCollector)
{
if (_validStatus.isInitialInvalid())
{
updateValid(changesCollector);
}
return _validStatus;
}
@Override
... | return !isInitialValue();
}
private boolean isInitialValue()
{
return DataTypes.equals(_value, _initialValue);
}
@Override
public Optional<WindowId> getZoomIntoWindowId()
{
final LookupDataSource lookupDataSource = getLookupDataSourceOrNull();
if (lookupDataSource == null)
{
return Optional.empty();... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentField.java | 1 |
请完成以下Java代码 | public WebServer getWebServer(HttpHandler httpHandler) {
ServletHttpHandlerAdapter servlet = new ServletHttpHandlerAdapter(httpHandler);
Server server = createJettyServer(servlet);
return new JettyWebServer(server, getPort() >= 0);
}
/**
* Set the {@link JettyResourceFactory} to get the shared resources from... | logger.info("Server initialized with port: " + port);
if (this.getMaxConnections() > -1) {
server.addBean(new NetworkConnectionLimit(this.getMaxConnections(), server));
}
if (Ssl.isEnabled(getSsl())) {
customizeSsl(server, address);
}
for (JettyServerCustomizer customizer : getServerCustomizers()) {
... | repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\reactive\JettyReactiveWebServerFactory.java | 1 |
请完成以下Java代码 | public boolean configureMessageConverters(final List<MessageConverter> messageConverters)
{
messageConverters.add(new MappingJackson2MessageConverter());
return true;
}
private static class LoggingChannelInterceptor implements ChannelInterceptor
{
private static final Logger logger = LogManager.getLogger(Log... | final UserSession userSession = UserSession.getCurrentOrNull();
if (userSession == null)
{
logger.warn("Websocket connection not allowed (missing userSession)");
response.setStatusCode(HttpStatus.UNAUTHORIZED);
return false;
}
if (!userSession.isLoggedIn())
{
logger.warn("Websocket conne... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\websocket\WebsocketConfig.java | 1 |
请完成以下Java代码 | public String getMethodAsString(Object payload) {
if (this.invokerHandlerMethod != null) {
return this.invokerHandlerMethod.getMethod().toGenericString();
}
else {
Assert.notNull(this.delegatingHandler, "'delegatingHandler' or 'invokerHandlerMethod' is required");
return this.delegatingHandler.getMethodN... | return this.delegatingHandler.getBean();
}
}
/**
* Return true if any handler method has an async reply type.
* @return the asyncReply.
* @since 2.2.21
*/
public boolean isAsyncReplies() {
return this.asyncReplies;
}
/**
* Build an {@link InvocationResult} for the result and inbound payload.
* @p... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\listener\adapter\HandlerAdapter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class StubProcessDefinitionDto extends ProcessDefinitionDto {
public void setId(String id) {
this.id = id;
}
public void setKey(String key) {
this.key = key;
}
public void setCategory(String category) {
this.category = category;
}
public void setDescription(String description) {
th... | this.version = version;
}
public void setResource(String resource) {
this.resource = resource;
}
public void setDeploymentId(String deploymentId) {
this.deploymentId = deploymentId;
}
public void setDiagram(String diagram) {
this.diagram = diagram;
}
public void setSuspended(boolean suspende... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\repository\StubProcessDefinitionDto.java | 2 |
请完成以下Java代码 | public void close() {
ProcessEngines.unregister(this);
if (asyncExecutor != null && asyncExecutor.isActive()) {
asyncExecutor.shutdown();
}
if (asyncHistoryExecutor != null && asyncHistoryExecutor.isActive()) {
asyncHistoryExecutor.shutdown();
}
R... | }
@Override
public TaskService getTaskService() {
return taskService;
}
@Override
public HistoryService getHistoryService() {
return historicDataService;
}
@Override
public RuntimeService getRuntimeService() {
return runtimeService;
}
@Override
pub... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\ProcessEngineImpl.java | 1 |
请完成以下Java代码 | public static boolean isInvalidIdentifierError(final Exception e)
{
return isErrorCode(e, 904);
}
/**
* Check if "invalid username/password" exception (aka ORA-01017)
*
* @param e exception
*/
public static boolean isInvalidUserPassError(final Exception e)
{
return isErrorCode(e, 1017);
}
/**
* C... | return isSQLState(e, PG_SQLSTATE_query_canceled);
}
return isErrorCode(e, 1013);
}
/**
* Task 08353
*/
public static boolean isDeadLockDetected(final Throwable e)
{
if (DB.isPostgreSQL())
{
return isSQLState(e, PG_SQLSTATE_deadlock_detected);
}
return isErrorCode(e, 40001); // not tested for ora... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\exceptions\DBException.java | 1 |
请完成以下Java代码 | static class SuspensionStateImpl implements SuspensionState {
public final int stateCode;
protected final String name;
public SuspensionStateImpl(int suspensionCode, String string) {
this.stateCode = suspensionCode;
this.name = string;
}
public int getStateCode() {
return stateC... | if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
SuspensionStateImpl other = (SuspensionStateImpl) obj;
if (stateCode != other.stateCode)
return false;
return true;
}
@Override
public String toString() {
return name;
}
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\SuspensionState.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setApplicationContext(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
Binder binder = Binder.get(this.applicationContext.getEnvironment());
... | registry.registerBeanDefinition(StringUtils.stripFilenameExtension(filename), beanDefinition);
}
}
private Resource[] getResources(String location, String pattern) {
try {
return this.applicationContext.getResources(ensureTrailingSlash(location) + pattern);
}
catch (IOException ex) {
return new... | repos\spring-boot-4.0.1\module\spring-boot-webservices\src\main\java\org\springframework\boot\webservices\autoconfigure\WebServicesAutoConfiguration.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.