instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
pu... | return userEntity;
}
public void setUserEntity(UserEntity userEntity) {
this.userEntity = userEntity;
}
public List<CommentEntity> getCommentEntityList() {
return commentEntityList;
}
public void setCommentEntityList(List<CommentEntity> commentEntityList) {
this.commen... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\user\ArticleEntity.java | 2 |
请完成以下Java代码 | public void restore() {
this.delegate.restore();
}
private static final class DelegateAccessor implements ThreadLocalAccessor<Object> {
@Override
public Object key() {
return SecurityContext.class.getName();
}
@Override
public Object getValue() {
return SecurityContextHolder.getContext();
}
... | }
private static final class NoOpAccessor implements ThreadLocalAccessor<Object> {
@Override
public Object key() {
return getClass().getName();
}
@Override
public @Nullable Object getValue() {
return null;
}
@Override
public void setValue(Object value) {
}
@Override
public void setVal... | repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\execution\SecurityContextThreadLocalAccessor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getCommercialInvoiceConsigneeVatNumber() {
return commercialInvoiceConsigneeVatNumber;
}
/**
* Sets the value of the commercialInvoiceConsigneeVatNumber property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void s... | */
public Address getCommercialInvoiceConsignee() {
return commercialInvoiceConsignee;
}
/**
* Sets the value of the commercialInvoiceConsignee property.
*
* @param value
* allowed object is
* {@link Address }
*
*/
public void setCommercialInvoic... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\International.java | 2 |
请完成以下Java代码 | public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Function Prefix.
@param FunctionPrefix
Data sent before the function
*/
public void setFunctionPrefix (String FunctionPrefix)
{
set_Value (COLUMNNAME_FunctionPrefix, FunctionPrefix);
}
/** Get Function Pr... | if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_LabelPrinterFunction.java | 1 |
请完成以下Java代码 | public Element setLang(String lang)
{
addAttribute("lang",lang);
addAttribute("xml:lang",lang);
return this;
}
/**
Adds an Element to the element.
@param hashcode name of element for hash table
@param element Adds an Element to the element.
... | */
public colgroup addElement(Element element)
{
addElementToRegistry(element);
return(this);
}
/**
Adds an Element to the element.
@param element Adds an Element to the element.
*/
public colgroup addElement(String element)
{
addElemen... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\colgroup.java | 1 |
请完成以下Java代码 | public void setC_UOM_ID (final int C_UOM_ID)
{
if (C_UOM_ID < 1)
set_Value (COLUMNNAME_C_UOM_ID, null);
else
set_Value (COLUMNNAME_C_UOM_ID, C_UOM_ID);
}
@Override
public int getC_UOM_ID()
{
return get_ValueAsInt(COLUMNNAME_C_UOM_ID);
}
@Override
public org.compiere.model.I_M_InOut getM_InOut()... | set_Value (COLUMNNAME_QtyDeliveredInUOM, QtyDeliveredInUOM);
}
@Override
public BigDecimal getQtyDeliveredInUOM()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyDeliveredInUOM);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyEntered (final @Nullable BigDecimal QtyEnte... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_CallOrderDetail.java | 1 |
请完成以下Java代码 | public void setEventClass(String eventClass) {
this.eventClass = eventClass;
}
public String getSize() {
return size;
}
public void setSize(String size) {
this.size = size;
}
public int getSpeedKmPerS() {
return speedKmPerS;
}
public void setSpeedKmPer... | @JsonProperty("latitude")
private double latitude;
@JsonProperty("longitude")
private double longitude;
public double getLatitude() {
return latitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public double getLongitude() {
retur... | repos\tutorials-master\json-modules\json-operations\src\main\java\com\baeldung\sorting\SolarEvent.java | 1 |
请完成以下Java代码 | public boolean isPartiallyPickedOrDelivered()
{
return packageable.getQtyPickedPlanned().signum() != 0
|| packageable.getQtyPickedNotDelivered().signum() != 0
|| packageable.getQtyPickedAndDelivered().signum() != 0;
}
public @NonNull ProductId getProductId() {return packageable.getProductId();}
public @... | ? schedule.getQtyToPick()
: packageable.getQtyToPick();
}
public @Nullable UomId getCatchWeightUomId() {return packageable.getCatchWeightUomId();}
public @Nullable PPOrderId getPickFromOrderId() {return packageable.getPickFromOrderId();}
public @Nullable ShipperId getShipperId() {return packageable.getShippe... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\ScheduledPackageable.java | 1 |
请完成以下Java代码 | private boolean alreadyProcessed(NotificationRuleTrigger trigger, String deduplicationKey, boolean onlyLocalCache) {
Long lastProcessedTs = localCache.get(deduplicationKey);
if (lastProcessedTs == null && !onlyLocalCache) {
Cache externalCache = getExternalCache();
if (externalCa... | }
public static String getDeduplicationKey(NotificationRuleTrigger trigger, NotificationRule rule) {
return String.join("_", trigger.getDeduplicationKey(), rule.getDeduplicationKey());
}
private long getDeduplicationDuration(NotificationRuleTrigger trigger) {
return deduplicationDurations.... | repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\notification\DefaultNotificationDeduplicationService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public AppDeploymentQuery orderByDeploymentName() {
return orderBy(AppDeploymentQueryProperty.DEPLOYMENT_NAME);
}
@Override
public AppDeploymentQuery orderByTenantId() {
return orderBy(AppDeploymentQueryProperty.DEPLOYMENT_TENANT_ID);
}
// results //////////////////////////////////... | public String getNameLike() {
return nameLike;
}
public String getCategory() {
return category;
}
public String getCategoryNotEquals() {
return categoryNotEquals;
}
public String getKey() {
return key;
}
public boolean isLatest() {
return l... | repos\flowable-engine-main\modules\flowable-app-engine\src\main\java\org\flowable\app\engine\impl\repository\AppDeploymentQueryImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getId() {
return id;
}
public String getTitle() {
return title;
}
public Instant getCreated() {
return created;
}
public String getCreatedBy() {
return createdBy;
} | public String getAssignedTo() {
return assignedTo;
}
public String getStatus() {
return status;
}
public void setAssignedTo(final String assignedTo) {
this.assignedTo = assignedTo;
}
public void setStatus(final String status) {
this.status = status;
}
} | repos\tutorials-master\lightrun\lightrun-tasks-service\src\main\java\com\baeldung\tasksservice\adapters\repository\TaskRecord.java | 2 |
请完成以下Java代码 | protected Properties getConfig()
{
return config;
}
@Override
public void setMonitor(IExporterMonitor monitor)
{
Check.assumeNotNull(monitor, "monitor not null");
this.monitor = monitor;
}
@Override
public int getExportedRowCount()
{
return exportedRowCount.intValue();
}
protected int incrementExp... | }
catch (Exception e)
{
final AdempiereException ex = new AdempiereException("Error while exporting line " + getExportedRowCount() + ": " + e.getLocalizedMessage(), e);
error = ex;
throw ex;
}
finally
{
close(dataSource);
close(dataDestination);
dataDestination = null;
setExportStatus(Ex... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\data\export\api\impl\AbstractExporter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected ImmutableSet<ServiceRepairProjectTaskId> getSelectedTaskIds()
{
final ProjectId projectId = getProjectId();
return getSelectedIncludedRecordIds(I_C_Project_Repair_Task.class)
.stream()
.map(taskRepoId -> ServiceRepairProjectTaskId.ofRepoId(projectId, taskRepoId))
.collect(ImmutableSet.toImmut... | return ImmutableSet.of();
}
return context.getSelectedIncludedRecords()
.stream()
.filter(recordRef -> I_C_Project_Repair_Task.Table_Name.equals(recordRef.getTableName()))
.map(recordRef -> ServiceRepairProjectTaskId.ofRepoId(projectId, recordRef.getRecord_ID()))
.collect(ImmutableSet.toImmutableSe... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.webui\src\main\java\de\metas\servicerepair\project\process\ServiceOrRepairProjectBasedProcess.java | 2 |
请完成以下Java代码 | public <T extends SimpleAsyncTaskExecutor> T build(Class<T> taskExecutorClass) {
return configure(BeanUtils.instantiateClass(taskExecutorClass));
}
/**
* Configure the provided {@link SimpleAsyncTaskExecutor} instance using this builder.
* @param <T> the type of task executor
* @param taskExecutor the {@link... | map.from(this.taskDecorator).to(taskExecutor::setTaskDecorator);
map.from(this.taskTerminationTimeout).as(Duration::toMillis).to(taskExecutor::setTaskTerminationTimeout);
if (!CollectionUtils.isEmpty(this.customizers)) {
this.customizers.forEach((customizer) -> customizer.customize(taskExecutor));
}
return t... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\task\SimpleAsyncTaskExecutorBuilder.java | 1 |
请完成以下Java代码 | private void assertAuth()
{
userSession.assertLoggedIn();
final AdWindowId purchaseCandidatesWindowId = RecordWindowFinder.findAdWindowId(I_C_PurchaseCandidate.Table_Name).get();
if (!userSession.getUserRolePermissions().checkWindowPermission(purchaseCandidatesWindowId).hasWriteAccess())
{
throw new Adempi... | reminderScheduler.scheduleNotification(reminder);
}
@GetMapping("/nextDispatchTime")
public ZonedDateTime getNextDispatchTime()
{
assertAuth();
return reminderScheduler.getNextDispatchTime();
}
@PostMapping("/reinitialize")
public List<PurchaseCandidateReminder> reinitialize()
{
assertAuth();
remind... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\purchasecandidate\reminder\PurchaseCandidateReminderSchedulerRestController.java | 1 |
请完成以下Java代码 | public void setAD_BusinessRule_ID (final int AD_BusinessRule_ID)
{
if (AD_BusinessRule_ID < 1)
set_ValueNoCheck (COLUMNNAME_AD_BusinessRule_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_BusinessRule_ID, AD_BusinessRule_ID);
}
@Override
public int getAD_BusinessRule_ID()
{
return get_ValueAsInt(CO... | {
set_Value (COLUMNNAME_Severity, Severity);
}
@Override
public java.lang.String getSeverity()
{
return get_ValueAsString(COLUMNNAME_Severity);
}
@Override
public org.compiere.model.I_AD_Val_Rule getValidation_Rule()
{
return get_ValueAsPO(COLUMNNAME_Validation_Rule_ID, org.compiere.model.I_AD_Val_Rule... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_BusinessRule.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Component
public class OrderPropertiesCommandLineRunner implements CommandLineRunner {
private final Logger logger = LoggerFactory.getLogger(getClass());
@Au... | private final Logger logger = LoggerFactory.getLogger(getClass());
@Value("${order.pay-timeout-seconds}")
private Integer payTimeoutSeconds;
@Value("${order.create-frequency-seconds}")
private Integer createFrequencySeconds;
// @Value("${order.desc}")
// private String d... | repos\SpringBoot-Labs-master\lab-43\lab-43-demo\src\main\java\cn\iocoder\springboot\lab43\propertydemo\Application.java | 2 |
请完成以下Java代码 | public class User implements Serializable ,Comparable{
private static final long serialVersionUID = -1205226416664488559L;
private Integer id;
private String username;
private String password;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = ... | this.password = password;
}
@Override
public String toString() {
return "User{" +
"id=" + id +
", username='" + username + '\'' +
", password='" + password + '\'' +
'}';
}
@Override
public int compareTo(Object o) {
... | repos\SpringBootLearning-master\sharding-jdbc-example\sharding-jdbc-db-ms-tbl\src\main\java\com\forezp\shardingjdbcdbmstbl\entity\User.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Customer
{
public static Customer ofOrNull(@Nullable final BPartnerId bPartnerId)
{
if (bPartnerId == null)
{
return null;
}
return of(bPartnerId);
}
@JsonCreator
public static Customer of(@JsonProperty("bPartnerId") @NonNull final BPartnerId bPartnerId)
{
return new Customer(bPartnerId... | }
BPartnerId bPartnerId;
private Customer(BPartnerId bPartnerId)
{
this.bPartnerId = bPartnerId;
}
@JsonProperty("bPartnerId")
public BPartnerId getBPartnerId()
{
return bPartnerId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\Customer.java | 2 |
请完成以下Java代码 | public java.math.BigDecimal getPaymentWriteOffAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PaymentWriteOffAmt);
if (bd == null)
return BigDecimal.ZERO;
return bd;
}
@Override
public org.compiere.model.I_C_AllocationLine getReversalLine()
{
return get_ValueAsPO(COLUMNNAME_ReversalLine_ID,... | {
Integer ii = (Integer)get_Value(COLUMNNAME_ReversalLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Abschreiben.
@param WriteOffAmt
Amount to write-off
*/
@Override
public void setWriteOffAmt (java.math.BigDecimal WriteOffAmt)
{
set_ValueNoCheck (COLUMNNAME_WriteOffAmt, Wr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_AllocationLine.java | 1 |
请完成以下Java代码 | public boolean isWithJobException() {
return withJobException;
}
public String getLocale() {
return locale;
}
public boolean isWithLocalizationFallback() {
return withLocalizationFallback;
}
public boolean isNeedsProcessDefinitionOuterJoin() {
if (isNeedsPaging... | public List<List<String>> getSafeProcessInstanceIds() {
return safeProcessInstanceIds;
}
public void setSafeProcessInstanceIds(List<List<String>> safeProcessInstanceIds) {
this.safeProcessInstanceIds = safeProcessInstanceIds;
}
public List<List<String>> getSafeInvolvedGroups() {
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\HistoricProcessInstanceQueryImpl.java | 1 |
请完成以下Java代码 | public List<Sentry> getSentries() {
return sentries;
}
public List<SentryOnPart> getSentryOnParts() {
return sentryOnParts;
}
public List<SentryIfPart> getSentryIfParts() {
return sentryIfParts;
}
public List<PlanItem> getPlanItems() {
return planItems;
}
... | }
public List<CmmnDiEdge> getDiEdges() {
return diEdges;
}
public GraphicInfo getCurrentLabelGraphicInfo() {
return currentLabelGraphicInfo;
}
public void setCurrentLabelGraphicInfo(GraphicInfo labelGraphicInfo) {
this.currentLabelGraphicInfo = labelGraphicInfo;
}
} | repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\ConversionHelper.java | 1 |
请完成以下Java代码 | public class HandleInstanceAlreadyExistsException {
public static void generateUniqueClientIDUsingUUIDRandom() {
Properties props = new Properties();
props.put("bootstrap.servers", "localhost:9092");
props.put("key.serializer", StringSerializer.class);
props.put("value.serializer", ... | public static void useUniqueObjectName() throws Exception {
MBeanServer mBeanServer1 = ManagementFactory.getPlatformMBeanServer();
MBeanServer mBeanServer2 = ManagementFactory.getPlatformMBeanServer();
ObjectName objectName1 = new ObjectName("kafka.server:type=KafkaMetrics,id=metric1");
... | repos\tutorials-master\spring-kafka-3\src\main\java\com\baeldung\spring\kafka\kafkaexception\HandleInstanceAlreadyExistsException.java | 1 |
请完成以下Java代码 | public int getSubstitute_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Substitute_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Gültig ab.
@param ValidFrom
Valid from including this date (first day)
*/
@Override
public void setValidFrom (java.sql.Timestamp ValidFrom)
{
... | return (java.sql.Timestamp)get_Value(COLUMNNAME_ValidFrom);
}
/** Set Gültig bis.
@param ValidTo
Valid to including this date (last day)
*/
@Override
public void setValidTo (java.sql.Timestamp ValidTo)
{
set_Value (COLUMNNAME_ValidTo, ValidTo);
}
/** Get Gültig bis.
@return Valid to including this ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_Substitute.java | 1 |
请完成以下Java代码 | private IDCache<PO> create(final ITableCacheConfig cacheConfig)
{
final String tableName = cacheConfig.getTableName();
final int expireMinutes = cacheConfig.getExpireMinutes();
final CacheMapType cacheMapType = cacheConfig.getCacheMapType();
final int initialCapacity = cacheConfig.getInitialCapacity();
... | final int recordId = recordRef.getRecord_ID();
//
// Get table's cache map.
final IDCache<PO> cache = getByTableNameIfExists(tableName);
if (cache == null)
{
return;
}
// Invalidate the cache
final boolean invalidated = cache.remove(recordId) != null;
// Logging
if (invalidated && l... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\impl\ModelCacheService.java | 1 |
请完成以下Java代码 | public String getEntityType ()
{
return (String)get_Value(COLUMNNAME_EntityType);
}
/** FieldGroupType AD_Reference_ID=53000 */
public static final int FIELDGROUPTYPE_AD_Reference_ID=53000;
/** Tab = T */
public static final String FIELDGROUPTYPE_Tab = "T";
/** Label = L */
public static final String FIELDG... | return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_FieldGroup.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void markAsProcessed(final Set<PickingJobScheduleId> ids)
{
pickingJobScheduleRepository.updateByIds(ids, jobSchedule -> jobSchedule.toBuilder().processed(true).build());
}
public Set<ShipmentScheduleId> getShipmentScheduleIdsWithAllJobSchedulesProcessedOrMissing(@NonNull final Set<ShipmentScheduleId> ship... | final I_M_ShipmentSchedule shipmentSchedule = pickingJobShipmentScheduleService.getByIdAsRecord(shipmentScheduleId);
final Quantity qtyToDeliver = pickingJobShipmentScheduleService.getQtyToDeliver(shipmentSchedule);
final Quantity qtyScheduledForPicking = pickingJobShipmentScheduleService.getQtyScheduledForPicking(... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job_schedule\service\PickingJobScheduleService.java | 2 |
请完成以下Java代码 | public int getCreatedBy() {
return po.getCreatedBy(); // getCreateddBy
}
/**
* Get UpdatedBy
* @return AD_User_ID
*/
public int getUpdatedBy() {
return po.getUpdatedBy(); // getUpdatedBy
}
/**************************************************************************
* Update Value or create new re... | /**************************************************************************
* Lock it.
* @return true if locked
*/
public boolean lock() {
return po.lock(); // lock
}
/**
* UnLock it
* @return true if unlocked (false only if unlock fails)
*/
public boolean unlock(String trxName) {
return po.u... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\wrapper\AbstractPOWrapper.java | 1 |
请完成以下Java代码 | public UiExtensions scan(String... locations) throws IOException {
List<UiExtension> extensions = new ArrayList<>();
for (String location : locations) {
for (Resource resource : resolveAssets(location)) {
String resourcePath = this.getResourcePath(location, resource);
if (resourcePath != null && resource... | }
private String toPattern(String location) {
// replace the classpath pattern to search all locations and not just the first
return location.replace("classpath:", "classpath*:");
}
@Nullable
private String getResourcePath(String location, Resource resource) throws IOException {
String locationWithoutPrefix... | repos\spring-boot-admin-master\spring-boot-admin-server-ui\src\main\java\de\codecentric\boot\admin\server\ui\extensions\UiExtensionsScanner.java | 1 |
请完成以下Java代码 | public Long getVersion() {
return version;
}
/**
* Sets the value of the version property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setVersion(Long value) {
this.version = value;
}
/**
* Gets the val... | }
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setId(Long value) {
this.id = value;
}
} | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\DependsOnType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void uploadFiles(List<MultipartFile> files) throws IOException {
uploadFiles(files, true);
}
/**
* single file upload (MultipartFile)
*
* @param multipartFile MultipartFile
* @throws IOException
*/
@Override
public void uploadFile(MultipartFile multipartFile) thr... | try {
outputStream = new FileOutputStream(file);
int read;
byte[] bytes = new byte[1024];
while ((read = inputStream.read(bytes)) != -1) {
outputStream.write(bytes, 0, read);
}
log.info("convert InputStream to file done, savePath is... | repos\springboot-demo-master\sftp\src\main\java\com\et\sftp\service\impl\SftpServiceImpl.java | 2 |
请完成以下Java代码 | public User withRole(Role role) {
this.role = role;
return this;
}
@Override
@SuppressWarnings("all")
public int compareTo(User other) {
return this.getName().compareTo(other.getName());
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof User... | }
@Override
public String toString() {
return getName();
}
public enum Role {
CLUSTER_OPERATOR,
DEVELOPER;
public static Role of(String name) {
return Arrays.stream(values())
.filter(role -> role.name().equalsIgnoreCase(String.valueOf(name).trim()))
.findFirst()
.orElse(null);
}
pub... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\env\support\User.java | 1 |
请完成以下Java代码 | public long size()
{
return rows.size();
}
private static ImmutableMap<DocumentId, HUEditorRow> buildRowsByIdMap(final List<HUEditorRow> rows)
{
if (rows.isEmpty())
{
return ImmutableMap.of();
}
final ImmutableMap.Builder<DocumentId, HUEditorRow> rowsById = ImmutableMap.builder();
rows.f... | return ImmutableMap.of();
}
final ImmutableMap.Builder<HUEditorRowId, HUEditorRowId> rowId2parentId = ImmutableMap.builder();
rows.forEach(row -> buildRowId2ParentIdMap(rowId2parentId, row));
return rowId2parentId.build();
}
private static void buildRowId2ParentIdMap(final ImmutableMap.Builder<HUEdito... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\HUEditorViewBuffer_FullyCached.java | 1 |
请完成以下Java代码 | public Builder jwkSetUrl(String jwkSetUrl) {
return setting(ConfigurationSettingNames.Client.JWK_SET_URL, jwkSetUrl);
}
/**
* Sets the {@link JwsAlgorithm JWS} algorithm that must be used for signing the
* {@link Jwt JWT} used to authenticate the Client at the Token Endpoint for the
* {@link ClientAuth... | */
public Builder x509CertificateSubjectDN(String x509CertificateSubjectDN) {
return setting(ConfigurationSettingNames.Client.X509_CERTIFICATE_SUBJECT_DN, x509CertificateSubjectDN);
}
/**
* Builds the {@link ClientSettings}.
* @return the {@link ClientSettings}
*/
@Override
public ClientSettings ... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\settings\ClientSettings.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PersonTemplateService implements PersonService {
private static final String DESIGN_DOC = "person";
private CouchbaseTemplate template;
@Autowired
public void setCouchbaseTemplate(CouchbaseTemplate template) {
this.template = template;
}
public Optional<Person> findOne(S... | return template.findByQuery(Person.class).matching(where("firstName").is(firstName)).all();
}
public List<Person> findByLastName(String lastName) {
return template.findByQuery(Person.class).matching(where("lastName").is(lastName)).all();
}
public void create(Person person) {
person.set... | repos\tutorials-master\persistence-modules\spring-data-couchbase-2\src\main\java\com\baeldung\spring\data\couchbase\service\PersonTemplateService.java | 2 |
请完成以下Java代码 | public void callAfterLoad(final BiConsumer<IHUContext, List<IAllocationResult>> consumer)
{
addListener(new IHUTrxListener()
{
@Override
public void afterLoad(final IHUContext huContext, final List<IAllocationResult> loadResults)
{
consumer.accept(huContext, loadResults);
}
});
}
public void r... | public void afterLoad(final IHUContext huContext, final List<IAllocationResult> loadResults)
{
for (final IHUTrxListener listener : listeners)
{
listener.afterLoad(huContext, loadResults);
}
}
@Override
public void onUnloadLoadTransaction(final IHUContext huContext, final IHUTransactionCandidate unloadTrx... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\CompositeHUTrxListener.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public StaticResourceRequestMatcher excluding(Set<StaticResourceLocation> locations) {
Assert.notNull(locations, "'locations' must not be null");
Set<StaticResourceLocation> subset = new LinkedHashSet<>(this.locations);
subset.removeAll(locations);
return new StaticResourceRequestMatcher(subset);
}
@Ov... | @Override
protected boolean ignoreApplicationContext(WebApplicationContext applicationContext) {
return hasServerNamespace(applicationContext, "management");
}
@Override
protected boolean matches(HttpServletRequest request, Supplier<DispatcherServletPath> context) {
RequestMatcher delegate = this.delegat... | repos\spring-boot-4.0.1\module\spring-boot-security\src\main\java\org\springframework\boot\security\autoconfigure\web\servlet\StaticResourceRequest.java | 2 |
请完成以下Java代码 | public void setSubProducer_BPartner_ID (final int SubProducer_BPartner_ID)
{
if (SubProducer_BPartner_ID < 1)
set_Value (COLUMNNAME_SubProducer_BPartner_ID, null);
else
set_Value (COLUMNNAME_SubProducer_BPartner_ID, SubProducer_BPartner_ID);
}
@Override
public int getSubProducer_BPartner_ID()
{
ret... | {
set_Value (COLUMNNAME_X, X);
}
@Override
public java.lang.String getX()
{
return get_ValueAsString(COLUMNNAME_X);
}
@Override
public void setX1 (final @Nullable java.lang.String X1)
{
set_Value (COLUMNNAME_X1, X1);
}
@Override
public java.lang.String getX1()
{
return get_ValueAsString(COLUMNN... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Inventory.java | 1 |
请完成以下Java代码 | public boolean isUserElement2Dim ()
{
Object oo = get_Value(COLUMNNAME_IsUserElement2Dim);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Last Recalculated.
@param LastRecalculated
The time last recalc... | /** Get Report Cube.
@return Define reporting cube for pre-calculation of summary accounting data.
*/
public int getPA_ReportCube_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PA_ReportCube_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Process Now.
@param Processing Process ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_ReportCube.java | 1 |
请完成以下Java代码 | public void setPrecision(CurrencyPrecision precision)
{
this.precision = precision;
}
public void setProductPrice(final I_M_Product product, final BigDecimal price)
{
productId2price.put(ProductId.ofRepoId(product.getM_Product_ID()), price);
}
@Override
public boolean applies(IPricingContext pricingCtx, IP... | result.setPriceLimit(price);
result.setPriceList(price);
result.setPriceStd(price);
result.setPrecision(precision);
result.setTaxCategoryId(TaxCategoryId.ofRepoId(100));
final I_C_UOM priceUOM = productId2priceUOM.get(productId);
if (priceUOM != null)
{
result.setPriceUomId(UomId.ofRepoId(priceUOM.g... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\MockedPricingRule.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HistoryJobEntityManagerImpl
extends JobInfoEntityManagerImpl<HistoryJobEntity, HistoryJobDataManager>
implements HistoryJobEntityManager {
private static final Logger LOGGER = LoggerFactory.getLogger(HistoryJobEntityManagerImpl.class);
public HistoryJobEntityManagerImpl(JobService... | return dataManager.findHistoryJobCountByQueryCriteria(jobQuery);
}
@Override
public void delete(HistoryJobEntity jobEntity) {
super.delete(jobEntity, false);
deleteByteArrayRef(jobEntity.getExceptionByteArrayRef());
deleteByteArrayRef(jobEntity.getAdvancedJobHandlerConfigurationByt... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\persistence\entity\HistoryJobEntityManagerImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Issue
{
@JsonProperty("id")
String id;
@JsonProperty("html_url")
String htmlUrl;
@JsonProperty("number")
Integer number;
@JsonProperty("title")
String title;
@JsonProperty("labels")
List<Label> labelList;
@JsonProperty("state")
String state;
@JsonProperty("assignee")
User assignee; | @JsonProperty("milestone")
GithubMilestone githubMilestone;
@JsonProperty("body")
String body;
@JsonProperty("pull_request")
PullRequest pullRequest;
public boolean isPullRequest()
{
return pullRequest != null;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.issue.tracking.github\src\main\java\de\metas\issue\tracking\github\api\v3\model\Issue.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void deleteAllLocalTaskVariables(@ApiParam(name = "taskId") @PathVariable String taskId) {
Task task = getTaskFromRequestWithoutAccessCheck(taskId);
Collection<String> currentVariables = taskService.getVariablesLocal(task.getId()).keySet();
if (restApiInterceptor != null) {
re... | if (!variableMap.containsKey(var.getName())) {
variableMap.put(var.getName(), var);
}
}
}
}
protected void addLocalVariables(Task task, Map<String, RestVariable> variableMap) {
Map<String, Object> rawVariables = taskService.getVariablesLocal(task.... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\task\TaskVariableCollectionResource.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public net.shibboleth.shared.resource.Resource createRelativeResource(String relativePath)
throws IOException {
return new SpringResource(this.resource.createRelative(relativePath));
}
@Override
public String getFilename() {
return this.resource.getFilename();
}
@Override
public String ... | }
@Override
EntityDescriptor resolveSingle(EntityIdCriterion entityId) throws Exception {
return super.metadataResolver.resolveSingle(new CriteriaSet(entityId));
}
@Override
Iterable<EntityDescriptor> resolve(EntityRoleCriterion role) throws Exception {
return super.metadataResolver.resolve(new Criter... | repos\spring-security-main\saml2\saml2-service-provider\src\opensaml5Main\java\org\springframework\security\saml2\provider\service\registration\OpenSaml5AssertingPartyMetadataRepository.java | 2 |
请完成以下Java代码 | private void sendClientRegistrationResponse(HttpServletRequest request, HttpServletResponse response,
Authentication authentication) throws IOException {
OidcClientRegistration clientRegistration = ((OidcClientRegistrationAuthenticationToken) authentication)
.getClientRegistration();
ServletServerHttpResponse... | if (OAuth2ErrorCodes.INVALID_TOKEN.equals(error.getErrorCode())) {
httpStatus = HttpStatus.UNAUTHORIZED;
}
else if (OAuth2ErrorCodes.INSUFFICIENT_SCOPE.equals(error.getErrorCode())) {
httpStatus = HttpStatus.FORBIDDEN;
}
else if (OAuth2ErrorCodes.INVALID_CLIENT.equals(error.getErrorCode())) {
httpStatu... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\oidc\web\OidcClientRegistrationEndpointFilter.java | 1 |
请完成以下Java代码 | public void setC_Activities(final I_M_MovementLine movementLine)
{
final ActivityId productActivityId = Services.get(IProductActivityProvider.class).retrieveActivityForAcct(
ClientId.ofRepoId(movementLine.getAD_Client_ID()),
OrgId.ofRepoId(movementLine.getAD_Org_ID()),
ProductId.ofRepoId(movementLine.get... | // Make sure this is the actual reversal and not the original document which was reversed
// i.e. this document was created after the reversal (so Reversal_ID is less than this document's ID)
final int movementId = movement.getM_Movement_ID();
//noinspection UnnecessaryLocalVariable
final boolean reversal = mov... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mmovement\api\impl\MovementBL.java | 1 |
请完成以下Java代码 | public class BankToCustomerDebitCreditNotificationV06 {
@XmlElement(name = "GrpHdr", required = true)
protected GroupHeader58 grpHdr;
@XmlElement(name = "Ntfctn", required = true)
protected List<AccountNotification12> ntfctn;
@XmlElement(name = "SplmtryData")
protected List<SupplementaryData1> ... | */
public List<AccountNotification12> getNtfctn() {
if (ntfctn == null) {
ntfctn = new ArrayList<AccountNotification12>();
}
return this.ntfctn;
}
/**
* Gets the value of the splmtryData property.
*
* <p>
* This accessor method returns a reference to... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-xjc_camt054_001_06\de\metas\payment\camt054_001_06\BankToCustomerDebitCreditNotificationV06.java | 1 |
请完成以下Spring Boot application配置 | server.port=9093
server.address=127.0.0.1
# vulnerable configuration set 0: spring boot 1.0 - 1.4
# all spring boot versions 1.0 - 1.4 expose actuators by default without any parameters
# no configuration required to expose them
# safe configuration set 0: spring boot 1.0 - 1.4
#management.security.enabled=true
# vu... | urity.enabled=false' but all sensitive actuators explicitly disabled
#management.security.enabled=false
# vulnerable configuration set 2: spring boot 2+
#management.endpoints.web.exposure.include=*
#management.endpoint.env.post.enabled=true | repos\SpringBootVulExploit-master\repository\springboot-eureka-xstream-rce\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getProcessDefinitionUrl() {
return processDefinitionUrl;
}
public void setProcessDefinitionUrl(String processDefinitionUrl) {
this.processDefinitionUrl = processDefinitionUrl;
}
@ApiModelProperty(example = "7")
public String getExecutionId() {
return execution... | public void setRetries(Integer retries) {
this.retries = retries;
}
@ApiModelProperty(example = "null")
public String getExceptionMessage() {
return exceptionMessage;
}
public void setExceptionMessage(String exceptionMessage) {
this.exceptionMessage = exceptionMessage;
... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\management\JobResponse.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Result<?> getOpenApi(String apiAuthId) {
List<OpenApi> openApis = openApiService.list();
if (CollectionUtil.isEmpty(openApis)) {
return Result.error("接口不存在");
}
List<OpenApiPermission> openApiPermissions = baseMapper.selectList(Wrappers.<OpenApiPermission>lambdaQuery()... | @Override
public void add(OpenApiPermission openApiPermission) {
this.remove(Wrappers.<OpenApiPermission>lambdaQuery().eq(OpenApiPermission::getApiAuthId, openApiPermission.getApiAuthId()));
List<String> list = Arrays.asList(openApiPermission.getApiId().split(","));
if (CollectionUtil.isNotE... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\openapi\service\impl\OpenApiPermissionServiceImpl.java | 2 |
请完成以下Java代码 | public class BpmnLabelImpl extends LabelImpl implements BpmnLabel {
protected static AttributeReference<BpmnLabelStyle> labelStyleAttribute;
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(BpmnLabel.class, BPMNDI_ELEMENT_BPMN_LABEL)
... | typeBuilder.build();
}
public BpmnLabelImpl(ModelTypeInstanceContext instanceContext) {
super(instanceContext);
}
public BpmnLabelStyle getLabelStyle() {
return labelStyleAttribute.getReferenceTargetElement(this);
}
public void setLabelStyle(BpmnLabelStyle labelStyle) {
labelStyleAttribute.se... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\bpmndi\BpmnLabelImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OrderedArticleLine {\n");
sb.append(" _id: ").append(toIndentedString(_id)).append("\n");
sb.append(" salesLineId: ").append(toIndentedString(salesLineId)).append("\n");
sb.append(" articleId: ").append... | return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
} | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-orders-api\src\main\java\io\swagger\client\model\OrderedArticleLine.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ServiceRepairProjectConsumptionSummary
{
@Value
@Builder
public static class GroupingKey
{
@NonNull ProjectId projectId;
@NonNull ProductId productId;
@NonNull UomId uomId;
}
@NonNull GroupingKey groupingKey;
@NonNull Quantity qtyReserved;
@NonNull Quantity qtyConsumed;
public static Grou... | Check.assumeEquals(groupingKey.getProjectId(), request.getTaskId().getProjectId(), "projectId not matching: {}, {}", this, request);
return toBuilder()
.qtyReserved(getQtyReserved().add(request.getQtyReserved()))
.qtyConsumed(getQtyConsumed().add(request.getQtyConsumed()))
.build();
}
public ServiceRe... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\model\ServiceRepairProjectConsumptionSummary.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public MessageSource<File> fileReadingMessageSource() {
FileReadingMessageSource sourceReader = new FileReadingMessageSource();
sourceReader.setDirectory(new File(INPUT_DIR));
sourceReader.setFilter(new SimplePatternFileListFilter(FILE_PATTERN));
return sourceReader;
}
@ServiceA... | integrationContext.addOutBoundVariable("approved", true);
} else {
logger.info("> Discarding content: " + contentToProcess);
integrationContext.addOutBoundVariable("approved", false);
}
return integrationContext;
};
}
@Bean
public ... | repos\Activiti-develop\activiti-examples\activiti-api-spring-integration-example\src\main\java\org\activiti\examples\DemoApplication.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public FilterRegistrationBean<CorsFilter> corsFilter() {
// 创建 UrlBasedCorsConfigurationSource 配置源,类似 CorsRegistry 注册表
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
// 创建 CorsConfiguration 配置,相当于 CorsRegistration 注册信息
CorsConfiguration config = new CorsC... | @Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
// 创建 FastJsonHttpMessageConverter 对象
FastJsonHttpMessageConverter fastJsonHttpMessageConverter = new FastJsonHttpMessageConverter();
// 自定义 FastJson 配置
FastJsonConfig fastJsonConfig = new Fa... | repos\SpringBoot-Labs-master\lab-23\lab-springmvc-23-02\src\main\java\cn\iocoder\springboot\lab23\springmvc\config\SpringMVCConfiguration.java | 2 |
请完成以下Java代码 | public String usingSize(Model model) {
model.addAttribute("myList", getColors());
return "lists/size";
}
@GetMapping("/isEmpty")
public String usingIsEmpty(Model model) {
model.addAttribute("myList", getColors());
return "lists/isEmpty";
}
@GetMapping("/sort")
p... | private List<String> getColors() {
List<String> colors = new ArrayList<>();
colors.add("green");
colors.add("yellow");
colors.add("red");
colors.add("blue");
return colors;
}
private List<String> getOtherColors() {
List<String> colors = new ArrayList<>();... | repos\tutorials-master\spring-web-modules\spring-thymeleaf-2\src\main\java\com\baeldung\thymeleaf\lists\ListsController.java | 1 |
请完成以下Java代码 | public static DocumentFilter createFilter(@NonNull final Collection<HuId> huIds)
{
final HUIdsFilterData filterData = HUIdsFilterData.ofHUIds(huIds);
return DocumentFilter.singleParameterFilter(FILTER_ID, FILTER_PARAM_Data, Operator.EQUAL, filterData);
}
public static DocumentFilter createFilter(@NonNull final ... | }
final HUIdsFilterData huIdsFilterData = (HUIdsFilterData)huIdsFilter.getParameter(FILTER_PARAM_Data).getValue();
if (huIdsFilterData == null)
{
throw new AdempiereException("No " + HUIdsFilterData.class + " found for " + huIdsFilter);
}
return huIdsFilterData;
}
public static Optional<HUIdsFilterData... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\filter\HUIdsFilterHelper.java | 1 |
请完成以下Java代码 | public Boolean convertFrom(final Object valueObj, final ExpressionContext options)
{
if (valueObj == null)
{
return null;
}
final Boolean defaultValue = null;
return DisplayType.toBoolean(valueObj, defaultValue);
}
}
private static final class NullExpression extends NullExpressionTemplate<Bool... | protected Boolean extractParameterValue(Evaluatee ctx)
{
return parameter.getValueAsBoolean(ctx);
}
}
private static final class GeneralExpression extends GeneralExpressionTemplate<Boolean, BooleanStringExpression>implements BooleanStringExpression
{
private GeneralExpression(final ExpressionContext conte... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\BooleanStringExpressionSupport.java | 1 |
请完成以下Java代码 | public OAuth2AccessToken getAccessToken() {
return this.accessToken;
}
/**
* Returns the {@link OAuth2RefreshToken refresh token} credential granted.
* @return the {@link OAuth2RefreshToken}
*/
public OAuth2RefreshToken getRefreshToken() {
return this.refreshToken;
}
/**
* Returns the scope(s) to req... | * @param grantRequest the authorization grant request
* @return a {@link MultiValueMap} of the parameters used in the OAuth 2.0 Access
* Token Request body
*/
static MultiValueMap<String, String> defaultParameters(OAuth2RefreshTokenGrantRequest grantRequest) {
MultiValueMap<String, String> parameters = new Lin... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\endpoint\OAuth2RefreshTokenGrantRequest.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
@ApiModelProperty(example = "oneTaskProcess")
public String getProcessDefinitionKey() {
return processDefinitionKey;
}
public void setProcessDefinitionKey(String proce... | public void setOverrideDefinitionTenantId(String overrideDefinitionTenantId) {
this.overrideDefinitionTenantId = overrideDefinitionTenantId;
}
@JsonTypeInfo(use = Id.CLASS, defaultImpl = RestVariable.class)
public List<RestVariable> getVariables() {
return variables;
}
public void ... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\ProcessInstanceCreateRequest.java | 2 |
请完成以下Java代码 | final public I_C_BPartner importRecord(@NonNull final I_I_Pharma_BPartner importRecord)
{
final I_C_BPartner bpartner;
if (importRecord.getC_BPartner_ID() <= 0) // Insert new BPartner
{
bpartner = createNewBPartner(importRecord);
}
else
{
bpartner = updateExistingBPartner(importRecord);
}
save(b... | if (!Check.isEmpty(importRecord.getb00email2(), true))
{
return importRecord.getb00email2();
}
return importRecord.getb00adrnr();
}
private I_C_BPartner updateExistingBPartner(@NonNull final I_I_Pharma_BPartner importRecord)
{
final I_C_BPartner bpartner;
bpartner = InterfaceWrapperHelper.create(im... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java\de\metas\impexp\bpartner\IFABPartnerImportHelper.java | 1 |
请完成以下Java代码 | public static void usingCompletableFuture() throws InterruptedException, ExecutionException, Exception {
CompletableFuture<Void> completableFuture = hello()
.thenComposeAsync(hello -> mergeWorld(hello))
.thenAcceptAsync(helloWorld -> print(helloWorld))
.exceptionally( throwab... | }
public static void print(String str) {
CompletableFuture.runAsync(() -> System.out.println(str));
}
private static void usingAsyncAwait() {
try {
String hello = await(hello());
String helloWorld = await(mergeWorld(hello));
await(CompletableFuture.runAs... | repos\tutorials-master\core-java-modules\core-java-concurrency-advanced\src\main\java\com\baeldung\async\EAAsyncExample.java | 1 |
请完成以下Java代码 | public IQueryBuilderOrderByClause<ModelType> addColumn(String columnName)
{
orderByBuilder.addColumn(columnName);
return this;
}
@Override
public IQueryBuilderOrderByClause<ModelType> addColumn(ModelColumn<ModelType, ?> column)
{
orderByBuilder.addColumn(column);
return this;
}
@Override
public IQuery... | }
@Override
public IQueryBuilderOrderByClause<ModelType> addColumn(String columnName, Direction direction, Nulls nulls)
{
orderByBuilder.addColumn(columnName, direction, nulls);
return this;
}
@Override
public IQueryBuilderOrderByClause<ModelType> addColumn(ModelColumn<ModelType, ?> column, Direction direct... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\QueryBuilderOrderByClause.java | 1 |
请完成以下Java代码 | public BigDecimal toBigDecimalAssumingUOM(@NonNull final UomId uomId)
{
assertUOMOrSourceUOM(uomId);
return getUomId().equals(uomId) ? toBigDecimal() : getSourceQty();
}
public List<Quantity> spreadEqually(final int count)
{
if (count <= 0)
{
throw new AdempiereException("count shall be greater than ze... | for (int i = 1; i <= count; i++)
{
final boolean isLast = i == count;
if (isLast)
{
result.add(qtyRemainingToSpread);
}
else
{
result.add(qtyPerPart);
qtyRemainingToSpread = qtyRemainingToSpread.subtract(qtyPerPart);
}
}
return result.build();
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\quantity\Quantity.java | 1 |
请完成以下Java代码 | public class HttpServer {
private int port;
static Logger logger = LoggerFactory.getLogger(HttpServer.class);
public HttpServer(int port) {
this.port = port;
}
public static void main(String[] args) throws Exception {
int port = args.length > 0 ? Integer.parseInt(args[0]) : 8080;... | @Override
protected void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline p = ch.pipeline();
p.addLast(new HttpRequestDecoder());
p.addLast(new HttpResponseEncoder());
p.addLast(new Custom... | repos\tutorials-master\server-modules\netty\src\main\java\com\baeldung\http\server\HttpServer.java | 1 |
请完成以下Java代码 | public void setWorkingTime (int WorkingTime)
{
set_Value (COLUMNNAME_WorkingTime, Integer.valueOf(WorkingTime));
}
/** Get Working Time.
@return Workflow Simulation Execution Time
*/
@Override
public int getWorkingTime ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_WorkingTime);
if (ii == null)
... | public void setYield (int Yield)
{
set_Value (COLUMNNAME_Yield, Integer.valueOf(Yield));
}
/** Get Yield %.
@return The Yield is the percentage of a lot that is expected to be of acceptable wuality may fall below 100 percent
*/
@Override
public int getYield ()
{
Integer ii = (Integer)get_Value(COLUMNNA... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Order_Workflow.java | 1 |
请完成以下Java代码 | public class EntitiesRelatedDeviceIdAsyncLoader {
public static ListenableFuture<DeviceId> findDeviceAsync(
TbContext ctx,
EntityId originator,
DeviceRelationsQuery deviceRelationsQuery
) {
var deviceService = ctx.getDeviceService();
var query = buildQuery(or... | private static DeviceSearchQuery buildQuery(EntityId originator, DeviceRelationsQuery deviceRelationsQuery) {
var query = new DeviceSearchQuery();
var parameters = new RelationsSearchParameters(
originator,
deviceRelationsQuery.getDirection(),
deviceRelati... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\util\EntitiesRelatedDeviceIdAsyncLoader.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Frequency
{
FrequencyType type;
int everyNthWeek;
ImmutableSet<DayOfWeek> onlyDaysOfWeek;
int everyNthMonth;
ImmutableSet<Integer> onlyDaysOfMonth;
@Builder
private Frequency(
@NonNull final FrequencyType type,
final int everyNthWeek,
@Singular("onlyDayOfWeek") final Set<DayOfWeek> onlyD... | {
throw new IllegalArgumentException("Unknow " + FrequencyType.class + ": " + type);
}
}
public boolean isWeekly()
{
return type == FrequencyType.Weekly;
}
public boolean isMonthly()
{
return type == FrequencyType.Monthly;
}
public boolean isOnlySomeDaysOfTheWeek()
{
return !onlyDaysOfWeek.isEmp... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\time\generator\Frequency.java | 2 |
请完成以下Java代码 | public List<DataSpec> getDataOutputs() {
return dataOutputs;
}
public void setDataOutputs(List<DataSpec> dataOutputs) {
this.dataOutputs = dataOutputs;
}
public List<String> getDataInputRefs() {
return dataInputRefs;
}
public void setDataInputRefs(List<String> dataInpu... | clone.setValues(this);
return clone;
}
public void setValues(IOSpecification otherSpec) {
dataInputs = new ArrayList<DataSpec>();
if (otherSpec.getDataInputs() != null && !otherSpec.getDataInputs().isEmpty()) {
for (DataSpec dataSpec : otherSpec.getDataInputs()) {
... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\IOSpecification.java | 1 |
请完成以下Java代码 | public static String getTargetTelemetryKey(OtaPackageType type, OtaPackageKey key) {
return getTelemetryKey("target_", type, key);
}
public static String getCurrentTelemetryKey(OtaPackageType type, OtaPackageKey key) {
return getTelemetryKey("current_", type, key);
}
private static Str... | log.warn("Unsupported ota package type: [{}]", type);
return null;
}
}
public static <T> T getByOtaPackageType(Supplier<T> firmwareSupplier, Supplier<T> softwareSupplier, OtaPackageType type) {
switch (type) {
case FIRMWARE:
return firmwareSupplier.ge... | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\ota\OtaPackageUtil.java | 1 |
请完成以下Java代码 | public void afterPropertiesSet() {
Assert.hasLength(this.realmName, "realmName must be specified");
Assert.hasLength(this.key, "key must be specified");
}
@Override
public void commence(HttpServletRequest request, HttpServletResponse response,
AuthenticationException authException) throws IOException {
// ... | return this.realmName;
}
public void setKey(String key) {
this.key = key;
}
public void setNonceValiditySeconds(int nonceValiditySeconds) {
this.nonceValiditySeconds = nonceValiditySeconds;
}
public void setRealmName(String realmName) {
this.realmName = realmName;
}
} | repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\www\DigestAuthenticationEntryPoint.java | 1 |
请完成以下Java代码 | public void setPlannedAmt (final BigDecimal PlannedAmt)
{
set_Value (COLUMNNAME_PlannedAmt, PlannedAmt);
}
@Override
public BigDecimal getPlannedAmt()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PlannedAmt);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setPriceActual (... | return get_ValueAsString(COLUMNNAME_ProjInvoiceRule);
}
@Override
public void setQty (final @Nullable BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
@Override
public BigDecimal getQty()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty);
return bd != null ? bd : BigDecimal.ZERO;
}
@... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ProjectPhase.java | 1 |
请完成以下Java代码 | private void setWeightFromLines(@NonNull final List<OrderId> orderIds)
{
orderBL.getByIds(orderIds)
.forEach(order -> {
orderBL.setWeightFromLines(order);
saveRecord(order);
});
}
private void normalizeProductCodeFields(@NonNull I_M_Product record)
{
if (InterfaceWrapperHelper.isValueChanged... | productBL.setProductCodeFieldsFromGTIN(record, gtin);
}
// NOTE: syncing UPC to GTIN is not quite correct, but we have a lot of BPs which are relying on this logic
else if (InterfaceWrapperHelper.isValueChanged(record, I_M_Product.COLUMNNAME_UPC))
{
final GTIN gtin = GTIN.ofNullableString(record.getUPC());
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\model\interceptor\M_Product.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class PropertiesRestClientHttpServiceGroupConfigurer implements RestClientHttpServiceGroupConfigurer {
/**
* The default order for the PropertiesRestClientHttpServiceGroupConfigurer.
*/
private static final int DEFAULT_ORDER = Ordered.HIGHEST_PRECEDENCE + 10;
private final HttpServiceClientProperties propertie... | builder.requestFactory(this.requestFactoryBuilder.build(clientSettings));
if (clientProperties != null) {
PropertyMapper map = PropertyMapper.get();
map.from(clientProperties::getBaseUrl).whenHasText().to(builder::baseUrl);
map.from(clientProperties::getDefaultHeader).as(this::putAllHeaders).to(builder::defa... | repos\spring-boot-4.0.1\module\spring-boot-restclient\src\main\java\org\springframework\boot\restclient\autoconfigure\service\PropertiesRestClientHttpServiceGroupConfigurer.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Author implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private String genre;
private int age;
@OneToMany(cascade = CascadeType.ALL,
mapped... | public String getGenre() {
return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public List<Book> getCheapBooks() {
return cheapBooks;
... | repos\Hibernate-SpringBoot-master\HibernateSpringBootFilterAssociation\src\main\java\com\bookstore\entity\Author.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ViewRowIdsSelection
{
public static ViewRowIdsSelection of(@NonNull final ViewId viewId, final DocumentIdsSelection rowIds)
{
return new ViewRowIdsSelection(viewId, rowIds);
}
public static ViewRowIdsSelection of(@NonNull final ViewId viewId, final Set<String> rowIdsStringSet)
{
final DocumentIds... | {
return null;
}
final ViewId viewId = ViewId.ofViewIdString(viewIdStr);
final DocumentIdsSelection rowIds = DocumentIdsSelection.ofStringSet(rowIdsStringSet);
return new ViewRowIdsSelection(viewId, rowIds);
}
ViewId viewId;
DocumentIdsSelection rowIds;
private ViewRowIdsSelection(@NonNull final ViewI... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewRowIdsSelection.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getReadFrom() {
return this.readFrom;
}
public void setReadFrom(@Nullable String readFrom) {
this.readFrom = readFrom;
}
public Pool getPool() {
return this.pool;
}
public Cluster getCluster() {
return this.cluster;
}
public static class Cluster {
private fina... | */
private boolean adaptive;
public boolean isDynamicRefreshSources() {
return this.dynamicRefreshSources;
}
public void setDynamicRefreshSources(boolean dynamicRefreshSources) {
this.dynamicRefreshSources = dynamicRefreshSources;
}
public @Nullable Duration getPeriod() {
retur... | repos\spring-boot-4.0.1\module\spring-boot-data-redis\src\main\java\org\springframework\boot\data\redis\autoconfigure\DataRedisProperties.java | 2 |
请完成以下Java代码 | private static class BatchToPrintCollector
{
private final HULabelConfigProvider labelConfigProvider;
@Getter
private final ArrayList<BatchToPrint> batches = new ArrayList<>();
private final HashSet<HuId> huIdsCollected = new HashSet<>();
private BatchToPrintCollector(final HULabelConfigProvider huLabelConf... | {
batches.forEach(action);
}
}
@Getter
private static class BatchToPrint
{
@NonNull
private final AdProcessId printFormatProcessId;
@NonNull
private final ArrayList<HUToReport> hus = new ArrayList<>();
private BatchToPrint(final @NonNull AdProcessId printFormatProcessId)
{
this.printFormatProc... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\printReceivedHUQRCodes\PrintReceivedHUQRCodesActivityHandler.java | 1 |
请完成以下Java代码 | public static Optional<HUPIItemProductId> optionalOfRepoId(final int repoId) {return Optional.ofNullable(ofRepoIdOrNull(repoId));}
public static int toRepoId(@Nullable final HUPIItemProductId id)
{
return id != null ? id.getRepoId() : -1;
}
public static int toRepoIdVirtualToZero(@Nullable final HUPIItemProduct... | {
return repoId;
}
public static boolean equals(@Nullable final HUPIItemProductId id1, @Nullable final HUPIItemProductId id2)
{
return Objects.equals(id1, id2);
}
public static HUPIItemProductId nullToVirtual(final HUPIItemProductId id)
{
return id != null ? id : VIRTUAL_HU;
}
public boolean isVirtualH... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\handlingunits\HUPIItemProductId.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PurchaseCandidateRestController
{
private final ITrxManager trxManager = Services.get(ITrxManager.class);
private final CreatePurchaseCandidatesService createPurchaseCandidatesService;
private final EnqueuePurchaseCandidateService enqueuePurchaseCandidateService;
private final PurchaseCandidatesStatusS... | .stream()
.map(createPurchaseCandidatesService::createCandidate)
.filter(Optional::isPresent)
.map(Optional::get)
.collect(ImmutableList.toImmutableList());
return JsonPurchaseCandidateResponse.builder()
.purchaseCandidates(candidates)
.build();
}
@ApiOperation("Enqueues purchase candidate... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\order\PurchaseCandidateRestController.java | 2 |
请完成以下Java代码 | public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getLogin() {
return login;
}
public void setLogin(String login) {
this.login = login;
}
public String getPassword() {
return password;
}
... | public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getLanguage() {
return language;
}
public void setLanguage(String language) {
this.language = language;
}
} | repos\tutorials-master\spring-security-modules\spring-security-web-boot-2\src\main\java\com\baeldung\customlogouthandler\user\User.java | 1 |
请完成以下Java代码 | public boolean isError()
{
return error != null;
}
public ResultType getResult()
{
if (result == null)
{
throw toException();
}
return result;
}
public ErrorType getError()
{
if (error == null)
{
throw new AdempiereException("Not an error response: " + this);
}
return error;
}
public... | {
throw new AdempiereException("Not an error response: " + this);
}
if (errorCause != null)
{
return AdempiereException.wrapIfNeeded(errorCause)
.setParameter("error", error);
}
else
{
return new AdempiereException(error.toString());
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.paypal\src\main\java\de\metas\payment\paypal\PayPalClientResponse.java | 1 |
请完成以下Java代码 | private static final class ManagedAttributeInfo {
private String key;
private String description;
private Method getter;
private Method setter;
private ManagedAttributeInfo(String key, String description) {
this.key = key;
this.description = description;... | private final String description;
private final Method operation;
private ManagedOperationInfo(String description, Method operation) {
this.description = description;
this.operation = operation;
}
public String getDescription() {
return description;... | repos\flowable-engine-main\modules\flowable-jmx\src\main\java\org\flowable\management\jmx\MBeanInfoAssembler.java | 1 |
请完成以下Java代码 | public TbQueueProducer<TbProtoQueueMsg<ToEdgeEventNotificationMsg>> getTbEdgeEventsMsgProducer() {
return toEdgeEvents;
}
@Override
public TbQueueProducer<TbProtoQueueMsg<ToUsageStatsServiceMsg>> getTbUsageStatsMsgProducer() {
return toUsageStats;
}
@Override
public TbQueueProd... | public TbQueueProducer<TbProtoQueueMsg<ToHousekeeperServiceMsg>> getHousekeeperMsgProducer() {
return toHousekeeper;
}
@Override
public TbQueueProducer<TbProtoQueueMsg<ToCalculatedFieldMsg>> getCalculatedFieldsMsgProducer() {
return toCalculatedFields;
}
@Override
public TbQueu... | repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\provider\TbRuleEngineProducerProvider.java | 1 |
请完成以下Java代码 | public void setTitle(String title) {
this.title = title;
}
public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public String getBrand() {
return brand;
} | public void setBrand(String brand) {
this.brand = brand;
}
@Override
public String toString() {
return "MerchandiseEntity{" +
"id=" + id +
", title='" + title + '\'' +
", price=" + price +
", brand='" + brand + '\'' +
... | repos\tutorials-master\persistence-modules\spring-data-jpa-repo\src\main\java\com\baeldung\boot\domain\MerchandiseEntity.java | 1 |
请完成以下Java代码 | public class User {
private String email;
private Double rating;
private boolean active;
public User() {
}
public User(String email, Double rating, boolean active) {
this.email = email;
this.rating = rating;
this.active = active;
}
public String getEmail() {
... | return active;
}
public void setActive(boolean active) {
this.active = active;
}
@Override
public String toString() {
return "User{" +
"email='" + email + '\'' +
", rating=" + rating +
", active=" + active +
'}';
}... | repos\Spring-Boot-Advanced-Projects-main\springboot2-jms-activemq\src\main\java\net\alanbinu\springboot\jms\User.java | 1 |
请完成以下Java代码 | public void registered(SchedulerDriver schedulerDriver, Protos.FrameworkID frameworkID, Protos.MasterInfo masterInfo) {
}
@Override
public void reregistered(SchedulerDriver schedulerDriver, Protos.MasterInfo masterInfo) {
}
@Override
public void resourceOffers(SchedulerDriver schedulerDriver... | }
@Override
public void statusUpdate(SchedulerDriver schedulerDriver, Protos.TaskStatus taskStatus) {
}
@Override
public void frameworkMessage(SchedulerDriver schedulerDriver, Protos.ExecutorID executorID, Protos.SlaveID slaveID, byte[] bytes) {
}
@Override
public void disconnected(... | repos\tutorials-master\apache-libraries\src\main\java\com\baeldung\mesos\schedulers\HelloWorldScheduler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class StudentJdbcTemplateRepository {
private final JdbcTemplate jdbcTemplate;
public StudentJdbcTemplateRepository(JdbcTemplate jdbcTemplate) {
this.jdbcTemplate = jdbcTemplate;
}
static class StudentRowMapper implements RowMapper<Student> {
@Override
public Student ma... | }
public void deleteById(long id) {
jdbcTemplate.update(StudentQueries.getDeleteStudentById(), id);
}
public int insert(Student student) {
return jdbcTemplate.update(StudentQueries.getInsertStudent(),
student.getId(), student.getName(), student.getPassportNumber());
}
... | repos\spring-boot-examples-master\spring-boot-2-jdbc-with-h2\src\main\java\com\in28minutes\springboot\jdbc\h2\example\student\StudentJdbcTemplateRepository.java | 2 |
请完成以下Java代码 | public class SystemRuleEntity implements RuleEntity {
private Long id;
private String app;
private String ip;
private Integer port;
private Double highestSystemLoad;
private Long avgRt;
private Long maxThread;
private Double qps;
private Double highestCpuUsage;
private Date gm... | }
public void setMaxThread(Long maxThread) {
this.maxThread = maxThread;
}
public Double getQps() {
return qps;
}
public void setQps(Double qps) {
this.qps = qps;
}
public Double getHighestCpuUsage() {
return highestCpuUsage;
}
public void setHigh... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\rule\SystemRuleEntity.java | 1 |
请完成以下Java代码 | public static Optional<MediatedCommissionConfig> castOrEmpty(@NonNull final CommissionConfig commissionConfig)
{
if (commissionConfig instanceof MediatedCommissionConfig)
{
return Optional.of((MediatedCommissionConfig)commissionConfig);
}
return Optional.empty();
}
public static boolean isInstance(@NonNu... | return null;
}
@Override
@NonNull
public ProductId getCommissionProductId()
{
return commissionProductId;
}
@NonNull
public MediatedCommissionSettingsId getId()
{
return mediatedCommissionSettingsLineId.getMediatedCommissionSettingsId();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\mediated\algorithm\MediatedCommissionConfig.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final void setMessageNo(final String messageNo)
{
this.messageNo = messageNo;
}
public final String getContractValue()
{
return contractValue;
}
public final void setContractValue(final String contractValue)
{
this.contractValue = contractValue;
}
@Override
public int hashCode()
{
final int... | if (partner == null)
{
if (other.partner != null)
{
return false;
}
}
else if (!partner.equals(other.partner))
{
return false;
}
if (record == null)
{
if (other.record != null)
{
return false;
}
}
else if (!record.equals(other.record))
{
return false;
}
return tru... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\ordersimport\compudata\T100.java | 2 |
请完成以下Java代码 | public PaymentAllocationContext build()
{
return new PaymentAllocationContext(this);
}
public Builder setAD_Org_ID(final int AD_Org_ID)
{
this.AD_Org_ID = AD_Org_ID;
return this;
}
public Builder setC_BPartner_ID(final int bpartnerId)
{
C_BPartner_ID = bpartnerId;
return this;
}
publ... | public Builder addAllowedWriteOffType(final InvoiceWriteOffAmountType allowedWriteOffType)
{
Check.assumeNotNull(allowedWriteOffType, "allowedWriteOffType not null");
allowedWriteOffTypes.add(allowedWriteOffType);
return this;
}
public Builder setWarningsConsumer(final IProcessor<Exception> warningsCons... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.swingui\src\main\java\de\metas\banking\payment\paymentallocation\model\PaymentAllocationContext.java | 1 |
请完成以下Java代码 | public Map<String, Object> getCaseVariables() {
Map<String, Object> variables = new HashMap<>();
if (queryVariables != null) {
for (HistoricVariableInstanceEntity variableInstance : queryVariables) {
if (variableInstance.getId() != null && variableInstance.getTaskId() == null... | }
@Override
public Integer getCaseDefinitionVersion() {
return caseDefinitionVersion;
}
@Override
public void setCaseDefinitionVersion(Integer caseDefinitionVersion) {
this.caseDefinitionVersion = caseDefinitionVersion;
}
@Override
public String getCaseDefinitionDeploy... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\HistoricCaseInstanceEntityImpl.java | 1 |
请完成以下Java代码 | String encodeUsingDigits(final long value, char[] digits)
{
if (value == 0)
{
return String.valueOf(digits[0]);
}
final int base = digits.length;
final StringBuilder buf = new StringBuilder();
long currentValue = value;
while (currentValue > 0)
{
final int remainder = (int)(currentValue % base);... | public void setRandomUUIDSource(@NonNull final Supplier<String> newRandomUUIDSource)
{
randomUUIDSource = newRandomUUIDSource;
}
public void reset()
{
nextViewId.set(1);
randomUUIDSource = null;
}
public String createRandomUUID()
{
return coalesceSuppliers(randomUUIDSource, DEFAULT_RANDOM_UUID_SOURCE);... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\lang\UIDStringUtil.java | 1 |
请完成以下Java代码 | private void executeInvokeScriptedExportConversionAction(
@NonNull final ExternalSystemScriptedExportConversionConfig config,
final int recordId)
{
final int configTableId = tableDAO.retrieveTableId(I_ExternalSystem_Config_ScriptedExportConversion.Table_Name);
try
{
trxManager.runAfterCommit(() -> {
... | catch (final Exception e)
{
log.warn(InvokeScriptedExportConversionAction.class.getName() + " process failed for Config ID {}, Record ID: {}",
config.getId(), recordId, e);
}
}
private String getTableName()
{
return tableName;
}
private boolean isDocument()
{
return isDocument;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\scriptedexportconversion\interceptor\ExternalSystemScriptedExportConversionInterceptor.java | 1 |
请完成以下Java代码 | public ResponseEntity<Book> extractData(ClientHttpResponse response) throws IOException {
// extract required data from response
return null;
}
}
);
// Could also use some factory methods in RestTemplate for
// the request c... | );
}
private static class Book {
String title;
String author;
int yearPublished;
public Book(String title, String author, int yearPublished) {
this.title = title;
this.author = author;
this.yearPublished = yearPublished;
}
}
} | repos\tutorials-master\spring-web-modules\spring-resttemplate-2\src\main\java\com\baeldung\resttemplate\json\methods\RestTemplateMethodsApplication.java | 1 |
请完成以下Java代码 | public java.math.BigDecimal getEMURate ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_EMURate);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set EMU Member.
@param IsEMUMember
This currency is member if the European Monetary Union
*/
@Override
public void setIsEMUMember (boolean IsE... | @return Three letter ISO 4217 Code of the Currency
*/
@Override
public java.lang.String getISO_Code ()
{
return (java.lang.String)get_Value(COLUMNNAME_ISO_Code);
}
/** Set Round Off Factor.
@param RoundOffFactor
Used to Round Off Payment Amount
*/
@Override
public void setRoundOffFactor (java.math... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Currency.java | 1 |
请完成以下Java代码 | public String getContentType(final I_AD_Archive archive)
{
// NOTE: at this moment we are storing only PDFs
return "application/pdf";
}
@Override
public byte[] getBinaryData(final I_AD_Archive archive)
{
return archiveStorageFactory.getArchiveStorage(archive).getBinaryData(archive);
}
@Override
public v... | if (lastArchives.isEmpty())
{
return Optional.empty();
}
else
{
return Optional.of(lastArchives.get(0));
}
}
@Override
public Optional<Resource> getLastArchiveBinaryData(
@NonNull final TableRecordReference reference)
{
return getLastArchive(reference).map(AdArchive::getArchiveDataAsResource);... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\archive\api\impl\ArchiveBL.java | 1 |
请完成以下Java代码 | public int getM_QualityInsp_LagerKonf_Version_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_QualityInsp_LagerKonf_Version_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Anzahl Waschproben.
@param NumberOfQualityInspections
Aus der hier festgelegte Anzahl an Waschproben ergibt ... | @param ValidFrom
Gültig ab inklusiv (erster Tag)
*/
@Override
public void setValidFrom (java.sql.Timestamp ValidFrom)
{
set_Value (COLUMNNAME_ValidFrom, ValidFrom);
}
/** Get Gültig ab.
@return Gültig ab inklusiv (erster Tag)
*/
@Override
public java.sql.Timestamp getValidFrom ()
{
return (java... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java-gen\de\metas\materialtracking\ch\lagerkonf\model\X_M_QualityInsp_LagerKonf_Version.java | 1 |
请完成以下Java代码 | protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_IMP_Processor_Type[")
.append(get_ID()).append("]");
return sb.toString();
}
/**... | /** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Set Search Ke... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_IMP_Processor_Type.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.