instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public boolean isAsync(PvmExecutionImpl execution) {
return false;
}
public void execute(PvmExecutionImpl execution) {
execution.activityInstanceStarted();
execution.continueIfExecutionDoesNotAffectNextOperation(new Callback<PvmExecutionImpl, Void>() {
@Override
public Void callback(PvmExe... | try {
activityBehavior.execute(execution);
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
throw new PvmException("couldn't execute activity <" + activity.getProperty("type") + " id=\"" + activity.getId() + "\" ...>: " + e.getMessage(), e);
}
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\operation\PvmAtomicOperationActivityExecute.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ApiService {
private static final Logger logger = LoggerFactory.getLogger(ApiService.class);
/**
* 保存最后一个连接上来的sessionID
*/
private String sessionId;
@Resource
private MyProperties p;
// private LinkedBlockingQueue<String> queue = new LinkedBlockingQueue<>();
@Resour... | /**
* 解析Base64位信息并输出到某个目录下面.
*
* @param base64Info base64串
* @return 文件地址
*/
public String saveBase64Pic(String base64Info) {
if (StringUtils.isEmpty(base64Info)) {
return "";
}
// 数据中:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABI4AAAEsCAYAAAClh/jbAAA ... | repos\SpringBootBucket-master\springboot-echarts\src\main\java\com\xncoding\echarts\service\ApiService.java | 2 |
请完成以下Spring Boot application配置 | management:
endpoint:
# HttpTrace 端点配置项
httptrace:
enabled: true # 是否开启。默认为 true 开启
# HttpTrace 的具体配置项,对应 HttpTraceProperties 配置类
trace:
http:
enabled: true # 是否开启。默认为 true 开启。
include: # 包含的 trace 项的数组。默认不包含 COOKIE_HEADERS、AUTHORIZATION_HEADER 项。
endpoints:
# Actuator HTTP 配置... | PI 接口的根目录。默认为 /actuator
exposure:
include: '*' # 需要开放的端点。默认值只打开 health 和 info 两个端点。通过设置 * ,可以开放所有端点。
exclude: # 在 include 的基础上,需要排除的端点。通过设置 * ,可以排除所有端点。 | repos\SpringBoot-Labs-master\lab-34\lab-34-actuator-demo-httptrace\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | class M_CostElement
{
private final IQueryBL queryBL = Services.get(IQueryBL.class);
private final IAcctSchemaDAO acctSchemaDAO;
public M_CostElement(@NonNull final IAcctSchemaDAO acctSchemaDAO)
{
this.acctSchemaDAO = acctSchemaDAO;
}
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYP... | }
// Costing Methods on PC level
// FIXME: this shall go in some DAO/Repository
final String productCategoriesUsingCostingMethod = queryBL
.createQueryBuilder(I_M_Product_Category_Acct.class)
.addEqualsFilter(I_M_Product_Category_Acct.COLUMNNAME_AD_Client_ID, clientId)
.addEqualsFilter(I_M_Product_Ca... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\interceptors\M_CostElement.java | 1 |
请完成以下Java代码 | public class RateType4Choice {
@XmlElement(name = "Pctg")
protected BigDecimal pctg;
@XmlElement(name = "Othr")
protected String othr;
/**
* Gets the value of the pctg property.
*
* @return
* possible object is
* {@link BigDecimal }
*
*/
public ... | * Gets the value of the othr property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOthr() {
return othr;
}
/**
* Sets the value of the othr property.
*
* @param value
* allowed object is
* {@l... | 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\RateType4Choice.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String showNewProductPage(Model model) {
Employee employee = new Employee();
model.addAttribute("employee", employee);
return "new_employee";
}
@RequestMapping(value = "/save", method = RequestMethod.POST)
public String saveEmployee(@ModelAttribute("employee") Employee employee)... | public ModelAndView showEditEmployeePage(@PathVariable(name = "id") int id){
ModelAndView mav = new ModelAndView("edit_employee");
Employee employee1= employeeService.get(id);
mav.addObject("employee", employee1);
return mav;
}
@RequestMapping(value = "/delete/{id}")
public... | repos\Spring-Boot-Advanced-Projects-main\Springboot-Employee-Salary\src\main\java\spring\project\controller\EmployeeController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Integer getSelectors() {
return this.selectors;
}
public void setSelectors(Integer selectors) {
this.selectors = selectors;
}
public void setMin(Integer min) {
this.min = min;
}
public Integer getMin() {
return this.min;
}
public void setMax(Integer max) {
this.max = max;
}
... | public @Nullable Integer getMaxQueueCapacity() {
return this.maxQueueCapacity;
}
public void setMaxQueueCapacity(@Nullable Integer maxQueueCapacity) {
this.maxQueueCapacity = maxQueueCapacity;
}
public void setIdleTimeout(Duration idleTimeout) {
this.idleTimeout = idleTimeout;
}
public Duration ... | repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\autoconfigure\JettyServerProperties.java | 2 |
请完成以下Java代码 | public abstract class AbstractEventAtomicOperation<T extends CoreExecution> implements CoreAtomicOperation<T> {
@Override
public boolean isAsync(T execution) {
return false;
}
@Override
public void execute(T execution) {
CoreModelElement scope = getScope(execution);
List<DelegateListener<? exten... | execution.setListenerIndex(0);
execution.setEventName(null);
execution.setEventSource(null);
}
protected List<DelegateListener<? extends BaseDelegateExecution>> getListeners(CoreModelElement scope, T execution) {
if(execution.isSkipCustomListeners()) {
return getBuiltinListeners(scope);
} els... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\operation\AbstractEventAtomicOperation.java | 1 |
请完成以下Java代码 | public static List<I_AD_Index_Table> getAffectedIndexes(final GridTab tab, final boolean newRecord)
{
return MIndexTable.getByTableName(tab.getTableName())
.stream()
.filter(index -> index.isMatched(tab, newRecord))
.collect(ImmutableList.toImmutableList());
}
public static String getBeforeChangeWarni... | }
if (newRecord)
{
return true;
}
final Object valueOld = table.getOldValue(tab.getCurrentRow(), index);
if (valueOld == null)
{
return false;
}
final Object value = tab.getValue(columnName);
if (!valueOld.equals(value))
{
return true;
}
return false;
}
@Override
public String toStr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\MIndexTable.java | 1 |
请完成以下Java代码 | protected IQueryFilter<ET> createFilter()
{
return queryBL.createCompositeQueryFilter(eventTypeClass)
.addOnlyActiveRecordsFilter()
.addOnlyContextClient(ctx)
.addEqualsFilter(COLUMNNAME_Processed, false)
.addFilter(lockManager.getNotLockedFilter(eventTypeClass));
}
@Override
public void close()
... | if (_lock != null)
{
_lock.close();
_lock = null;
}
//
// Close iterator
if (_iterator != null)
{
IteratorUtils.closeQuietly(_iterator);
_iterator = null;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\event\impl\EventSource.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 8088
spring:
datasource:
dynamic:
primary: master
strict: false
datasource:
master:
url: jdbc:mysql://localhost:3306/demo?serverTimezone=Asia/Shanghai
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
... | /localhost:3307/demo?serverTimezone=Asia/Shanghai
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver | repos\springboot-demo-master\dynamic-datasource\src\main\resources\application.yaml | 2 |
请在Spring Boot框架中完成以下Java代码 | public class BroadcastConfig {
private static final boolean NON_DURABLE = false;
public final static String FANOUT_QUEUE_1_NAME = "com.baeldung.spring-amqp-simple.fanout.queue1";
public final static String FANOUT_QUEUE_2_NAME = "com.baeldung.spring-amqp-simple.fanout.queue2";
public final static Strin... | .with(BINDING_PATTERN_ERROR));
}
@Bean
public Declarables fanoutBindings() {
Queue fanoutQueue1 = new Queue(FANOUT_QUEUE_1_NAME, NON_DURABLE);
Queue fanoutQueue2 = new Queue(FANOUT_QUEUE_2_NAME, NON_DURABLE);
FanoutExchange fanoutExchange = new FanoutExchange(FANOUT_EXCHANGE_NAME, ... | repos\tutorials-master\messaging-modules\spring-amqp\src\main\java\com\baeldung\springamqp\broadcast\BroadcastConfig.java | 2 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public org.compiere.model.I_C_Phase getC_Phase()
{
return get_ValueAsPO(COLUMNNAME_C_Phase_ID, org.compiere.model.I_C_Phase.class);
}
@Override
public void setC_Phase(fina... | {
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setSeqNo (final int SeqNo)
{
set... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Task.java | 1 |
请完成以下Java代码 | private void reset(boolean clearPrimaryField) {
fQtyOrdered.removeActionListener(this);
if (clearPrimaryField) {
fProduct.setValue(null);
}
fQtyOrdered.setValue(Env.ZERO);
fQtyOrdered.setReadWrite(false);
fProduct.requestFocus();
}
private void updateData(boolean requestFocus, Component source) {
if... | changed = true;
refreshIncludedTabs();
setInfo(Msg.parseTranslation(Env.getCtx(),
"@RecordSaved@ - @M_Product_ID@:" + productStr
+ ", @QtyOrdered@:" + qty), false, null);
}
public void showCenter() {
AEnv.showCenterWindow(getOwner(), this);
}
public boolean isChanged() {
return changed;
}
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\form\swing\OrderLineCreate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class GlobalExceptionHandler {
private final Logger logger = LoggerFactory.getLogger(this.getClass().getName());
@ExceptionHandler(value = Exception.class)
public JSONObject defaultErrorHandler(HttpServletRequest req, Exception e) {
String errorPosition = "";
//如果错误堆栈信息存在
if ... | @ExceptionHandler(CommonJsonException.class)
public JSONObject commonJsonExceptionHandler(CommonJsonException commonJsonException) {
return commonJsonException.getResultJson();
}
/**
* 权限不足报错拦截
*/
@ExceptionHandler(UnauthorizedException.class)
public JSONObject unauthorizedExcepti... | repos\SpringBoot-Shiro-Vue-master\back\src\main\java\com\heeexy\example\config\exception\GlobalExceptionHandler.java | 2 |
请在Spring Boot框架中完成以下Java代码 | class AtlasPropertiesConfigAdapter extends PropertiesConfigAdapter<AtlasProperties> implements AtlasConfig {
AtlasPropertiesConfigAdapter(AtlasProperties properties) {
super(properties);
}
@Override
public @Nullable String get(String key) {
return null;
}
@Override
public Duration step() {
return obtain... | return obtain(AtlasProperties::getMeterTimeToLive, AtlasConfig.super::meterTTL);
}
@Override
public boolean lwcEnabled() {
return obtain(AtlasProperties::isLwcEnabled, AtlasConfig.super::lwcEnabled);
}
@Override
public Duration lwcStep() {
return obtain(AtlasProperties::getLwcStep, AtlasConfig.super::lwcSte... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\atlas\AtlasPropertiesConfigAdapter.java | 2 |
请完成以下Java代码 | public final void setSQLXML(final int parameterIndex, final SQLXML xmlObject) throws SQLException
{
logMigrationScript_SetParam(parameterIndex, xmlObject);
getStatementImpl().setSQLXML(parameterIndex, xmlObject);
}
@Override
public final void setObject(final int parameterIndex, final Object x, final int target... | }
@Override
public final void setCharacterStream(final int parameterIndex, final Reader reader) throws SQLException
{
// logMigrationScript_SetParam(parameterIndex, reader);
getStatementImpl().setCharacterStream(parameterIndex, reader);
}
@Override
public final void setNCharacterStream(final int parameterIn... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\sql\impl\CPreparedStatementProxy.java | 1 |
请完成以下Java代码 | public void removedObserveRelation(ObserveRelation relation) {
Request request = relation.getExchange().getRequest();
String token = getTokenFromRequest(request);
clients.deregisterObserveRelation(token);
log.trace("Relation removed for token: {}", token);
}
}... | }
return tbCoapDtlsSessionInfo;
}
private String getCertPem(EndpointContext endpointContext) {
try {
X509CertPath certPath = (X509CertPath) endpointContext.getPeerIdentity();
X509Certificate x509Certificate = (X509Certificate) certPath.getPath().getCertificates().get(0);... | repos\thingsboard-master\common\transport\coap\src\main\java\org\thingsboard\server\transport\coap\CoapTransportResource.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<ListLineItemType> getListLineItem() {
if (listLineItem == null) {
listLineItem = new ArrayList<ListLineItemType>();
}
return this.listLineItem;
}
/**
* Represents a list line item used in a despatch advice.Gets the value of the deliveryListLineItem property.... | * <p>
* For example, to add a new item, do as follows:
* <pre>
* getForecastListLineItem().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ForecastListLineItemType }
*
*
*/
public List<ForecastLis... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ItemListType.java | 2 |
请完成以下Java代码 | public final class NullViewHeaderPropertiesProvider implements ViewHeaderPropertiesProvider
{
public static final transient NullViewHeaderPropertiesProvider instance = new NullViewHeaderPropertiesProvider();
private NullViewHeaderPropertiesProvider()
{
}
@Override
public String getAppliesOnlyToTableName()
{
... | public @NonNull ViewHeaderProperties computeHeaderProperties(@NonNull final IView view)
{
return ViewHeaderProperties.EMPTY;
}
@Override
public ViewHeaderPropertiesIncrementalResult computeIncrementallyOnRowsChanged(
@NonNull final ViewHeaderProperties currentHeaderProperties,
@NonNull final IView view,
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\NullViewHeaderPropertiesProvider.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static String getPreviewType(Model model, FileAttribute fileAttribute, String officePreviewType, String pdfName, String outFilePath, FileHandlerService fileHandlerService, String officePreviewTypeImage, OtherFilePreviewImpl otherFilePreview) {
String suffix = fileAttribute.getSuffix();
boolean isPPT = s... | }
}
if (imageUrls == null || imageUrls.size() < 1) {
return otherFilePreview.notSupportedFile(model, fileAttribute, "office转图片异常,请联系管理员");
}
model.addAttribute("imgUrls", imageUrls);
model.addAttribute("currentUrl", imageUrls.get(0));
if (officePreviewTypeImag... | repos\kkFileView-master\server\src\main\java\cn\keking\service\impl\OfficeFilePreviewImpl.java | 2 |
请完成以下Java代码 | public void setIsDLM(final boolean IsDLM)
{
set_ValueNoCheck(COLUMNNAME_IsDLM, Boolean.valueOf(IsDLM));
}
/**
* Get DLM aktiviert.
*
* @return Die Datensätze einer Tabelle mit aktiviertem DLM können vom System unterschiedlichen DLM-Levels zugeordnet werden
*/
@Override
public boolean isDLM()
{
final... | * @return Direct internal record ID
*/
@Override
public int getRecord_ID()
{
final Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID);
if (ii == null)
{
return 0;
}
return ii.intValue();
}
/**
* Set Name der DB-Tabelle.
*
* @param TableName Name der DB-Tabelle
*/
@Override
public void... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java-gen\de\metas\dlm\model\X_DLM_Partition_Record_V.java | 1 |
请完成以下Java代码 | private HUPackingMaterialsCollector getPackingMaterialsCollectorForInventory(final int inventoryId)
{
return packingMaterialsCollectorByInventoryId.get(inventoryId);
}
@Value
@Builder
private static class InventoryHeaderKey
{
@NonNull
ZonedDateTime movementDate;
@Nullable
String poReference;
}
@Va... | I_M_InOutLine receiptLine;
@Nullable
String poReference;
@Nullable
public InOutLineId getInOutLineId()
{
return receiptLine != null
? InOutLineId.ofRepoId(receiptLine.getM_InOutLine_ID())
: null;
}
public UomId getUomId()
{
return qty.getUomId();
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\internaluse\InventoryAllocationDestination.java | 1 |
请完成以下Java代码 | public TaxCategoryId retrieveRegularTaxCategoryId()
{
final TaxCategoryId taxCategoryId = Services.get(IQueryBL.class)
.createQueryBuilder(I_C_TaxCategory.class)
.addEqualsFilter(I_C_TaxCategory.COLUMN_VATType, X_C_TaxCategory.VATTYPE_RegularVAT)
.addOnlyActiveRecordsFilter()
.addOnlyContextClient()
... | @NonNull
public Optional<TaxCategoryId> getTaxCategoryIdByInternalName(@NonNull final String internalName)
{
return Services.get(IQueryBL.class)
.createQueryBuilder(I_C_TaxCategory.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_C_TaxCategory.COLUMNNAME_InternalName, internalName)
.create()
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\tax\api\impl\TaxBL.java | 1 |
请完成以下Java代码 | private String createStringFromBanner(Banner banner, Environment environment,
@Nullable Class<?> mainApplicationClass) throws UnsupportedEncodingException {
String charset = environment.getProperty("spring.banner.charset", StandardCharsets.UTF_8.name());
ByteArrayOutputStream byteArrayOutputStream = new ByteArra... | this.sourceClass = sourceClass;
}
@Override
public void printBanner(Environment environment, @Nullable Class<?> sourceClass, PrintStream out) {
sourceClass = (sourceClass != null) ? sourceClass : this.sourceClass;
this.banner.printBanner(environment, sourceClass, out);
}
}
static class SpringApplicat... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\SpringApplicationBannerPrinter.java | 1 |
请完成以下Java代码 | public int getReversalLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_ReversalLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Verworfene Menge.
@param ScrappedQty
The Quantity scrapped due to QA issues
*/
@Override
public void setScrappedQty (java.math.BigDecimal Scr... | BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TargetQty);
if (bd == null)
return Env.ZERO;
return bd;
}
/** 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)
{
throw new IllegalArgumentE... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_MovementLine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void publishProductExcludeAddedOrChanged(
final ProductId productId,
@NonNull final BPartnerId newBPartnerId,
final BPartnerId oldBPartnerId)
{
final PZN pzn = getPZNByProductId(productId);
final MSV3ProductExcludesUpdateEventBuilder eventBuilder = MSV3ProductExcludesUpdateEvent.builder();
if (... | final List<MSV3ProductExclude> eventItems = Stream.of(bpartnerIds)
.filter(Objects::nonNull)
.distinct()
.map(bpartnerId -> MSV3ProductExclude.builder()
.pzn(pzn)
.bpartnerId(bpartnerId.getRepoId())
.delete(true)
.build())
.collect(ImmutableList.toImmutableList());
if (eventIte... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server-peer-metasfresh\src\main\java\de\metas\vertical\pharma\msv3\server\peer\metasfresh\services\MSV3StockAvailabilityService.java | 2 |
请完成以下Java代码 | public int getM_Warehouse_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Warehouse_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Promotion Code.
@param PromotionCode
User entered promotion code at sales time
*/
public void setPromotionCode (String PromotionCode)
{
set_V... | set_Value (COLUMNNAME_PromotionUsageLimit, Integer.valueOf(PromotionUsageLimit));
}
/** Get Usage Limit.
@return Maximum usage limit
*/
public int getPromotionUsageLimit ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PromotionUsageLimit);
if (ii == null)
return 0;
return ii.intValue();
}
/** Se... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionPreCondition.java | 1 |
请完成以下Java代码 | public class DbMetricsReporter {
protected MetricsRegistry metricsRegistry;
protected CommandExecutor commandExecutor;
protected String reporterId;
// log every 15 minutes...
protected long reportingIntervalInSeconds = 60 * 15;
protected MetricsCollectionTask metricsCollectionTask;
private Timer timer;... | return metricsCollectionTask;
}
public void setMetricsCollectionTask(MetricsCollectionTask metricsCollectionTask) {
this.metricsCollectionTask = metricsCollectionTask;
}
public void setReporterId(String reporterId) {
this.reporterId = reporterId;
if (metricsCollectionTask != null) {
metricsC... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\metrics\reporter\DbMetricsReporter.java | 1 |
请完成以下Java代码 | public Integer getGiftPointOld() {
return giftPointOld;
}
public void setGiftPointOld(Integer giftPointOld) {
this.giftPointOld = giftPointOld;
}
public Integer getGiftPointNew() {
return giftPointNew;
}
public void setGiftPointNew(Integer giftPointNew) {
this.... | }
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
s... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProductOperateLog.java | 1 |
请完成以下Java代码 | public boolean isAll()
{
return ALL.equals(this);
}
public boolean isOther()
{
return OTHER.equals(this);
}
private boolean isNone()
{
return NONE.equals(this);
}
public boolean isSpecific()
{
return !isAll() && !isOther() && !isNone();
}
public String getSqlLikeString()
{
String sqlLikeStrin... | return sb.toString();
}
public boolean matches(@NonNull final AttributesKey attributesKey)
{
for (final AttributesKeyPartPattern partPattern : partPatterns)
{
boolean partPatternMatched = false;
if (AttributesKey.NONE.getAsString().equals(attributesKey.getAsString()))
{
partPatternMatched = partPa... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\keys\AttributesKeyPattern.java | 1 |
请完成以下Java代码 | public static FieldExtension getField(DelegatePlanItemInstance planItemInstance, String fieldName) {
if (isExecutingLifecycleListener(planItemInstance)) {
return getListenerField(planItemInstance, fieldName);
} else {
return getCmmnElementField(planItemInstance, fieldName);
... | public static Expression getFieldExpression(DelegatePlanItemInstance planItemInstance, String fieldName) {
if (isExecutingLifecycleListener(planItemInstance)) {
return getListenerFieldExpression(planItemInstance, fieldName);
} else {
return getCmmnElementFieldExpression(planItemI... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\delegate\CmmnDelegateHelper.java | 1 |
请完成以下Java代码 | public void customize(InitializrMetadata metadata) {
metadata.getDependencies().merge(this.properties.getDependencies());
metadata.getTypes().merge(this.properties.getTypes());
metadata.getBootVersions().merge(this.properties.getBootVersions());
metadata.getPackagings().merge(this.properties.getPackagings()... | this.resource = resource;
}
@Override
public void customize(InitializrMetadata metadata) {
logger.info("Loading initializr metadata from " + this.resource);
try (InputStream in = this.resource.getInputStream()) {
String content = StreamUtils.copyToString(in, UTF_8);
ObjectMapper objectMapper = new ... | repos\initializr-main\initializr-metadata\src\main\java\io\spring\initializr\metadata\InitializrMetadataBuilder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Quantity getStorageQty(@NonNull final TU tu, @NonNull final ProductId productId)
{
final IHUStorageFactory huStorageFactory = HUContextHolder.getCurrent().getHUStorageFactory();
return huStorageFactory.getStorage(tu.toHU()).getQuantity(productId).orElseThrow(() -> new AdempiereException(NO_QTY_ERROR_MSG, tu... | {
continue;
}
huIdsToAdd.add(lu.getId());
}
for (final TU tu : packedHUs.getTopLevelTUs())
{
// do not add it if is current picking target, we will add it when closing the picking target.
if (currentPickingTarget.matches(tu.getId()))
{
continue;
}
huIdsToAdd.add(tu.getId());
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\service\commands\pick\PickingJobPickCommand.java | 2 |
请完成以下Java代码 | private BPartnerId getBPartnerId(@Nullable final String value)
{
if (value == null)
{
return null;
}
return partnerDAO.getBPartnerIdByValue(value).orElse(null);
}
@Nullable
private ProductCategoryId getProductCategoryId(@Nullable final String value)
{
if (value == null)
{
return null; | }
return productDAO.retrieveProductCategoryIdByCategoryValue(value).orElse(null);
}
@Nullable
private ProductId getProductId(final String value)
{
return productDAO.retrieveProductIdByValue(value);
}
private List<String> readAttachmentLines() throws IOException
{
final AttachmentEntryDataResource attachm... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\process\ImportPriceListSchemaLinesFromAttachment.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
public String getType() {
return type;
}
public int getTotalJobs() {
return totalJobs;
}
public int getBatchJobsPerSeed() {
return batchJobsPerSeed;
}
public int getInvocationsPerBatchJob() {
return invocationsPerBatchJob;
}
public String... | public Date getExecutionStartTime() {
return executionStartTime;
}
public void setExecutionStartTime(final Date executionStartTime) {
this.executionStartTime = executionStartTime;
}
public static HistoricBatchDto fromBatch(HistoricBatch historicBatch) {
HistoricBatchDto dto = new HistoricBatchDto(... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\batch\HistoricBatchDto.java | 1 |
请完成以下Java代码 | protected String doIt()
{
helper.updateEligibleShipmentSchedules(
CarrierAdviseUpdateRequest.builder()
.query(ShipmentScheduleQuery.builder()
.shipperId(p_ShipperId)
.shipmentScheduleIds(getSelectedShipmentScheduleIds())
.build())
.isIncludeCarrierAdviseManual(p_IsIncludeCarri... | return JavaProcess.MSG_OK;
}
private ImmutableSet<ShipmentScheduleId> getSelectedShipmentScheduleIds()
{
return getSelectedIds(ShipmentScheduleId::ofRepoId, rowsLimit);
}
private ImmutableSet<CarrierServiceId> getCarrierServiceIds()
{
return Stream.of(p_CarrierProductService, p_CarrierProductService2, p_Car... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons.webui\src\main\java\de\metas\shipper\gateway\commons\webui\M_ShipmentSchedule_Advise_Manual.java | 1 |
请完成以下Java代码 | public class Article {
// @JsonIgnore
// @JsonProperty(access = JsonProperty.Access.READ_ONLY)
// @Schema(accessMode = AccessMode.READ_ONLY)
@Hidden
private int id;
private String title;
private int numOfWords;
public Article() {
}
public Article(int id, String title) {
... | }
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getNumOfWords() {
return numOfWords;
}
public void setNumOfWords(int numOfWords) {
this.numOfWords = numOfWords;
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-mvc-4\src\main\java\com\baeldung\springboot\swagger\model\Article.java | 1 |
请完成以下Java代码 | public Date getEndedTime() {
return endedTime;
}
@Override
public String getStartUserId() {
return startUserId;
}
@Override
public String getAssignee() {
return assignee;
}
@Override
public String getCompletedBy() {
return completedBy;
}
@O... | }
@Override
public Object getVariable(String variableName) {
return variables.get(variableName);
}
@Override
public String getTenantId() {
return tenantId;
}
@Override
public Set<String> getVariableNames() {
return variables.keySet();
}
@Override
p... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\delegate\ReadOnlyDelegatePlanItemInstanceImpl.java | 1 |
请完成以下Java代码 | public String getNewState() {
return CaseInstanceState.COMPLETED;
}
@Override
public void changeStateForChildPlanItemInstance(PlanItemInstanceEntity planItemInstanceEntity) {
// terminate all child plan items not yet in an end state of the case itself (same way as with a stage for insta... | CommandContextUtil.getCmmnEngineConfiguration(commandContext).getEventDispatcher()
.dispatchEvent(FlowableCmmnEventBuilder.createCaseEndedEvent(caseInstanceEntity, CaseInstanceState.COMPLETED),
EngineConfigurationConstants.KEY_CMMN_ENGINE_CONFIG);
}
@Override
public String getDe... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\agenda\operation\CompleteCaseInstanceOperation.java | 1 |
请完成以下Java代码 | public OAuth2TokenIntrospection build() {
validate();
return new OAuth2TokenIntrospection(this.claims);
}
private void validate() {
Assert.notNull(this.claims.get(OAuth2TokenIntrospectionClaimNames.ACTIVE), "active cannot be null");
Assert.isInstanceOf(Boolean.class, this.claims.get(OAuth2TokenIntrospe... | ((List<String>) this.claims.get(name)).add(value);
}
@SuppressWarnings("unchecked")
private void acceptClaimValues(String name, Consumer<List<String>> valuesConsumer) {
Assert.hasText(name, "name cannot be empty");
Assert.notNull(valuesConsumer, "valuesConsumer cannot be null");
this.claims.computeIfAbs... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\OAuth2TokenIntrospection.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void addDynamicDataSource(SysDataSource sysDataSource, String dbPassword) {
DataSourceProperty dataSourceProperty = new DataSourceProperty();
dataSourceProperty.setUrl(sysDataSource.getDbUrl());
dataSourceProperty.setPassword(dbPassword);
dataSourceProperty.setDriverClassName(sys... | DynamicRoutingDataSource ds = (DynamicRoutingDataSource) dataSource;
ds.removeDataSource(code);
}
/**
* 检查数据源编码是否存在
*
* @param dbCode
* @return
*/
private long checkDbCode(String dbCode) {
QueryWrapper<SysDataSource> qw = new QueryWrapper();
qw.lambda().eq(t... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysDataSourceServiceImpl.java | 2 |
请完成以下Java代码 | public Boolean isTokenExpired(String token) {
Date expiration = getExpirationDateFromToken( token );
return expiration.before( new Date() );
}
/**
* 根据token获取username
*/
public String getUsernameFromToken(String token) {
String username = getClaimsFromToken( token ).getSub... | }
/**
* 解析JWT
*/
private Claims getClaimsFromToken(String token) {
Claims claims = Jwts.parser()
.setSigningKey( SECRET )
.parseClaimsJws( token )
.getBody();
return claims;
}
} | repos\SpringBootLearning-master (1)\springboot-jwt\src\main\java\com\gf\utils\JwtTokenUtil.java | 1 |
请完成以下Java代码 | public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Reihenfolge.
@return Method of ordering records; lowest number comes first
*/
@Override
public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
return 0;
return... | {
set_Value (COLUMNNAME_StartNo, Integer.valueOf(StartNo));
}
/** Get Start No.
@return Starting number/position
*/
@Override
public int getStartNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_StartNo);
if (ii == null)
return 0;
return ii.intValue();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ImpFormat_Row.java | 1 |
请在Spring Boot框架中完成以下Java代码 | class UserRestController {
private final UserService userService;
private final JWTSerializer jwtSerializer;
UserRestController(UserService userService, JWTSerializer jwtSerializer) {
this.userService = userService;
this.jwtSerializer = jwtSerializer;
}
@PostMapping("/users")
... | public ResponseEntity<UserModel> getUser(@AuthenticationPrincipal UserJWTPayload jwtPayload) {
return of(userService.findById(jwtPayload.getUserId())
.map(user -> UserModel.fromUserAndToken(user, getCurrentCredential())));
}
@PutMapping("/user")
public UserModel putUser(@Authenticat... | repos\realworld-springboot-java-master\src\main\java\io\github\raeperd\realworld\application\user\UserRestController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class JmxManagedProcessEngine implements PlatformService<ProcessEngine>, JmxManagedProcessEngineMBean {
protected ProcessEngine processEngine;
// for subclasses
protected JmxManagedProcessEngine() {
}
public JmxManagedProcessEngine(ProcessEngine processEngine) {
this.processEngine = processEngin... | public void registerDeployment(String deploymentId) {
ManagementService managementService = processEngine.getManagementService();
managementService.registerDeploymentForJobExecutor(deploymentId);
}
public void unregisterDeployment(String deploymentId) {
ManagementService managementService = processEngi... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\jmx\services\JmxManagedProcessEngine.java | 2 |
请完成以下Java代码 | public static boolean isValueChanged(Object oldValue, Object value)
{
if (isNotNullAndIsEmpty(oldValue))
{
oldValue = null;
}
if (isNotNullAndIsEmpty(value))
{
value = null;
}
boolean bChanged = oldValue == null && value != null
|| oldValue != null && value == null;
if (!bChanged && oldVal... | }
}
else if (value != null)
{
bChanged = !oldValue.toString().equals(value.toString());
}
}
return bChanged;
}
private static boolean isNotNullAndIsEmpty(final Object value)
{
if (value != null
&& value instanceof String
&& value.toString().equals(""))
{
return true;
}
else
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\GridTableUtils.java | 1 |
请完成以下Java代码 | public void setAD_Language (java.lang.String AD_Language)
{
set_Value (COLUMNNAME_AD_Language, AD_Language);
}
/** Get Sprache.
@return Sprache für diesen Eintrag
*/
@Override
public java.lang.String getAD_Language ()
{
return (java.lang.String)get_Value(COLUMNNAME_AD_Language);
}
@Override
public... | }
/** Set Adress-Druckformat.
@param DisplaySequence
Format for printing this Address
*/
@Override
public void setDisplaySequence (java.lang.String DisplaySequence)
{
set_Value (COLUMNNAME_DisplaySequence, DisplaySequence);
}
/** Get Adress-Druckformat.
@return Format for printing this Address
*/... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Country_Sequence.java | 1 |
请完成以下Java代码 | public List<String> getTenantIdIn() {
return tenantIdIn;
}
public void setTenantIdIn(List<String> tenantIdIn) {
this.tenantIdIn = tenantIdIn;
}
public Boolean getIncludeExtensionProperties() {
return includeExtensionProperties;
}
public void setIncludeExtensionProperties(Boolean includeExtens... | setWithoutTenantId(config.withoutTenantId());
String[] tenantIdIn = config.tenantIdIn();
setTenantIdIn(isNull(tenantIdIn) ? null : Arrays.asList(tenantIdIn));
setIncludeExtensionProperties(config.includeExtensionProperties());
}
protected static boolean isNull(String[] values) {
return values.len... | repos\camunda-bpm-platform-master\spring-boot-starter\starter-client\spring\src\main\java\org\camunda\bpm\client\spring\impl\subscription\SubscriptionConfiguration.java | 1 |
请完成以下Java代码 | public JSONLookupValuesPage getFieldTypeahead(
@PathVariable(PARAM_WindowId) final String windowIdStr,
@PathVariable(PARAM_ViewId) final String viewIdStr,
@PathVariable(PARAM_RowId) final String rowIdStr,
@PathVariable(PARAM_FieldName) final String fieldName,
@RequestParam("query") final String query)
{... | @PathVariable(PARAM_ViewId) final String viewIdStr,
@PathVariable(PARAM_RowId) final String rowIdStr,
@PathVariable(PARAM_FieldName) final String fieldName)
{
userSession.assertLoggedIn();
final ViewId viewId = ViewId.of(windowIdStr, viewIdStr);
final DocumentId rowId = DocumentId.of(rowIdStr);
final I... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewRowEditRestController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MyController {
@RequestMapping("/")
public String init(Map<String, Object> model, Principal principal) {
model.put("title", "PUBLIC AREA");
model.put("message", "Any user can view this page");
model.put("username", getUserName(principal));
model.put("userroles", get... | return principal.getName();
}
}
private Collection<String> getUserRoles(Principal principal) {
if (principal == null) {
return Arrays.asList("none");
} else {
Set<String> roles = new HashSet<String>();
final UserDetails currentUser = (UserDetails) (... | repos\tutorials-master\spring-security-modules\spring-security-ldap\src\main\java\com\baeldung\controller\MyController.java | 2 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
/**
* Attributes2 AD_Reference_ID=541333
* Reference name: Attributes2
*/
public static final int ATTRIBUTES2_AD_Reference_ID=541333;
/** Test(A2T1) = A2T1 */
public static final ... | @Override
public org.compiere.model.I_C_BPartner_QuickInput getC_BPartner_QuickInput()
{
return get_ValueAsPO(COLUMNNAME_C_BPartner_QuickInput_ID, org.compiere.model.I_C_BPartner_QuickInput.class);
}
@Override
public void setC_BPartner_QuickInput(final org.compiere.model.I_C_BPartner_QuickInput C_BPartner_Quick... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_QuickInput_Attributes2.java | 1 |
请完成以下Java代码 | public void setisQtyLUByMaxLoadWeight (final boolean isQtyLUByMaxLoadWeight)
{
set_Value (COLUMNNAME_isQtyLUByMaxLoadWeight, isQtyLUByMaxLoadWeight);
}
@Override
public boolean isQtyLUByMaxLoadWeight()
{
return get_ValueAsBoolean(COLUMNNAME_isQtyLUByMaxLoadWeight);
}
@Override
public void setIsInvoiceabl... | @Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setStackabilityFactor (final int StackabilityFactor)
{
set_Value (COLUMNNAME_Stackability... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PackingMaterial.java | 1 |
请完成以下Java代码 | public java.lang.String getProduct_UUID ()
{
return (java.lang.String)get_Value(COLUMNNAME_Product_UUID);
}
/** Set Zusagbar.
@param QtyPromised Zusagbar */
@Override
public void setQtyPromised (java.math.BigDecimal QtyPromised)
{
set_ValueNoCheck (COLUMNNAME_QtyPromised, QtyPromised);
}
/** Get Zusag... | /** Get Zusagbar (TU).
@return Zusagbar (TU) */
@Override
public java.math.BigDecimal getQtyPromised_TU ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyPromised_TU);
if (bd == null)
{
return Env.ZERO;
}
return bd;
}
/** Set Old Zusagbar (TU).
@param QtyPromised_TU_Old Old Zusagbar (TU)... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java-gen\de\metas\procurement\base\model\X_PMM_QtyReport_Event.java | 1 |
请完成以下Java代码 | public boolean hasAddedRows()
{
final HashSet<DocumentId> addedRowIds = this.addedRowIds;
return addedRowIds != null && !addedRowIds.isEmpty();
}
@Override
public void collectRemovedRowIds(final Collection<DocumentId> rowIds)
{
if (removedRowIds == null)
{
removedRowIds = new HashSet<>(rowIds... | {
if (changedRowIds == null)
{
changedRowIds = new HashSet<>(rowIds);
}
else
{
changedRowIds.addAll(rowIds);
}
}
@Override
public Set<DocumentId> getChangedRowIds()
{
final HashSet<DocumentId> changedRowIds = this.changedRowIds;
return changedRowIds != null ? changedRowIds : Imm... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\AddRemoveChangedRowIdsCollector.java | 1 |
请完成以下Java代码 | public void attachState(MigratingScopeInstance owningInstance) {
ExecutionEntity representativeExecution = owningInstance.resolveRepresentativeExecution();
representativeExecution.addExternalTask(externalTask);
externalTask.setExecution(representativeExecution);
}
@Override
public void attachState(M... | externalTask.setProcessDefinitionKey(targetProcessDefinition.getKey());
}
public String getId() {
return externalTask.getId();
}
public ScopeImpl getTargetScope() {
return migratingActivityInstance.getTargetScope();
}
public void addMigratingDependentInstance(MigratingInstance migratingInstance) ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingExternalTaskInstance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getCaseDefinitionUrl() {
return caseDefinitionUrl;
}
public void setCaseDefinitionUrl(String caseDefinitionUrl) {
this.caseDefinitionUrl = caseDefinitionUrl;
}
public String getPlanItemInstanceId() {
return planItemInstanceId;
}
public void setPlanItemIns... | public void setScopeId(String scopeId) {
this.scopeId = scopeId;
}
public String getSubScopeId() {
return subScopeId;
}
public void setSubScopeId(String subScopeId) {
this.subScopeId = subScopeId;
}
public String getScopeType() {
return scopeType;
}
pu... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\caze\EventSubscriptionResponse.java | 2 |
请完成以下Java代码 | public class StartupTimeline {
private final Instant startTime;
private final List<TimelineEvent> events;
StartupTimeline(Instant startTime, List<TimelineEvent> events) {
this.startTime = startTime;
this.events = Collections.unmodifiableList(events);
}
/**
* Return the start time of this timeline.
* @r... | * @return the start time
*/
public Instant getStartTime() {
return this.step.getStartTime();
}
/**
* Return the end time of this event.
* @return the end time
*/
public Instant getEndTime() {
return this.endTime;
}
/**
* Return the duration of this event, i.e. the processing time of t... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\metrics\buffering\StartupTimeline.java | 1 |
请完成以下Java代码 | public void remove()
{
getCreateIterator().remove();
}
private void assertNotClosed()
{
Check.assume(!_closed.get(), "Source is not already closed");
}
private Iterator<ET> getCreateIterator()
{
assertNotClosed();
if (_iterator == null)
{
final ILock lock = getOrAcquireLock();
final Object con... | .setFailIfNothingLocked(false)
.setRecordsByFilter(eventTypeClass, filter)
.acquire();
}
return _lock;
}
protected IQueryFilter<ET> createFilter()
{
return queryBL.createCompositeQueryFilter(eventTypeClass)
.addOnlyActiveRecordsFilter()
.addOnlyContextClient(ctx)
.addEqualsFilter(COLUMN... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\event\impl\EventSource.java | 1 |
请完成以下Java代码 | public void setPrintServiceName (java.lang.String PrintServiceName)
{
set_ValueNoCheck (COLUMNNAME_PrintServiceName, PrintServiceName);
}
@Override
public java.lang.String getPrintServiceName()
{
return (java.lang.String)get_Value(COLUMNNAME_PrintServiceName);
}
@Override
public void setPrintServiceTray ... | public void setUpdatedby_Print_Job_Instructions (int Updatedby_Print_Job_Instructions)
{
set_ValueNoCheck (COLUMNNAME_Updatedby_Print_Job_Instructions, Integer.valueOf(Updatedby_Print_Job_Instructions));
}
@Override
public int getUpdatedby_Print_Job_Instructions()
{
return get_ValueAsInt(COLUMNNAME_Updatedby... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_C_Printing_Queue_PrintInfo_v.java | 1 |
请完成以下Java代码 | public static boolean validate(@Nullable final String email)
{
return validate(email, null);
}
/**
* @param clazz optional, may be {@code null}. If a class is given and the given {@code email} is not valid,
* then this method instantiates and throws an exception with message {@code "@EmailNotVali... | {
throw clazz.getConstructor(String.class).newInstance("@EmailNotValid@");
}
catch (final InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException e)
{
throw new RuntimeException("Unable to instantiate a " + clazz... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\email\EmailValidator.java | 1 |
请完成以下Java代码 | public LocalDate getValueAsLocalDate()
{
return value == null ? null : TimeUtil.asLocalDate(value);
}
public Object getValueAsJson()
{
if (AttributeValueType.STRING.equals(valueType))
{
return getValueAsString();
}
else if (AttributeValueType.NUMBER.equals(valueType))
{
return getValueAsBigDecima... | case LIST:
{
final String valueStr = getValueAsString();
return TranslatableStrings.anyLanguage(valueStr);
}
case NUMBER:
{
final BigDecimal valueBD = getValueAsBigDecimal();
return valueBD != null
? TranslatableStrings.number(valueBD, de.metas.common.util.NumberUtils.isInteger(valueBD... | repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\deps\products\Attribute.java | 1 |
请完成以下Java代码 | protected MessagingMessageListenerAdapter createMessageListenerInstance(@Nullable Boolean batch) {
return this.adapterProvider.getAdapter(batch == null ? isBatchListener() : batch, this.bean, this.method,
this.returnExceptions, this.errorHandler, getBatchingStrategy());
}
private @Nullable String getDefaultRep... | * @param bean the bean.
* @param method the method.
* @param returnExceptions true to return exceptions.
* @param errorHandler the error handler.
* @param batchingStrategy the batching strategy for batch listeners.
* @return the adapter.
*/
MessagingMessageListenerAdapter getAdapter(boolean batch, @... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\listener\MethodRabbitListenerEndpoint.java | 1 |
请完成以下Java代码 | private ImmutableList<IAccountStatementWrapper> getAccountStatementsV04(@NonNull final XMLStreamReader xmlStreamReader)
{
try
{
final JAXBContext context = JAXBContext.newInstance(de.metas.banking.camt53.jaxb.camt053_001_04.ObjectFactory.class);
final Unmarshaller unmarshaller = context.createUnmarshaller();... | }
}
@NonNull
private OrgId getOrgId(@NonNull final BankAccountId bankAccountId)
{
return bankAccountService.getById(bankAccountId).getOrgId();
}
@Value
@Builder
private static class ImportBankStatementLineRequest
{
@NonNull
IStatementLineWrapper entryWrapper;
@NonNull
BankStatementId bankStatement... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java\de\metas\banking\camt53\BankStatementCamt53Service.java | 1 |
请完成以下Java代码 | public java.lang.String getSubProducerBPartner_Value()
{
return get_ValueAsString(COLUMNNAME_SubProducerBPartner_Value);
}
@Override
public void setTE (final @Nullable java.lang.String TE)
{
set_Value (COLUMNNAME_TE, TE);
}
@Override
public java.lang.String getTE()
{
return get_ValueAsString(COLUMNNA... | }
@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(COLUMNNAME_X1);
}
@Override
public vo... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Inventory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class TestController {
@Autowired
private DiscoveryClient discoveryClient;
@Autowired
private RestTemplate restTemplate;
@Autowired
private LoadBalancerClient loadBalancerClient;
@GetMapping("/hello")
public String hello(String name) {
... | instance = loadBalancerClient.choose("demo-provider");
}
// 发起调用
if (instance == null) {
throw new IllegalStateException("获取不到实例");
}
String targetUrl = instance.getUri() + "/echo?name=" + name;
String response = restTemplate.getFor... | repos\SpringBoot-Labs-master\labx-01-spring-cloud-alibaba-nacos-discovery\labx-01-sca-nacos-discovery-demo01-consumer\src\main\java\cn\iocoder\springcloudalibaba\labx01\nacosdemo\consumer\DemoConsumerApplication.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getTextCode() {
return textCode;
}
/**
* Sets the value of the textCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTextCode(String value) {
... | return agencyCode;
}
/**
* Sets the value of the agencyCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAgencyCode(String value) {
this.agencyCode = value;
}... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\FreeTextType.java | 2 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setActorId (final @Nullable java.lang.String ActorId)
{
set_Value (COLUMNNAME_ActorId, ActorId);
}
@Override
public java.lang.String getActorId()
{
return ... | set_Value (COLUMNNAME_M_Shipper_ID, null);
else
set_Value (COLUMNNAME_M_Shipper_ID, M_Shipper_ID);
}
@Override
public int getM_Shipper_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Shipper_ID);
}
@Override
public void setPassword (final @Nullable java.lang.String Password)
{
set_Value (COLUMNNAME_Passw... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Carrier_Config.java | 1 |
请完成以下Java代码 | public class ProjectRequest {
private List<String> dependencies = new ArrayList<>();
private String name;
private String type;
private String description;
private String groupId;
private String artifactId;
private String version;
private String bootVersion;
private String packaging;
private String a... | }
public String getApplicationName() {
return this.applicationName;
}
public void setApplicationName(String applicationName) {
this.applicationName = applicationName;
}
public String getLanguage() {
return this.language;
}
public void setLanguage(String language) {
this.language = language;
}
publ... | repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\project\ProjectRequest.java | 1 |
请完成以下Java代码 | I_M_Attribute getIsQualityInspectionAttribute()
{
final IAttributeDAO attributeDAO = Services.get(IAttributeDAO.class);
final I_M_Attribute attribute = attributeDAO.retrieveAttributeByValue(ATTRIBUTENAME_IsQualityInspection);
Check.assumeNotNull(attribute, "attribute shall exist for {}", ATTRIBUTENAME_IsQuality... | @Override
public void updateHUAttributeRecursive(final I_M_HU hu,
final I_M_Material_Tracking materialTracking,
final String onlyHUStatus)
{
final IMaterialTrackingAttributeBL materialTrackingAttributeBL = Services.get(IMaterialTrackingAttributeBL.class);
final IHUAttributesBL huAttributesBL = Services.get(... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\materialtracking\impl\HUMaterialTrackingBL.java | 1 |
请完成以下Java代码 | public void setM_ForecastLine_ID (int M_ForecastLine_ID)
{
if (M_ForecastLine_ID < 1)
set_Value (COLUMNNAME_M_ForecastLine_ID, null);
else
set_Value (COLUMNNAME_M_ForecastLine_ID, Integer.valueOf(M_ForecastLine_ID));
}
@Override
public int getM_ForecastLine_ID()
{
return get_ValueAsInt(COLUMNNAME_M... | }
@Override
public java.math.BigDecimal getPlannedQty()
{
BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PlannedQty);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setM_InOutLine_ID (final int M_InOutLine_ID)
{
if (M_InOutLine_ID < 1)
set_Value (COLUMNNAME_M_InOutLine_ID, null);... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java-gen\de\metas\material\dispo\model\X_MD_Candidate_Demand_Detail.java | 1 |
请完成以下Java代码 | public class C_OLCand_Validate_Selected extends JavaProcess
{
//
// services
private final IQueryBL queryBL = Services.get(IQueryBL.class);
private final IMsgBL msgBL = Services.get(IMsgBL.class);
private final OLCandValidatorService olCandValidatorService = SpringContextHolder.instance.getBean(OLCandValidatorSer... | int candidatesWithError = 0;
for (final I_C_OLCand olCand : IteratorUtils.asIterable(selectedCands))
{
olCandValidatorService.validate(olCand);
if (olCand.isError())
{
candidatesWithError++;
}
InterfaceWrapperHelper.save(olCand);
}
return msgBL.getMsg(getCtx(), OLCandValidatorServi... | repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\process\C_OLCand_Validate_Selected.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ResponseEntity<Employee> updateEmployee(
@ApiParam(value = "Employee Id to update employee object", required = true)
@PathVariable(value = "id") Long employeeId,
@ApiParam(value = "Update employee object", required = true)
@Valid @RequestBody Employee employeeDetails) throws ResourceNotFoundException... | @ApiOperation(value = "Delete an employee")
@DeleteMapping("/employees/{id}")
public Map<String, Boolean> deleteEmployee(
@ApiParam(value = "Employee Id from which employee object will delete from database table", required = true)
@PathVariable(value = "id") Long employeeId)
throws ResourceNotFoundException ... | repos\Spring-Boot-Advanced-Projects-main\springboot2-jpa-swagger2\src\main\java\net\alanbinu\springboot2\springboot2swagger2\controller\EmployeeController.java | 2 |
请完成以下Java代码 | protected ExpressionFactory getExpressionFactory() {
Object obj = getContext(ExpressionFactory.class);
if (obj instanceof ExpressionFactory) {
return (ExpressionFactory) obj;
}
return getDefaultExpressionFactory();
}
protected ExpressionFactory getDefaultExpressionFa... | } else {
foundAbstractMethod = true;
}
}
}
return foundAbstractMethod;
}
/*
* Copied from org.apache.el.lang.ELSupport - keep in sync
*/
private static boolean overridesObjectMethod(Method method) {
// There are three methods... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\javax\el\ELContext.java | 1 |
请完成以下Java代码 | public ZonedDateTime getParameterAsZonedDateTime()
{
return TimeUtil.asZonedDateTime(m_Parameter);
}
@Nullable
public Instant getParameterAsInstant()
{
return TimeUtil.asInstant(m_Parameter);
}
@Nullable
public ZonedDateTime getParameter_ToAsZonedDateTime()
{
return TimeUtil.asZonedDateTime(m_Parameter... | {
return null;
}
else if (value instanceof BigDecimal)
{
return (BigDecimal)value;
}
else if (value instanceof Integer)
{
return BigDecimal.valueOf((Integer)value);
}
else
{
return new BigDecimal(value.toString());
}
}
} // ProcessInfoParameter | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessInfoParameter.java | 1 |
请完成以下Java代码 | public class ThingsBoardExecutors {
/** Cannot instantiate. */
private ThingsBoardExecutors(){}
/**
* Method forked from ExecutorService to provide thread pool name
*
* Creates a thread pool that maintains enough threads to support
* the given parallelism level, and may use multiple qu... | }
public static ExecutorService newWorkStealingPool(int parallelism, Class clazz) {
return newWorkStealingPool(parallelism, clazz.getSimpleName());
}
/*
* executor with limited tasks queue size
* */
public static ExecutorService newLimitedTasksExecutor(int threads, int maxQueueSize, ... | repos\thingsboard-master\common\util\src\main\java\org\thingsboard\common\util\ThingsBoardExecutors.java | 1 |
请完成以下Java代码 | public PvmException transitCaseException(String transition, String id, CaseExecutionState currentState) {
return new PvmException(exceptionMessage(
"015",
caseStateTransitionMessage +
"Reason: Expected case execution state to be {terminatingOnTermination|terminatingOnExit} but it was '{}'.",
... | cause.getMessage()),
cause
);
}
public ProcessEngineException decisionDefinitionEvaluationFailed(CmmnActivityExecution execution, Exception cause) {
return new ProcessEngineException(exceptionMessage(
"019",
"Could not evaluate decision in case execution '"+execution.getId()+"'. Reason: {... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\behavior\CmmnBehaviorLogger.java | 1 |
请完成以下Java代码 | public class AppEngineFactoryBean implements FactoryBean<AppEngine>, DisposableBean, ApplicationContextAware {
protected AppEngineConfiguration appEngineConfiguration;
protected ApplicationContext applicationContext;
protected AppEngine appEngine;
@Override
public void destroy() throws Exception ... | }
@Override
public Class<AppEngine> getObjectType() {
return AppEngine.class;
}
@Override
public boolean isSingleton() {
return true;
}
public AppEngineConfiguration getAppEngineConfiguration() {
return appEngineConfiguration;
}
public void setAppEngineCon... | repos\flowable-engine-main\modules\flowable-app-engine-spring\src\main\java\org\flowable\app\spring\AppEngineFactoryBean.java | 1 |
请完成以下Java代码 | public int getM_AttributeSetInstance_ID()
{
return -1; // N/A
}
@Override
public void setM_AttributeSetInstance_ID(final int M_AttributeSetInstance_ID)
{
throw new UnsupportedOperationException();
}
@Override
public int getC_UOM_ID()
{
// TODO Auto-generated method stub
return -1;
}
@Override
pub... | public void setC_BPartner_ID(final int bpartnerId)
{
order.setC_BPartner_ID(bpartnerId);
}
@Override
public int getC_BPartner_ID()
{
return order.getC_BPartner_ID();
}
@Override
public boolean isInDispute()
{
return false;
}
@Override
public void setInDispute(final boolean inDispute)
{
throw new... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\OrderHUPackingAware.java | 1 |
请完成以下Java代码 | public String getIncotermLocation() {return olCandRecord.getIncotermLocation();}
// FIXME hardcoded (08691)
@Nullable
public Object getValueByColumn(@NonNull final OLCandAggregationColumn column)
{
final String olCandColumnName = column.getColumnName();
switch (olCandColumnName)
{
case I_C_OLCand.COLUMNN... | public boolean isExplicitProductPriceAttribute()
{
return olCandRecord.isExplicitProductPriceAttribute();
}
public int getFlatrateConditionsId()
{
return olCandRecord.getC_Flatrate_Conditions_ID();
}
public int getHUPIProductItemId()
{
final HUPIItemProductId packingInstructions = olCandEffectiveValuesBL... | repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\api\OLCand.java | 1 |
请完成以下Java代码 | public void setAD_Issue_ID (final int AD_Issue_ID)
{
if (AD_Issue_ID < 1)
set_Value (COLUMNNAME_AD_Issue_ID, null);
else
set_Value (COLUMNNAME_AD_Issue_ID, AD_Issue_ID);
}
@Override
public int getAD_Issue_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_Issue_ID);
}
@Override
public void setDurationM... | if (Source_Record_ID < 1)
set_Value (COLUMNNAME_Source_Record_ID, null);
else
set_Value (COLUMNNAME_Source_Record_ID, Source_Record_ID);
}
@Override
public int getSource_Record_ID()
{
return get_ValueAsInt(COLUMNNAME_Source_Record_ID);
}
@Override
public void setSource_Table_ID (final int Source_T... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_BusinessRule_Log.java | 1 |
请完成以下Java代码 | public void setContent(String content) {
this.content = content;
}
public void setAuthor(User author) {
this.author = author;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass... | }
Post post = (Post) o;
return Objects.equals(id, post.id);
}
@Override
public int hashCode() {
return id != null ? id.hashCode() : 0;
}
public String toString() {
return "Post(id=" + this.getId() + ", content=" + this.getContent() + ", author=" + this.getAuthor()... | repos\tutorials-master\persistence-modules\spring-boot-persistence-2\src\main\java\com\baeldung\listvsset\eager\list\moderatedomain\Post.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getFirstName() {
return firstName;
}
/**
* Sets the first name.
*
* @param firstName the new first name
*/
public void setFirstName(String firstName) {
this.firstName = firstName;
}
/**
* Gets the last name.
*
* @return the last name
*/
public String getLastName() {
return ... | result = prime * result
+ ((userName == null) ? 0 : userName.hashCode());
return result;
}
/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.get... | repos\spring-boot-microservices-master\user-webservice\src\main\java\com\rohitghatol\microservices\user\dto\UserDTO.java | 2 |
请在Spring Boot框架中完成以下Java代码 | class LocationGeocodeEventHandler
{
private final ILocationDAO locationsRepo = Services.get(ILocationDAO.class);
private final ICountryDAO countryDAO = Services.get(ICountryDAO.class);
private final GeocodingService geocodingService;
private final IEventBusFactory eventBusFactory;
private final IErrorManager error... | {
final AdIssueId issueId = errorManager.createIssue(ex);
if (locationRecord != null)
{
locationRecord.setGeocodingStatus(X_C_Location.GEOCODINGSTATUS_Error);
locationRecord.setGeocoding_Issue_ID(issueId.getRepoId());
}
}
finally
{
if (locationRecord != null)
{
locationsRepo.save(loc... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\geocoding\asynchandler\LocationGeocodeEventHandler.java | 2 |
请完成以下Java代码 | private JeecgLlmTools grantUserRolesTool() {
ToolSpecification spec = ToolSpecification.builder()
.name("grant_user_roles")
.description("给用户授予角色,支持一次授予多个角色;如果关系已存在则跳过。返回授予结果统计。")
.parameters(
JsonObjectSchema.builder()
... | org.jeecg.modules.system.entity.SysRole role = sysRoleService.getById(roleId);
if (role == null) { invalid++; continue; }
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper<org.jeecg.modules.system.entity.SysUserRole> q = new com.baomidou.mybatisplus.core.conditions.query.QueryW... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\airag\JeecgBizToolsProvider.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_AD_Process getAD_Process() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_AD_Process_ID, org.compiere.model.I_AD_Process.class);
}
@Override
public void setAD_Process(org.compiere.model.I_AD_Process AD_Process)
{
set_ValueFromPO(COLUMNNAME_AD_Process_ID, org.compiere.mod... | if (ii == null)
return 0;
return ii.intValue();
}
/** Set Statistic Count.
@param Statistic_Count
Internal statistics how often the entity was used
*/
@Override
public void setStatistic_Count (int Statistic_Count)
{
set_Value (COLUMNNAME_Statistic_Count, Integer.valueOf(Statistic_Count));
}
/**... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Process_Stats.java | 1 |
请完成以下Java代码 | private static String getFileName(@Nullable File file) {
Assert.state(file != null, "'file' must not be null");
return file.getName();
}
/**
* Return the name of file as it should be written.
* @return the name
*/
public String getName() {
return this.name;
}
/**
* Return the library file.
* @ret... | /**
* Return if the file cannot be used directly as a nested jar and needs to be
* unpacked.
* @return if unpack is required
*/
public boolean isUnpackRequired() {
return this.unpackRequired;
}
long getLastModified() {
Assert.state(this.file != null, "'file' must not be null");
return this.file.lastMo... | repos\spring-boot-4.0.1\loader\spring-boot-loader-tools\src\main\java\org\springframework\boot\loader\tools\Library.java | 1 |
请完成以下Java代码 | public int getAD_Table_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Validation Rule Depends On.
@param AD_Val_Rule_Dep_ID Validation Rule Depends On */
@Override
public void setAD_Val_Rule_Dep_ID (int AD_Val_Rule_Dep_ID)
... | /** Get Dynamische Validierung.
@return Regel für die dynamische Validierung
*/
@Override
public int getAD_Val_Rule_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Val_Rule_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Technical note.
@param TechnicalNote
A note that i... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Val_Rule_Dep.java | 1 |
请完成以下Java代码 | protected Resource getResourceByPath(String path) {
if (getServletContext() == null) {
return new ClassPathContextResource(path, getClassLoader());
}
return new ServletContextResource(getServletContext(), path);
}
@Override
public @Nullable String getServerNamespace() {
return this.serverNamespace;
}
... | scopes.add(WebApplicationContext.SCOPE_REQUEST);
scopes.add(WebApplicationContext.SCOPE_SESSION);
SCOPES = Collections.unmodifiableSet(scopes);
}
private final ConfigurableListableBeanFactory beanFactory;
private final Map<String, Scope> scopes = new HashMap<>();
public ExistingWebApplicationScopes(Con... | repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\servlet\context\ServletWebServerApplicationContext.java | 1 |
请完成以下Java代码 | public class SetDeploymentCategoryCmd implements Command<Void> {
protected String deploymentId;
protected String category;
public SetDeploymentCategoryCmd(String deploymentId, String category) {
this.deploymentId = deploymentId;
this.category = category;
}
@Override
public Voi... | FlowableEventDispatcher eventDispatcher = processEngineConfiguration.getEventDispatcher();
if (eventDispatcher != null && eventDispatcher.isEnabled()) {
eventDispatcher.dispatchEvent(FlowableEventBuilder.createEntityEvent(FlowableEngineEventType.ENTITY_UPDATED, deployment),
proce... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\SetDeploymentCategoryCmd.java | 1 |
请完成以下Java代码 | public class ComparatorChain<T> implements Comparator<T>
{
private final List<Comparator<T>> comparators = new ArrayList<Comparator<T>>();
public ComparatorChain()
{
}
public ComparatorChain<T> addComparator(Comparator<T> cmp)
{
final boolean reverse = false;
return addComparator(cmp, reverse);
}
public ... | return this;
}
@Override
public int compare(T o1, T o2)
{
Check.assume(!comparators.isEmpty(), "ComparatorChain contains comparators");
for (final Comparator<T> cmp : comparators)
{
final int result = cmp.compare(o1, o2);
if (result != 0)
{
return result;
}
}
// assuming that objects ar... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\comparator\ComparatorChain.java | 1 |
请完成以下Java代码 | public final class ALoginRes_pl extends ListResourceBundle
{
/** Translation Content */
static final Object[][] contents = new String[][]
{
{ "Connection", "Po\u0142\u0105czenie" },
{ "Defaults", "Domy\u015blne" },
{ "Login", "Logowanie" },
{ "File", "Plik" },
{ ... | { "RoleNotFound", "Nie znaleziono zasady" },
{ "Authorized", "Autoryzowany" },
{ "Ok", "Ok" },
{ "Cancel", "Anuluj" },
{ "VersionConflict", "Konflikt wersji:" },
{ "VersionInfo", "Serwer <> Klienta" },
{ "PleaseUpgrade", "Uruchom now\u0105 wersj\u0119 progr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\apps\ALoginRes_pl.java | 1 |
请完成以下Java代码 | protected List<IFacet<I_PMM_PurchaseCandidate>> collectFacets(final IQueryBuilder<I_PMM_PurchaseCandidate> queryBuilder)
{
final List<Map<String, Object>> bpartners = queryBuilder
.andCollect(I_PMM_PurchaseCandidate.COLUMN_M_Product_ID)
.create()
.listDistinct(I_M_Product.COLUMNNAME_M_Product_ID, I_M_Pro... | final int bpartnerId = (int)row.get(I_M_Product.COLUMNNAME_M_Product_ID);
final String bpartnerName = new StringBuilder()
.append(row.get(I_M_Product.COLUMNNAME_Value))
.append(" - ")
.append(row.get(I_M_Product.COLUMNNAME_Name))
.toString();
final Facet<I_PMM_PurchaseCandidate> facet = Facet.<I_PMM... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\order\facet\impl\PMM_PurchaseCandidate_Product_FacetCollector.java | 1 |
请完成以下Java代码 | public void setIsDefault (final boolean IsDefault)
{
set_Value (COLUMNNAME_IsDefault, IsDefault);
}
@Override
public boolean isDefault()
{
return get_ValueAsBoolean(COLUMNNAME_IsDefault);
}
@Override
public void setM_Forecast_ID (final int M_Forecast_ID)
{
if (M_Forecast_ID < 1)
set_ValueNoCheck (... | public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setProcessed (final boolean Processed)
{
set_ValueNoCheck (COLUMNNAME_Processed, Processed);
}
@Override
public boolean isProcessed()
{
return get_ValueAsBoolean(COLUMNNAME_Processed);
}
@Overrid... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Forecast.java | 1 |
请完成以下Java代码 | public static int usingSorting(int num) {
String numStr = String.valueOf(num);
char[] numChars = numStr.toCharArray();
int pivotIndex;
for (pivotIndex = numChars.length - 1; pivotIndex > 0; pivotIndex--) {
if (numChars[pivotIndex] > numChars[pivotIndex - 1]) {
... | }
swap(numChars, pivotIndex, minIndex);
reverse(numChars, pivotIndex + 1, numChars.length - 1);
return Integer.parseInt(new String(numChars));
}
private static void swap(char[] numChars, int i, int j) {
char temp = numChars[i];
numChars[i] = numChars[j];
numChars... | repos\tutorials-master\core-java-modules\core-java-numbers-8\src\main\java\com\baeldung\nexthighestnumbersamedigit\NextHighestNumber.java | 1 |
请完成以下Java代码 | public int getK_IndexStop_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_K_IndexStop_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_R_RequestType getR_RequestType() throws RuntimeException
{
return (I_R_RequestType)MTable.get(getCtx(), I_R_RequestType.Table_Name)
.getPO(getR... | if (R_RequestType_ID < 1)
set_Value (COLUMNNAME_R_RequestType_ID, null);
else
set_Value (COLUMNNAME_R_RequestType_ID, Integer.valueOf(R_RequestType_ID));
}
/** Get Request Type.
@return Type of request (e.g. Inquiry, Complaint, ..)
*/
public int getR_RequestType_ID ()
{
Integer ii = (Integer)get_... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_K_IndexStop.java | 1 |
请完成以下Java代码 | public void deleteCommentsByTaskId(String taskId) {
checkHistoryEnabled();
dataManager.deleteCommentsByTaskId(taskId);
}
@Override
public void deleteCommentsByProcessInstanceId(String processInstanceId) {
checkHistoryEnabled();
dataManager.deleteCommentsByProcessInstanceId(p... | delete(commentEntity, false);
Comment comment = (Comment) commentEntity;
if (getEventDispatcher() != null && getEventDispatcher().isEnabled()) {
// Forced to fetch the process-instance to associate the right
// process definition
String processDefinitionId = null;
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\CommentEntityManagerImpl.java | 1 |
请完成以下Java代码 | public static <T> List<T> importExcel(String filePath,Integer titleRows,Integer headerRows, Class<T> pojoClass) throws Exception {
if (StringUtils.isBlank(filePath)){
return null;
}
ImportParams params = new ImportParams();
params.setTitleRows(titleRows);
params.setHe... | return null;
}
ImportParams params = new ImportParams();
params.setTitleRows(titleRows);
params.setHeadRows(headerRows);
List<T> list = null;
try {
list = ExcelImportUtil.importExcel(file.getInputStream(), pojoClass, params);
}catch (NoSuchElementExcep... | repos\springboot-demo-master\eaypoi\src\main\java\com\et\easypoi\Util\FileUtil.java | 1 |
请完成以下Java代码 | protected void prepare()
{
// nothing
}
@Override
protected String doIt() throws Exception
{
final I_C_PeriodControl pc = getRecord(I_C_PeriodControl.class);
this.periodId = pc.getC_Period_ID();
// Permanently closed
if (X_C_PeriodControl.PERIODSTATUS_PermanentlyClosed.equals(pc.getPeriodStatus()))
{... | //
// Update the period control
final String newPeriodStatus = Services.get(IPeriodBL.class).getPeriodStatusForAction(pc.getPeriodAction());
pc.setPeriodStatus(newPeriodStatus);
pc.setPeriodAction(X_C_PeriodControl.PERIODACTION_NoAction); // reset the action
InterfaceWrapperHelper.save(pc);
return "@OK@";
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\process\PeriodControlStatus.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class WikiDocumentsRepository {
private final VectorStore vectorStore;
public WikiDocumentsRepository(VectorStore vectorStore) {
this.vectorStore = vectorStore;
}
public void saveWikiDocument(WikiDocument wikiDocument) {
Map<String, Object> metadata = new HashMap<>();
m... | return vectorStore
.similaritySearch(SearchRequest.builder()
.query(searchText)
.similarityThreshold(0.87)
.topK(10).build())
.stream()
.map(document -> {
WikiDocument wikiDocument = new WikiDocument();
wikiDocument.setFilePat... | repos\tutorials-master\spring-ai-modules\spring-ai-3\src\main\java\com\baeldung\springai\rag\mongodb\repository\WikiDocumentsRepository.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.