instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public class MyProperties {
private final boolean enabled;
private final InetAddress remoteAddress;
private final Security security;
// tag::code[]
public MyProperties(boolean enabled, InetAddress remoteAddress, @DefaultValue Security security) {
this.enabled = enabled;
this.remoteAddress = remoteAddress;
... | private final String password;
private final List<String> roles;
public Security(String username, String password, @DefaultValue("USER") List<String> roles) {
this.username = username;
this.password = password;
this.roles = roles;
}
public String getUsername() {
return this.username;
}
publi... | repos\spring-boot-4.0.1\documentation\spring-boot-docs\src\main\java\org\springframework\boot\docs\features\externalconfig\typesafeconfigurationproperties\constructorbinding\nonnull\MyProperties.java | 2 |
请完成以下Java代码 | public Void execute(CommandContext commandContext) {
EnsureUtil.ensureNotNull(NotValidException.class, "incident id", incidentId);
IncidentEntity incident = (IncidentEntity) commandContext.getIncidentManager().findIncidentById(incidentId);
EnsureUtil.ensureNotNull(BadUserRequestException.class, "incident",... | }
protected void triggerHistoryEvent(CommandContext commandContext, IncidentEntity incident) {
HistoryLevel historyLevel = commandContext.getProcessEngineConfiguration().getHistoryLevel();
if (historyLevel.isHistoryEventProduced(HistoryEventTypes.INCIDENT_UPDATE, incident)) {
HistoryEventProcessor.proc... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SetAnnotationForIncidentCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AllergenId implements RepoIdAware
{
int repoId;
@JsonCreator
public static AllergenId ofRepoId(final int repoId)
{
return new AllergenId(repoId);
}
@Nullable
public static AllergenId ofRepoIdOrNull(@Nullable final Integer repoId)
{
return repoId != null && repoId > 0 ? new AllergenId(repoId) ... | {
return Objects.equals(o1, o2);
}
private AllergenId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "M_Allergen_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\allergen\AllergenId.java | 2 |
请完成以下Java代码 | public void setBeanFactory(BeanFactory beanFactory) {
this.beanFactory = beanFactory;
}
public void setBeanClassLoader(ClassLoader classLoader) {
this.beanClassLoader = classLoader;
}
public int getOrder() {
return this.order;
}
public void afterPropertiesSet() {
Assert.notNull(this.beanClassLoader, "b... | for (Annotation[] paramAnnotations : paramAnnotationsArray) {
ctr += 1;
for (Annotation pa : paramAnnotations) {
if (pa instanceof ProcessVariable) {
ProcessVariable pv = (ProcessVariable) pa;
String pvName = pv.value();
vars.put(ctr, pvName);
} else if (pa inst... | repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\components\aop\ActivitiStateAnnotationBeanPostProcessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setLastSeen(Date lastSeen) {
this.lastSeen = lastSeen;
}
public List<Item> getIncomes() {
return incomes;
}
public void setIncomes(List<Item> incomes) {
this.incomes = incomes;
}
public List<Item> getExpenses() {
return expenses;
}
public void setExpenses(List<Item> expenses) {
this.ex... | return saving;
}
public void setSaving(Saving saving) {
this.saving = saving;
}
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
} | repos\piggymetrics-master\account-service\src\main\java\com\piggymetrics\account\domain\Account.java | 2 |
请完成以下Java代码 | public Map<String, Object> getPlanItemInstanceLocalVariables() {
Map<String, Object> variables = new HashMap<>();
if (queryVariables != null) {
for (VariableInstance variableInstance : queryVariables) {
if (variableInstance.getId() != null && variableInstance.getSubScopeId() ... | stringBuilder.append(", name: ").append(getName());
}
stringBuilder.append(", definitionId: ")
.append(planItemDefinitionId)
.append(", state: ")
.append(state);
if (elementId != null) {
stringBuilder.append(", elementId: ").append(elementId);
... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\PlanItemInstanceEntityImpl.java | 1 |
请完成以下Java代码 | private boolean isRestarterInitialized() {
try {
Restarter restarter = Restarter.getInstance();
return (restarter != null && restarter.getInitialUrls() != null);
}
catch (Exception ex) {
return false;
}
}
private boolean isRemoteRestartEnabled(Environment environment) {
return environment.contains... | if (environmentClass != null && environmentClass.isInstance(environment)) {
return true;
}
}
return false;
}
private @Nullable Class<?> resolveClassName(String candidate, ClassLoader classLoader) {
try {
return ClassUtils.resolveClassName(candidate, classLoader);
}
catch (IllegalArgumentException... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\env\DevToolsPropertyDefaultsPostProcessor.java | 1 |
请完成以下Java代码 | public Tool getObject() throws Exception {
return new Tool(toolId);
}
@Override
public Class<?> getObjectType() {
return Tool.class;
}
@Override
public boolean isSingleton() {
return false;
}
public int getFactoryId() { | return factoryId;
}
public void setFactoryId(int factoryId) {
this.factoryId = factoryId;
}
public int getToolId() {
return toolId;
}
public void setToolId(int toolId) {
this.toolId = toolId;
}
} | repos\tutorials-master\spring-core-3\src\main\java\com\baeldung\factorybean\ToolFactory.java | 1 |
请完成以下Java代码 | private <T> WebEndpointResponse<T> handle(String jobsOrTriggers, ResponseSupplier<T> jobAction,
ResponseSupplier<T> triggerAction) throws SchedulerException {
if ("jobs".equals(jobsOrTriggers)) {
return handleNull(jobAction.get());
}
if ("triggers".equals(jobsOrTriggers)) {
return handleNull(triggerActio... | }
static class QuartzEndpointWebExtensionRuntimeHints implements RuntimeHintsRegistrar {
private final BindingReflectionHintsRegistrar bindingRegistrar = new BindingReflectionHintsRegistrar();
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
this.bindingRegistrar... | repos\spring-boot-4.0.1\module\spring-boot-quartz\src\main\java\org\springframework\boot\quartz\actuate\endpoint\QuartzEndpointWebExtension.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SampleOidEntityController {
private static final UrlBuilder LOCATION_BUILDER = new DefaultUrlBuilder();
private SampleOidEntityService service;
public SampleOidEntityController(SampleOidEntityService sampleService) {
super();
this.service = sampleService;
}
public Samp... | }
public List<SampleOidEntity> readAll(Request request, Response response) {
QueryFilter filter = QueryFilters.parseFrom(request);
QueryOrder order = QueryOrders.parseFrom(request);
QueryRange range = QueryRanges.parseFrom(request, 20);
List<SampleOidEntity> entities = service.readA... | repos\tutorials-master\microservices-modules\rest-express\src\main\java\com\baeldung\restexpress\objectid\SampleOidEntityController.java | 2 |
请完成以下Java代码 | public class C_Order
{
private static final String SYSCONFIG_DatePromisedOffsetDays = "de.metas.order.DatePromisedOffsetDays";
@CalloutMethod(columnNames = { I_C_Order.COLUMNNAME_DateOrdered })
public void setDatePromised(final I_C_Order order, final ICalloutField field)
{
if (field.isRecordCopyingMode())
{
... | {
return;
}
final ZoneId timeZone = Services.get(IOrderBL.class).getTimeZone(order);
final ZonedDateTime datePromised = dateOrdered
.plusDays(datePromisedOffsetDays)
.atStartOfDay(timeZone);
order.setDatePromised(TimeUtil.asTimestamp(datePromised));
}
@CalloutMethod(columnNames = { I_C_Order.COL... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\tourplanning\callout\C_Order.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class NewsService {
@Autowired
private NewsDao newsDao;
public List<News> getByMap(Map<String, Object> map) {
DynamicDataSourceContextHolder.resetDatabaseType();
return newsDao.getByMap(map);
}
public News getById(Integer id) {
DynamicDataSourceContextHolder.resetDat... | newsDao.create(news);
return news;
}
public News update(News news) {
DynamicDataSourceContextHolder.resetDatabaseType();
newsDao.update(news);
return news;
}
public int delete(Integer id) {
DynamicDataSourceContextHolder.resetDatabaseType();
return newsD... | repos\springBoot-master\springboot-dynamicDataSource\src\main\java\cn\abel\service\NewsService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class DeleteDeadLetterJobCmd implements Command<Object>, Serializable {
private static final Logger LOGGER = LoggerFactory.getLogger(DeleteDeadLetterJobCmd.class);
private static final long serialVersionUID = 1L;
protected JobServiceConfiguration jobServiceConfiguration;
protected String d... | protected DeadLetterJobEntity getJobToDelete(CommandContext commandContext) {
if (deadLetterJobId == null) {
throw new FlowableIllegalArgumentException("jobId is null");
}
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Deleting job {}", deadLetterJobId);
}
... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\cmd\DeleteDeadLetterJobCmd.java | 2 |
请完成以下Java代码 | public boolean isSameTax ()
{
Object oo = get_Value(COLUMNNAME_IsSameTax);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Price includes Tax.
@param IsTaxIncluded
Tax is included in the price
*/
p... | set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Charge.java | 1 |
请完成以下Java代码 | public boolean isMailServerUseSsl() {
return mailServerUseSsl;
}
public void setMailServerUseSsl(boolean mailServerUseSsl) {
this.mailServerUseSsl = mailServerUseSsl;
}
public boolean isMailServerUseTls() {
return mailServerUseTls;
}
public void setMailServerUseTls(boo... | this.deploymentMode = deploymentMode;
}
public boolean isSerializePOJOsInVariablesToJson() {
return serializePOJOsInVariablesToJson;
}
public void setSerializePOJOsInVariablesToJson(boolean serializePOJOsInVariablesToJson) {
this.serializePOJOsInVariablesToJson = serializePOJOsInVariab... | repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\boot\ActivitiProperties.java | 1 |
请完成以下Spring Boot application配置 | spring:
# R2DBC 配置,对应 R2dbcProperties 配置类
r2dbc:
url: mysql://47.112.193.81:3306/lab-27-webflux-r2dbc
username: lab-27-webflux-r2dbc
password: 0ed86@11-r2Dbc123
# jasync:
# r2dbc:
# host: 47.112.193.81
# port: 3306
# | database: lab-27-webflux-r2dbc
# username: lab-27-webflux-r2dbc
# password: 0ed86@11-r2Dbc123 | repos\SpringBoot-Labs-master\lab-27\lab-27-webflux-r2dbc\src\main\resources\application.yaml | 2 |
请在Spring Boot框架中完成以下Java代码 | protected static final class GroovyTemplateAvailabilityProperties extends TemplateAvailabilityProperties {
private List<String> resourceLoaderPath = new ArrayList<>(
Arrays.asList(GroovyTemplateProperties.DEFAULT_RESOURCE_LOADER_PATH));
GroovyTemplateAvailabilityProperties() {
super(GroovyTemplatePropertie... | public void setResourceLoaderPath(List<String> resourceLoaderPath) {
this.resourceLoaderPath = resourceLoaderPath;
}
}
static class GroovyTemplateAvailabilityRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {
if (... | repos\spring-boot-4.0.1\module\spring-boot-groovy-templates\src\main\java\org\springframework\boot\groovy\template\autoconfigure\GroovyTemplateAvailabilityProvider.java | 2 |
请完成以下Java代码 | public Consumer<I_C_Invoice_Candidate> getInvoiceScheduleSetterFunction(@NonNull final Consumer<I_C_Invoice_Candidate> defaultImplementation)
{
return defaultImplementation;
}
@Override
public Timestamp calculateDateOrdered(@NonNull final I_C_Invoice_Candidate invoiceCandidateRecord)
{
final I_C_Flatrate_Term... | private static Timestamp getGetExtentionDateOfNewTerm(@NonNull final I_C_Flatrate_Term term)
{
final Timestamp startDateOfTerm = term.getStartDate();
final I_C_Flatrate_Conditions conditions = term.getC_Flatrate_Conditions();
final I_C_Flatrate_Transition transition = conditions.getC_Flatrate_Transition();
fi... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\subscription\invoicecandidatehandler\FlatrateTermSubscription_Handler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Result<SysAppVersion> app3Version(@RequestParam(name="key", required = false)String appKey) throws Exception {
Object appConfig = redisUtil.get(APP3_VERSION + appKey);
if (oConvertUtils.isNotEmpty(appConfig)) {
try {
SysAppVersion sysAppVersion = (SysAppVersion)appConf... | /**
* 保存APP3
*
* @param sysAppVersion
* @return
*/
@RequiresRoles({"admin"})
@Operation(summary="app系统配置-保存")
@PostMapping(value = "/saveVersion")
public Result<?> saveVersion(@RequestBody SysAppVersion sysAppVersion) {
String id = sysAppVersion.getId();
redisU... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysAppVersionController.java | 2 |
请完成以下Java代码 | public static void main(String[] args) throws InterruptedException, KeeperException {
String path = ZKConstants.ZK_FIRST_PATH;
final CountDownLatch connectedSignal = new CountDownLatch(1);
try {
conn = new ZooKeeperConnection();
zk = conn.connect(ZKConstants.ZK_HOST);
... | byte[] bn = zk.getData(path,
false, null);
String data = new String(bn,
"UTF-8");
System.out.println(data);
connectedSignal.countDown();
... | repos\spring-boot-quick-master\quick-zookeeper\src\main\java\com\quick\zookeeper\client\ZKGetData.java | 1 |
请完成以下Java代码 | public void setM_Product_ID (int M_Product_ID)
{
if (M_Product_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Product_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
}
/** Get Product.
@return Product, Service, Item
*/
public int getM_Product_ID ()
{
Integer ... | /** Set Quantity.
@param Qty
Quantity
*/
public void setQty (BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
/** Get Quantity.
@return Quantity
*/
public BigDecimal getQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty);
if (bd == null)
return Env.ZERO;
return bd;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_LandedCostAllocation.java | 1 |
请完成以下Java代码 | public class JacksonModuleSchemaGenerator {
public static void main(String[] args) {
JacksonModule module = new JacksonModule(RESPECT_JSONPROPERTY_REQUIRED);
SchemaGeneratorConfigBuilder configBuilder = new SchemaGeneratorConfigBuilder(DRAFT_2020_12, PLAIN_JSON).with(module).with(EXTRA_OPEN_API_FOR... | }
static class Address {
@JsonProperty()
String street;
@JsonProperty(required = true)
String city;
@JsonProperty(required = true)
String country;
}
} | repos\tutorials-master\json-modules\json-2\src\main\java\com\baeldung\jsonschemageneration\modules\JacksonModuleSchemaGenerator.java | 1 |
请完成以下Java代码 | public void setC_Async_Batch_Type_ID (final int C_Async_Batch_Type_ID)
{
if (C_Async_Batch_Type_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Async_Batch_Type_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_Async_Batch_Type_ID, C_Async_Batch_Type_ID);
}
@Override
public int getC_Async_Batch_Type_ID()
{
ret... | */
public static final int NOTIFICATIONTYPE_AD_Reference_ID=540643;
/** Async Batch Processed = ABP */
public static final String NOTIFICATIONTYPE_AsyncBatchProcessed = "ABP";
/** Workpackage Processed = WPP */
public static final String NOTIFICATIONTYPE_WorkpackageProcessed = "WPP";
@Override
public void setNot... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Async_Batch_Type.java | 1 |
请完成以下Java代码 | public java.lang.String getRuleType ()
{
return (java.lang.String)get_Value(COLUMNNAME_RuleType);
}
/** Set Skript.
@param Script
Dynamic Java Language Script to calculate result
*/
@Override
public void setScript (java.lang.String Script)
{
set_Value (COLUMNNAME_Script, Script);
}
/** Get Skript... | /** Set Suchschlüssel.
@param Value
Search key for the record in the format required - must be unique
*/
@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
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Rule.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 ... | {
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_ServiceLevelInvoiced);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Quantity Provided.
@param ServiceLevelProvided
Quantity of service or product provided
*/
public void setServiceLevelProvided (BigDecimal ServiceLevelProvided)
{
set_V... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ServiceLevel.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getOrgCheckFilePath() {
return orgCheckFilePath;
}
public void setOrgCheckFilePath(String orgCheckFilePath) {
this.orgCheckFilePath = orgCheckFilePath == null ? null : orgCheckFilePath.trim();
}
public String getReleaseCheckFilePath() {
return releaseCheckFilePath;
}
public void setReleaseC... | this.fee = fee;
}
public String getCheckFailMsg() {
return checkFailMsg;
}
public void setCheckFailMsg(String checkFailMsg) {
this.checkFailMsg = checkFailMsg;
}
public String getBankErrMsg() {
return bankErrMsg;
}
public void setBankErrMsg(String bankErrMsg) {
this.bankErrMsg = bankErrMsg;
}
} | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\reconciliation\entity\RpAccountCheckBatch.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class AsyncBatchQueueConfiguration implements IEventBusQueueConfiguration
{
public static final Topic EVENTBUS_TOPIC = Topic.distributed("de.metas.async.eventbus.AsyncBatchNotifyRequest");
static final String QUEUE_NAME_SPEL = "#{metasfreshAsyncBatchQueue.name}";
private static final String QUEUE_BEAN_NAME = ... | return BindingBuilder.bind(asyncBatchQueue())
.to(asyncBatchExchange()).with(EXCHANGE_NAME_PREFIX);
}
@Override
public String getQueueName()
{
return asyncBatchQueue().getName();
}
@Override
public Optional<String> getTopicName()
{
return Optional.of(EVENTBUS_TOPIC.getName());
}
@Override
public S... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\remote\rabbitmq\queues\async_batch\AsyncBatchQueueConfiguration.java | 2 |
请完成以下Java代码 | public static String getToken(String auth) {
if (isBearer(auth) || isCrypto(auth)) {
return auth.substring(AUTH_LENGTH);
}
return null;
}
/**
* 判断token类型为bearer
*
* @param auth token
* @return String
*/
public static Boolean isBearer(String auth) {
if ((auth != null) && (auth.length() > AUTH_LE... | if ((auth != null) && (auth.length() > AUTH_LENGTH)) {
String headStr = auth.substring(0, 6).toLowerCase();
return headStr.compareTo(CRYPTO) == 0;
}
return false;
}
/**
* 解析jsonWebToken
*
* @param jsonWebToken token串
* @return Claims
*/
public static Claims parseJWT(String jsonWebToken) {
try ... | repos\SpringBlade-master\blade-gateway\src\main\java\org\springblade\gateway\utils\JwtUtil.java | 1 |
请完成以下Java代码 | public void setMKTG_CleverReach_Config_ID (int MKTG_CleverReach_Config_ID)
{
if (MKTG_CleverReach_Config_ID < 1)
set_ValueNoCheck (COLUMNNAME_MKTG_CleverReach_Config_ID, null);
else
set_ValueNoCheck (COLUMNNAME_MKTG_CleverReach_Config_ID, Integer.valueOf(MKTG_CleverReach_Config_ID));
}
/** Get MKTG_Clev... | return ii.intValue();
}
/** Set Kennwort.
@param Password Kennwort */
@Override
public void setPassword (java.lang.String Password)
{
set_Value (COLUMNNAME_Password, Password);
}
/** Get Kennwort.
@return Kennwort */
@Override
public java.lang.String getPassword ()
{
return (java.lang.String)ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\cleverreach\src\main\java-gen\de\metas\marketing\cleverreach\model\X_MKTG_CleverReach_Config.java | 1 |
请完成以下Java代码 | public void setDefaultContact(final Boolean defaultContact)
{
this.defaultContact = defaultContact;
this.defaultContactSet = true;
}
public void setShipToDefault(final Boolean shipToDefault)
{
this.shipToDefault = shipToDefault;
this.shipToDefaultSet = true;
}
public void setBillToDefault(final Boolean ... | public void setPurchase(final Boolean purchase)
{
this.purchase = purchase;
this.purchaseSet = true;
}
public void setPurchaseDefault(final Boolean purchaseDefault)
{
this.purchaseDefault = purchaseDefault;
this.purchaseDefaultSet = true;
}
public void setSubjectMatter(final Boolean subjectMatter)
{
... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v1\request\JsonRequestContact.java | 1 |
请完成以下Java代码 | public boolean isTourInstanceMatches(final I_M_Tour_Instance tourInstance, final ITourInstanceQueryParams params)
{
if (tourInstance == null)
{
return false;
}
return createTourInstanceMatcher(params)
.accept(tourInstance);
}
@Override
public boolean hasDeliveryDays(final I_M_Tour_Instance tourInst... | .addEqualsFilter(I_M_DeliveryDay.COLUMN_M_Tour_Instance_ID, tourInstanceId)
.create()
.anyMatch();
}
public I_M_Tour_Instance retrieveTourInstanceForShipperTransportation(final I_M_ShipperTransportation shipperTransportation)
{
Check.assumeNotNull(shipperTransportation, "shipperTransportation not null");
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\tourplanning\api\impl\TourInstanceDAO.java | 1 |
请完成以下Java代码 | public ProductInfo getProductInfo(
@NonNull final ExternalIdentifier productExternalIdentifier,
@NonNull final OrgId orgId)
{
return productInfoCache.getOrLoad(
new ProductCacheKey(orgId, productExternalIdentifier),
this::getProductInfo0);
}
private ProductInfo getProductInfo0(@NonNull final Produc... | .resolveProductExternalIdentifier(productIdentifier, key.getOrgId())
.orElseThrow(() -> MissingResourceException.builder()
.resourceName("productIdentifier")
.resourceIdentifier(productIdentifier.getRawValue())
.build());
final UomId uomId = productsBL.getStockUOMId(productAndHUPIItemProductId.... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\ordercandidates\impl\ProductMasterDataProvider.java | 1 |
请完成以下Java代码 | public long getFinishedBatchesCount() {
return finishedBatchesCount;
}
public void setFinishedBatchesCount(long finishedBatchCount) {
this.finishedBatchesCount = finishedBatchCount;
}
public long getCleanableBatchesCount() {
return cleanableBatchesCount;
}
public void setCleanableBatchesCount... | protected CleanableHistoricBatchReport createNewReportQuery(ProcessEngine engine) {
return engine.getHistoryService().createCleanableHistoricBatchReport();
}
public static List<CleanableHistoricBatchReportResultDto> convert(List<CleanableHistoricBatchReportResult> reportResult) {
List<CleanableHistoricBatch... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\batch\CleanableHistoricBatchReportResultDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void deleteHistoricTaskLogEntriesForNonExistingProcessInstances() {
getDataManager().deleteHistoricTaskLogEntriesForNonExistingProcessInstances();
}
@Override
public void deleteHistoricTaskLogEntriesForNonExistingCaseInstances() {
getDataManager().deleteHistoricTaskLogEntriesForN... | historicTaskLogEntryEntity.setTenantId(historicTaskLogEntryBuilder.getTenantId());
historicTaskLogEntryEntity.setProcessInstanceId(historicTaskLogEntryBuilder.getProcessInstanceId());
historicTaskLogEntryEntity.setProcessDefinitionId(historicTaskLogEntryBuilder.getProcessDefinitionId());
histori... | repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\persistence\entity\HistoricTaskLogEntryEntityManagerImpl.java | 2 |
请完成以下Java代码 | public class LongestCommonSubstring
{
public static int compute(char[] str1, char[] str2)
{
int size1 = str1.length;
int size2 = str2.length;
if (size1 == 0 || size2 == 0) return 0;
// the start position of substring in original string
// int start1 = -1;
// int st... | ++m;
++n;
}
}
// shift string2 to find the longest com.hankcs.common substring
for (int j = 1; j < size2; ++j)
{
int m = 0;
int n = j;
int length = 0;
while (m < size1 && n < size2)
{
// ... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\algorithm\LongestCommonSubstring.java | 1 |
请完成以下Java代码 | public Set<CourseRating> getRatings() {
return ratings;
}
public void setRatings(Set<CourseRating> ratings) {
this.ratings = ratings;
}
public Set<CourseRegistration> getRegistrations() {
return registrations;
}
public void setRegistrations(Set<CourseRegistration> regi... | @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Course other = (Course) obj;
if (id == null) {
if (other.id != null)
... | repos\tutorials-master\persistence-modules\spring-jpa\src\main\java\com\baeldung\manytomany\model\Course.java | 1 |
请完成以下Java代码 | public Color getTitleForegroundColor()
{
return titleForegroundColor;
}
/**
* Set title foreground color
*
* @param titleForegroundColor
*/
public void setTitleForegroundColor(final Color titleForegroundColor)
{
this.titleForegroundColor = titleForegroundColor;
}
/**
*
* @return title backgroun... | return new Insets(0, 0, 0, 0);
}
}
return new Insets(4, 0, 1, 0);
}
@Override
public boolean isBorderOpaque()
{
return true;
}
@Override
public void paintBorder(final Component c, final Graphics g, final int x, final int y, final int width, final int height)
{
// if the collapsible is ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CollapsiblePanel.java | 1 |
请完成以下Java代码 | protected boolean beforeSave (boolean newRecord)
{
if (newRecord)
setIsValid(true);
if (isValid())
setErrorMsg(null);
return true;
} // beforeSave
@Override
protected boolean afterSave(boolean newRecord, boolean success) {
if (!success)
return false;
return updateParent();
}
@Override
protec... | +" WHERE a."+MAlert.COLUMNNAME_AD_Alert_ID+"=?"
;
int no = DB.executeUpdateAndSaveErrorOnFail(sql, getAD_Alert_ID(), get_TrxName());
return no == 1;
}
/**
* String Representation
* @return info
*/
@Override
public String toString ()
{
StringBuffer sb = new StringBuffer ("MAlertRule[");
sb.append(... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MAlertRule.java | 1 |
请完成以下Java代码 | public String getShapeType ()
{
return (String)get_Value(COLUMNNAME_ShapeType);
}
/** Set Record Sort No.
@param SortNo
Determines in what order the records are displayed
*/
public void setSortNo (int SortNo)
{
set_Value (COLUMNNAME_SortNo, Integer.valueOf(SortNo));
}
/** Get Record Sort No.
@re... | Integer ii = (Integer)get_Value(COLUMNNAME_XSpace);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Y Position.
@param YPosition
Absolute Y (vertical) position in 1/72 of an inch
*/
public void setYPosition (int YPosition)
{
set_Value (COLUMNNAME_YPosition, Integer.valueOf(YPosition));
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_PrintFormatItem.java | 1 |
请完成以下Java代码 | public int getTemperature() {
return temperature;
}
public void setTemperature(int temperature) {
this.temperature = temperature;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = descri... | @Override
public boolean equals(Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())
return false;
WeatherData that = (WeatherData) o;
return temperature == that.temperature && Objects.equals(city, that.city) && Objects.equals(d... | repos\tutorials-master\spring-reactive-modules\spring-reactive-4\src\main\java\com\baeldung\webclient\WeatherData.java | 1 |
请完成以下Java代码 | public void onCommandFailed(CommandContext commandContext, Throwable t) {
setFailure(t);
}
@Override
public void onCommandContextClose(CommandContext commandContext) {
// ignore
}
public void setJob(JobEntity job) {
this.job = job;
}
public JobEntity getJob() {
return job; | }
public String getJobId() {
return jobId;
}
public String getFailedActivityId() {
return failedActivityId;
}
public void setFailedActivityId(String activityId) {
this.failedActivityId = activityId;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\JobFailureCollector.java | 1 |
请完成以下Java代码 | public void setPickFrom_Locator_ID (final int PickFrom_Locator_ID)
{
if (PickFrom_Locator_ID < 1)
set_Value (COLUMNNAME_PickFrom_Locator_ID, null);
else
set_Value (COLUMNNAME_PickFrom_Locator_ID, PickFrom_Locator_ID);
}
@Override
public int getPickFrom_Locator_ID()
{
return get_ValueAsInt(COLUMNNAM... | @Override
public java.lang.String getPriorityRule()
{
return get_ValueAsString(COLUMNNAME_PriorityRule);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Workplace.java | 1 |
请完成以下Java代码 | public String getProcessDefinitionId() {
return processDefinitionId;
}
public String getProcessDefinitionKey() {
return processDefinitionKey;
}
public String getProcessDefinitionName() {
return processDefinitionName;
}
public int getProcessDefinitionVersion() {
return processDefinitionVer... | }
public static List<CleanableHistoricProcessInstanceReportResultDto> convert(List<CleanableHistoricProcessInstanceReportResult> reportResult) {
List<CleanableHistoricProcessInstanceReportResultDto> dtos = new ArrayList<CleanableHistoricProcessInstanceReportResultDto>();
for (CleanableHistoricProcessInstance... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\CleanableHistoricProcessInstanceReportResultDto.java | 1 |
请完成以下Java代码 | public String getSellPoint() {
return sellPoint;
}
public ESProductDO setSellPoint(String sellPoint) {
this.sellPoint = sellPoint;
return this;
}
public String getDescription() {
return description;
}
public ESProductDO setDescription(String description) {
... | }
@Override
public String toString() {
return "ProductDO{" +
"id=" + id +
", name='" + name + '\'' +
", sellPoint='" + sellPoint + '\'' +
", description='" + description + '\'' +
", cid=" + cid +
", category... | repos\SpringBoot-Labs-master\lab-15-spring-data-es\lab-15-spring-data-jest\src\main\java\cn\iocoder\springboot\lab15\springdatajest\dataobject\ESProductDO.java | 1 |
请完成以下Java代码 | public BooleanWithReason checkAllowGoingAwayFrom(final WFActivity fromActivity)
{
if (isStdUserWorkflow())
{
final IDocument document = fromActivity.getDocumentOrNull();
if (document != null)
{
final String docStatus = document.getDocStatus();
final String docAction = document.getDocAction();
... | {
return BooleanWithReason.trueBecause("no conditions");
}
// First condition always AND
boolean ok = conditions.get(0).evaluate(fromActivity);
for (int i = 1; i < conditions.size(); i++)
{
final WFNodeTransitionCondition condition = conditions.get(i);
if (condition.isOr())
{
ok = ok || condi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\WFNodeTransition.java | 1 |
请完成以下Java代码 | public class TableCacheStatistics implements ITableCacheStatistics
{
private Date startDate;
private final String tableName;
private final AtomicLong hitCount = new AtomicLong(0);
private final AtomicLong hitInTrxCount = new AtomicLong(0);
private final AtomicLong missCount = new AtomicLong(0);
private final Atom... | @Override
public void incrementHitInTrxCount()
{
hitInTrxCount.incrementAndGet();
}
@Override
public long getMissCount()
{
return missCount.longValue();
}
@Override
public void incrementMissCount()
{
missCount.incrementAndGet();
}
@Override
public long getMissInTrxCount()
{
return missInTrxCoun... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\impl\TableCacheStatistics.java | 1 |
请完成以下Java代码 | public <T> T evaluateSimpleExpression(String expression, VariableContext variableContext) {
CustomContext context = new CustomContext() {
public VariableProvider variableProvider() {
return new ContextVariableWrapper(variableContext);
}
};
Either either = feelEngine.evalExpression(expr... | CustomValueMapper javaValueMapper = new JavaValueMapper();
CustomValueMapper spinValueMapper = spinValueMapperFactory.createInstance();
if (spinValueMapper != null) {
return toScalaList(javaValueMapper, spinValueMapper);
} else {
return toScalaList(javaValueMapper);
}
}
@SafeVarargs
... | repos\camunda-bpm-platform-master\engine-dmn\feel-scala\src\main\java\org\camunda\bpm\dmn\feel\impl\scala\ScalaFeelEngine.java | 1 |
请完成以下Java代码 | private static String defaultId(Defaultable<? extends DefaultMetadataElement> element) {
DefaultMetadataElement defaultValue = element.getDefault();
return (defaultValue != null) ? defaultValue.getId() : null;
}
private static class ArtifactIdCapability extends TextCapability {
private final TextCapability na... | super("packageName", "Package Name", "root package");
this.groupId = groupId;
this.artifactId = artifactId;
}
@Override
public String getContent() {
String value = super.getContent();
if (value != null) {
return value;
}
else if (this.groupId.getContent() != null && this.artifactId.getConte... | repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\InitializrMetadata.java | 1 |
请完成以下Java代码 | public void setCard(PaymentCard4 value) {
this.card = value;
}
/**
* Gets the value of the poi property.
*
* @return
* possible object is
* {@link PointOfInteraction1 }
*
*/
public PointOfInteraction1 getPOI() {
return poi;
}
/**
... | * {@link CardTransaction1Choice }
*
*/
public CardTransaction1Choice getTx() {
return tx;
}
/**
* Sets the value of the tx property.
*
* @param value
* allowed object is
* {@link CardTransaction1Choice }
*
*/
public void setTx(... | 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\CardTransaction1.java | 1 |
请完成以下Java代码 | public List<ContactWithJavaUtilDate> getContactsWithJavaUtilDate() {
List<ContactWithJavaUtilDate> contacts = new ArrayList<>();
ContactWithJavaUtilDate contact1 = new ContactWithJavaUtilDate("John Doe", "123 Sesame Street", "123-456-789", new Date(), new Date());
ContactWithJavaUtilDate contac... | contacts.add(contact3);
return contacts;
}
@GetMapping("/plainWithJavaUtilDate")
public List<PlainContactWithJavaUtilDate> getPlainContactsWithJavaUtilDate() {
List<PlainContactWithJavaUtilDate> contacts = new ArrayList<>();
PlainContactWithJavaUtilDate contact1 = new PlainContact... | repos\tutorials-master\spring-boot-modules\spring-boot-data\src\main\java\com\baeldung\jsondateformat\ContactController.java | 1 |
请完成以下Java代码 | public class DelegateExpressionOutboundChannelModelProcessor implements ChannelModelProcessor {
protected HasExpressionManagerEngineConfiguration engineConfiguration;
protected ObjectMapper objectMapper;
public DelegateExpressionOutboundChannelModelProcessor(HasExpressionManagerEngineConfiguration engineC... | variableContainer.setTenantId(tenantId);
Object channelAdapter = engineConfiguration.getExpressionManager()
.createExpression(delegateExpression)
.getValue(variableContainer);
if (!(channelAdapter instanceof OutboundEventChannelAdapter)) {
throw ne... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\pipeline\DelegateExpressionOutboundChannelModelProcessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public synchronized boolean deleteAccount(DeleteAccountAsyncEvent deleteAccountAsyncEvent) {
LOGGER.info("Deleting account {}", deleteAccountAsyncEvent.getAccountId());
Account account = accounts.remove(deleteAccountAsyncEvent.getAccountId());
if (account != null) {
LOGGER.error("Acc... | if (account != null && (account.getCredit() + depositAccountAsyncEvent.getCredit()) > 0) {
Account accountAfterTransaction = new Account(account.getAccountId(), account.getName(), (account.getCredit() + depositAccountAsyncEvent.getCredit()));
accounts.put(accountAfterTransaction.getAccountId(), ... | repos\spring-examples-java-17\spring-kafka\kafka-consumer\src\main\java\itx\examples\spring\kafka\consumer\service\AccountServiceImpl.java | 2 |
请完成以下Java代码 | public boolean isSupportZoomInto()
{
// Allow zooming into key column. It shall open precisely this record in a new window
// (see https://github.com/metasfresh/metasfresh/issues/1687 to understand the use-case)
// In future we shall think to narrow it down only to included tabs and only for those tables whi... | return getDataBinding().get().getDefaultOrderByPriority();
}
public boolean isDefaultOrderByAscending()
{
// we assume isDefaultOrderBy() was checked before calling this method
//noinspection OptionalGetWithoutIsPresent
return getDataBinding().get().isDefaultOrderByAscending();
}
public Builder dev... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentFieldDescriptor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Boolean getIncludeProcessVariables() {
return includeProcessVariables;
}
public void setIncludeProcessVariables(Boolean includeProcessVariables) {
this.includeProcessVariables = includeProcessVariables;
}
@JsonTypeInfo(use = Id.CLASS, defaultImpl = QueryVariable.class)
publi... | public String getPlanItemInstanceId() {
return planItemInstanceId;
}
public void setPlanItemInstanceId(String planItemInstanceId) {
this.planItemInstanceId = planItemInstanceId;
}
public String getRootScopeId() {
return rootScopeId;
}
public void setRootScopeId(String ... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\task\HistoricTaskInstanceQueryRequest.java | 2 |
请完成以下Spring Boot application配置 | spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=password
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.sql. | init.data-locations=classpath:db/data.sql
spring.sql.init.schema-locations=classpath:db/schema.sql | repos\tutorials-master\persistence-modules\spring-boot-persistence-5\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | private EntityDataQuery buildEntityDataQuery() {
EntityDataPageLink edpl = new EntityDataPageLink(maxEntitiesPerAlarmSubscription, 0, null,
new EntityDataSortOrder(new EntityKey(EntityKeyType.ENTITY_FIELD, ModelConstants.CREATED_TIME_PROPERTY)));
return new EntityDataQuery(query.getEntit... | .sessionId(sessionRef.getSessionId())
.subscriptionId(subIdx)
.tenantId(sessionRef.getSecurityCtx().getTenantId())
.entityId(entityId)
.updateProcessor((sub, update) -> fetchAlarmCount())
.build();
localSubscriptionService.addSubscr... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\subscription\TbAlarmCountSubCtx.java | 2 |
请完成以下Java代码 | public Collection<KnowledgeRequirement> getKnowledgeRequirement() {
return knowledgeRequirementCollection.get(this);
}
public Collection<AuthorityRequirement> getAuthorityRequirement() {
return authorityRequirementCollection.get(this);
}
public static void registerType(ModelBuilder modelBuilder) {
... | .build();
variableChild = sequenceBuilder.element(Variable.class)
.build();
knowledgeRequirementCollection = sequenceBuilder.elementCollection(KnowledgeRequirement.class)
.build();
authorityRequirementCollection = sequenceBuilder.elementCollection(AuthorityRequirement.class)
.build();
... | repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\BusinessKnowledgeModelImpl.java | 1 |
请完成以下Java代码 | public GroupHeader42 getGrpHdr() {
return grpHdr;
}
/**
* Sets the value of the grpHdr property.
*
* @param value
* allowed object is
* {@link GroupHeader42 }
*
*/
public void setGrpHdr(GroupHeader42 value) {
this.grpHdr = value;
}
/... | * </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link AccountStatement2 }
*
*
*/
public List<AccountStatement2> getStmt() {
if (stmt == null) {
stmt = new ArrayList<AccountStatement2>();
}
return this.st... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\BankToCustomerStatementV02.java | 1 |
请完成以下Java代码 | public Object getValueByColumn(@NonNull final OLCandAggregationColumn column)
{
final String olCandColumnName = column.getColumnName();
switch (olCandColumnName)
{
case I_C_OLCand.COLUMNNAME_Bill_BPartner_ID:
return getBillBPartnerInfo().getBpartnerId();
case I_C_OLCand.COLUMNNAME_Bill_Location_ID:
... | return olCandRecord.getM_ProductPrice_ID();
}
@Override
public boolean isExplicitProductPriceAttribute()
{
return olCandRecord.isExplicitProductPriceAttribute();
}
public int getFlatrateConditionsId()
{
return olCandRecord.getC_Flatrate_Conditions_ID();
}
public int getHUPIProductItemId()
{
final HUP... | repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\OLCand.java | 1 |
请完成以下Java代码 | public class NamedColumnBean extends CsvBean {
@CsvBindByName(column = "name")
private String name;
//Automatically infer column name as Age
@CsvBindByName
private int age;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
... | public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
@Override
public String toString() {
return name + ',' + age;
}
} | repos\tutorials-master\libraries-data-io\src\main\java\com\baeldung\libraries\opencsv\beans\NamedColumnBean.java | 1 |
请完成以下Java代码 | public class CS_Creditpass_TransactionFrom_C_BPartner extends JavaProcess implements IProcessPrecondition
{
final private CreditPassTransactionService creditPassTransactionService = Adempiere.getBean(CreditPassTransactionService.class);
@Param(parameterName = CreditPassConstants.PROCESS_PAYMENT_RULE_PARAM)
private ... | return ProcessPreconditionsResolution.rejectBecauseNotSingleSelection();
}
final I_C_BPartner partner = context.getSelectedModel(I_C_BPartner.class);
if (!partner.isCustomer())
{
return ProcessPreconditionsResolution.rejectWithInternalReason("Business partner is not a customer");
}
if (!creditPassTrans... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.creditscore\creditpass\src\main\java\de\metas\vertical\creditscore\creditpass\process\CS_Creditpass_TransactionFrom_C_BPartner.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class QueueProcessorExecutorService implements IQueueProcessorExecutorService
{
private final IQueueProcessorsExecutor executor;
private final IQueueDAO queueDAO = Services.get(IQueueDAO.class);
/**
* Used to delayed invoke {@link #initNow()}.
*/
private final DelayedRunnableExecutor delayedInit = new DelayedR... | {
return;
}
// Remove all queue processors. It shall be none, but just to make sure
executor.shutdown();
for (final I_C_Queue_Processor processorDef : queueDAO.retrieveAllProcessors())
{
executor.addQueueProcessor(processorDef);
}
}
@Override
public void removeAllQueueProcessors()
{
delayedIn... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\processor\impl\QueueProcessorExecutorService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean isEnabled() {
return this.enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public InetAddress getRemoteAddress() {
return this.remoteAddress;
}
public void setRemoteAddress(InetAddress remoteAddress) {
this.remoteAddress = remoteAddress;
}
public Security... | return this.username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
public List<String> getRoles() {
return this.roles;
}
public vo... | repos\spring-boot-4.0.1\documentation\spring-boot-docs\src\main\java\org\springframework\boot\docs\features\externalconfig\typesafeconfigurationproperties\javabeanbinding\MyProperties.java | 2 |
请完成以下Java代码 | protected void onLoadTxtFinished()
{
super.onLoadTxtFinished();
initTagSet();
}
@Override
public void tag(Table table)
{
int size = table.size();
if (size == 1)
{
table.setLast(0, "S");
return;
}
double[][] net = new do... | curI = i & 1;
int preI = 1 - curI;
for (int now = 0; now < 4; ++now)
{
double maxScore = -1e10;
for (int pre = 0; pre < 4; ++pre)
{
double score = maxScoreAt[preI][pre] + matrix[pre][now] + net[i][now];
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\CRFSegmentModel.java | 1 |
请完成以下Java代码 | protected String getEventName() {
return ExecutionListener.EVENTNAME_END;
}
@Override
protected void eventNotificationsCompleted(PvmExecutionImpl execution) {
if (execution.isProcessInstanceStarting()) {
// only call this method if we are currently in the starting phase;
// if not, this may ... | execution.performOperation(TRANSITION_DESTROY_SCOPE);
return null;
}
});
}
public String getCanonicalName() {
return "transition-notify-listener-end";
}
@Override
public boolean shouldHandleFailureAsBpmnError() {
return true;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\operation\PvmAtomicOperationTransitionNotifyListenerEnd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class User {
@Id
@GeneratedValue
private Integer id;
private String name;
private Integer status;
public User() {
}
public User(String name, Integer status) {
this.name = name;
this.status = status;
}
public Integer getId() {
return id;
}
... | }
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
} | repos\tutorials-master\persistence-modules\spring-boot-persistence-2\src\main\java\com\baeldung\boot\domain\User.java | 2 |
请完成以下Java代码 | public class ProcessSetRemovalTimeResultHandler implements TransactionListener {
protected SetRemovalTimeBatchConfiguration batchJobConfiguration;
protected Integer chunkSize;
protected CommandExecutor commandExecutor;
protected ProcessSetRemovalTimeJobHandler jobHandler;
protected String jobId;
protected ... | context.getJobManager().reschedule(job, ClockUtil.getCurrentTime());
}
return null;
});
}
protected ByteArrayEntity saveConfiguration(SetRemovalTimeBatchConfiguration configuration, CommandContext context) {
ByteArrayEntity configurationEntity = new ByteArrayEntity();
configurationEntit... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\removaltime\ProcessSetRemovalTimeResultHandler.java | 1 |
请完成以下Spring Boot application配置 | datasource.password=ENC(/AL9nJENCYCh9Pfzdf2xLPsqOZ6HwNgQ3AnMybFAMeOM5GphZlOK6PxzozwtCm+Q)
jasypt.encryptor.password=didispace
# mvn jasypt:encrypt -Djasypt.encryptor.password=didispace
# mvn jasypt:decrypt -Djasypt.encrypt | or.password=didispace
#jasypt.encryptor.property.prefix=ENC(
#jasypt.encryptor.property.suffix=) | repos\SpringBoot-Learning-master\2.x\chapter1-5\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public static class LoadBalancerHandlerConfiguration {
@Bean
public Function<RouteProperties, HandlerFunctionDefinition> lbHandlerFunctionDefinition() {
return routeProperties -> {
Objects.requireNonNull(routeProperties.getUri(), "routeProperties.uri must not be null");
return new HandlerFunctionDefinit... | @Bean
public RetryFilterFunctions.FilterSupplier retryFilterFunctionsSupplier() {
RetryFilterFunctions.setUseFrameworkRetry(properties.isUseFrameworkRetryFilter());
return new RetryFilterFunctions.FilterSupplier();
}
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(OAuth2AuthorizedClient.cl... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\filter\FilterAutoConfiguration.java | 2 |
请完成以下Java代码 | public void setDhl_ShipmentOrder_Log_ID (final int Dhl_ShipmentOrder_Log_ID)
{
if (Dhl_ShipmentOrder_Log_ID < 1)
set_ValueNoCheck (COLUMNNAME_Dhl_ShipmentOrder_Log_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Dhl_ShipmentOrder_Log_ID, Dhl_ShipmentOrder_Log_ID);
}
@Override
public int getDhl_ShipmentOrd... | }
@Override
public int getDurationMillis()
{
return get_ValueAsInt(COLUMNNAME_DurationMillis);
}
@Override
public void setIsError (final boolean IsError)
{
set_Value (COLUMNNAME_IsError, IsError);
}
@Override
public boolean isError()
{
return get_ValueAsBoolean(COLUMNNAME_IsError);
}
@Override
... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java-gen\de\metas\shipper\gateway\dhl\model\X_Dhl_ShipmentOrder_Log.java | 1 |
请完成以下Java代码 | public boolean isShowPreference()
{
return !isNone();
}
public boolean isNone()
{
return this == NONE;
}
public boolean isClient()
{
return this == CLIENT;
}
public boolean isOrganization()
{ | return this == ORGANIZATION;
}
public boolean isUser()
{
return this == USER;
}
/**
*
* @return true if this level allows user to view table record change log (i.e. this level is {@link #CLIENT})
*/
public boolean canViewRecordChangeLog()
{
return isClient();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\UserPreferenceLevelConstraint.java | 1 |
请完成以下Java代码 | public void invalidateView(final ViewId pickingSlotViewId)
{
final PickingSlotView pickingSlotView = getOrCreatePickingSlotView(pickingSlotViewId, false/* create */);
if (pickingSlotView == null)
{
return;
}
final PackageableView packageableView = getPackageableViewByPickingSlotViewId(pickingSlotViewId);... | pickingSlotView.invalidateAll();
ViewChangesCollector.getCurrentOrAutoflush()
.collectFullyChanged(pickingSlotView);
}
@Override
public Stream<IView> streamAllViews()
{
// Do we really have to implement this?
return Stream.empty();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\pickingslot\PickingSlotViewsIndexStorage.java | 1 |
请完成以下Java代码 | public <T> ImmutableList<T> toImmutableList(@NonNull final Function<DocumentId, T> mapper)
{
assertNotAll();
if (documentIds.isEmpty())
{
return ImmutableList.of();
}
return documentIds.stream().map(mapper).collect(ImmutableList.toImmutableList());
}
public Set<Integer> toIntSet()
{
return toSet(Doc... | {
if (isAll())
{
return SelectionSize.ofAll();
}
return SelectionSize.ofSize(size());
}
public DocumentIdsSelection addAll(@NonNull final DocumentIdsSelection documentIdsSelection)
{
if (this.isEmpty())
{
return documentIdsSelection;
}
else if (documentIdsSelection.isEmpty())
{
return thi... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\DocumentIdsSelection.java | 1 |
请完成以下Java代码 | public String getExceptionStacktrace() {
ByteArrayEntity byteArray = getExceptionByteArray();
return ExceptionUtil.getExceptionStacktrace(byteArray);
}
protected ByteArrayEntity getExceptionByteArray() {
if (exceptionByteArrayId != null) {
return Context
.getCommandContext()
.getD... | this.hostname = hostname;
}
public boolean isCreationLog() {
return state == JobState.CREATED.getStateCode();
}
public boolean isFailureLog() {
return state == JobState.FAILED.getStateCode();
}
public boolean isSuccessLog() {
return state == JobState.SUCCESSFUL.getStateCode();
}
public b... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricJobLogEvent.java | 1 |
请完成以下Java代码 | public int getXmlColumnNumber() {
return xmlColumnNumber;
}
public void setXmlColumnNumber(int xmlColumnNumber) {
this.xmlColumnNumber = xmlColumnNumber;
}
public String getActivityId() {
return activityId;
}
public void setActivityId(String activityId) {
this.... | extraInfoAlreadyPresent = true;
}
if (processDefinitionName != null) {
if (extraInfoAlreadyPresent) {
strb.append(" | ");
}
strb.append("processDefinitionName = ").append(processDefinitionName).append(" | ");
extraInfoAlreadyPresent = true;... | repos\flowable-engine-main\modules\flowable-process-validation\src\main\java\org\flowable\validation\ValidationError.java | 1 |
请完成以下Java代码 | public void run() {
try (BufferedReader reader = new BufferedReader(
new InputStreamReader(this.source, StandardCharsets.UTF_8))) {
String line = reader.readLine();
while (line != null) {
this.output.append(line);
this.output.append("\n");
if (this.outputConsumer != null) {
this.out... | @Override
public String toString() {
try {
this.latch.await();
return this.output.toString();
}
catch (InterruptedException ex) {
return "";
}
}
}
} | repos\spring-boot-4.0.1\core\spring-boot-docker-compose\src\main\java\org\springframework\boot\docker\compose\core\ProcessRunner.java | 1 |
请完成以下Java代码 | public class Book implements Serializable {
private String isbn;
private String name;
private String author;
private int pages;
public Book() {
}
public Book(String isbn, String name, String author, int pages) {
this.isbn = isbn;
this.name = name;
this.author = aut... | public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public int getPages() {
return pages;
}
public void setPages(int pages) {
this.pages = pages;
}
@Override
public String toString() {
... | repos\tutorials-master\persistence-modules\jnosql\jnosql-diana\src\main\java\com\baeldung\jnosql\diana\key\Book.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class NextPageQuery
{
public static NextPageQuery anyEntityOrNull(@Nullable final String nextPageId)
{
if (isEmpty(nextPageId, true))
{
return null;
}
return new NextPageQuery(SinceEntity.ALL, nextPageId);
}
public static NextPageQuery onlyContactsOrNull(@Nullable final String nextPageId)
{
if... | return new NextPageQuery(SinceEntity.CONTACT_ONLY, nextPageId);
}
SinceEntity sinceEntity;
String nextPageId;
private NextPageQuery(
@NonNull final SinceEntity sinceEntity,
@NonNull final String nextPageId)
{
this.sinceEntity = sinceEntity;
this.nextPageId = assumeNotEmpty(nextPageId, "nextPageId");
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\composite\repository\NextPageQuery.java | 2 |
请完成以下Java代码 | public class EventRegistryFactoryBean implements FactoryBean<EventRegistryEngine>, DisposableBean, ApplicationContextAware {
protected EventRegistryEngineConfiguration eventEngineConfiguration;
protected ApplicationContext applicationContext;
protected EventRegistryEngine eventRegistryEngine;
@Overri... | }
}
}
@Override
public Class<EventRegistryEngine> getObjectType() {
return EventRegistryEngine.class;
}
@Override
public boolean isSingleton() {
return true;
}
public EventRegistryEngineConfiguration getEventEngineConfiguration() {
return eventEngineCon... | repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\EventRegistryFactoryBean.java | 1 |
请完成以下Java代码 | public void doStart() {
List<ApplicationDeployedEvent> applicationDeployedEvents = getApplicationDeployedEvents();
if (!applicationDeployedEvents.isEmpty()) {
ApplicationDeployedEvent applicationDeployedEvent = applicationDeployedEvents.get(0);
for (ProcessRuntimeEventListener<A... | DeploymentImpl result = new DeploymentImpl();
result.setVersion(deployment.getVersion());
result.setId(deployment.getId());
result.setName(deployment.getName());
int projectReleaseVersionInt = Integer.valueOf(projectReleaseVersion) + 1;
result.setProjectReleas... | repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\ApplicationDeployedEventProducer.java | 1 |
请完成以下Java代码 | public void enableUserOperationLog() {
userOperationLogEnabled = true;
}
public void disableUserOperationLog() {
userOperationLogEnabled = false;
}
public boolean isUserOperationLogEnabled() {
return userOperationLogEnabled;
}
public void setLogUserOperationEnabled(boolean userOperationLogEna... | }
public String getOperationId() {
if (!getOperationLogManager().isUserOperationLogEnabled()) {
return null;
}
if (operationId == null) {
operationId = Context.getProcessEngineConfiguration().getIdGenerator().getNextId();
}
return operationId;
}
public void setOperationId(String ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\interceptor\CommandContext.java | 1 |
请完成以下Java代码 | public class QueueRoutingInfo {
private final TenantId tenantId;
private final QueueId queueId;
private final String queueName;
private final String queueTopic;
private final int partitions;
private final boolean duplicateMsgToAllPartitions;
public QueueRoutingInfo(Queue queue) {
t... | this.queueName = routingInfo.getQueueName();
this.queueTopic = routingInfo.getQueueTopic();
this.partitions = routingInfo.getPartitions();
this.duplicateMsgToAllPartitions = routingInfo.hasDuplicateMsgToAllPartitions() && routingInfo.getDuplicateMsgToAllPartitions();
}
public QueueRouti... | repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\discovery\QueueRoutingInfo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Object visitPrimitiveAsInt(PrimitiveType type, String value) {
return parseNumber(value, Integer::parseInt, type);
}
@Override
public Object visitPrimitiveAsLong(PrimitiveType type, String value) {
return parseNumber(value, Long::parseLong, type);
}
@Override
public Object visitPrimitiveAsCha... | }
@Override
public Object visitPrimitiveAsFloat(PrimitiveType type, String value) {
return parseNumber(value, Float::parseFloat, type);
}
@Override
public Object visitPrimitiveAsDouble(PrimitiveType type, String value) {
return parseNumber(value, Double::parseDouble, type);
}
}
} | repos\spring-boot-4.0.1\configuration-metadata\spring-boot-configuration-processor\src\main\java\org\springframework\boot\configurationprocessor\ParameterPropertyDescriptor.java | 2 |
请完成以下Java代码 | public void setProjectLineLevel (final java.lang.String ProjectLineLevel)
{
set_Value (COLUMNNAME_ProjectLineLevel, ProjectLineLevel);
}
@Override
public java.lang.String getProjectLineLevel()
{
return get_ValueAsString(COLUMNNAME_ProjectLineLevel);
}
/**
* ProjInvoiceRule AD_Reference_ID=383
* Refer... | }
@Override
public void setSalesRep_ID (final int SalesRep_ID)
{
if (SalesRep_ID < 1)
set_Value (COLUMNNAME_SalesRep_ID, null);
else
set_Value (COLUMNNAME_SalesRep_ID, SalesRep_ID);
}
@Override
public int getSalesRep_ID()
{
return get_ValueAsInt(COLUMNNAME_SalesRep_ID);
}
@Override
public vo... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Project.java | 1 |
请完成以下Java代码 | public class VincentyDistance {
// Constants for WGS84 ellipsoid model of Earth
private static final double SEMI_MAJOR_AXIS_MT = 6378137;
private static final double SEMI_MINOR_AXIS_MT = 6356752.314245;
private static final double FLATTENING = 1 / 298.257223563;
private static final double ERROR_TO... | cosSigma = sinU1 * sinU2 + cosU1 * cosU2 * Math.cos(longitudeDifference);
sigma = Math.atan2(sinSigma, cosSigma);
sinAlpha = cosU1 * cosU2 * Math.sin(longitudeDifference) / sinSigma;
cosSqAlpha = 1 - Math.pow(sinAlpha, 2);
cos2SigmaM = cosSigma - 2 * sinU1 * sinU2 / cosSq... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-1\src\main\java\com\baeldung\algorithms\latlondistance\VincentyDistance.java | 1 |
请完成以下Java代码 | public void setM_Product_ID (int M_Product_ID)
{
if (M_Product_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Product_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
}
/** Get Product.
@return Product, Service, Item
*/
public int getM_Product_ID ()
{
Integer ... | */
public void setQtyOrdered (BigDecimal QtyOrdered)
{
set_ValueNoCheck (COLUMNNAME_QtyOrdered, QtyOrdered);
}
/** Get Ordered Quantity.
@return Ordered Quantity
*/
public BigDecimal getQtyOrdered ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyOrdered);
if (bd == null)
return Env.ZERO;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Storage.java | 1 |
请完成以下Java代码 | public final class CompositeHUAssignmentListener implements IHUAssignmentListener
{
private final CopyOnWriteArrayList<IHUAssignmentListener> listeners = new CopyOnWriteArrayList<IHUAssignmentListener>();
public final void addHUAssignmentListener(final IHUAssignmentListener listener)
{
Check.assumeNotNull(listene... | for (final IHUAssignmentListener listener : listeners)
{
listener.onHUAssigned(hu, model, trxName);
}
}
@Override
public final void onHUUnassigned(final IReference<I_M_HU> huRef, final IReference<Object> modelRef, final String trxName)
{
for (final IHUAssignmentListener listener : listeners)
{
listen... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\CompositeHUAssignmentListener.java | 1 |
请完成以下Java代码 | public static DistributionFacetId ofSalesOrderId(@NonNull OrderId salesOrderId)
{
return ofRepoId(DistributionFacetGroupType.SALES_ORDER, salesOrderId);
}
public static DistributionFacetId ofManufacturingOrderId(@NonNull PPOrderId manufacturingOrderId)
{
return ofRepoId(DistributionFacetGroupType.MANUFACTURING... | public static DistributionFacetId ofQuantity(@NonNull Quantity qty)
{
return ofWorkflowLaunchersFacetId(
WorkflowLaunchersFacetId.ofQuantity(
DistributionFacetGroupType.QUANTITY.toWorkflowLaunchersFacetGroupId(),
qty.toBigDecimal(),
qty.getUomId()
)
);
}
public static DistributionFacet... | repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\launchers\facets\DistributionFacetId.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserService {
private Logger logger = LoggerFactory.getLogger(this.getClass());
@Resource
private UserMapper userMapper;
/**
* cacheNames 设置缓存的值
* key:指定缓存的key,这是指参数id值。key可以使用spEl表达式
*
* @param id
* @return
*/
@Cacheable(value = "userCache", key = "#id", ... | /**
* 更新用户,同时使用新的返回值的替换缓存中的值
* 更新用户后会将allUsersCache缓存全部清空
*/
@Caching(
put = {@CachePut(value = "userCache", key = "#user.id")},
evict = {@CacheEvict(value = "allUsersCache", allEntries = true)}
)
public User updateUser(User user) {
logger.info("更新用户start...");... | repos\SpringBootBucket-master\springboot-cache\src\main\java\com\xncoding\trans\service\UserService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Duration getReceiveTimeout() {
return this.receiveTimeout;
}
public void setReceiveTimeout(Duration receiveTimeout) {
this.receiveTimeout = receiveTimeout;
}
public @Nullable Duration getFixedDelay() {
return this.fixedDelay;
}
public void setFixedDelay(@Nullable Duration fixedDelay) {
... | public static class Management {
/**
* Whether Spring Integration components should perform logging in the main
* message flow. When disabled, such logging will be skipped without checking the
* logging level. When enabled, such logging is controlled as normal by the
* logging system's log level configur... | repos\spring-boot-4.0.1\module\spring-boot-integration\src\main\java\org\springframework\boot\integration\autoconfigure\IntegrationProperties.java | 2 |
请完成以下Java代码 | public String getElementName() {
return ELEMENT_MULTIINSTANCE;
}
public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception {
if (!(parentElement instanceof Activity)) {
return;
}
MultiInstanceLoopCharacteristics m... | .orElse(null);
if (matchingParser != null) {
matchingParser.setInformation(xtr, multiInstanceDef);
}
if (xtr.isEndElement() && getElementName().equalsIgnoreCase(xtr.getLocalName())) {
readyWithMultiInstance = true;
}... | repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\child\multi\instance\MultiInstanceParser.java | 1 |
请完成以下Java代码 | public void setObligation(Boolean value) {
this.obligation = value;
}
/**
* Gets the value of the sectionCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getSectionCode() {
return sectionCode;
}
/*... | * @return
* possible object is
* {@link Long }
*
*/
public long getServiceAttributes() {
if (serviceAttributes == null) {
return 0L;
} else {
return serviceAttributes;
}
}
/**
* Sets the value of the serviceAttributes pr... | 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\RecordServiceType.java | 1 |
请完成以下Java代码 | public static BufferedImage generateUPCABarcodeImage(String barcodeText) throws Exception {
UPCAWriter barcodeWriter = new UPCAWriter();
BitMatrix bitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.UPC_A, 300, 150);
return MatrixToImageWriter.toBufferedImage(bitMatrix);
}
publ... | }
public static BufferedImage generatePDF417BarcodeImage(String barcodeText) throws Exception {
PDF417Writer barcodeWriter = new PDF417Writer();
BitMatrix bitMatrix = barcodeWriter.encode(barcodeText, BarcodeFormat.PDF_417, 700, 700);
return MatrixToImageWriter.toBufferedImage(bitMatrix);
... | repos\tutorials-master\spring-boot-modules\spring-boot-libraries\src\main\java\com\baeldung\barcodes\generators\ZxingBarcodeGenerator.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isEnabled() {
return (this.enabled != null) ? this.enabled : this.bundle != null;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public @Nullable String getBundle() {
return this.bundle;
}
public void setBundle(@Nullable String bundle) {
this.bundle = bun... | public static class Cluster {
private final Refresh refresh = new Refresh();
public Refresh getRefresh() {
return this.refresh;
}
public static class Refresh {
/**
* Whether to discover and query all cluster nodes for obtaining the
* cluster topology. When set to false, only the initia... | repos\spring-boot-4.0.1\module\spring-boot-data-redis\src\main\java\org\springframework\boot\data\redis\autoconfigure\DataRedisProperties.java | 2 |
请完成以下Java代码 | public class MyCustomRule implements EnforcerRule {
public void execute(EnforcerRuleHelper enforcerRuleHelper) throws EnforcerRuleException {
try {
String groupId = (String) enforcerRuleHelper.evaluate("${project.groupId}");
if (groupId == null || !groupId.startsWith("com.baeldun... | }
}
public boolean isCacheable() {
return false;
}
public boolean isResultValid(EnforcerRule enforcerRule) {
return false;
}
public String getCacheId() {
return null;
}
} | repos\tutorials-master\maven-modules\maven-plugins\custom-rule\src\main\java\com\baeldung\enforcer\MyCustomRule.java | 1 |
请完成以下Java代码 | public class CompleteAdhocSubProcessCmd implements Command<Void>, Serializable {
private static final long serialVersionUID = 1L;
protected String executionId;
public CompleteAdhocSubProcessCmd(String executionId) {
this.executionId = executionId;
}
public Void execute(CommandContext com... | throw new ActivitiException(
"The current flow element of the requested execution is not an ad-hoc sub process"
);
}
List<? extends ExecutionEntity> childExecutions = execution.getExecutions();
if (childExecutions.size() > 0) {
throw new ActivitiException... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\CompleteAdhocSubProcessCmd.java | 1 |
请完成以下Java代码 | public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((name == null) ? 0 : name.hashCode());
... | public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
User other = (User) obj;
if (name == null) {
if (other.name != null)
re... | repos\tutorials-master\web-modules\jakarta-servlets-2\src\main\java\com\baeldung\user\check\User.java | 1 |
请完成以下Java代码 | public class DeleteHistoricProcessInstanceCmd implements Command<Object>, Serializable {
private static final long serialVersionUID = 1L;
protected String processInstanceId;
public DeleteHistoricProcessInstanceCmd(String processInstanceId) {
this.processInstanceId = processInstanceId;
}
@... | throw new FlowableException("Process instance is still running, cannot delete " + instance);
}
if (Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, instance.getProcessDefinitionId())) {
Flowable5CompatibilityHandler compatibilityHandler = Flowable5Util.getFlowable5CompatibilityH... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\DeleteHistoricProcessInstanceCmd.java | 1 |
请完成以下Java代码 | public static IdmIdentityService getIdmIdentityService() {
IdmIdentityService identityService = null;
IdmEngineConfigurationApi idmEngineConfiguration = getIdmEngineConfiguration();
if (idmEngineConfiguration != null) {
identityService = idmEngineConfiguration.getIdmIdentityService()... | public static DbSqlSession getDbSqlSession(CommandContext commandContext) {
return commandContext.getSession(DbSqlSession.class);
}
public static EntityCache getEntityCache() {
return getEntityCache(getCommandContext());
}
public static EntityCache getEntityCache(CommandContext command... | repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\util\CommandContextUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | RSocketServerCustomizer frameDecoderRSocketServerCustomizer(RSocketMessageHandler rSocketMessageHandler) {
return (server) -> {
if (rSocketMessageHandler.getRSocketStrategies()
.dataBufferFactory() instanceof NettyDataBufferFactory) {
server.payloadDecoder(PayloadDecoder.ZERO_COPY);
}
};
}
}... | }
@ConditionalOnProperty(name = "spring.rsocket.server.port", matchIfMissing = true)
static class HasNoPortConfigured {
}
@ConditionalOnProperty("spring.rsocket.server.mapping-path")
static class HasMappingPathConfigured {
}
@ConditionalOnProperty(name = "spring.rsocket.server.transport", havingValue... | repos\spring-boot-4.0.1\module\spring-boot-rsocket\src\main\java\org\springframework\boot\rsocket\autoconfigure\RSocketServerAutoConfiguration.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.