instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | public class DocOutboundUtils
{
public I_C_Doc_Outbound_Log_Line createOutboundLogLineRecord(@NonNull final I_C_Doc_Outbound_Log docOutboundLog)
{
Check.assume(!isNew(docOutboundLog), "The given docOutboundLog needs to be saved; docOutboundLog={}", docOutboundLog);
final Properties ctx = getCtx(docOutboundLog);
... | final IDocumentBL documentBL = Services.get(IDocumentBL.class);
final String documentNo = documentBL.getDocumentNo(ctx, docOutboundLog.getAD_Table_ID(), docOutboundLog.getRecord_ID());
docOutboundLogLineRecord.setDocumentNo(documentNo);
final TableRecordReference reference = TableRecordReference.ofReferenced(do... | repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\DocOutboundUtils.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DataEntry_Field
{
public DataEntry_Field()
{
Services.get(IProgramaticCalloutProvider.class).registerAnnotatedCallout(this);
}
@ModelChange(timings = ModelValidator.TYPE_BEFORE_DELETE)
public void deleteChildRecords(@NonNull final I_DataEntry_Field dataEntryFieldRecord)
{
Services.get(IQueryBL.c... | {
if (dataEntryFieldRecord.getDataEntry_Line_ID() <= 0)
{
return;
}
dataEntryFieldRecord.setSeqNo(maxSeqNo(dataEntryFieldRecord) + 10);
}
private int maxSeqNo(@NonNull final I_DataEntry_Field dataEntryFieldRecord)
{
return Services
.get(IQueryBL.class)
.createQueryBuilder(I_DataEntry_Field.clas... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dataentry\layout\interceptor\DataEntry_Field.java | 2 |
请完成以下Java代码 | public class MyBatisUtil {
public static final String DRIVER = "org.apache.derby.jdbc.EmbeddedDriver";
public static final String URL = "jdbc:derby:testdb1;create=true";
public static final String USERNAME = "sa";
public static final String PASSWORD = "pass123";
private static SqlSessionFactory sqlSessionFactory;
... | }
public static SqlSessionFactory getSqlSessionFactory() {
return sqlSessionFactory;
}
public String getPersonByName(String name) {
return new SQL() {
{
SELECT("*");
FROM("person");
WHERE("name like #{name} || '%'");
}
}.toString();
}
} | repos\tutorials-master\mybatis\src\main\java\com\baeldung\mybatis\utils\MyBatisUtil.java | 1 |
请完成以下Java代码 | public void setReadOnlyLogic (final @Nullable java.lang.String ReadOnlyLogic)
{
set_Value (COLUMNNAME_ReadOnlyLogic, ReadOnlyLogic);
}
@Override
public java.lang.String getReadOnlyLogic()
{
return get_ValueAsString(COLUMNNAME_ReadOnlyLogic);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Val... | }
@Override
public void setTemplate_Tab(final org.compiere.model.I_AD_Tab Template_Tab)
{
set_ValueFromPO(COLUMNNAME_Template_Tab_ID, org.compiere.model.I_AD_Tab.class, Template_Tab);
}
@Override
public void setTemplate_Tab_ID (final int Template_Tab_ID)
{
if (Template_Tab_ID < 1)
set_Value (COLUMNNAME... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Tab.java | 1 |
请完成以下Java代码 | protected final LocalDate getDocumentDate(@Nullable final Object model)
{
if (model == null)
{
return null;
}
if (model instanceof I_C_OrderLine)
{
return TimeUtil.asLocalDate(((I_C_OrderLine)model).getDateOrdered());
}
final IDocument doc = getDocumentOrNull(model);
if (doc != null)
{
ret... | .collect(GuavaCollectors.toImmutableMapByKey(IDocActionItem::getValue));
}
private static final class DocActionItem implements IDocActionItem
{
private final String value;
private final String caption;
private final String description;
private DocActionItem(final ADRefListItem adRefListItem, final String a... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\document\engine\impl\AbstractDocumentBL.java | 1 |
请完成以下Java代码 | public int getLastDeleted ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_LastDeleted);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Last Run.
@param LastRun Last Run */
public void setLastRun (Timestamp LastRun)
{
set_Value (COLUMNNAME_LastRun, LastRun);
}
/** Get Last Run.
@re... | return false;
}
/** 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 be unique
*/
publ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_HouseKeeping.java | 1 |
请完成以下Java代码 | public Price2 getDealPric() {
return dealPric;
}
/**
* Sets the value of the dealPric property.
*
* @param value
* allowed object is
* {@link Price2 }
*
*/
public void setDealPric(Price2 value) {
this.dealPric = value;
}
/**
* G... | * This is why there is not a <CODE>set</CODE> method for the prtry property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getPrtry().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Pro... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\TransactionPrice3Choice.java | 1 |
请完成以下Java代码 | public class C_Project_UnClose extends JavaProcess implements IProcessPrecondition
{
private final ProjectService projectService = SpringContextHolder.instance.getBean(ProjectService.class);
@Override
public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext cont... | if (!projectService.isClosed(projectId))
{
return ProcessPreconditionsResolution.rejectWithInternalReason("projectis not closed");
}
return ProcessPreconditionsResolution.accept();
}
@Override
protected String doIt()
{
final ProjectId projectId = ProjectId.ofRepoId(getRecord_ID());
projectService.unc... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\project\process\C_Project_UnClose.java | 1 |
请完成以下Java代码 | public Mono<Void> deleteById(String id) {
return Mono.fromRunnable(() -> this.sessions.remove(id));
}
@Override
public Mono<MapSession> createSession() {
// @formatter:off
return Mono.fromSupplier(() -> this.sessionIdGenerator.generate())
.subscribeOn(Schedulers.boundedElastic())
.publishOn(Schedulers... | });
// @formatter:on
}
/**
* Sets the {@link SessionIdGenerator} to use.
* @param sessionIdGenerator the non-null {@link SessionIdGenerator} to use
* @since 3.2
*/
public void setSessionIdGenerator(SessionIdGenerator sessionIdGenerator) {
Assert.notNull(sessionIdGenerator, "sessionIdGenerator cannot be ... | repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\ReactiveMapSessionRepository.java | 1 |
请完成以下Java代码 | public static class KeyValuePair {
private String key;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "type")
@JsonSubTypes({
@JsonSubTypes.Type(value = String.class, name = "string"),
@JsonSubTypes.Type(value = ... | return key;
}
public void setKey(String key) {
this.key = key;
}
public Object getValue() {
return value;
}
public void setValue(Object value) {
this.value = value;
}
}
} | repos\tutorials-master\jackson-modules\jackson-conversions-3\src\main\java\com\baeldung\jackson\specifictype\dtos\PersonDTOWithType.java | 1 |
请完成以下Java代码 | public List<CaseDefinitionDto> getCaseDefinitions(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
CaseDefinitionQueryDto queryDto = new CaseDefinitionQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
List<CaseDefinitionDto> definitions = new ArrayList<CaseDefinitionDto>();
ProcessEngin... | @Override
public CountResultDto getCaseDefinitionsCount(UriInfo uriInfo) {
CaseDefinitionQueryDto queryDto = new CaseDefinitionQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
ProcessEngine engine = getProcessEngine();
CaseDefinitionQuery query = queryDto.toQuery(engine);
long count = quer... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\CaseDefinitionRestServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class RpUserBankAuth extends BaseEntity implements Serializable {
private static final long serialVersionUID = 6173089060762552675L;
/**
* 商户号
*/
private String merchantNo;
/**
* 支付订单号
*/
private String payOrderNo;
/**
* 用户名称
*/
private String userNam... | return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getIdNo() {
return idNo;
}
public voi... | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\entity\RpUserBankAuth.java | 2 |
请完成以下Java代码 | String run(@Nullable Consumer<String> outputConsumer, String... command) {
logger.trace(LogMessage.of(() -> "Running '%s'".formatted(String.join(" ", command))));
Process process = startProcess(command);
ReaderThread stdOutReader = new ReaderThread(process.getInputStream(), "stdout", outputConsumer);
ReaderThre... | this.outputConsumer = outputConsumer;
setName("OutputReader-" + name);
setDaemon(true);
start();
}
@Override
public void run() {
try (BufferedReader reader = new BufferedReader(
new InputStreamReader(this.source, StandardCharsets.UTF_8))) {
String line = reader.readLine();
while (line !=... | repos\spring-boot-4.0.1\core\spring-boot-docker-compose\src\main\java\org\springframework\boot\docker\compose\core\ProcessRunner.java | 1 |
请完成以下Java代码 | public LookupValuesList getDeviceIds()
{
return deviceAccessorsHubFactory.getDefaultDeviceAccessorsHub()
.streamAllDeviceAccessors()
.map(PrintDeviceQRCodes::toLookupValue)
.distinct()
.collect(LookupValuesList.collect());
}
private static LookupValue toLookupValue(DeviceAccessor deviceAccessor)
... | final DeviceId onlyDeviceId = StringUtils.trimBlankToOptional(p_deviceIdStr)
.map(DeviceId::ofString)
.orElse(null);
if (onlyDeviceId != null)
{
final DeviceAccessor deviceAccessor = deviceAccessorsHubFactory.getDefaultDeviceAccessorsHub()
.getDeviceAccessorById(onlyDeviceId)
.orElseThrow(() -... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\devices\webui\process\PrintDeviceQRCodes.java | 1 |
请完成以下Java代码 | public CostAmount convertToAcctSchemaCurrency(
final CostAmount amt,
final CostDetailCreateRequest request)
{
final AcctSchemaId acctSchemaId = request.getAcctSchemaId();
return convertToAcctSchemaCurrency(
amt,
() -> getCurrencyConversionContext(request),
acctSchemaId);
}
public CostAmount c... | return CostAmount.of(result.getAmount(), acctCurrencyId, result.getSourceAmount(), result.getSourceCurrencyId());
}
@NonNull
public CurrencyConversionResult convert(
final CurrencyConversionContext conversionCtx,
final Money price,
final CurrencyId acctCurrencyId)
{
return currencyBL.convert(conversionC... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\methods\CostingMethodHandlerUtils.java | 1 |
请完成以下Java代码 | public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getState() {
return state;
}
... | }
public void setTimezone(String timezone) {
this.timezone = timezone;
}
@JsonIgnore
@Override public String getId() {
return zip;
}
@JsonIgnore
@Override public boolean isNew() {
return !persisted;
}
} | repos\tutorials-master\quarkus-modules\quarkus-vs-springboot\spring-project\src\main\java\com\baeldung\spring_project\domain\ZipCode.java | 1 |
请完成以下Java代码 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
setMdc(request);
return true;
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exceptio... | }
}
/**
* 删除MDC标示
*/
private void deleteMdc() {
try {
MDC.remove(MdcConstant.SESSION_KEY);
MDC.remove(MdcConstant.REQUEST_KEY);
} catch (Exception e) {
logger.warn(e.getMessage(), e);
}
}
} | repos\spring-boot-student-master\spring-boot-student-log\src\main\java\com\xiaolyuh\interceptors\TrackInterceptor.java | 1 |
请完成以下Java代码 | public ResourceParameter newInstance(ModelTypeInstanceContext instanceContext) {
return new ResourceParameterImpl(instanceContext);
}
});
nameAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_NAME)
.build();
typeAttribute = typeBuilder.stringAttribute(BPMN_ATTRIBUTE_TYPE)
... | public ItemDefinition getType() {
return typeAttribute.getReferenceTargetElement(this);
}
public void setType(ItemDefinition type) {
typeAttribute.setReferenceTargetElement(this, type);
}
public boolean isRequired() {
return isRequiredAttribute.getValue(this);
}
public void setRequired(boolea... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\ResourceParameterImpl.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO (Properties ctx)
{
org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName());
return poi;
}
/** Set Qualität-Notiz.
@param M_QualityNote_ID Qualität-Notiz */
@Override
public void setM_QualityNote_ID (int M... | /** Set PerformanceType.
@param PerformanceType PerformanceType */
@Override
public void setPerformanceType (java.lang.String PerformanceType)
{
set_Value (COLUMNNAME_PerformanceType, PerformanceType);
}
/** Get PerformanceType.
@return PerformanceType */
@Override
public java.lang.String getPerforma... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\inout\model\X_M_QualityNote.java | 1 |
请完成以下Java代码 | private ImmutableSet<Integer> retrieveLocatorIds()
{
final IQueryBL queryBL = Services.get(IQueryBL.class);
final IQueryBuilder<I_M_Transaction> queryBuilder = queryBL.createQueryBuilder(I_M_Transaction.class)
.addOnlyActiveRecordsFilter();
if (minimumPrice.signum() < 0)
{
final Set<ProductId> product... | .movementType((String)record.get(I_M_Transaction.COLUMNNAME_MovementType))
.movementDate(TimeUtil.asLocalDate(record.get(I_M_Transaction.COLUMNNAME_MovementDate)))
.build();
})
.sorted(TRANSACTIONS_COMPARATOR)
.map(transaction -> {
return GuavaCollectors.entry(transaction.getLocatorId(), ... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\inventory\draftlinescreator\LeastRecentTransactionStrategy.java | 1 |
请完成以下Java代码 | public void collectDisplayedIfChanged(final IDocumentFieldView documentField, final LogicExpressionResult valueOld, final ReasonSupplier reason)
{
// do nothing
}
@Override
public void collectLookupValuesStaled(final IDocumentFieldView documentField, final ReasonSupplier reason)
{
// do nothing
}
@Override... | @Override
public void collectStaleDetailId(final DocumentPath rootDocumentPath, final DetailId detailId)
{
// do nothing
}
@Override
public void collectAllowNew(final DocumentPath rootDocumentPath, final DetailId detailId, final LogicExpressionResult allowNew)
{
// do nothing
}
@Override
public void coll... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\NullDocumentChangesCollector.java | 1 |
请完成以下Java代码 | public final class Handlers {
private static final String PROTOCOL_HANDLER_PACKAGES = "java.protocol.handler.pkgs";
private static final String PACKAGE = Handlers.class.getPackageName();
private Handlers() {
}
/**
* Register a {@literal 'java.protocol.handler.pkgs'} property so that a
* {@link URLStreamHan... | }
/**
* Reset any cached handlers just in case a jar protocol has already been used. We
* reset the handler by trying to set a null {@link URLStreamHandlerFactory} which
* should have no effect other than clearing the handlers cache.
*/
private static void resetCachedUrlHandlers() {
try {
URL.setURLStre... | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\net\protocol\Handlers.java | 1 |
请完成以下Java代码 | public GatewayFilter apply(Config config) {
return new GatewayFilter() {
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
String name = Objects.requireNonNull(config.getName(), "name must not be null");
String replacement = Objects.requireNonNull(config.getRepla... | .toString();
}
};
}
public static class Config extends AbstractGatewayFilterFactory.NameConfig {
private @Nullable String replacement;
public @Nullable String getReplacement() {
return replacement;
}
public Config setReplacement(String replacement) {
this.replacement = replacement;
return th... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RewriteRequestParameterGatewayFilterFactory.java | 1 |
请完成以下Java代码 | static class Person {
@NotNull UUID id;
@NotNull String name;
@NotNull @Email @Pattern(regexp = "\\b[A-Za-z0-9._%+-]+@baeldung\\.com\\b") String email;
@NotNull String surname;
@NotNull Address address;
@Null String fullName;
@NotNull Date createdAt; | @Size(max = 10) List<Person> friends;
}
static class Address {
@Null String street;
@NotNull String city;
@NotNull String country;
}
} | repos\tutorials-master\json-modules\json-2\src\main\java\com\baeldung\jsonschemageneration\modules\JakartaValidationModuleSchemaGenerator.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setM_Product_ID (final int M_Product_ID)
{
if (M_Product_ID < 1)
set_Value (COLUMNNAME_M_Product_ID, null);
else
set_Value (COLUMNNAME_M_Product_ID, M_Pr... | {
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyOnHandStock);
return bd != null ? bd : BigDecimal.ZERO;
}
@Override
public void setQtyToBeShipped (final @Nullable BigDecimal QtyToBeShipped)
{
set_Value (COLUMNNAME_QtyToBeShipped, QtyToBeShipped);
}
@Override
public BigDecimal getQtyToBeShippe... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MD_Available_For_Sales.java | 1 |
请完成以下Java代码 | public Void execute(CommandContext commandContext) {
AbstractEngineConfiguration engineConfiguration = commandContext.getEngineConfigurations()
.get(engineScopeType);
if (engineConfiguration == null) {
throw new FlowableIllegalArgumentException("There is no engine configurat... | // The drop is executed in the reverse order
ListIterator<SchemaManager> listIterator = schemaManagers.listIterator(schemaManagers.size());
while (listIterator.hasPrevious()) {
SchemaManager schemaManager = listIterator.previous();
try {
schemaManager.schemaDrop()... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\db\SchemaOperationsEngineDropDbCmd.java | 1 |
请完成以下Java代码 | public String toString()
{
StringBuffer sb = new StringBuffer ("X_C_Channel[")
.append(get_ID()).append("]");
return sb.toString();
}
public I_AD_PrintColor getAD_PrintColor() throws RuntimeException
{
return (I_AD_PrintColor)MTable.get(getCtx(), I_AD_PrintColor.Table_Name)
.getPO... | return ii.intValue();
}
/** Set Description.
@param Description
Optional short description of the record
*/
public void setDescription (String Description)
{
set_Value (COLUMNNAME_Description, Description);
}
/** Get Description.
@return Optional short description of the record
*/
public String ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Channel.java | 1 |
请完成以下Java代码 | public static final class Builder
{
private final List<ITabCallout> tabCalloutsAll = new ArrayList<>();
private Builder()
{
super();
}
public ITabCallout build()
{
if (tabCalloutsAll.isEmpty())
{
return ITabCallout.NULL;
}
else if (tabCalloutsAll.size() == 1)
{
return tabCallout... | return new CompositeTabCallout(tabCalloutsAll);
}
}
public Builder addTabCallout(final ITabCallout tabCallout)
{
Check.assumeNotNull(tabCallout, "tabCallout not null");
if (tabCalloutsAll.contains(tabCallout))
{
return this;
}
tabCalloutsAll.add(tabCallout);
return this;
}
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\ui\spi\impl\CompositeTabCallout.java | 1 |
请完成以下Java代码 | protected RepositoryCacheLoaderRegionConfigurer<T, ID> newRepositoryCacheLoaderRegionConfigurer(
@NonNull CrudRepository<T, ID> repository, @Nullable Predicate<String> regionBeanName) {
return new RepositoryCacheLoaderRegionConfigurer<>(repository, regionBeanName);
}
/**
* Constructs a new instance of {@link... | */
protected RepositoryCacheWriterRegionConfigurer<T, ID> newRepositoryCacheWriterRegionConfigurer(
@NonNull CrudRepository<T, ID> repository, @Nullable Predicate<String> regionBeanName) {
return new RepositoryCacheWriterRegionConfigurer<>(repository, regionBeanName);
}
@Override
public void configure(String... | repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\cache\InlineCachingRegionConfigurer.java | 1 |
请完成以下Java代码 | public static IntegerLookupValue of(
@NonNull final RepoIdAware id,
@Nullable final ITranslatableString displayName)
{
return new IntegerLookupValue(
id.getRepoId(),
displayName,
null/* helpText */,
null/* attributes */,
null/* active */);
}
public static IntegerLookupValue of... | unknownCaption(id),
null/* description */,
null/* attributes */,
false/* not active */);
}
@Builder
private IntegerLookupValue(
final int id,
@Nullable final ITranslatableString displayName,
@Nullable final ITranslatableString description,
@Nullable @Singular final Map<String, Obje... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\LookupValue.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private void setProductInfo(final IPricingContext pricingCtx, final IPricingResult result)
{
final ProductId productId = pricingCtx.getProductId();
if (productId == null)
{
return;
}
final IProductDAO productDAO = Services.get(IProductDAO.class);
final ProductCategoryId productCategoryId = productDAO.r... | .collect(ImmutableList.toImmutableList());
return AggregatedPricingRule.of(rules);
}
@Nullable
private IPricingRule createPricingRuleNoFail(final PricingRuleDescriptor ruleDef)
{
try
{
return ruleDef.getPricingRuleClass().getReferencedClass().newInstance();
}
catch (final Exception ex)
{
logger.... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\service\impl\PricingBL.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public String getIDENTIFICATIONDATE3() {
return identificationdate3;
}
/**
* Sets the value of the identificationdate3 property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setIDENTIFICATIONDATE3(String value) {
th... | * @param value
* allowed object is
* {@link String }
*
*/
public void setQUANTITY(String value) {
this.quantity = value;
}
/**
* Gets the value of the quantitymeasureunit property.
*
* @return
* possible object is
* {@link String }
... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_stepcom_desadv\de\metas\edi\esb\jaxb\stepcom\desadv\DMARK1.java | 2 |
请完成以下Java代码 | public XML addXMLAttribute (String attribute, String attribute_value)
{
addAttribute (attribute, attribute_value);
return (this);
}
/**
* Add an element to the valuie of <>VALUE</>
*
* @param element
* the value of <>VALUE</>
*/
public XML addElement (String elemen... | /**
* Removes an Element from the element.
*
* @param hashcode
* the name of the element to be removed.
*/
public XML removeElement (String hashcode)
{
removeElementFromRegistry (hashcode);
return (this);
}
public boolean getNeedLineBreak ()
{
boolean linebreak = true;
java.util.Enu... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xml\XML.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public CacheManagerCustomizer<CaffeineCacheManager> activitiSpringCaffeineCacheManagerCustomizer(
ActivitiSpringCacheManagerProperties properties,
ObjectProvider<ActivitiSpringCaffeineCacheConfigurer> cacheConfigurers
) {
return cacheManager -> {
var caffeineCacheProperties = pro... | .ifPresent(caffeine -> {
if (caffeineCacheProperties.isUseSystemScheduler()) {
caffeine.scheduler(Scheduler.systemScheduler());
}
var cache = cacheConfigurers
.orderedStre... | repos\Activiti-develop\activiti-core-common\activiti-spring-cache-manager\src\main\java\org\activiti\spring\cache\config\ActivitiSpringCacheManagerAutoConfiguration.java | 2 |
请完成以下Java代码 | private boolean isCheckCreditLimitNeeded(@NonNull final I_C_Order order)
{
if (!order.isSOTrx())
{
return false;
}
final BPartnerStats stats = bpartnerStatsDAO.getCreateBPartnerStats(order.getBill_BPartner_ID());
if (X_C_BPartner_Stats.SOCREDITSTATUS_NoCreditCheck.equals(stats.getSOCreditStatus()))
{
... | && !sysConfigBL.getBooleanValue("CHECK_CREDIT_ON_CASH_POS_ORDER", true, order.getAD_Client_ID(), order.getAD_Org_ID()))
{
// ignore -- don't validate for Cash POS Orders depending on sysconfig parameter
return false;
}
else if (X_C_DocType.DOCSUBTYPE_PrepayOrder.equals(dt.getDocSubType())
&& !sysConfigB... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\modelvalidator\C_Order.java | 1 |
请完成以下Java代码 | public RetryTopicConfigurationBuilder listenerFactory(@Nullable String factoryBeanName) {
this.listenerContainerFactoryName = factoryBeanName;
return this;
}
/**
* Create the {@link RetryTopicConfiguration} with the provided template.
* @param sendToTopicKafkaTemplate the template.
* @return the configurat... | return ExceptionMatcher.forAllowList().add(Throwable.class).build();
}
ExceptionMatcher.Builder builder = (this.exceptionEntriesConfigurer.matchIfFound)
? ExceptionMatcher.forAllowList() : ExceptionMatcher.forDenyList();
builder.addAll(this.exceptionEntriesConfigurer.entries);
if (this.traversingCauses != n... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\retrytopic\RetryTopicConfigurationBuilder.java | 1 |
请完成以下Java代码 | protected void handleException(Throwable exc, DelegateExecution execution) {
ErrorPropagation.handleException(exc, (ExecutionEntity) execution, mapExceptions);
}
protected void setExecutionVariableValue(Object value, DelegateExecution execution) {
if (resultVariable != null) {
if (s... | }
protected class FutureCompleteAction implements BiConsumer<Object, Throwable> {
protected final DelegateExecution execution;
public FutureCompleteAction(DelegateExecution execution) {
this.execution = execution;
}
@Override
public void accept(Object value, T... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\behavior\ServiceTaskExpressionActivityBehavior.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_AD_Issue getAD_Issue()
{
return get_ValueAsPO(COLUMNNAME_AD_Issue_ID, org.compiere.model.I_AD_Issue.class);
}
@Override
public void setAD_Issue(org.compiere.model.I_AD_Issue AD_Issue)
{
set_ValueFromPO(COLUMNNAME_AD_Issue_ID, org.compiere.model.I_AD_Issue.class, AD_Issue);
}
@Ov... | }
@Override
public java.lang.String getJsonRequest()
{
return (java.lang.String)get_Value(COLUMNNAME_JsonRequest);
}
@Override
public void setJsonResponse (java.lang.String JsonResponse)
{
set_Value (COLUMNNAME_JsonResponse, JsonResponse);
}
@Override
public java.lang.String getJsonResponse()
{
re... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Cost_Collector_ImportAudit.java | 1 |
请完成以下Java代码 | public ProductsProposalRowsData load()
{
final List<ProductsProposalRow> rows = bpartnerProductStatsService.getByProductIds(productIds, currencyId)
.stream()
// .filter(stats -> excludeBPartnerId == null || !BPartnerId.equals(stats.getBpartnerId(), excludeBPartnerId))
.map(this::toProductsProposalRo... | }
return ProductsProposalRow.builder()
.id(nextRowIdSequence.nextDocumentId())
.bpartner(bpartnerLookup.findById(stats.getBpartnerId()))
.product(productLookup.findById(stats.getProductId()))
.price(ProductProposalPrice.builder()
.priceListPrice(moneyService.toAmount(lastSalesInvoice.getP... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\products_proposal\view\OtherSalePricesProductsProposalViewFactory.java | 1 |
请完成以下Java代码 | public void setParentElement_ID (final int ParentElement_ID)
{
if (ParentElement_ID < 1)
set_Value (COLUMNNAME_ParentElement_ID, null);
else
set_Value (COLUMNNAME_ParentElement_ID, ParentElement_ID);
}
@Override
public int getParentElement_ID()
{
return get_ValueAsInt(COLUMNNAME_ParentElement_ID);
... | {
return get_ValueAsString(COLUMNNAME_Qty);
}
@Override
public void setSeqNo (final int SeqNo)
{
set_Value (COLUMNNAME_SeqNo, SeqNo);
}
@Override
public int getSeqNo()
{
return get_ValueAsInt(COLUMNNAME_SeqNo);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Product_Ingredients.java | 1 |
请完成以下Java代码 | public ExternalTaskQueryTopicBuilder processDefinitionKeyIn(String... processDefinitionKeys) {
currentInstruction.setProcessDefinitionKeys(processDefinitionKeys);
return this;
}
public ExternalTaskQueryTopicBuilder processDefinitionVersionTag(String processDefinitionVersionTag) {
currentInstruction.set... | if (currentInstruction != null) {
this.instructions.put(currentInstruction.getTopicName(), currentInstruction);
}
}
public ExternalTaskQueryTopicBuilder enableCustomObjectDeserialization() {
currentInstruction.setDeserializeVariables(true);
return this;
}
public ExternalTaskQueryTopicBuilder... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\externaltask\ExternalTaskQueryTopicBuilderImpl.java | 1 |
请完成以下Java代码 | public CalloutStatisticsEntry getCreateChild(final ICalloutField field, final ICalloutInstance callout)
{
final ArrayKey key = Util.mkKey(field.getColumnName(), callout);
return children.computeIfAbsent(key, (theKey) -> new CalloutStatisticsEntry(indexSupplier, field, callout));
}
public CalloutStatisticsE... | }
public CalloutStatisticsEntry childSkipped(final ICalloutField field, final ICalloutInstance callout, final String reasonSummary)
{
final String reasonDetails = null;
return childSkipped(field, callout, reasonSummary, reasonDetails);
}
public CalloutStatisticsEntry childSkipped(final ICalloutField fie... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\callout\api\impl\CalloutExecutor.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void handlePutBPartnersRequest(final PutBPartnersRequest request)
{
logger.debug("Importing bpartners: {}", request);
int countImported = 0;
int countError = 0;
for (final SyncBPartner syncBpartner : request.getBpartners())
{
try
{
bpartnersImportService.importBPartner(syncBpartner);
cou... | }
}
}
public void handlePutRfQsRequest(@NonNull final PutRfQsRequest request)
{
logger.debug("Importing: {}", request);
if (request.isEmpty())
{
return;
}
for (final SyncRfQ syncRfq : request.getSyncRfqs())
{
try
{
rfqImportService.importRfQ(syncRfq);
}
catch (final Exception e)
... | repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\sync\ReceiverFromMetasfreshHandler.java | 2 |
请完成以下Java代码 | public ClientRegistration deserialize(JsonParser parser, DeserializationContext context) throws IOException {
ObjectMapper mapper = (ObjectMapper) parser.getCodec();
JsonNode clientRegistrationNode = mapper.readTree(parser);
JsonNode providerDetailsNode = JsonNodeUtils.findObjectNode(clientRegistrationNode, "prov... | .clientName(JsonNodeUtils.findStringValue(clientRegistrationNode, "clientName"))
.authorizationUri(JsonNodeUtils.findStringValue(providerDetailsNode, "authorizationUri"))
.tokenUri(JsonNodeUtils.findStringValue(providerDetailsNode, "tokenUri"))
.userInfoUri(JsonNodeUtils.findStringValue(userInfoEndpointNode, "... | repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\jackson2\ClientRegistrationDeserializer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getAdditionalExclude() {
return this.additionalExclude;
}
public void setAdditionalExclude(@Nullable String additionalExclude) {
this.additionalExclude = additionalExclude;
}
public Duration getPollInterval() {
return this.pollInterval;
}
public void setPollInterval(Durat... | }
public void setLogConditionEvaluationDelta(boolean logConditionEvaluationDelta) {
this.logConditionEvaluationDelta = logConditionEvaluationDelta;
}
}
/**
* LiveReload properties.
*/
public static class Livereload {
/**
* Whether to enable a livereload.com-compatible server.
*/
private bool... | repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\autoconfigure\DevToolsProperties.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public Pharmacy timestamp(OffsetDateTime timestamp) {
this.timestamp = timestamp;
return this;
}
/**
* Der Zeitstempel der letzten Änderung
* @return timestamp
**/
@Schema(description = "Der Zeitstempel der letzten Änderung")
public OffsetDateTime getTimestamp() {
return timestamp;
}
... | StringBuilder sb = new StringBuilder();
sb.append("class Pharmacy {\n");
sb.append(" _id: ").append(toIndentedString(_id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" address: ").append(toIndentedString(address)).append("\n");
sb.append("... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-patient-api\src\main\java\io\swagger\client\model\Pharmacy.java | 2 |
请完成以下Java代码 | private final String getLinePrefix()
{
if (_linePrefix == null)
{
final int indent = getIndent();
final String token = getIndentToken();
final StringBuilder prefix = new StringBuilder();
for (int i = 1; i <= indent; i++)
{
prefix.append(token);
}
_linePrefix = prefix.toString();
}
retu... | return sb.toString();
}
public IndentedStringBuilder appendLine(final Object obj)
{
final String linePrefix = getLinePrefix();
sb.append(linePrefix).append(obj).append(getNewlineToken());
return this;
}
public IndentedStringBuilder append(final Object obj)
{
sb.append(obj);
return this;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\text\IndentedStringBuilder.java | 1 |
请完成以下Java代码 | public <T> IQuery<T> create(final IQueryBuilder<T> builder)
{
//
// Handle in memory queries
final POJOLookupMap memDatabase;
if (Check.isEmpty(builder.getModelTableName(), true))
{
memDatabase = POJOLookupMap.getInMemoryDatabaseForTableName(builder.getModelTableName());
}
else
{
final Class<T> m... | .setPostQueryFilter(nonSqlFilters)
.setOrderBy(queryOrderBy)
.setLimit(queryLimit)
.setOnlySelection(queryOnlySelectionId)
.setOptions(queryOptions);
}
@Override
public <T> String getSql(
@NonNull final Properties ctx,
@NonNull final ICompositeQueryFilter<T> filter,
final List<Object> sqlPa... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\QueryBuilderDAO.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Map<String, PemSslBundleProperties> getPem() {
return this.pem;
}
public Map<String, JksSslBundleProperties> getJks() {
return this.jks;
}
public Watch getWatch() {
return this.watch;
}
public static class Watch {
/**
* File watching.
*/
private final File file = new File()... | * Quiet period, after which changes are detected.
*/
private Duration quietPeriod = Duration.ofSeconds(10);
public Duration getQuietPeriod() {
return this.quietPeriod;
}
public void setQuietPeriod(Duration quietPeriod) {
this.quietPeriod = quietPeriod;
}
}
}
}
} | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\ssl\SslProperties.java | 2 |
请完成以下Java代码 | private String setVoidedOrderNewDocumenTNo(
@NonNull final String voidedOrderDocumentNoPrefix,
@NonNull final I_C_Order orderRecord,
int attemptCount)
{
final String prefixToUse;
if (attemptCount <= 1)
{
prefixToUse = String.format("%s-", voidedOrderDocumentNoPrefix);
}
else
{
prefixToUse = ... | // I don't want to make assumptions on the exact unique constraint
// Also, I hope that a voided order's copy is voided again is rare enough.
try
{
orderRecord.setDocumentNo(prefixToUse + documentNo);
saveRecord(orderRecord);
}
catch (final DBUniqueConstraintException e)
{
orderRecord.setDocumentNo... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\voidorderandrelateddocs\VoidOrderHandler.java | 1 |
请完成以下Java代码 | public class BankStatementReconciliationView extends AbstractCustomView<BankStatementLineRow> implements IViewRowOverrides
{
public static BankStatementReconciliationView cast(final IView view)
{
return (BankStatementReconciliationView)view;
}
@Getter
private final PaymentsToReconcileView paymentsToReconcileVie... | @Override
public String getTableNameOrNull(final DocumentId documentId)
{
return null;
}
@Override
public ViewId getIncludedViewId(final IViewRow row_NOTUSED)
{
return paymentsToReconcileView.getViewId();
}
@Override
protected BankStatementLineRows getRowsData()
{
return BankStatementLineRows.cast(sup... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\bankstatement_reconciliation\BankStatementReconciliationView.java | 1 |
请完成以下Java代码 | public String getExpressionLanguage() {
return expressionLanguage;
}
public void setExpressionLanguage(String expressionLanguage) {
this.expressionLanguage = expressionLanguage;
}
public String getExpression() {
return expression;
}
public void setExpression(String expression) {
this.expr... | public void cacheCompiledScript(CompiledScript compiledScript) {
this.cachedCompiledScript = compiledScript;
}
public CompiledScript getCachedCompiledScript() {
return this.cachedCompiledScript;
}
public ElExpression getCachedExpression() {
return this.cachedExpression;
}
public void setCache... | repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnExpressionImpl.java | 1 |
请完成以下Java代码 | public boolean getParameterAsBoolean()
{
return StringUtils.toBoolean(m_Parameter);
}
@Nullable
public Boolean getParameterAsBooleanOrNull()
{
return StringUtils.toBoolean(m_Parameter, null);
}
@Nullable
public Boolean getParameterAsBoolean(@Nullable Boolean defaultValue)
{
return StringUtils.toBoolean... | public ZonedDateTime getParameter_ToAsZonedDateTime()
{
return TimeUtil.asZonedDateTime(m_Parameter_To);
}
@Nullable
public BigDecimal getParameterAsBigDecimal()
{
return toBigDecimal(m_Parameter);
}
@Nullable
public BigDecimal getParameter_ToAsBigDecimal()
{
return toBigDecimal(m_Parameter_To);
}
@... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessInfoParameter.java | 1 |
请完成以下Java代码 | public List<String> shortcutFieldOrder() {
return Arrays.asList(NAME_KEY, REGEXP_KEY, REPLACEMENT_KEY);
}
@Override
public GatewayFilter apply(Config config) {
return new GatewayFilter() {
@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
return chain.filter(ex... | rewrittenHeaders.add(rewriten);
}
return rewrittenHeaders;
}
String rewrite(String value, String regexp, String replacement) {
return value.replaceAll(regexp, replacement.replace("$\\", "$"));
}
public static class Config extends AbstractGatewayFilterFactory.NameConfig {
private @Nullable String regexp;
... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RewriteResponseHeaderGatewayFilterFactory.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public DirectDebitType getDirectDebit() {
return directDebit;
}
/**
* Sets the value of the directDebit property.
*
* @param value
* allowed object is
* {@link DirectDebitType }
*
*/
public void setDirectDebit(DirectDebitType value) {
this.di... | * possible object is
* {@link SEPADirectDebitType }
*
*/
public SEPADirectDebitType getSEPADirectDebit() {
return sepaDirectDebit;
}
/**
* Sets the value of the sepaDirectDebit property.
*
* @param value
* allowed object is
* {@link SEPA... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\PaymentMethodType.java | 2 |
请完成以下Java代码 | public class TeamsMessageCard {
@JsonProperty("@type")
private final String type = "MessageCard";
@JsonProperty("@context")
private final String context = "http://schema.org/extensions";
private String themeColor;
private String summary;
private String text;
private List<Section> section... | private List<Target> targets;
@Data
public static class Input {
@JsonProperty("@type")
private String type; // TextInput, DateInput, MultichoiceInput
private String id;
private boolean isMultiple;
private String title;
private bool... | repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\notification\channels\TeamsMessageCard.java | 1 |
请完成以下Java代码 | default void toResource(WritableResource out) throws IOException {
Assert.notNull(out, "'out' must not be null");
try (OutputStream outputStream = out.getOutputStream()) {
toOutputStream(outputStream);
}
}
/**
* Write the JSON to the provided {@link WritableResource} using the given
* {@link Charset}.
... | }
/**
* Factory method used to create a {@link WritableJson} with a sensible
* {@link Object#toString()} that delegate to {@link WritableJson#toJsonString()}.
* @param writableJson the source {@link WritableJson}
* @return a new {@link WritableJson} with a sensible {@link Object#toString()}.
*/
static Writ... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\json\WritableJson.java | 1 |
请完成以下Java代码 | public AvailableForSalesConfig getConfig(@NonNull final ConfigQuery query)
{
cache.getOrLoad(query, () -> retrieveConfigRecord(query));
return retrieveConfigRecord(query);
}
@NonNull
private AvailableForSalesConfig retrieveConfigRecord(@NonNull final ConfigQuery query)
{
final I_MD_AvailableForSales_Config... | .insufficientQtyAvailableForSalesColorId(null)
.salesOrderLookBehindHours(0)
.shipmentDateLookAheadHours(0)
.build();
}
return AvailableForSalesConfig
.builder()
.featureEnabled(configRecord.isFeatureActivated())
.insufficientQtyAvailableForSalesColorId(ColorId.ofRepoId(configRecord.getI... | repos\metasfresh-new_dawn_uat\backend\de.metas.material\cockpit\src\main\java\de\metas\material\cockpit\availableforsales\AvailableForSalesConfigRepo.java | 1 |
请完成以下Java代码 | public void paint (Graphics2D g2D, int pageNo, Point2D pageStart,
Properties ctx, boolean isView)
{
if (!m_valid || m_barcode == null)
return;
// Position
Point2D.Double location = getAbsoluteLocation(pageStart);
int x = (int)location.x;
if (MPrintFormatItem.FIELDALIGNMENTTYPE_TrailingRight.equals(p_... | } catch (OutputException e) {
}
} // paint
/**
* String Representation
* @return info
*/
public String toString ()
{
if (m_barcode == null)
return super.toString();
return super.toString() + " " + m_barcode.getData();
} // toString
} // BarcodeElement | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\print\layout\BarcodeElement.java | 1 |
请完成以下Java代码 | private static final class DocumentPostRequestHandlerAsEventListener implements IEventListener
{
@NonNull private final DocumentPostRequestHandler handler;
@NonNull private final EventConverter eventConverter;
@NonNull private final EventLogUserService eventLogUserService;
@Override
public void onEvent(@Non... | }
private void handleRequest(@NonNull final DocumentPostRequest request)
{
handler.handleRequest(request);
}
private IAutoCloseable switchCtx(@NonNull final DocumentPostRequest request)
{
final Properties ctx = createCtx(request);
return Env.switchContext(ctx);
}
private Properties createCtx(@... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\posting\DocumentPostingBusService.java | 1 |
请完成以下Java代码 | public InfoWindowMenuBuilder setParentWindowNo(final int windowNo)
{
return setParentWindowNo(Suppliers.ofInstance(windowNo));
}
public InfoWindowMenuBuilder setParentWindowNo(final Supplier<Integer> windowNoSupplier)
{
Check.assumeNotNull(windowNoSupplier, "windowNoSupplier not null");
_parentWindowNoSuppli... | // Fallback to main window (shall not happen)
return Env.getWindow(Env.WINDOW_MAIN);
}
/** Sets the menu where we shall add the info windows menu items */
public InfoWindowMenuBuilder setMenu(final JMenu menu)
{
assertNotBuilt();
Check.assumeNotNull(menu, "menu not null");
_menu = menu;
return this;
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\search\InfoWindowMenuBuilder.java | 1 |
请完成以下Java代码 | public static TaxCategoryId ofRepoIdOrNull(@Nullable final Integer repoId)
{
return repoId != null && repoId > 0 ? ofRepoId(repoId) : null;
}
public static Optional<TaxCategoryId> optionalOfRepoId(final int repoId)
{
return Optional.ofNullable(ofRepoIdOrNull(repoId));
}
public static int toRepoId(final TaxC... | return Objects.equals(o1, o2);
}
int repoId;
private TaxCategoryId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "C_TaxCategory_ID");
}
@Override
@JsonValue
public int getRepoId()
{
return repoId;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\tax\api\TaxCategoryId.java | 1 |
请完成以下Java代码 | private final void processTableSelectedRows(final SelectableRowProcessor processor)
{
final AnnotatedTableModel<?> tableModel = getTableModelOrNull();
if (tableModel == null)
{
return;
}
final TableColumnInfo selectionColumnInfo = tableModel.getMetaInfo().getSelectionTableColumnInfoOrNull();
if (selecti... | public boolean isContinue()
{
return true;
}
}
protected static final class SelectableRowAdapter
{
private final AnnotatedTableModel<?> tableModel;
private final int rowModelIndex;
private final int selectedColumnIndex;
public SelectableRowAdapter(final AnnotatedTableModel<?> tableModel, final int r... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\swing\table\AbstractManageSelectableRowsAction.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class DunningExportClientFactoryImpl implements DunningExportClientFactory
{
private final ExportConfigRepository configRepository;
private final CrossVersionServiceRegistry crossVersionServiceRegistry;
public DunningExportClientFactoryImpl(
@NonNull final ExportConfigRepository configRepository,
@NonN... | {
Loggables.addLog("forum_datenaustausch_ch - The dunning with id={} has no attachment with an {}={}-tag",
dunning.getId(), requiredAttachmentTagName, requiredAttachmentTagValue);
return Optional.empty();
}
final BPartnerId recipientId = dunning.getRecipientId();
final BPartnerQuery query = BPartnerQu... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\base\export\dunning\DunningExportClientFactoryImpl.java | 2 |
请完成以下Java代码 | public Event findLatestDebugRuleNodeInEvent(UUID tenantId, UUID entityId) {
return DaoUtil.getData(ruleNodeDebugEventRepository.findLatestDebugRuleNodeInEvent(tenantId, entityId));
}
@Override
public void cleanupEvents(long regularEventExpTs, long debugEventExpTs, boolean cleanupDb) {
if (r... | private void parseUUID(String src, String paramName) {
if (!StringUtils.isEmpty(src)) {
try {
UUID.fromString(src);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Failed to convert " + paramName + " to UUID!");
}
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\event\JpaBaseEventDao.java | 1 |
请完成以下Java代码 | public static ContactPerson deliveryContactFromPO(final I_GO_DeliveryOrder orderPO)
{
final String phoneNo = orderPO.getGO_DeliverToPhoneNo();
if (Check.isEmpty(phoneNo, true))
{
return null;
}
return ContactPerson.builder()
.phone(PhoneNumber.fromString(phoneNo))
.build();
}
public static voi... | {
orderPO.setGO_NumberOfPackages(deliveryPosition.getNumberOfPackages());
final int go_grossWeightKg = deliveryPosition.getGrossWeightKg()
.setScale(0, RoundingMode.UP)
.intValue();
orderPO.setGO_GrossWeightKg(go_grossWeightKg);
orderPO.setGO_PackageContentDescription(deliveryPosition.getContent());
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java\de\metas\shipper\gateway\go\GODeliveryOrderConverters.java | 1 |
请完成以下Java代码 | public BigDecimal getSeqNb() {
return seqNb;
}
/**
* Sets the value of the seqNb property.
*
* @param value
* allowed object is
* {@link BigDecimal }
*
*/
public void setSeqNb(BigDecimal value) {
this.seqNb = value;
}
/**
* Gets... | * For example, to add a new item, do as follows:
* <pre>
* getRcrd().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link TaxRecord1 }
*
*
*/
public List<TaxRecord1> getRcrd() {
if (rcrd == null) {
... | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\TaxInformation3.java | 1 |
请完成以下Java代码 | private void fetchVariableValues(List<HistoricVariableUpdate> historicVariableUpdates,
CommandContext commandContext) {
if (!CollectionUtil.isEmpty(historicVariableUpdates)) {
List<String> byteArrayIds = getByteArrayIds(historicVariableUpdates);
if (!byteArrayIds.isEm... | if (byteArrayId != null) {
byteArrayIds.add(byteArrayId);
}
}
}
}
return byteArrayIds;
}
protected void resolveTypedValues(List<HistoricVariableUpdate> variableUpdates) {
for (HistoricVariableUpdate variableUpdate : variableUpdates) {
if (isHistoricDetailVari... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\optimize\OptimizeHistoricVariableUpdateQueryCmd.java | 1 |
请完成以下Java代码 | static ConfigurationPropertyCaching get(Environment environment) {
return get(environment, null);
}
/**
* Get for a specific configuration property source in the environment.
* @param environment the spring environment
* @param underlyingSource the
* {@link ConfigurationPropertySource#getUnderlyingSource()... | if (caching != null) {
return caching;
}
}
}
throw new IllegalStateException("Unable to find cache from configuration property sources");
}
/**
* {@link AutoCloseable} used to control a
* {@link ConfigurationPropertyCaching#override() cache override}.
*
* @since 3.5.0
*/
interface CacheOve... | repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\source\ConfigurationPropertyCaching.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public void start(PlatformServiceContainer mBeanServiceContainer) {
// nothing to do
}
public void stop(PlatformServiceContainer mBeanServiceContainer) {
// clear the queue
threadPoolQueue.clear();
// Ask the thread pool to finish and exit
threadPoolExecutor.shutdown();
// Waits for 1 mi... | public void setKeepAliveTime(long time, TimeUnit unit) {
threadPoolExecutor.setKeepAliveTime(time, unit);
}
public void purgeThreadPool() {
threadPoolExecutor.purge();
}
public int getPoolSize() {
return threadPoolExecutor.getPoolSize();
}
public int getActiveCount() {
return threadPoolEx... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\jmx\services\JmxManagedThreadPool.java | 2 |
请完成以下Java代码 | public class AppServerXML {
public static void main(String[] args) throws Exception {
AppServerXML app = new AppServerXML();
Catalina catalina = app.startServer();
catalina.getServer().await();
}
public Catalina startServer() throws Exception {
URL staticUrl = getClass(... | Files.writeString(configFile, config);
System.setProperty("catalina.base", baseDir.toString());
System.setProperty("catalina.home", baseDir.toString());
Catalina catalina = new Catalina();
catalina.load(new String[]{"-config", configFile.toString()});
catalina.start();
... | repos\tutorials-master\server-modules\apache-tomcat-2\src\main\java\com\baeldung\tomcat\AppServerXML.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Exam {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
@Lob
private String description;
@Column(columnDefinition = "text")
private String text;
@Column(length = 20)
private String shortText;
public Exam() {
}
public Exam(String descri... | public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((description == null) ? 0 : description.hashCode());
result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result + ((shortText == null) ? 0 : shortText.hashCode());
... | repos\tutorials-master\persistence-modules\java-jpa-2\src\main\java\com\baeldung\jpa\text\Exam.java | 2 |
请完成以下Java代码 | public Object getValue(VariableContainer variableContainer) {
ELContext elContext = expressionManager.getElContext(variableContainer);
Object originalVariableContainer = elContext.getContext(VariableContainer.class);
elContext.putContext(VariableContainer.class, variableContainer);
Objec... | Object originalValueContext = elContext.getContext(EvaluationState.class);
elContext.putContext(EvaluationState.class, EvaluationState.WRITE);
try {
resolveSetValueExpression(value, elContext);
} catch (Exception e) {
throw new FlowableException("Error while evaluating e... | repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\el\JuelExpression.java | 1 |
请完成以下Java代码 | public void fireBeforeComplete(final I_C_RfQResponse rfqResponse)
{
listeners.onBeforeComplete(rfqResponse);
}
@Override
public void fireAfterComplete(final I_C_RfQResponse rfqResponse)
{
listeners.onAfterComplete(rfqResponse);
}
@Override
public void fireBeforeClose(final I_C_RfQResponse rfqResponse)
{
... | }
@Override
public void fireBeforeUnClose(I_C_RfQResponse rfqResponse)
{
// TODO Auto-generated method stub
}
@Override
public void fireAfterUnClose(I_C_RfQResponse rfqResponse)
{
// TODO Auto-generated method stub
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java\de\metas\rfq\event\impl\RfQEventDispacher.java | 1 |
请完成以下Java代码 | default ImportProcessResult validate(@NonNull final ValidateImportRecordsRequest request)
{
clientId(request.getClientId());
setParameters(request.getAdditionalParameters());
selectedRecords(request.getSelectionId());
validateOnly(true);
return run();
}
default ImportProcessResult validateAndImport(@NonNu... | }
IImportProcess<ImportRecordType> notifyUserId(@Nullable UserId notifyUserId);
/**
* Run the import.
*/
ImportProcessResult run();
/**
* Delete import records
*
* @return how many rows were deleted
*/
int deleteImportRecords(ImportDataDeleteRequest request);
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\processing\IImportProcess.java | 1 |
请完成以下Java代码 | public String toString()
{
// NOTE: we are making it translatable friendly because it's displayed in Prefereces->Info->Rollen
final String constraintsName = getClass().getSimpleName();
final Collection<Constraint> constraintsList = constraints.values();
final StringBuilder sb = new StringBuilder();
sb.appe... | private ImmutableMap<Class<? extends Constraint>, Constraint> getConstraints()
{
return ImmutableMap.copyOf(constraints);
}
public Builder addConstraint(final Constraint constraint)
{
Check.assumeNotNull(constraint, "constraint not null");
constraints.put(constraint.getClass(), constraint);
return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\permissions\Constraints.java | 1 |
请完成以下Java代码 | public class Payment implements ModelValidator
{
private int ad_Client_ID = -1;
@Override
public int getAD_Client_ID()
{
return ad_Client_ID;
}
@Override
public String login(final int AD_Org_ID, final int AD_Role_ID, final int AD_User_ID)
{
// nothing to do
return null;
}
@Override
public final void... | final OrgInfo orgInfo = Services.get(IOrgDAO.class).getOrgInfoById(orgId);
final StoreCreditCardNumberMode ccStoreMode = orgInfo.getStoreCreditCardNumberMode();
if (StoreCreditCardNumberMode.DONT_STORE.equals(ccStoreMode))
{
payment.set_ValueOfColumn(I_C_Payment.COLUMNNAME_CreditCardNumber, payment.ge... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\modelvalidator\Payment.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class NaturalRepositoryImpl<T, ID extends Serializable>
extends SimpleJpaRepository<T, ID> implements NaturalRepository<T, ID> {
private final EntityManager entityManager;
public NaturalRepositoryImpl(JpaEntityInformation entityInformation,
EntityManager entityManager) {
sup... | return entity;
}
@Override
public Optional<T> findByNaturalId(Map<String, Object> naturalIds) {
NaturalIdLoadAccess<T> loadAccess
= entityManager.unwrap(Session.class).byNaturalId(this.getDomainClass());
naturalIds.forEach(loadAccess::using);
return loadAccess.load... | repos\Hibernate-SpringBoot-master\HibernateSpringBootNaturalIdCache\src\main\java\com\bookstore\naturalid\NaturalRepositoryImpl.java | 2 |
请完成以下Java代码 | public class HistoricIdentityLinkEntityManagerImpl
extends AbstractEntityManager<HistoricIdentityLinkEntity>
implements HistoricIdentityLinkEntityManager {
protected HistoricIdentityLinkDataManager historicIdentityLinkDataManager;
public HistoricIdentityLinkEntityManagerImpl(
ProcessEngineConf... | for (HistoricIdentityLinkEntity identityLink : identityLinks) {
delete(identityLink);
}
}
@Override
public void deleteHistoricIdentityLinksByProcInstance(final String processInstanceId) {
List<HistoricIdentityLinkEntity> identityLinks =
historicIdentityLinkDataManage... | repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricIdentityLinkEntityManagerImpl.java | 1 |
请完成以下Java代码 | public @Nullable Duration getPeriod() {
return period;
}
public RateLimitConfig setPeriod(Duration period) {
this.period = period;
return this;
}
public @Nullable Function<ServerRequest, String> getKeyResolver() {
return keyResolver;
}
public RateLimitConfig setKeyResolver(Function<ServerRequ... | public int getTokens() {
return tokens;
}
public RateLimitConfig setTokens(int tokens) {
Assert.isTrue(tokens > 0, "tokens must be greater than zero");
this.tokens = tokens;
return this;
}
public String getHeaderName() {
return headerName;
}
public RateLimitConfig setHeaderName(String head... | repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\filter\Bucket4jFilterFunctions.java | 1 |
请完成以下Java代码 | public String getPrivilegeId() {
return privilegeId;
}
@Override
public void setPrivilegeId(String privilegeId) {
this.privilegeId = privilegeId;
}
@Override
public String getUserId() {
return userId;
}
@Override | public void setUserId(String userId) {
this.userId = userId;
}
@Override
public String getGroupId() {
return groupId;
}
@Override
public void setGroupId(String groupId) {
this.groupId = groupId;
}
} | repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\persistence\entity\PrivilegeMappingEntityImpl.java | 1 |
请完成以下Java代码 | public org.compiere.model.I_AD_Window getOverrides_Window()
{
return get_ValueAsPO(COLUMNNAME_Overrides_Window_ID, org.compiere.model.I_AD_Window.class);
}
@Override
public void setOverrides_Window(final org.compiere.model.I_AD_Window Overrides_Window)
{
set_ValueFromPO(COLUMNNAME_Overrides_Window_ID, org.com... | return get_ValueAsString(COLUMNNAME_WindowType);
}
@Override
public void setWinHeight (final int WinHeight)
{
set_Value (COLUMNNAME_WinHeight, WinHeight);
}
@Override
public int getWinHeight()
{
return get_ValueAsInt(COLUMNNAME_WinHeight);
}
@Override
public void setWinWidth (final int WinWidth)
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Window.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public PageBean listPage(PageParam pageParam, PmsRole pmsRole) {
Map<String, Object> paramMap = new HashMap<String, Object>(); // 业务条件查询参数
paramMap.put("roleName", pmsRole.getRoleName()); // 角色名称(模糊查询)
return pmsRoleDao.listPage(pageParam, paramMap);
}
/**
* 获取所有角色列表,以供添加操作员时选择.
*
* @return roleList .
... | * @return
*/
public PmsRole getByRoleNameOrRoleCode(String roleName, String roleCode) {
return pmsRoleDao.getByRoleNameOrRoleCode(roleName, roleCode);
}
/**
* 删除
*
* @param roleId
*/
public void delete(Long roleId) {
pmsRoleDao.delete(roleId);
}
} | repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\permission\service\impl\PmsRoleServiceImpl.java | 2 |
请完成以下Java代码 | protected final Boolean isDLMTable(final IProcessPreconditionsContext context)
{
if (Check.equals(context.getTableName(), I_DLM_Partition_Config_Line.Table_Name))
{
final I_DLM_Partition_Config_Line configLine = context.getSelectedModel(I_DLM_Partition_Config_Line.class);
final I_AD_Table table = InterfaceWr... | public final Object getParameterDefaultValue(final IProcessDefaultParameter parameter)
{
final int configLineId = parameter.getContextAsInt(I_DLM_Partition_Config_Line.COLUMNNAME_DLM_Partition_Config_Line_ID);
if (configLineId > 0)
{
final I_DLM_Partition_Config_Line configLine = InterfaceWrapperHelper.create... | repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\process\AbstractManageDLMTableProcess.java | 1 |
请在Spring Boot框架中完成以下Java代码 | private String getVersionAttr(@Nullable final String sourceVersionAttr)
{
if (sourceVersionAttr == null)
{
return null;
}
if ("*".equals(sourceVersionAttr))
{
return null;
}
return sourceVersionAttr;
}
@Nullable
private ReplicationTypeEnum getReplicationTypeAttr(@Nullable final de.metas.edi.... | .map(attr -> ReplicationTypeEnum.fromValue(attr.value()))
.orElse(null);
}
@Nullable
private ReplicationModeEnum getReplicationModeAttr(@Nullable final de.metas.edi.esb.jaxb.metasfreshinhousev2.ReplicationModeEnum replicationModeAttr)
{
return Optional.ofNullable(replicationModeAttr)
.map(attr -> Replica... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java\de\metas\edi\esb\desadvexport\metasfreshinhousev1\MetasfreshInHouseV1XMLDesadvBean.java | 2 |
请完成以下Java代码 | public int getWorkflow_ID()
{
return get_ValueAsInt(COLUMNNAME_Workflow_ID);
}
@Override
public void setWorkingTime (final int WorkingTime)
{
set_Value (COLUMNNAME_WorkingTime, WorkingTime);
}
@Override
public int getWorkingTime()
{
return get_ValueAsInt(COLUMNNAME_WorkingTime);
}
@Override
publi... | public void setYield (final int Yield)
{
set_Value (COLUMNNAME_Yield, Yield);
}
@Override
public int getYield()
{
return get_ValueAsInt(COLUMNNAME_Yield);
}
@Override
public void setYPosition (final int YPosition)
{
set_Value (COLUMNNAME_YPosition, YPosition);
}
@Override
public int getYPosition()... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_Node.java | 1 |
请完成以下Java代码 | public final static String xmlEncodeTextAsPCDATA(String text)
{
if (text == null)
return null;
char c;
StringBuffer n = new StringBuffer (text.length () * 2);
for (int i = 0; i < text.length (); i++)
{
c = text.charAt (i);
switch (c)
{
case '&':
n.append ("&");
break;
case... | case '"':
n.append (""");
break;
case '\'':
n.append ("'");
break;
default:
{
n.append (c);
break;
}
}
}
return n.toString ();
} // xmlEncodeTextAsPCDATA
} //Ofx1To2Convertor | repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-legacy\org\compiere\impexp\OFX1ToXML.java | 1 |
请完成以下Java代码 | protected org.compiere.model.POInfo initPO(final Properties ctx)
{
return org.compiere.model.POInfo.getPOInfo(Table_Name);
}
@Override
public void setM_HU_Trx_Hdr_ID (final int M_HU_Trx_Hdr_ID)
{
if (M_HU_Trx_Hdr_ID < 1)
set_ValueNoCheck (COLUMNNAME_M_HU_Trx_Hdr_ID, null);
else
set_ValueNoCheck (COL... | return get_ValueAsInt(COLUMNNAME_M_HU_Trx_Hdr_ID);
}
@Override
public void setProcessed (final boolean Processed)
{
set_Value (COLUMNNAME_Processed, Processed);
}
@Override
public boolean isProcessed()
{
return get_ValueAsBoolean(COLUMNNAME_Processed);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Trx_Hdr.java | 1 |
请完成以下Java代码 | public Map<String, Credential> getUsers() {
return users;
}
public void setUsers(Map<String, Credential> users) {
this.users = users;
}
public static class Credential {
private String username;
private String password;
public String getUsername() {
... | }
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-properties-2\src\main\java\com\baeldung\properties\yamlmap\pojo\ServerProperties.java | 1 |
请完成以下Java代码 | public void updateArchiveFlags(final I_AD_Archive archive)
{
if (archive.getC_Doc_Outbound_Config_ID() <= 0)
{
return; // nothing to do
}
// task 09417: also check if the archive references a docOutBoundConfig, and if yes, use its settings.
final I_C_Doc_Outbound_Config config = InterfaceWrapperHelper.cr... | ifColumnsChanged = {
I_AD_Archive.COLUMNNAME_IsDirectProcessQueueItem,
I_AD_Archive.COLUMNNAME_IsDirectEnqueue,
I_AD_Archive.COLUMNNAME_C_Doc_Outbound_Config_ID,
I_AD_Archive.COLUMNNAME_IsActive })
public void printArchive(final I_AD_Archive archive)
{
final PrintArchiveParameters printArchivePa... | repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\model\validator\AD_Archive.java | 1 |
请完成以下Java代码 | public void setEDI_cctop_invoic_v_ID (final int EDI_cctop_invoic_v_ID)
{
if (EDI_cctop_invoic_v_ID < 1)
set_Value (COLUMNNAME_EDI_cctop_invoic_v_ID, null);
else
set_Value (COLUMNNAME_EDI_cctop_invoic_v_ID, EDI_cctop_invoic_v_ID);
}
@Override
public int getEDI_cctop_invoic_v_ID()
{
return get_ValueA... | {
return get_ValueAsString(COLUMNNAME_Name);
}
@Override
public void setRate (final @Nullable BigDecimal Rate)
{
set_Value (COLUMNNAME_Rate, Rate);
}
@Override
public BigDecimal getRate()
{
final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Rate);
return bd != null ? bd : BigDecimal.ZERO;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_cctop_140_v.java | 1 |
请完成以下Java代码 | private AdWindowId getFactAcctWindowId(@Nullable final AdWindowId expectedTargetWindowId)
{
//
// Get the Fact_Acct AD_Window_ID
final AdWindowId factAcctWindowId = CoalesceUtil.coalesceSuppliers(
() -> RecordWindowFinder.findAdWindowId(TABLENAME_Fact_Acct_Transactions_View).orElse(null),
() -> RecordWin... | }
return factAcctWindowId;
}
private OptionalBoolean checkIsPosted(@NonNull final IZoomSource document)
{
if (document.hasField(COLUMNNAME_Posted))
{
final boolean posted = document.getFieldValueAsBoolean(COLUMNNAME_Posted);
return OptionalBoolean.ofBoolean(posted);
}
else
{
return OptionalBoo... | repos\metasfresh-new_dawn_uat\backend\de.metas.acct.webui\src\main\java\de\metas\acct\open_items\related_documents\ClearingFactAcctsRelatedDocumentsProvider.java | 1 |
请完成以下Java代码 | private void concatenatePDFsToOutputStream(
@NonNull final OutputStream outputStream,
@NonNull final ImmutableList<PdfDataProvider> pdfDataToConcatenate)
{
final Document document = new Document();
try
{
final PdfCopy copyDestination = new PdfCopy(document, outputStream);
document.open();
for (f... | }
copyDestination.freeReader(pdfReader);
pdfReader.close();
}
@Value
public static class PdfDataProvider
{
public static PdfDataProvider forData(@NonNull final Resource pdfData)
{
return new PdfDataProvider(pdfData);
}
Resource pdfData;
private PdfDataProvider(@NonNull final Resource pdfData)
... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\report\ExecuteReportStrategyUtil.java | 1 |
请完成以下Java代码 | public int getM_Product_Category_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_Category_ID);
if (ii == null)
return 0;
return ii.intValue();
}
public I_M_Product getM_Product() throws RuntimeException
{
return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name)
.getPO(getM_P... | {
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
}
/** Get Sequence.
@return Method of ordering records; lowest number comes first
*/
public int getSeqNo ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Valid from.
@para... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_C_TaxDefinition.java | 1 |
请完成以下Java代码 | public Mono<ClientGraphQlResponse> execute() {
return initRequestSpec().execute();
}
/**
* Create {@link GraphQLQueryRequest}, serialize it to a String document
* to send, and delegate to the wrapped {@code GraphQlClient}.
* <p>See Javadoc of delegate method
* {@link GraphQlClient.RequestSpec#execut... | private GraphQlClient.RequestSpec initRequestSpec() {
String document;
String operationName;
if (!this.additionalRequests.isEmpty()) {
this.additionalRequests.add(createRequest());
document = new GraphQLMultiQueryRequest(this.additionalRequests).serialize();
operationName = null;
}
else {
... | repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\client\DgsGraphQlClient.java | 1 |
请完成以下Java代码 | protected Parser createParser(String expression) {
return new Parser(this, expression);
}
@Override
public boolean equals(Object obj) {
if (obj == null || obj.getClass() != getClass()) {
return false;
}
return features.equals(((Builder) obj).features);
}
... | public FunctionMapper getFunctionMapper() {
return null;
}
@Override
public ELResolver getELResolver() {
return null;
}
};
out.print(">> ");
try {
out.println(tree... | repos\Activiti-develop\activiti-core-common\activiti-juel-jakarta\src\main\java\org\activiti\core\el\juel\tree\impl\Builder.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public ServerConfig ratpackServerConfig() {
return ServerConfig
.builder()
.findBaseDir("public")
.build();
}
public static void main(String[] args) {
SpringApplication.run(EmbedRatpackStreamsApp.class, args);
}
public static class RandomBytesPubl... | try {
while ( requested-- > 0 && !cancelled && bufCount-- > 0 ) {
byte[] data = new byte[bufSize];
rnd.nextBytes(data);
ByteBuf buf = Unpooled.wrappedBuffer(data);
s.onNext(buf);
... | repos\tutorials-master\web-modules\ratpack\src\main\java\com\baeldung\spring\EmbedRatpackStreamsApp.java | 2 |
请完成以下Java代码 | protected @Nullable String retrieveHeaderAsString(Headers headers, String headerName) {
Header header = headers.lastHeader(headerName);
if (header != null) {
String classId = null;
if (header.value() != null) {
classId = new String(header.value(), StandardCharsets.UTF_8);
}
return classId;
}
ret... | }
public Map<String, Class<?>> getIdClassMapping() {
return Collections.unmodifiableMap(this.idClassMapping);
}
/**
* Configure the TypeMapper to use default key type class.
* @param isKey Use key type headers if true
* @since 2.1.3
*/
public void setUseForKey(boolean isKey) {
if (isKey) {
setClass... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\mapping\AbstractJavaTypeMapper.java | 1 |
请完成以下Java代码 | final class Canonicalizer {
private Canonicalizer() {
}
static String canonicalizeAfter(String path, int pos) {
int pathLength = path.length();
boolean noDotSlash = path.indexOf("./", pos) == -1;
if (pos >= pathLength || (noDotSlash && path.charAt(pathLength - 1) != '.')) {
return path;
}
String befor... | path = (priorSlash >= 0) ? path.substring(0, priorSlash) + after : after;
}
return path;
}
private static String removeEmbeddedSlashDotSlash(String path) {
int index;
while ((index = path.indexOf("/./")) >= 0) {
String before = path.substring(0, index);
String after = path.substring(index + 2);
path... | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\net\protocol\jar\Canonicalizer.java | 1 |
请完成以下Java代码 | public String getTenantId() {
return tenantId;
}
public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public List<String> getMoveToPlanItemDefinitionIds() {
return moveToPlanItemDefinitionIds;
}
public void setMoveToPlanItemDefinitionIds(List<String> ... | return moveToPlanItemMap;
}
public void setMoveToPlanItemMap(Map<String, PlanItemMoveEntry> moveToPlanItemMap) {
this.moveToPlanItemMap = moveToPlanItemMap;
}
public PlanItemMoveEntry getMoveToPlanItem(String planItemId) {
return moveToPlanItemMap.get(planItemId);
}
public Lis... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\MovePlanItemInstanceEntityContainer.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.