instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public int getCountTotalToRecompute()
{
return countTotalToRecompute;
}
public Set<String> getCurrencySymbols()
{
return currencySymbols;
}
@Override
public String toString()
{
return getSummaryMessage();
}
/**
* Keep in sync with {@link de.metas.ui.web.view.OrderCandidateViewHeaderPropertiesProvid... | if (countTotalToRecompute > 0)
{
message.append(", @IsToRecompute@: ");
message.append(countTotalToRecompute);
}
return message.toString();
}
private String getAmountFormatted(final BigDecimal amt)
{
final DecimalFormat amountFormat = DisplayType.getNumberFormat(DisplayType.Amount);
final StringBui... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\invoicecandidate\ui\spi\impl\HUInvoiceCandidatesSelectionSummaryInfo.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 Sql SELECT.
@param SelectClause
SQL SELECT c... | set_Value (COLUMNNAME_TokenType, TokenType);
}
/** Get TokenType.
@return Wiki Token Type
*/
public String getTokenType ()
{
return (String)get_Value(COLUMNNAME_TokenType);
}
/** Set Sql WHERE.
@param WhereClause
Fully qualified SQL WHERE clause
*/
public void setWhereClause (String WhereClause... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_WikiToken.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Server start() {
if (!isStarted) {
server.bind(config.getPort());
isStarted = true;
}
return this;
}
public void awaitShutdown() {
if (isStarted) server.awaitShutdown();
}
public void shutdown() {
if (isStarted) server.shutdown();... | final Graphite graphite = new Graphite(new InetSocketAddress(mc.getGraphiteHost(), mc.getGraphitePort()));
final GraphiteReporter reporter = GraphiteReporter.forRegistry(registry)
.prefixedWith(mc.getPrefix())
.convertRatesTo(TimeUnit.SECONDS)
.conve... | repos\tutorials-master\microservices-modules\rest-express\src\main\java\com\baeldung\restexpress\Server.java | 2 |
请完成以下Java代码 | public void setServerName(String serverName) {
this.serverName = serverName;
}
public void setPort(int port) {
this.port = port;
}
public void setContextPath(String contextPath) {
this.contextPath = contextPath;
}
public void setServletPath(String servletPath) {
this.servletPath = servletPath;
}
pub... | }
if (this.contextPath != null) {
sb.append(this.contextPath);
}
if (this.servletPath != null) {
sb.append(this.servletPath);
}
if (this.pathInfo != null) {
sb.append(this.pathInfo);
}
if (this.query != null) {
sb.append("?").append(this.query);
}
return sb.toString();
}
} | repos\spring-security-main\web\src\main\java\org\springframework\security\web\util\RedirectUrlBuilder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static void assertAuthorizedClientProviderIsNull(
OAuth2AuthorizedClientProvider authorizedClientProvider) {
if (authorizedClientProvider != null) {
// @formatter:off
throw new BeanInitializationException(String.format(
"Unable to create an %s bean. Expected one bean of type %s, but found m... | return BeanFactoryUtils.beanNamesForTypeIncludingAncestors(this.beanFactory, beanClass, true, true);
}
private <T> T getBeanOfType(ResolvableType resolvableType) {
ObjectProvider<T> objectProvider = this.beanFactory.getBeanProvider(resolvableType, true);
return objectProvider.getIfAvailable();
}
@Overri... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configuration\OAuth2ClientConfiguration.java | 2 |
请完成以下Java代码 | public class IOSpecification extends BaseElement {
protected List<DataSpec> dataInputs = new ArrayList<DataSpec>();
protected List<DataSpec> dataOutputs = new ArrayList<DataSpec>();
protected List<String> dataInputRefs = new ArrayList<String>();
protected List<String> dataOutputRefs = new ArrayList<Str... | public void setDataOutputRefs(List<String> dataOutputRefs) {
this.dataOutputRefs = dataOutputRefs;
}
public IOSpecification clone() {
IOSpecification clone = new IOSpecification();
clone.setValues(this);
return clone;
}
public void setValues(IOSpecification otherSpec) {... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\IOSpecification.java | 1 |
请完成以下Spring Boot application配置 | # 2.4之前的配置
#spring:
# profiles:
# active: "dev"
#
#---
#spring.profiles: "dev"
#spring.profiles.include: "dev-db,dev-mq"
#
#---
#spring.profiles: "dev-db"
#
#db: dev-db.didispace.com
#
#---
#spring.profiles: "dev-mq"
#
#mq: dev-mq.didispace.com
#
#---
#2.4之后的配置
# 默认激活dev配置
spring:
profiles:
active: "dev"
... | rofile: "dev-mq"
mq: dev-mq.didispace.com
---
spring:
config:
activate:
on-profile: "prod-db"
db: prod-db.didispace.com
---
spring:
config:
activate:
on-profile: "prod-mq"
mq: prod-mq.didispace.com | repos\SpringBoot-Learning-master\2.x\chapter1-3\src\main\resources\application.yaml | 2 |
请完成以下Java代码 | public boolean isSOTrx ()
{
Object oo = get_Value(COLUMNNAME_IsSOTrx);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Processed.
@param Processed
The document has been processed
*/
public void setP... | return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
public I_AD_User getSalesRep() throws RuntimeException
{
return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name)
.getPO(getSalesRep_ID(), get_TrxName()); }
/** Set Sales Representative.
@param SalesRep_ID
Sales... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_InvoiceBatch.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getComment() {
return comment;
}
/**
* Sets the value of the comment property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setComment(String value) {
this.comment = value;
}
/**
* The ty... | * <p>
* For example, to add a new item, do as follows:
* <pre>
* getClassification().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ClassificationType }
*
*
*/
public List<ClassificationType> get... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\ReductionAndSurchargeBaseType.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public CacheManagerCustomizer<ConcurrentMapCacheManager> activitiSpringSimpleCacheManagerCustomizer(
ActivitiSpringCacheManagerProperties properties
) {
return cacheManager -> {
List<String> cacheNames = new ArrayList<>();
var cacheProperties = properties.getSimple();
... | cacheManager.setAllowNullValues(caffeineCacheProperties.isAllowNullValues());
properties
.getCaches()
.entrySet()
.stream()
.filter(it -> it.getValue().isEnabled())
.forEach(cacheEntry -> {
Optional.ofNullab... | repos\Activiti-develop\activiti-core-common\activiti-spring-cache-manager\src\main\java\org\activiti\spring\cache\config\ActivitiSpringCacheManagerAutoConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | private Predicate<AbstractUserDashboardInfo> filterById(UUID id) {
return d -> id.equals(d.getId());
}
private UserDashboardsInfo refreshDashboardTitles(TenantId tenantId, UserDashboardsInfo stored) {
if (stored == null) {
return UserDashboardsInfo.EMPTY;
}
stored.ge... | uniqueIds.forEach(id -> {
var title = dashboardService.findDashboardTitleById(tenantId, new DashboardId(id));
if (StringUtils.isNotEmpty(title)) {
dashboardTitles.put(id, title);
}
}
);
stored.getLast().... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\entitiy\user\DefaultTbUserSettingsService.java | 2 |
请完成以下Java代码 | private String getSearchStringSQL(final String searchInput, final int caretPosition)
{
final String search;
if (caretPosition > 0 && caretPosition < searchInput.length())
{
search = new StringBuilder(searchInput).insert(caretPosition, "%").toString();
}
else
{
search = searchInput;
}
// Note: as... | }
/**
* Calls {@link FieldAutoCompleter#setUserObject(Object)}, then calls {@link VAccount#setValue(Object)} for set the given <code>userObject</code> into our <code>VEditor</code>.
*/
@Override
public void setUserObject(final Object userObject)
{
super.setUserObject(userObject);
if (userObject != null)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\VAccountAutoCompleter.java | 1 |
请完成以下Java代码 | public boolean isEmpty()
{
return orderBys.isEmpty();
}
public DocumentQueryOrderByList toDocumentQueryOrderByList()
{
return orderBys;
}
public ViewRowsOrderBy withOrderBys(final DocumentQueryOrderByList orderBys)
{
if (DocumentQueryOrderByList.equals(this.orderBys, orderBys))
{
return this;
} | else
{
return new ViewRowsOrderBy(orderBys, jsonOpts);
}
}
public <T extends IViewRow> Comparator<T> toComparator()
{
return orderBys.toComparator(IViewRow::getFieldValueAsComparable, jsonOpts);
}
public <T extends IViewRow> Comparator<T> toComparatorOrNull()
{
return !orderBys.isEmpty() ? toComparat... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewRowsOrderBy.java | 1 |
请完成以下Java代码 | public class UpdateEmployee {
protected int arg0;
protected String arg1;
/**
* Gets the value of the arg0 property.
*
*/
public int getArg0() {
return arg0;
}
/**
* Sets the value of the arg0 property.
*
*/
public void setArg0(int value) {
t... | * {@link String }
*
*/
public String getArg1() {
return arg1;
}
/**
* Sets the value of the arg1 property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setArg1(String value) {
this.arg1 = valu... | repos\tutorials-master\web-modules\jee-7\src\main\java\com\baeldung\jaxws\client\UpdateEmployee.java | 1 |
请完成以下Java代码 | private DDOrderCandidateProcessRequest getProcessRequest(@NonNull final UserId userId)
{
final DDOrderCandidateEnqueueRequest enqueueRequest = DDOrderCandidateEnqueueService.extractRequest(getParameters());
final PInstanceId selectionId = enqueueRequest.getSelectionId();
final List<DDOrderCandidate> candidates ... | * There is a weird problem when running this remotely via a cucumber-test..
*/
private static void logCandidatesToProcess(@NonNull final List<DDOrderCandidate> candidates, @NonNull final PInstanceId selectionId)
{
final List<String> ids = new ArrayList<>();
for (int i = 0; i < candidates.size() && i < 10; i++)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddordercandidate\async\GenerateDDOrderFromDDOrderCandidate.java | 1 |
请完成以下Java代码 | public class RelatedInvoicesForOrdersProvider implements RelatedRecordsProvider
{
@Override
public SourceRecordsKey getSourceRecordsKey()
{
return SourceRecordsKey.of(I_C_Order.Table_Name);
}
@Override
public IPair<SourceRecordsKey, List<ITableRecordReference>> provideRelatedRecords(
@NonNull final List<IT... | .andCollect(I_C_InvoiceLine.COLUMN_C_Invoice_ID)
.addOnlyActiveRecordsFilter()
.create()
.listIds()
.stream()
.distinct()
.map(invoiceRepoId -> TableRecordReference.of(I_C_Invoice.Table_Name, invoiceRepoId))
.collect(ImmutableList.toImmutableList());
final SourceRecordsKey sourceRecordsKe... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\order\restart\RelatedInvoicesForOrdersProvider.java | 1 |
请完成以下Java代码 | public class InventoryLineAggregatorFactory
{
public static InventoryLineAggregator getForDocBaseAndSubType(@NonNull final DocBaseAndSubType docBaseAndSubType)
{
final AggregationType aggregationMode = AggregationType.getByDocTypeOrNull(docBaseAndSubType);
Check.assumeNotNull(aggregationMode, "Unexpected docBaseA... | public static InventoryLineAggregator getForAggregationMode(@NonNull final AggregationType aggregationMode)
{
switch (aggregationMode)
{
case SINGLE_HU:
return SingleHUInventoryLineAggregator.INSTANCE;
case MULTIPLE_HUS:
return MultipleHUInventoryLineAggregator.INSTANCE;
default:
throw new A... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\draftlinescreator\aggregator\InventoryLineAggregatorFactory.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... | return 0;
return ii.intValue();
}
/** 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 for the record in the format required - must b... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_InterestArea.java | 1 |
请完成以下Java代码 | public void setTitle(String title) {
this.title = title;
}
public String getIsbn() {
return isbn;
}
public void setIsbn(String isbn) {
this.isbn = isbn;
}
public Author getAuthor() {
return author;
}
public void setAuthor(Author author) {
this.... | if (this == obj) {
return true;
}
if (getClass() != obj.getClass()) {
return false;
}
return id != null && id.equals(((Book) obj).id);
}
@Override
public int hashCode() {
return 2021;
}
} | repos\Hibernate-SpringBoot-master\HibernateSpringBootNamedEntityGraphBasicAttrs\src\main\java\com\bookstore\entity\Book.java | 1 |
请完成以下Java代码 | public final class SimpleDateFormatThreadLocal implements Serializable
{
private final String pattern;
private final transient ThreadLocal<SimpleDateFormat> dateFormatHolder = new ThreadLocal<>();
/**
*
* @param pattern {@link SimpleDateFormat}'s pattern
*/
public SimpleDateFormatThreadLocal(final String ... | * @see SimpleDateFormat#format(Date)
*/
public String format(final Date date)
{
return getDateFormatInternal().format(date);
}
/**
* @see SimpleDateFormat#format(Object)
*/
public Object format(final Object value)
{
return getDateFormatInternal().format(value);
}
/**
* @see SimpleDateFormat#parse(... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\time\SimpleDateFormatThreadLocal.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setC_Project_Label_ID (final int C_Project_Label_ID)
{
if (C_Project_Label_ID < 1)
set_ValueNoCheck (COLUMNNAME_C_Project_Label_ID, null);
else
set_Value... | @Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setNote (final @Nullable java.lang.String Note)
{
set_Value (COLUMNNAME_Note, Note);
}
@Override
public java.lang.String getNote()
{
return get_ValueAsString(COLUMNNAME_Note);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Project_Label.java | 1 |
请完成以下Java代码 | public class NonGreedyAlgorithm {
int currentLevel = 0;
final int maxLevel = 3;
SocialConnector tc;
public NonGreedyAlgorithm(SocialConnector tc, int level) {
super();
this.tc = tc;
this.currentLevel = level;
}
public long findMostFollowersPath(String accoun... | NonGreedyAlgorithm sub = new NonGreedyAlgorithm(tc, currentLevel);
count[i] = sub.findMostFollowersPath(el.getUsername());
i++;
}
long max = 0;
for (; i > 0; i--) {
if (count[i-1] > max )
max = count[i-1... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-6\src\main\java\com\baeldung\algorithms\greedy\NonGreedyAlgorithm.java | 1 |
请完成以下Java代码 | public void stringBasedSolution(ExecutionPlan plan) {
plan.length = plan.numberOfDigits.stringBasedSolution(plan.number);
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public void logarithmicApproach(ExecutionPlan plan) {
plan.length = plan... | public void shiftOperators(ExecutionPlan plan) {
plan.length = plan.numberOfDigits.shiftOperators(plan.number);
}
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public void dividingWithPowersOf2(ExecutionPlan plan) {
plan.length = plan.numberO... | repos\tutorials-master\core-java-modules\core-java-numbers\src\main\java\com\baeldung\numberofdigits\Benchmarking.java | 1 |
请完成以下Java代码 | public int getC_Print_Job_ID()
{
return get_ValueAsInt(COLUMNNAME_C_Print_Job_ID);
}
@Override
public void setc_print_job_name (java.lang.String c_print_job_name)
{
set_Value (COLUMNNAME_c_print_job_name, c_print_job_name);
}
@Override
public java.lang.String getc_print_job_name()
{
return (java.lang... | }
@Override
public void setGrandTotal (java.math.BigDecimal GrandTotal)
{
set_Value (COLUMNNAME_GrandTotal, GrandTotal);
}
@Override
public java.math.BigDecimal getGrandTotal()
{
BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_GrandTotal);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
publi... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java-gen\de\metas\printing\model\X_RV_Printing_Bericht_List_Per_Print_Job.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Persons updateUser(@PathVariable Long id, @RequestBody Persons data) {
/*
* @api {PUT} /api/persons/detail/:id update person info
* @apiName PutPersonDetails
* @apiGroup Info Manage
* @apiVersion 1.0.0
*
* @apiParam {String} phone
* @... | * @apiSuccess {String} sex
* @apiSuccess {String} username
* @apiSuccess {String} zone
*/
Persons user = personsRepository.findById(id);
user.setPhone(data.getPhone());
user.setZone(data.getZone());
return personsRepository.save(user);
}
} | repos\SpringBoot-vue-master\src\main\java\com\boylegu\springboot_vue\controller\MainController.java | 2 |
请完成以下Java代码 | public class VariableResponseProvider {
public Response getResponseForTypedVariable(TypedValue typedVariableValue, String id) {
if (typedVariableValue instanceof BytesValue || ValueType.BYTES.equals(typedVariableValue.getType())) {
return responseForByteVariable(typedVariableValue);
} else if (ValueTyp... | Object value = fileValue.getValue() == null ? "" : fileValue.getValue();
return Response.ok(value, type).header("Content-Disposition", URLEncodingUtil.buildAttachmentValue(fileValue.getFilename())).build();
}
/**
* Creates a response for a variable of type {@link ValueType#BYTES}.
*/
protected Response... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\impl\VariableResponseProvider.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static Saml2X509Credential getSaml2SigningCredential(String privateKeyLocation,
String certificateLocation) {
return getSaml2Credential(privateKeyLocation, certificateLocation,
Saml2X509Credential.Saml2X509CredentialType.SIGNING);
}
private static Saml2X509Credential getSaml2DecryptionCredential(Str... | Resource privateKey = resourceLoader.getResource(privateKeyLocation);
try (InputStream inputStream = privateKey.getInputStream()) {
return RsaKeyConverters.pkcs8().convert(inputStream);
}
catch (Exception ex) {
throw new IllegalArgumentException(ex);
}
}
private static X509Certificate readCertificate(S... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\saml2\RelyingPartyRegistrationsBeanDefinitionParser.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void process(final Exchange exchange) throws Exception
{
final ImportProductsRouteContext context = ProcessorHelper.getPropertyOrThrowError(exchange, ROUTE_PROPERTY_IMPORT_PRODUCTS_CONTEXT, ImportProductsRouteContext.class);
final JsonProduct productParent = context.getParentJsonProduct();
final JsonProd... | //currently, this code is duplicated -> refactor, if solution is permanent or replace with variant specific upsert.
final ProductUpsertRequestProducer productUpsertRequestProducer = ProductUpsertRequestProducer.builder()
.product(mergedProduct)
.routeContext(context)
.processLogger(processLogger)
.bui... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\product\processor\ProductVariantUpsertProcessor.java | 2 |
请完成以下Java代码 | public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public String getEmail() {
r... | }
public void setLoginTime(Date loginTime) {
this.loginTime = loginTime;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
@Override
public String toString() {
StringBuilder sb = new StringB... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsAdmin.java | 1 |
请完成以下Java代码 | public void setQtyToMove (final @Nullable BigDecimal QtyToMove)
{
set_ValueNoCheck (COLUMNNAME_QtyToMove, QtyToMove);
}
@Override
public BigDecimal getQtyToMove()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyToMove);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQt... | return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyUnconfirmedBySupplier (final @Nullable BigDecimal QtyUnconfirmedBySupplier)
{
set_ValueNoCheck (COLUMNNAME_QtyUnconfirmedBySupplier, QtyUnconfirmedBySupplier);
}
@Override
public BigDecimal getQtyUnconfirmedBySupplier()
{
final BigDe... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java-gen\de\metas\material\cockpit\model\X_QtyDemand_QtySupply_V.java | 1 |
请完成以下Java代码 | public int getC_DocType_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set DocumentLinesNumber.
@param DocumentLinesNumber DocumentLinesNumber */
@Override
public void setDocumentLinesNumber (int DocumentLinesNumber)
{
set_... | /** Get Abgabemeldung Konfiguration.
@return Abgabemeldung Konfiguration */
@Override
public int getM_Shipment_Declaration_Config_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Shipment_Declaration_Config_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Name.
@param Name Name ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Shipment_Declaration_Config.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void deleteUser(String login) {
userRepository.findOneByLogin(login).ifPresent(user -> {
userRepository.delete(user);
log.debug("Deleted User: {}", user);
});
}
public void changePassword(String currentClearTextPassword, String newPassword) {
SecurityUtils... | * This is scheduled to get fired everyday, at 01:00 (am).
*/
@Scheduled(cron = "0 0 1 * * ?")
public void removeNotActivatedUsers() {
userRepository
.findAllByActivatedIsFalseAndCreatedDateBefore(Instant.now().minus(3, ChronoUnit.DAYS))
.forEach(user -> {
log... | repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\service\UserService.java | 2 |
请完成以下Spring Boot application配置 | # --------------------------------------------------------------------------------
# HTTP server (tomcat)
# --------------------------------------------------------------------------------
server.port=8082
# --------------------------------------------------------------------------------
# Datasource
# ----------------... | -
# Path to logo file (optional)
#mfprocurement.logo.file=
# PoweredBy Logo URL (optional). If not specified, the default powered-by logo will be used (FRESH-79)
#mfprocurement.poweredby.url=
# PoweredBy Logo link URL (optional). If specified, the image will be clickable and will open a new browser window pointing to t... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public String getBICOrBEI() {
return bicOrBEI;
}
/**
* Sets the value of the bicOrBEI property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setBICOrBEI(String value) {
this.bicOrBEI = value;
}
/**
* G... | public GenericOrganisationIdentification1 getOthr() {
return othr;
}
/**
* Sets the value of the othr property.
*
* @param value
* allowed object is
* {@link GenericOrganisationIdentification1 }
*
*/
public void setOthr(GenericOrganisationIdentificat... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\OrganisationIdentification4CH.java | 1 |
请完成以下Java代码 | public static Result editOne(String desformCode, JSONObject formData, String token) {
return addOrEditOne(desformCode, formData, token, HttpMethod.PUT);
}
private static Result addOrEditOne(String desformCode, JSONObject formData, String token, HttpMethod method) {
String url = getBaseUrl(desfo... | private static StringBuilder getBaseUrl() {
StringBuilder builder = new StringBuilder(domain).append(path);
builder.append("/desform/api");
return builder;
}
private static StringBuilder getBaseUrl(String desformCode, String dataId) {
StringBuilder builder = getBaseUrl();
... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\RestDesformUtil.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private PricingInfo getPricingInfo(
@NonNull final BPartnerLocationAndCaptureId bpartnerAndLocationId,
@NonNull final ZonedDateTime customerReturnDate)
{
final PricingSystemId pricingSystemId = bpartnerDAO.retrievePricingSystemIdOrNull(bpartnerAndLocationId.getBpartnerId(), SOTrx.SALES);
if (pricingSystemId ... | SOTrx.SALES);
}
final I_M_PriceList_Version priceListVersion = priceListDAO.retrievePriceListVersionOrNull(priceListId, customerReturnDate, null);
if (priceListVersion == null)
{
throw new PriceListVersionNotFoundException(priceListId, customerReturnDate);
}
return PricingInfo.builder()
.priceListV... | repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java\de\metas\servicerepair\project\service\commands\CreateServiceRepairProjectCommand.java | 2 |
请完成以下Java代码 | public I_M_Product getM_Product()
{
return Services.get(IProductDAO.class).getById(productId);
}
@Override
public int getM_Product_ID()
{
return ProductId.toRepoId(productId);
}
@Override
public I_M_AttributeSetInstance getM_AttributeSetInstance()
{
return Services.get(IAttributeSetInstanceBL.class).ge... | return attributeSetInstanceId.getRepoId();
}
@Override
public void setM_AttributeSetInstance(I_M_AttributeSetInstance asi)
{
throw new UnsupportedOperationException("Changing the M_AttributeSetInstance is not supported for " + PlainAttributeSetInstanceAware.class.getName());
}
@Override
public void setM_Attr... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\org\adempiere\mm\attributes\asi_aware\PlainAttributeSetInstanceAware.java | 1 |
请完成以下Java代码 | public static ExternalSystemScriptedExportConversionConfig fromRecord(@NonNull final I_ExternalSystem_Config_ScriptedExportConversion config,
@NonNull final ExternalSystemParentConfigId parentConfigId)
{
return ExternalSystemScriptedExportConversionConfig.builder()
.id(ExternalSystemScriptedE... | @NonNull
private static ExternalSystemScriptedExportConversionConfig fromRecord(@NonNull final I_ExternalSystem_Config_ScriptedExportConversion config)
{
return fromRecord(config, ExternalSystemParentConfigId.ofRepoId(config.getExternalSystem_Config_ID()));
}
@NonNull
private IQueryBuilder<I_ExternalSystem_Conf... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\scriptedexportconversion\ExternalSystemScriptedExportConversionRepository.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void initEntityManagers() {
if (entityLinkEntityManager == null) {
entityLinkEntityManager = new EntityLinkEntityManagerImpl(this, entityLinkDataManager);
}
if (historicEntityLinkEntityManager == null) {
historicEntityLinkEntityManager = new HistoricEntityLinkEntit... | }
public EntityLinkServiceConfiguration setEntityLinkEntityManager(EntityLinkEntityManager entityLinkEntityManager) {
this.entityLinkEntityManager = entityLinkEntityManager;
return this;
}
public HistoricEntityLinkEntityManager getHistoricEntityLinkEntityManager() {
return historic... | repos\flowable-engine-main\modules\flowable-entitylink-service\src\main\java\org\flowable\entitylink\service\EntityLinkServiceConfiguration.java | 2 |
请完成以下Java代码 | public void addMouseListener(MouseListener l)
{
m_text.addMouseListener(l);
}
/**
* Data Binding to MTable (via GridController) - Enter pressed
* @param e event
*/
@Override
public void actionPerformed(ActionEvent e)
{
if (e.getSource() == m_button)
{
action_button();
return;
}
// Dat... | EditorContextPopupMenu.onGridFieldSet(this);
} // setField
@Override
public GridField getField() {
return m_mField;
}
/**
* Set Text
* @param text text
*/
public void setText (String text)
{
m_text.setText (text);
validateOnTextChanged();
} // setText
/**
* Get Text (clear)
* @return... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VURL.java | 1 |
请完成以下Java代码 | public void setAttribute(String attributeName, Object attributeValue) {
if (attributeValue == null) {
removeAttribute(attributeName);
}
else {
this.sessionAttrs.put(attributeName, attributeValue);
}
}
@Override
public void removeAttribute(String attributeName) {
this.sessionAttrs.remove(attributeNam... | this.id = id;
}
@Override
public boolean equals(Object obj) {
return obj instanceof Session && this.id.equals(((Session) obj).getId());
}
@Override
public int hashCode() {
return this.id.hashCode();
}
private static String generateId() {
return UUID.randomUUID().toString();
}
/**
* Sets the {@link... | repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\MapSession.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class FormDefinitionResponse {
protected String id;
protected String url;
protected String category;
protected String name;
protected String key;
protected String description;
protected int version;
protected String resourceName;
protected String deploymentId;
protected S... | public void setDescription(String description) {
this.description = description;
}
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
public String getResourceName() {
return resourceName;
}
publ... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\repository\FormDefinitionResponse.java | 2 |
请完成以下Java代码 | public CountResultDto queryJobsCount(JobQueryDto queryDto) {
ProcessEngine engine = getProcessEngine();
queryDto.setObjectMapper(getObjectMapper());
JobQuery query = queryDto.toQuery(engine);
long count = query.count();
CountResultDto result = new CountResultDto();
result.setCount(count);
... | try {
SetJobRetriesByJobsAsyncBuilder builder = getProcessEngine().getManagementService()
.setJobRetriesByJobsAsync(setJobRetriesDto.getRetries().intValue())
.jobIds(setJobRetriesDto.getJobIds())
.jobQuery(jobQuery);
if(setJobRetriesDto.isDueDateSet()) {
builder.dueDate... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\JobRestServiceImpl.java | 1 |
请完成以下Java代码 | public final ClearanceStatusInfo getHUClearanceStatusInfo()
{
return _huClearanceStatusInfo;
}
private void destroyCurrentHU(final HUListCursor currentHUCursor, final IHUContext huContext)
{
final I_M_HU hu = currentHUCursor.current();
if (hu == null)
{
return; // shall not happen
}
currentHUCursor... | // Delete only those HUs which were internally created by THIS producer
if (DYNATTR_Producer.getValue(hu) == this)
{
final Supplier<IAutoCloseable> getDontDestroyParentLUClosable = () -> {
final I_M_HU lu = handlingUnitsBL.getLoadingUnitHU(hu);
return lu != null
? huContext.temporarilyDontDestroyHU... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\AbstractProducerDestination.java | 1 |
请完成以下Java代码 | public static BankToCustomerDebitCreditNotificationV02 loadXML(@NonNull final MultiVersionStreamReaderDelegate xsr)
{
final Document document;
try
{
// https://stackoverflow.com/questions/20410202/jaxb-unmarshalling-not-working-expected-elements-are-none
// use ObjectFactory for creating the context becaus... | {
return transactionKey.toString("UTF-8");
}
catch (UnsupportedEncodingException e)
{
// won't happen because UTF-8 is supported
throw AdempiereException.wrapIfNeeded(e);
}
}
/**
* asTimestamp for version 6 <code>BankToCustomerDebitCreditNotificationV06</code>
*/
private static Timestamp asTime... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java\de\metas\payment\esr\dataimporter\impl\camt54\ESRDataImporterCamt54v02.java | 1 |
请完成以下Java代码 | public boolean createNode(String path, String data) {
try {
zkClient.create(path, data.getBytes(), ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
return true;
} catch (Exception e) {
log.error("【create persist node exception】{},{},{}", path, data, e);
... | } catch (Exception e) {
log.error("【delete persist node exception】{},{}", path, e);
return false;
}
}
/**
* Get the child nodes of the current node (excluding grandchild nodes)
*
* @param path
*/
public List<String> getChildren(String path) throws KeeperE... | repos\springboot-demo-master\zookeeper\src\main\java\com\et\zookeeper\api\ZkApi.java | 1 |
请完成以下Java代码 | public final int getResultSetHoldability() throws SQLException
{
return delegate.getResultSetHoldability();
}
@Override
public final boolean isClosed() throws SQLException
{
return delegate.isClosed();
}
@Override
public final void setPoolable(final boolean poolable) throws SQLException
{
delegate.setP... | return delegate.isPoolable();
}
@Override
public final void closeOnCompletion() throws SQLException
{
delegate.closeOnCompletion();
}
@Override
public final boolean isCloseOnCompletion() throws SQLException
{
return delegate.isCloseOnCompletion();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\sql\impl\TracingStatement.java | 1 |
请完成以下Java代码 | public IdentityOperationResult deleteTenantGroupMembership(String tenantId, String groupId) {
checkAuthorization(Permissions.DELETE, Resources.TENANT_MEMBERSHIP, tenantId);
if (existsTenantMembership(tenantId, null, groupId)) {
deleteAuthorizations(Resources.TENANT_MEMBERSHIP, groupId);
deleteAuth... | protected void createDefaultAuthorizations(Group group) {
if(isAuthorizationEnabled()) {
saveDefaultAuthorizations(getResourceAuthorizationProvider().newGroup(group));
}
}
protected void createDefaultAuthorizations(Tenant tenant) {
if (isAuthorizationEnabled()) {
saveDefaultAuthorizations(g... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\identity\db\DbIdentityServiceProvider.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserProfileService {
@Autowired
AmazonS3 amazonS3Client;
@Value("${aws.s3.bucket}")
private String bucketName;
private String subFolder = "";
@Autowired
UserProfileDataAccessService userProfileDataAccessService;
List<UserProfile> getUserProfiles(){
return userPr... | }
private void uploadFileToS3Bucket(final String bucketName, final File file, String filename) {
final PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, filename, file);
amazonS3Client.putObject(putObjectRequest);
}
private File convertMultiPartFileTo... | repos\Spring-Boot-Advanced-Projects-main\Project-4.SpringBoot-AWS-S3\backend\src\main\java\com\urunov\profile\UserProfileService.java | 2 |
请完成以下Java代码 | public class MultiInputs {
public void UsingSpaceDelimiter(){
Scanner scanner = new Scanner(System.in);
System.out.print("Enter two numbers: ");
int num1 = scanner.nextInt();
int num2 = scanner.nextInt();
System.out.println("You entered " + num1 + " and " + num2);
}
... | }
public void UsingCustomDelimiter(){
Scanner scanner = new Scanner(System.in);
scanner.useDelimiter(";");
System.out.print("Enter two numbers separated by a semicolon: ");
try { int num1 = scanner.nextInt();
int num2 = scanner.nextInt();
System.out.println("Y... | repos\tutorials-master\core-java-modules\core-java-io-apis\src\main\java\com\baeldung\multinput\MultiInputs.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getFormKey() {
return formKey;
}
public void setFormKey(String formKey) {
this.formKey = formKey;
}
public String getExtraValue() {
return extraValue;
}
public void setExtraValue(String extraValue) {
this.extraValue = extraValue;
}
public... | this.caseDefinitionUrl = caseDefinitionUrl;
}
public String getDerivedCaseDefinitionUrl() {
return derivedCaseDefinitionUrl;
}
public void setDerivedCaseDefinitionUrl(String derivedCaseDefinitionUrl) {
this.derivedCaseDefinitionUrl = derivedCaseDefinitionUrl;
}
public String g... | repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\planitem\HistoricPlanItemInstanceResponse.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public AnonymousConfigurer<H> authorities(List<GrantedAuthority> authorities) {
this.authorities = authorities;
return this;
}
/**
* Sets the {@link org.springframework.security.core.Authentication#getAuthorities()}
* for anonymous users
* @param authorities Sets the
* {@link org.springframework.security... | http.authenticationProvider(this.authenticationProvider);
}
@Override
public void configure(H http) {
if (this.authenticationFilter == null) {
this.authenticationFilter = new AnonymousAuthenticationFilter(getKey(), this.principal, this.authorities);
}
this.authenticationFilter.setSecurityContextHolderStrat... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\web\configurers\AnonymousConfigurer.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public boolean equals(Object o)
{
if (this == o)
{
return true;
}
if (o == null || getClass() != o.getClass())
{
return false;
}
DisputeSummaryResponse disputeSummaryResponse = (DisputeSummaryResponse)o;
return Objects.equals(this.href, disputeSummaryResponse.href) &&
Objects.equals(this.limi... | sb.append(" limit: ").append(toIndentedString(limit)).append("\n");
sb.append(" next: ").append(toIndentedString(next)).append("\n");
sb.append(" offset: ").append(toIndentedString(offset)).append("\n");
sb.append(" paymentDisputeSummaries: ").append(toIndentedString(paymentDisputeSummaries)).append("... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\DisputeSummaryResponse.java | 2 |
请完成以下Java代码 | protected boolean canReachActivity(ActivityExecution execution, PvmActivity activity) {
PvmTransition pvmTransition = execution.getTransition();
if (pvmTransition != null) {
return isReachable(pvmTransition.getDestination(), activity, new HashSet<PvmActivity>());
} else {
return isReachable(exec... | }
else {
ScopeImpl flowScope = srcActivity.getFlowScope();
if (flowScope != null && flowScope instanceof PvmActivity) {
return isReachable((PvmActivity) flowScope, targetActivity, visitedActivities);
}
}
return false;
}
else {
for (PvmTransition pvmTr... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\behavior\InclusiveGatewayActivityBehavior.java | 1 |
请完成以下Java代码 | public static Tags empty() {
return EMPTY;
}
public static Tags from(Map<String, ?> map) {
return from(map, null);
}
@SuppressWarnings("unchecked")
public static Tags from(Map<String, ?> map, @Nullable String prefix) {
if (map.isEmpty()) {
return empty();
}
if (StringUtils.hasText(prefix)) {
Obj... | .filter((e) -> e.getKey().toLowerCase().startsWith(flatPrefix))
.collect(toLinkedHashMap((e) -> e.getKey().substring(flatPrefix.length()), Map.Entry::getValue)));
}
return new Tags(map.entrySet()
.stream()
.filter((e) -> e.getKey() != null)
.collect(toLinkedHashMap(Map.Entry::getKey, (e) -> Objects.to... | repos\spring-boot-admin-master\spring-boot-admin-server\src\main\java\de\codecentric\boot\admin\server\domain\values\Tags.java | 1 |
请完成以下Java代码 | private class GuavaEventListenerAdapter
{
@NonNull
private final IEventListener eventListener;
@Subscribe
public void onEvent(@NonNull final Event event)
{
micrometerEventBusStatsCollector.incrementEventsDequeued();
micrometerEventBusStatsCollector
.getEventProcessingTimer()
.record(() ->
... | {
eventListener.onEvent(this, event);
}
catch (final RuntimeException ex)
{
if (!Adempiere.isUnitTestMode())
{
final EventLogUserService eventLogUserService = SpringContextHolder.instance.getBean(EventLogUserService.class);
eventLogUserService
.newErrorLogEntry(eventListener.getCla... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\impl\EventBus.java | 1 |
请完成以下Java代码 | public boolean isManual ()
{
Object oo = get_Value(COLUMNNAME_IsManual);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Over/Under Payment.
@param OverUnderAmt
Over-Payment (unallocated) or Under-Payme... | return get_ValueAsPO(COLUMNNAME_ReversalLine_ID, org.compiere.model.I_C_AllocationLine.class);
}
@Override
public void setReversalLine(org.compiere.model.I_C_AllocationLine ReversalLine)
{
set_ValueFromPO(COLUMNNAME_ReversalLine_ID, org.compiere.model.I_C_AllocationLine.class, ReversalLine);
}
/** Set Storno-... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_AllocationLine.java | 1 |
请完成以下Java代码 | public static void writeValue_C_Country_ID(final I_C_Location toLocationRecord, final IDocumentFieldView fromField)
{
final IntegerLookupValue country = fromField.getValueAs(IntegerLookupValue.class);
if (country == null)
{
toLocationRecord.setC_Country_ID(-1);
}
else if (country.getIdAsInt() <= 0)... | toLocationRecord.setCity(null);
toLocationRecord.setC_City_ID(-1);
}
else
{
final I_C_Postal postalRecord = InterfaceWrapperHelper.load(postalId, I_C_Postal.class);
toLocationRecord.setC_Postal_ID(postalRecord.getC_Postal_ID());
toLocationRecord.setPostal(postalRecord.getPostal());
toLocati... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\address\AddressDescriptorFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Phone implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
private boolean deleted;
private String number;
public Phone() {
}
public Phone(String number) {
this.number = number;
}
public Integer getId() {... | public boolean isDeleted() {
return deleted;
}
public void setDeleted(boolean deleted) {
this.deleted = deleted;
}
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
} | repos\tutorials-master\persistence-modules\hibernate-annotations\src\main\java\com\baeldung\hibernate\pojo\Phone.java | 2 |
请完成以下Java代码 | public UIComponent getUIComponent(
final @NonNull WFProcess wfProcess,
final @NonNull WFActivity wfActivity,
final @NonNull JsonOpts jsonOpts)
{
final JsonQRCode pickFromHU = getPickingJob(wfProcess)
.getPickFromHU()
.map(SetPickFromHUWFActivityHandler::toJsonQRCode)
.orElse(null);
return Set... | @Override
public WFProcess setScannedBarcode(@NonNull final SetScannedBarcodeRequest request)
{
final HUQRCode qrCode = parseHUQRCode(request.getScannedBarcode());
final HuId huId = huQRCodesService.getHuIdByQRCode(qrCode);
final HUInfo pickFromHU = HUInfo.builder()
.id(huId)
.qrCode(qrCode)
.build(... | repos\metasfresh-new_dawn_uat\backend\de.metas.picking.rest-api\src\main\java\de\metas\picking\workflow\handlers\activity_handlers\SetPickFromHUWFActivityHandler.java | 1 |
请完成以下Java代码 | public static final class PublicKeyCredentialBuilder<R extends AuthenticatorResponse> {
@SuppressWarnings("NullAway.Init")
private String id;
private @Nullable PublicKeyCredentialType type;
@SuppressWarnings("NullAway.Init")
private Bytes rawId;
@SuppressWarnings("NullAway.Init")
private R response;
... | */
public PublicKeyCredentialBuilder response(R response) {
this.response = response;
return this;
}
/**
* Sets the {@link #getAuthenticatorAttachment()} property.
* @param authenticatorAttachment the authenticator attachement
* @return the PublicKeyCredentialBuilder
*/
public PublicKeyCreden... | repos\spring-security-main\webauthn\src\main\java\org\springframework\security\web\webauthn\api\PublicKeyCredential.java | 1 |
请完成以下Java代码 | public static Builder field(String name) {
return new Builder(name);
}
@Override
public AnnotationContainer annotations() {
return this.annotations;
}
/**
* Return the modifiers.
* @return the modifiers
*/
public int getModifiers() {
return this.modifiers;
}
/**
* Return the name.
* @return t... | private boolean initialized;
private Builder(String name) {
this.name = name;
}
/**
* Sets the modifiers.
* @param modifiers the modifiers
* @return this for method chaining
*/
public Builder modifiers(int modifiers) {
this.modifiers = modifiers;
return this;
}
/**
* Sets the valu... | repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\groovy\GroovyFieldDeclaration.java | 1 |
请完成以下Java代码 | public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String getIncidentType() {
return i... | public String getJobDefinitionId() {
return jobDefinitionId;
}
public void setJobDefinitionId(String jobDefinitionId) {
this.jobDefinitionId = jobDefinitionId;
}
public boolean isOpen() {
return IncidentState.DEFAULT.getStateCode() == incidentState;
}
public boolean isDeleted() {
return I... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\event\HistoricIncidentEventEntity.java | 1 |
请完成以下Java代码 | private static TooltipType getTooltipType(final @NotNull LookupDataSourceContext evalCtx)
{
final String tableName = evalCtx.getTableName();
return tableName != null
? TableIdsCache.instance.getTooltipType(tableName)
: TooltipType.DEFAULT;
}
@Override
public LookupDataSourceContext.Builder newContextFo... | public SqlForFetchingLookupById getSqlForFetchingLookupByIdExpression()
{
if (attributeValuesProvider instanceof DefaultAttributeValuesProvider)
{
final DefaultAttributeValuesProvider defaultAttributeValuesProvider = (DefaultAttributeValuesProvider)attributeValuesProvider;
final AttributeId attributeId = def... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pattribute\ASILookupDescriptor.java | 1 |
请完成以下Java代码 | public void init(IInfoSimple parent, I_AD_InfoColumn infoColumn, String searchText)
{
final int defaultRadius = Services.get(ISysConfigBL.class).getIntValue(SYSCONFIG_DefaultRadius, 0, Env.getAD_Client_ID(Env.getCtx()));
//
fieldCityZip = new CTextField();
fieldCityZip.setPreferredSize(new Dimension(200, (int)... | + " (ACOS("
+ " SIN(RADIANS(" + lat + ")) * SIN(RADIANS(" + tableAlias + ".lat)) "
+ " + COS(RADIANS(" + lat + "))*COS(RADIANS(" + tableAlias + ".lat))*COS(RADIANS(" + tableAlias + ".lon) - RADIANS(" + lon + "))"
+ ") * 60 * 1.1515 " // miles
+ " * 1.609344" // KM factor
+ " )"
+ " )";
}
priv... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\gui\search\InfoQueryCriteriaBPRadius.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public abstract class AbstractDaoAuthenticationConfigurer<B extends ProviderManagerBuilder<B>, C extends AbstractDaoAuthenticationConfigurer<B, C, U>, U extends UserDetailsService>
extends UserDetailsAwareConfigurer<B, U> {
private DaoAuthenticationProvider provider;
private final U userDetailsService;
/**
* ... | * @return the {@link AbstractDaoAuthenticationConfigurer} for further customizations
*/
@SuppressWarnings("unchecked")
public C passwordEncoder(PasswordEncoder passwordEncoder) {
this.provider.setPasswordEncoder(passwordEncoder);
return (C) this;
}
public C userDetailsPasswordManager(UserDetailsPasswordServi... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\authentication\configurers\userdetails\AbstractDaoAuthenticationConfigurer.java | 2 |
请完成以下Java代码 | public void setM_TU_HU_ID (final int M_TU_HU_ID)
{
if (M_TU_HU_ID < 1)
set_Value (COLUMNNAME_M_TU_HU_ID, null);
else
set_Value (COLUMNNAME_M_TU_HU_ID, M_TU_HU_ID);
}
@Override
public int getM_TU_HU_ID()
{
return get_ValueAsInt(COLUMNNAME_M_TU_HU_ID);
}
@Override
public void setProcessed (final ... | }
@Override
public void setQtyPicked (final BigDecimal QtyPicked)
{
set_Value (COLUMNNAME_QtyPicked, QtyPicked);
}
@Override
public BigDecimal getQtyPicked()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyPicked);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyT... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inoutcandidate\model\X_M_ShipmentSchedule_QtyPicked.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public List<RpPayProduct> listAll(){
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("status", PublicStatusEnum.ACTIVE.name());
return rpPayProductDao.listBy(paramMap);
}
/**
* 审核
* @param productCode
* @param auditStatus
*/
@Override
public void audit(String productCode, ... | if(payWayList.isEmpty()){
throw new PayBizException(PayBizException.PAY_TYPE_IS_NOT_EXIST,"支付方式未设置,无法操作!");
}
}else if(auditStatus.equals(PublicEnum.NO.name())){
//检查是否已有支付配置
List<RpUserPayConfig> payConfigList = rpUserPayConfigService.listByProductCode(productCode);
if(!payConfigList.isEmpty()){
... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\service\impl\RpPayProductServiceImpl.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class EventBusRestController
{
// FIXME: move MetasfreshRestAPIConstants to de.metas.util
public static final String ENDPOINT_API = "/api";
public static final String ENDPOINT = ENDPOINT_API + "/eventBus";
private final IEventBusFactory eventBusFactory;
public EventBusRestController(final IEventBusFactory... | {
eventBusInstances.add(localEventBus);
}
}
return eventBusInstances;
}
else
{
return eventBusFactory.getAllEventBusInstances();
}
}
private static ImmutableList<JSONEventBusStats> toJSONEventBusStats(final List<IEventBus> eventBusInstances)
{
return eventBusInstances.stream()
.map(... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\rest\EventBusRestController.java | 2 |
请完成以下Java代码 | private OAuth2AccessTokenResponse getTokenResponse(ClientRegistration clientRegistration,
OAuth2ClientCredentialsGrantRequest clientCredentialsGrantRequest) {
try {
return this.accessTokenResponseClient.getTokenResponse(clientCredentialsGrantRequest);
}
catch (OAuth2AuthorizationException ex) {
throw new... | * {@link OAuth2AuthorizedClient#getAccessToken() access token} expiry. The default is
* 60 seconds.
*
* <p>
* An access token is considered expired if
* {@code OAuth2AccessToken#getExpiresAt() - clockSkew} is before the current time
* {@code clock#instant()}.
* @param clockSkew the maximum acceptable cloc... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\ClientCredentialsOAuth2AuthorizedClientProvider.java | 1 |
请完成以下Java代码 | default Collection<String> prefixes() {
return Collections.singleton(prefix());
}
/**
* The name of the method when used in an expression, like the second part of ${prefix:method()}.
* Will be used to match the text of the expression to the actual {@link FlowableFunctionDelegate} instance.
... | */
default Collection<String> localNames() {
return Collections.singleton(localName());
}
/**
* Returns the method that is invoked by JUEL.
*/
Method functionMethod() throws NoSuchMethodException;
default Method functionMethod(String prefix, String localName) throws NoSuchMethodE... | repos\flowable-engine-main\modules\flowable-engine-common-api\src\main\java\org\flowable\common\engine\api\delegate\FlowableFunctionDelegate.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public int getSize() {
return this.size;
}
public void setSize(int size) {
this.size = size;
}
}
public static class Simple {
/**
* Set the maximum number of parallel accesses allowed. -1 indicates no
* concurrency limit at all.
*/
private @Nullable Integer concurrencyLimit;
public @Nu... | private @Nullable Duration awaitTerminationPeriod;
public boolean isAwaitTermination() {
return this.awaitTermination;
}
public void setAwaitTermination(boolean awaitTermination) {
this.awaitTermination = awaitTermination;
}
public @Nullable Duration getAwaitTerminationPeriod() {
return this.await... | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\task\TaskSchedulingProperties.java | 2 |
请完成以下Java代码 | public String getUserElementString6()
{
return get_ValueAsString(COLUMNNAME_UserElementString6);
}
@Override
public void setUserElementString7 (final @Nullable String UserElementString7)
{
set_Value (COLUMNNAME_UserElementString7, UserElementString7);
}
@Override
public String getUserElementString7()
{
... | @Override
public org.compiere.model.I_C_CostClassification getC_CostClassification()
{
return get_ValueAsPO(COLUMNNAME_C_CostClassification_ID, org.compiere.model.I_C_CostClassification.class);
}
@Override
public void setC_CostClassification(final org.compiere.model.I_C_CostClassification C_CostClassification)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_Fact_Acct_Transactions_View.java | 1 |
请完成以下Java代码 | public boolean createRating(Rating persisted) {
try {
valueOps.set("rating-" + persisted.getId(), jsonMapper.writeValueAsString(persisted));
setOps.add("book-" + persisted.getBookId(), "rating-" + persisted.getId());
return true;
} catch (JsonProcessingException ex) {... | toDel = jsonMapper.readValue(valueOps.get("rating-" + ratingId), Rating.class);
setOps.remove("book-" + toDel.getBookId(), "rating-" + ratingId);
redisTemplate.delete("rating-" + ratingId);
return true;
} catch (IOException e) {
e.printStackTrace();
}
... | 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 | 1 |
请在Spring Boot框架中完成以下Java代码 | public Set<String> getPermissionsByOperatorId(Long operatorId) {
// 根据操作员Id查询出关联的所有角色id
String roleIds = pmsOperatorRoleService.getRoleIdsByOperatorId(operatorId);
String permissionIds = getActionIdsByRoleIds(roleIds);
Set<String> permissionSet = new HashSet<String>();
// 根据角色ID字符串得到该用户的所有权限拼成的字符串
if (!St... | }
/**
* 分页查询pmsOperator
*
* @param pageParam
* @param ActivityVo
* PmsOperator
* @return
*/
public PageBean listPage(PageParam pageParam, PmsRolePermission pmsRolePermission) {
Map<String, Object> paramMap = new HashMap<String, Object>();
return pmsRolePermissionDao.listPage(pageParam, ... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\service\impl\PmsRolePermissionServiceImpl.java | 2 |
请完成以下Java代码 | public class JMXQueueProcessor implements JMXQueueProcessorMBean
{
private final IQueueProcessor processor;
private final int queueProcessorId;
public JMXQueueProcessor(final IQueueProcessor processor, final int queueProcessorId)
{
this.processor = processor;
this.queueProcessorId = queueProcessorId;
}
@Ove... | {
return processor.getStatisticsSnapshot().getCountProcessed();
}
@Override
public long getCountErrors()
{
return processor.getStatisticsSnapshot().getCountErrors();
}
@Override
public long getCountSkipped()
{
return processor.getStatisticsSnapshot().getCountSkipped();
}
@Override
public String getQ... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\jmx\JMXQueueProcessor.java | 1 |
请完成以下Java代码 | public class SubmitStartFormCmd implements Command<ProcessInstance>, Serializable {
private static final long serialVersionUID = 1L;
protected final String processDefinitionId;
protected final String businessKey;
protected VariableMap variables;
public SubmitStartFormCmd(String processDefinitionId, String ... | ExecutionEntity processInstance = null;
if (businessKey != null) {
processInstance = processDefinition.createProcessInstance(businessKey);
} else {
processInstance = processDefinition.createProcessInstance();
}
processInstance.startWithFormProperties(variables);
commandContext.getOpera... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\SubmitStartFormCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public static Integer getIntegerFromJson(ObjectNode objectNode, String fieldName) {
String s = getStringFromJson(objectNode, fieldName);
if (StringUtils.isNotEmpty(s)) {
return Integer.valueOf(s);
}
return null;
}
public static Double getDoubleFromJson(ObjectNode... | return null;
}
public static Boolean getBooleanFromJson(ObjectNode objectNode, String fieldName, Boolean defaultValue) {
Boolean value = getBooleanFromJson(objectNode, fieldName);
return value != null ? value : defaultValue;
}
public static Boolean getBooleanFromJson(ObjectNode... | repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\history\async\util\AsyncHistoryJsonUtil.java | 2 |
请完成以下Java代码 | public Object getValue() {
TypedValue typedValue = getTypedValue();
if (typedValue != null) {
return typedValue.getValue();
} else {
return null;
}
}
public T getTypedValue() {
return getTypedValue(true);
}
public T getTypedValue(boolean deserializeValue) {
if (cachedValue ... | if (serializer == null) {
serializer = mappers.findMapperForTypedValueField(typedValueField);
}
return serializer;
}
@Override
public String toString() {
return "VariableValue ["
+ "cachedValue=" + cachedValue + ", "
+ "executionId=" + executionId + ", "
+ "variableName=... | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\variable\impl\VariableValue.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserDaoService {
// JPA/Hibernate > Database
// UserDaoService > Static List
private static List<User> users = new ArrayList<>();
private static int usersCount = 0;
static {
users.add(new User(++usersCount,"Adam",LocalDate.now().minusYears(30)));
users.add(new User(++usersCount,"Eve",LocalDa... | users.add(user);
return user;
}
public User findOne(int id) {
Predicate<? super User> predicate = user -> user.getId().equals(id);
return users.stream().filter(predicate).findFirst().orElse(null);
}
public void deleteById(int id) {
Predicate<? super User> predicate = user -> user.getId().equals(id);
us... | repos\master-spring-and-spring-boot-main\12-rest-api\src\main\java\com\in28minutes\rest\webservices\restfulwebservices\user\UserDaoService.java | 2 |
请完成以下Java代码 | void swap(int i, int j) {
if (this.enabled != null) {
boolean temp = this.enabled.get(i);
this.enabled.set(i, this.enabled.get(j));
this.enabled.set(j, temp);
}
}
int get(int index) {
return isEnabled(index) ? this.offset : 0;
}
int enable(int index, boolean enable) {
if (this.enabled != null) {
... | }
boolean isEnabled(int index) {
return (this.enabled != null && this.enabled.get(index));
}
boolean hasAnyEnabled() {
return this.enabled != null && this.enabled.cardinality() > 0;
}
NameOffsetLookups emptyCopy() {
return new NameOffsetLookups(this.offset, this.enabled.size());
}
} | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\zip\NameOffsetLookups.java | 1 |
请完成以下Java代码 | public void setId(String id) {
this.id = id;
}
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;
} | public List<Question> getQuestions() {
return questions;
}
public void setQuestions(List<Question> questions) {
this.questions = questions;
}
@Override
public String toString() {
return "Survey [id=" + id + ", title=" + title + ", description="
+ description + ", questions=" + questions + "]";
}
} | repos\SpringBootForBeginners-master\05.Spring-Boot-Advanced\src\main\java\com\in28minutes\springboot\model\Survey.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void setUrl(String url) {
this.url = url;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId =... | public void setTaskUrl(String taskUrl) {
this.taskUrl = taskUrl;
}
public String getProcessInstanceUrl() {
return processInstanceUrl;
}
public void setProcessInstanceUrl(String processInstanceUrl) {
this.processInstanceUrl = processInstanceUrl;
}
@ApiModelProperty(valu... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\engine\AttachmentResponse.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class DynamicTableAspect {
/**
* 定义切面拦截切入点
*/
@Pointcut("@annotation(org.jeecg.common.aspect.annotation.DynamicTable)")
public void dynamicTable() {
}
@Around("dynamicTable()")
public Object around(ProceedingJoinPoint point) throws Throwable {
MethodSignature signatu... | HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
//获取前端传递的版本标记
String version = request.getHeader(CommonConstant.VERSION);
//存储版本号到本地线程变量
ThreadLocalDataHelper.put(CommonConstant.VERSION, version);
//存储表名到本地线程变量
ThreadLocalDataHelper.put(CommonCons... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\config\mybatis\aspect\DynamicTableAspect.java | 2 |
请完成以下Java代码 | public PageData<ComponentDescriptor> findByTypeAndPageLink(TenantId tenantId, ComponentType type, PageLink pageLink) {
Validator.validatePageLink(pageLink);
return componentDescriptorDao.findByTypeAndPageLink(tenantId, type, pageLink);
}
@Override
public PageData<ComponentDescriptor> findBy... | public boolean validate(TenantId tenantId, ComponentDescriptor component, JsonNode configuration) {
try {
if (!component.getConfigurationDescriptor().has("schema")) {
throw new DataValidationException("Configuration descriptor doesn't contain schema property!");
}
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\component\BaseComponentDescriptorService.java | 1 |
请完成以下Java代码 | private I_C_Flatrate_Term createTermInOwnTrx()
{
final TrxCallable<I_C_Flatrate_Term> callable = () -> {
final I_C_Flatrate_Term term = PMMContractBuilder.newBuilder()
.setCtx(getCtx())
.setFailIfNotCreated(true)
.setComplete(true)
.setC_Flatrate_Conditions(p_C_Flatrate_Conditions)
.setC_... | @Override
public Object getParameterDefaultValue(final IProcessDefaultParameter parameter)
{
final String parameterName = parameter.getColumnName();
if (!PARAM_NAME_AD_USER_IN_CHARGE_ID.equals(parameterName))
{
return DEFAULT_VALUE_NOTAVAILABLE;
}
final int adUserInChargeId = pmmContractsBL.getDefaultC... | repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\process\C_Flatrate_Term_Create_ProcurementContract.java | 1 |
请完成以下Java代码 | public void addAttributeStorageFactoryClasses(final List<Class<? extends IAttributeStorageFactory>> factoryClasses)
{
if (factoryClasses == null || factoryClasses.isEmpty())
{
return;
}
for (final Class<? extends IAttributeStorageFactory> factoryClass : factoryClasses)
{
addAttributeStorageFactory(fac... | {
Check.assumeNotNull(huAttributesDAO, "huAttributesDAO not null");
return huAttributesDAO;
}
@Override
public void setHUAttributesDAO(final IHUAttributesDAO huAttributesDAO)
{
this.huAttributesDAO = huAttributesDAO;
for (final IAttributeStorageFactory factory : factories)
{
factory.setHUAttributesDA... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\storage\impl\CompositeAttributeStorageFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private static CredentialRecord toCredentialRecord(PasskeyCredential credential, Bytes userId) {
log.info("toCredentialRecord: credentialId={}, userId={}", credential.getCredentialId(), userId);
return ImmutableCredentialRecord.builder()
.userEntityUserId(userId)
.label(credential.ge... | .collect(Collectors.toSet());
}
private static PasskeyCredential toPasskeyCredential(PasskeyCredential credential, CredentialRecord credentialRecord, PasskeyUser user) {
credential.setUser(AggregateReference.to(user.getId()));
credential.setLabel(credentialRecord.getLabel());
credential... | repos\tutorials-master\spring-security-modules\spring-security-passkey\src\main\java\com\baeldung\tutorials\passkey\repository\DbUserCredentialRepository.java | 2 |
请完成以下Java代码 | public List<String> getMimeTypes() {
return mimeTypes;
}
public List<String> getNames() {
return names;
}
public String getOutputStatement(String toDisplay) {
// We will use out:print function to output statements
StringBuilder stringBuffer = new StringBuilder();
... | } else if (key.equals("THREADING")) {
return "MULTITHREADED";
} else {
return null;
}
}
public String getProgram(String... statements) {
// Each statement is wrapped in '${}' to comply with EL
StringBuilder buf = new StringBuilder();
if (statement... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\scripting\JuelScriptEngineFactory.java | 1 |
请完成以下Java代码 | public String generateToken(UserDetails userDetails) {
Map<String, Object> claims = new HashMap<>();
claims.put(CLAIM_KEY_USERNAME, userDetails.getUsername());
claims.put(CLAIM_KEY_CREATED, new Date());
return generateToken(claims);
}
String generateToken(Map<String, Object> cla... | } catch (Exception e) {
refreshedToken = null;
}
return refreshedToken;
}
public Boolean validateToken(String token, UserDetails userDetails) {
User user = (User) userDetails;
final String username = getUsernameFromToken(token);
return (
usern... | repos\Spring-Boot-In-Action-master\springbt_security_jwt\src\main\java\cn\codesheep\springbt_security_jwt\util\JwtTokenUtil.java | 1 |
请完成以下Java代码 | public int getSeqNo()
{
if (m_seqNo == -1)
getRegistrationAttribute();
return m_seqNo;
} // getSeqNo
/**
* Compare To
* @param o the Object to be compared.
* @return a negative integer, zero, or a positive integer as this object
* is less than, equal to, or greater than the specified ob... | int compare = getSeqNo() - oo.getSeqNo();
return compare;
} // compareTo
/**
* String Representation
* @return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer();
sb.append(getSeqNo()).append(": ")
.append(getRegistrationAttribute()).append("=").append(getName());
return sb.t... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MRegistrationValue.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ResponseEntity<Object> getUserById(@PathVariable Integer id) {
return new ResponseEntity<>(userService.getUserById(Long.valueOf(id)), HttpStatus.OK);
}
/**
* 通过spring data jpa 调用方法
* api :localhost:8099/users/byname?username=xxx
* 通过用户名查找用户
* @param request
* @return
... | */
@RequestMapping(method = RequestMethod.POST)
@ResponseBody
@ApiModelProperty(value="user",notes = "用户信息的json串")
@ApiOperation(value = "新增用户", notes="返回新增的用户信息")
public ResponseEntity<Object> saveUser(@RequestBody User user) {
return new ResponseEntity<>(userService.saveUser(user), HttpSta... | repos\springBoot-master\springboot-swagger-ui\src\main\java\com\abel\example\controller\UserController.java | 2 |
请完成以下Java代码 | public int getM_Warehouse_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID);
}
@Override
public org.compiere.model.I_S_Resource getPP_Plant()
{
return get_ValueAsPO(COLUMNNAME_PP_Plant_ID, org.compiere.model.I_S_Resource.class);
}
@Override
public void setPP_Plant(final org.compiere.model.I_S_Resour... | }
@Override
public void setProductName (final @Nullable java.lang.String ProductName)
{
throw new IllegalArgumentException ("ProductName is virtual column"); }
@Override
public java.lang.String getProductName()
{
return get_ValueAsString(COLUMNNAME_ProductName);
}
@Override
public void setQtyCount (fina... | repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java-gen\de\metas\fresh\model\X_Fresh_QtyOnHand_Line.java | 1 |
请完成以下Java代码 | public byte[] getResourceData(TenantId tenantId, TbResourceId resourceId) {
return resourceRepository.getDataById(resourceId.getId());
}
@Override
public byte[] getResourcePreview(TenantId tenantId, TbResourceId resourceId) {
return resourceRepository.getPreviewById(resourceId.getId());
... | public PageData<TbResourceId> findIdsByTenantId(UUID tenantId, PageLink pageLink) {
return DaoUtil.pageToPageData(resourceRepository.findIdsByTenantId(tenantId, DaoUtil.toPageable(pageLink))
.map(TbResourceId::new));
}
@Override
public TbResourceId getExternalIdByInternal(TbResource... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\resource\JpaTbResourceDao.java | 1 |
请完成以下Java代码 | public void setReversalLine_ID (int ReversalLine_ID)
{
if (ReversalLine_ID < 1)
set_ValueNoCheck (COLUMNNAME_ReversalLine_ID, null);
else
set_ValueNoCheck (COLUMNNAME_ReversalLine_ID, Integer.valueOf(ReversalLine_ID));
}
/** Get Reversal Line.
@return Use to keep the reversal line ID for reversing cos... | @param TargetQty
Zielmenge der Warenbewegung
*/
public void setTargetQty (BigDecimal TargetQty)
{
set_ValueNoCheck (COLUMNNAME_TargetQty, TargetQty);
}
/** Get Zielmenge.
@return Zielmenge der Warenbewegung
*/
public BigDecimal getTargetQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Ta... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_RV_M_InOutLine_Overview.java | 1 |
请完成以下Java代码 | public I_A_Registration getA_Registration() throws RuntimeException
{
return (I_A_Registration)MTable.get(getCtx(), I_A_Registration.Table_Name)
.getPO(getA_Registration_ID(), get_TrxName()); }
/** Set Registration.
@param A_Registration_ID
User Asset Registration
*/
public void setA_Registration_ID... | }
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_RegistrationValue.java | 1 |
请完成以下Java代码 | public class User implements Serializable {
private static final long serialVersionUID = -2731598327208972274L;
private String username;
private String password;
private Set<String> role;
private Set<String> permission;
public User(String username, String password, Set<String> role, Set<Str... | public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Set<String> getRole() {
return role;
}
public void setRole(Set<String> role) {
this.role = role;
}
public Set<String> getPerm... | repos\SpringAll-master\62.Spring-Boot-Shiro-JWT\src\main\java\com\example\demo\domain\User.java | 1 |
请完成以下Java代码 | public class PmsMemberPrice implements Serializable {
private Long id;
private Long productId;
private Long memberLevelId;
@ApiModelProperty(value = "会员价格")
private BigDecimal memberPrice;
private String memberLevelName;
private static final long serialVersionUID = 1L;
public Long ... | public void setMemberPrice(BigDecimal memberPrice) {
this.memberPrice = memberPrice;
}
public String getMemberLevelName() {
return memberLevelName;
}
public void setMemberLevelName(String memberLevelName) {
this.memberLevelName = memberLevelName;
}
@Override
public... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsMemberPrice.java | 1 |
请完成以下Spring Boot application配置 | github.client.clientId=[CLIENT_ID]
github.client.clientSecret=[CLIENT_SECRET]
github.client.userAuthorizationUri=https://github.com/login/oauth/authorize
github.client.accessTokenUri=https://github.com/login/oauth/access_token
github.client.clientAuthenticationScheme=form
gi | thub.resource.userInfoUri=https://api.github.com/user
spring.thymeleaf.prefix=classpath:/templates/oauth2resttemplate/ | repos\tutorials-master\spring-security-modules\spring-security-oauth2\src\main\resources\application-oauth2-rest-template.properties | 2 |
请完成以下Java代码 | public void updateAllExecutionRelatedEntityCountFlags(boolean newValue) {
getDbSqlSession().directUpdate("updateExecutionRelatedEntityCountEnabled", newValue);
}
@Override
public void clearProcessInstanceLockTime(String processInstanceId) {
HashMap<String, Object> params = new HashMap<>();
... | }
}
protected void setSafeInValueLists(ProcessInstanceQueryImpl processInstanceQuery) {
if (processInstanceQuery.getProcessInstanceIds() != null) {
processInstanceQuery.setSafeProcessInstanceIds(createSafeInValuesList(processInstanceQuery.getProcessInstanceIds()));
}
... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\entity\data\impl\MybatisExecutionDataManager.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.