instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public BatchQuery tenantIdLike(String tenantIdLike) {
if (tenantIdLike == null) {
throw new FlowableIllegalArgumentException("Provided tenant id is null");
}
this.tenantIdLike = tenantIdLike;
return this;
}
@Override
public BatchQuery withoutTenantId() {
... | }
@Override
@Deprecated
public void deleteWithRelatedData() {
delete();
}
// getters //////////////////////////////////////////
@Override
public String getId() {
return id;
}
public String getBatchType() {
return batchType;
}
public Collection... | repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\BatchQueryImpl.java | 2 |
请完成以下Java代码 | private void assertValueIsTypeMatch(BeanWrapper beanWrapper, String fieldName, Object value) {
PropertyDescriptor property = beanWrapper.getPropertyDescriptor(fieldName);
Supplier<String> typeMismatchExceptionMessageSupplier = () ->
String.format("Value [%1$s] of type [%2$s] does not match field [%3$s] o... | @Override
public Object getObject() {
return getParent().getObject();
}
@Override
public WritablePdxInstance createWriter() {
return this;
}
@Override
public boolean hasField(String fieldName) {
return getParent().hasField(fieldName);
}
};
}
/**
* Determines whether the give... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\pdx\ObjectPdxInstanceAdapter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class Embedded {
private static final AtomicInteger serverIdCounter = new AtomicInteger();
/**
* Server ID. By default, an auto-incremented counter is used.
*/
private int serverId = serverIdCounter.getAndIncrement();
/**
* Whether to enable embedded mode if the Artemis server APIs are... | public void setPersistent(boolean persistent) {
this.persistent = persistent;
}
public @Nullable String getDataDirectory() {
return this.dataDirectory;
}
public void setDataDirectory(@Nullable String dataDirectory) {
this.dataDirectory = dataDirectory;
}
public String[] getQueues() {
return t... | repos\spring-boot-4.0.1\module\spring-boot-artemis\src\main\java\org\springframework\boot\artemis\autoconfigure\ArtemisProperties.java | 2 |
请完成以下Java代码 | public List<InvoiceCandidateGenerateRequest> expandRequest(@NonNull final InvoiceCandidateGenerateRequest request)
{
final I_M_Inventory inventory = request.getModel(I_M_Inventory.class);
//
// Retrieve inventory lines
final InventoryId inventoryId = InventoryId.ofRepoId(inventory.getM_Inventory_ID());
fina... | {
for (final I_M_InventoryLine line : inventoryDAO.retrieveLinesForInventoryId(inventoryId))
{
handler.invalidateCandidatesFor(line);
}
}
}
@Override
public String getSourceTable()
{
return I_M_Inventory.Table_Name;
}
@Override
public boolean isUserInChargeUserEditable()
{
return false;
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\spi\impl\M_Inventory_Handler.java | 1 |
请完成以下Java代码 | protected void setInternalValueNumberInitial(final BigDecimal value)
{
throw new UnsupportedOperationException("Setting initial value not supported");
}
@Override
public boolean isNew()
{
return isGeneratedAttribute;
}
@Override
protected void setInternalValueDate(Date value)
{
attributeInstance.setVal... | }
@Override
protected Date getInternalValueDateInitial()
{
return null;
}
@Override
public boolean isOnlyIfInProductAttributeSet()
{
// FIXME tsa: figure out why this returns false instead of using the flag from M_HU_PI_Attribute?!
return false;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\AIWithHUPIAttributeValue.java | 1 |
请完成以下Java代码 | default @Nullable TaskExecutor getTaskExecutor() {
return null;
}
/**
* Called by the container factory with the factory's batchListener property.
* @param batchListener the batchListener to set.
* @since 2.2
*/
default void setBatchListener(boolean batchListener) {
}
/**
* Whether this endpoint is f... | return null;
}
/**
* Return a {@link ReplyPostProcessor} to post process a reply message before it is
* sent.
* @return the post processor.
* @since 2.2.5
*/
default @Nullable ReplyPostProcessor getReplyPostProcessor() {
return null;
}
/**
* Get the reply content type.
* @return the content type.... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\listener\RabbitListenerEndpoint.java | 1 |
请完成以下Java代码 | public void setPage_Offset (int Page_Offset)
{
set_ValueNoCheck (COLUMNNAME_Page_Offset, Integer.valueOf(Page_Offset));
}
/** Get Page_Offset.
@return Page_Offset */
@Override
public int getPage_Offset ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_Page_Offset);
if (ii == null)
return 0;
return... | return (java.sql.Timestamp)get_Value(COLUMNNAME_Result_Time);
}
/** Set Total_Size.
@param Total_Size Total_Size */
@Override
public void setTotal_Size (int Total_Size)
{
set_ValueNoCheck (COLUMNNAME_Total_Size, Integer.valueOf(Total_Size));
}
/** Get Total_Size.
@return Total_Size */
@Override
pub... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dao\selection\model\X_T_Query_Selection_Pagination.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public GenericResponse<? extends DataMarker> getGenericResponse(@RequestBody GenericRequest<? extends DataMarker> request) {
LOG.info("getGenericResponse");
if (request.getData() instanceof SimpleDataPayload) {
SimpleDataPayload payload = (SimpleDataPayload) request.getData();
re... | if (cookies != null) {
for (Cookie cookie : cookies) {
String id = cookie.getDomain() + ":" + cookie.getName();
cookiesMap.put(id, cookie.toString());
}
}
return cookiesMap;
}
private Map<String, List<String>> createHeaderMap(HttpServletRe... | repos\spring-examples-java-17\spring-demo\src\main\java\itx\examples\springboot\demo\controller\DataServiceController.java | 2 |
请完成以下Java代码 | public int getAnfrageMenge() {
return anfrageMenge;
}
/**
* Sets the value of the anfrageMenge property.
*
*/
public void setAnfrageMenge(int value) {
this.anfrageMenge = value;
}
/**
* Gets the value of the anfragePzn property.
*
*/
public long ... | * <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the anteile property.
*
* <p>
* For example... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\VerfuegbarkeitsantwortArtikel.java | 1 |
请完成以下Java代码 | public Flux<String> getIndexMongo() {
personRepository.findAll()
.doOnNext(p -> logger.info("Person: {}", p))
.subscribe();
return Flux.fromIterable(getThreads());
}
@GetMapping("/threads/reactor-kafka")
public Flux<String> getIndexKafka() {
Map<String, Object> p... | Flux<ReceiverRecord<Integer, String>> inboundFlux = receiver.receive();
inboundFlux.subscribe(r -> {
logger.info("Received message: {}", r.value());
r.receiverOffset()
.acknowledge();
});
return Flux.fromIterable(getThreads());
}
@GetMapping("/index... | repos\tutorials-master\spring-reactive-modules\spring-reactive\src\main\java\com\baeldung\reactive\concurrency\Controller.java | 1 |
请完成以下Java代码 | public Config setSample(float sample)
{
this.sample = sample;
return this;
}
public float getSample()
{
return sample;
}
public Config setAlpha(float alpha)
{
this.alpha = alpha;
return this;
}
public float getAlpha()
{
return al... | return this;
}
public String getInputFile()
{
return inputFile;
}
public TrainingCallback getCallback()
{
return callback;
}
public void setCallback(TrainingCallback callback)
{
this.callback = callback;
}
} | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word2vec\Config.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DiagramLayout implements Serializable {
private static final long serialVersionUID = 1L;
private Map<String, DiagramElement> elements;
public DiagramLayout(Map<String, DiagramElement> elements) {
this.setElements(elements);
}
public DiagramNode getNode(String id) {
DiagramElement el... | public void setElements(Map<String, DiagramElement> elements) {
this.elements = elements;
}
public List<DiagramNode> getNodes() {
List<DiagramNode> nodes = new ArrayList<DiagramNode>();
for (Entry<String, DiagramElement> entry : getElements().entrySet()) {
DiagramElement element = entry.getValue(... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\repository\DiagramLayout.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class OrderCreateRequest
{
@JsonProperty("orderId")
Id orderId;
@JsonProperty("supportId")
SupportIDType supportId;
@JsonProperty("bpartnerId")
BPartnerId bpartnerId;
@JsonProperty("orderPackages")
List<OrderCreateRequestPackage> orderPackages;
@Builder
private OrderCreateRequest( | @JsonProperty("orderId") @NonNull final Id orderId,
@JsonProperty("supportId") @NonNull final SupportIDType supportId,
@JsonProperty("bpartnerId") @NonNull final BPartnerId bpartnerId,
@JsonProperty("orderPackages") @NonNull @Singular final List<OrderCreateRequestPackage> orderPackages)
{
if (orderPackages.... | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.commons\src\main\java\de\metas\vertical\pharma\msv3\protocol\order\OrderCreateRequest.java | 2 |
请完成以下Java代码 | public synchronized void disableForSession(final String sessionId)
{
// TODO: implement
}
public WebsocketTopicName getWebsocketEndpoint(final UserId adUserId)
{
return getNotificationsQueue(adUserId).getWebsocketEndpoint();
}
private UserNotificationsQueue getNotificationsQueueOrNull(final UserId adUserId)... | getNotificationsQueue(adUserId).markAsRead(notificationId);
}
public void markAllNotificationsAsRead(final UserId adUserId)
{
getNotificationsQueue(adUserId).markAllAsRead();
}
public int getNotificationsUnreadCount(final UserId adUserId)
{
return getNotificationsQueue(adUserId).getUnreadCount();
}
publi... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\notification\UserNotificationsService.java | 1 |
请完成以下Java代码 | public Wallet loadDecryptedWallet() throws IOException, UnreadableWalletException {
File walletFile = new File("baeldungencrypted.dat");
Wallet wallet = Wallet.loadFromFile(walletFile);
wallet.decrypt("password");
return wallet;
}
public Wallet loadWallet() throws IOException, U... | wallet.addCoinsReceivedEventListener((Wallet w, Transaction tx, Coin prevBalance, Coin newBalance) -> {
logger.info("Received tx for " + tx.getValueSentToMe(wallet));
logger.info("New balance: " + newBalance.toFriendlyString());
});
peerGroup.start();
peerGroup.downloadB... | repos\tutorials-master\java-blockchain\src\main\java\com\baeldung\bitcoinj\CreateWallet.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private String getOrDeducePassword(SecurityProperties.User user, @Nullable PasswordEncoder encoder) {
String password = user.getPassword();
if (user.isPasswordGenerated()) {
logger.info(String.format("%n%nUsing generated security password: %s%n", user.getPassword()));
}
if (encoder != null || PASSWORD_ALGORI... | }
@ConditionalOnBean(RSocketMessageHandler.class)
static class RSocketSecurityEnabledCondition {
}
@ConditionalOnWebApplication(type = Type.REACTIVE)
static class ReactiveWebApplicationCondition {
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-security\src\main\java\org\springframework\boot\security\autoconfigure\ReactiveUserDetailsServiceAutoConfiguration.java | 2 |
请完成以下Java代码 | public EventDefinitionEntity findLatestEventDefinitionByKey(String eventDefinitionKey) {
return dataManager.findLatestEventDefinitionByKey(eventDefinitionKey);
}
@Override
public void deleteEventDefinitionsByDeploymentId(String deploymentId) {
dataManager.deleteEventDefinitionsByDeploymentI... | } else {
return dataManager.findLatestEventDefinitionByKeyAndTenantId(eventDefinitionKey, tenantId);
}
}
@Override
public EventDefinitionEntity findEventDefinitionByKeyAndVersionAndTenantId(String eventDefinitionKey, Integer eventVersion, String tenantId) {
if (tenantId == n... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\persistence\entity\EventDefinitionEntityManagerImpl.java | 1 |
请完成以下Java代码 | private final class ColumnAttributes
{
protected TableCellEditor cellEditor;
protected TableCellRenderer cellRenderer;
// protected Object headerValue;
protected int minWidth;
protected int maxWidth;
protected int preferredWidth;
}
@Override
public Object getModelValueAt(int rowIndexModel, int columnIn... | super.setModel(dataModel);
if (modelRowSorter == null)
{
// i.e. we are in JTable constructor and modelRowSorter was not yet set
// => do nothing
}
else if (!modelRowSorter.isEnabled())
{
setupViewRowSorter();
}
}
private final void setupViewRowSorter()
{
final TableModel model = getModel();
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CTable.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class RocketChatNotifierConfiguration {
@Bean
@ConditionalOnMissingBean
@ConfigurationProperties("spring.boot.admin.notify.rocketchat")
public RocketChatNotifier rocketChatNotifier(InstanceRepository repository,
NotifierProxyProperties proxyProperties) {
return new RocketChatNotifier(repos... | }
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnProperty(prefix = "spring.boot.admin.notify.webex", name = "auth-token")
@AutoConfigureBefore({ NotifierTriggerConfiguration.class, CompositeNotifierConfiguration.class })
@Lazy(false)
public static class WebexNotifierConfiguration {
@Bean
@Conditi... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\config\AdminServerNotifierAutoConfiguration.java | 2 |
请完成以下Java代码 | public String getBody() {
return body;
}
public void setBody(String body) {
if (multiValueParts != null && !multiValueParts.isEmpty()) {
throw new FlowableIllegalStateException("Cannot set both body and multi value parts");
} else if (formParameters != null && !formParameter... | throw new FlowableIllegalStateException("Cannot set both multi value parts and form parameters");
}
if (formParameters == null) {
formParameters = new LinkedHashMap<>();
}
formParameters.computeIfAbsent(key, k -> new ArrayList<>()).add(value);
}
public int getTimeout... | repos\flowable-engine-main\modules\flowable-http-common\src\main\java\org\flowable\http\common\api\HttpRequest.java | 1 |
请完成以下Java代码 | public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
Sample sample = Timer.start(meterRegistry);
return chain.filter(exchange)
.doOnSuccess(aVoid -> endTimerRespectingCommit(exchange, sample))
.doOnError(throwable -> endTimerRespectingCommit(exchange, sample));
}
private void e... | return Mono.empty();
});
}
}
private void endTimerInner(ServerWebExchange exchange, Sample sample) {
Tags tags = compositeTagsProvider.apply(exchange);
if (log.isTraceEnabled()) {
log.trace(metricsPrefix + ".requests tags: " + tags);
}
sample.stop(meterRegistry.timer(metricsPrefix + ".requests", tag... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\GatewayMetricsFilter.java | 1 |
请完成以下Java代码 | protected void writeInternal(OAuth2Error oauth2Error, HttpOutputMessage outputMessage)
throws HttpMessageNotWritableException {
try {
Map<String, String> errorParameters = this.errorParametersConverter.convert(oauth2Error);
this.jsonMessageConverter.write(errorParameters, STRING_OBJECT_MAP.getType(), MediaTy... | @Override
public OAuth2Error convert(Map<String, String> parameters) {
String errorCode = parameters.get(OAuth2ParameterNames.ERROR);
String errorDescription = parameters.get(OAuth2ParameterNames.ERROR_DESCRIPTION);
String errorUri = parameters.get(OAuth2ParameterNames.ERROR_URI);
return new OAuth2Error(e... | repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\http\converter\OAuth2ErrorHttpMessageConverter.java | 1 |
请完成以下Java代码 | Mono<String> useOauthWithAuthCode() {
Mono<String> retrievedResource = webClient.get()
.uri(RESOURCE_URI)
.retrieve()
.bodyToMono(String.class);
return retrievedResource.map(string -> "We retrieved the following resource using Oauth: " + string);
}
@GetMappin... | return retrievedResource.map(string -> "We retrieved the following resource using Oauth: " + string + ". Principal associated: " + authorizedClient.getPrincipalName() + ". Token will expire at: " + authorizedClient.getAccessToken()
.getExpiresAt());
}
@GetMapping("/auth-code-explicit-client")
M... | repos\tutorials-master\spring-reactive-modules\spring-reactive-oauth\src\main\java\com\baeldung\webclient\authorizationcodeclient\web\ClientRestController.java | 1 |
请完成以下Java代码 | public class MultipleSubscribersColdObs {
private static final Logger LOGGER = LoggerFactory.getLogger(MultipleSubscribersColdObs.class);
public static void main(String[] args) throws InterruptedException {
defaultBehaviour();
// subscribeBeforeConnect();
}
private static void default... | s.unsubscribe();
}
private static Observable getObservable() {
return Observable.create(subscriber -> {
subscriber.onNext(gettingValue(1));
subscriber.onNext(gettingValue(2));
subscriber.add(Subscriptions.create(() -> {
LOGGER.info("Clear resources"... | repos\tutorials-master\rxjava-modules\rxjava-observables\src\main\java\com\baeldung\rxjava\MultipleSubscribersColdObs.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private String validateEntities(final String s) {
StringBuffer buf = new StringBuffer();
// validate entities throughout the string
Matcher m = P_VALID_ENTITIES.matcher(s);
while (m.find()) {
final String one = m.group(1); //([^&;]*)
final String two = m.group(2)... | private String checkEntity(final String preamble, final String term) {
return ";".equals(term) && isValidEntity(preamble)
? '&' + preamble
: "&" + preamble;
}
private boolean isValidEntity(final String entity) {
return inArray(entity, vAllowedEntities);
... | repos\SpringBootCodeGenerator-master\src\main\java\com\softdev\system\generator\config\HTMLFilter.java | 2 |
请完成以下Java代码 | public static class FileSystemExportResourceResolver extends AbstractExportResourceResolver {
@Override
protected @NonNull String getResourcePath() {
return String.format("%1$s%2$s%3$s", ResourcePrefix.FILESYSTEM_URL_PREFIX.toUrlPrefix(),
System.getProperty("user.dir"), File.separator);
}
}
/**
* Mar... | }
@Nullable @Override
protected Resource onMissingResource(@Nullable Resource resource, @NonNull String location) {
getLogger().warn("Resource [{}] at location [{}] does not exist; skipping import",
ResourceUtils.nullSafeGetDescription(resource), location);
return null;
}
}
/**
* Resolves the {@... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\data\support\ResourceCapableCacheDataImporterExporter.java | 1 |
请完成以下Java代码 | public @Nullable Map<String, Object> getVariables() {
return this.variables;
}
/**
* Creates an instance of {@link MatchResult} that is a match with no variables
* @return
*/
public static Mono<MatchResult> match() {
return match(Collections.emptyMap());
}
/**
*
* Creates an instance of... | public static Mono<MatchResult> match(Map<String, ? extends Object> variables) {
MatchResult result = new MatchResult(true, (variables != null) ? new HashMap<>(variables) : null);
return Mono.just(result);
}
/**
* Creates an instance of {@link MatchResult} that is not a match.
* @return
*/
public ... | repos\spring-security-main\rsocket\src\main\java\org\springframework\security\rsocket\util\matcher\PayloadExchangeMatcher.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class ThymeleafWebLayoutConfiguration {
@Bean
@ConditionalOnMissingBean
LayoutDialect layoutDialect() {
return new LayoutDialect();
}
}
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(DataAttributeDialect.class)
static class DataAttributeDialectConfiguration {
@Bean
@Condition... | }
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass({ SpringSecurityDialect.class, CsrfToken.class })
static class ThymeleafSecurityDialectConfiguration {
@Bean
@ConditionalOnMissingBean
SpringSecurityDialect securityDialect() {
return new SpringSecurityDialect();
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-thymeleaf\src\main\java\org\springframework\boot\thymeleaf\autoconfigure\ThymeleafAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class WebController {
@Autowired
private CustomerDAO customerDAO;
@GetMapping(path = "/")
public String index() {
return "external";
}
@GetMapping("/logout")
public String logout(HttpServletRequest request) throws Exception {
request.logout();
return "redire... | customerDAO.save(customer1);
Customer customer2 = new Customer();
customer2.setAddress("2222 bar street");
customer2.setName("Bar LLP");
customer2.setServiceRendered("Important services");
customerDAO.save(customer2);
Customer customer3 = new Customer();
custome... | repos\tutorials-master\spring-boot-modules\spring-boot-keycloak-adapters\src\main\java\com\baeldung\keycloak\WebController.java | 2 |
请完成以下Java代码 | public class JacksonJsonPathQuery implements SpinJsonPathQuery {
private static final JacksonJsonLogger LOG = JacksonJsonLogger.JSON_TREE_LOGGER;
protected final SpinJsonNode spinJsonNode;
protected final JsonPath query;
protected final JacksonJsonDataFormat dataFormat;
public JacksonJsonPathQuery(JacksonJ... | if(node.isArray()) {
return node.elements();
} else {
throw LOG.unableToParseValue(SpinList.class.getSimpleName(), node.getNodeType());
}
}
public String stringValue() {
JacksonJsonNode node = (JacksonJsonNode) element();
if(node.isString()) {
return node.stringValue();
} else... | repos\camunda-bpm-platform-master\spin\dataformat-json-jackson\src\main\java\org\camunda\spin\impl\json\jackson\query\JacksonJsonPathQuery.java | 1 |
请完成以下Java代码 | public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result) + (int) (id ^ (id >>> 32));
result = (prime * result) + ((name == null) ? 0 : name.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == ... | final Possession other = (Possession) obj;
if (id != other.id) {
return false;
}
if (name == null) {
if (other.name != null) {
return false;
}
} else if (!name.equals(other.name)) {
return false;
}
return tru... | repos\tutorials-master\persistence-modules\spring-data-jpa-simple\src\main\java\com\baeldung\jpa\modifying\model\Possession.java | 1 |
请完成以下Java代码 | public class AProcessModel
{
private static final String ACTION_Name = "Process";
private static final transient Logger logger = LogManager.getLogger(AProcessModel.class);
public String getActionName()
{
return ACTION_Name;
}
public List<SwingRelatedProcessDescriptor> fetchProcesses(final Properties ctx, fin... | return true;
}
if (!relatedProcess.isSilentRejection())
{
return true;
}
//
// Log and filter it out
if (logger.isDebugEnabled())
{
final String disabledReason = relatedProcess.getDisabledReason(Env.getAD_Language(Env.getCtx()));
logger.debug("Skip process {} because {} (silent={})", relate... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ui\AProcessModel.java | 1 |
请完成以下Java代码 | public ObjectId getId() {
return id;
}
public void setId(ObjectId id) {
this.id = id;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
} | public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
} | repos\tutorials-master\quarkus-modules\mongo-db\src\main\java\com\baeldung\mongoclient\Article.java | 1 |
请完成以下Java代码 | public class ShipmentDeclaration
{
@NonFinal
ShipmentDeclarationId id;
@NonNull
String documentNo;
@NonNull
OrgId orgId;
@NonNull
InOutId shipmentId;
@NonNull
BPartnerLocationId bpartnerAndLocationId;
@Nullable
UserId userId;
@NonNull
DocTypeId docTypeId;
@NonNull
LocalDate shipmentDate;
@NonNu... | @NonNull
ImmutableList<ShipmentDeclarationLine> lines;
public void updateLineNos()
{
int nextLineNo = 10;
for (ShipmentDeclarationLine line : lines)
{
line.setLineNo(nextLineNo);
nextLineNo += 10;
}
}
public ShipmentDeclaration copyToNew(
@NonNull final DocTypeId newDocTypeId,
@NonNull final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\shipment\ShipmentDeclaration.java | 1 |
请完成以下Java代码 | final class WeightingSpecificationsMap
{
private final ImmutableMap<WeightingSpecificationsId, WeightingSpecifications> byId;
private final Optional<WeightingSpecificationsId> defaultId;
public WeightingSpecificationsMap(final List<WeightingSpecifications> list)
{
byId = Maps.uniqueIndex(list, WeightingSpecifica... | }
public WeightingSpecificationsId getDefaultId()
{
return defaultId.orElseThrow(() -> new AdempiereException("No specifications defined"));
}
public WeightingSpecifications getById(@NonNull final WeightingSpecificationsId id)
{
final WeightingSpecifications spec = byId.get(id);
if (spec == null)
{
th... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\manufacturing\order\weighting\spec\WeightingSpecificationsMap.java | 1 |
请完成以下Java代码 | private void consolidateBPartnerWithIdentifier(
@NonNull final ExternalIdentifier identifierString,
@Nullable final JsonRequestBPartner jsonBPartner)
{
if (jsonBPartner == null)
{
return;
}
switch (identifierString.getType())
{
case METASFRESH_ID:
// nothing to do; the JsonRequestBPartner ha... | case EXTERNAL_REFERENCE:
// nothing to do
break;
case GLN:
if (!jsonLocation.isGlnSet())
{
jsonLocation.setGln(externalIdentifier.asGLN().getCode());
}
break;
default:
throw new AdempiereException("Unexpected IdentifierString.Type=" + externalIdentifier.getType())
.appendPar... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\bpartner\JsonRequestConsolidateService.java | 1 |
请完成以下Java代码 | private void logException(final Throwable e, final String messageText)
{
log("Error: " + e.getLocalizedMessage(),
messageText, // text
null, // reference
e// isError
);
}
private void log(final String summary, final String text, final String reference, final Throwable error)
{
final I_IMP_Process... | {
logException(e, text);
}
}
private String extractMessageBodyAsString(@NonNull final Message message)
{
final String encoding = message.getMessageProperties().getContentEncoding();
if (Check.isEmpty(encoding))
{
Loggables.withLogger(logger, Level.WARN)
.addLog("Incoming RabbitMQ message lacks co... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\server\rpl\imp\RabbitMqListener.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected @NonNull <K, V> ClientRegionFactoryBean<K, V> configureAsLocalClientRegion(
@NonNull Environment environment, @NonNull ClientRegionFactoryBean<K, V> clientRegion) {
ClientRegionShortcut shortcut =
environment.getProperty(SPRING_DATA_GEMFIRE_CACHE_CLIENT_REGION_SHORTCUT_PROPERTY,
ClientRegionShort... | return !super.matches(conditionContext, typeMetadata);
}
}
public static final class NotCloudFoundryEnvironmentCondition implements Condition {
@Override
public boolean matches(@NonNull ConditionContext context, @NonNull AnnotatedTypeMetadata metadata) {
return !CloudPlatform.CLOUD_FOUNDRY.isActive(context... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\config\annotation\ClusterNotAvailableConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public List<Object> range(String k, long l, long l1){
ListOperations<String, Object> list = redisTemplate.opsForList();
return list.range(k,l,l1);
}
/**
* set add
* @param key
* @param value
*/
public void setAdd(String key,Object value){
SetOperations<String, O... | * @param value
* @param scoure
*/
public void zAdd(String key,Object value,double scoure){
ZSetOperations<String, Object> zset = redisTemplate.opsForZSet();
zset.add(key,value,scoure);
}
/**
* rangeByScore
* @param key
* @param scoure
* @param scoure1
* @r... | repos\spring-boot-leaning-master\1.x\第09课:如何玩转 Redis\spring-boot-redis\src\main\java\com\neo\service\RedisService.java | 2 |
请完成以下Java代码 | public Object getPrintData() throws IOException
{
return this;
} // getPrintData
/**
* Get Document Attributes (Doc Interface)
*
* @return null to obtain all attribute values from the
* job's attribute set.
*/
@Override
public DocAttributeSet getAttributes()
{
return null;
} // getAttributes... | * @return null
* @throws IOException
*/
@Override
public InputStream getStreamForBytes() throws IOException
{
return null;
} // getStreamForBytes
public void setPrintInfo(final ArchiveInfo info)
{
m_PrintInfo = info;
}
/**
* @return PrintInfo
*/
public ArchiveInfo getPrintInfo()
{
return m_... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\LayoutEngine.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Integer add() {
for(int i=0;i<10000;i++) {
String key = "Resume:company:" + getChineseName();
redisTemplate.opsForValue().set(key, i);
}
return 1000;
}
@Override
public Integer del() {
// redisTemplate.
return null;
}
@Overrid... | private static String getChineseName() {
int index=getNum(0, firstName.length()-1);
String first=firstName.substring(index, index+1);
int sex=getNum(0,1);
String str=boy;
int length=boy.length();
if(sex==0){
str=girl;
length=girl.length();
... | repos\spring-boot-quick-master\quick-redies\src\main\java\com\quick\redis\service\impl\CompanyServiceImpl.java | 2 |
请完成以下Java代码 | public String getType() {
return type;
}
@Override
public void setType(String type) {
this.type = type;
}
@Override
public String getTaskId() {
return taskId;
}
@Override
public void setTaskId(String taskId) {
this.taskId = taskId;
}
@Overr... | return content;
}
@Override
public void setContent(ByteArrayEntity content) {
this.content = content;
}
@Override
public void setUserId(String userId) {
this.userId = userId;
}
@Override
public String getUserId() {
return userId;
}
@Override
pu... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\AttachmentEntityImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class RestClientRegistrationClientConfig {
@Bean
@ConditionalOnMissingBean
public RegistrationClient registrationClient(ClientProperties client, RestClient.Builder restClientBuilder,
ClientHttpRequestFactoryBuilder<?> clientHttpRequestFactoryBuilder) {
var factorySettings = ClientHttpRequest... | @Configuration(proxyBeanMethods = false)
@ConditionalOnBean(WebClient.Builder.class)
public static class ReactiveRegistrationClientConfig {
@Bean
@ConditionalOnMissingBean
public RegistrationClient registrationClient(ClientProperties client, WebClient.Builder webClient) {
if (client.getUsername() != null &&... | repos\spring-boot-admin-master\spring-boot-admin-client\src\main\java\de\codecentric\boot\admin\client\config\SpringBootAdminClientAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public ImmutableSet<PriceListId> filterAndListIds(@NonNull final Set<CountryId> countryIds)
{
return filterAndStreamIds(countryIds)
.collect(ImmutableSet.toImmutableSet());
}
public Stream<PriceListId> filterAndStreamIds(@NonNull final Set<CountryId> countryIds)
{
Check.assumeNotEmpty(countryIds, "countryI... | {
if (countryIds == null)
{
return true;
}
final CountryId priceListCountryId = CountryId.ofRepoIdOrNull(priceList.getC_Country_ID());
if (priceListCountryId == null && acceptNoCountry)
{
return true;
}
if (countryIds.isEmpty())
{
return priceListCountryId == null;
}
else
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\service\PriceListsCollection.java | 2 |
请完成以下Java代码 | public ComparatorChain<T> addComparator(Comparator<T> cmp)
{
final boolean reverse = false;
return addComparator(cmp, reverse);
}
public ComparatorChain<T> addComparator(Comparator<T> cmp, boolean reverse)
{
Check.assumeNotNull(cmp, "cmp not null");
if (reverse)
{
comparators.add(new ReverseComparator... | for (final Comparator<T> cmp : comparators)
{
final int result = cmp.compare(o1, o2);
if (result != 0)
{
return result;
}
}
// assuming that objects are equal if none of child comparators said otherwise
return 0;
}
@Override
public String toString()
{
return "ComparatorChain [comparators... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\comparator\ComparatorChain.java | 1 |
请完成以下Java代码 | protected POInfo initPO (Properties ctx)
{
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
return poi;
}
public String toString()
{
StringBuffer sb = new StringBuffer ("X_AD_LabelPrinter[")
.append(get_ID()).append("]");
return sb.toString();
}
/** Se... | {
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_LabelPrinter.java | 1 |
请完成以下Spring Boot application配置 | spring:
application:
name: user-service-consumer
# dubbo 配置项,对应 DubboConfigurationProperties 配置类
dubbo:
# Dubbo 应用配置
application:
name: ${spring.application.name} # 应用名
# Dubbo 注册中心配置
registry:
address: zookeeper://127.0.0.1:2181 # 注册中心地址。个鞥多注册中心,可见 http://dubbo.apache.org/ | zh-cn/docs/user/references/registry/introduction.html 文档。
# Dubbo 服务提供者的配置,对应 ConsumerConfig 类
consumer:
filter: tracing | repos\SpringBoot-Labs-master\lab-40\lab-40-zipkin-dubbo\lab-40-zipkin-dubbo-consumer\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Times Dunned.
@param TimesDunned
Number of times dunned previously
*/
pub... | return ii.intValue();
}
/** Set Total Amount.
@param TotalAmt
Total Amount
*/
public void setTotalAmt (BigDecimal TotalAmt)
{
set_Value (COLUMNNAME_TotalAmt, TotalAmt);
}
/** Get Total Amount.
@return Total Amount
*/
public BigDecimal getTotalAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(CO... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DunningRunLine.java | 1 |
请完成以下Java代码 | public void setMSGRAPH_ClientId (final @Nullable java.lang.String MSGRAPH_ClientId)
{
set_Value (COLUMNNAME_MSGRAPH_ClientId, MSGRAPH_ClientId);
}
@Override
public java.lang.String getMSGRAPH_ClientId()
{
return get_ValueAsString(COLUMNNAME_MSGRAPH_ClientId);
}
@Override
public void setMSGRAPH_ClientSecr... | public void setSMTPPort (final int SMTPPort)
{
set_Value (COLUMNNAME_SMTPPort, SMTPPort);
}
@Override
public int getSMTPPort()
{
return get_ValueAsInt(COLUMNNAME_SMTPPort);
}
/**
* Type AD_Reference_ID=541904
* Reference name: AD_MailBox_Type
*/
public static final int TYPE_AD_Reference_ID=541904;... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_MailBox.java | 1 |
请完成以下Java代码 | public class BackupCodeTwoFaAccountConfig extends TwoFaAccountConfig {
@NotEmpty
private Set<String> codes;
@Override
public TwoFaProviderType getProviderType() {
return TwoFaProviderType.BACKUP_CODE;
}
@JsonGetter("codes")
private Set<String> getCodesForJson() {
if (seri... | } else {
return null;
}
}
@JsonGetter
private Integer getCodesLeft() {
if (codes != null) {
return codes.size();
} else {
return null;
}
}
} | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\security\model\mfa\account\BackupCodeTwoFaAccountConfig.java | 1 |
请完成以下Java代码 | private static void addKeyToQueryBuilder(final BPartnerCompositeLookupKey bpartnerLookupKey, final BPartnerQueryBuilder queryBuilder)
{
final JsonExternalId jsonExternalId = bpartnerLookupKey.getJsonExternalId();
if (jsonExternalId != null)
{
queryBuilder.externalId(JsonConverters.fromJsonOrNull(jsonExternalI... | }
final GlnWithLabel glnWithLabel = bpartnerLookupKey.getGlnWithLabel();
if (glnWithLabel != null)
{
queryBuilder.gln(glnWithLabel.getGln());
queryBuilder.glnLookupLabel(glnWithLabel.getLabel());
}
final MetasfreshId metasfreshId = bpartnerLookupKey.getMetasfreshId();
if (metasfreshId != null)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\utils\BPartnerQueryService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException
{
if (getAccessToken() == null || getAccessToken().equals(requestAccessToken))
{
try
{
OAuthJSONAccessTokenResponse accessTokenResponse = oAuthClient.accessToken(tokenRequestBuilder.buildBodyMessage());
if (ac... | {
return tokenRequestBuilder;
}
public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder)
{
this.tokenRequestBuilder = tokenRequestBuilder;
}
// Applying authorization to parameters is performed in the retryingIntercept method
@Override
public void applyToParams(List<Pair> queryParams, Ma... | 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\invoker\auth\RetryingOAuth.java | 2 |
请完成以下Java代码 | protected Transaction getTransaction() {
try {
return transactionManager.getTransaction();
} catch (Exception e) {
throw LOG.exceptionWhileInteractingWithTransaction("getting transaction", e);
}
}
@Override
protected boolean isTransactionActiveInternal() throws Exception {
return tran... | super(transactionState, transactionListener, commandContext);
}
@Override
protected boolean isRolledBack(int status) {
return Status.STATUS_ROLLEDBACK == status;
}
@Override
protected boolean isCommitted(int status) {
return Status.STATUS_COMMITTED == status;
}
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\jta\JakartaTransactionContext.java | 1 |
请完成以下Java代码 | public I_M_PriceList_Version getPLV()
{
return plv;
}
/* package */void setPlv(I_M_PriceList_Version plv)
{
this.plv = plv;
}
private final void loadQtysIfNeeded()
{
final IUOMDAO uomDAO = Services.get(IUOMDAO.class);
if (_loaded)
{
return;
}
final I_M_InOutLine firstInOutLine = inOutLines.g... | final I_M_InOut inOutRecord = inoutLine.getM_InOut();
// task 09117: we only may count iol that are not reversed, in progress of otherwise "not relevant"
final I_M_InOut inout = inoutLine.getM_InOut();
final DocStatus inoutDocStatus = DocStatus.ofCode(inout.getDocStatus());
if (!inoutDocStatus.isCompletedO... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\InOutLineAsVendorReceipt.java | 1 |
请完成以下Java代码 | public void setAD_User_ID (final int AD_User_ID)
{
if (AD_User_ID < 0)
set_ValueNoCheck (COLUMNNAME_AD_User_ID, null);
else
set_ValueNoCheck (COLUMNNAME_AD_User_ID, AD_User_ID);
}
@Override
public int getAD_User_ID()
{
return get_ValueAsInt(COLUMNNAME_AD_User_ID);
}
@Override
public void setDoc... | }
/**
* Type AD_Reference_ID=541967
* Reference name: Document_Acct_Log_Type
*/
public static final int TYPE_AD_Reference_ID=541967;
/** Enqueued = enqueued */
public static final String TYPE_Enqueued = "enqueued";
/** Posting Done = posting_ok */
public static final String TYPE_PostingDone = "posting_ok"... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_Document_Acct_Log.java | 1 |
请完成以下Java代码 | public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Report Line Set.
@param PA_ReportLineSet_ID Report Line Set */
public void setPA_ReportLineSet_ID (int PA_ReportLineSet_ID)
{
if (PA_ReportLineSet_ID < 1)
set_ValueNoCheck (COLUMNNAME_PA_ReportLin... | /** Get Process Now.
@return Process Now */
public boolean isProcessing ()
{
Object oo = get_Value(COLUMNNAME_Processing);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_ReportLineSet.java | 1 |
请完成以下Java代码 | public BigInteger getKtoNr() {
return ktoNr;
}
public void setKtoNr(BigInteger ktoNr) {
this.ktoNr = ktoNr;
}
public BigInteger getBlz() {
return blz;
}
public void setBlz(BigInteger blz) {
this.blz = blz;
}
public String getAuftragsreferenzNr() {
return auftragsreferenzNr;
}
public void setAuftrags... | this.anfangsSaldo = anfangsSaldo;
}
public Saldo getSchlussSaldo() {
return schlussSaldo;
}
public void setSchlussSaldo(Saldo schlussSaldo) {
this.schlussSaldo = schlussSaldo;
}
public Saldo getAktuellValutenSaldo() {
return aktuellValutenSaldo;
}
public void setAktuellValutenSaldo(Saldo aktuellValutenSal... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java\de\schaeffer\compiere\mt940\Bankstatement.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String profile(HttpServletRequest request) {
Long loginUserId = (long) request.getSession().getAttribute("loginUserId");
Admin adminUser = adminService.getUserDetailById(loginUserId);
if (adminUser == null) {
return "admin/login";
}
request.setAttribute("path",... | @PostMapping("/profile/name")
@ResponseBody
public String nameUpdate(HttpServletRequest request, @RequestParam("loginUserName") String loginUserName,
@RequestParam("nickName") String nickName) {
if (!StringUtils.hasText(loginUserName) || !StringUtils.hasText(nickName)) {
... | repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\controller\admin\AdminController.java | 2 |
请完成以下Java代码 | private static class SLF4JAsGraphLoggerAdapter implements ILogger
{
@NonNull private final Logger logger;
@Override
public void setLoggingLevel(@NonNull final LoggerLevel level)
{
switch (level)
{
case ERROR:
LogManager.setLoggerLevel(logger, Level.WARN);
break;
case DEBUG:
default... | }
@Override
public void logDebug(@NonNull final String message)
{
logger.debug(message);
}
@Override
public void logError(@NonNull final String message, @Nullable final Throwable throwable)
{
logger.warn(message, throwable);
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\email\sender\MicrosoftGraphMailSender.java | 1 |
请完成以下Java代码 | public IScriptScanner createScriptScannerByFilename(final String filename)
{
final IFileRef fileRef = new FileRef(new File(filename));
final IScriptScanner scriptScanner = createScriptScanner(fileRef);
if (scriptScanner == null)
{
throw new RuntimeException("No script scanner found for " + filename);
}
... | for (final ScriptType scriptType : scriptExecutorFactory.getSupportedScriptTypes())
{
registerScriptScannerClass(scriptType.getFileExtension(), SingletonScriptScanner.class);
}
}
private static final String normalizeFileExtension(final String fileExtension)
{
return fileExtension.trim().toLowerCase();
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\scanner\impl\ScriptScannerFactory.java | 1 |
请完成以下Java代码 | public ProcessId getProcessId()
{
return processDescriptor.getProcessId();
}
public AdProcessId getReportAdProcessId()
{
return huProcessDescriptor.getProcessId();
}
public DocumentEntityDescriptor getParametersDescriptor()
{
return processDescriptor.getParametersDescriptor();
}
public WebuiRelatedPro... | return WebuiRelatedProcessDescriptor.builder()
.processId(processDescriptor.getProcessId())
.internalName(processDescriptor.getInternalName())
.processCaption(processDescriptor.getCaption())
.processDescription(processDescriptor.getDescription())
.displayPlace(DisplayPlace.ViewQuickActions)
.pre... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\report\WebuiHUProcessDescriptor.java | 1 |
请完成以下Java代码 | protected List<ConsumerSeekCallback> getSeekCallbacksFor(TopicPartition topicPartition) {
return this.topicToCallbacks.get(topicPartition);
}
/**
* The map of callbacks for all currently assigned partitions.
* @return the map.
* @since 3.3
*/
protected Map<TopicPartition, List<ConsumerSeekCallback>> getTop... | public void seekToBeginning() {
getCallbacksAndTopics().forEach(ConsumerSeekCallback::seekToBeginning);
}
/**
* Seek all assigned partitions to the end.
* @since 2.6
*/
public void seekToEnd() {
getCallbacksAndTopics().forEach(ConsumerSeekCallback::seekToEnd);
}
/**
* Seek all assigned partitions to ... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\AbstractConsumerSeekAware.java | 1 |
请完成以下Java代码 | public void setQty (BigDecimal Qty)
{
set_Value (COLUMNNAME_Qty, Qty);
}
/** Get Quantity.
@return Quantity
*/
public BigDecimal getQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty);
if (bd == null)
return Env.ZERO;
return bd;
}
public I_W_Basket getW_Basket() throws RuntimeExcep... | */
public int getW_Basket_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_W_Basket_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Basket Line.
@param W_BasketLine_ID
Web Basket Line
*/
public void setW_BasketLine_ID (int W_BasketLine_ID)
{
if (W_BasketLine_ID < 1)
set_... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_BasketLine.java | 1 |
请完成以下Java代码 | public void add(Element element) {
elements.add(element);
}
public String attribute(String name) {
if (attributeMap.containsKey(name)) {
return attributeMap.get(name).getValue();
}
return null;
}
public Set<String> attributes() {
return attributeMap.keySet();
}
public String att... | public String getUri() {
return uri;
}
public String getTagName() {
return tagName;
}
public int getLine() {
return line;
}
public int getColumn() {
return column;
}
/**
* Due to the nature of SAX parsing, sometimes the characters of an element
* are not processed at once. So inste... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\util\xml\Element.java | 1 |
请完成以下Java代码 | public int getEXP_Processor_Type_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_EXP_Processor_Type_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Comment/Help.
@param Help
Comment or Hint
*/
public void setHelp (String Help)
{
set_Value (COLUMNNAME_Help, Help);
}
/** Ge... | */
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Set Search Key.
@param Value
Search key for the record in the format required - must be unique
*/
public void setValue (String Value)
{
set_Value (COLUMNNAME_Value, Value);
}
/** Get Search Key.
@return Search key fo... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_EXP_Processor_Type.java | 1 |
请完成以下Java代码 | public void setDateInvoiced (java.sql.Timestamp DateInvoiced)
{
set_ValueNoCheck (COLUMNNAME_DateInvoiced, DateInvoiced);
}
@Override
public java.sql.Timestamp getDateInvoiced()
{
return get_ValueAsTimestamp(COLUMNNAME_DateInvoiced);
}
@Override
public void setdocument (java.lang.String document)
{
se... | public java.lang.String getFirstname()
{
return (java.lang.String)get_Value(COLUMNNAME_Firstname);
}
@Override
public void setGrandTotal (java.math.BigDecimal GrandTotal)
{
set_ValueNoCheck (COLUMNNAME_GrandTotal, GrandTotal);
}
@Override
public java.math.BigDecimal getGrandTotal()
{
BigDecimal bd = ... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_RV_Prt_Bericht_Statistik_List_Per_Org.java | 1 |
请完成以下Java代码 | public class ModelApiResponse {
@JsonProperty("code")
private Integer code = null;
@JsonProperty("type")
private String type = null;
@JsonProperty("message")
private String message = null;
public ModelApiResponse code(Integer code) {
this.code = code;
return this;
}
/**
* Get code
*... | public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Mode... | repos\tutorials-master\spring-swagger-codegen-modules\spring-swagger-codegen-api-client\src\main\java\com\baeldung\petstore\client\model\ModelApiResponse.java | 1 |
请完成以下Java代码 | public class C_Doc_Outbound_CreatePDF extends JavaProcess
{
private final IQueueProcessorFactory queueProcessorFactory = Services.get(IQueueProcessorFactory.class);
private final IQueueDAO queueDAO = Services.get(IQueueDAO.class);
private final QueueProcessorService queueProcessorService = SpringContextHolder.insta... | {
final Properties ctx = getCtx();
final I_C_Queue_PackageProcessor packageProcessor = queueDAO.retrievePackageProcessorDefByClass(ctx, DocOutboundWorkpackageProcessor.class);
final QueuePackageProcessorId packageProcessorId = QueuePackageProcessorId.ofRepoId(packageProcessor.getC_Queue_PackageProcessor_ID());
... | repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\process\C_Doc_Outbound_CreatePDF.java | 1 |
请完成以下Java代码 | public void setI_IsImported (boolean I_IsImported)
{
set_Value (COLUMNNAME_I_IsImported, Boolean.valueOf(I_IsImported));
}
/** Get Importiert.
@return Ist dieser Import verarbeitet worden?
*/
@Override
public boolean isI_IsImported ()
{
Object oo = get_Value(COLUMNNAME_I_IsImported);
if (oo != null) ... | {
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set URL3.
@param URL3
Vollständige Web-Addresse, z.B. https://metasfresh.com/
*/
@Override
public void setURL3 (java.lang.String URL3)
{
set_Value (COLUMNNAME_URL3, URL3);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_BPartner_GlobalID.java | 1 |
请完成以下Java代码 | public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Relative Priority.
@param PromotionPriority
... | {
set_Value (COLUMNNAME_PromotionPriority, Integer.valueOf(PromotionPriority));
}
/** Get Relative Priority.
@return Which promotion should be apply to a product
*/
public int getPromotionPriority ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_PromotionPriority);
if (ii == null)
return 0;
return... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Promotion.java | 1 |
请完成以下Java代码 | public void setIsNextBusinessDay (final boolean IsNextBusinessDay)
{
set_Value (COLUMNNAME_IsNextBusinessDay, IsNextBusinessDay);
}
@Override
public boolean isNextBusinessDay()
{
return get_ValueAsBoolean(COLUMNNAME_IsNextBusinessDay);
}
@Override
public void setIsValid (final boolean IsValid)
{
set_V... | /** Friday = 5 */
public static final String NETDAY_Friday = "5";
/** Saturday = 6 */
public static final String NETDAY_Saturday = "6";
@Override
public void setNetDay (final @Nullable java.lang.String NetDay)
{
set_Value (COLUMNNAME_NetDay, NetDay);
}
@Override
public java.lang.String getNetDay()
{
ret... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PaymentTerm.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static PrefixBasedMethodMatcher fromClass(String className, String method) {
int lastDotIndex = method.lastIndexOf(".");
Assert.isTrue(lastDotIndex != -1 || StringUtils.hasText(className),
() -> "'" + method + "' is not a valid method name: format is FQN.methodName");
if (lastDotIndex == -1) {
Class<?> jav... | }
@Override
public boolean matches(Method method, Class<?> targetClass, Object... args) {
return matches(this.methodPrefix, method.getName());
}
private boolean matches(String mappedName, String methodName) {
boolean equals = methodName.equals(mappedName);
return equals || prefixMatches(mappedName, methodNa... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\method\PrefixBasedMethodMatcher.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class LocalStorageConfiguration {
private final StorageProperties storageProperties;
public LocalStorageConfiguration(StorageProperties storageProperties) {
this.storageProperties = storageProperties;
}
@Bean
public BlobStore blobStore() {
Properties properties = ne... | .awsAuthentication(AuthenticationType.NONE, null, null)
.blobStore(blobStore)
.endpoint(URI.create(storageProperties.getProxyEndpoint()))
.build();
}
@Bean
public S3Client s3Client() {
return S3Client
.builder()
.region(Region.US_EAST_1)
... | repos\tutorials-master\aws-modules\s3proxy\src\main\java\com\baeldung\s3proxy\LocalStorageConfiguration.java | 2 |
请完成以下Java代码 | public class Stack<E> {
private E[] stackContent;
private int total;
public Stack(int capacity) {
this.stackContent = (E[]) new Object[capacity];
}
public void push(E data) {
System.out.println("In base stack push#");
if (total == stackContent.length) {
resize(... | E datum = stackContent[total];
stackContent[total--] = null;
return datum;
}
return null;
}
private void resize(int capacity) {
Arrays.copyOf(stackContent, capacity);
}
public boolean isEmpty() {
return total == 0;
}
} | repos\tutorials-master\core-java-modules\core-java-lang-oop-generics\src\main\java\com\baeldung\typeerasure\Stack.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable Set<String> getInclude() {
return this.include;
}
public void setInclude(@Nullable Set<String> include) {
this.include = include;
}
public @Nullable Set<String> getExclude() {
return this.exclude;
}
public void setExclude(@Nullable Set<String> exclude) {
this.exclude = exclud... | * Health logging properties.
*/
public static class Logging {
/**
* Threshold after which a warning will be logged for slow health indicators.
*/
private Duration slowIndicatorThreshold = Duration.ofSeconds(10);
public Duration getSlowIndicatorThreshold() {
return this.slowIndicatorThreshold;
}
... | repos\spring-boot-4.0.1\module\spring-boot-health\src\main\java\org\springframework\boot\health\autoconfigure\actuate\endpoint\HealthEndpointProperties.java | 2 |
请完成以下Java代码 | public Criteria andSourceTypeBetween(Integer value1, Integer value2) {
addCriterion("source_type between", value1, value2, "sourceType");
return (Criteria) this;
}
public Criteria andSourceTypeNotBetween(Integer value1, Integer value2) {
addCriterion("source_type not... | return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsIntegrationChangeHistoryExample.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void onApplicationEvent(ContextRefreshedEvent event) {
if (alreadySetup) {
return;
}
// == create initial privileges
Privilege readPrivilege = createPrivilegeIfNotFound("READ_PRIVILEGE");
Privilege writePrivilege = createPrivilegeIfNotFound("WRITE_PRIVILEGE");... | Privilege privilege = privilegeRepository.findByName(name);
if (privilege == null) {
privilege = new Privilege(name);
privilegeRepository.save(privilege);
}
return privilege;
}
@Transactional
public Role createRoleIfNotFound(String name, Collection<Privilege>... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\rolesauthorities\persistence\SetupDataLoader.java | 2 |
请完成以下Spring Boot application配置 | ---
logging:
file:
name: "target/boot-admin-sample-hazelcast.log"
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS
spring:
application:
name: spring-boot-admin-sample-hazelcast
boot | :
admin:
client:
url: http://localhost:${server.port:8080}
profiles:
active:
- insecure | repos\spring-boot-admin-master\spring-boot-admin-samples\spring-boot-admin-sample-hazelcast\src\main\resources\application.yml | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getHost() {
return this.host;
}
public void setHost(String host) {
this.host = host;
}
public Integer getPort() {
return this.port;
}
public void setPort(Integer port) {
this.port = port;
}
public GraphiteProtocol getProtocol() {
return this.protocol;
}
public void setProtocol(Gra... | return (this.graphiteTagsEnabled != null) ? this.graphiteTagsEnabled : ObjectUtils.isEmpty(this.tagsAsPrefix);
}
public void setGraphiteTagsEnabled(Boolean graphiteTagsEnabled) {
this.graphiteTagsEnabled = graphiteTagsEnabled;
}
public String[] getTagsAsPrefix() {
return this.tagsAsPrefix;
}
public void se... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\graphite\GraphiteProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | void configure(ObservationRegistry registry) {
registerObservationPredicates(registry);
registerGlobalObservationConventions(registry);
registerHandlers(registry);
registerFilters(registry);
customize(registry);
}
private void registerHandlers(ObservationRegistry registry) {
ObservationHandlerGroups grou... | private void registerGlobalObservationConventions(ObservationRegistry registry) {
this.observationConventions.orderedStream().forEach(registry.observationConfig()::observationConvention);
}
private void registerFilters(ObservationRegistry registry) {
this.observationFilters.orderedStream().forEach(registry.obser... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-observation\src\main\java\org\springframework\boot\micrometer\observation\autoconfigure\ObservationRegistryConfigurer.java | 2 |
请完成以下Java代码 | private int extractSequenceId(
@NonNull final ProductCategoryId productCategoryId,
@NonNull final Set<ProductCategoryId> seenIds)
{
final I_M_Product_Category productCategory = loadOutOfTrx(productCategoryId, I_M_Product_Category.class);
final int adSequenceId = productCategory.getAD_Sequence_ProductValue_I... | // first, guard against a loop
if (!seenIds.add(productCategoryParentId))
{
// there is no AD_Sequence_ID for us
return -1;
}
// recurse
return extractSequenceId(productCategoryParentId, seenIds);
}
// there is no AD_Sequence_ID for us
return -1;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\sequence\ProductValueSequenceProvider.java | 1 |
请完成以下Java代码 | public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ID/ColumnName pair
*/
public KeyNam... | set_ValueNoCheck (COLUMNNAME_R_StatusCategory_ID, null);
else
set_ValueNoCheck (COLUMNNAME_R_StatusCategory_ID, Integer.valueOf(R_StatusCategory_ID));
}
/** Get Status Category.
@return Request Status Category
*/
public int getR_StatusCategory_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_R_Stat... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_StatusCategory.java | 1 |
请完成以下Java代码 | public ResponseEntity follow(
@PathVariable("username") String username, @AuthenticationPrincipal User user) {
return userRepository
.findByUsername(username)
.map(
target -> {
FollowRelation followRelation = new FollowRelation(user.getId(), target.getId());
... | userRepository.removeRelation(relation);
return profileResponse(profileQueryService.findByUsername(username, user).get());
})
.orElseThrow(ResourceNotFoundException::new);
} else {
throw new ResourceNotFoundException();
}
}
private ResponseEntity profileRespons... | repos\spring-boot-realworld-example-app-master\src\main\java\io\spring\api\ProfileApi.java | 1 |
请完成以下Java代码 | public class AtomicOperationProcessEnd extends AbstractEventAtomicOperation {
private static final Logger LOGGER = LoggerFactory.getLogger(AtomicOperationProcessEnd.class);
@Override
protected ScopeImpl getScope(InterpretableExecution execution) {
return execution.getProcessDefinition();
}
... | execution.destroy();
execution.remove();
// and trigger execution afterwards
if (superExecution != null) {
superExecution.setSubProcessInstance(null);
try {
subProcessActivityBehavior.completed(superExecution);
} catch (RuntimeException e) {
... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\pvm\runtime\AtomicOperationProcessEnd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public PersistenceExceptionTranslationPostProcessor exceptionTranslation() {
return new PersistenceExceptionTranslationPostProcessor();
}
@Bean
public IBarService barJpaService() {
return new BarJpaService();
}
@Bean
public IBarService barSpringDataJpaService() {
return... | }
@Bean
public IFooDao fooHibernateDao() {
return new FooDao();
}
@Bean
public IFooAuditableDao fooHibernateAuditableDao() {
return new FooAuditableDao();
}
private final Properties hibernateProperties() {
final Properties hibernateProperties = new Properties();
... | repos\tutorials-master\persistence-modules\spring-data-jpa-query\src\main\java\com\baeldung\hibernate\audit\PersistenceConfig.java | 2 |
请完成以下Java代码 | public class EmbeddedMongoDBSetup {
private static final String MONGODB_HOST = "localhost";
private static final int MONGODB_PORT = 27019;
private static final MongodStarter starter = MongodStarter.getDefaultInstance();
private static MongodExecutable _mongodExe;
private static MongodProcess _mong... | private void initdb() throws IOException {
_mongodExe = starter.prepare(new MongodConfigBuilder()
.version(Version.Main.DEVELOPMENT)
.net(new Net(MONGODB_HOST, MONGODB_PORT, Network.localhostIsIPv6()))
.build());
_mongod = _mongodExe.start();
}
pu... | repos\tutorials-master\persistence-modules\jnosql\jnosql-artemis\src\main\java\com\baeldung\jnosql\artemis\EmbeddedMongoDBSetup.java | 1 |
请完成以下Java代码 | public Optional<GTIN> getGTIN()
{
final GS1Element element = byApplicationIdentifier.get(GS1ApplicationIdentifier.GTIN);
if (element == null)
{
return Optional.empty();
}
return GTIN.optionalOfNullableString(element.getValueAsString());
}
public Optional<BigDecimal> getWeightInKg()
{
final GS1Eleme... | {
return Optional.empty();
}
return Optional.of(element.getValueAsLocalDate());
}
public Optional<String> getLotNumber()
{
final GS1Element element = byApplicationIdentifier.get(GS1ApplicationIdentifier.BATCH_OR_LOT_NUMBER);
if (element == null)
{
return Optional.empty();
}
return Optional.of(... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\gs1\GS1Elements.java | 1 |
请完成以下Java代码 | public static int modPower(int base, int exp) {
int result = 1;
int b = base;
while (exp > 0) {
if ((exp & 1) == 1) {
result = minSymmetricMod((long) minSymmetricMod(result) * (long) minSymmetricMod(b));
}
b = minSymmetricMod((long) minSymmetri... | int x = result[2];
int y = result[1] - (a / b) * result[2];
return new int[] { gcd, x, y };
}
public static int modInverse(int a) {
int[] result = extendedGcd(a, MOD);
int x = result[1];
return mod(x);
}
public static int modDivide(int a, int b) {
return... | repos\tutorials-master\core-java-modules\core-java-lang-math-4\src\main\java\com\baeldung\math\moduloarithmetic\ModularArithmetic.java | 1 |
请完成以下Java代码 | public void addOutput(OutputClause output) {
this.outputs.add(output);
}
public List<DecisionRule> getRules() {
return rules;
}
public void addRule(DecisionRule rule) {
this.rules.add(rule);
}
public HitPolicy getHitPolicy() {
return hitPolicy;
}
publi... | public DecisionTableOrientation getPreferredOrientation() {
return preferredOrientation;
}
public void setPreferredOrientation(DecisionTableOrientation preferredOrientation) {
this.preferredOrientation = preferredOrientation;
}
public String getOutputLabel() {
return outputLabe... | repos\flowable-engine-main\modules\flowable-dmn-model\src\main\java\org\flowable\dmn\model\DecisionTable.java | 1 |
请完成以下Java代码 | public boolean canMap(Object parameter) {
return parameter != null;
}
public String writeValue(Object value) {
try {
StringWriter stringWriter = new StringWriter();
objectMapper.writeValue(stringWriter, value);
return stringWriter.toString();
}
catch (IOException e) {
throw ... | }
}
public JavaType constructJavaTypeFromCanonicalString(String canonicalString) {
try {
return TypeFactory.defaultInstance().constructFromCanonical(canonicalString);
}
catch (IllegalArgumentException e) {
throw LOG.unableToConstructJavaType(canonicalString, e);
}
}
public String g... | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\variable\impl\format\json\JacksonJsonDataFormat.java | 1 |
请完成以下Java代码 | public static void main(String[] args) throws IOException {
InputStream inputStream = XmlPrettyPrinter.class.getResourceAsStream("/xml/emails.xml");
String xmlString = readFromInputStream(inputStream);
System.out.println("Pretty printing by Transformer");
System.out.println("============... | InputStream inputStream = XmlPrettyPrinter.class.getResourceAsStream("/xml/prettyprint.xsl");
return readFromInputStream(inputStream);
}
private static String readFromInputStream(InputStream inputStream) throws IOException {
StringBuilder resultStringBuilder = new StringBuilder();
try (... | repos\tutorials-master\xml-modules\xml\src\main\java\com\baeldung\xml\prettyprint\XmlPrettyPrinter.java | 1 |
请完成以下Java代码 | private void updateProductFromResource(@NonNull final I_M_Product product, @NonNull final I_S_Resource from)
{
product.setProductType(X_M_Product.PRODUCTTYPE_Resource);
product.setS_Resource_ID(from.getS_Resource_ID());
product.setIsActive(from.isActive());
product.setValue("PR" + from.getValue()); // the "PR... | final IQueryBL queryBL = Services.get(IQueryBL.class);
return queryBL.createQueryBuilder(I_S_Resource.class)
.addOnlyActiveRecordsFilter()
.addEqualsFilter(I_S_Resource.COLUMNNAME_AD_User_ID, userId)
.create()
.idsAsSet(ResourceId::ofRepoId);
}
@Override
public ImmutableSet<ResourceId> getResource... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\impl\ResourceDAO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class RelatedSubscriptionsForOrdersProvider implements RelatedRecordsProvider
{
@Override
public SourceRecordsKey getSourceRecordsKey()
{
return SourceRecordsKey.of(I_C_Order.Table_Name);
}
@Override
public IPair<SourceRecordsKey, List<ITableRecordReference>> provideRelatedRecords(
@NonNull final Lis... | .andCollectChildren(I_C_OrderLine.COLUMN_C_Order_ID)
.addOnlyActiveRecordsFilter()
.andCollectChildren(I_C_Flatrate_Term.COLUMN_C_OrderLine_Term_ID) // as of now, extended terms inherit their predecessor's order line ID
.addOnlyActiveRecordsFilter()
// order latest first, because we need to void them i... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\subscription\order\restart\RelatedSubscriptionsForOrdersProvider.java | 2 |
请完成以下Java代码 | public String getDisabledReason(final String adLanguage)
{
return getPreconditionsResolution().getRejectReason().translate(adLanguage);
}
public Map<String, Object> getDebugProperties()
{
final ImmutableMap.Builder<String, Object> debugProperties = ImmutableMap.builder();
if (debugProcessClassname != null)
... | final Stopwatch stopwatch = Stopwatch.createStarted();
final T value = supplier.get();
final Duration duration = Duration.ofNanos(stopwatch.stop().elapsed(TimeUnit.NANOSECONDS));
return new ValueAndDuration<>(value, duration);
}
T value;
Duration duration;
private ValueAndDuration(final T value, fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\descriptor\WebuiRelatedProcessDescriptor.java | 1 |
请完成以下Java代码 | public void invalidateShipmentSchedules(final I_M_Shipment_Constraint constraint, final ModelChangeType changeType)
{
final Set<IShipmentScheduleSegment> affectedStorageSegments = extractAffectedStorageSegments(constraint, changeType);
if (affectedStorageSegments.isEmpty())
{
return;
}
final IShipmentSch... | if (constraintOld.isActive())
{
storageSegments.add(createStorageSegment(constraintOld));
}
}
return storageSegments;
}
private static IShipmentScheduleSegment createStorageSegment(final I_M_Shipment_Constraint constraint)
{
return ImmutableShipmentScheduleSegment.builder()
.anyBPartner()
.... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\modelvalidator\M_Shipment_Constraint.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void createDefaultNotificationConfigs() {
log.info("Creating default notification configs for system admin");
if (notificationTargetService.countNotificationTargetsByTenantId(TenantId.SYS_TENANT_ID) == 0) {
notificationSettingsService.createDefaultNotificationConfigs(TenantId.SYS_TENA... | if (updateTenants) {
PageDataIterable<TenantId> tenants = new PageDataIterable<>(tenantService::findTenantsIds, 500);
ExecutorService executor = Executors.newFixedThreadPool(Math.max(Runtime.getRuntime().availableProcessors(), 4));
AtomicInteger count = new AtomicInteger();
... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\install\DefaultSystemDataLoaderService.java | 2 |
请完成以下Java代码 | public void setWriteListener(WriteListener listener) {
}
@Override
public boolean isReady() {
return true;
}
};
}
public ServletInputStream getInputStream() {
ByteArrayInputStream body = new ByteArrayInputStream(builder.toString().getBytes());
return new ServletInputStream() {
@Override
... | public void setReadListener(ReadListener listener) {
}
@Override
public boolean isReady() {
return true;
}
@Override
public boolean isFinished() {
return body.available() <= 0;
}
};
}
} | repos\spring-cloud-gateway-main\spring-cloud-gateway-proxyexchange-webmvc\src\main\java\org\springframework\cloud\gateway\mvc\ProxyExchange.java | 1 |
请完成以下Java代码 | public void afterPropertiesSet() throws Exception {
}
public ClientConfiguration getClientConfiguration() {
return clientConfiguration;
}
public void setClientConfiguration(ClientConfiguration clientConfiguration) {
this.clientConfiguration = clientConfiguration;
}
public List<ClientRequestInterc... | propertyResolver = new PropertySourcesPropertyResolver(appliedPropertySources);
}
protected String resolve(String property) {
if (propertyResolver == null) {
return property;
}
if (property != null) {
return propertyResolver.resolvePlaceholders(property);
} else {
return null;
... | repos\camunda-bpm-platform-master\spring-boot-starter\starter-client\spring\src\main\java\org\camunda\bpm\client\spring\impl\client\ClientFactory.java | 1 |
请完成以下Java代码 | public JobDefinitionQuery tenantIdIn(String... tenantIds) {
ensureNotNull("tenantIds", (Object[]) tenantIds);
this.tenantIds = tenantIds;
isTenantIdSet = true;
return this;
}
public JobDefinitionQuery withoutTenantId() {
isTenantIdSet = true;
this.tenantIds = null;
return this;
}
p... | }
@Override
public List<JobDefinition> executeList(CommandContext commandContext, Page page) {
checkQueryOk();
return commandContext
.getJobDefinitionManager()
.findJobDefnitionByQueryCriteria(this, page);
}
// getters /////////////////////////////////////////////
public String getId() ... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\JobDefinitionQueryImpl.java | 1 |
请完成以下Java代码 | public void onFailure(Throwable t) {
TbMsg next = processException(msg, t);
tellFailure(ctx, next, t);
}
},
ctx.getExternalCallExecutor());
}
private TbMsg processPublishResult(TbMsg origMsg, String messageId) {... | Publisher initPubSubClient(TbContext ctx) throws IOException {
ProjectTopicName topicName = ProjectTopicName.of(config.getProjectId(), config.getTopicName());
ServiceAccountCredentials credentials =
ServiceAccountCredentials.fromStream(
new ByteArrayInputStream(co... | repos\thingsboard-master\rule-engine\rule-engine-components\src\main\java\org\thingsboard\rule\engine\gcp\pubsub\TbPubSubNode.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.