instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public org.compiere.model.I_C_ValidCombination getT_Revenue_A()
{
return get_ValueAsPO(COLUMNNAME_T_Revenue_Acct, org.compiere.model.I_C_ValidCombination.class);
}
@Override
public void setT_Revenue_A(org.compiere.model.I_C_ValidCombination T_Revenue_A)
{
set_ValueFromPO(COLUMNNAME_T_Revenue_Acct, org.compier... | {
set_Value (COLUMNNAME_T_Revenue_Acct, Integer.valueOf(T_Revenue_Acct));
}
/** Get Erlös Konto.
@return Steuerabhängiges Konto zur Verbuchung Erlöse
*/
@Override
public int getT_Revenue_Acct ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_T_Revenue_Acct);
if (ii == null)
return 0;
return ii.int... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Tax_Acct.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class EntityManagerFilter implements ContainerRequestFilter,
ContainerResponseFilter {
public static final String EM_REQUEST_ATTRIBUTE =
EntityManagerFilter.class.getName() + "_ENTITY_MANAGER";
private final EntityManagerFactory entityManagerFactory;
@C... | }
@Override
public void filter(ContainerRequestContext requestContext,
ContainerResponseContext responseContext) throws IOException {
EntityManager entityManager = (EntityManager) httpRequest.getAttribute(EM_REQUEST_ATTRIBUTE);
if (!"GET".equalsIgnoreCa... | repos\springboot-demo-master\olingo\src\main\java\com\et\olingo\config\JerseyConfig.java | 2 |
请完成以下Java代码 | public List<I_C_OrderLine> retrieveOrderLines(@NonNull final I_C_Order order,
final boolean allowMultiplePOOrders,
final String purchaseQtySource)
{
Check.assumeNotEmpty(purchaseQtySource, "Param purchaseQtySource is not empty");
Check.assume(I_C_OrderLine.COLUMNNAME_QtyOrdered.equals(purchaseQtySource) || I... | final Set<OrderLineId> alreadyAllocatedSOLineIds = queryBL.createQueryBuilder(I_C_PO_OrderLine_Alloc.class)
.addOnlyActiveRecordsFilter()
.addInArrayFilter(I_C_PO_OrderLine_Alloc.COLUMNNAME_C_SO_OrderLine_ID, salesOrderLineIds)
.create()
.stream()
.map(I_C_PO_OrderLine_Alloc::getC_SO_OrderLine_ID)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\order\createFrom\po_from_so\impl\C_Order_CreatePOFromSOsDAO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public DirectExchange delayQueueExchange() {
return new DirectExchange(DELAY_QUEUE_EXCHANGE_NAME);
}
/**
* 存放消息的延迟队列 最后将会转发给exchange(实际消费队列对应的)
* @return
*/
@Bean
public Queue delayQueue4Queue() {
return QueueBuilder.durable(DELAY_QUEUE_NAME)
.withArgument("x-dead-letter-exchange", PROCESS_EXCHANGE_N... | @Bean
TopicExchange exchange() {
return new TopicExchange("exchange");
}
@Bean
FanoutExchange fanoutExchange() {
return new FanoutExchange("fanoutExchange");
}
/**
* 将队列topic.message与exchange绑定,binding_key为topic.message,就是完全匹配
* @param queueMessage
* @param exchange
* @return
*/
@Bean
Binding bi... | repos\spring-boot-quick-master\quick-rabbitmq\src\main\java\com\quick\mq\config\RabbitConfig.java | 2 |
请完成以下Java代码 | public class Row
{
private final LinkedHashMap<String, Cell> map;
public Row()
{
this.map = new LinkedHashMap<>();
}
Set<String> getColumnNames()
{
return map.keySet();
}
@NonNull
public Cell getCell(@NonNull final String columnName)
{
final Cell value = map.get(columnName);
return value != null ? ... | public void put(@NonNull final String columnName, @NonNull final Cell value)
{
map.put(columnName, value);
}
public void put(@NonNull final String columnName, @Nullable final Object valueObj)
{
map.put(columnName, Cell.ofNullable(valueObj));
}
public void putAll(@NonNull final Map<String, ?> map)
{
map.f... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\text\tabular\Row.java | 1 |
请完成以下Java代码 | /* package */ class BPartnerBankAccountImportHelper
{
private final ICurrencyBL currencyBL = Services.get(ICurrencyBL.class);
private final BankRepository bankRepository;
private BPartnerImportProcess process;
@Builder
private BPartnerBankAccountImportHelper(
@NonNull final BankRepository bankRepository)
{
... | bankAccount.setC_BPartner_ID(bpartnerId.getRepoId());
bankAccount.setIBAN(importRecord.getIBAN());
bankAccount.setA_Name(importRecord.getSwiftCode());
bankAccount.setC_Currency_ID(currencyBL.getBaseCurrency(process.getCtx()).getId().getRepoId());
final BankId bankId = bankRepository.getBankIdBySwiftCode(imp... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\impexp\BPartnerBankAccountImportHelper.java | 1 |
请完成以下Java代码 | public String getLabel() {
return label;
}
public void setLabel(String label) {
this.label = label;
}
public Map<Vertex, Edge> getEdges() {
return edges;
}
public void addEdge(Vertex vertex, Edge edge){
if (this.edges.containsKey(vertex)){
if (edge.... | public String originalToString(){
StringBuilder sb = new StringBuilder();
Iterator<Map.Entry<Vertex,Edge>> it = edges.entrySet().iterator();
while (it.hasNext()) {
Map.Entry<Vertex,Edge> pair = it.next();
if (!pair.getValue().isPrinted()) {
sb.append(getLa... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-5\src\main\java\com\baeldung\algorithms\prim\Vertex.java | 1 |
请完成以下Java代码 | public void onComplete(final I_M_InOut shipment)
{
shipmentDAO.retrieveLines(shipment).forEach(this::syncInOutLine);
}
@Override
public void onReverse(final I_M_InOut shipment)
{
shipmentDAO.retrieveLines(shipment).forEach(this::syncInOutLine);
}
@Override
public void onReactivate(final I_M_InOut shipment... | if (flatrateTermId == null)
{
return;
}
if (!callOrderContractService.isCallOrderContract(flatrateTermId))
{
return;
}
callOrderContractService.validateCallOrderInOutLine(inOutLine, flatrateTermId);
final UpsertCallOrderDetailRequest request = UpsertCallOrderDetailRequest.builder()
.callOrder... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\callorder\detail\document\DocumentChangeHandler_InOut.java | 1 |
请完成以下Java代码 | public class InsertionSort {
public static void insertionSortImperative(int[] input) {
for (int i = 1; i < input.length; i++) {
int key = input[i];
int j = i - 1;
while (j >= 0 && input[j] > key) {
input[j + 1] = input[j];
j = j - 1;
... | }
// sort the first i - 1 elements of the array
insertionSortRecursive(input, i - 1);
// then find the correct position of the element at position i
int key = input[i - 1];
int j = i - 2;
// shifting the elements from their position by 1
while (j >= 0 && input[j... | repos\tutorials-master\algorithms-modules\algorithms-sorting-2\src\main\java\com\baeldung\algorithms\insertionsort\InsertionSort.java | 1 |
请完成以下Java代码 | public boolean markAsRead(@NonNull final UserNotification notification)
{
final boolean alreadyRead = notification.setRead(true);
if (alreadyRead)
{
logger.debug("Skip marking notification as read because it's already read: {}", notification);
return false;
}
return markAsReadById(notification.getId()... | .create()
.delete(false);
}
@Override
public void deleteAllByUserId(final UserId adUserId)
{
retrieveNotesByUserId(adUserId)
.create()
.list()
.forEach(this::deleteNotification);
}
private void deleteNotification(final I_AD_Note notificationPO)
{
notificationPO.setProcessed(false);
Interf... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\notification\impl\NotificationRepository.java | 1 |
请完成以下Java代码 | protected ProcessPreconditionsResolution checkPreconditionsApplicable()
{
// only showing the action if there are rows in the view
if (getView().size() <= 0)
{
return ProcessPreconditionsResolution.reject();
}
return ProcessPreconditionsResolution.accept();
}
@Override
protected String doIt() throws ... | .filter(procurementPurchaseCandidateQueryFilter)
.enqueue();
return MSG_OK;
}
@Override
protected void postProcess(final boolean success)
{
if (!success)
{
return;
}
//
// Notify frontend that the view shall be refreshed because we changed some candidates
if (recordsEnqueued > 0)
{
inval... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\procurement\process\PMM_Purchase_Candidate_CreatePurchaseOrder.java | 1 |
请完成以下Java代码 | public boolean isVariant()
{
return getComponentType().isVariant();
}
public Quantity getQtyIncludingScrap()
{
return getQty().add(getScrapPercent());
}
@Nullable
public CostAmount getCostAmountOrNull(final CostElementId costElementId)
{
final BOMCostElementPrice costPriceHolder = getCostPrice().getCost... | @NonNull final CostElementId costElementId)
{
getCostPrice().setComponentsCostPrice(elementCostPrice, costElementId);
}
void clearComponentsCostPrice(@NonNull final CostElementId costElementId)
{
getCostPrice().clearComponentsCostPrice(costElementId);
}
public ImmutableList<BOMCostElementPrice> getElementPr... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\costing\BOMLine.java | 1 |
请完成以下Java代码 | public WFActivityStatus computeActivityState(final WFProcess wfProcess, final WFActivity wfActivity)
{
return getScannedQRCode(wfProcess, wfActivity) != null
? WFActivityStatus.COMPLETED
: WFActivityStatus.NOT_STARTED;
}
@Override
public WFProcess setScannedBarcode(final @NonNull SetScannedBarcodeRequest... | @NonNull
private IExternalSystemChildConfigId getExternalSystemChildConfigId(@NonNull final GlobalQRCode scannedQRCode)
{
if (ResourceQRCode.isTypeMatching(scannedQRCode))
{
return getExternalSystemChildConfigId(ResourceQRCode.ofGlobalQRCode(scannedQRCode));
}
else if (ExternalSystemConfigQRCode.isTypeMatc... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\callExternalSystem\CallExternalSystemActivityHandler.java | 1 |
请完成以下Java代码 | protected void prepare()
{
}
@Override
protected String doIt() throws Exception
{
String whereClause = I_C_Location.COLUMNNAME_IsPostalValidated + "=?";
Iterator<I_C_Location> it = new Query(getCtx(), I_C_Location.Table_Name, whereClause, null)
.setParameters(false)
.setRequiredAccess(Access.WRITE)
... | return "@Updated@ OK/Error/Total = " + cnt_ok + "/" + cnt_err + "/" + cnt_all;
}
private void validate(I_C_Location location)
{
try
{
Services.get(ILocationBL.class).validatePostal(location);
InterfaceWrapperHelper.save(location);
cnt_ok++;
}
catch (Exception e)
{
addLog("Error on " + location... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\process\C_Location_Postal_Validate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable List<String> getIgnorePaths() {
return this.ignorePaths;
}
public void setIgnorePaths(@Nullable List<String> ignorePaths) {
this.ignorePaths = ignorePaths;
}
/**
* Log format for Jetty access logs.
*/
public enum Format {
/**
* NCSA format, as defined in CustomRequestLog... | }
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;
... | repos\spring-boot-4.0.1\module\spring-boot-jetty\src\main\java\org\springframework\boot\jetty\autoconfigure\JettyServerProperties.java | 2 |
请完成以下Java代码 | public ReturnsInOutHeaderFiller setWarehouseId(final int warehouseId)
{
this.warehouseId = warehouseId;
return this;
}
private int getWarehouseId()
{
return warehouseId;
}
public ReturnsInOutHeaderFiller setOrder(@Nullable final I_C_Order order)
{
this.order = order;
return this;
}
private I_C_Ord... | }
private String getExternalResourceURL()
{
return this.externalResourceURL;
}
public ReturnsInOutHeaderFiller setExternalResourceURL(@Nullable final String externalResourceURL)
{
this.externalResourceURL = externalResourceURL;
return this;
}
public ReturnsInOutHeaderFiller setDateReceived(@Nullable fin... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inout\returns\ReturnsInOutHeaderFiller.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isStop() {
return isStop;
}
public void setStop(boolean stop) {
isStop = stop;
}
public OrderProcessReq getOrderProcessReq() {
return orderProcessReq;
}
public void setOrderProcessReq(OrderProcessReq orderProcessReq) {
this.orderProcessReq = orde... | }
public void setOrderProcessRsp(T orderProcessRsp) {
this.orderProcessRsp = orderProcessRsp;
}
@Override
public String toString() {
return "OrderProcessContext{" +
"isStop=" + isStop +
", orderProcessReq=" + orderProcessReq +
", orderPro... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\context\OrderProcessContext.java | 2 |
请完成以下Java代码 | public void setEntityType (String EntityType)
{
set_Value (COLUMNNAME_EntityType, EntityType);
}
/** Get Entity Type.
@return Dictionary Entity Type; Determines ownership and synchronization
*/
public String getEntityType ()
{
return (String)get_Value(COLUMNNAME_EntityType);
}
/** ReplicationType AD... | public I_EXP_Format getEXP_Format() throws RuntimeException
{
return (I_EXP_Format)MTable.get(getCtx(), I_EXP_Format.Table_Name)
.getPO(getEXP_Format_ID(), get_TrxName());
}
public void setEXP_Format_ID (int EXP_Format_ID)
{
if (EXP_Format_ID < 1)
set_ValueNoCheck (COLUMNNAME_EXP_Format_ID, null);
e... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_ReplicationTable.java | 1 |
请完成以下Java代码 | public static void checkAccountAndIpLock(BladeRedis bladeRedis, String tenantId, String account) {
String ip = WebUtil.getIP();
// 检查账号锁定
int userFailCount = Func.toInt(bladeRedis.get(CacheNames.tenantKey(tenantId, CacheNames.USER_FAIL_KEY, account)), 0);
if (userFailCount >= FAIL_COUNT) {
throw new Service... | }
/**
* 处理登录成功,清除失败缓存
*
* @param bladeRedis Redis缓存
* @param tenantId 租户ID
* @param account 账号
*/
public static void handleLoginSuccess(BladeRedis bladeRedis, String tenantId, String account) {
String ip = WebUtil.getIP();
// 清除账号登录失败缓存
bladeRedis.del(CacheNames.tenantKey(tenantId, CacheNames... | repos\SpringBlade-master\blade-auth\src\main\java\org\springblade\auth\utils\TokenUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
// 配置规则.
initFlowRules();
/*while (true) {
// 1.5.0 版本开始可以直接利用 try-with-resources 特性
try (Entry entry = SphU.entry("HelloWorld")) {
// 被保护的逻辑
Thread.sleep(300);
System... | }*/
}
private static void initFlowRules(){
List<FlowRule> rules = new ArrayList<>();
FlowRule rule = new FlowRule();
rule.setResource("HelloWorld");
rule.setGrade(RuleConstant.FLOW_GRADE_QPS);
// Set limit QPS to 20.
rule.setCount(2);
rules.add(rule);
FlowRuleManager.loadRules(rules);
}
} | repos\springboot-demo-master\sentinel\src\main\java\com\et\sentinel\DemoApplication.java | 2 |
请完成以下Java代码 | public class MAdvertisement extends X_W_Advertisement
{
/**
*
*/
private static final long serialVersionUID = 8129122675267734690L;
/**
* Default Constructor
* @param ctx context
* @param W_Advertisement_ID id
* @param trxName transaction
*/
public MAdvertisement (Properties ctx, int W_Advertiseme... | if (m_clickCount != null)
{
m_clickCount.setTargetURL(TargetURL);
m_clickCount.save(get_TrxName());
}
} // getClickTargetURL
/**
* Get Weekly Count
* @return weekly count
*/
public ValueNamePair[] getClickCountWeek ()
{
getMClickCount();
if (m_clickCount == null)
return new ValueNamePair... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MAdvertisement.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Mono<Boolean> blockingSearch(String fileName, String searchTerm) {
String fileContent = fileService.getFileContentAsString(fileName)
.doOnNext(content -> ThreadLogger.log("1. BlockingSearch"))
.block();
boolean isSearchTermPresent = fileContent.contains(searchTerm);
... | .map(s -> fileService.getFileContentAsString(fileName)
.block()
.contains(searchTerm))
.doOnNext(s -> ThreadLogger.log("3. BlockingSearchOnCustomThreadPool"));
}
public Mono<Boolean> blockingSearchOnParallelThreadPool(String fileName, String searchTerm) {
ret... | repos\tutorials-master\spring-reactive-modules\spring-reactive-4\src\main\java\com\baeldung\webflux\block\service\FileContentSearchService.java | 2 |
请完成以下Java代码 | public boolean isDetached() {
return userTask.getExecutionId() == null;
}
@Override
public void detachState() {
userTask.getExecution().removeTask(userTask);
userTask.setExecution(null);
}
@Override
public void attachState(MigratingScopeInstance owningInstance) {
ExecutionEntity representa... | migrateHistory();
}
protected void migrateHistory() {
HistoryLevel historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
if (historyLevel.isHistoryEventProduced(HistoryEventTypes.TASK_INSTANCE_MIGRATE, this)) {
HistoryEventProcessor.processHistoryEvents(new HistoryEventProcessor.... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingUserTaskInstance.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected final boolean isSslEnabled() {
return getProperties().getSsl().isEnabled();
}
protected final boolean urlUsesSsl(String url) {
return DataRedisUrl.of(url).useSsl();
}
protected boolean isPoolEnabled(Pool pool) {
Boolean enabled = pool.getEnabled();
return (enabled != null) ? enabled : COMMONS_PO... | }
private Mode determineMode() {
if (getSentinelConfig() != null) {
return Mode.SENTINEL;
}
if (getClusterConfiguration() != null) {
return Mode.CLUSTER;
}
if (getMasterReplicaConfiguration() != null) {
return Mode.MASTER_REPLICA;
}
return Mode.STANDALONE;
}
enum Mode {
STANDALONE, CLUSTE... | repos\spring-boot-4.0.1\module\spring-boot-data-redis\src\main\java\org\springframework\boot\data\redis\autoconfigure\DataRedisConnectionConfiguration.java | 2 |
请完成以下Java代码 | public void assertQtyToIssueToleranceIsRespected()
{
assertQtyToIssueToleranceIsRespected_LowerBound(qtyIssuedOrReceivedActual);
assertQtyToIssueToleranceIsRespected_UpperBound(qtyIssuedOrReceivedActual);
}
private void assertQtyToIssueToleranceIsRespected_LowerBound(final Quantity qtyIssuedOrReceivedActual)
{... | .appendQty(qtyIssuedOrReceivedActualMax.toBigDecimal(), qtyIssuedOrReceivedActualMax.getUOMSymbol())
.append(" (")
.appendQty(qtyRequired.toBigDecimal(), qtyRequired.getUOMSymbol())
.append(" + ")
.append(issuingToleranceSpec.toTranslatableString())
.append(")")
.build();
throw new Adem... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\pporder\OrderBOMLineQuantities.java | 1 |
请完成以下Java代码 | private void setMemInfo(GlobalMemory memory) {
mem.setTotal(memory.getTotal());
mem.setUsed(memory.getTotal() - memory.getAvailable());
mem.setFree(memory.getAvailable());
}
/**
* 设置服务器信息
*/
private void setSysInfo() {
Properties props = System.getProperties();
... | long free = fs.getUsableSpace();
long total = fs.getTotalSpace();
long used = total - free;
SysFile sysFile = new SysFile();
sysFile.setDirName(fs.getMount());
sysFile.setSysTypeName(fs.getType());
sysFile.setTypeName(fs.getName());
sys... | repos\spring-boot-demo-master\demo-websocket\src\main\java\com\xkcoding\websocket\model\Server.java | 1 |
请完成以下Java代码 | public ITrxListenerManager getTrxListenerManager()
{
throw new UnsupportedOperationException();
}
@Override
public ITrxManager getTrxManager()
{
throw new UnsupportedOperationException();
}
@Override
public <T> T setProperty(final String name, final Object value)
{
throw new UnsupportedOperationExcept... | {
throw new UnsupportedOperationException();
}
@Override
public <T> T getProperty(final String name, final Function<ITrx, T> valueInitializer)
{
throw new UnsupportedOperationException();
}
@Override
public <T> T setAndGetProperty(final String name, final Function<T, T> valueRemappingFunction)
{
throw n... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\api\NullTrxPlaceholder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
SysUser sysUser = sysUserRepository.findFirstByUsername(username).orElseThrow(() -> new UsernameNotFoundException("User not found!"));
List<SimpleGrantedAuthority> roles = sysUser.getRoles().stream().map(sysRole ->... | @Override
public void updateUser(SysUser sysUser) {
sysUser.setPassword(null);
sysUserRepository.save(sysUser);
}
@Override
public void updatePassword(Long id, String password) {
SysUser exist = findById(id);
exist.setPassword(passwordEncoder.encode(password));
s... | repos\spring-boot-demo-master\demo-oauth\oauth-authorization-server\src\main\java\com\xkcoding\oauth\service\impl\SysUserServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getStateOrProvince()
{
return stateOrProvince;
}
public void setStateOrProvince(String stateOrProvince)
{
this.stateOrProvince = stateOrProvince;
}
@Override
public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
retur... | public String toString()
{
StringBuilder sb = new StringBuilder();
sb.append("class TaxAddress {\n");
sb.append(" city: ").append(toIndentedString(city)).append("\n");
sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n");
sb.append(" postalCode: ").append(toIndentedString(p... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\TaxAddress.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Job deciderJob() {
return jobBuilderFactory.get("deciderJob")
.start(step1())
.next(myDecider)
.from(myDecider).on("weekend").to(step2())
.from(myDecider).on("workingDay").to(step3())
.from(step3()).on("*").to(step4())
... | }).build();
}
private Step step3() {
return stepBuilderFactory.get("step3")
.tasklet((stepContribution, chunkContext) -> {
System.out.println("执行步骤三操作。。。");
return RepeatStatus.FINISHED;
}).build();
}
private Step step4()... | repos\SpringAll-master\67.spring-batch-start\src\main\java\cc\mrbird\batch\job\DeciderJobDemo.java | 2 |
请完成以下Java代码 | public void exportJob(HttpServletResponse response, JobQueryCriteria criteria) throws IOException {
jobService.download(jobService.queryAll(criteria), response);
}
@ApiOperation("查询岗位")
@GetMapping
@PreAuthorize("@el.check('job:list','user:list')")
public ResponseEntity<PageResult<JobDto>> ... | @ApiOperation("修改岗位")
@PutMapping
@PreAuthorize("@el.check('job:edit')")
public ResponseEntity<Object> updateJob(@Validated(Job.Update.class) @RequestBody Job resources){
jobService.update(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Log("删除岗位")
@ApiOperati... | repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\rest\JobController.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @ResponseBody byte[] getImage() throws IOException {
final InputStream in = getClass().getResourceAsStream("/com/baeldung/produceimage/image.jpg");
return IOUtils.toByteArray(in);
}
@GetMapping(value = "/get-image-with-media-type", produces = MediaType.IMAGE_JPEG_VALUE)
public @Respo... | final InputStream in = jpg ?
getClass().getResourceAsStream("/com/baeldung/produceimage/image.jpg") :
getClass().getResourceAsStream("/com/baeldung/produceimage/image.png");
return ResponseEntity.ok()
.contentType(contentType)
.body(new InputStream... | repos\tutorials-master\spring-boot-modules\spring-boot-mvc\src\main\java\com\baeldung\produceimage\controller\DataProducerController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class ProductPriceId implements RepoIdAware
{
@JsonCreator
public static ProductPriceId ofRepoId(final int repoId)
{
return new ProductPriceId(repoId);
}
public static ProductPriceId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? ofRepoId(repoId) : null;
}
int repoId;
private ProductPrice... | this.repoId = Check.assumeGreaterThanZero(repoId, "M_ProductPrice_ID");
}
public static int toRepoId(final ProductPriceId id)
{
return id != null ? id.getRepoId() : -1;
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\ProductPriceId.java | 2 |
请完成以下Java代码 | public String toString()
{
final StringBuilder sb = new StringBuilder("MIssue[");
sb.append(get_ID())
.append("-").append(getIssueSummary())
.append(",Record=").append(getRecord_ID())
.append("]");
return sb.toString();
}
@Override
public void setIssueSummary(String IssueSummary)
{
final int m... | {
if (string == null || string.isEmpty())
{
return string;
}
String stringNorm = string;
stringNorm = stringNorm.replace("java.lang.", "");
stringNorm = stringNorm.replace("java.sql.", "");
// Truncate the string if necessary
if (maxLength > 0 && stringNorm.length() > maxLength)
{
stringNorm =... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MIssue.java | 1 |
请完成以下Java代码 | public void execute(JobExecutionContext context) {
//获取当前时间5个月前的时间
// 获取当前日期
Calendar calendar = Calendar.getInstance();
// 减去5个月
calendar.add(Calendar.MONTH, -5);
// 格式化输出
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
String formattedDate = s... | }
}
/**
* 发送系统消息
*/
private void sendSysMessage(String username, String realname) {
String fromUser = "system";
String title = "尊敬的"+realname+"您的密码已经5个月未修改了,请修改密码";
MessageDTO messageDTO = new MessageDTO(fromUser, username, title, title);
messageDTO.setNoticeT... | repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\job\UserUpadtePwdJob.java | 1 |
请完成以下Java代码 | private long getNextLongInRange(Range<Long> range) {
OptionalLong first = getSource().longs(1, range.getMin(), range.getMax()).findFirst();
assertPresent(first.isPresent(), range);
return first.getAsLong();
}
private void assertPresent(boolean present, Range<?> range) {
Assert.state(present, () -> "Could not... | private Range(String value, T min, T max) {
this.value = value;
this.min = min;
this.max = max;
}
T getMin() {
return this.min;
}
T getMax() {
return this.max;
}
@Override
public String toString() {
return this.value;
}
static <T extends Number & Comparable<T>> Range<T> of(String... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\env\RandomValuePropertySource.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AdTableId implements RepoIdAware
{
@JsonCreator
public static AdTableId ofRepoId(final int repoId)
{
return new AdTableId(repoId);
}
@Nullable
public static AdTableId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new AdTableId(repoId) : null;
}
public static int toRepoId(@Nullable f... | {
this.repoId = Check.assumeGreaterThanZero(repoId, "AD_Table_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
public static boolean equals(@Nullable final AdTableId o1, @Nullable final AdTableId o2)
{
return Objects.equals(o1, o2);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\table\api\AdTableId.java | 2 |
请完成以下Java代码 | public DataFetcherResult<UserResult> createUser(@InputArgument("input") CreateUserInput input) {
RegisterParam registerParam =
new RegisterParam(input.getEmail(), input.getUsername(), input.getPassword());
User user;
try {
user = userService.createUser(registerParam);
} catch (ConstraintVi... | || authentication.getPrincipal() == null) {
return null;
}
io.spring.core.user.User currentUser = (io.spring.core.user.User) authentication.getPrincipal();
UpdateUserParam param =
UpdateUserParam.builder()
.username(updateUserInput.getUsername())
.email(updateUserInput.... | repos\spring-boot-realworld-example-app-master\src\main\java\io\spring\graphql\UserMutation.java | 1 |
请完成以下Java代码 | public class UpdateProcessInstancesSuspendStateBatchConfigurationJsonConverter
extends AbstractBatchConfigurationObjectConverter<UpdateProcessInstancesSuspendStateBatchConfiguration> {
public static final UpdateProcessInstancesSuspendStateBatchConfigurationJsonConverter INSTANCE = new UpdateProcessInstancesSuspe... | @Override
public UpdateProcessInstancesSuspendStateBatchConfiguration readConfiguration(JsonObject json) {
UpdateProcessInstancesSuspendStateBatchConfiguration configuration =
new UpdateProcessInstancesSuspendStateBatchConfiguration(readProcessInstanceIds(json), readMappings(json),
JsonUtil.getBoo... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\update\UpdateProcessInstancesSuspendStateBatchConfigurationJsonConverter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class ScheduledQuantity {
@XmlValue
protected BigDecimal value;
@XmlAttribute(name = "Date", namespace = "http://erpel.at/schemas/1p0/documents/extensions/edifact")
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar date;
/**
* Gets ... | * @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getDate() {
return date;
}
/**
* Sets the value of the date property.
*
* @param value
* allowed ... | 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\ORDERSListLineItemExtensionType.java | 2 |
请完成以下Java代码 | public static Date getLastMonthStartDay() {
return DateUtil.beginOfMonth(DateUtil.lastMonth());
}
/**
* 获得上月最后一天 23:59:59
*/
public static Date getLastMonthEndDay() {
return DateUtil.endOfMonth(DateUtil.lastMonth());
}
/**
* 获得上周第一天 周一 00:00:00
*/
public sta... | * 昨天开始时间
*
* @return
*/
public static Date getYesterdayStartTime() {
Calendar calendar = Calendar.getInstance();
calendar.setTime(new Date());
calendar.add(Calendar.DATE, -1);
return DateUtil.beginOfDay(calendar.getTime());
}
/**
* 昨天结束时间
*
* @r... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\DateRangeUtils.java | 1 |
请完成以下Java代码 | public int getPP_Product_Planning_ID()
{
return get_ValueAsInt(COLUMNNAME_PP_Product_Planning_ID);
}
@Override
public void setQtyProcessed_OnDate (final @Nullable BigDecimal QtyProcessed_OnDate)
{
set_Value (COLUMNNAME_QtyProcessed_OnDate, QtyProcessed_OnDate);
}
@Override
public BigDecimal getQtyProcess... | public void setWorkingTime (final @Nullable BigDecimal WorkingTime)
{
set_Value (COLUMNNAME_WorkingTime, WorkingTime);
}
@Override
public BigDecimal getWorkingTime()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_WorkingTime);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Product_Planning.java | 1 |
请完成以下Java代码 | public Date getCreateTime() {
return createTime;
}
public Date getRemovalTime() {
return removalTime;
}
public String getRootProcessInstanceId() {
return rootProcessInstanceId;
}
public static HistoricDecisionInputInstanceDto fromHistoricDecisionInputInstance(HistoricDecisionInputInstance his... | dto.createTime = historicDecisionInputInstance.getCreateTime();
dto.removalTime = historicDecisionInputInstance.getRemovalTime();
dto.rootProcessInstanceId = historicDecisionInputInstance.getRootProcessInstanceId();
if(historicDecisionInputInstance.getErrorMessage() == null) {
VariableValueDto.fromTy... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricDecisionInputInstanceDto.java | 1 |
请完成以下Java代码 | public int getC_BPartner_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_BPartner_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_C_Withholding getC_Withholding() throws RuntimeException
{
return (I_C_Withholding)MTable.get(getCtx(), I_C_Withholding.Table_Name)
.getPO(getC_W... | public void setIsMandatoryWithholding (boolean IsMandatoryWithholding)
{
set_Value (COLUMNNAME_IsMandatoryWithholding, Boolean.valueOf(IsMandatoryWithholding));
}
/** Get Mandatory Withholding.
@return Monies must be withheld
*/
public boolean isMandatoryWithholding ()
{
Object oo = get_Value(COLUMNNAME... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BP_Withholding.java | 1 |
请完成以下Java代码 | public void addAccessToRolesWithAutomaticMaintenance(final I_AD_Org org)
{
final ClientId orgClientId = ClientId.ofRepoId(org.getAD_Client_ID());
int orgAccessCreatedCounter = 0;
final IUserRolePermissionsDAO permissionsDAO = Services.get(IUserRolePermissionsDAO.class);
for (final Role role : Services.get(IRo... | continue;
}
final OrgId orgId = OrgId.ofRepoId(org.getAD_Org_ID());
permissionsDAO.createOrgAccess(role.getId(), orgId);
orgAccessCreatedCounter++;
}
logger.info("{} - created #{} role org access entries", org, orgAccessCreatedCounter);
// Reset role permissions, just to make sure we are on the safe... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\model\interceptor\AD_Org.java | 1 |
请完成以下Java代码 | public void setDurationMillis (final int DurationMillis)
{
set_Value (COLUMNNAME_DurationMillis, DurationMillis);
}
@Override
public int getDurationMillis()
{
return get_ValueAsInt(COLUMNNAME_DurationMillis);
}
@Override
public void setLevel (final java.lang.String Level)
{
set_ValueNoCheck (COLUMNNAM... | public int getSource_Record_ID()
{
return get_ValueAsInt(COLUMNNAME_Source_Record_ID);
}
@Override
public void setSource_Table_ID (final int Source_Table_ID)
{
if (Source_Table_ID < 1)
set_Value (COLUMNNAME_Source_Table_ID, null);
else
set_Value (COLUMNNAME_Source_Table_ID, Source_Table_ID);
}
@... | 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 List<HistoricProcessInstanceQueryImpl> getOrQueryObjects() {
return orQueryObjects;
}
public IdentityLinkQueryObject getInvolvedUserIdentityLink() {
return involvedUserIdentityLink;
}
public IdentityLinkQueryObject getInvolvedGroupIdentityLink() {
return involvedGroupIde... | 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 static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(ResourceRole.class, BPMN_ELEMENT_RESOURCE_ROLE)
.namespaceUri(BPMN20_NS)
.extendsType(BaseElement.class)
.instanceProvider(new ModelTypeInstanceProvider<ResourceRole>() {
... | }
public String getName() {
return nameAttribute.getValue(this);
}
public void setName(String name) {
nameAttribute.setValue(this, name);
}
public Resource getResource() {
return resourceRefChild.getReferenceTargetElement(this);
}
public void setResource(Resource resource) {
resourceRe... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ResourceRoleImpl.java | 1 |
请完成以下Java代码 | public void setFaxNb(String value) {
this.faxNb = value;
}
/**
* Gets the value of the emailAdr property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getEmailAdr() {
return emailAdr;
}
/**
* Sets the va... | * {@link String }
*
*/
public String getOthr() {
return othr;
}
/**
* Sets the value of the othr property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOthr(String value) {
this.othr = valu... | 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\ContactDetails2.java | 1 |
请完成以下Java代码 | public class OperationMethod {
private static final ParameterNameDiscoverer DEFAULT_PARAMETER_NAME_DISCOVERER = new DefaultParameterNameDiscoverer();
private final Method method;
private final OperationType operationType;
private final OperationParameters operationParameters;
/**
* Create a new {@link Opera... | /**
* Return the operation type.
* @return the operation type
*/
public OperationType getOperationType() {
return this.operationType;
}
/**
* Return the operation parameters.
* @return the operation parameters
*/
public OperationParameters getParameters() {
return this.operationParameters;
}
@Ov... | repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\invoke\reflect\OperationMethod.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ProfileVO getProfile(User me, String targetUsername) {
return this.getProfile(me, findUserByUsername(targetUsername));
}
@Transactional(readOnly = true)
public ProfileVO getProfile(User me, User target) {
return new ProfileVO(me, target);
}
@Transactional
public ProfileV... | @Transactional
public ProfileVO unfollow(User me, String targetUsername) {
return this.unfollow(me, findUserByUsername(targetUsername));
}
@Transactional
public ProfileVO unfollow(User me, User target) {
return me.unfollow(target);
}
private User findUserByUsername(String usern... | repos\realworld-spring-boot-native-master\src\main\java\com\softwaremill\realworld\application\user\service\ProfileService.java | 2 |
请完成以下Java代码 | public StopCommand getCommand() {
return this.command;
}
public void setCommand(StopCommand command) {
this.command = command;
}
public Duration getTimeout() {
return this.timeout;
}
public void setTimeout(Duration timeout) {
this.timeout = timeout;
}
public List<String> getArguments() {... | public Tcp getTcp() {
return this.tcp;
}
/**
* Readiness wait strategies.
*/
public enum Wait {
/**
* Always perform readiness checks.
*/
ALWAYS,
/**
* Never perform readiness checks.
*/
NEVER,
/**
* Only perform readiness checks if docker was started with lifecycle... | repos\spring-boot-4.0.1\core\spring-boot-docker-compose\src\main\java\org\springframework\boot\docker\compose\lifecycle\DockerComposeProperties.java | 1 |
请完成以下Java代码 | public String getCompletionCondition() {
return completionCondition;
}
public void setCompletionCondition(String completionCondition) {
this.completionCondition = completionCondition;
}
public String getElementVariable() {
return elementVariable;
}
public void setEleme... | return outputDataItem;
}
public void setOutputDataItem(String outputDataItem) {
this.outputDataItem = outputDataItem;
}
public MultiInstanceLoopCharacteristics clone() {
MultiInstanceLoopCharacteristics clone = new MultiInstanceLoopCharacteristics();
clone.setValues(this);
... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\MultiInstanceLoopCharacteristics.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getAMOUNTQUAL() {
return amountqual;
}
/**
* Sets the value of the amountqual property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setAMOUNTQUAL(String value) {
this.amountqual = value;
}
/*... | */
public void setAMOUNT(String value) {
this.amount = value;
}
/**
* Gets the value of the currency property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCURRENCY() {
return currency;
}
/**
* Se... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DAMOU1.java | 2 |
请完成以下Java代码 | public LocatorScannedCodeResolverResult resolve(@NonNull final ScannedCode scannedCode)
{
return resolve(LocatorScannedCodeResolverRequest.ofScannedCode(scannedCode));
}
public LocatorScannedCodeResolverResult resolve(@NonNull LocatorScannedCodeResolverRequest request)
{
final ScannedCode scannedCode = request... | {
final ImmutableList<LocatorQRCode> locatorQRCodes = warehouseBL.getActiveLocatorsByValue(scannedCode.getAsString())
.stream()
.map(LocatorQRCode::ofLocator)
.filter(context::isMatching)
.distinct()
.collect(ImmutableList.toImmutableList());
if (locatorQRCodes.isEmpty())
{
return LocatorS... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\warehouse\qrcode\resolver\LocatorScannedCodeResolverService.java | 1 |
请完成以下Java代码 | final class AllergenMap
{
private final ImmutableMap<AllergenId, Allergen> byId;
public AllergenMap(@NonNull final List<Allergen> list)
{
byId = Maps.uniqueIndex(list, Allergen::getId);
}
public ImmutableList<Allergen> getByIds(@NonNull final Collection<AllergenId> ids)
{
if (ids.isEmpty())
{
return Im... | return ids.stream()
.map(this::getById)
.collect(ImmutableList.toImmutableList());
}
public Allergen getById(@NonNull final AllergenId id)
{
final Allergen Allergen = byId.get(id);
if (Allergen == null)
{
throw new AdempiereException("No Hazard Symbol found for " + id);
}
return Allergen;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\allergen\AllergenMap.java | 1 |
请完成以下Java代码 | public void setUsernameBasedPrimaryKey(boolean usernameBasedPrimaryKey) {
this.usernameBasedPrimaryKey = usernameBasedPrimaryKey;
}
protected boolean isUsernameBasedPrimaryKey() {
return this.usernameBasedPrimaryKey;
}
/**
* Allows the default query string used to retrieve users based on username to be
* ... | /**
* Enables support for group authorities. Defaults to false
* @param enableGroups
*/
public void setEnableGroups(boolean enableGroups) {
this.enableGroups = enableGroups;
}
@Override
public void setMessageSource(MessageSource messageSource) {
Assert.notNull(messageSource, "messageSource cannot be null... | repos\spring-security-main\core\src\main\java\org\springframework\security\core\userdetails\jdbc\JdbcDaoImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getWeight() {
return weight;
}
public void setWeight(String weight) {
this.weight = weight;
}
public String getTopCateEntityID() {
return topCateEntityID;
}
public void setTopCateEntityID(String topCateEntityID) {
this.topCateEntityID = topCateEnt... | }
public String getCompanyEntityID() {
return companyEntityID;
}
public void setCompanyEntityID(String companyEntityID) {
this.companyEntityID = companyEntityID;
}
@Override
public String toString() {
return "ProdInsertReq{" +
"id='" + id + '\'' +
... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\product\ProdInsertReq.java | 2 |
请完成以下Java代码 | public java.lang.String getUserID ()
{
return (java.lang.String)get_Value(COLUMNNAME_UserID);
}
/**
* Version AD_Reference_ID=540904
* Reference name: MSV3_Version
*/
public static final int VERSION_AD_Reference_ID=540904;
/** 1 = 1 */
public static final String VERSION_1 = "1";
/** 2 = 2 */
public s... | @Override
public void setVersion (java.lang.String Version)
{
set_Value (COLUMNNAME_Version, Version);
}
/** Get Version.
@return Version of the table definition
*/
@Override
public java.lang.String getVersion ()
{
return (java.lang.String)get_Value(COLUMNNAME_Version);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_Vendor_Config.java | 1 |
请完成以下Java代码 | public Optional<ProductId> getProductIdByEAN13(@NonNull final EAN13 ean13) {return getProductIdByEAN13(ean13, null, ClientId.METASFRESH);}
@Override
public Optional<ProductId> getProductIdByEAN13(@NonNull final EAN13 ean13, @Nullable final BPartnerId bpartnerId, @NonNull final ClientId clientId)
{
return getProdu... | }
@Override
public boolean isExistingValue(@NonNull final String value, @NonNull final ClientId clientId)
{
return productsRepo.isExistingValue(value, clientId);
}
@Override
public void setProductCodeFieldsFromGTIN(@NonNull final I_M_Product record, @Nullable final GTIN gtin)
{
record.setGTIN(gtin != null ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\impl\ProductBL.java | 1 |
请完成以下Java代码 | public void receiveConfigInfo(String configInfo) {
log.info("进行网关更新:\n\r{}", configInfo);
List<MyRouteDefinition> definitionList = JSON.parseArray(configInfo, MyRouteDefinition.class);
for (MyRouteDefinition definition : definitionList) {
... | Properties properties = new Properties();
properties.setProperty("serverAddr", gatewayRoutersConfig.getServerAddr());
if(StringUtils.isNotBlank(gatewayRoutersConfig.getNamespace())){
properties.setProperty("namespace", gatewayRoutersConfig.getNamespace());
}
... | repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-cloud-gateway\src\main\java\org\jeecg\loader\DynamicRouteLoader.java | 1 |
请完成以下Java代码 | public Flux<?> receiveMessagesFromTopic(@PathVariable String name) {
DestinationsConfig.DestinationInfo d = destinationsConfig.getTopics()
.get(name);
if (d == null) {
return Flux.just(ResponseEntity.notFound()
.build());
}
Queue topicQueue = cr... | amqpAdmin.deleteQueue(qname);
mlc.stop();
});
log.info("[I171] Container started, queue={}", qname);
});
return Flux.interval(Duration.ofSeconds(5))
.map(v -> {
log.info("[I209] sending keepalive message...");
... | repos\tutorials-master\spring-reactive-modules\spring-webflux-amqp\src\main\java\com\baeldung\spring\amqp\AmqpReactiveController.java | 1 |
请完成以下Java代码 | private boolean shouldTriggerRefresh(ApplicationEvent event) {
String className = event.getClass().getName();
if (!eventTriggersCache.containsKey(className)) {
eventTriggersCache.put(className, eventClasses.stream().anyMatch(clazz -> this.isAssignable(clazz, event)));
}
retur... | } else if (propertySource instanceof EncryptablePropertySource) {
EncryptablePropertySource eps = (EncryptablePropertySource) propertySource;
eps.refresh();
}
}
private Class<?> getClassSafe(String className) {
try {
return ClassUtils.forName(className, null)... | repos\jasypt-spring-boot-master\jasypt-spring-boot\src\main\java\com\ulisesbocchio\jasyptspringboot\caching\RefreshScopeRefreshedEventListener.java | 1 |
请完成以下Java代码 | public void stop() {
this.state = "stop";
}
public void fuel() {
Assert.state(this.state.equals("stop"), "car must be stopped");
// ...
}
public void fuelwithSupplier() {
Assert.state(this.state.equals("stop"), () -> "car must be stopped");
// ...
}
pub... | }
public static void main(String[] args) {
Car car = new Car();
car.drive(50);
car.stop();
car.fuel();
car.сhangeOil("oil");
CarBattery carBattery = new CarBattery();
car.replaceBattery(carBattery);
car.сhangeEngine(new ToyotaEngine());
... | repos\tutorials-master\spring-5\src\main\java\com\baeldung\assertions\Car.java | 1 |
请完成以下Java代码 | public OrderFactory dateOrdered(final LocalDate dateOrdered)
{
assertNotBuilt();
order.setDateOrdered(TimeUtil.asTimestamp(dateOrdered));
return this;
}
public OrderFactory datePromised(final ZonedDateTime datePromised)
{
assertNotBuilt();
order.setDatePromised(TimeUtil.asTimestamp(datePromised));
retu... | }
public OrderFactory pricingSystemId(@NonNull final PricingSystemId pricingSystemId)
{
assertNotBuilt();
order.setM_PricingSystem_ID(pricingSystemId.getRepoId());
return this;
}
public OrderFactory poReference(@Nullable final String poReference)
{
assertNotBuilt();
order.setPOReference(poReference);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\OrderFactory.java | 1 |
请完成以下Java代码 | public void setPP_Plant_From_ID(final I_DD_OrderLine ddOrderLine)
{
ResourceId plantFromId = ddOrderLowLevelService.findPlantFromOrNull(ddOrderLine);
//
// If no plant was found for "Warehouse From" we shall use the Destination Plant.
//
// Example when applies: MRP generated a DD order to move materials fr... | /**
* @implSpec task http://dewiki908/mediawiki/index.php/08583_Erfassung_Packvorschrift_in_DD_Order_ist_crap_%28108882381939%29
* ("UOM In manual DD_OrderLine shall always be the uom of the product ( as talked with Mark) ")
*/
@ModelChange(
timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFO... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddorder\lowlevel\interceptor\DD_OrderLine.java | 1 |
请完成以下Java代码 | public int getAD_User_SortPref_Line_Product_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_SortPref_Line_Product_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.compiere.model.I_M_Product getM_Product() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_... | @return Produkt, Leistung, Artikel
*/
@Override
public int getM_Product_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Reihenfolge.
@param SeqNo
Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuer... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_User_SortPref_Line_Product.java | 1 |
请完成以下Java代码 | public void setFunctionSuffix (String FunctionSuffix)
{
set_Value (COLUMNNAME_FunctionSuffix, FunctionSuffix);
}
/** Get Function Suffix.
@return Data sent after the function
*/
public String getFunctionSuffix ()
{
return (String)get_Value(COLUMNNAME_FunctionSuffix);
}
/** Set XY Position.
@param I... | /** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set XY Separator.
@param XYSeparator
The separator between the X and Y function.
*/
public void setXYSeparator (String XYSepar... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_LabelPrinterFunction.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected void validateMaxSumDataSizePerTenant(TenantId tenantId,
TenantEntityWithDataDao dataDao,
long maxSumDataSize,
long currentDataSize,
... | }
}
protected static void validateQueueTopic(String topic) {
validateQueueNameOrTopic(topic, TOPIC);
}
static void validateQueueNameOrTopic(String value, String fieldName) {
if (StringUtils.isEmpty(value) || value.trim().length() == 0) {
throw new DataValidationException(St... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\service\DataValidator.java | 2 |
请完成以下Java代码 | public class X_MD_Available_For_Sales extends org.compiere.model.PO implements I_MD_Available_For_Sales, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = -1044122981L;
/** Standard Constructor */
public X_MD_Available_For_Sales (final Properties ctx, final int MD_Available_For_... | {
set_Value (COLUMNNAME_QtyOnHandStock, QtyOnHandStock);
}
@Override
public BigDecimal getQtyOnHandStock()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyOnHandStock);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyToBeShipped (final @Nullable BigDecimal QtyToBeShip... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MD_Available_For_Sales.java | 1 |
请完成以下Java代码 | public BigDecimal getMinAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MinAmt);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.... | BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Percent);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Threshold max.
@param ThresholdMax
Maximum gross amount for withholding calculation (0=no limit)
*/
public void setThresholdMax (BigDecimal ThresholdMax)
{
set_Value (COLUMNNAME_Thres... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Withholding.java | 1 |
请完成以下Java代码 | private IMaterialTrackingQuery asMaterialTrackingQuery(@NonNull final ProductAndBPartner productAndBPartner)
{
return materialTrackingDAO.createMaterialTrackingQuery()
.setProcessed(false) // only show "open" trackings
.setReturnReadOnlyRecords(true) // we are not going to alter our cached records
.setM_... | }
@Override
public AttributeValueId getAttributeValueIdOrNull(final Object valueKey)
{
return null;
}
/**
* @return {@code null}.
*/
@Override
public NamePair getNullValue() {return null;}
@Override
public boolean isHighVolume() {return isHighVolume;}
@Override
public String getCachePrefix()
{
r... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\materialtracking\spi\impl\attribute\MaterialTrackingAttributeValuesProvider.java | 1 |
请完成以下Java代码 | public class DeleteHistoricDecisionInstancesBatchCmd implements Command<Batch> {
protected List<String> historicDecisionInstanceIds;
protected HistoricDecisionInstanceQuery historicDecisionInstanceQuery;
protected String deleteReason;
public DeleteHistoricDecisionInstancesBatchCmd(List<String> ids,
... | HistoricDecisionInstanceQueryImpl query = new HistoricDecisionInstanceQueryImpl();
query.decisionInstanceIdIn(historicDecisionInstanceIds.toArray(new String[0]));
elementConfiguration.addDeploymentMappings(
commandContext.runWithoutAuthorization(query::listDeploymentIdMappings), historicDecisionIn... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\cmd\DeleteHistoricDecisionInstancesBatchCmd.java | 1 |
请完成以下Java代码 | public class XMLWriter
{
public static final String NODENAME_Migrations = "Migrations";
private final transient Logger logger = LogManager.getLogger(getClass());
private final String fileName;
private OutputStream outputStream = null;
public XMLWriter(String fileName)
{
this.fileName = fileName;
}
public... | // set up a transformer
final TransformerFactory transFactory = TransformerFactory.newInstance();
transFactory.setAttribute("indent-number", 2);
final Transformer trans = transFactory.newTransformer();
trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
trans.setOutputProperty(OutputKeys.INDENT, ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\xml\XMLWriter.java | 1 |
请完成以下Spring Boot application配置 | server:
port: 9080
web:
debug: true
page-size: 15
user:
home: C:/Users/app
#Config 4 Security ==> Mapped to Security Object
security:
providers:
- http-basic-auth:
realm: "myRealm"
principal-type: USER # Can be USER or SERVICE, default is USER
users:
- login: "user"
password... | r:
securityDefaults:
authenticate: true
paths:
- path: "/user"
methods: ["get"]
roles-allowed: ["ROLE_USER", "ROLE_ADMIN"]
- path: "/admin"
methods: ["get"]
roles-allowed: ["ROLE_ADMIN"] | repos\tutorials-master\microservices-modules\helidon\helidon-se\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public class IntegerBucketSorter implements Sorter<Integer> {
private final Comparator<Integer> comparator;
public IntegerBucketSorter(Comparator<Integer> comparator) {
this.comparator = comparator;
}
public IntegerBucketSorter() {
comparator = Comparator.naturalOrder();
}
pu... | buckets.get(hash(i, max, numberOfBuckets)).add(i);
}
return buckets;
}
private int findMax(List<Integer> input){
int m = Integer.MIN_VALUE;
for (int i : input){
m = Math.max(i, m);
}
return m;
}
private static int hash(int i, int max, int nu... | repos\tutorials-master\algorithms-modules\algorithms-sorting-3\src\main\java\com\baeldung\algorithms\bucketsort\IntegerBucketSorter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int getS_ExternalProjectReference_ID()
{
return get_ValueAsInt(COLUMNNAME_S_ExternalProjectReference_ID);
}
@Override
public void setS_Issue_ID (final int S_Issue_ID)
{
if (S_Issue_ID < 1)
set_ValueNoCheck (COLUMNNAME_S_Issue_ID, null);
else
set_ValueNoCheck (COLUMNNAME_S_Issue_ID, S_Issue_I... | @Override
public void setS_Parent_Issue_ID (final int S_Parent_Issue_ID)
{
if (S_Parent_Issue_ID < 1)
set_Value (COLUMNNAME_S_Parent_Issue_ID, null);
else
set_Value (COLUMNNAME_S_Parent_Issue_ID, S_Parent_Issue_ID);
}
@Override
public int getS_Parent_Issue_ID()
{
return get_ValueAsInt(COLUMNNAME_S... | repos\metasfresh-new_dawn_uat\backend\de.metas.serviceprovider\src\main\java-gen\de\metas\serviceprovider\model\X_S_Issue.java | 2 |
请完成以下Java代码 | public void deleteHistoricIncidentsByBatchId(List<String> historicBatchIds) {
if (isHistoryEventProduced()) {
getDbEntityManager().delete(HistoricIncidentEntity.class, "deleteHistoricIncidentsByBatchIds", historicBatchIds);
}
}
protected void configureQuery(HistoricIncidentQueryImpl query) {
getA... | return getDbEntityManager()
.deletePreserveOrder(HistoricIncidentEntity.class, "deleteHistoricIncidentsByRemovalTime",
new ListQueryParameterObject(parameters, 0, batchSize));
}
public void addRemovalTimeToHistoricIncidentsByBatchId(String batchId, Date removalTime) {
Map<String, Object> paramete... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricIncidentManager.java | 1 |
请完成以下Java代码 | public Class<?> verifyClassName(final I_AD_JavaClass javaClassDef)
{
final String className = javaClassDef.getClassname();
final Class<?> javaClass;
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null)
{
cl = getClass().getClassLoader();
}
try
{
javaClass = cl.loadCla... | {
return null;
}
final Class<?> typeClass;
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null)
{
cl = getClass().getClassLoader();
}
try
{
typeClass = cl.loadClass(typeClassname.trim());
}
catch (final ClassNotFoundException e)
{
throw new AdempiereExcep... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\javaclasses\impl\JavaClassBL.java | 1 |
请完成以下Java代码 | public void setDataCollectionStartDate(Date dataCollectionStartDate) {
this.dataCollectionStartDate = dataCollectionStartDate;
}
@Override
public Map<String, Command> getCommands() {
return commands;
}
public void setCommands(Map<String, Command> commands) {
this.commands = commands;
}
publ... | @Override
public JdkImpl getJdk() {
return jdk;
}
public void setJdk(JdkImpl jdk) {
this.jdk = jdk;
}
@Override
public Set<String> getCamundaIntegration() {
return camundaIntegration;
}
public void setCamundaIntegration(Set<String> camundaIntegration) {
this.camundaIntegration = camun... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\telemetry\dto\InternalsImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static class InventoryHeaderKey
{
@NonNull
ZonedDateTime movementDate;
@Nullable
String poReference;
}
@Value
@Builder
private static class InventoryLineKey
{
@NonNull HuId topLevelHU;
@NonNull ProductId productId;
@Nullable
InOutLineId receiptLineId;
}
@Value
@Builder
private stat... | @NonNull HuId topLevelHUId;
@NonNull ProductId productId;
@NonNull Quantity qty;
@Nullable
I_M_InOutLine receiptLine;
@Nullable
String poReference;
@Nullable
public InOutLineId getInOutLineId()
{
return receiptLine != null
? InOutLineId.ofRepoId(receiptLine.getM_InOutLine_ID())
: null;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\internaluse\InventoryAllocationDestination.java | 2 |
请完成以下Java代码 | private String objectToString(final Object value, final int displayType, final boolean isMandatory)
{
if (value == null)
{
if (isMandatory)
{
logger.warn("Value is null even if is marked to be mandatory [Returning null]");
}
return null;
}
//
final String valueStr;
if (DisplayType.isDate(di... | valueStr = ((Boolean)value) ? "true" : "false";
}
else
{
valueStr = "Y".equals(value) ? "true" : "false";
}
return valueStr;
}
else
{
valueStr = value.toString();
}
return valueStr;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\util\DefaultDataConverter.java | 1 |
请完成以下Java代码 | public List<AuthorList> getAuthors() {
return authors;
}
public void setAuthors(List<AuthorList> authors) {
this.authors = authors;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == nul... | if (getClass() != obj.getClass()) {
return false;
}
return id != null && id.equals(((BookList) obj).id);
}
@Override
public int hashCode() {
return 2021;
}
@Override
public String toString() {
return "Book{" + "id=" + id + ", title=" + title + ", is... | repos\Hibernate-SpringBoot-master\HibernateSpringBootManyToManyBidirectionalListVsSet\src\main\java\com\bookstore\entity\BookList.java | 1 |
请完成以下Java代码 | public boolean saveTxtTo(String path, Filter filter)
{
try
{
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(IOUtil.newOutputStream(path), "UTF-8"));
Set<Map.Entry<String, Item>> entries = trie.entrySet();
for (Map.Entry<String, Item> entry : entries... | {
@Override
public int compare(Map.Entry<String, Integer> o1, Map.Entry<String, Integer> o2)
{
return o1.getValue().compareTo(o2.getValue());
}
});
int index = 1;
for (Map.Entry<String, Integer> pair ... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\DictionaryMaker.java | 1 |
请完成以下Java代码 | public <K, V extends Comparable<V>> V maxUsingStreamAndMethodReference(Map<K, V> map) {
Optional<Entry<K, V>> maxEntry = map.entrySet()
.stream()
.max(Comparator.comparing(Entry::getValue));
return maxEntry.get()
.getValue();
}
public <K, V extends Comparab... | map.put(2, 4);
map.put(3, 5);
map.put(4, 6);
map.put(5, 7);
MapMax mapMax = new MapMax();
System.out.println(mapMax.maxUsingIteration(map));
System.out.println(mapMax.maxUsingCollectionsMax(map));
System.out.println(mapMax.maxUsingCollectionsMaxAndLambda... | repos\tutorials-master\core-java-modules\core-java-collections-maps-2\src\main\java\com\baeldung\map\mapmax\MapMax.java | 1 |
请完成以下Java代码 | public int getM_Transaction_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Transaction_ID);
if (ii == null)
return 0;
return ii.intValue();
}
@Override
public org.eevolution.model.I_PP_Cost_Collector getPP_Cost_Collector() throws RuntimeException
{
return get_ValueAsPO(COLUMNNAME_PP_Cost_Collec... | public void setPP_Cost_Collector_ID (int PP_Cost_Collector_ID)
{
if (PP_Cost_Collector_ID < 1)
set_Value (COLUMNNAME_PP_Cost_Collector_ID, null);
else
set_Value (COLUMNNAME_PP_Cost_Collector_ID, Integer.valueOf(PP_Cost_Collector_ID));
}
/** Get Manufacturing Cost Collector.
@return Manufacturing Cost ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Transaction.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ReceivedFile implements Serializable {
@Serial
private static final long serialVersionUID = -420530763778423322L;
@Id
@JdbcTypeCode(SqlTypes.CHAR)
UUID id;
Instant receivedDate;
String originalFileName;
String storedName;
@Enumerated(EnumType.STRING)
FileGroup f... | }
/**
* this can resemble S3 bucket
*/
public enum FileGroup {
NOTE_ATTACHMENT("attachments"),
;
//add other
public final String path;
FileGroup(String path) {
this.path = path;
}
}
} | repos\spring-boot-web-application-sample-master\main-app\main-orm\src\main\java\gt\app\domain\ReceivedFile.java | 2 |
请完成以下Java代码 | public java.lang.String getPriceList()
{
return get_ValueAsString(COLUMNNAME_PriceList);
}
@Override
public void setProcessed (final boolean Processed)
{
set_Value (COLUMNNAME_Processed, Processed);
}
@Override
public boolean isProcessed()
{
return get_ValueAsBoolean(COLUMNNAME_Processed);
}
@Over... | 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;
}
@Override
public void setQtyCalculated (final @Nullable BigDecimal Qty... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Forecast.java | 1 |
请完成以下Java代码 | public class GetDeploymentProcessDiagramLayoutCmd implements Command<DiagramLayout>, Serializable {
private static final long serialVersionUID = 1L;
protected String processDefinitionId;
public GetDeploymentProcessDiagramLayoutCmd(String processDefinitionId) {
if (processDefinitionId == null || processDefin... | for(CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) {
checker.checkReadProcessDefinition(processDefinition);
}
InputStream processModelStream = commandContext.runWithoutAuthorization(
new GetDeploymentProcessModelCmd(processDefinitionId));
InputS... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\GetDeploymentProcessDiagramLayoutCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setMEASUREATTR(String value) {
this.measureattr = value;
}
/**
* Gets the value of the measureunit property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getMEASUREUNIT() {
return measureunit;
}
/... | *
* @return
* possible object is
* {@link String }
*
*/
public String getMEASUREVALUE() {
return measurevalue;
}
/**
* Sets the value of the measurevalue property.
*
* @param value
* allowed object is
* {@link String }
* ... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DMESU1.java | 2 |
请在Spring Boot框架中完成以下Java代码 | static class JsonbHttpMessageConverterConfiguration {
@Bean
@ConditionalOnMissingBean(JsonbHttpMessageConverter.class)
JsonbHttpMessageConvertersCustomizer jsonbHttpMessageConvertersCustomizer(Jsonb jsonb) {
return new JsonbHttpMessageConvertersCustomizer(jsonb);
}
}
static class JsonbHttpMessageConvert... | }
@ConditionalOnProperty(name = HttpMessageConvertersAutoConfiguration.PREFERRED_MAPPER_PROPERTY,
havingValue = "jsonb")
static class JsonbPreferred {
}
@SuppressWarnings("removal")
@ConditionalOnMissingBean({ JacksonJsonHttpMessageConvertersCustomizer.class,
Jackson2HttpMessageConvertersConfigurat... | repos\spring-boot-4.0.1\module\spring-boot-http-converter\src\main\java\org\springframework\boot\http\converter\autoconfigure\JsonbHttpMessageConvertersConfiguration.java | 2 |
请完成以下Java代码 | public void setLastName(final String lastName)
{
this.lastName = lastName;
this.lastNameSet = true;
}
public void setEmail(final String email)
{
this.email = email;
this.emailSet = true;
}
public void setPhone(final String phone)
{
this.phone = phone;
this.phoneSet = true;
}
public void setFax(f... | this.salesSet = true;
}
public void setSalesDefault(final Boolean salesDefault)
{
this.salesDefault = salesDefault;
this.salesDefaultSet = true;
}
public void setPurchase(final Boolean purchase)
{
this.purchase = purchase;
this.purchaseSet = true;
}
public void setPurchaseDefault(final Boolean purcha... | repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-bpartner\src\main\java\de\metas\common\bpartner\v1\request\JsonRequestContact.java | 1 |
请完成以下Java代码 | default List<String> getAudience() {
return this.getClaimAsStringList(LogoutTokenClaimNames.AUD);
}
/**
* Returns the time at which the ID Token was issued {@code (iat)}.
* @return the time at which the ID Token was issued
*/
default Instant getIssuedAt() {
return this.getClaimAsInstant(LogoutTokenClaimNa... | * Returns a {@code String} value {@code (sid)} representing the OIDC Provider session
* @return the value representing the OIDC Provider session
*/
default String getSessionId() {
return getClaimAsString(LogoutTokenClaimNames.SID);
}
/**
* Returns the JWT ID {@code (jti)} claim which provides a unique ident... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\oidc\authentication\logout\LogoutTokenClaimAccessor.java | 1 |
请完成以下Java代码 | public class CustomErrorResponse {
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd hh:mm:ss")
private LocalDateTime timestamp;
private int status;
private String error;
public LocalDateTime getTimestamp() {
return timestamp;
}
public void setTimestamp(LocalDateT... | return status;
}
public void setStatus(int status) {
this.status = status;
}
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
} | repos\spring-boot-master\spring-rest-error-handling\src\main\java\com\mkyong\error\CustomErrorResponse.java | 1 |
请完成以下Java代码 | public Date getDatePromisedMax()
{
return this._datePromisedMax;
}
@Nullable
public MRPFirmType getMRPFirmType()
{
return this._mrpFirmType;
}
public boolean isQtyNotZero()
{
return false;
}
@Nullable
public Boolean getMRPAvailable()
{
return _mrpAvailable;
}
public boolean isOnlyActiveRecords... | this._orderTypes.add(orderType);
}
return this;
}
private Set<String> getOrderTypes()
{
return this._orderTypes;
}
@Override
public MRPQueryBuilder setReferencedModel(final Object referencedModel)
{
this._referencedModel = referencedModel;
return this;
}
public Object getReferencedModel()
{
ret... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\mrp\api\impl\MRPQueryBuilder.java | 1 |
请完成以下Java代码 | private void onTreeAction(final String action)
{
final Action a = tree.getActionMap().get(action);
if (a != null)
{
a.actionPerformed(new ActionEvent(tree, ActionEvent.ACTION_PERFORMED, null));
}
}
/**
* Clicked on Expand All
*/
private void expandTree()
{
if (treeExpand.isSelected())
{
for... | return; // nothing to do
}
Check.assumeNotNull(ids, "Param 'ids' is not null");
treeModel.filterIds(ids);
if (treeExpand.isSelected())
{
expandTree();
}
if (ids != null && ids.size() > 0)
{
setTreeSelectionPath(ids.get(0), true);
}
}
@Override
public void requestFocus()
{
treeSearch.re... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\tree\VTreePanel.java | 1 |
请完成以下Java代码 | public class SecurityContextChangedEvent extends ApplicationEvent {
public static final Supplier<SecurityContext> NO_CONTEXT = () -> null;
private final Supplier<SecurityContext> oldContext;
private final Supplier<SecurityContext> newContext;
/**
* Construct an event
* @param oldContext the old security con... | */
public SecurityContext getNewContext() {
return this.newContext.get();
}
/**
* Say whether the event is a context-clearing event.
*
* <p>
* This method is handy for avoiding looking up the new context to confirm it is a
* cleared event.
* @return {@code true} if the new context is
* {@link Securi... | repos\spring-security-main\core\src\main\java\org\springframework\security\core\context\SecurityContextChangedEvent.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void handleEvent(@NonNull final DDOrderDocStatusChangedEvent ddOrderChangedDocStatusEvent)
{
final List<Candidate> candidatesForDDOrderId = DDOrderUtil
.retrieveCandidatesForDDOrderId(
candidateRepositoryRetrieval,
ddOrderChangedDocStatusEvent.getDdOrderId());
Check.errorIf(candidatesForDDO... | }
private BigDecimal computeNewQuantity(
@NonNull final DocStatus newDocStatusFromEvent,
@NonNull final Candidate candidateForDDOrderId)
{
final BigDecimal newQuantity;
if (newDocStatusFromEvent.isClosed())
{
// Take the "actualQty" instead of max(actual, planned)
newQuantity = candidateForDDOrderI... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-service\src\main\java\de\metas\material\dispo\service\event\handler\ddorder\DDOrderDocStatusChangedHandler.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private AlbertaCompositeProductProducer buildAlbertaCompositeProductProducer(
@NonNull final AlbertaDataQuery dataQuery,
@Nullable final PriceListId pharmacyPriceListId)
{
final Map<ProductId, I_M_ProductPrice> productId2ProductPrice = Optional.ofNullable(pharmacyPriceListId)
.map(priceListId -> priceListD... | return externalReferenceRepository.getExternalReferenceByMFReference(getExternalReferenceByRecordIdReq)
.map(ExternalReference::getExternalReference);
}
@NonNull
private Optional<String> getAlbertaArticleIdByProductId(@NonNull final ProductId productId)
{
final ExternalSystem externalSystem = externalSystemR... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java\de\metas\vertical\healthcare\alberta\service\AlbertaProductService.java | 2 |
请完成以下Java代码 | public void setAD_Message_ID (int AD_Message_ID)
{
if (AD_Message_ID <= 0)
{
super.setAD_Message_ID(retrieveAdMessageRepoIdByValue(getCtx(), "NoMessageFound"));
}
else
{
super.setAD_Message_ID(AD_Message_ID);
}
} // setAD_Message_ID
/**
* Set Client Org
* @param AD_Client_ID client
* @param... | setRecord_ID(Record_ID);
} // setRecord
public void setRecord (final TableRecordReference record)
{
if(record != null)
{
setRecord(record.getAD_Table_ID(), record.getRecord_ID());
}
else
{
setRecord(-1, -1);
}
}
/**
* String Representation
* @return info
*/
@Override
public String toS... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MNote.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.