instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请在Spring Boot框架中完成以下Java代码 | public void setBankAccountNumber(String value) {
this.bankAccountNumber = value;
}
/**
* Gets the value of the bankAccountHolder property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getBankAccountHolder() {
return b... | * Sets the value of the iban property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIban(String value) {
this.iban = value;
}
/**
* Gets the value of the bic property.
*
* @return
* possible object is... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java-xjc\com\dpd\common\service\types\shipmentservice\_3\Cod.java | 2 |
请完成以下Java代码 | public class CycleBusinessCalendar extends BusinessCalendarImpl {
public static String NAME = "cycle";
public CycleBusinessCalendar(ClockReader clockReader) {
super(clockReader);
}
public Date resolveDuedate(String duedateDescription, int maxIterations) {
try {
if (duedate... | }
public Boolean validateDuedate(String duedateDescription, int maxIterations, Date endDate, Date newTimer) {
if (endDate != null) {
return super.validateDuedate(duedateDescription, maxIterations, endDate, newTimer);
}
// end date could be part of the chron expression
tr... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\calendar\CycleBusinessCalendar.java | 1 |
请在Spring Boot框架中完成以下Java代码 | static class GsonHttpConvertersCustomizer
implements ClientHttpMessageConvertersCustomizer, ServerHttpMessageConvertersCustomizer {
private final GsonHttpMessageConverter converter;
GsonHttpConvertersCustomizer(Gson gson) {
this.converter = new GsonHttpMessageConverter(gson);
}
@Override
public void ... | @ConditionalOnBean(JacksonHttpMessageConvertersConfiguration.JacksonJsonHttpMessageConvertersCustomizer.class)
static class JacksonAvailable {
}
@SuppressWarnings("removal")
@ConditionalOnBean(Jackson2HttpMessageConvertersConfiguration.Jackson2JsonMessageConvertersCustomizer.class)
static class Jackson2Avai... | repos\spring-boot-4.0.1\module\spring-boot-http-converter\src\main\java\org\springframework\boot\http\converter\autoconfigure\GsonHttpMessageConvertersConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class CmmnDeployer implements EngineDeployer {
private static final Logger LOGGER = LoggerFactory.getLogger(CmmnDeployer.class);
public static final int CMMN_DEFAULT_UNDEPLOY_ORDER = EngineDeployer.DEFAULT_UNDEPLOY_ORDER - 200;
@Override
public void deploy(EngineDeployment deployment, ... | cmmnDeploymentBuilder.deploy();
}
}
@Override
public void undeploy(EngineDeployment parentDeployment, boolean cascade) {
CmmnRepositoryService repositoryService = CommandContextUtil.getCmmnRepositoryService();
List<CmmnDeployment> deployments = repositoryService
.cre... | repos\flowable-engine-main\modules\flowable-cmmn-engine-configurator\src\main\java\org\flowable\cmmn\engine\configurator\impl\deployer\CmmnDeployer.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class CreateRemittanceAdviceRequest
{
@NonNull
OrgId orgId;
@NonNull
ClientId clientId;
@NonNull
BPartnerId sourceBPartnerId;
@NonNull
BPartnerBankAccountId sourceBPartnerBankAccountId;
@NonNull
BPartnerId destinationBPartnerId;
@NonNull
BPartnerBankAccountId destinationBPartnerBankAccountId;
... | BigDecimal remittedAmountSum;
@NonNull
CurrencyId remittedAmountCurrencyId;
@NonNull
DocTypeId targetPaymentDocTypeId;
@Nullable
Instant sendDate;
@Nullable
BigDecimal serviceFeeAmount;
@Nullable
CurrencyId serviceFeeCurrencyId;
@Nullable
BigDecimal paymentDiscountAmountSum;
@Nullable
String additi... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\remittanceadvice\CreateRemittanceAdviceRequest.java | 2 |
请完成以下Java代码 | public class TerminateEventDefinition extends EventDefinition {
/**
* When true, this event will terminate all parent process instances (in the case of using call activity),
* thus ending the whole process instance.
*
* By default false (BPMN spec compliant): the parent scope is terminated (sub... | this.terminateAll = otherDefinition.isTerminateAll();
this.terminateMultiInstance = otherDefinition.isTerminateMultiInstance();
}
public boolean isTerminateAll() {
return terminateAll;
}
public void setTerminateAll(boolean terminateAll) {
this.terminateAll = terminateAll;
}... | repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\TerminateEventDefinition.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final class ModelColumn<MT, CMT>
{
/**
* Model class.
* e.g. if we are talking about C_Invoice.C_BPartner_ID field then this method will return I_C_Invoice.class
*/
private final Class<MT> modelClass;
/**
* Column Name.
* e.g. if we are talking about C_Invoice.C_BPartner_ID field then this method w... | // NOTE: we are returning a new instance each time, because this method is not used so offen
// and because storing an instace for each ModelColumn will consume way more memory.
final Function<MT, Object> valueFunction = new ValueFunction();
@SuppressWarnings("unchecked")
final Function<MT, ValueType> valueFun... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\model\ModelColumn.java | 2 |
请完成以下Java代码 | public class UpdateInvalidShipmentSchedulesWorkpackageProcessor extends WorkpackageProcessorAdapter
{
private static final Logger logger = LogManager.getLogger(UpdateInvalidShipmentSchedulesWorkpackageProcessor.class);
public static void schedule()
{
final IContextAware contextAwareWithThreadInherit = PlainContex... | final PInstanceId selectionId = Services.get(IADPInstanceDAO.class).createSelectionId();
loggable.addLog("Using revalidation ID: {}", selectionId);
try (final MDCCloseable ignored = ShipmentSchedulesMDC.putRevalidationId(selectionId))
{
final ShipmentScheduleUpdateInvalidRequest request = ShipmentScheduleUpda... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\async\UpdateInvalidShipmentSchedulesWorkpackageProcessor.java | 1 |
请完成以下Java代码 | public class SAP_GLJournal_GenerateTaxLines extends JavaProcess implements IProcessPrecondition
{
private final SAPGLJournalService glJournalService = SpringContextHolder.instance.getBean(SAPGLJournalService.class);
@Override
public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcess... | {
return ProcessPreconditionsResolution.rejectWithInternalReason("Not drafted");
}
return ProcessPreconditionsResolution.accept();
}
@Override
protected String doIt()
{
final SAPGLJournalId glJournalId = SAPGLJournalId.ofRepoId(getRecord_ID());
glJournalService.regenerateTaxLines(glJournalId);
retur... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\process\SAP_GLJournal_GenerateTaxLines.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class HazardSymbolId implements RepoIdAware
{
int repoId;
@JsonCreator
public static HazardSymbolId ofRepoId(final int repoId)
{
return new HazardSymbolId(repoId);
}
@Nullable
public static HazardSymbolId ofRepoIdOrNull(@Nullable final Integer repoId)
{
return repoId != null && repoId > 0 ? new Haz... | public static boolean equals(@Nullable final HazardSymbolId o1, @Nullable final HazardSymbolId o2)
{
return Objects.equals(o1, o2);
}
private HazardSymbolId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "M_HazardSymbol_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\hazard_symbol\HazardSymbolId.java | 2 |
请完成以下Java代码 | protected InvoiceRows getRowsData()
{
return InvoiceRows.cast(super.getRowsData());
}
public void addInvoice(@NonNull final InvoiceId invoiceId)
{
final InvoiceRows invoiceRows = getRowsData();
invoiceRows.addInvoice(invoiceId);
}
@Override
public LookupValuesPage getFieldTypeahead(final RowEditingContex... | @Override
public LookupValuesList getFieldDropdown(final RowEditingContext ctx, final String fieldName)
{
throw new UnsupportedOperationException();
}
public void markPreparedForAllocation(@NonNull final DocumentIdsSelection rowIds)
{
getRowsData().markPreparedForAllocation(rowIds);
invalidateAll();
}
pu... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\InvoicesView.java | 1 |
请完成以下Java代码 | public class RestLoginProcessingFilter extends AbstractAuthenticationProcessingFilter {
private final AuthenticationDetailsSource<HttpServletRequest, ?> authenticationDetailsSource = new RestAuthenticationDetailsSource();
private final AuthenticationSuccessHandler successHandler;
private final Authenticat... | if (StringUtils.isBlank(loginRequest.getUsername()) || StringUtils.isEmpty(loginRequest.getPassword())) {
throw new AuthenticationServiceException("Username or Password not provided");
}
UserPrincipal principal = new UserPrincipal(UserPrincipal.Type.USER_NAME, loginRequest.getUsername());
... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\rest\RestLoginProcessingFilter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ADProcessName
{
String value;
String classname;
String missing;
public static ADProcessName missing(@NonNull final AdProcessId adProcessId)
{
return builder().missing("<" + adProcessId.getRepoId() + ">").build();
}
@Override
public String toString() {return toShortString();}
public String to... | {
return missing;
}
else
{
final StringBuilder sb = new StringBuilder();
sb.append(value);
if (!Check.isBlank(classname))
{
sb.append("(").append(classname).append(")");
}
return sb.toString();
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\validator\sql_migration_context_info\names\ADProcessName.java | 2 |
请完成以下Java代码 | public abstract class AbstractElResolverDelegate extends ELResolver {
protected abstract ELResolver getElResolverDelegate();
public Class<?> getCommonPropertyType(ELContext context, Object base) {
ELResolver delegate = getElResolverDelegate();
if(delegate == null) {
return null;
} else {
r... | }
}
public void setValue(ELContext context, Object base, Object property, Object value) {
context.setPropertyResolved(false);
ELResolver delegate = getElResolverDelegate();
if(delegate != null) {
delegate.setValue(context, base, property, value);
}
}
public Object invoke(ELContext contex... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\el\AbstractElResolverDelegate.java | 1 |
请完成以下Java代码 | public final int compareTo(Object o)
{
return compare(this, o);
} // compareTo
/**
* Comparable Interface (based on toString value)
*
* @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 sp... | public String toString()
{
return m_name;
}
/**
* To String - detail
*
* @return String in format ID=Name
*/
public final String toStringX()
{
StringBuilder sb = new StringBuilder(getID());
sb.append("=").append(m_name);
return sb.toString();
} // toStringX
} // NamePair | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\NamePair.java | 1 |
请完成以下Java代码 | public static <T> SynchronizedMutable<T> empty()
{
return new SynchronizedMutable<>(null);
}
@Nullable
private T value;
private SynchronizedMutable(@Nullable final T value)
{
this.value = value;
}
@Nullable
@Override
public synchronized T getValue()
{
return value;
}
@Override
public synchronize... | if (value == null)
{
this.value = supplier.get();
}
return this.value;
}
@Nullable
public synchronized T computeIfNotNull(@NonNull final UnaryOperator<T> remappingFunction)
{
if (value != null)
{
this.value = remappingFunction.apply(this.value);
}
return this.value;
}
public synchronized O... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\lang\SynchronizedMutable.java | 1 |
请完成以下Java代码 | public OrderCostAddInOutResult addInOutCost(@NonNull OrderCostAddInOutRequest request)
{
final OrderCostDetail detail = getDetailByOrderLineId(request.getOrderLineId());
final Quantity qty = request.getQty();
final Money amt = request.getCostAmount();
detail.addInOutCost(amt, qty);
return OrderCostAddInOut... | public void setCreatedOrderLineId(@Nullable final OrderLineId createdOrderLineId)
{
this.createdOrderLineId = createdOrderLineId;
}
public OrderCost copy(@NonNull final OrderCostCloneMapper mapper)
{
return toBuilder()
.id(null)
.orderId(mapper.getTargetOrderId(orderId))
.createdOrderLineId(created... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\costs\OrderCost.java | 1 |
请完成以下Java代码 | public long getExpirationSecondTime() {
return expirationSecondTime;
}
/**
* 获取RedisCacheKey
*
* @param key
* @return
*/
public RedisCacheKey getRedisCacheKey(Object key) {
return new RedisCacheKey(key).usePrefix(this.prefix)
.withKeySerializer(redi... | * 获取RedisCacheKey
*
* @param key
* @return
*/
public String getCacheKey(Object key) {
return new String(getRedisCacheKey(key).getKeyBytes());
}
/**
* 是否强制刷新(走数据库),默认是false
*
* @return
*/
public boolean getForceRefresh() {
return forceRefresh;
... | repos\spring-boot-student-master\spring-boot-student-cache-redis-caffeine\src\main\java\com\xiaolyuh\cache\redis\cache\CustomizedRedisCache.java | 1 |
请完成以下Java代码 | public void setQuoteType (java.lang.String QuoteType)
{
set_ValueNoCheck (COLUMNNAME_QuoteType, QuoteType);
}
/** Get RfQ Type.
@return Request for Quotation Type
*/
@Override
public java.lang.String getQuoteType ()
{
return (java.lang.String)get_Value(COLUMNNAME_QuoteType);
}
@Override
public org... | else
set_ValueNoCheck (COLUMNNAME_SalesRep_ID, Integer.valueOf(SalesRep_ID));
}
/** Get Aussendienst.
@return Aussendienst */
@Override
public int getSalesRep_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID);
if (ii == null)
return 0;
return ii.intValue();
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_RV_C_RfQ_UnAnswered.java | 1 |
请完成以下Java代码 | protected boolean resolveExclusive(S context) {
return exclusive;
}
protected int resolveRetries(S context) {
return Context.getProcessEngineConfiguration().getDefaultNumberOfRetries();
}
public Date resolveDueDate(S context) {
ProcessEngineConfiguration processEngineConfiguration = Context.getPro... | }
public void setActivity(ActivityImpl activity) {
this.activity = activity;
}
public ProcessDefinitionImpl getProcessDefinition() {
if (activity != null) {
return activity.getProcessDefinition();
}
else {
return null;
}
}
public String getJobConfiguration() {
return job... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\JobDeclaration.java | 1 |
请完成以下Java代码 | public ClassBasedFacetCollectorFactory<ModelType> registerFacetCollectorClass(final Class<? extends IFacetCollector<ModelType>> facetCollectorClass)
{
Check.assumeNotNull(facetCollectorClass, "facetCollectorClass not null");
facetCollectorClasses.addIfAbsent(facetCollectorClass);
return this;
}
@SafeVarargs
... | collectors.addFacetCollector(collector);
}
catch (final Exception e)
{
logger.warn("Failed to instantiate collector " + collectorClass + ". Skip it.", e);
}
}
if (!collectors.hasCollectors())
{
throw new IllegalStateException("No valid facet collector classes were defined");
}
return coll... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\facet\ClassBasedFacetCollectorFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getBatchType() {
return batchType;
}
@Override
public void setBatchType(String batchType) {
this.batchType = batchType;
}
@Override
public Date getCreateTime() {
return createTime;
}
@Override
public void setCreateTime(Date time) {
thi... | @Override
public String getBatchDocumentJson(String engineType) {
if (batchDocRefId != null) {
byte[] bytes = batchDocRefId.getBytes(engineType);
if (bytes != null) {
return new String(bytes, StandardCharsets.UTF_8);
}
}
return null;
}
... | repos\flowable-engine-main\modules\flowable-batch-service\src\main\java\org\flowable\batch\service\impl\persistence\entity\BatchEntityImpl.java | 2 |
请完成以下Java代码 | public OrderFactory poReference(@Nullable final String poReference)
{
assertNotBuilt();
order.setPOReference(poReference);
return this;
}
public OrderFactory salesRepId(@Nullable final UserId salesRepId)
{
assertNotBuilt();
order.setSalesRep_ID(UserId.toRepoId(salesRepId));
return this;
}
public Ord... | {
assertNotBuilt();
order.setC_Campaign_ID(campaignId);
return this;
}
public DocTypeId getDocTypeTargetId()
{
return docTypeTargetId;
}
public void setDocTypeTargetId(final DocTypeId docTypeTargetId)
{
this.docTypeTargetId = docTypeTargetId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\OrderFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CommandLineRunner loadData(CustomerRepository repository) {
return (args) -> {
// save a couple of customers
repository.save(new Customer("Jack", "Bauer"));
repository.save(new Customer("Chloe", "O'Brian"));
repository.save(new Customer("Kim", "Bauer"));
repository.save(new Customer("David", "Pa... | Customer customer = repository.findById(1L).get();
log.info("Customer found with findOne(1L):");
log.info("--------------------------------");
log.info(customer.toString());
log.info("");
// fetch customers by last name
log.info("Customer found with findByLastNameStartsWithIgnoreCase('Bauer'):");
... | repos\springboot-demo-master\vaadin\src\main\java\com\et\vaadin\DemoApplication.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public static class KeyStore {
//name of the keystore in the classpath
private String name = "config/tls/keystore.p12";
//password used to access the key
private String password = "password";
//name of the alias to fetch
private String alias = "selfsigned";
publi... | }
public void setRefreshTokenValidityInSecondsForRememberMe(int refreshTokenValidityInSecondsForRememberMe) {
this.refreshTokenValidityInSecondsForRememberMe = refreshTokenValidityInSecondsForRememberMe;
}
public String getClientId() {
return clientId;
}
... | repos\tutorials-master\jhipster-modules\jhipster-uaa\uaa\src\main\java\com\baeldung\jhipster\uaa\config\UaaProperties.java | 2 |
请完成以下Java代码 | public void setM_TourVersion_ID (int M_TourVersion_ID)
{
if (M_TourVersion_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_TourVersion_ID, null);
else
set_ValueNoCheck (COLUMNNAME_M_TourVersion_ID, Integer.valueOf(M_TourVersion_ID));
}
/** Get Tour Version.
@return Tour Version */
@Override
public int getM... | @return Tour Version Line */
@Override
public int getM_TourVersionLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_TourVersionLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Reihenfolge.
@param SeqNo
Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl komm... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\tourplanning\model\X_M_TourVersionLine.java | 1 |
请完成以下Java代码 | public IncidentQuery orderByCauseIncidentId() {
orderBy(IncidentQueryProperty.CAUSE_INCIDENT_ID);
return this;
}
public IncidentQuery orderByRootCauseIncidentId() {
orderBy(IncidentQueryProperty.ROOT_CAUSE_INCIDENT_ID);
return this;
}
public IncidentQuery orderByConfiguration() {
orderBy(I... | //results ////////////////////////////////////////////////////
@Override
public long executeCount(CommandContext commandContext) {
checkQueryOk();
return commandContext
.getIncidentManager()
.findIncidentCountByQueryCriteria(this);
}
@Override
public List<Incident> executeList(CommandCon... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\IncidentQueryImpl.java | 1 |
请完成以下Java代码 | protected void addTargetConnectionFactory(Object key, ConnectionFactory connectionFactory) {
this.targetConnectionFactories.put(key, connectionFactory);
for (ConnectionListener listener : this.connectionListeners) {
connectionFactory.addConnectionListener(listener);
}
checkConfirmsAndReturns(connectionFacto... | */
protected abstract @Nullable Object determineCurrentLookupKey();
@Override
public void destroy() {
resetConnection();
}
@Override
public void resetConnection() {
this.targetConnectionFactories.values().forEach(ConnectionFactory::resetConnection);
if (this.defaultTargetConnectionFactory != null) {
th... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\connection\AbstractRoutingConnectionFactory.java | 1 |
请完成以下Java代码 | default SqlDocumentFilterConvertersList getFilterConverters()
{
return SqlDocumentFilterConverters.emptyList();
}
default Optional<SqlDocumentFilterConverterDecorator> getFilterConverterDecorator()
{
return Optional.empty();
}
default String replaceTableNameWithTableAlias(final String sql)
{
final String... | replaceTableNameWithTableAlias(sql.getSql(), tableAlias),
sql.getSqlParams());
}
static String replaceTableNameWithTableAlias(final String sql, @NonNull final String tableName, @NonNull final String tableAlias)
{
if (sql == null || sql.isEmpty())
{
return sql;
}
final String matchTableNameIgnoringCa... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\SqlEntityBinding.java | 1 |
请完成以下Java代码 | public void processParameterValueChanges(final List<JSONDocumentChangedEvent> events, final ReasonSupplier reason)
{
parameters.processValueChanges(events, reason);
}
public void setCopies(final int copies)
{
parameters.processValueChange(PARAM_Copies, copies, ReasonSupplier.NONE, DocumentFieldLogicExpressionR... | {
return AdProcessId.ofRepoId(processId);
}
}
return null;
}
public boolean isPrintPreview()
{
final IDocumentFieldView field = parameters.getFieldViewOrNull(PARAM_IsPrintPreview);
if (field != null)
{
return field.getValueAsBoolean();
}
return true;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\report\HUReportProcessInstance.java | 1 |
请完成以下Java代码 | public void setM_Allergen(final org.compiere.model.I_M_Allergen M_Allergen)
{
set_ValueFromPO(COLUMNNAME_M_Allergen_ID, org.compiere.model.I_M_Allergen.class, M_Allergen);
}
@Override
public void setM_Allergen_ID (final int M_Allergen_ID)
{
if (M_Allergen_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_Allergen_ID... | {
return get_ValueAsInt(COLUMNNAME_M_Allergen_ID);
}
@Override
public void setName (final java.lang.String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
@Override
public java.lang.String getName()
{
return get_ValueAsString(COLUMNNAME_Name);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Allergen_Trl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class SecurityConfiguration {
@Bean
MvcRequestMatcher.Builder mvc(HandlerMappingIntrospector introspector) {
return new MvcRequestMatcher.Builder(introspector);
}
@Bean
public SecurityFilterChain filterChain(HttpSecurity http, MvcRequestMatcher.Builder mvc) throws Exception {
... | @Bean
public InMemoryUserDetailsManager userDetailsService() {
UserDetails user = User.withDefaultPasswordEncoder()
.username("user")
.password("password")
.roles("USER")
.build();
UserDetails admin = User.withDefaultPasswordEncoder()
.us... | repos\tutorials-master\spring-boot-modules\spring-boot-actuator\src\main\java\com\baeldung\endpoints\enabling\SecurityConfiguration.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class CamelRouteUtil
{
@NonNull
public JacksonDataFormat setupJacksonDataFormatFor(
@NonNull final CamelContext context,
@NonNull final Class<?> unmarshalType)
{
final ObjectMapper objectMapper = JsonObjectMapperHolder.sharedJsonObjectMapper();
final JacksonDataFormat jacksonDataFormat = new Jackso... | @NonNull final String property,
@Nullable final String defaultValue)
{
final var propertyOpt = context
.getPropertiesComponent()
.resolveProperty(property);
if (defaultValue != null)
{
return propertyOpt.orElse(defaultValue);
}
else
{
return propertyOpt.orElseThrow(() -> new RuntimeCamelE... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\common\src\main\java\de\metas\camel\externalsystems\common\CamelRouteUtil.java | 2 |
请完成以下Java代码 | public ProcessPreconditionsResolution checkPreconditionsApplicable(@NonNull final IProcessPreconditionsContext context)
{
if (context.isNoSelection())
{
return ProcessPreconditionsResolution.rejectBecauseNoSelection();
}
// Make sure at least one receipt schedule is open
final boolean someSchedsAreStillO... | int counter = 0;
for (final I_M_ReceiptSchedule receiptSchedule : IteratorUtils.asIterable(scheds))
{
if (receiptScheduleBL.isClosed(receiptSchedule))
{
addLog(msgBL.getMsg(getCtx(), MSG_SKIP_CLOSED_1P, new Object[] { receiptSchedule.getM_ReceiptSchedule_ID() }));
continue;
}
closeInTrx(receiptS... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\process\M_ReceiptSchedule_Close.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Boolean saveCategory(String categoryName) {
/**
* 查询是否已存在
*/
NewsCategory temp = newsCategoryMapper.selectByCategoryName(categoryName);
if (temp == null) {
NewsCategory newsCategory = new NewsCategory();
newsCategory.setCategoryName(categoryName);... | newsCategory.setCategoryName(categoryName);
return newsCategoryMapper.updateByPrimaryKeySelective(newsCategory) > 0;
}
return false;
}
@Override
public Boolean deleteBatchByIds(Integer[] ids) {
if (ids.length < 1) {
return false;
}
//删除分类数据
... | repos\spring-boot-projects-main\SpringBoot咨询发布系统实战项目源码\springboot-project-news-publish-system\src\main\java\com\site\springboot\core\service\impl\CategoryServiceImpl.java | 2 |
请完成以下Java代码 | public class Start {
private static final Logger logger = LoggerFactory.getLogger(Start.class);
private static final int DEFAULT_PORT = 8080;
private static final String CONTEXT_PATH = "/";
private static final String CONFIG_LOCATION = AppConfig.class.getName();
private static final String MAPPING_... | }
private static ServletContextHandler getServletContextHandler(WebApplicationContext context) {
ServletContextHandler contextHandler = new ServletContextHandler();
contextHandler.setErrorHandler(null);
contextHandler.setContextPath(CONTEXT_PATH);
contextHandler.addServlet(new Servl... | repos\tutorials-master\spring-actuator\src\main\java\com\baeldung\spring\actuator\Start.java | 1 |
请完成以下Java代码 | public BigDecimal getQtyTU()
{
return orderLine.getQtyEnteredTU();
}
@Override
public void setQtyTU(final BigDecimal qtyPacks)
{
orderLine.setQtyEnteredTU(qtyPacks);
values.setQtyTU(qtyPacks);
}
@Override
public void setQtyCUsPerTU(final BigDecimal qtyCUsPerTU)
{
orderLine.setQtyItemCapacity(qtyCUsPe... | return orderLine.getQtyLU();
}
@Override
public void setLuId(@Nullable final HuPackingInstructionsId luId)
{
orderLine.setM_LU_HU_PI_ID(HuPackingInstructionsId.toRepoId(luId));
}
@Override
public HuPackingInstructionsId getLuId()
{
return HuPackingInstructionsId.ofRepoIdOrNull(orderLine.getM_LU_HU_PI_ID()... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\adempiere\gui\search\impl\OrderLineHUPackingAware.java | 1 |
请完成以下Java代码 | public LookupDataSourceContext.Builder newContextForFetchingById(final Object id)
{
return LookupDataSourceContext.builder(tableName)
.putFilterById(IdsToFilter.ofSingleValue(id));
}
@Override
public LookupValue retrieveLookupValueById(final @NonNull LookupDataSourceContext evalCtx)
{
final Object id = ev... | if (isLabelsValuesUseNumericKey())
{
return stringIds.stream()
.map(LabelsLookup::convertToInt)
.collect(ImmutableSet.toImmutableSet());
}
else
{
return ImmutableSet.copyOf(stringIds);
}
}
private static int convertToInt(final String stringId)
{
try
{
return Integer.parseInt(stringI... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\LabelsLookup.java | 1 |
请完成以下Java代码 | public void setC_LicenseFeeSettings_ID (final int C_LicenseFeeSettings_ID)
{
if (C_LicenseFeeSettings_ID < 1)
set_Value (COLUMNNAME_C_LicenseFeeSettings_ID, null);
else
set_Value (COLUMNNAME_C_LicenseFeeSettings_ID, C_LicenseFeeSettings_ID);
}
@Override
public int getC_LicenseFeeSettings_ID()
{
ret... | public BigDecimal getPercentOfBasePoints()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_PercentOfBasePoints);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\commission\model\X_C_LicenseFeeSettingsLine.java | 1 |
请完成以下Java代码 | public Object getValue() {
return value;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof LongDataEntry)) return false;
if (!super.equals(o)) return false;
LongDataEntry that = (LongDataEntry) o;
return Objects.equa... | return Objects.hash(super.hashCode(), value);
}
@Override
public String toString() {
return "LongDataEntry{" +
"value=" + value +
"} " + super.toString();
}
@Override
public String getValueAsString() {
return Long.toString(value);
}
} | repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\kv\LongDataEntry.java | 1 |
请完成以下Java代码 | public boolean isAll() {
return all;
}
public void setAll(boolean all) {
this.all = all;
}
/**
* 判断是否有相同字段
*
* @param fieldString
* @return
*/
public boolean existSameField(String fieldString) {
St... | return true;
}
}
}
}
return false;
}
@Override
public String toString() {
return "QueryTable{" +
"name='" + name + '\'' +
", alias='" + alias + '\'' +
... | repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\security\AbstractQueryBlackListHandler.java | 1 |
请完成以下Java代码 | public Integer getReplayCount() {
return replayCount;
}
public void setReplayCount(Integer replayCount) {
this.replayCount = replayCount;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
... | sb.append(", memberIp=").append(memberIp);
sb.append(", createTime=").append(createTime);
sb.append(", showStatus=").append(showStatus);
sb.append(", productAttribute=").append(productAttribute);
sb.append(", collectCouont=").append(collectCouont);
sb.append(", readCount=").appen... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsComment.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AD_Table_Process
{
@ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE, ModelValidator.TYPE_BEFORE_DELETE })
public void logSqlMigrationContextInfo(final I_AD_Table_Process record)
{
if (MigrationScriptFileLoggerHolder.isDisabled())
{
return;
}
final Ad... | final AdTabId adTabId = AdTabId.ofRepoIdOrNull(record.getAD_Tab_ID());
if (adTabId != null)
{
final ADTabNameFQ tabNameFQ = Names.ADTabNameFQ_Loader.retrieve(adTabId);
MigrationScriptFileLoggerHolder.logComment("Tab: " + tabNameFQ.toShortString());
}
final AdWindowId adWindowId = AdWindowId.ofRepoIdOrNul... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\validator\sql_migration_context_info\interceptor\AD_Table_Process.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public PostDto createPost(@RequestBody PostDto postDto) throws ParseException {
Post post = convertToEntity(postDto);
Post postCreated = postService.createPost(post);
return convertToDto(postCreated);
}
@GetMapping(value = "/{id}")
@ResponseBody
public PostDto getPost(@PathVari... | private PostDto convertToDto(Post post) {
PostDto postDto = modelMapper.map(post, PostDto.class);
postDto.setSubmissionDate(post.getSubmissionDate(),
userService.getCurrentUser().getPreference().getTimezone());
return postDto;
}
private Post convertToEntity(PostDto post... | repos\tutorials-master\spring-web-modules\spring-boot-rest\src\main\java\com\baeldung\springpagination\controller\PostRestController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Researcher {
@Id
private Long id;
private String name;
private boolean active;
public Researcher() {
}
public Researcher(Long id, String name) {
this.id = id;
this.name = name;
}
public Long getId() {
return id;
}
public void setId(Lo... | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean isActive() {
return active;
}
public void setActive(boolean active) {
this.active = active;
}
} | repos\tutorials-master\persistence-modules\hibernate-jpa-3\src\main\java\com\baeldung\hibernate\union\model\Researcher.java | 2 |
请完成以下Java代码 | public static AttachmentEntryCreateRequest fromDataSource(final DataSource dataSource)
{
final String filename = dataSource.getName();
final String contentType = dataSource.getContentType();
final byte[] data;
try
{
data = Util.readBytes(dataSource.getInputStream());
}
catch (final IOException e)
{
... | }
public static AttachmentEntryCreateRequest fromFile(@NonNull final File file)
{
final String filename = file.getName();
final String contentType = MimeType.getMimeType(filename);
final byte[] data = Util.readBytes(file);
return builder()
.type(AttachmentEntryType.Data)
.filename(filename)
.con... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\attachments\AttachmentEntryCreateRequest.java | 1 |
请完成以下Java代码 | public static Object convertToPOValue(@Nullable final Object value, @NonNull final Class<?> targetClass, final int displayType,@NonNull final ZoneId zoneId)
{
if (value == null)
{
return null;
}
final Class<?> valueClass = value.getClass();
if (targetClass.isAssignableFrom(valueClass))
{
return val... | return TimeUtil.asTimestamp(valueDate);
}
else if (Boolean.class.equals(targetClass))
{
if (String.class.equals(valueClass))
{
return StringUtils.toBoolean(value);
}
}
else if (BigDecimal.class.equals(targetClass))
{
if (Double.class.equals(valueClass))
{
return BigDecimal.valueOf((Do... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\util\converter\POValueConverters.java | 1 |
请完成以下Java代码 | private static void delayedServiceTask(Integer delayInSeconds) {
ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
executorService.schedule(Delay::someTask1, delayInSeconds, TimeUnit.SECONDS);
executorService.shutdown();
}
private static void fi... | } catch (InterruptedException ie) {
Thread.currentThread().interrupt();
}
sf.cancel(true);
executorService.shutdown();
}
private static void someTask1() {
System.out.println("Task 1 completed.");
}
private static void someTask2() {
System.out.print... | repos\tutorials-master\core-java-modules\core-java-concurrency-basic\src\main\java\com\baeldung\concurrent\delay\Delay.java | 1 |
请完成以下Java代码 | public String getElctrncAdr() {
return elctrncAdr;
}
/**
* Sets the value of the elctrncAdr property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setElctrncAdr(String value) {
this.elctrncAdr = value;
}
/*... | * {@link NameAndAddress10 }
*
*/
public NameAndAddress10 getPstlAdr() {
return pstlAdr;
}
/**
* Sets the value of the pstlAdr property.
*
* @param value
* allowed object is
* {@link NameAndAddress10 }
*
*/
public void setPstlAd... | repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-xjc_camt054_001_06\de\metas\payment\camt054_001_06\RemittanceLocationDetails1.java | 1 |
请完成以下Java代码 | public class ProductImpl implements Product {
protected String name;
protected String version;
protected String edition;
protected InternalsImpl internals;
public ProductImpl(String name, String version, String edition, InternalsImpl internals) {
this.name = name;
this.version = version;
this.ed... | public void setVersion(String version) {
this.version = version;
}
public String getEdition() {
return edition;
}
public void setEdition(String edition) {
this.edition = edition;
}
public InternalsImpl getInternals() {
return internals;
}
public void setInternals(InternalsImpl intern... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\telemetry\dto\ProductImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Rfq getRfqByUUID(@NonNull final String rfq_uuid)
{
return rfqRepo.findByUuid(rfq_uuid);
}
private void saveRecursivelyAndPush(@NonNull final Rfq rfq)
{
saveRecursively(rfq);
pushToMetasfresh(rfq);
}
@Override
public void saveRecursively(@NonNull final Rfq rfq)
{
//rfqQuantityRepo.saveAll(rfq.ge... | {
rfq.setPricePromisedUserEntered(request.getPrice());
}
saveRecursively(rfq);
return rfq;
}
@Override
public long getCountUnconfirmed(@NonNull final User user)
{
return rfqRepo.countUnconfirmed(user.getBpartner());
}
@Override
@Transactional
public void confirmUserEntries(@NonNull final User use... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\service\impl\RfQService.java | 2 |
请完成以下Java代码 | public void setAdValRuleIds(@NonNull final Map<LookupDescriptorProvider.LookupScope, AdValRuleId> adValRuleIds)
{
adValRuleIdByScope.clear();
adValRuleIdByScope.putAll(adValRuleIds);
}
public void setLookupTableName(final TableName lookupTableName)
{
assertNotBuilt();
this.lookupTableName = lookupTableName... | for (final IValidationRule valRule : CompositeValidationRule.unbox(validationRules))
{
addFilter(SqlLookupFilter.of(valRule, scope));
}
}
public void addFilter(@Nullable final IValidationRule validationRule, @Nullable LookupDescriptorProvider.LookupScope scope)
{
for (final IValidationRule valRule : Compos... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\CompositeSqlLookupFilterBuilder.java | 1 |
请完成以下Java代码 | public SqlDocumentQueryBuilder setPage(final int firstRow, final int pageLength)
{
this.firstRow = firstRow;
this.pageLength = pageLength;
return this;
}
private int getFirstRow()
{
return firstRow;
}
private int getPageLength()
{
return pageLength;
}
public static SqlComposedKey extractComposedKe... | final ImmutableSet.Builder<String> keyColumnNames = ImmutableSet.builder();
final ImmutableMap.Builder<String, Object> values = ImmutableMap.builder();
for (int i = 0; i < count; i++)
{
final SqlEntityFieldBinding keyField = keyFields.get(i);
final String keyColumnName = keyField.getColumnName();
keyColu... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\sql\SqlDocumentQueryBuilder.java | 1 |
请完成以下Java代码 | protected final boolean isPickerProfile()
{
return getViewProfileId() == null;
}
protected final boolean isReviewProfile()
{
return PickingConstantsV2.PROFILE_ID_ProductsToPickView_Review.equals(getViewProfileId());
}
@Override
protected final ProductsToPickView getView()
{
return ProductsToPickView.cas... | }
protected Stream<ProductsToPickRow> streamAllRows()
{
return getView()
.streamByIds(DocumentIdsSelection.ALL);
}
protected void updateViewRowFromPickingCandidate(@NonNull final DocumentId rowId, @NonNull final PickingCandidate pickingCandidate)
{
getView().updateViewRowFromPickingCandidate(rowId, picki... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\process\ProductsToPickViewBasedProcess.java | 1 |
请完成以下Java代码 | public void setIsPublic (boolean IsPublic)
{
set_Value (COLUMNNAME_IsPublic, Boolean.valueOf(IsPublic));
}
/** Get Public.
@return Public can read entry
*/
public boolean isPublic ()
{
Object oo = get_Value(COLUMNNAME_IsPublic);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolea... | if (ii == null)
return 0;
return ii.intValue();
}
/** Set Rating.
@param Rating
Classification or Importance
*/
public void setRating (int Rating)
{
set_Value (COLUMNNAME_Rating, Integer.valueOf(Rating));
}
/** Get Rating.
@return Classification or Importance
*/
public int getRating ()
{... | 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 I_M_HU getById(HuId huId) {return handlingUnitsBL.getById(huId);}
public HUProductStorages getProductStorages(final I_M_HU hu)
{
final List<IHUProductStorage> productStorages = handlingUnitsBL.getStorageFactory().getProductStorages(hu);
return new HUProductStorages(productStorages);
}
public Quantity g... | public IHUQRCode parse(final @NonNull ScannedCode scannedCode)
{
return huQRCodesService.parse(scannedCode);
}
public HuId getHuIdByQRCode(final @NonNull HUQRCode huQRCode)
{
return huQRCodesService.getHuIdByQRCode(huQRCode);
}
public String getDisplayName(final I_M_HU hu)
{
return handlingUnitsBL.getDis... | repos\metasfresh-new_dawn_uat\backend\de.metas.inventory.mobileui\src\main\java\de\metas\inventory\mobileui\deps\handlingunits\HandlingUnitsService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class ProductIdProperties {
private UUID smartphone;
private UUID wirelessHeadphones;
private UUID laptop;
public UUID getSmartphone() {
return smartphone;
}
public void setSmartphone(UUID smartphone) {
this.smartphone = smartphone;
}
public UUID getWirelessH... | return wirelessHeadphones;
}
public void setWirelessHeadphones(UUID wirelessHeadphones) {
this.wirelessHeadphones = wirelessHeadphones;
}
public UUID getLaptop() {
return laptop;
}
public void setLaptop(UUID laptop) {
this.laptop = laptop;
}
} | repos\tutorials-master\spring-cloud-modules\spring-cloud-aws-v3\src\main\java\com\baeldung\spring\cloud\aws\sqs\acknowledgement\configuration\ProductIdProperties.java | 2 |
请完成以下Java代码 | protected void onUpdate(AjaxRequestTarget target) {
String name = (String) cafeDropdown.getDefaultModel().getObject();
address.setAddress(cafeNamesAndAddresses.get(name).getAddress());
target.add(addressLabel);
}
});
add(addressLabel);
... | class Address implements Serializable {
private String sAddress = "";
public Address(String address) {
this.sAddress = address;
}
String getAddress() {
return this.sAddress;
}
void setAddress(String address) {
this.sAddress = address... | repos\tutorials-master\web-modules\wicket\src\main\java\com\baeldung\wicket\examples\cafeaddress\CafeAddress.java | 1 |
请完成以下Java代码 | public final class SqlDocumentFilterConvertersList
{
/* package */static Builder builder()
{
return new Builder();
}
/* package */static final SqlDocumentFilterConvertersList EMPTY = new SqlDocumentFilterConvertersList(ImmutableList.of());
private final ImmutableList<SqlDocumentFilterConverter> converters;
p... | return EMPTY;
}
return new SqlDocumentFilterConvertersList(converters);
}
public Builder converter(@NonNull final SqlDocumentFilterConverter converter)
{
if (converters == null)
{
converters = ImmutableList.builder();
}
converters.add(converter);
return this;
}
public Builder conve... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\sql\SqlDocumentFilterConvertersList.java | 1 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_R_CategoryUpdates[")
.append(get_ID()).append("]");
return sb.toString();
}
public I_AD_User getAD_User() throws RuntimeException
{
return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name)
.getPO(getAD_User_ID()... | if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
public I_R_Category getR_Category() throws RuntimeException
{
return (I_R_Category)MTable.get(getCtx(), I_R_Category.Table_Name)
.getPO(getR_Category_ID(), get_TrxName()); }
/** Set Categ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_R_CategoryUpdates.java | 1 |
请完成以下Java代码 | public void setMeta_Author (String Meta_Author)
{
set_Value (COLUMNNAME_Meta_Author, Meta_Author);
}
/** Get Meta Author.
@return Author of the content
*/
public String getMeta_Author ()
{
return (String)get_Value(COLUMNNAME_Meta_Author);
}
/** Set Meta Content Type.
@param Meta_Content
Defines ... | return (String)get_Value(COLUMNNAME_Meta_Publisher);
}
/** Set Meta RobotsTag.
@param Meta_RobotsTag
RobotsTag defines how search robots should handle this content
*/
public void setMeta_RobotsTag (String Meta_RobotsTag)
{
set_Value (COLUMNNAME_Meta_RobotsTag, Meta_RobotsTag);
}
/** Get Meta RobotsTag... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_WebProject.java | 1 |
请完成以下Java代码 | public void setUsername(String username) {
this.username = username;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPassword() {
return password;
}
public void setPassword(String passw... | public byte getState() {
return state;
}
public void setState(byte state) {
this.state = state;
}
public List<SysRole> getRoleList() {
return roleList;
}
public void setRoleList(List<SysRole> roleList) {
this.roleList = roleList;
}
/**
* Salt
... | repos\springboot-demo-master\shiro\src\main\java\com\et\shiro\entity\UserInfo.java | 1 |
请完成以下Java代码 | public class ProcessInstanceStartedEventHandler extends AbstractDatabaseEventLoggerEventHandler {
private static final String TYPE = "PROCESSINSTANCE_START";
@Override
public EventLogEntryEntity generateEventLogEntry(CommandContext commandContext) {
ActivitiEntityWithVariablesEvent eventWithVariab... | (String) variableName,
eventWithVariables.getVariables().get(variableName)
);
}
putInMapIfNotNull(data, Fields.VARIABLES, variableMap);
}
return createEventLogEntry(
TYPE,
processInstanceEntity.getProcessDefinitionId(),... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\event\logger\handler\ProcessInstanceStartedEventHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CreateProductUpsertReqProcessor implements Processor
{
protected Logger log = LoggerFactory.getLogger(getClass());
@Override
public void process(final Exchange exchange) throws Exception
{
final EbayImportOrdersRouteContext importOrdersRouteContext = getPropertyOrThrowError(exchange, ROUTE_PROPERTY_... | if (productRequestProducerResult.isPresent())
{
final ProductUpsertCamelRequest productUpsertCamelRequest = ProductUpsertCamelRequest.builder()
.jsonRequestProductUpsert(productRequestProducerResult.get().getJsonRequestProductUpsert())
.orgCode(importOrdersRouteContext.getOrgCode())
.build();
ex... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\de-metas-camel-ebay-camelroutes\src\main\java\de\metas\camel\externalsystems\ebay\processor\product\CreateProductUpsertReqProcessor.java | 2 |
请完成以下Java代码 | public Double getCount() {
return count;
}
public void setCount(Double count) {
this.count = count;
}
public Integer getTimeWindow() {
return timeWindow;
}
public void setTimeWindow(Integer timeWindow) {
this.timeWindow = timeWindow;
}
public Integer g... | public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public Date getGmtModified() {
return gmtModified;
}
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
@Override
public DegradeRule toRule() {
DegradeRul... | repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\rule\DegradeRuleEntity.java | 1 |
请完成以下Java代码 | private Result computeNewResult()
{
final UserDashboardDataProvider dataProvider = dashboardDataService
.getData(getUserDashboardKey())
.orElse(null);
// no user dashboard was found.
// might be that the user dashboard was deactivated in meantime.
if (dataProvider == null)
{
return Result.EMPTY;
... | public ImmutableList<UserDashboardItemDataResponse> getChangesFromOldVersion(@Nullable final Result oldResult)
{
if (oldResult == null)
{
return toList();
}
final ImmutableList.Builder<UserDashboardItemDataResponse> resultEffective = ImmutableList.builder();
for (final Map.Entry<UserDashboardItemI... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dashboard\websocket\UserDashboardWebsocketProducer.java | 1 |
请完成以下Java代码 | private static <T, S, K> ImmutableList<T> syncLists0(
@NonNull final Iterable<T> target,
@NonNull final Iterable<S> source,
@NonNull final Function<T, K> targetKeyExtractor,
@NonNull final Function<S, K> sourceKeyExtractor,
@NonNull final BiFunction<T, S, T> mergeFunction
)
{
final ImmutableMap<K, T>... | }
else
{
mapBuilder.put(entry.getKey(), entry.getValue());
}
}
if (!added)
{
mapBuilder.put(key, value);
changed = true;
}
if (!changed)
{
return map;
}
return mapBuilder.build();
}
public static <T> ImmutableList<T> removeIf(@NonNull ImmutableList<T> list, @NonNull Predicate... | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\CollectionUtils.java | 1 |
请完成以下Java代码 | public static Point getWindowLocation(final int AD_Window_ID)
{
final String key = "WindowLoc" + AD_Window_ID;
final String value = (String)s_prop.get(key);
if (value == null || value.length() == 0)
{
return null;
}
final int index = value.indexOf('|');
if (index == -1)
{
return null;
}
try
... | * Set Divider Location
*
* @param dividerLocation location
*/
public static void setDividerLocation(final int dividerLocation)
{
final String key = "Divider";
final String value = String.valueOf(dividerLocation);
s_prop.put(key, value);
} // setDividerLocation
/**
* Get Available Encoding Charsets... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\Ini.java | 1 |
请完成以下Java代码 | public String getF_END() {
return F_END;
}
public void setF_END(String f_END) {
F_END = f_END;
}
public String getF_SHAREDIREC() {
return F_SHAREDIREC;
}
public void setF_SHAREDIREC(String f_SHAREDIREC) {
F_SHAREDIREC = f_SHAREDIREC;
}
public String ge... | public void setF_ISSTD(String f_ISSTD) {
F_ISSTD = f_ISSTD;
}
public Timestamp getF_EDITTIME() {
return F_EDITTIME;
}
public void setF_EDITTIME(Timestamp f_EDITTIME) {
F_EDITTIME = f_EDITTIME;
}
public String getF_PLATFORM_ID() {
return F_PLATFORM_ID;
}
... | repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\common\vo\BscTollItem.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Object regionGetEntryAdvice(ProceedingJoinPoint joinPoint) throws Throwable {
return RegionEntryWrapper.from(joinPoint.proceed());
}
@Around("regionPointcut() && regionSelectValuePointcut()")
public Object regionSelectValueAdvice(ProceedingJoinPoint joinPoint) throws Throwable {
return PdxInstanceWrapper... | @Override
public Region<K, V> getRegion() {
return getDelegate().getRegion();
}
@Override
public CacheStatistics getStatistics() {
return getDelegate().getStatistics();
}
@Override
public Object setUserAttribute(Object userAttribute) {
return getDelegate().setUserAttribute(userAttribute);
}
... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-autoconfigure\src\main\java\org\springframework\geode\boot\autoconfigure\support\PdxInstanceWrapperRegionAspect.java | 2 |
请完成以下Java代码 | public class M_InventoryLine_MarkAsCounted extends JavaProcess
{
@Override
protected String doIt() throws Exception
{
getSelectedInventoryLines()
.stream()
.forEach(inventoryLine -> markAsCounted(inventoryLine));
return MSG_OK;
}
private void markAsCounted(final I_M_InventoryLine inventoryLine)
{
... | private List<I_M_InventoryLine> getSelectedInventoryLines()
{
final IQueryFilter<I_M_InventoryLine> selectedInventoryLines = getProcessInfo().getQueryFilterOrElseFalse();
final IQueryBL queryBL = Services.get(IQueryBL.class);
final IQueryBuilder<I_M_InventoryLine> queryBuilder = queryBL.createQueryBuilder(I_M_I... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inventory\process\M_InventoryLine_MarkAsCounted.java | 1 |
请完成以下Java代码 | public String onAD_Table_ID(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value)
{
I_EXP_Format format = InterfaceWrapperHelper.create(mTab, I_EXP_Format.class);
if (format.getAD_Table_ID() > 0)
{
String tableName = Services.get(IADTableDAO.class).retrieveTableName(format.getAD_Table_ID... | line.setName(format.getName());
}
else if (line.getAD_Column_ID() > 0)
{
MColumn column = MColumn.get(ctx, line.getAD_Column_ID());
String columnName = column.getColumnName();
line.setValue(columnName);
line.setName(columnName);
if (column.isMandatory())
{
line.setIsMandatory(true);
}
}... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\CalloutEXP_Format.java | 1 |
请完成以下Java代码 | public void closeAll() {
for (Channel channel : this.channels) {
try {
if (channel != ConsumerChannelRegistry.getConsumerChannel()) { // NOSONAR
channel.close();
}
else {
if (logger.isDebugEnabled()) {
logger.debug("Skipping close of consumer channel: " + channel.toString());
}
... | RabbitUtils.rollbackIfNecessary(channel);
if (this.deliveryTags.containsKey(channel)) {
for (Long deliveryTag : this.deliveryTags.get(channel)) {
try {
channel.basicReject(deliveryTag, this.requeueOnRollback);
}
catch (IOException ex) {
throw new AmqpIOException(ex);
}
}
/... | repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\connection\RabbitResourceHolder.java | 1 |
请完成以下Java代码 | public static <T extends Message> void broadcast(String type, T message) {
// 创建消息
String messageText = buildTextMessage(type, message);
// 遍历 SESSION_USER_MAP ,进行逐个发送
for (Session session : SESSION_USER_MAP.keySet()) {
sendTextMessage(session, messageText);
}
}
... | JSONObject messageObject = new JSONObject();
messageObject.put("type", type);
messageObject.put("body", message);
return messageObject.toString();
}
/**
* 真正发送消息
*
* @param session Session
* @param messageText 消息
*/
private static void sendTextMessage(Sessio... | repos\SpringBoot-Labs-master\lab-25\lab-websocket-25-01\src\main\java\cn\iocoder\springboot\lab25\springwebsocket\util\WebSocketUtil.java | 1 |
请完成以下Java代码 | public class PageParam {
private int beginLine; //起始行
private Integer pageSize = 3;
private Integer currentPage=0; // 当前页
public int getBeginLine() {
return pageSize*currentPage;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Inte... | return currentPage;
}
public void setCurrentPage(Integer currentPage) {
this.currentPage = currentPage;
}
@Override
public String toString() {
return "PageParam{" +
"beginLine=" + beginLine +
", pageSize=" + pageSize +
", currentPage=... | repos\spring-boot-leaning-master\2.x_42_courses\第 3-2 课: 如何优雅的使用 MyBatis XML 配置版\spring-boot-mybatis-xml\src\main\java\com\neo\param\PageParam.java | 1 |
请完成以下Java代码 | public String getTaskId() {
Task task = getTask();
return task != null ? task.getId() : null;
}
/**
* Returns the currently associated {@link Task} or 'null'
*
* @throws ProcessEngineCdiException
* if no {@link Task} is associated. Use {@link #isTaskAssociated()}
* to ch... | * {@link #isAssociated()} to check whether an association exists.
*/
public ProcessInstance getProcessInstance() {
Execution execution = getExecution();
if(execution != null && !(execution.getProcessInstanceId().equals(execution.getId()))){
return processEngine
.getRuntimeServic... | repos\camunda-bpm-platform-master\engine-cdi\core\src\main\java\org\camunda\bpm\engine\cdi\BusinessProcess.java | 1 |
请完成以下Java代码 | public Stream<EmailAttachment> streamEmailAttachments(@NonNull final TableRecordReference recordRef, @Nullable final String tagName)
{
return attachmentEntryRepository.getByReferencedRecord(recordRef)
.stream()
.filter(attachmentEntry -> Check.isBlank(tagName) || attachmentEntry.getTags().hasTag(tagName))
... | @Builder
private AttachmentEntryQuery(
@Singular("tagSetToTrue") final List<String> tagsSetToTrue,
@Singular("tagSetToAnyValue") final List<String> tagsSetToAnyValue,
@Nullable final String mimeType,
@NonNull final Object referencedRecord)
{
this.referencedRecord = referencedRecord;
this.mime... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\attachments\AttachmentEntryService.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_AD_Column getAD_Column()
{
return get_ValueAsPO(COLUMNNAME_AD_Column_ID, org.compiere.model.I_AD_Column.class);
}
@Override
public void setAD_Column(final org.compiere.model.I_AD_Column AD_Column)
{
set_ValueFromPO(COLUMNNAME_AD_Column_ID, org.compiere.model.I_AD_Column.class, AD_C... | @Override
public void setES_FTS_Filter_ID (final int ES_FTS_Filter_ID)
{
if (ES_FTS_Filter_ID < 1)
set_ValueNoCheck (COLUMNNAME_ES_FTS_Filter_ID, null);
else
set_ValueNoCheck (COLUMNNAME_ES_FTS_Filter_ID, ES_FTS_Filter_ID);
}
@Override
public int getES_FTS_Filter_ID()
{
return get_ValueAsInt(COLUM... | repos\metasfresh-new_dawn_uat\backend\de.metas.elasticsearch\src\main\java-gen\de\metas\elasticsearch\model\X_ES_FTS_Filter_JoinColumn.java | 1 |
请完成以下Java代码 | public static void capitalize() throws Exception {
String inputTopic = "flink_input";
String outputTopic = "flink_output";
String consumerGroup = "baeldung";
String address = "localhost:9092";
StreamExecutionEnvironment environment = StreamExecutionEnvironment.getExecutionEnviro... | environment.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);
FlinkKafkaConsumer<InputMessage> flinkKafkaConsumer = createInputMessageConsumer(inputTopic, kafkaAddress, consumerGroup);
flinkKafkaConsumer.setStartFromEarliest();
flinkKafkaConsumer.assignTimestampsAndWatermarks(new Inpu... | repos\tutorials-master\apache-kafka-2\src\main\java\com\baeldung\flink\FlinkDataPipeline.java | 1 |
请完成以下Java代码 | public class SetProcessDefinitionCategoryCmd implements Command<Void> {
protected String processDefinitionId;
protected String category;
public SetProcessDefinitionCategoryCmd(String processDefinitionId, String category) {
this.processDefinitionId = processDefinitionId;
this.category = cat... | return null;
}
public String getProcessDefinitionId() {
return processDefinitionId;
}
public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
public String getCategory() {
return category;
}
public voi... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\cmd\SetProcessDefinitionCategoryCmd.java | 1 |
请完成以下Java代码 | public class User {
private Long id;
private String name;
private String email;
private String department;
public User() {
}
public User(Long id, String name, String email, String department) {
this.id = id;
this.name = name;
this.email = email;
this.depart... | public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getDepartment() {
return department;
}
public void setDepartment(String departmen... | repos\tutorials-master\spring-core-4\src\main\java\com\baeldung\parametrizedtypereference\User.java | 1 |
请完成以下Java代码 | public I_M_PackagingTreeItem getRef_M_PackagingTreeItem() throws RuntimeException
{
return (I_M_PackagingTreeItem)MTable.get(getCtx(), I_M_PackagingTreeItem.Table_Name)
.getPO(getRef_M_PackagingTreeItem_ID(), get_TrxName()); }
/** Set Ref Packaging Tree Item.
@param Ref_M_PackagingTreeItem_ID Ref Packaging... | /** PackedItem = PI */
public static final String TYPE_PackedItem = "PI";
/** UnPackedItem = UI */
public static final String TYPE_UnPackedItem = "UI";
/** AvailableBox = AB */
public static final String TYPE_AvailableBox = "AB";
/** NonItem = NI */
public static final String TYPE_NonItem = "NI";
/** Set Art.
... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\compiere\model\X_M_PackagingTreeItem.java | 1 |
请完成以下Java代码 | public class CorrelationKey {
protected String value;
protected Collection<EventPayloadInstance> parameterInstances;
public CorrelationKey(String value, Collection<EventPayloadInstance> parameterInstances) {
this.value = value;
this.parameterInstances = parameterInstances;
}
publi... | this.parameterInstances = parameterInstances;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CorrelationKey that = (CorrelationKey) o;
return... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\consumer\CorrelationKey.java | 1 |
请完成以下Java代码 | public static int getKthElementSorted(int[] list1, int[] list2, int k) {
int length1 = list1.length, length2 = list2.length;
int[] combinedArray = new int[length1 + length2];
System.arraycopy(list1, 0, combinedArray, 0, list1.length);
System.arraycopy(list2, 0, combinedArray, list1.leng... | i1++;
} else {
i2++;
}
}
if((i1 + i2) < k) {
return i1 < list1.length ? list1[k - i2 - 1] : list2[k - i1 - 1];
} else if(i1 > 0 && i2 > 0) {
return Math.max(list1[i1-1], list2[i2-1]);
} else {
return i1 == 0 ? l... | repos\tutorials-master\algorithms-modules\algorithms-searching\src\main\java\com\baeldung\algorithms\kthsmallest\KthSmallest.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class BookstoreService {
private final AuthorRepository authorRepository;
private final BookRepository bookRepository;
public BookstoreService(AuthorRepository authorRepository,
BookRepository bookRepository) {
this.authorRepository = authorRepository;
this.bookReposito... | .collect(Collectors.toList());
booksToRemove .forEach(b -> author.removeBook(b));
// Update the existing database rows which can be found
// in the incoming collection (detachedBooks)
List<Book> newBooks = detachedBooks.stream()
.filter(b -> !author.getBooks().contains(... | repos\Hibernate-SpringBoot-master\HibernateSpringBootMergeCollections\src\main\java\com\bookstore\service\BookstoreService.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class OrgTypeId implements RepoIdAware
{
@JsonCreator
public static OrgTypeId ofRepoId(final int repoId)
{
return new OrgTypeId(repoId);
}
public static OrgTypeId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? ofRepoId(repoId) : null;
}
public static int toRepoId(final OrgTypeId id)
{
re... | this.repoId = Check.assumeGreaterThanZero(repoId, "AD_OrgType_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
public static boolean equals(final OrgTypeId id1, final OrgTypeId id2)
{
return Objects.equals(id1, id2);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\organization\OrgTypeId.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public void stop() {
log.warn("debeziumEngine 监听实例关闭!");
debeziumEngine.close();
Thread.sleep(2000);
log.warn(ThreadPoolEnum.SQL_SERVER_LISTENER_POOL + "线程池关闭!");
executor.shutdown();
}
@Override
public boolean isRunning() {
... | * 枚举 (构造器默认为私有)
*/
ThreadPoolEnum() {
final ThreadFactory threadFactory = new ThreadFactoryBuilder().setNameFormat(SQL_SERVER_LISTENER_POOL + "-%d").build();
es = new ThreadPoolExecutor(8, 16, 60,
TimeUnit.SECONDS, new ArrayBlockingQueue<>... | repos\springboot-demo-master\debezium\src\main\java\com\et\debezium\config\ChangeEventConfig.java | 2 |
请完成以下Java代码 | public class PostalCodeImportProcess extends SimpleImportProcessTemplate<I_I_Postal>
{
@Override
public Class<I_I_Postal> getImportModelClass()
{
return I_I_Postal.class;
}
@Override
public String getImportTableName()
{
return I_I_Postal.Table_Name;
}
@Override
protected String getTargetTableName()
{
... | final boolean isInsertOnly_NOTUSED)
{
return importPostalCode(importRecord);
}
private ImportRecordResult importPostalCode(@NonNull final I_I_Postal importRecord)
{
// the current handling for duplicates (postal code + country) is nonexistent.
// we blindly try to insert in db, and if there are unique constr... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\location\impexp\PostalCodeImportProcess.java | 1 |
请完成以下Java代码 | public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public Integer getStatus() {
return status;
}
public void setStatus(I... | @Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", startTi... | repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\SmsFlashPromotionSession.java | 1 |
请完成以下Java代码 | public List<String> getAuthorities() {
return userService.getAuthorities();
}
/**
* GET /users/:login : get the "login" user.
*
* @param login the login of the user to find
* @return the ResponseEntity with status 200 (OK) and with body the "login" user, or with status 404 (Not Foun... | /**
* DELETE /users/:login : delete the "login" User.
*
* @param login the login of the user to delete
* @return the ResponseEntity with status 200 (OK)
*/
@DeleteMapping("/users/{login:" + Constants.LOGIN_REGEX + "}")
@PreAuthorize("hasRole(\"" + AuthoritiesConstants.ADMIN + "\")")
... | repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\web\rest\UserResource.java | 1 |
请完成以下Java代码 | private static ITranslatableString buildMessage(
@Nullable final IPricingContext pricingCtx,
final int documentLineNo,
final ProductId productId)
{
final TranslatableStringBuilder sb = TranslatableStrings.builder();
if (documentLineNo > 0)
{
if (!sb.isEmpty())
{
sb.append(", ");
}
sb.ap... | {
sb.append(", ");
}
sb.appendADElement("C_BPartner_ID").append(": ").append(bpartnerName);
}
final CountryId countryId = pricingCtx == null ? null : pricingCtx.getCountryId();
if (countryId != null)
{
final ITranslatableString countryName = Services.get(ICountryDAO.class).getCountryNameById(count... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\exceptions\ProductNotOnPriceListException.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public I_C_UOM getC_UOM()
{
return getDelegate().getC_UOM();
}
@Override
public PackingItemGroupingKey getGroupingKey()
{
return getDelegate().getGroupingKey();
}
@Override
public BPartnerId getBPartnerId()
{
return getDelegate().getBPartnerId();
}
@Override
public BPartnerLocationId getBPartnerLoc... | {
getDelegate().addParts(toAdd);
}
@Override
public Set<WarehouseId> getWarehouseIds()
{
return getDelegate().getWarehouseIds();
}
@Override
public Set<ShipmentScheduleId> getShipmentScheduleIds()
{
return getDelegate().getShipmentScheduleIds();
}
@Override
public IPackingItem subtractToPackingItem(... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\picking\service\ForwardingPackingItem.java | 2 |
请完成以下Java代码 | public String getContentId() {
return contentId;
}
public void setContentId(String contentId) {
this.contentId = contentId;
}
public ByteArrayEntity getContent() {
return content;
}
public void setContent(ByteArrayEntity content) {
this.content = content;
} | public void setUserId(String userId) {
this.userId = userId;
}
public String getUserId() {
return userId;
}
public Date getTime() {
return time;
}
public void setTime(Date time) {
this.time = time;
}
} | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\AttachmentEntityImpl.java | 1 |
请完成以下Java代码 | public Optional<NotificationTemplate> findNotificationTemplateByTenantIdAndType(TenantId tenantId, NotificationType notificationType) {
return findNotificationTemplatesByTenantIdAndNotificationTypes(tenantId, List.of(notificationType), new PageLink(1)).getData()
.stream().findFirst();
}
... | deleteNotificationTemplatesByTenantId(tenantId);
}
@Override
public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) {
return Optional.ofNullable(findNotificationTemplateById(tenantId, new NotificationTemplateId(entityId.getId())));
}
@Override
public FluentFuture<Op... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\notification\DefaultNotificationTemplateService.java | 1 |
请在Spring Boot框架中完成以下Java代码 | CorrelationScopeCustomizer correlationFieldsCorrelationScopeCustomizer() {
return (builder) -> {
Correlation correlationProperties = this.tracingProperties.getBaggage().getCorrelation();
for (String field : correlationProperties.getFields()) {
BaggageField baggageField = BaggageField.create(field);
... | }
/**
* Propagates neither traces nor baggage.
*/
@Configuration(proxyBeanMethods = false)
static class NoPropagation {
@Bean
@ConditionalOnMissingBean(Factory.class)
CompositePropagationFactory noopPropagationFactory() {
return CompositePropagationFactory.noop();
}
}
} | repos\spring-boot-4.0.1\module\spring-boot-micrometer-tracing-brave\src\main\java\org\springframework\boot\micrometer\tracing\brave\autoconfigure\BravePropagationConfigurations.java | 2 |
请完成以下Java代码 | protected OrderingProperty getLastConfiguredProperty() {
return !orderingProperties.isEmpty() ? orderingProperties.get(orderingProperties.size() - 1) : null;
}
/**
* The field to sort by.
*/
public enum SortingField {
CREATE_TIME("createTime");
private final String name;
SortingField(Str... | result.setField(field);
result.setDirection(direction);
return result;
}
public void setField(SortingField field) {
this.field = field;
}
public SortingField getField() {
return this.field;
}
public void setDirection(Direction direction) {
this.direction = direc... | repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\task\OrderingConfig.java | 1 |
请完成以下Java代码 | public boolean seeksAfterHandling() {
return this.recordErrorHandler.seeksAfterHandling();
}
@Override
public boolean deliveryAttemptHeader() {
return this.recordErrorHandler.deliveryAttemptHeader();
}
@Override
public void handleOtherException(Exception thrownException, Consumer<?, ?> consumer,
MessageL... | this.batchErrorHandler.handleBatch(thrownException, data, consumer, container, invokeListener);
}
@Override
public int deliveryAttempt(TopicPartitionOffset topicPartitionOffset) {
return this.recordErrorHandler.deliveryAttempt(topicPartitionOffset);
}
@Override
public void clearThreadState() {
this.batchErr... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\CommonMixedErrorHandler.java | 1 |
请完成以下Java代码 | public Set<String> getFieldNames()
{
return elementBuilders
.stream()
.flatMap(element -> element.getFieldNames().stream())
.collect(GuavaCollectors.toImmutableSet());
}
public Builder setIdFieldName(final String idFieldName)
{
this.idFieldName = idFieldName;
return this;
}
private... | }
private ImmutableSet<ViewCloseAction> getAllowedViewCloseActions()
{
return allowedViewCloseActions != null
? ImmutableSet.copyOf(allowedViewCloseActions)
: DEFAULT_allowedViewCloseActions;
}
public Builder setHasTreeSupport(final boolean hasTreeSupport)
{
this.hasTreeSupport = hasTreeSupp... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\descriptor\ViewLayout.java | 1 |
请完成以下Java代码 | public class QuantityUOMConverters
{
public static QuantityUOMConverter noConversion()
{
return NoConversion.instance;
}
private static class NoConversion implements QuantityUOMConverter
{
public static final transient QuantityUOMConverters.NoConversion instance = new QuantityUOMConverters.NoConversion();
... | if (UomId.equals(qty.getUomId(), targetUOMId))
{
return qty;
}
if (UomId.equals(qty.getSourceUomId(), targetUOMId))
{
return qty.switchToSource();
}
else
{
throw new QuantitiesUOMNotMatchingExpection("Cannot convert " + qty + " to " + targetUOMId);
}
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\quantity\QuantityUOMConverters.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CommonSecurityConfig {
@Bean
public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
@Bean
public IgnoreUrlsConfig ignoreUrlsConfig() {
return new IgnoreUrlsConfig();
}
@Bean
public JwtTokenUtil jwtTokenUtil() {
return new ... | @ConditionalOnBean(name = "dynamicSecurityService")
@Bean
public DynamicAccessDecisionManager dynamicAccessDecisionManager() {
return new DynamicAccessDecisionManager();
}
@ConditionalOnBean(name = "dynamicSecurityService")
@Bean
public DynamicSecurityMetadataSource dynamicSecurityMetad... | repos\mall-master\mall-security\src\main\java\com\macro\mall\security\config\CommonSecurityConfig.java | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.