instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public TransformsType getTransforms() {
return transforms;
}
/**
* Sets the value of the transforms property.
*
* @param value
* allowed object is
* {@link TransformsType }
*
*/
public void setTransforms(TransformsType value) {
this.transform... | * {@link String }
*
*/
public String getURI() {
return uri;
}
/**
* Sets the value of the uri property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setURI(String value) {
this.uri = value;
... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\CipherReferenceType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class Config {
private @Nullable Class inClass;
private @Nullable Predicate predicate;
private @Nullable Map<String, Object> hints;
public @Nullable Class getInClass() {
return inClass;
}
public Config setInClass(Class inClass) {
this.inClass = inClass;
return this;
}
public... | return this;
}
public <T> Config setPredicate(Class<T> inClass, Predicate<T> predicate) {
setInClass(inClass);
this.predicate = predicate;
return this;
}
public @Nullable Map<String, Object> getHints() {
return hints;
}
public Config setHints(Map<String, Object> hints) {
this.hints = hints... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\handler\predicate\ReadBodyRoutePredicateFactory.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void printAutomaticallyLetters(@NonNull final I_C_Async_Batch asyncBatch)
{
final List<IPrintingQueueSource> sources = createPrintingQueueSource(asyncBatch);
if (sources.isEmpty())
{
throw new AdempiereException("Nothing selected");
}
for (final IPrintingQueueSource source : sources)
{
source.... | }
final IPrintingQueueQuery printingQuery = printingQueueBL.createPrintingQueueQuery();
printingQuery.setFilterByProcessedQueueItems(false);
printingQuery.setOnlyAD_PInstance_ID(pinstanceId);
final Properties ctx = Env.getCtx();
// we need to make sure exists AD_Session_ID in context; if not, a new session... | repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\serialletter\src\main\java\de\metas\letter\service\SerialLetterService.java | 2 |
请完成以下Java代码 | public int getR_RequestProcessor_Route_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_R_RequestProcessor_Route_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_R_RequestType getR_RequestType() throws RuntimeException
{
return (I_R_RequestType)MTable.get(getCtx(), I_R_RequestType.... | return 0;
return ii.intValue();
}
/** Set Sequence.
@param SeqNo
Method of ordering records; lowest number comes first
*/
public void setSeqNo (int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Sequence.
@return Method of ordering records; lowest number comes first
*/... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_RequestProcessor_Route.java | 1 |
请完成以下Java代码 | public class PerformanceBenchmark {
private static final Random RANDOM = new Random();
private static final int ARRAY_SIZE = 10000;
private static final int[] randomNumbers = RANDOM.ints(ARRAY_SIZE).toArray();
private static final int[] sameNumbers = IntStream.generate(() -> 42).limit(ARRAY_SIZE).toArr... | public void quickSortRandomNumber() {
Quicksort.sort(randomNumbersSupplier.get());
}
@Benchmark
@BenchmarkMode(Mode.Throughput)
@Fork(value = 1, jvmArgs = {"-Xlog:gc:file=gc-logs-merge-sort-same-number-%t.txt,filesize=900m -Xmx6gb -Xms6gb"})
public void mergeSortSameNumber() {
MergeS... | repos\tutorials-master\core-java-modules\core-java-collections-5\src\main\java\com\baeldung\collectionsvsarrays\PerformanceBenchmark.java | 1 |
请完成以下Java代码 | public PageData<Notification> findNotificationsByRecipientIdAndReadStatus(TenantId tenantId, NotificationDeliveryMethod deliveryMethod, UserId recipientId, boolean unreadOnly, PageLink pageLink) {
if (unreadOnly) {
return notificationDao.findUnreadByDeliveryMethodAndRecipientIdAndPageLink(tenantId, ... | return notificationDao.deleteByIdAndRecipientId(tenantId, recipientId, notificationId);
}
@Override
public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) {
return Optional.ofNullable(findNotificationById(tenantId, new NotificationId(entityId.getId())));
}
@Override
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\notification\DefaultNotificationService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BookstoreService {
private final AuthorRepository authorRepository;
private final PublisherRepository publisherRepository;
public BookstoreService(AuthorRepository authorRepository,
PublisherRepository publisherRepository) {
this.authorRepository = authorRepository;
... | Book book2 = new Book();
book2.setIsbn("002-AT");
book2.setTitle("Anthology of a day");
Book book3 = new Book();
book3.setIsbn("003-AT");
book3.setTitle("Anthology today");
author1.addBook(book1); // use addBook() helper
author1.addBook(book2);
author2.a... | repos\Hibernate-SpringBoot-master\HibernateSpringBootCompositeKeyEmbeddableMapRel\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private Optional<UpsertArticleRequest> jsonProductToUpsertArticle(@NonNull final JsonProduct product)
{
if (product.getAlbertaProductInfo() == null || CollectionUtils.isEmpty(product.getAlbertaProductInfo().getPackagingUnits()))
{
return Optional.empty();
}
final Article article = new Article();
final S... | .billableTherapies(AlbertaUtil.asBigDecimalIds(albertaProductInfo.getBillableTherapies()))
.packagingUnits(toPackageUnitList(albertaProductInfo.getPackagingUnits(), pcn))
.productGroupId(albertaProductInfo.getProductGroupId());
return Optional.of(UpsertArticleRequest.builder()
.article(article)
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\de-metas-camel-alberta-camelroutes\src\main\java\de\metas\camel\externalsystems\alberta\product\processor\PrepareAlbertaArticlesProcessor.java | 2 |
请完成以下Java代码 | public PricingSystemId getPricingSystemId()
{
PricingSystemId pricingSystemId = _pricingSystemId;
if (pricingSystemId == null)
{
pricingSystemId = _pricingSystemId = PricingSystemId.ofRepoId(getC_Flatrate_Term().getM_PricingSystem_ID());
}
return pricingSystemId;
}
@Override
public I_C_Flatrate_Term g... | .getInvoiceRule();
Check.assumeNotEmpty(invoiceRule, "Unable to retrieve invoiceRule from materialTracking {}", materialTracking);
_invoiceRule = invoiceRule;
_invoiceRuleSet = true;
}
return _invoiceRule;
}
/* package */void setM_PriceList_Version(final I_M_PriceList_Version priceListVersion)
{
_p... | repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\MaterialTrackingAsVendorInvoicingInfo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public RepositoryService repositoryService(ProcessEngine processEngine) {
return processEngine.getRepositoryService();
}
@Bean
public RuntimeService runtimeService(ProcessEngine processEngine) {
return processEngine.getRuntimeService();
}
@Bean
public TaskService taskService(ProcessEngine processEngine) {
... | @Bean
public ManagementService managementService(ProcessEngine processEngine) {
return processEngine.getManagementService();
}
@Bean
public IdentityService identityService(ProcessEngine processEngine) {
return processEngine.getIdentityService();
}
@Bean
public FormService formService(ProcessEngine processE... | repos\spring-boot-quick-master\quick-flowable\src\main\java\com\quick\flowable\config\FlowableConfig.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean set(final String key, Serializable value) {
boolean result = false;
try {
ValueOperations<Serializable, Serializable> operations = redisTemplate.opsForValue();
operations.set(key, value);
result = true;
} catch (Exception e) {
e.prin... | @Override
public <K,HK,HV> boolean setMap(K key, Map<HK, HV> map, Long expireTime) {
HashOperations<K, HK, HV> operations = redisTemplate.opsForHash();
operations.putAll(key, map);
if (expireTime != null) {
redisTemplate.expire(key, expireTime, TimeUnit.SECONDS);
}
... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Order\src\main\java\com\gaoxi\order\service\RedisServiceImpl.java | 2 |
请完成以下Java代码 | public class CatchEventXMLConverter extends BaseBpmnXMLConverter {
@Override
public Class<? extends BaseElement> getBpmnElementType() {
return IntermediateCatchEvent.class;
}
@Override
protected String getXMLElementName() {
return ELEMENT_EVENT_CATCH;
}
@Override
prote... | parseChildElements(getXMLElementName(), catchEvent, model, xtr);
return catchEvent;
}
@Override
protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw)
throws Exception {}
@Override
protected void writeAdditionalChildElements(BaseElement ... | repos\Activiti-develop\activiti-core\activiti-bpmn-converter\src\main\java\org\activiti\bpmn\converter\CatchEventXMLConverter.java | 1 |
请完成以下Java代码 | public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
public String getBlog() {
return blog;
... | public void setBlog(String blog) {
this.blog = blog;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
@Override
public String toString() {
return "User{" + "login=" + login + ", id=" + id + ", url=" + u... | repos\tutorials-master\libraries-http\src\main\java\com\baeldung\retrofitguide\User.java | 1 |
请完成以下Java代码 | public static String calculateExactTimeAgoWithJodaTime(Date pastTime) {
Period period = new Period(new DateTime(pastTime.getTime()), new DateTime(getCurrentTime()));
PeriodFormatter formatter = new PeriodFormatterBuilder().appendYears()
.appendSuffix(" year ", " years ")
.appendS... | else if (period.getHours() != 0)
return "several hours ago";
else if (period.getMinutes() != 0)
return "several minutes ago";
else
return "moments ago";
}
public static String calculateZonedTimeAgoWithJodaTime(Date pastTime, TimeZone zone) {
DateTimeZ... | repos\tutorials-master\core-java-modules\core-java-date-operations-2\src\main\java\com\baeldung\timeago\version7\TimeAgoCalculator.java | 1 |
请完成以下Java代码 | public I_K_Entry getK_Entry() throws RuntimeException
{
return (I_K_Entry)MTable.get(getCtx(), I_K_Entry.Table_Name)
.getPO(getK_Entry_ID(), get_TrxName()); }
/** Set Entry.
@param K_Entry_ID
Knowledge Entry
*/
public void setK_Entry_ID (int K_Entry_ID)
{
if (K_Entry_ID < 1)
set_ValueNoCheck ... | return 0;
return ii.intValue();
}
/** Set Text Message.
@param TextMsg
Text Message
*/
public void setTextMsg (String TextMsg)
{
set_Value (COLUMNNAME_TextMsg, TextMsg);
}
/** Get Text Message.
@return Text Message
*/
public String getTextMsg ()
{
return (String)get_Value(COLUMNNAME_TextMs... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_K_Comment.java | 1 |
请完成以下Java代码 | public void setC_ConversionRate_Rule_ID (final int C_ConversionRate_Rule_ID)
{
if (C_ConversionRate_Rule_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_ConversionRate_Rule_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_ConversionRate_Rule_ID, C_ConversionRate_Rule_ID);
}
@Override
public int getC_ConversionRat... | {
set_Value (COLUMNNAME_MultiplyRate_Max, MultiplyRate_Max);
}
@Override
public BigDecimal getMultiplyRate_Max()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_MultiplyRate_Max);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setMultiplyRate_Min (final @Nullable BigDecimal M... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ConversionRate_Rule.java | 1 |
请完成以下Java代码 | public class StatementPersonDao {
private final Connection connection;
public StatementPersonDao(Connection connection) {
this.connection = connection;
}
public Optional<PersonEntity> getById(int id) throws SQLException {
String query = "SELECT id, name, FROM persons WHERE id = '" + i... | statement.executeUpdate(query);
}
public void deleteById(int id) throws SQLException {
String query = "DELETE FROM persons WHERE id = " + id;
Statement statement = connection.createStatement();
statement.executeUpdate(query);
}
public List<PersonEntity> getAll() throws SQLExce... | repos\tutorials-master\persistence-modules\core-java-persistence\src\main\java\com\baeldung\statmentVsPreparedstatment\StatementPersonDao.java | 1 |
请完成以下Java代码 | public boolean isReversal(final I_C_AllocationHdr allocationHdr)
{
if (allocationHdr == null)
{
return false;
}
if (allocationHdr.getReversal_ID() <= 0)
{
return false;
}
// the reversal is always younger than the original document
return allocationHdr.getC_AllocationHdr_ID() > allocationHdr.getR... | //
.addLine()
.orgId(invoice.getAD_Org_ID())
.bpartnerId(invoice.getC_BPartner_ID())
.invoiceId(invoice.getC_Invoice_ID())
.discountAmt(Money.toBigDecimalOrZero(discountAmt))
.writeOffAmt(Money.toBigDecimalOrZero(writeOffAmt))
.lineDone()
//
.create(true); // complete=true
}
@Over... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\allocation\api\impl\AllocationBL.java | 1 |
请完成以下Java代码 | public String toJson()
{
return idStr;
}
@Override
public int hashCode()
{
return Objects.hash(idStr);
}
@Override
public boolean equals(final Object obj)
{
if (this == obj)
{
return true;
}
if (!(obj instanceof StringDocumentId))
{
return false;
}
final StringDo... | public int toInt()
{
if (isComposedKey())
{
throw new AdempiereException("Composed keys cannot be converted to int: " + this);
}
else
{
throw new AdempiereException("String document IDs cannot be converted to int: " + this);
}
}
@Override
public boolean isNew()
{
return false;
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\DocumentId.java | 1 |
请完成以下Java代码 | public String getAttributeValueType()
{
return HUVendorBPartnerAttributeValuesProvider.ATTRIBUTEVALUETYPE;
}
@Override
public IAttributeValuesProvider createAttributeValuesProvider(final @NotNull Attribute attribute)
{
return new HUVendorBPartnerAttributeValuesProvider();
}
@Override
public Object generat... | public boolean isReadonlyUI(final IAttributeValueContext ctx, final IAttributeSet attributeSet, final org.compiere.model.I_M_Attribute attribute)
{
final I_M_HU hu = ihuAttributesBL.getM_HU_OrNull(attributeSet);
if (hu == null)
{
// If there is no HU (e.g. ASI), consider it editable
return false;
}
fi... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\org\adempiere\mm\attributes\spi\impl\HUVendorBPartnerAttributeHandler.java | 1 |
请完成以下Java代码 | private void validateJsonKeys(JsonNode userSettings) {
Iterator<String> fieldNames = userSettings.fieldNames();
while (fieldNames.hasNext()) {
String fieldName = fieldNames.next();
if (fieldName.contains(".") || fieldName.contains(",")) {
throw new DataValidationE... | var last = i == (fieldPath.length - 1);
if (last) {
node.set(fieldName, updateNode.get(fieldExpression));
} else {
if (!node.has(fieldName)) {
node.set(fieldName, JacksonUtil.newObjectNode());
}
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\user\UserSettingsServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private OAuth2Request getRequest(Map<String, Object> map) {
Map<String, Object> request = (Map<String, Object>) map.get("oauth2Request");
String clientId = (String) request.get("clientId");
Set<String> scope = new LinkedHashSet<>(request.containsKey("scope") ?
(Collection<String>) request.get("scope") : Coll... | BaseOAuth2ProtectedResourceDetails resource = new BaseOAuth2ProtectedResourceDetails();
resource.setClientId(this.clientId);
restTemplate = new OAuth2RestTemplate(resource);
}
OAuth2AccessToken existingToken = restTemplate.getOAuth2ClientContext()
.getAccessToken();
if (existingToken == null || !a... | repos\piggymetrics-master\account-service\src\main\java\com\piggymetrics\account\service\security\CustomUserInfoTokenServices.java | 2 |
请完成以下Java代码 | public TokenType getTokenType() {
return this.tokenType;
}
/**
* Returns the scope(s) associated to the token.
* @return the scope(s) associated to the token
*/
public Set<String> getScopes() {
return this.scopes;
}
/**
* Access Token Types.
*
* @see <a target="_blank" href=
* "https://tools.ie... | * @return the value of the token type
*/
public String getValue() {
return this.value;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || this.getClass() != obj.getClass()) {
return false;
}
TokenType that = (TokenType) obj;
retu... | repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\OAuth2AccessToken.java | 1 |
请完成以下Java代码 | private void onSessionDisconnectEvent(final SessionDisconnectEvent event)
{
final WebsocketSessionId sessionId = WebsocketSessionId.ofString(event.getSessionId());
final Set<WebsocketTopicName> topicNames = activeSubscriptionsIndex.removeSessionAndGetTopicNames(sessionId);
websocketProducersRegistry.onSessionDi... | final WebsocketSessionId sessionId = WebsocketSessionId.ofString(SimpMessageHeaderAccessor.getSessionId(headers));
final String simpSubscriptionId = SimpMessageHeaderAccessor.getSubscriptionId(headers);
return WebsocketSubscriptionId.of(sessionId, Objects.requireNonNull(simpSubscriptionId, "simpSubscriptionId"));
... | repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\websocket\producers\WebSocketProducerConfiguration.java | 1 |
请完成以下Java代码 | public Optional<HUEditorView> getByKeyIfExists(@NonNull final PackingHUsViewKey key)
{
return Optional.ofNullable(packingHUsViewsByKey.get(key));
}
@FunctionalInterface
static interface PackingHUsViewSupplier
{
HUEditorView createPackingHUsView(PackingHUsViewKey key);
}
public HUEditorView computeIfAbsent(... | public void handleEvent(@NonNull final HUExtractedFromPickingSlotEvent event)
{
packingHUsViewsByKey.entrySet()
.stream()
.filter(entry -> isEventMatchingKey(event, entry.getKey()))
.map(entry -> entry.getValue())
.forEach(packingHUsView -> packingHUsView.addHUIdAndInvalidate(HuId.ofRepoId(event.getH... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingslotsClearing\PackingHUsViewsCollection.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@ApiModelProperty(example = "myBusinessKey")
public String getBusinessKey() {
return businessKey;
}
public void setBusinessKey(String businessKey) {
this.busines... | this.variables = variables;
}
@JsonTypeInfo(use = Id.CLASS, defaultImpl = RestVariable.class)
public List<RestVariable> getTransientVariables() {
return transientVariables;
}
public void setTransientVariables(List<RestVariable> transientVariables) {
this.transientVariables = transi... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\runtime\process\ProcessInstanceCreateRequest.java | 2 |
请完成以下Java代码 | public void notify(DelegateTask task) {
// get the event handler
final HistoryEventHandler historyEventHandler = Context.getProcessEngineConfiguration()
.getHistoryEventHandler();
ExecutionEntity execution = ((TaskEntity) task).getExecution();
if (execution != null) {
// delegate creatio... | historyEventHandler.handleEvent(historyEvent);
}
}
}
protected void ensureHistoryLevelInitialized() {
if (historyLevel == null) {
historyLevel = Context.getProcessEngineConfiguration().getHistoryLevel();
}
}
protected abstract HistoryEvent createHistoryEvent(DelegateTask task, Exec... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\parser\HistoryTaskListener.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class PollingMessageListener implements MessageListener {
private static final Log log = LogFactory.getLog(PollingMessageListener.class);
@Autowired
private PollingQueue pollingQueue;
@Autowired
private PollingParam pollingParam;
@Override
public void onMessage(Message message) {
try {
ActiveMQTex... | rpOrderResultQueryVo.setLastNotifyTime(new Date());
rpOrderResultQueryVo.setNotifyTimes(0); // 初始化通知0次
rpOrderResultQueryVo.setLimitNotifyTimes(pollingParam.getMaxNotifyTimes()); // 最大通知次数
Map<Integer, Integer> notifyParams = pollingParam.getNotifyParams();
rpOrderResultQueryVo.setNotifyRule(JSONObject.toJS... | repos\roncoo-pay-master\roncoo-pay-app-order-polling\src\main\java\com\roncoo\pay\app\polling\listener\PollingMessageListener.java | 2 |
请完成以下Java代码 | public class MonitoringEvent {
private int eventId;
private String eventName;
private String creationDate;
private String eventType;
private String status;
private String deviceId;
public int getEventId() {
return eventId;
}
public void setEventId(int eventId) {
thi... | this.eventType = eventType;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = device... | repos\tutorials-master\netflix-modules\hollow\src\main\java\com\baeldung\hollow\model\MonitoringEvent.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ArrayOfMappings extends ArrayList<CustomerMapping> {
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
return super.equals(o);
}
@Override
public int hashCode() {
... | sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\ArrayOfMappings.java | 2 |
请完成以下Java代码 | public void setRuleValue(String ruleValue) {
this.ruleValue = ruleValue;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getCreateBy() {
return createBy;
}
... | }
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
} | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\system\vo\SysPermissionDataRuleModel.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void createDirectories(@NonNull final Path path) throws PrintingException
{
try
{
Files.createDirectories(path);
}
catch (final IOException e)
{
throw new PrintingException("IOException trying to create output directory: " + path, e);
}
}
private ImmutableMultimap<Path, JsonPrintingSegment... | if(tray.getTrayId() == trayId)
{
path = Paths.get(baseDirectory,
FileUtil.stripIllegalCharacters(printer.getName()),
FileUtil.stripIllegalCharacters(tray.getName())) // don't use the number for the path, because we want to control it entirely with the tray name
;
break;
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-printingclient\src\main\java\de\metas\camel\externalsystems\PrintingClientPDFFileStorer.java | 2 |
请完成以下Java代码 | public final class CacheImmutableClassesIndex
{
public static final transient CacheImmutableClassesIndex instance = new CacheImmutableClassesIndex();
private final Set<Class<?>> immutableClassesSeed = ImmutableSet.<Class<?>> builder()
// Primitives
.add(Integer.class)
.add(Double.class)
.add(Short.class)... | // Primitive types are always immutable
if (clazz.isPrimitive())
{
return true;
}
// Assume IDs are immutable
if (RepoIdAware.class.isAssignableFrom(clazz))
{
return true;
}
for (final Class<?> immutableClass : immutableClasses)
{
if (immutableClass.isAssignableFrom(clazz))
{
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\interceptor\CacheImmutableClassesIndex.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void saveData(PmsOperatorLog pmsOperatorLog) {
pmsOperatorLogDao.insert(pmsOperatorLog);
}
/**
* 修改pmsOperator
*/
public void updateData(PmsOperatorLog pmsOperatorLog) {
pmsOperatorLogDao.update(pmsOperatorLog);
}
/**
* 根据id获取数据pmsOperator
*
* @param id
* @return
*/
public PmsOperatorL... | }
/**
* 分页查询pmsOperator
*
* @param pageParam
* @param ActivityVo
* PmsOperator
* @return
*/
public PageBean listPage(PageParam pageParam, PmsOperatorLog pmsOperatorLog) {
Map<String, Object> paramMap = new HashMap<String, Object>();
return pmsOperatorLogDao.listPage(pageParam, paramMap)... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\service\impl\PmsOperatorLogServiceImpl.java | 2 |
请完成以下Java代码 | public abstract class AbstractActivitiSmartLifeCycle implements SmartLifecycle, DisposableBean {
private static Logger logger = LoggerFactory.getLogger(AbstractActivitiSmartLifeCycle.class);
private Object lifeCycleMonitor = new Object();
private boolean autoStartup = true;
private int phase = DEFAULT... | }
@Override
public void start() {
synchronized (this.lifeCycleMonitor) {
if (!this.running) {
logger.info("Starting...");
doStart();
this.running = true;
logger.info("Started.");
}
}
}
@Override
... | repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\AbstractActivitiSmartLifeCycle.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Charset getCharset() {
return this.charset;
}
public void setCharset(Charset charset) {
this.charset = charset;
}
public boolean isForce() {
return Boolean.TRUE.equals(this.force);
}
public void setForce(boolean force) {
this.force = force;
}
public boolean isForceRequest() {
return Boolean... | if (force == null) {
force = this.force;
}
if (force == null) {
force = (type == HttpMessageType.REQUEST);
}
return force;
}
/**
* Type of HTTP message to consider for encoding configuration.
*/
public enum HttpMessageType {
/**
* HTTP request message.
*/
REQUEST,
/**
* HTTP respon... | repos\spring-boot-4.0.1\module\spring-boot-servlet\src\main\java\org\springframework\boot\servlet\autoconfigure\ServletEncodingProperties.java | 2 |
请完成以下Java代码 | private AuthResolution getAuthResolution(@NonNull final HttpServletRequest httpRequest)
{
// don't check auth for OPTIONS method calls because this causes troubles on chrome preflight checks
if ("OPTIONS".equals(httpRequest.getMethod()))
{
return AuthResolution.DO_NOT_AUTHENTICATE;
}
return configuration... | //
// Check apiKey query parameter
{
return StringUtils.trimBlankToNull(httpRequest.getParameter(QUERY_PARAM_API_KEY));
}
}
@VisibleForTesting
Optional<String> extractAdLanguage(@NonNull final HttpServletRequest httpRequest)
{
final String acceptLanguageHeader = StringUtils.trimBlankToNull(httpRequest.g... | repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\security\UserAuthTokenFilter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Post {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private long id;
private String title;
@OneToMany
@Cascade(CascadeType.ALL)
private List<Comment> comments;
public Post() {
}
public long getId() {
return id;
}
public void setId(lon... | return title;
}
public void setTitle(String title) {
this.title = title;
}
public List<Comment> getComments() {
return comments;
}
public void setComments(List<Comment> comments) {
this.comments = comments;
}
@Override
public String toString() {
re... | repos\tutorials-master\persistence-modules\hibernate-queries-2\src\main\java\com\baeldung\hibernate\distinct\entities\Post.java | 2 |
请完成以下Java代码 | public void localize(Task task, String locale, boolean withLocalizationFallback) {
task.setLocalizedName(null);
task.setLocalizedDescription(null);
if (locale != null) {
String processDefinitionId = task.getProcessDefinitionId();
if (processDefinitionId != null) {
... | if (locale != null) {
String processDefinitionId = task.getProcessDefinitionId();
if (processDefinitionId != null) {
ObjectNode languageNode = BpmnOverrideContext.getLocalizationElementProperties(locale, task.getTaskDefinitionKey(), processDefinitionId, withLocalizationFallback);... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cfg\DefaultTaskLocalizationManager.java | 1 |
请完成以下Java代码 | public void setBody(BodyType value) {
this.body = value;
}
/**
* Gets the value of the encryptedData property.
*
* @return
* possible object is
* {@link EncryptedDataType }
*
*/
public EncryptedDataType getEncryptedData() {
return encryptedDa... | */
public boolean isCopy() {
if (copy == null) {
return false;
} else {
return copy;
}
}
/**
* Sets the value of the copy property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void s... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\PayloadType.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SysLogController {
private final SysLogService sysLogService;
@Log("导出数据")
@ApiOperation("导出数据")
@GetMapping(value = "/download")
@PreAuthorize("@el.check()")
public void exportLog(HttpServletResponse response, SysLogQueryCriteria criteria) throws IOException {
criteria.se... | return new ResponseEntity<>(sysLogService.queryAll(criteria,pageable), HttpStatus.OK);
}
@GetMapping(value = "/error/{id}")
@ApiOperation("日志异常详情查询")
@PreAuthorize("@el.check()")
public ResponseEntity<Object> queryErrorLogDetail(@PathVariable Long id){
return new ResponseEntity<>(sysLogServ... | repos\eladmin-master\eladmin-logging\src\main\java\me\zhengjie\rest\SysLogController.java | 2 |
请完成以下Java代码 | public List<I_M_HU> retrieveIncludedHUs(final I_M_HU huId)
{
return handlingUnitsRepo.retrieveIncludedHUs(huId);
}
@Override
@NonNull
public ImmutableSet<LocatorId> getLocatorIds(@NonNull final Collection<HuId> huIds)
{
final List<I_M_HU> hus = handlingUnitsRepo.getByIds(huIds);
final ImmutableSet<Integer... | }
private Optional<HuId> getByExternalBarcode(@NonNull final ScannedCode scannedCode)
{
return handlingUnitsRepo.createHUQueryBuilder()
.setOnlyActiveHUs(true)
.setOnlyTopLevelHUs()
.addOnlyWithAttribute(AttributeConstants.ATTR_ExternalBarcode, scannedCode.getAsString())
.firstIdOnly();
}
@Overr... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HandlingUnitsBL.java | 1 |
请完成以下Java代码 | public boolean breakValueMatches(final BigDecimal value)
{
return value.compareTo(breakValue) >= 0;
}
public boolean productMatchesAnyOf(@NonNull final Set<ProductAndCategoryAndManufacturerId> products)
{
Check.assumeNotEmpty(products, "products is not empty");
return products.stream().anyMatch(this::produ... | return Objects.equals(this.productCategoryId, productCategoryId);
}
private boolean productManufacturerMatches(final BPartnerId productManufacturerId)
{
if (this.productManufacturerId == null)
{
return true;
}
if (productManufacturerId == null)
{
return false;
}
return Objects.equals(this.prod... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\PricingConditionsBreakMatchCriteria.java | 1 |
请完成以下Java代码 | public static class JSONSelectViewRowsAction extends JSONResultAction
{
private final WindowId windowId;
private final String viewId;
private final Set<String> rowIds;
public JSONSelectViewRowsAction(final ViewId viewId, final DocumentIdsSelection rowIds)
{
super("selectViewRows");
this.windowId = vi... | @lombok.Getter
public static class JSONNewRecordAction extends JSONResultAction
{
@NonNull private final WindowId windowId;
@NonNull private final Map<String, String> fieldValues;
@NonNull private final String targetTab;
public JSONNewRecordAction(
@NonNull final WindowId windowId,
@Nullable final M... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\json\JSONProcessInstanceResult.java | 1 |
请完成以下Java代码 | public HUConsolidationJob getById(final HUConsolidationJobId id)
{
final HUConsolidationJob job = jobs.get(id);
if (job == null)
{
throw new AdempiereException("No job found for id=" + id + ". Available in memory jobs are: " + jobs);
}
return job;
}
public HUConsolidationJob updateById(@NonNull final H... | }
public void save(final HUConsolidationJob job)
{
jobs.put(job.getId(), job);
}
public List<HUConsolidationJob> getByNotProcessedAndResponsibleId(final @NonNull UserId userId)
{
return jobs.values()
.stream()
.filter(job -> UserId.equals(job.getResponsibleId(), userId)
&& !job.getDocStatus().i... | repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\job\HUConsolidationJobRepository.java | 1 |
请完成以下Spring Boot application配置 | spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=none
spring.jpa.generate-ddl=true
logging.level.org.hibernate.SQL=DE | BUG
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=TRACE | repos\tutorials-master\persistence-modules\spring-data-jpa-repo-3\src\main\resources\application.properties | 2 |
请在Spring Boot框架中完成以下Java代码 | private static TrustManager[] getTrustManager() {
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
@Override
public void checkClientTrusted(X509Certificate[] chain, String authType) {
}
@O... | };
return trustAllCerts;
}
//获取HostnameVerifier
public static HostnameVerifier getHostnameVerifier() {
HostnameVerifier hostnameVerifier = new HostnameVerifier() {
@Override
public boolean verify(String s, SSLSession sslSession) {
return true;
... | repos\spring-boot-quick-master\quick-sse\src\main\java\com\quick\config\SSLSocketClient.java | 2 |
请完成以下Java代码 | public class X_AD_Sequence_No extends org.compiere.model.PO implements I_AD_Sequence_No, org.compiere.model.I_Persistent
{
private static final long serialVersionUID = 1919657103L;
/** Standard Constructor */
public X_AD_Sequence_No (final Properties ctx, final int AD_Sequence_No_ID, @Nullable final String ... | }
@Override
public void setCalendarMonth (final @Nullable java.lang.String CalendarMonth)
{
set_Value (COLUMNNAME_CalendarMonth, CalendarMonth);
}
@Override
public java.lang.String getCalendarMonth()
{
return get_ValueAsString(COLUMNNAME_CalendarMonth);
}
@Override
public void setCalendarYear (final j... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Sequence_No.java | 1 |
请完成以下Java代码 | public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Set<P... | } else if (!id.equals(other.id)) {
return false;
}
if (organization == null) {
if (other.organization != null) {
return false;
}
} else if (!organization.equals(other.organization)) {
return false;
}
if (password == ... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-1\src\main\java\com\baeldung\roles\custom\persistence\model\User.java | 1 |
请完成以下Java代码 | public class ProcessVariablesMapSerializer extends StdSerializer<ProcessVariablesMap<String, Object>> {
private static final long serialVersionUID = 1L;
private final ConversionService conversionService;
public ProcessVariablesMapSerializer(ConversionService conversionService) {
super(ProcessVaria... | String entryValue = conversionService.convert(value, String.class);
variableValue = new ProcessVariableValue(entryType, entryValue);
}
return variableValue;
}
private String resolveEntryType(Class<?> clazz, Object value) {
Class<?> entryType;
if (isScalarType(claz... | repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\model\impl\ProcessVariablesMapSerializer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getLevel() {
return this.level;
}
public void setLevel(String level) {
this.level = level;
}
public int getLogDiskSpaceLimit() {
return this.logDiskSpaceLimit;
}
public void setLogDiskSpaceLimit(int logDiskSpaceLimit) {
this.logDiskSpaceLimit = logDiskSpaceLimit;
}
public String getLog... | return this.logFile;
}
public void setLogFile(String logFile) {
this.logFile = logFile;
}
public int getLogFileSizeLimit() {
return this.logFileSizeLimit;
}
public void setLogFileSizeLimit(int logFileSizeLimit) {
this.logFileSizeLimit = logFileSizeLimit;
}
} | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\configuration\support\LoggingProperties.java | 2 |
请完成以下Java代码 | public void onContextCheckIn(final Properties ctxNew, final Properties ctxOld)
{
activeContexts.remove(ctxOld);
activeContexts.add(ctxNew);
}
public String[] getActiveContextsInfo()
{
final List<Properties> activeContextsCopy = new ArrayList<>(activeContexts);
final int count = activeContextsCopy.size();
... | return "Thread=" + threadName + "(" + threadId + ")"
//
+ "\n"
+ ", Client/Org=" + adClientId + "/" + adOrgId
+ ", User/Role=" + adUserId + "/" + adRoleId
+ ", SessionId=" + adSessionId
//
+ "\n"
+ ", id=" + System.identityHashCode(ctx)
+ ", " + ctx.getClass()
//
+ "\n"
+... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\context\TraceContextProviderListener.java | 1 |
请完成以下Java代码 | public List<ImmutablePair<String, String>> executeDeploymentIdMappingsList(CommandContext commandContext) {
checkQueryOk();
return commandContext
.getJobManager()
.findDeploymentIdMappingsByQueryCriteria(this);
}
//getters //////////////////////////////////////////
public Set<String> getIds(... | }
public Date getNow() {
return ClockUtil.getCurrentTime();
}
public boolean isWithException() {
return withException;
}
public String getExceptionMessage() {
return exceptionMessage;
}
public boolean getAcquired() {
return acquired;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\JobQueryImpl.java | 1 |
请完成以下Java代码 | public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getIsbn() {
return isbn;
} | public void setIsbn(String isbn) {
this.isbn = isbn;
}
public String getGenre() {
return genre;
}
public void setGenre(String genre) {
this.genre = genre;
}
@Override
public String toString() {
return "Book{" + "id=" + id + ", title=" + title
... | repos\Hibernate-SpringBoot-master\HibernateSpringBootAvoidEntityInDtoViaConstructor\src\main\java\com\bookstore\entity\Book.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DocTypeQuery
{
public static final DocSubType DOCSUBTYPE_Any = DocSubType.ANY;
public static final DocSubType DOCSUBTYPE_NONE = DocSubType.NONE;
@NonNull
DocBaseType docBaseType;
@NonNull
@Default
DocSubType docSubType = DOCSUBTYPE_Any;
@NonNull
Integer adClientId;
/**
* Even if specified, ... | public DocTypeQueryBuilder docSubTypeAny()
{
return docSubType(DOCSUBTYPE_Any);
}
public DocTypeQueryBuilder docSubTypeNone()
{
return docSubType(DOCSUBTYPE_NONE);
}
public DocTypeQueryBuilder clientAndOrgId(@NonNull final ClientAndOrgId clientAndOrgId)
{
return clientAndOrgId(clientAndOrgId.g... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\DocTypeQuery.java | 2 |
请完成以下Java代码 | public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) {
return Optional.ofNullable(findWidgetsBundleById(tenantId, new WidgetsBundleId(entityId.getId())));
}
@Override
public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId entityId) {
return... | private final PaginatedRemover<TenantId, WidgetsBundle> tenantWidgetsBundleRemover = new PaginatedRemover<>() {
@Override
protected PageData<WidgetsBundle> findEntities(TenantId tenantId, TenantId id, PageLink pageLink) {
return widgetsBundleDao.findTenantWidgetsBundlesByTenantId(id.getId()... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\widget\WidgetsBundleServiceImpl.java | 1 |
请完成以下Java代码 | protected AbstractSetStateCmd getNextCommand() {
return null;
}
/**
* @return the id of the associated deployment, only necessary if the command
* can potentially be executed in a scheduled way (i.e. if an
* {@link #executionDate} can be set) so the job executor responsible
* ... | protected String getDeploymentIdByProcessDefinitionKey(CommandContext commandContext, String processDefinitionKey,
boolean tenantIdSet, String tenantId) {
ProcessDefinitionEntity definition = null;
if (tenantIdSet) {
definition = commandContext.getProcessDefinitionManager().findLatestProcessDefiniti... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\AbstractSetStateCmd.java | 1 |
请完成以下Java代码 | public void setOrderedData(@NonNull final I_C_Invoice_Candidate ic)
{
final I_C_Flatrate_Term term = HandlerTools.retrieveTerm(ic);
final ConditionTypeSpecificInvoiceCandidateHandler handler = getSpecificHandler(term);
ic.setDateOrdered(handler.calculateDateOrdered(ic));
final Quantity calculateQtyOrdered = ... | final ConditionTypeSpecificInvoiceCandidateHandler handler = getSpecificHandler(term);
return handler.calculatePriceAndTax(ic);
}
@Override
public void setBPartnerData(@NonNull final I_C_Invoice_Candidate ic)
{
HandlerTools.setBPartnerData(ic);
}
@Override
public void setInvoiceScheduleAndDateToInvoice(@N... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\invoicecandidate\FlatrateTerm_Handler.java | 1 |
请完成以下Java代码 | public boolean isInvoiceable()
{
return get_ValueAsBoolean(COLUMNNAME_IsInvoiceable);
}
@Override
public void setLength (final @Nullable BigDecimal Length)
{
set_Value (COLUMNNAME_Length, Length);
}
@Override
public BigDecimal getLength()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Lengt... | }
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setStackabilityFactor (final int StackabilityFactor)
{
set_Value (COLUMNNAME_Stackabi... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_PackingMaterial.java | 1 |
请完成以下Java代码 | boolean empty()
{
return _units.empty();
}
/**
* 1的数量
* @return
*/
int numOnes()
{
return _numOnes;
}
/**
* 大小
* @return
*/
int size()
{
return _size;
}
/**
* 在末尾追加
*/
void append()
{
if ((_siz... | private static final int UNIT_SIZE = 32; // sizeof(int) * 8
/**
* 1的数量
* @param unit
* @return
*/
private static int popCount(int unit)
{
unit = ((unit & 0xAAAAAAAA) >>> 1) + (unit & 0x55555555);
unit = ((unit & 0xCCCCCCCC) >>> 2) + (unit & 0x33333333);
unit = ((... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\collection\dartsclone\details\BitVector.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class SpringBootJdbcConfiguration extends AbstractJdbcConfiguration {
private final ApplicationContext applicationContext;
private final DataJdbcProperties properties;
SpringBootJdbcConfiguration(ApplicationContext applicationContext, DataJdbcProperties properties) {
this.applicationContext = applica... | @Bean
@ConditionalOnMissingBean
public JdbcCustomConversions jdbcCustomConversions() {
return super.jdbcCustomConversions();
}
@Override
@Bean
@ConditionalOnMissingBean
public JdbcAggregateTemplate jdbcAggregateTemplate(ApplicationContext applicationContext,
JdbcMappingContext mappingContext, Jdbc... | repos\spring-boot-4.0.1\module\spring-boot-data-jdbc\src\main\java\org\springframework\boot\data\jdbc\autoconfigure\DataJdbcRepositoriesAutoConfiguration.java | 2 |
请完成以下Java代码 | public boolean isOpen() {
return IncidentState.DEFAULT.getStateCode() == incidentState;
}
public boolean isDeleted() {
return IncidentState.DELETED.getStateCode() == incidentState;
}
public boolean isResolved() {
return IncidentState.RESOLVED.getStateCode() == incidentState;
}
public String g... | }
public void setFailedActivityId(String failedActivityId) {
this.failedActivityId = failedActivityId;
}
public String getAnnotation() {
return annotation;
}
public void setAnnotation(String annotation) {
this.annotation = annotation;
}
} | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricIncidentEventEntity.java | 1 |
请完成以下Java代码 | public static void defineNamedPersistenceManagerFactory(String pmfName) {
pmf = JDOHelper.getPersistenceManagerFactory("XmlDatastore");
pm = pmf.getPersistenceManager();
}
public static void definePersistenceManagerFactoryUsingPropertiesFile(String filePath) {
pmf = JDOHelper.getPersi... | if (tx.isActive()) {
tx.rollback();
}
}
}
public static void queryPersonsInXML() {
Query<Person> query = pm.newQuery(Person.class);
List<Person> result = query.executeList();
System.out.println("name: " + result.get(0).getFirstName());
}
pub... | repos\tutorials-master\libraries-data-db-2\src\main\java\com\baeldung\libraries\jdo\xml\MyApp.java | 1 |
请完成以下Java代码 | public HistoricActivityInstanceQueryImpl orderByHistoricActivityInstanceEndTime() {
orderBy(HistoricActivityInstanceQueryProperty.END);
return this;
}
@Override
public HistoricActivityInstanceQueryImpl orderByExecutionId() {
orderBy(HistoricActivityInstanceQueryProperty.EXECUTION_ID... | return executionId;
}
public String getProcessDefinitionId() {
return processDefinitionId;
}
public String getActivityId() {
return activityId;
}
public String getActivityName() {
return activityName;
}
public String getActivityType() {
return activity... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\HistoricActivityInstanceQueryImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MembershipContractRepository
{
private final IQueryBL queryBL = Services.get(IQueryBL.class);
public Set<FlatrateTermId> retrieveMembershipSubscriptionIds(
@NonNull final BPartnerId bpartnerId,
@NonNull final Instant orgChangeDate,
@NonNull final OrgId orgId)
{
return queryMembershipRunningS... | public ImmutableSet<OrderId> retrieveMembershipOrderIds(
@NonNull final OrgId orgId,
@NonNull final Instant orgChangeDate)
{
final IQuery<I_M_Product> membershipProductQuery = queryMembershipProducts(orgId);
return queryBL.createQueryBuilder(I_C_Flatrate_Term.class)
.addEqualsFilter(I_C_Flatrate_Term.CO... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\bpartner\repository\MembershipContractRepository.java | 2 |
请完成以下Java代码 | public OrderUserNotifications notifyOrderCompleted(@NonNull final I_C_Order order)
{
final NotificationRequest request = NotificationRequest.builder()
.order(order).build();
return notifyOrderCompleted(request);
}
public OrderUserNotifications notifyOrderCompleted(@NonNull final NotificationRequest request... | private UserNotificationRequest.UserNotificationRequestBuilder newUserNotificationRequest()
{
return UserNotificationRequest.builder()
.topic(USER_NOTIFICATIONS_TOPIC);
}
private static ADMessageAndParams extractOrderCompletedADMessageAndParams(final I_C_Order order)
{
final I_C_BPartner bpartner = Service... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\event\OrderUserNotifications.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static void setOfficeExportNotesValue(Boolean officeExportNotes) {
ConfigConstants.officeExportNotes = officeExportNotes;
}
public static Boolean getOfficeDocumentOpenPasswords() {
return officeDocumentOpenPasswords;
}
@Value("${office.documentopenpasswords:true}")
public vo... | return homePagination;
}
@Value("${home.pagination:true}")
public void setHomePagination(String homePagination) {
setHomePaginationValue(homePagination);
}
public static void setHomePaginationValue(String homePagination) {
ConfigConstants.homePagination = homePagination;
}
... | repos\kkFileView-master\server\src\main\java\cn\keking\config\ConfigConstants.java | 2 |
请完成以下Java代码 | public void execute(DelegateExecution execution) {
ActivityExecution activityExecution = (ActivityExecution) execution;
ScriptingEngines scriptingEngines = Context.getProcessEngineConfiguration().getScriptingEngines();
if (Context.getProcessEngineConfiguration().isEnableProcessDefinitionInfoCac... | noErrors = false;
Throwable rootCause = ExceptionUtils.getRootCause(e);
if (rootCause instanceof BpmnError) {
ErrorPropagation.propagateError((BpmnError) rootCause, activityExecution);
} else {
throw e;
}
}
if (noErrors) {
... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\bpmn\behavior\ScriptTaskActivityBehavior.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CellStyle getTemplateStyles(boolean isSingle, ExcelForEachParams excelForEachParams) {
return null;
}
/**
* init --HeaderStyle
*
* @param workbook
* @return
*/
private CellStyle initHeaderStyle(Workbook workbook) {
CellStyle style = getBaseCellStyle(workbook)... | style.setAlignment(HorizontalAlignment.CENTER);
style.setVerticalAlignment(VerticalAlignment.CENTER);
style.setWrapText(true);
return style;
}
/**
* Font
*
* @param size
* @param isBold
* @return
*/
private Font getFont(Workbook workbook, short size, bo... | repos\springboot-demo-master\eaypoi\src\main\java\com\et\easypoi\service\ExcelExportStyler.java | 2 |
请完成以下Java代码 | public class WordInfo
{
/**
* 左邻接字集合
*/
Map<Character, int[]> left;
/**
* 右邻接字集合
*/
Map<Character, int[]> right;
/**
* 词语
*/
public String text;
/**
* 词频
*/
public int frequency;
float p;
float leftEntropy;
float rightEntropy;
/**
... | }
void computeProbabilityEntropy(int length)
{
p = frequency / (float) length;
leftEntropy = computeEntropy(left);
rightEntropy = computeEntropy(right);
entropy = Math.min(leftEntropy, rightEntropy);
}
void computeAggregation(Map<String, WordInfo> word_cands)
{
... | repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\mining\word\WordInfo.java | 1 |
请完成以下Java代码 | public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
boolean alreadyPrefixed = exchange.getAttributeOrDefault(GATEWAY_ALREADY_PREFIXED_ATTR, false);
if (alreadyPrefixed) {
return chain.filter(exchange);
}
exchange.getAttributes().put(GATEWAY_ALREADY_PREFIXED_ATTR, true);... | return filterToStringCreator(PrefixPathGatewayFilterFactory.this).append("prefix", config.getPrefix())
.toString();
}
};
}
public static class Config {
private @Nullable String prefix;
public @Nullable String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\PrefixPathGatewayFilterFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static String buildReportFilename(@NonNull final JasperPrint jasperPrint, @NonNull final OutputType outputType)
{
final String fileBasename = FileUtil.stripIllegalCharacters(jasperPrint.getName());
return FileUtil.changeFileExtension(fileBasename, outputType.getFileExtension());
}
private ReportResult e... | if (jasperPrint.getProperty(XlsReportConfiguration.PROPERTY_PASSWORD) == null)
{
// do nothing;
}
else if (jasperPrint.getProperty(XlsReportConfiguration.PROPERTY_PASSWORD).isEmpty())
{
exporter.setParameter(JRXlsAbstractExporterParameter.PASSWORD, null);
}
else
{
exporter.setParameter(JRXlsAbstr... | repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\JasperEngine.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class FlowJobDemo {
@Autowired
private JobBuilderFactory jobBuilderFactory;
@Autowired
private StepBuilderFactory stepBuilderFactory;
@Bean
public Job flowJob() {
return jobBuilderFactory.get("flowJob")
.start(flow())
.next(step3())
... | private Step step2() {
return stepBuilderFactory.get("step2")
.tasklet((stepContribution, chunkContext) -> {
System.out.println("执行步骤二操作。。。");
return RepeatStatus.FINISHED;
}).build();
}
private Step step3() {
return stepBu... | repos\SpringAll-master\67.spring-batch-start\src\main\java\cc\mrbird\batch\job\FlowJobDemo.java | 2 |
请完成以下Java代码 | public void setProcessing (boolean Processing)
{
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
}
/** Get Process Now.
@return Process Now */
public boolean isProcessing ()
{
Object oo = get_Value(COLUMNNAME_Processing);
if (oo != null)
{
if (oo instanceof Boolean)
return ... | /** Set Usable Life - Years.
@param UseLifeYears
Years of the usable life of the asset
*/
public void setUseLifeYears (int UseLifeYears)
{
set_Value (COLUMNNAME_UseLifeYears, Integer.valueOf(UseLifeYears));
}
/** Get Usable Life - Years.
@return Years of the usable life of the asset
*/
public int g... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Group_Acct.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ClientProviderType getClientProviderType() {
return this.clientProviderType;
}
public void setClientProviderType(ClientProviderType clientProviderType) {
this.clientProviderType = clientProviderType;
}
public @Nullable String getApiKey() {
return this.apiKey;
}
public void setApiKey(@Nullable Stri... | public @Nullable String getAccountId() {
return this.accountId;
}
public void setAccountId(@Nullable String accountId) {
this.accountId = accountId;
}
public String getUri() {
return this.uri;
}
public void setUri(String uri) {
this.uri = uri;
}
} | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\newrelic\NewRelicProperties.java | 2 |
请完成以下Java代码 | public String getTour() {
return tour;
}
/**
* Sets the value of the tour property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTour(String value) {
this.tour = value;
}
/**
* Gets the value of the... | return grund;
}
/**
* Sets the value of the grund property.
*
* @param value
* allowed object is
* {@link VerfuegbarkeitDefektgrund }
*
*/
public void setGrund(VerfuegbarkeitDefektgrund value) {
this.grund = value;
}
} | 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\VerfuegbarkeitAnteil.java | 1 |
请完成以下Java代码 | public synchronized boolean isEmpty()
{
return false;
}
@Override
public synchronized Enumeration<Object> keys()
{
// TODO: implement for GridField values too
return ctx.keys();
}
@Override
public Set<Object> keySet()
{
// TODO: implement for GridField values too
return ctx.keySet();
}
@Override... | @Override
public synchronized Object remove(Object key)
{
// TODO: implement for GridField values too
return ctx.remove(key);
}
@Override
public synchronized int size()
{
// TODO: implement for GridField values too
return ctx.size();
}
@Override
public synchronized String toString()
{
// TODO: imp... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\util\GridRowCtx.java | 1 |
请完成以下Java代码 | public String getMovieName() {
return movieName;
}
public void setMovieName(String movieName) {
this.movieName = movieName;
}
public Integer getReleaseYear() {
return releaseYear;
}
public void setReleaseYear(Integer releaseYear) {
this.releaseYear = releaseYea... | }
public void setLanguage(String language) {
this.language = language;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
} | repos\tutorials-master\persistence-modules\hibernate-jpa\src\main\java\com\baeldung\hibernate\pojo\Movie.java | 1 |
请完成以下Java代码 | public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getApprovedScopes() {
return approvedScopes;
}
public void setApprovedS... | public String getRedirectUri() {
return redirectUri;
}
public void setRedirectUri(String redirectUri) {
this.redirectUri = redirectUri;
}
public LocalDateTime getExpirationDate() {
return expirationDate;
}
public void setExpirationDate(LocalDateTime expirationDate) {
... | repos\tutorials-master\security-modules\oauth2-framework-impl\oauth2-authorization-server\src\main\java\com\baeldung\oauth2\authorization\server\model\AuthorizationCode.java | 1 |
请完成以下Java代码 | private void removeDuplicatePIResultsWithoutPartner(final I_M_HU_PI_Item_Product originalHUPIItemProduct, final List<I_M_HU_PI_Item_Product> availableHUPIItemProducts)
{
final Iterator<I_M_HU_PI_Item_Product> it = availableHUPIItemProducts.iterator();
while (it.hasNext()) // scan if we have duplicates of the origi... | query.setProductId(productId);
query.setDate(date);
query.setDefaultForProduct(true);
final I_M_HU_PI_Item_Product huPIItemProduct = retrieveFirst(Env.getCtx(), query, ITrx.TRXNAME_None);
return Optional.ofNullable(huPIItemProduct);
}
@Override
public Optional<HUPIItemProductId> retrieveDefaultIdForProduct... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUPIItemProductDAO.java | 1 |
请完成以下Java代码 | public class WebClientTimeoutProvider {
public static WebClient defaultWebClient() {
HttpClient httpClient = HttpClient.create();
return buildWebClient(httpClient);
}
public WebClient responseTimeoutClient() {
HttpClient httpClient = HttpClient.create()
.responseTimeout(... | public WebClient sslTimeoutClient() {
HttpClient httpClient = HttpClient.create()
.secure(spec -> spec
.sslContext(SslContextBuilder.forClient())
.defaultConfiguration(SslProvider.DefaultConfigurationType.TCP)
.handshakeTimeout(Duration.ofSeconds(30))
.c... | repos\tutorials-master\spring-reactive-modules\spring-reactive-client\src\main\java\com\baeldung\webclient\timeout\WebClientTimeoutProvider.java | 1 |
请完成以下Java代码 | public class Book {
private Long id;
private String name;
private BigDecimal price;
public Book() {
}
public Book(Long id, String name, BigDecimal price) {
this.id = id;
this.name = name;
this.price = price;
}
public Book(String name, BigDecimal price) {
... | public BigDecimal getPrice() {
return price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
@Override
public String toString() {
return "Book{" +
"id=" + id +
", name='" + name + '\'' +
", price=" + price +
... | repos\spring-boot-master\spring-jdbc\src\main\java\com\mkyong\Book.java | 1 |
请完成以下Java代码 | public static final boolean is08793_HUSelectModel_ResetCacheBeforeProcess()
{
final String SYSCONFIG_08793_HUSelectModel_ResetCacheBeforeProcess = "de.metas.handlingunits.client.terminal.select.model.AbstractHUSelectModel.ResetCacheBeforeProcess";
final boolean DEFAULT_08793_HUSelectModel_ResetCacheBeforeProcess =... | return Services.get(ISysConfigBL.class).getBooleanValue(
SYSCONFIG_AttributeStorageFailOnDisposed,
DEFAULT_AttributeStorageFailOnDisposed);
}
public static final String DIM_PP_Order_ProductAttribute_To_Transfer = "PP_Order_ProductAttribute_Transfer";
public static final String DIM_Barcode_Attributes = "DI... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\HUConstants.java | 1 |
请完成以下Java代码 | public ExternalTaskQueryTopicBuilder variables(String... variables) {
// don't use plain Arrays.asList since this returns an instance of a different list class
// that is private and may mess mybatis queries up
if (variables != null) {
currentInstruction.setVariablesToFetch(new ArrayList<String>(Array... | }
public ExternalTaskQueryTopicBuilder processDefinitionVersionTag(String processDefinitionVersionTag) {
currentInstruction.setProcessDefinitionVersionTag(processDefinitionVersionTag);
return this;
}
public ExternalTaskQueryTopicBuilder withoutTenantId() {
currentInstruction.setTenantIds(null);
... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\externaltask\ExternalTaskQueryTopicBuilderImpl.java | 1 |
请完成以下Java代码 | public void setC_BPartner_Customer_ID (int C_BPartner_Customer_ID)
{
if (C_BPartner_Customer_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_BPartner_Customer_ID, null);
else
set_ValueNoCheck (COLUMNNAME_C_BPartner_Customer_ID, Integer.valueOf(C_BPartner_Customer_ID));
}
@Override
public int getC_BPartner_Custo... | return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID);
}
@Override
public void setQty (java.math.BigDecimal Qty)
{
set_ValueNoCheck (COLUMNNAME_Qty, Qty);
}
@Override
public java.math.BigDecimal getQty()
{
BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty);
return bd != null ? bd : BigDecimal.ZERO;
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\dispo-commons\src\main\java-gen\de\metas\material\dispo\model\X_MD_Candidate_ATP_QueryResult.java | 1 |
请完成以下Java代码 | private static final String buildMsg(final String message, final Object documentLineModel, final I_M_HU hu)
{
final StringBuilder sb = new StringBuilder();
if (!Check.isEmpty(message, true))
{
sb.append(message.trim());
}
//
// Document Line Info
if (documentLineModel != null)
{
if (sb.length()... | }
//
// HU Info
if (hu != null)
{
if (sb.length() > 0)
{
sb.append("\n");
}
sb.append("@M_HU_ID@: ").append(hu.getValue()).append(" (ID=").append(hu.getM_HU_ID()).append(")");
}
return sb.toString();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\exceptions\HUNotAssignableException.java | 1 |
请完成以下Java代码 | public BigDecimal getQtySupply_PP_Order_AtDate()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtySupply_PP_Order_AtDate);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtySupply_PurchaseOrder_AtDate (final @Nullable BigDecimal QtySupply_PurchaseOrder_AtDate)
{
set_Value (... | {
set_Value (COLUMNNAME_QtySupplySum_AtDate, QtySupplySum_AtDate);
}
@Override
public BigDecimal getQtySupplySum_AtDate()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtySupplySum_AtDate);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtySupplyToSchedule_AtDate (final ... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java-gen\de\metas\material\cockpit\model\X_MD_Cockpit.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static class App2ConfigurationAdapter {
@Bean
public SecurityFilterChain filterChainApp2(HttpSecurity http, HandlerMappingIntrospector introspector) throws Exception {
MvcRequestMatcher.Builder mvcMatcherBuilder = new MvcRequestMatcher.Builder(introspector);
http.security... | @Bean
public AuthenticationEntryPoint loginUrlauthenticationEntryPointWithWarning(){
return new LoginUrlAuthenticationEntryPoint("/userLoginWithWarning");
}
}
@Configuration
@Order(3)
public static class App3ConfigurationAdapter {
@Bean
public SecurityFilter... | repos\tutorials-master\spring-security-modules\spring-security-web-boot-2\src\main\java\com\baeldung\multipleentrypoints\MultipleEntryPointsSecurityConfig.java | 2 |
请完成以下Java代码 | public class AstBracket extends AstProperty {
protected final AstNode property;
public AstBracket(AstNode base, AstNode property, boolean lvalue, boolean strict) {
this(base, property, lvalue, strict, false);
}
public AstBracket(AstNode base, AstNode property, boolean lvalue, boolean strict, ... | }
@Override
public void appendStructure(StringBuilder b, Bindings bindings) {
getChild(0).appendStructure(b, bindings);
b.append("[");
getChild(1).appendStructure(b, bindings);
b.append("]");
}
public int getCardinality() {
return 2;
}
@Override
pub... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\tree\impl\ast\AstBracket.java | 1 |
请完成以下Java代码 | public void setValueMax (String ValueMax)
{
set_Value (COLUMNNAME_ValueMax, ValueMax);
}
/** Get Max. Value.
@return Maximum Value for a field
*/
public String getValueMax ()
{
return (String)get_Value(COLUMNNAME_ValueMax);
}
/** Set Min. Value.
@param ValueMin
Minimum Value for a field
*/
p... | /** Set Value Format.
@param VFormat
Format of the value; Can contain fixed format elements, Variables: "_lLoOaAcCa09"
*/
public void setVFormat (String VFormat)
{
set_Value (COLUMNNAME_VFormat, VFormat);
}
/** Get Value Format.
@return Format of the value; Can contain fixed format elements, Variables:... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Attribute.java | 1 |
请完成以下Java代码 | public void setQtyShipped_CatchWeight (final @Nullable BigDecimal QtyShipped_CatchWeight)
{
set_Value (COLUMNNAME_QtyShipped_CatchWeight, QtyShipped_CatchWeight);
}
@Override
public BigDecimal getQtyShipped_CatchWeight()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyShipped_CatchWeight);
retu... | {
if (Record_ID < 0)
set_ValueNoCheck (COLUMNNAME_Record_ID, null);
else
set_ValueNoCheck (COLUMNNAME_Record_ID, Record_ID);
}
@Override
public int getRecord_ID()
{
return get_ValueAsInt(COLUMNNAME_Record_ID);
}
@Override
public void setReplicationTrxErrorMsg (final @Nullable java.lang.String Re... | repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java-gen\de\metas\ordercandidate\model\X_C_OLCand.java | 1 |
请完成以下Java代码 | public Builder displayName(@NonNull final ITranslatableString displayName)
{
this.displayName = TranslatableStrings.copyOf(displayName);
return this;
}
public Builder displayName(final String displayName)
{
this.displayName = TranslatableStrings.constant(displayName);
return this;
}
public Bui... | {
this.lookupDescriptor = lookupDescriptor;
return this;
}
public Builder lookupDescriptor(@Nullable final LookupDescriptor lookupDescriptor)
{
return lookupDescriptor(Optional.ofNullable(lookupDescriptor));
}
public Builder lookupDescriptor(@NonNull final UnaryOperator<LookupDescriptor> mapper)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\DocumentFilterParamDescriptor.java | 1 |
请完成以下Java代码 | public boolean isOverwriteUser1 ()
{
Object oo = get_Value(COLUMNNAME_OverwriteUser1);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Overwrite User2.
@param OverwriteUser2
Overwrite the account segmen... | public void setUser1(org.compiere.model.I_C_ElementValue User1)
{
set_ValueFromPO(COLUMNNAME_User1_ID, org.compiere.model.I_C_ElementValue.class, User1);
}
/** Set Nutzer 1.
@param User1_ID
User defined list element #1
*/
@Override
public void setUser1_ID (int User1_ID)
{
if (User1_ID < 1)
set_Va... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_GL_DistributionLine.java | 1 |
请完成以下Java代码 | public IReceiptScheduleProducerFactory registerProducer(final String tableName, final Class<? extends IReceiptScheduleProducer> producerClass)
{
Check.assumeNotEmpty(tableName, "tableName not empty");
Check.assumeNotNull(producerClass, "producerClass not null");
producerClasses
.computeIfAbsent(tableName, t... | }
@Override
public String toString()
{
return MoreObjects.toStringHelper(this)
.add("providers", providers)
.add("defaultProvider", defaultProvider)
.toString();
}
private void addProvider(final IReceiptScheduleWarehouseDestProvider provider)
{
Check.assumeNotNull(provider, "Parameter... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\api\impl\ReceiptScheduleProducerFactory.java | 1 |
请完成以下Java代码 | public Observable<LogAggregate> call(Context context, Observable<MantisGroup<String, LogEvent>> mantisGroup) {
return mantisGroup
.window(duration, TimeUnit.MILLISECONDS)
.flatMap(o -> o.groupBy(MantisGroup::getKeyValue)
.flatMap(group -> group.reduce(0, (count, value) -> count ... | public static List<ParameterDefinition<?>> getParameters() {
List<ParameterDefinition<?>> params = new ArrayList<>();
params.add(new IntParameter()
.name("LogAggregationDuration")
.description("window size for aggregation in milliseconds")
.validator(Validators.range(100, ... | repos\tutorials-master\netflix-modules\mantis\src\main\java\com\baeldung\netflix\mantis\stage\CountLogStage.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class RatingCacheRepository implements InitializingBean {
@Autowired
private LettuceConnectionFactory cacheConnectionFactory;
private StringRedisTemplate redisTemplate;
private ValueOperations<String, String> valueOps;
private SetOperations<String, String> setOps;
private ObjectMapper ... | } catch (JsonProcessingException ex) {
return false;
}
}
public boolean updateRating(Rating persisted) {
try {
valueOps.set("rating-" + persisted.getId(), jsonMapper.writeValueAsString(persisted));
return true;
} catch (JsonProcessingException e) {
... | repos\tutorials-master\spring-cloud-modules\spring-cloud-bootstrap\zipkin-log-svc-rating\src\main\java\com\baeldung\spring\cloud\bootstrap\svcrating\rating\RatingCacheRepository.java | 2 |
请完成以下Java代码 | public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String getDescription ()
{
return (String)get_Value(COLUMNNAME_Description);
}
/** Set Comment/Help.
@param Help
Co... | if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_AccessProfile.java | 1 |
请完成以下Java代码 | public java.math.BigDecimal getDivideRate ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_DivideRate);
if (bd == null)
return Env.ZERO;
return bd;
}
/** Set Faktor.
@param MultiplyRate
Rate to multiple the source by to calculate the target.
*/
@Override
public void setMultiplyRate (java.m... | @Override
public java.sql.Timestamp getValidFrom ()
{
return (java.sql.Timestamp)get_Value(COLUMNNAME_ValidFrom);
}
/** Set Gültig bis.
@param ValidTo
Valid to including this date (last day)
*/
@Override
public void setValidTo (java.sql.Timestamp ValidTo)
{
set_Value (COLUMNNAME_ValidTo, ValidTo);
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Conversion_Rate.java | 1 |
请完成以下Java代码 | protected void setStreamSource(StreamSource streamSource) {
if (this.streamSource != null) {
throw new FlowableException("invalid: multiple sources " + this.streamSource + " and " + streamSource);
}
this.streamSource = streamSource;
}
/*
* ------------------- GETTERS AN... | public EventDeploymentEntity getDeployment() {
return deployment;
}
public void setDeployment(EventDeploymentEntity deployment) {
this.deployment = deployment;
}
public ChannelModel getChannelModel() {
return channelModel;
}
public void setChannelModel(ChannelModel cha... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\parser\ChannelDefinitionParse.java | 1 |
请完成以下Java代码 | public ResponseEntity<Object> createQuartzJob(@Validated @RequestBody QuartzJob resources){
if (resources.getId() != null) {
throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID");
}
// 验证Bean是不是合法的,合法的定时任务 Bean 需要用 @Service 定义
checkBean(resources.... | }
@Log("删除定时任务")
@ApiOperation("删除定时任务")
@DeleteMapping
@PreAuthorize("@el.check('timing:del')")
public ResponseEntity<Object> deleteQuartzJob(@RequestBody Set<Long> ids){
quartzJobService.delete(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
private void checkBean(Str... | repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\quartz\rest\QuartzJobController.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.