instruction string | input string | output string | source_file string | priority int64 |
|---|---|---|---|---|
请完成以下Java代码 | protected IntegerStringExpression createGeneralExpression(final ExpressionContext context, final String expressionStr, final List<Object> expressionChunks)
{
return new GeneralExpression(context, this, expressionStr, expressionChunks);
}
});
}
private static final class IntegerValueConverter implements V... | {
public SingleParameterExpression(final ExpressionContext context, final Compiler<Integer, IntegerStringExpression> compiler, final String expressionStr, final CtxName parameter)
{
super(context, compiler, expressionStr, parameter);
}
@Override
protected Integer extractParameterValue(final Evaluatee ctx)... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\IntegerStringExpressionSupport.java | 1 |
请完成以下Java代码 | public void patchRow(final RowEditingContext ctx, final List<JSONDocumentChangedEvent> fieldChangeRequests)
{
changeRow(ctx.getRowId(), row -> applyFieldChangeRequests(row, fieldChangeRequests));
}
private ProductsToPickRow applyFieldChangeRequests(@NonNull final ProductsToPickRow row, final List<JSONDocumentChan... | }
return getAllRowsByIdNoUpdate()
.values()
.stream()
.filter(row -> pickingCandidateIds.contains(row.getPickingCandidateId()))
.map(ProductsToPickRow::getId)
.collect(DocumentIdsSelection.toDocumentIdsSelection());
}
@Override
public void invalidateAll()
{
rowIdsInvalid = true;
}
publi... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingV2\productsToPick\rows\ProductsToPickRowsData.java | 1 |
请完成以下Java代码 | private ImmutableList<RefundInvoiceCandidate> orderCandidatesByConfigMinQty(@NonNull final List<RefundInvoiceCandidate> refundCandidatesToAssign)
{
return refundCandidatesToAssign
.stream()
.sorted(Comparator.comparing(c -> singleElement(c.getRefundConfigs()).getMinQty()))
.collect(ImmutableList.toImmuta... | }
else
{
remainingQty = quantityToAssign.subtract(quantityToAssignEffective);
}
final AssignmentToRefundCandidate assignmentToRefundCandidate = refundInvoiceCandidateService
.addAssignableMoney(
refundCandidate,
refundConfig,
candidateToAssign);
refundInvoiceCandidateRepository.save... | repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\refund\exceedingqty\CandidateAssignServiceExceedingQty.java | 1 |
请完成以下Java代码 | public List<ArtikelMenge> getArtikel() {
if (artikel == null) {
artikel = new ArrayList<ArtikelMenge>();
}
return this.artikel;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/... | }
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v1\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v1\Ruecknahmeangebot.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected boolean isJndiAvailable() {
return JndiLocatorDelegate.isDefaultJndiEnvironmentAvailable();
}
protected JndiLocator getJndiLocator(String[] locations) {
return new JndiLocator(locations);
}
protected static class JndiLocator extends JndiLocatorSupport {
private final String[] locations;
public... | public @Nullable String lookupFirstLocation() {
for (String location : this.locations) {
try {
lookup(location);
return location;
}
catch (NamingException ex) {
// Swallow and continue
}
}
return null;
}
}
} | repos\spring-boot-4.0.1\core\spring-boot-autoconfigure\src\main\java\org\springframework\boot\autoconfigure\condition\OnJndiCondition.java | 2 |
请完成以下Java代码 | public void setM_HU_PI_Version_ID (final int M_HU_PI_Version_ID)
{
if (M_HU_PI_Version_ID < 1)
set_Value (COLUMNNAME_M_HU_PI_Version_ID, null);
else
set_Value (COLUMNNAME_M_HU_PI_Version_ID, M_HU_PI_Version_ID);
}
@Override
public int getM_HU_PI_Version_ID()
{
return get_ValueAsInt(COLUMNNAME_M_HU_... | @Override
public int getM_Product_ID()
{
return get_ValueAsInt(COLUMNNAME_M_Product_ID);
}
@Override
public void setSerialNo (final @Nullable java.lang.String SerialNo)
{
throw new IllegalArgumentException ("SerialNo is virtual column"); }
@Override
public java.lang.String getSerialNo()
{
return get_... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public @Nullable String getRetentionDuration() {
return this.retentionDuration;
}
public void setRetentionDuration(@Nullable String retentionDuration) {
this.retentionDuration = retentionDuration;
}
public @Nullable Integer getRetentionReplicationFactor() {
return this.retentionReplicationFactor;
}
publi... | public void setApiVersion(@Nullable InfluxApiVersion apiVersion) {
this.apiVersion = apiVersion;
}
public @Nullable String getOrg() {
return this.org;
}
public void setOrg(@Nullable String org) {
this.org = org;
}
public @Nullable String getBucket() {
return this.bucket;
}
public void setBucket(@Nul... | repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\export\influx\InfluxProperties.java | 2 |
请完成以下Java代码 | public void setPickFrom_HU_ID (final int PickFrom_HU_ID)
{
if (PickFrom_HU_ID < 1)
set_Value (COLUMNNAME_PickFrom_HU_ID, null);
else
set_Value (COLUMNNAME_PickFrom_HU_ID, PickFrom_HU_ID);
}
@Override
public int getPickFrom_HU_ID()
{
return get_ValueAsInt(COLUMNNAME_PickFrom_HU_ID);
}
@Override
... | {
if (Picking_User_ID < 1)
set_Value (COLUMNNAME_Picking_User_ID, null);
else
set_Value (COLUMNNAME_Picking_User_ID, Picking_User_ID);
}
@Override
public int getPicking_User_ID()
{
return get_ValueAsInt(COLUMNNAME_Picking_User_ID);
}
@Override
public void setPreparationDate (final @Nullable java... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_Picking_Job.java | 1 |
请完成以下Java代码 | public void setEntityType (String EntityType)
{
set_Value (COLUMNNAME_EntityType, EntityType);
}
/** Get Entity Type.
@return Dictionary Entity Type; Determines ownership and synchronization
*/
public String getEntityType ()
{
return (String)get_Value(COLUMNNAME_EntityType);
}
/** FieldGroupType AD_... | if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identi... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_FieldGroup.java | 1 |
请完成以下Java代码 | public String getTableAlias()
{
return _tableAlias;
}
public Builder setChildToParentLinkColumnNames(@Nullable final IPair<String, String> childToParentLinkColumnNames)
{
assertNotBuilt();
if (childToParentLinkColumnNames != null)
{
_sqlLinkColumnName = childToParentLinkColumnNames.getLeft();
... | private List<SqlDocumentFieldDataBindingDescriptor> getKeyFields()
{
return getFieldsByFieldName()
.values()
.stream()
.filter(SqlDocumentFieldDataBindingDescriptor::isKeyColumn)
.collect(ImmutableList.toImmutableList());
}
private Optional<String> getSqlSelectVersionById()
{
if (getF... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\sql\SqlDocumentEntityDataBindingDescriptor.java | 1 |
请完成以下Java代码 | public class FlattenUtils {
public static Map<String, Object> flatten(Map<String, Object> map) {
return flatten(map, null);
}
private static Map<String, Object> flatten(Map<String, Object> map, String prefix) {
Map<String, Object> flatMap = new HashMap<>();
map.forEach((key, value) ... | flatMap.put(newKey, value);
} else {
// check for list of objects
List<Map<String, Object>> list = (List<Map<String, Object>>) value;
for (int i = 0; i < list.size(); i++) {
flatMap.putAll(flatten(list.get(i), newKey + "... | repos\tutorials-master\json-modules\json-conversion\src\main\java\com\baeldung\jsontomap\FlattenUtils.java | 1 |
请完成以下Java代码 | public class SettThreadPoolExecutor {
private static final Log LOG = LogFactory.getLog(SettThreadPoolExecutor.class);
/**
* 针对核心Thread的Max比率 ,以10为基数,8表示0.8
*/
private int notifyRadio = 4;
/**
* 最少线程数.<br/>
* 当池子大小小于corePoolSize就新建线程,并处理请求.
*/
private int corePoolSize;
/**
* 线程池缓冲队列大小.<br/>
* 当池子... | executor = new ThreadPoolExecutor(corePoolSize, maxPoolSize, keepAliveTime, TimeUnit.SECONDS, notifyWorkQueue, new ThreadPoolExecutor.CallerRunsPolicy());
LOG.info("NotifyExecutor Info : CPU = " + coreSize +
" | corePoolSize = " + corePoolSize + " | maxPoolSize = " +
maxPoolSize + " | workQueueSize = " + w... | repos\roncoo-pay-master\roncoo-pay-app-settlement\src\main\java\com\roncoo\pay\app\settlement\utils\SettThreadPoolExecutor.java | 1 |
请完成以下Java代码 | protected static void bulkDeleteHistoricTaskInstances(Collection<String> taskIds, CmmnEngineConfiguration cmmnEngineConfiguration) {
HistoricTaskService historicTaskService = cmmnEngineConfiguration.getTaskServiceConfiguration().getHistoricTaskService();
List<String> subTaskIds = historicTaskSe... | if ("true".equalsIgnoreCase((String) booleanObject)) {
return Boolean.TRUE;
}
if ("false".equalsIgnoreCase((String) booleanObject)) {
return Boolean.FALSE;
}
}
return null;
}
protected static void fireAssignmentEvents(TaskEntit... | repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\task\TaskHelper.java | 1 |
请完成以下Java代码 | private static final class DateFieldValueExtractor implements FieldValueExtractor
{
private final String fieldName;
private final DocumentFieldWidgetType widgetType;
@Override
public String extractFieldValueToString(final Document document)
{
final Object fieldValue = document.getFieldView(fieldName).get... | // shall not happen
displayType = DisplayType.Number;
}
}
@Override
public String getFieldName()
{
return fieldName;
}
@Override
public String extractFieldValueToString(final Document document)
{
final Object fieldValue = document.getFieldView(fieldName).getValue();
if (fieldValue == n... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\factory\standard\GenericDocumentSummaryValueProvider.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Collection<Foo> findAll() {
return myfoos.values();
}
@RequestMapping(method = RequestMethod.GET, value = "/{id}", produces = { "application/json" })
@ResponseBody
public Foo findById(@PathVariable final long id) {
final Foo foo = myfoos.get(id);
if (foo == null) {
... | @ResponseBody
public Foo createFoo(@RequestBody final Foo foo, HttpServletResponse response) {
myfoos.put(foo.getId(), foo);
response.setHeader("Location", ServletUriComponentsBuilder.fromCurrentRequest()
.path("/" + foo.getId())
.toUriString());
return foo;
}
... | repos\tutorials-master\spring-boot-modules\spring-boot-runtime\src\main\java\com\baeldung\sampleapp\web\controller\MyFooController.java | 2 |
请完成以下Java代码 | public void setAD_User_ID(final int AD_User_ID)
{
delegate.setAD_User_ID(AD_User_ID);
}
@Override
public String getBPartnerAddress()
{
return address;
}
@Override
public void setBPartnerAddress(String address)
{
this.address = address;
}
@Override
public void setRenderedAddressAndCapturedLocation(f... | @Override
public Optional<DocumentLocation> toPlainDocumentLocation(final IDocumentLocationBL documentLocationBL)
{
return documentLocationBL.toPlainDocumentLocation(this);
}
@Override
public BPartnerLocationAdapter toOldValues()
{
InterfaceWrapperHelper.assertNotOldValues(delegate);
return new BPartnerLoc... | repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\location\adapter\BPartnerLocationAdapter.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class UserRpcServiceTest02 implements CommandLineRunner {
private final Logger logger = LoggerFactory.getLogger(getClass());
@Resource
private UserRpcService userRpcService;
@Override
public void run(String... args) throws Exception {
// 获得用户
try... | @Override
public void run(String... args) {
// 添加用户
try {
// 创建 UserAddDTO
UserAddDTO addDTO = new UserAddDTO();
addDTO.setName("yudaoyuanma"); // 设置为 yudaoyuanma ,触发 ServiceException 异常
addDTO.setGender(1);
... | repos\SpringBoot-Labs-master\lab-30\lab-30-dubbo-xml-demo\user-rpc-service-consumer\src\main\java\cn\iocoder\springboot\lab30\rpc\ConsumerApplication.java | 2 |
请完成以下Java代码 | public int getReversalLine_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_ReversalLine_ID);
if (ii == null)
return 0;
return ii.intValue();
}
/** Set Verworfene Menge.
@param ScrappedQty
Durch QA verworfene Menge
*/
public void setScrappedQty (BigDecimal ScrappedQty)
{
set_ValueNoCheck (C... | @param TargetQty
Zielmenge der Warenbewegung
*/
public void setTargetQty (BigDecimal TargetQty)
{
set_ValueNoCheck (COLUMNNAME_TargetQty, TargetQty);
}
/** Get Zielmenge.
@return Zielmenge der Warenbewegung
*/
public BigDecimal getTargetQty ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Ta... | repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\adempiere\model\X_RV_M_InOutLine_Overview.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class MainApplication {
private final BookstoreService bookstoreService;
public MainApplication(BookstoreService bookstoreService) {
this.bookstoreService = bookstoreService;
}
public static void main(String[] args) {
SpringApplication.run(MainApplication.class, args);
}
... | for (AuthorNameAge author : authors) {
System.out.println("Author name: " + author.getName()
+ " | Age: " + author.getAge());
}
System.out.println("============================================");
List<String> names = b... | repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoSpringProjectionAnnotatedNamedNativeQuery\src\main\java\com\bookstore\MainApplication.java | 2 |
请完成以下Java代码 | private void validateMember(Member member) throws ConstraintViolationException, ValidationException {
// Create a bean validator and check for issues.
Set<ConstraintViolation<Member>> violations = validator.validate(member);
if (!violations.isEmpty()) {
throw new ConstraintViolation... | }
/**
* Checks if a member with the same email address is already registered. This is the only way to easily capture the
* "@UniqueConstraint(columnNames = "email")" constraint from the Member class.
*
* @param email The email to check
* @return True if the email already exists, and false ... | repos\tutorials-master\persistence-modules\deltaspike\src\main\java\baeldung\rest\MemberResourceRESTService.java | 1 |
请完成以下Java代码 | public void setQRCode_Attribute_Config_ID (final int QRCode_Attribute_Config_ID)
{
if (QRCode_Attribute_Config_ID < 1)
set_ValueNoCheck (COLUMNNAME_QRCode_Attribute_Config_ID, null);
else
set_ValueNoCheck (COLUMNNAME_QRCode_Attribute_Config_ID, QRCode_Attribute_Config_ID);
}
@Override
public int getQRC... | set_ValueFromPO(COLUMNNAME_QRCode_Configuration_ID, I_QRCode_Configuration.class, QRCode_Configuration);
}
@Override
public void setQRCode_Configuration_ID (final int QRCode_Configuration_ID)
{
if (QRCode_Configuration_ID < 1)
set_Value (COLUMNNAME_QRCode_Configuration_ID, null);
else
set_Value (COLUMN... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_QRCode_Attribute_Config.java | 1 |
请完成以下Java代码 | /* package */boolean isRunDoItOutOfTransaction()
{
return runDoItOutOfTransaction;
}
/**
* @return <code>true</code> if at least a part of the process shall be executed out of transaction
*/
public boolean isRunOutOfTransaction()
{
return runPrepareOutOfTransaction || runDoItOutOfTransaction;
}
/**
*... | }
public List<ProcessClassParamInfo> getParameterInfos(final String parameterName)
{
final List<ProcessClassParamInfo> params = new ArrayList<>();
params.addAll(parameterInfos.get(ProcessClassParamInfo.createParameterUniqueKey(parameterName, false)));
params.addAll(parameterInfos.get(ProcessClassParamInfo.crea... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\process\ProcessClassInfo.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getProcessDefinitionId() {
return processDefinitionId;
}
public void setProcessDefinitionId(String processDefinitionId) {
this.processDefinitionId = processDefinitionId;
}
@ApiModelProperty(example = "http://localhost:8182/repository/process-definitions/oneTaskProcess%3A1... | @ApiModelProperty(example = "2013-04-17T10:17:43.902+0000")
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
@ApiModelProperty(example = "2013-04-18T14:06:32.715+0000")
public Date getEndTime() {
r... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\history\HistoricActivityInstanceResponse.java | 2 |
请完成以下Java代码 | private static void printBoard(Board board) {
StringBuilder topLines = new StringBuilder();
StringBuilder midLines = new StringBuilder();
for (int x = 0; x < board.getSize(); ++x) {
topLines.append("+--------");
midLines.append("| ");
}
topLines.app... | StringBuilder output = new StringBuilder(Integer.toString(board.getCell(cell)));
while (output.length() < 8) {
output.append(" ");
if (output.length() < 8) {
output.insert(0, " ");
}
... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-6\src\main\java\com\baeldung\algorithms\play2048\Play2048.java | 1 |
请完成以下Java代码 | protected ListenableFuture<List<ReadTsKvQueryResult>> processFindAllAsync(TenantId tenantId, EntityId entityId, List<ReadTsKvQuery> queries) {
List<ListenableFuture<ReadTsKvQueryResult>> futures = queries
.stream()
.map(query -> findAllAsync(tenantId, entityId, query))
... | protected long computeTtl(long ttl) {
if (systemTtl > 0) {
if (ttl == 0) {
ttl = systemTtl;
} else {
ttl = Math.min(systemTtl, ttl);
}
}
return ttl;
}
protected int getDataPointDays(TsKvEntry tsKvEntry, long ttl) {
... | repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sqlts\AbstractSqlTimeseriesDao.java | 1 |
请完成以下Java代码 | public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
public Order complete(Boolean complete) {
this.complete = complete;
return this;
}
/**
* Get complete
* @return complete
**/
@ApiModelProperty(value = "")
publi... | StringBuilder sb = new StringBuilder();
sb.append("class Order {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" petId: ").append(toIndentedString(petId)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
sb.append(" ... | repos\tutorials-master\spring-swagger-codegen-modules\spring-swagger-codegen-api-client\src\main\java\com\baeldung\petstore\client\model\Order.java | 1 |
请完成以下Java代码 | public Timestamp getCreated() {
return po.getCreated(); // getCreated
}
/**
* Get Updated
* @return updated
*/
public Timestamp getUpdated() {
return po.getUpdated(); // getUpdated
}
/**
* Get CreatedBy
* @return AD_User_ID
*/
public int getCreatedBy() {
return po.getCreatedBy(); // getC... | * @param force delete also processed records
* @return true if deleted
*/
public boolean delete(boolean force) {
return po.delete(force); // delete
}
/**
* Delete Current Record
* @param force delete also processed records
* @param trxName transaction
*/
public boolean delete(boolean force, Stri... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\model\wrapper\AbstractPOWrapper.java | 1 |
请完成以下Java代码 | public Currency getByCurrencyCode(@NonNull final CurrencyCode currencyCode)
{
Adempiere.assertUnitTestMode();
return getOrCreateByCurrencyCode(currencyCode);
}
public Currency getOrCreateByCurrencyCode(@NonNull final CurrencyCode currencyCode)
{
Adempiere.assertUnitTestMode();
return getCurrenciesMap()
... | @Nullable final CurrencyId currencyId)
{
Adempiere.assertUnitTestMode();
final CurrencyPrecision precisionToUse = precision != null ? precision : CurrencyPrecision.TWO;
final I_C_Currency record = newInstanceOutOfTrx(I_C_Currency.class);
record.setISO_Code(currencyCode.toThreeLetterCode());
record.setCurS... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\currency\impl\PlainCurrencyDAO.java | 1 |
请完成以下Java代码 | public DocumentIdsSelection getDocumentIdsToInvalidate(final TableRecordReferenceSet recordRefs)
{
return DocumentIdsSelection.EMPTY;
}
@Override
public void invalidateAll()
{
headerPropertiesHolder.setValue(null);
rowsHolder.setRows(viewDataService.retrieveRows(soTrx, filter));
}
public ViewHeaderProper... | }
private ViewHeaderProperties computeHeaderProperties()
{
return ViewHeaderProperties.builder()
.group(ViewHeaderPropertiesGroup.builder()
.entry(ViewHeaderProperty.builder()
.caption(TranslatableStrings.adElementOrMessage("InvoiceOpenAmt"))
.value(TranslatableStrings.amount(viewDataServ... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\invoice\match_inout_costs\InOutCostsViewData.java | 1 |
请完成以下Java代码 | public void resetModelInterceptor(@NonNull final I_AD_Column column)
{
final String tableName = adTableDAO.retrieveTableName(column.getAD_Table_ID());
valRuleAutoApplierService.unregisterForTableName(tableName);
// createAndRegisterForQuery might add it again
engine.removeModelChange(tableName, autoApplyValRu... | final ValRuleAutoApplier valRuleAutoApplier = ValRuleAutoApplier.builder()
.adTableDAO(adTableDAO)
.adReferenceService(adReferenceService)
.tableName(tableName)
.columns(columns)
.build();
valRuleAutoApplierService.registerApplier(valRuleAutoApplier);
tableNamesWithRegisteredColumn.add(t... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\column\autoapplyvalrule\interceptor\AD_Column_AutoApplyValRuleConfig.java | 1 |
请完成以下Java代码 | public String getProcessDefinitionKey() {
return processDefinitionKey;
}
public String getProcessDefinitionId() {
return processDefinitionId;
}
public String getProcessDefinitionCategory() {
return processDefinitionCategory;
}
public String getProcessDefinitionName() {... | public String getInvolvedUser() {
return involvedUser;
}
public void setInvolvedUser(String involvedUser) {
this.involvedUser = involvedUser;
}
public Set<String> getProcessDefinitionIds() {
return processDefinitionIds;
}
public Set<String> getProcessDefinitionKeys() {... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\ExecutionQueryImpl.java | 1 |
请完成以下Java代码 | public List<EventDefinition> findEventDefinitionsByQueryCriteria(EventDefinitionQueryImpl eventQuery) {
return dataManager.findEventDefinitionsByQueryCriteria(eventQuery);
}
@Override
public long findEventDefinitionCountByQueryCriteria(EventDefinitionQueryImpl eventQuery) {
return dataManag... | @Override
public List<EventDefinition> findEventDefinitionsByNativeQuery(Map<String, Object> parameterMap) {
return dataManager.findEventDefinitionsByNativeQuery(parameterMap);
}
@Override
public long findEventDefinitionCountByNativeQuery(Map<String, Object> parameterMap) {
return dataM... | repos\flowable-engine-main\modules\flowable-event-registry\src\main\java\org\flowable\eventregistry\impl\persistence\entity\EventDefinitionEntityManagerImpl.java | 1 |
请完成以下Java代码 | public Builder setProcessed(final boolean processed)
{
this.processed = processed;
return this;
}
private boolean isProcessed()
{
if (processed == null)
{
// NOTE: don't take the "Processed" field if any, because in frontend we will end up with a lot of grayed out completed sales orders, for ex... | if (includedRows == null)
{
includedRows = new ArrayList<>();
}
includedRows.add(includedRow);
return this;
}
private List<IViewRow> buildIncludedRows()
{
if (includedRows == null || includedRows.isEmpty())
{
return ImmutableList.of();
}
return ImmutableList.copyOf(includedRows... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\view\ViewRow.java | 1 |
请完成以下Java代码 | public class Document {
private int id;
private String title;
private String text;
private Date modificationTime;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void s... | return text;
}
public void setText(String text) {
this.text = text;
}
public Date getModificationTime() {
return modificationTime;
}
public void setModificationTime(Date modificationTime) {
this.modificationTime = modificationTime;
}
} | repos\tutorials-master\mapstruct\src\main\java\com\baeldung\unmappedproperties\entity\Document.java | 1 |
请完成以下Java代码 | public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public int getRetries() {
return retries;
}
public void setRetries(int retries) {
this.retries = retries;
}
public int getMaxIterations() {
return maxIterations;
}
public void setMaxItera... | result = prime * result + maxIterations;
result = prime * result + ((repeat == null) ? 0 : repeat.hashCode());
result = prime * result + retries;
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return fals... | repos\Activiti-develop\activiti-api\activiti-api-process-model\src\main\java\org\activiti\api\process\model\payloads\TimerPayload.java | 1 |
请完成以下Java代码 | public final class AdMessageKey
{
@JsonCreator
public static AdMessageKey of(@NonNull final String value)
{
return new AdMessageKey(value);
}
@Nullable
public static AdMessageKey ofNullable(@Nullable final String value)
{
return value != null && Check.isNotBlank(value) ? of(value) : null;
}
private final... | @Override
public String toString()
{
return toAD_Message();
}
@JsonValue
public String toAD_Message()
{
return value;
}
public String toAD_MessageWithMarkers()
{
return "@" + toAD_Message() + "@";
}
public boolean startsWith(final String prefix) {return value.startsWith(prefix);}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\i18n\AdMessageKey.java | 1 |
请完成以下Java代码 | public String getJobDefinitionId() {
return jobDefinitionId;
}
public void setJobDefinitionId(String jobDefinitionId) {
this.jobDefinitionId = jobDefinitionId;
}
public String getJobId() {
return jobId;
}
public void setJobId(String jobId) {
this.jobId = jobId;
}
public String getBat... | }
public void setRootProcessInstanceId(String rootProcessInstanceId) {
this.rootProcessInstanceId = rootProcessInstanceId;
}
public String getExternalTaskId() {
return externalTaskId;
}
public void setExternalTaskId(String externalTaskId) {
this.externalTaskId = externalTaskId;
}
public St... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\oplog\UserOperationLogContextEntry.java | 1 |
请完成以下Java代码 | public void setIsInclude (boolean IsInclude)
{
set_Value (COLUMNNAME_IsInclude, Boolean.valueOf(IsInclude));
}
/** Get Included.
@return Defines whether this content / template is included into another one
*/
public boolean isInclude ()
{
Object oo = get_Value(COLUMNNAME_IsInclude);
if (oo != null)
... | Alphanumeric identifier of the entity
*/
public void setName (String Name)
{
set_Value (COLUMNNAME_Name, Name);
}
/** Get Name.
@return Alphanumeric identifier of the entity
*/
public String getName ()
{
return (String)get_Value(COLUMNNAME_Name);
}
/** Get Record ID/ColumnName
@return ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_HR_PayrollConcept.java | 1 |
请完成以下Java代码 | public void generateNewDocument() {
try {
Document document = DocumentHelper.createDocument();
Element root = document.addElement("XMLTutorials");
Element tutorialElement = root.addElement("tutorial").addAttribute("tutId", "01");
tutorialElement.addAttribute("type... | writer.write(document);
writer.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public File getFile() {
return file;
}
public void setFile(File file) {
this.file = file;
}
} | repos\tutorials-master\xml-modules\xml\src\main\java\com\baeldung\xml\Dom4JParser.java | 1 |
请完成以下Java代码 | public boolean isAllowInfiniteCapacity()
{
return allowInfiniteCapacity;
}
@Override
public void setAllowInfiniteCapacity(final boolean allowInfiniteCapacity)
{
this.allowInfiniteCapacity = allowInfiniteCapacity;
}
@Override
public boolean isAllowAnyPartner()
{
return allowAnyPartner;
}
@Override
p... | this.allowAnyPartner = allowAnyPartner;
}
@Override
public int getM_Product_Packaging_ID()
{
return packagingProductId;
}
@Override
public void setM_Product_Packaging_ID(final int packagingProductId)
{
this.packagingProductId = packagingProductId > 0 ? packagingProductId : -1;
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUPIItemProductQuery.java | 1 |
请完成以下Java代码 | public void onReactivate(@NonNull final I_PP_Product_BOM productBOMRecord)
{
final ProductBOMId productBOMId = ProductBOMId.ofRepoId(productBOMRecord.getPP_Product_BOM_ID());
if (isBOMInUse(productBOMId))
{
throw new AdempiereException("Product BOM is already in use (linked to a manufacturing order or candid... | @NonNull final I_PP_Product_BOM productBOMRecord)
{
ppOrderCandidateDAO.getByProductBOMId(previousBOMVersionID)
.stream()
.filter(ppOrderCandidate -> PPOrderCandidateService.canAssignBOMVersion(ppOrderCandidate, productBOMRecord))
.peek(ppOrderCandidate -> ppOrderCandidate.setPP_Product_BOM_ID(productBOM... | repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\productioncandidate\model\interceptor\PP_Product_BOM.java | 1 |
请完成以下Java代码 | public void restoreConstraints()
{
final Thread callingThread = Thread.currentThread();
try (final CloseableReentrantLock lock = thread2TrxConstraintLock.open())
{
final Deque<ITrxConstraints> stack = thread2TrxConstraint.get(callingThread);
if (stack == null)
{
// There are no constraints for the ... | if (stack.size() <= 1)
{
// there is only the current constraint instance, but no saved instance.
// Consequently there is nothing to restore.
return;
}
stack.pop();
}
}
@Override
public boolean isDisabled(ITrxConstraints constraints)
{
return constraints instanceof TrxConstraintsDisabled... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\util\trxConstraints\api\impl\TrxConstraintsBL.java | 1 |
请完成以下Java代码 | private void loadUIWindowHeaderNotice()
{
final LoginContext ctx = getCtx();
final ClientId clientId = ctx.getClientId();
final OrgId orgId = ctx.getOrgId();
final String windowHeaderNoticeText = sysConfigBL.getValue(SYSCONFIG_UI_WindowHeader_Notice_Text, clientId.getRepoId(), orgId.getRepoId());
ctx.setPro... | {
getCtx().setRemoteHost(remoteHost);
}
// RemoteHost
public void setWebSessionId(final String webSessionId)
{
getCtx().setWebSessionId(webSessionId);
}
public boolean isAllowLoginDateOverride()
{
return getCtx().isAllowLoginDateOverride();
}
} // Login | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\Login.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public String getRootScopeId() {
return rootScopeId;
}
public String getRootScopeType() {
return rootScopeType;
}
public String getLinkType() {
return linkType;
}
public String getHierarchyType() {
return hierarchyType;
}
// This method is needed becau... | if (param.referenceScopeType != null && !param.referenceScopeType.equals(entity.getReferenceScopeType())) {
return false;
}
if (param.rootScopeId != null && !param.rootScopeId.equals(entity.getRootScopeId())) {
return false;
}
if (param.rootScopeType != null && ... | repos\flowable-engine-main\modules\flowable-entitylink-service\src\main\java\org\flowable\entitylink\service\impl\InternalEntityLinkQueryImpl.java | 2 |
请完成以下Java代码 | public void parseRootElement(Element rootElement, List<ProcessDefinitionEntity> processDefinitions) {
}
@Override
public void parseIntermediateTimerEventDefinition(Element timerEventDefinition, ActivityImpl timerActivity) {
addStartEventListener(timerActivity);
addEndEventListener(timerActivity);
}
... | public void parseIntermediateMessageCatchEventDefinition(Element messageEventDefinition, ActivityImpl nestedActivity) {
}
@Override
public void parseBoundaryMessageEventDefinition(Element element, boolean interrupting, ActivityImpl messageActivity) {
}
@Override
public void parseBoundaryEscalationEventDef... | repos\camunda-bpm-platform-master\engine-cdi\core\src\main\java\org\camunda\bpm\engine\cdi\impl\event\CdiEventSupportBpmnParseListener.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Optional<IAttributeSetInstanceAware> getAttributeSetInstanceAware()
{
final Object referencedObj = getReferencedObject();
if (referencedObj == null)
{
return Optional.empty();
}
final IAttributeSetInstanceAwareFactoryService attributeSetInstanceAwareFactoryService = Services.get(IAttributeSetInsta... | if (ctxQty == null)
{
return null;
}
final UomId ctxUomId = getUomId();
if (ctxUomId == null)
{
return null;
}
return Quantitys.of(ctxQty, ctxUomId);
}
} | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\service\impl\PricingContext.java | 2 |
请完成以下Java代码 | public IQueryOrderByBuilder<T> addColumnAscending(@NonNull final String columnName)
{
final Direction direction = Direction.Ascending;
final Nulls nulls = getNulls(direction);
return addColumn(columnName, direction, nulls);
}
@Override
public IQueryOrderByBuilder<T> addColumnDescending(@NonNull final String ... | private Nulls getNulls(final Direction direction)
{
// NOTE: keeping backward compatibility
// i.e. postgresql 9.1. specifications:
// "By default, null values sort as if larger than any non-null value;
// that is, NULLS FIRST is the default for DESC order, and NULLS LAST otherwise."
//
// see https://www.... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\QueryOrderByBuilder.java | 1 |
请完成以下Java代码 | public Model getModel(String modelId) {
return commandExecutor.execute(new GetModelCmd(modelId));
}
@Override
public byte[] getModelEditorSource(String modelId) {
return commandExecutor.execute(new GetModelEditorSourceCmd(modelId));
}
@Override
public byte[] getModelEditorSourc... | @Override
public void deleteCandidateStarterUser(String processDefinitionId, String userId) {
commandExecutor.execute(new DeleteIdentityLinkForProcessDefinitionCmd(processDefinitionId, userId, null));
}
@Override
public List<IdentityLink> getIdentityLinksForProcessDefinition(String processDefin... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\RepositoryServiceImpl.java | 1 |
请完成以下Java代码 | protected boolean isStopOnFailedRun()
{
return false;
}
private void restartExecutorsIfTerminated()
{
if (plannerExecutorService == null || plannerExecutorService.isTerminated())
{
plannerExecutorService = createPlannerThreadExecutor();
}
if (queueProcessorExecutorService == null || queueProcessorExe... | @NonNull
private static ThreadPoolExecutor createPlannerThreadExecutor()
{
final CustomizableThreadFactory threadFactory = CustomizableThreadFactory.builder()
.setThreadNamePrefix("QueueProcessorPlanner")
.setDaemon(true)
.build();
return new ThreadPoolExecutor(
1, // corePoolSize
1, // maxim... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\processor\impl\planner\AsyncProcessorPlanner.java | 1 |
请完成以下Java代码 | public String getAmtInWords(String amount) throws Exception {
assert(amount!=null);
amount = amount.replaceAll(" ", "").replaceAll("\u00A0", "");
amount = amount.replaceAll("\\"+thousandseparator, "");
int pos = amount.lastIndexOf(wholeseparator);
String amountWhole;
String cents=null;
if(pos>=0)
{
... | return ret.toString();
}
String[] numbers = new String[] { "nulla", "egy", "kettő", "három", "négy",
"öt", "hat", "hét", "nyolc", "kilenc" };
String[] tens_solo = new String[] { null, "tíz", "húsz", "harminc", "negyven",
"ötven", "hatvan", "hetven", "nyolcvan", "kilencven" };
String[] tens_connected = new S... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\util\AmtInWords_HU.java | 1 |
请完成以下Java代码 | private IAllocationRequest createAllocationRequest(final I_M_ReceiptSchedule rs)
{
// Get Qty
final BigDecimal qty = getEffectiveQtyToReceive(rs);
if (qty.signum() <= 0)
{
// nothing to do
return null;
}
final ClientAndOrgId clientAndOrgId = ClientAndOrgId.ofClientAndOrg(rs.getAD_Client_ID(), rs.get... | }
else
{
clearanceStatusInfo = null;
}
return AllocationUtils.builder()
.setHUContext(huContextInitial)
.setDateAsToday()
.setProduct(product)
.setQuantity(new Quantity(qty, loadOutOfTrx(rs.getC_UOM_ID(), I_C_UOM.class)))
.setFromReferencedModel(rs)
.setForceQtyAllocation(true)
.... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_ReceiptSchedule_ReceiveCUs.java | 1 |
请完成以下Java代码 | private void actionOK()
{
if (fCreateNew.isSelected())
{
// Get Warehouse Info
KeyNamePair pp = (KeyNamePair)fWarehouse.getSelectedItem();
if (pp != null)
loadWarehouseInfo(pp.getKey());
// Check mandatory values
String mandatoryFields = "";
if (m_M_Warehouse_ID == null)
{
mandatoryFi... | /**
* Get Selected value
*
* @return value as Integer
*/
public Integer getValue()
{
MLocator l = getSelectedLocator();
if (l != null && l.getM_Locator_ID() != 0)
return new Integer(l.getM_Locator_ID());
return null;
} // getValue
/**
* Get result
*
* @return true if changed
*/
public boo... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VLocatorDialog.java | 1 |
请完成以下Java代码 | public class Users implements Streamable<User> {
private final Streamable<User> userStreamable;
public Users(Streamable<User> userStreamable) {
this.userStreamable = userStreamable;
}
@Override
public Iterator<User> iterator() {
return userStreamable.iterator();
}
public ... | }
public List<User> getAllUsersWithShortNames(int maxNameLength) {
return stream()
.filter(s -> s.getFirstName().length() <= maxNameLength)
.collect(Collectors.toList());
}
public Map<Character, List<User>> groupUsersAlphabetically() {
return stream().collect(Collec... | repos\tutorials-master\persistence-modules\spring-data-jpa-query-4\src\main\java\com\baeldung\spring\data\jpa\querymap\Users.java | 1 |
请完成以下Java代码 | public void handleTransportError(WebSocketSession session, Throwable throwable) throws Exception {
logger.error("error occured at sender " + session, throwable);
}
/**
* 给所有的用户发送消息
*/
public void sendMessagesToUsers(TextMessage message) {
for (WebSocketSession user : sessions) {
... | }
}
/**
* 发送消息给指定的用户
*/
private void sendMessageToUser(WebSocketSession user, TextMessage message) {
try {
// 在线就发送
if (user.isOpen()) {
user.sendMessage(message);
}
} catch (IOException e) {
logger.error("发送消息给指定的用户出错... | repos\SpringBootBucket-master\springboot-websocket\src\main\java\com\xncoding\jwt\handler\SocketHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public Integer getPayModeCode() {
return payModeCode;
}
public void setPayModeCode(Integer payModeCode) {
this.payModeCode = payModeCode;
}
public String getExpressNo() {
return expressNo;
}
public void setExpressNo(String expressNo) {
this.expressNo = expressN... | @Override
public String toString() {
return "OrderQueryReq{" +
"id='" + id + '\'' +
", buyerId='" + buyerId + '\'' +
", buyerName='" + buyerName + '\'' +
", buyerPhone='" + buyerPhone + '\'' +
", buyerMail='" + buyerMail + '\'' ... | repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\order\OrderQueryReq.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class CityWebFluxController {
@Autowired
private RedisTemplate redisTemplate;
@GetMapping(value = "/{id}")
public Mono<City> findCityById(@PathVariable("id") Long id) {
String key = "city_" + id;
ValueOperations<String, City> operations = redisTemplate.opsForValue();
boo... | String key = "city_" + city.getId();
ValueOperations<String, City> operations = redisTemplate.opsForValue();
operations.set(key, city, 60, TimeUnit.SECONDS);
return Mono.create(monoSink -> monoSink.success(city));
}
@DeleteMapping(value = "/{id}")
public Mono<Long> deleteCity(@Path... | repos\springboot-learning-example-master\springboot-webflux-6-redis\src\main\java\org\spring\springboot\webflux\controller\CityWebFluxController.java | 2 |
请完成以下Java代码 | public int hash(String str, int groupSize, int maxValue) {
final int[] codes = this.toAsciiCodes(str);
return IntStream.range(0, str.length())
.filter(i -> i % groupSize == 0)
.mapToObj(i -> extract(codes, i, groupSize))
.map(block -> concatenate(block))
.... | * Concatenate the numbers into a single number as if they were strings.
* Assume that the procedure does not suffer from the overflow.
* @param numbers integers to concatenate
* @return
*/
public int concatenate(int[] numbers) {
final String merged = IntStream.of(numbers)
.ma... | repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-3\src\main\java\com\baeldung\folding\FoldingHash.java | 1 |
请完成以下Java代码 | public Double getTotalOrderPrice() {
double sum = 0D;
List<OrderProduct> orderProducts = getOrderProducts();
for (OrderProduct op : orderProducts) {
sum += op.getTotalPrice();
}
return sum;
}
public Long getId() {
return id;
}
public void se... | public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public List<OrderProduct> getOrderProducts() {
return orderProducts;
}
public void setOrderProducts(List<OrderProduct> orderProducts) {
this.orderProduct... | repos\tutorials-master\spring-boot-modules\spring-boot-angular\src\main\java\com\baeldung\ecommerce\model\Order.java | 1 |
请完成以下Spring Boot application配置 | spring:
application:
name: demo-consumer-application
cloud:
# Spring Cloud Stream 配置项,对应 BindingServiceProperties 类
stream:
# Binder 配置项,对应 BinderProperties Map
binders:
rabbit001:
type: rabbit # 设置 Binder 的类型
environment: # 设置 Binder 的环境配置
# 如果是 Rabbi... | binder: rabbit001 # 设置使用的 Binder 名字
# RabbitMQ 自定义 Binding 配置项,对应 RabbitBindingProperties Map
rabbit:
bindings:
demo01-input:
# RabbitMQ Consumer 配置项,对应 RabbitConsumerProperties 类
consumer:
acknowledge-mode: MANUAL # 消费消息的确认模式,默认为 AUTO 自动确认
server:... | repos\SpringBoot-Labs-master\labx-10-spring-cloud-stream-rabbitmq\labx-10-sc-stream-rabbitmq-consumer-ack\src\main\resources\application.yml | 2 |
请完成以下Java代码 | public DirectoryStream<Path> newDirectoryStream(Path dir, Filter<? super Path> filter) throws IOException {
throw new NotDirectoryException(NestedPath.cast(dir).toString());
}
@Override
public void createDirectory(Path dir, FileAttribute<?>... attrs) throws IOException {
throw new ReadOnlyFileSystemException();... | Path jarPath = getJarPath(path);
return jarPath.getFileSystem().provider().getFileAttributeView(jarPath, type, options);
}
@Override
public <A extends BasicFileAttributes> A readAttributes(Path path, Class<A> type, LinkOption... options)
throws IOException {
Path jarPath = getJarPath(path);
return jarPath.... | repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\nio\file\NestedFileSystemProvider.java | 1 |
请完成以下Java代码 | public Set<String> keySet() {
return variableScope.getVariables().keySet();
}
@Override
public int size() {
return variableScope.getVariables().size();
}
@Override
public Collection<Object> values() {
return variableScope.getVariables().values();
}
@Override
... | return defaultBindings.remove(key);
}
@Override
public void clear() {
throw new UnsupportedOperationException();
}
@Override
public boolean containsValue(Object value) {
throw new UnsupportedOperationException();
}
@Override
public boolean isEmpty() {
throw... | repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\scripting\ScriptBindings.java | 1 |
请完成以下Java代码 | public ShipperMappingConfigList getByShipperId(@NonNull final ShipperId shipperId)
{
return getList().subsetOf(shipperId);
}
private ShipperMappingConfigList getList()
{
//noinspection DataFlowIssue
return cache.getOrLoad(0, this::retrieveList);
}
private ShipperMappingConfigList retrieveList()
{
retu... | {
return ShipperMappingConfig.builder()
.id(ShipperMappingConfigId.ofRepoId(record.getM_Shipper_Mapping_Config_ID()))
.shipperId(ShipperId.ofRepoId(record.getM_Shipper_ID()))
.seqNo(SeqNo.ofInt(record.getSeqNo()))
.carrierProductId(CarrierProductId.ofRepoIdOrNull(record.getCarrier_Product_ID()))
.... | repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\mapping\ShipperMappingConfigRepository.java | 1 |
请完成以下Java代码 | public List<HistoricExternalTaskLogDto> queryHistoricExternalTaskLogs(HistoricExternalTaskLogQueryDto queryDto, Integer firstResult, Integer maxResults) {
queryDto.setObjectMapper(objectMapper);
HistoricExternalTaskLogQuery query = queryDto.toQuery(processEngine);
List<HistoricExternalTaskLog> matchingHist... | return queryHistoricExternalTaskLogsCount(queryDto);
}
@Override
public CountResultDto queryHistoricExternalTaskLogsCount(HistoricExternalTaskLogQueryDto queryDto) {
queryDto.setObjectMapper(objectMapper);
HistoricExternalTaskLogQuery query = queryDto.toQuery(processEngine);
long count = query.count... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\impl\history\HistoricExternalTaskLogRestServiceImpl.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class AsyncBatchNotifyRequest
{
@JsonProperty("clientId")
@NonNull
ClientId clientId;
@JsonProperty("asyncBatchId")
@NonNull
Integer asyncBatchId;
@JsonProperty("noOfProcessedWPs")
@NonNull
Integer noOfProcessedWPs;
@JsonProperty("noOfErrorWPs")
@NonNull
Integer noOfErrorWPs;
@JsonProperty("noOf... | @NonNull
Integer noOfEnqueuedWPs;
@JsonCreator
@Builder
public AsyncBatchNotifyRequest(
@JsonProperty("clientId") @NonNull final ClientId clientId,
@JsonProperty("asyncBatchId") @NonNull final Integer asyncBatchId,
@JsonProperty("noOfProcessedWPs") @NonNull final Integer noOfProcessedWPs,
@JsonProperty... | repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\eventbus\AsyncBatchNotifyRequest.java | 2 |
请完成以下Java代码 | private void updatePaymentByIndex(final int paymentIndex, @NonNull final UnaryOperator<POSPayment> updater)
{
final POSPayment payment = paymentIndex >= 0 ? payments.get(paymentIndex) : null;
final POSPayment paymentChanged = updater.apply(payment);
if (paymentIndex >= 0)
{
payments.set(paymentIndex, payme... | public void removePaymentsIf(@NonNull final Predicate<POSPayment> predicate)
{
updateAllPayments(payment -> {
// skip payments marked as DELETED
if (payment.isDeleted())
{
return payment;
}
if (!predicate.test(payment))
{
return payment;
}
if (payment.isAllowDeleteFromDB())
{
... | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSOrder.java | 1 |
请完成以下Java代码 | public CacheInvalidateMultiRequest createRequestOrNull(
@NonNull final ICacheSourceModel model,
@NonNull final ModelCacheInvalidationTiming timing)
{
final String tableName = model.getTableName();
final HashSet<CacheInvalidateRequest> requests = getRequestFactoriesByTableName(tableName, timing)
.stream(... | }
private CacheInvalidateRequest createChildRecordInvalidateUsingRootRecordReference(final ICacheSourceModel model)
{
final TableRecordReference rootRecordReference = model.getRootRecordReferenceOrNull();
if (rootRecordReference == null)
{
return null;
}
final String modelTableName = model.getTableName... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\ModelCacheInvalidationService.java | 1 |
请完成以下Java代码 | public static IncotermsId ofRepoIdOrNull(final int repoId)
{
return repoId > 0 ? new IncotermsId(repoId) : null;
}
public static Optional<IncotermsId> optionalOfRepoId(final int repoId)
{
return Optional.ofNullable(ofRepoIdOrNull(repoId));
}
@JsonCreator
public static IncotermsId ofObject(@NonNull final Ob... | {
return incotermsId != null ? incotermsId.getRepoId() : defaultValue;
}
private IncotermsId(final int repoId)
{
this.repoId = Check.assumeGreaterThanZero(repoId, "C_Incoterms_ID");
}
@JsonValue
public int toJson()
{
return getRepoId();
}
public static boolean equals(@Nullable final IncotermsId o1, @N... | repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\incoterms\IncotermsId.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CreateBOMProductsRouteBuilder extends RouteBuilder
{
@Override
public void configure()
{
from(direct(MF_UPSERT_BOM_V2_CAMEL_URI))
.routeId(MF_UPSERT_BOM_V2_CAMEL_URI)
.streamCache("true")
.process(exchange -> {
final Object request = exchange.getIn().getBody();
if (!(request inst... | exchange.getIn().setHeader(HEADER_ORG_CODE, bomUpsertCamelRequest.getOrgCode());
final JsonBOMCreateRequest jsonBOMCreateRequest = bomUpsertCamelRequest.getJsonBOMCreateRequest();
exchange.getIn().setBody(jsonBOMCreateRequest);
})
.marshal(CamelRouteHelper.setupJacksonDataFormatFor(getContext(), Jso... | repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\core\src\main\java\de\metas\camel\externalsystems\core\to_mf\v2\CreateBOMProductsRouteBuilder.java | 2 |
请完成以下Java代码 | public int getHC_Forum_Datenaustausch_Config_ID()
{
return get_ValueAsInt(COLUMNNAME_HC_Forum_Datenaustausch_Config_ID);
}
/**
* ImportedBPartnerLanguage AD_Reference_ID=327
* Reference name: AD_Language System
*/
public static final int IMPORTEDBPARTNERLANGUAGE_AD_Reference_ID=327;
@Override
public vo... | set_ValueFromPO(COLUMNNAME_ImportedPartientBP_Group_ID, org.compiere.model.I_C_BP_Group.class, ImportedPartientBP_Group);
}
@Override
public void setImportedPartientBP_Group_ID (final int ImportedPartientBP_Group_ID)
{
if (ImportedPartientBP_Group_ID < 1)
set_Value (COLUMNNAME_ImportedPartientBP_Group_ID, nu... | repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_base\src\main\java-gen\de\metas\vertical\healthcare\forum_datenaustausch_ch\commons\model\X_HC_Forum_Datenaustausch_Config.java | 1 |
请完成以下Java代码 | public Message getRawEvent() {
return message;
}
@Override
public String getBody() {
return convertEventToString();
}
@Override
public Map<String, Object> getHeaders() {
if (headers == null) {
headers = retrieveHeaders();
}
return headers;
... | try {
return ((TextMessage) message).getText();
} catch (JMSException e) {
throw new FlowableException("Could not get body information");
}
} else {
return message.toString();
}
}
@Override
public String toString() {
... | repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\jms\JmsMessageInboundEvent.java | 1 |
请完成以下Java代码 | public java.sql.Timestamp getDunningDate ()
{
return (java.sql.Timestamp)get_Value(COLUMNNAME_DunningDate);
}
/** Set Benutze abw. Adresse.
@param IsUseBPartnerAddress Benutze abw. Adresse */
@Override
public void setIsUseBPartnerAddress (boolean IsUseBPartnerAddress)
{
set_Value (COLUMNNAME_IsUseBPartn... | */
@Override
public boolean isProcessed ()
{
Object oo = get_Value(COLUMNNAME_Processed);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Process Now.
@param Processing Process Now */
@Override
publi... | repos\metasfresh-new_dawn_uat\backend\de.metas.dunning\src\main\java-gen\de\metas\dunning\model\X_C_DunningDoc.java | 1 |
请完成以下Java代码 | public Authentication convert(HttpServletRequest request) {
String header = request.getHeader(HttpHeaders.AUTHORIZATION);
if (header == null) {
return null;
}
String[] parts = header.split("\\s");
if (!parts[0].equalsIgnoreCase("Basic")) {
return null;
}
if (parts.length != 2) {
throw new OAuth... | String credentialsString = new String(decodedCredentials, StandardCharsets.UTF_8);
String[] credentials = credentialsString.split(":", 2);
if (credentials.length != 2 || !StringUtils.hasText(credentials[0]) || !StringUtils.hasText(credentials[1])) {
throw new OAuth2AuthenticationException(OAuth2ErrorCodes.INVALI... | repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\web\authentication\ClientSecretBasicAuthenticationConverter.java | 1 |
请完成以下Java代码 | private I_M_Product getProductNotNull(@NonNull final String productSearchKey)
{
final I_M_Product product = searchKey2Product.computeIfAbsent(productSearchKey, this::loadProduct);
if (product == null)
{
throw new AdempiereException("No product could be found for the target search key!")
.appendPar... | return productRepo.retrieveProductByValue(productSearchKey);
}
private OrgId retrieveOrgId(@NonNull final String orgCode)
{
final OrgQuery query = OrgQuery.builder()
.orgValue(orgCode)
.failIfNotExists(true)
.build();
return orgDAO.retrieveOrgIdBy(query).orElseThrow(() -> new AdempiereExcep... | repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\receipt\CustomerReturnRestService.java | 1 |
请完成以下Java代码 | public void setTenantId(String tenantId) {
this.tenantId = tenantId;
}
public String getProcessDefinitionId() {
return processDefinitionId;
}
public String getProcessDefinitionKey() {
return processDefinitionKey;
}
public String getProcessDefinitionName() {
return processDefinitionName;
... | protected CleanableHistoricProcessInstanceReport createNewReportQuery(ProcessEngine engine) {
return engine.getHistoryService().createCleanableHistoricProcessInstanceReport();
}
public static List<CleanableHistoricProcessInstanceReportResultDto> convert(List<CleanableHistoricProcessInstanceReportResult> report... | repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\CleanableHistoricProcessInstanceReportResultDto.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Person {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Column
private String firstname;
@Column
private String surname;
@Column
private int age;
Person() {
}
public Person(final String firstname, final String surname) {
... | public String getFirstname() {
return firstname;
}
public void setFirstname(final String firstname) {
this.firstname = firstname;
}
public String getSurname() {
return surname;
}
public void setSurname(final String surname) {
this.surname = surname;
}
... | repos\tutorials-master\persistence-modules\querydsl\src\main\java\com\baeldung\entity\Person.java | 2 |
请完成以下Java代码 | private void checkInput(@Valid @RequestBody RegisterParam registerParam, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
throw new InvalidRequestException(bindingResult);
}
if (userRepository.findByUsername(registerParam.getUsername()).isPresent()) {
bindi... | return new HashMap<String, Object>() {{
put("user", userWithToken);
}};
}
}
@Getter
@JsonRootName("user")
@NoArgsConstructor
class LoginParam {
@NotBlank(message = "can't be empty")
@Email(message = "should be an email")
private String email;
@NotBlank(message = "can't be empty"... | repos\spring-boot-realworld-example-app-master (1)\src\main\java\io\spring\api\UsersApi.java | 1 |
请完成以下Spring Boot application配置 | spring.datasource.url=jdbc:mysql://localhost:3306/bookstoredb?createDatabaseIfNotExist=true
spring.datasource.username=root
spring.datasource.password=root
spring.jpa.hibernate.ddl-auto=create
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
spring.jpa.open-in-view... | hibernate.engine.transaction.internal.TransactionImpl=DEBUG
logging.level.org.springframework.orm.jpa=DEBUG
logging.level.org.springframework.transaction=DEBUG | repos\Hibernate-SpringBoot-master\HibernateSpringBootTransactionPropagation\HibernateSpringBootTransactionMandatoryAndRollback\src\main\resources\application.properties | 2 |
请完成以下Java代码 | public boolean isParallelMultiple() {
return parallelMultipleAttribute.getValue(this);
}
public void setParallelMultiple(boolean parallelMultiple) {
parallelMultipleAttribute.setValue(this, parallelMultiple);
}
public Collection<DataOutput> getDataOutputs() {
return dataOutputCollection.get(this);... | public OutputSet getOutputSet() {
return outputSetChild.getChild(this);
}
public void setOutputSet(OutputSet outputSet) {
outputSetChild.setChild(this, outputSet);
}
public Collection<EventDefinition> getEventDefinitions() {
return eventDefinitionCollection.get(this);
}
public Collection<Even... | repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\CatchEventImpl.java | 1 |
请完成以下Java代码 | public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
}
/** Set Number of Inventory counts.
@param NoInventoryCount
Frequency of inventory counts per year
*/
public void setNoInventoryCount (int NoInventoryCount)
{
set_Value (COLUMNNAME_NoInventoryCount, Integ... | */
public void setNumberOfRuns (int NumberOfRuns)
{
set_Value (COLUMNNAME_NumberOfRuns, Integer.valueOf(NumberOfRuns));
}
/** Get Number of runs.
@return Frequency of processing Perpetual Inventory
*/
public int getNumberOfRuns ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_NumberOfRuns);
if (ii == ... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PerpetualInv.java | 1 |
请完成以下Java代码 | public int getWindowNo()
{
return getDocument().getWindowNo();
}
@Override
public boolean isRecordCopyingMode()
{
// TODO Auto-generated method stub
return false;
}
@Override
public boolean isRecordCopyingModeIncludingDetails()
{
// TODO Auto-generated method stub
return false;
}
@Override
publ... | public void putContext(final String name, final int value)
{
getDocument().setDynAttribute(name, value);
}
@Override
public boolean getContextAsBoolean(final String name)
{
final Object valueObj = getDocument().getDynAttribute(name);
return DisplayType.toBoolean(valueObj);
}
@Override
public int getCont... | repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\DocumentFieldAsCalloutField.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected DecisionDefinitionEntity loadDecisionDefinition(String decisionDefinitionId) {
ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration();
DeploymentCache deploymentCache = configuration.getDeploymentCache();
DecisionDefinitionEntity decisionDefinition = deploymentCach... | }
@Override
public String getVersionTag() {
return versionTag;
}
public void setVersionTag(String versionTag) {
this.versionTag = versionTag;
}
@Override
public String toString() {
return "DecisionDefinitionEntity{" +
"id='" + id + '\'' +
", name='" + name + '\'' +
", cate... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\dmn\entity\repository\DecisionDefinitionEntity.java | 2 |
请完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(... | public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
} | repos\tutorials-master\web-modules\jakarta-ee\src\main\java\com\baeldung\eclipse\krazo\User.java | 1 |
请完成以下Java代码 | public T execute(CommandContext commandContext) {
if (taskId == null) {
throw new FlowableIllegalArgumentException("taskId is null");
}
ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);
TaskEntity t... | return execute(commandContext, task);
}
/**
* Subclasses must implement in this method their normal command logic. The provided task is ensured to be active.
*/
protected abstract T execute(CommandContext commandContext, TaskEntity task);
/**
* Subclasses can override this method to pro... | repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\cmd\NeedsActiveTaskCmd.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public final void setImportMetadata(AnnotationMetadata importMetadata) {
Map<String, Object> annotationAttributes = importMetadata
.getAnnotationAttributes(EnableGlobalMethodSecurity.class.getName());
this.enableMethodSecurity = AnnotationAttributes.fromMap(annotationAttributes);
}
@Autowired(required = false... | private boolean jsr250Enabled() {
return enableMethodSecurity().getBoolean("jsr250Enabled");
}
private boolean isAspectJ() {
return enableMethodSecurity().getEnum("mode") == AdviceMode.ASPECTJ;
}
private AnnotationAttributes enableMethodSecurity() {
if (this.enableMethodSecurity == null) {
// if it is nu... | repos\spring-security-main\config\src\main\java\org\springframework\security\config\annotation\method\configuration\GlobalMethodSecurityConfiguration.java | 2 |
请完成以下Java代码 | public T deserialize(String topic, byte[] data) {
return deserialize(topic, null, data);
}
@Override
public T deserialize(String topic, @Nullable Headers headers, byte[] data) {
return this.parser.apply(data == null ? null : new String(data, this.charset), headers);
}
@Override
public T deserialize(String t... | * Set a charset to use when converting byte[] to {@link String}. Default UTF-8.
* @param charset the charset.
*/
public void setCharset(Charset charset) {
Assert.notNull(charset, "'charset' cannot be null");
this.charset = charset;
}
/**
* Get the configured charset.
* @return the charset.
*/
public... | repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\ParseStringDeserializer.java | 1 |
请在Spring Boot框架中完成以下Java代码 | protected void validateIdentityLinkArguments(String family, String identityId) {
if (family == null || (!RestUrls.SEGMENT_IDENTITYLINKS_FAMILY_GROUPS.equals(family) && !RestUrls.SEGMENT_IDENTITYLINKS_FAMILY_USERS.equals(family))) {
throw new FlowableIllegalArgumentException("Identity link family sho... | for (IdentityLink link : allLinks) {
boolean rightIdentity = false;
if (isUser) {
rightIdentity = identityId.equals(link.getUserId());
} else {
rightIdentity = identityId.equals(link.getGroupId());
}
if (rightIdentity && link.g... | repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\repository\ProcessDefinitionIdentityLinkResource.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class AcquireExternalWorkerJobRequest {
@ApiModelProperty(value = "Acquire jobs with the given topic", example = "order", required = true)
protected String topic;
@ApiModelProperty(
value = "The acquired jobs will be locked with this lock duration. ISO-8601 duration format PnDTnHnMn.nS ... | }
public void setNumberOfRetries(int numberOfRetries) {
this.numberOfRetries = numberOfRetries;
}
public String getWorkerId() {
return workerId;
}
public void setWorkerId(String workerId) {
this.workerId = workerId;
}
public String getScopeType() {
return ... | repos\flowable-engine-main\modules\flowable-external-job-rest\src\main\java\org\flowable\external\job\rest\service\api\acquire\AcquireExternalWorkerJobRequest.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class Book {
@Id
private String name;
private String author;
// Default constructor for JPA deserialization
public Book() {
}
public Book(String name, String author) {
this.name = name;
this.author = author;
} | public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
} | repos\tutorials-master\spring-boot-modules\spring-boot-crud\src\main\java\com\baeldung\entitydtodifferences\entity\Book.java | 2 |
请完成以下Java代码 | private boolean checkIpAddress(List<String> expectedList, List<String> serverList) {
if (expectedList != null && expectedList.size() > 0) {
if (serverList != null && serverList.size() > 0) {
for (String expected : expectedList) {
if (serverList.contains(expected.t... | * <p>方法描述: 校验当前服务器硬件(主板、CPU 等)序列号是否在可允许范围内 </p>
* <p>创建时间: 2020/10/10 13:18 </p>
*
* @param expectedSerial expectedSerial
* @param serverSerial serverSerial
* @return boolean
* @author 方瑞冬
* @version 1.0
*/
private boolean checkSerial(String expectedSerial, String serverSer... | repos\springboot-demo-master\SoftwareLicense\src\main\java\com\et\license\license\CustomLicenseManager.java | 1 |
请完成以下Java代码 | public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public List<Author> getAuthors() {
return authors;
} | public void setAuthors(List<Author> authors) {
this.authors = authors;
}
public String[] getTags() {
return tags;
}
public void setTags(String... tags) {
this.tags = tags;
}
@Override
public String toString() {
return "Article{" + "id='" + id + '\'' + ", ti... | repos\tutorials-master\persistence-modules\spring-data-elasticsearch\src\main\java\com\baeldung\spring\data\es\model\Article.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class CodeGenController {
private final CodeGenService codeGenService;
/**
* 列表
*
* @param request 参数集
* @return 数据库表
*/
@GetMapping("/table")
public R listTables(TableRequest request) {
return R.success(codeGenService.listTables(request));
}
/** | * 生成代码
*/
@SneakyThrows
@PostMapping("")
public void generatorCode(@RequestBody GenConfig genConfig, HttpServletResponse response) {
byte[] data = codeGenService.generatorCode(genConfig);
response.reset();
response.setHeader(HttpHeaders.CONTENT_DISPOSITION, String.format("attac... | repos\spring-boot-demo-master\demo-codegen\src\main\java\com\xkcoding\codegen\controller\CodeGenController.java | 2 |
请在Spring Boot框架中完成以下Java代码 | public class POSOrderLine
{
@NonNull String externalId;
@NonNull ProductId productId;
@NonNull String productName;
@Nullable String scannedBarcode;
@NonNull TaxCategoryId taxCategoryId;
@NonNull TaxId taxId;
@NonNull Quantity qty;
@Nullable Quantity catchWeight;
@NonNull Money price;
@NonNull Money amount;
... | this.externalId = externalId;
this.productId = productId;
this.productName = productName;
this.scannedBarcode = StringUtils.trimBlankToNull(scannedBarcode);
this.taxCategoryId = taxCategoryId;
this.taxId = taxId;
this.qty = qty;
this.catchWeight = catchWeight;
this.price = price;
this.amount = amount;... | repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSOrderLine.java | 2 |
请完成以下Java代码 | public boolean hasVariables() {
return false;
}
public boolean hasVariablesLocal() {
return false;
}
public boolean hasVariable(String variableName) {
return false;
}
public boolean hasVariableLocal(String variableName) {
return false;
}
public void removeVariable(String variableName... | throw new UnsupportedOperationException("No execution active, no variables can be removed");
}
public void removeVariablesLocal(Collection<String> variableNames) {
throw new UnsupportedOperationException("No execution active, no variables can be removed");
}
public Map<String, CoreVariableInstance> getVar... | repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\el\StartProcessVariableScope.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public class Person {
@Id
private int id;
private String firstName;
private String lastName;
@OneToOne(mappedBy = "person")
private Address address;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getFirstName() ... | this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address... | repos\tutorials-master\persistence-modules\hibernate-annotations-2\src\main\java\com\baeldung\hibernate\mapsid\Person.java | 2 |
请完成以下Java代码 | public class BearerTokenServerAccessDeniedHandler implements ServerAccessDeniedHandler {
private static final Collection<String> WELL_KNOWN_SCOPE_ATTRIBUTE_NAMES = Arrays.asList("scope", "scp");
private String realmName;
@Override
public Mono<Void> handle(ServerWebExchange exchange, AccessDeniedException denied)... | return exchange.getResponse().setComplete();
}
private static String computeWWWAuthenticateHeaderValue(Map<String, String> parameters) {
StringBuilder wwwAuthenticate = new StringBuilder();
wwwAuthenticate.append("Bearer");
if (!parameters.isEmpty()) {
wwwAuthenticate.append(" ");
int i = 0;
for (Map.... | repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\web\access\server\BearerTokenServerAccessDeniedHandler.java | 1 |
请在Spring Boot框架中完成以下Java代码 | public boolean isAllowTrailingComma() {
return this.allowTrailingComma;
}
public void setAllowTrailingComma(boolean allowTrailingComma) {
this.allowTrailingComma = allowTrailingComma;
}
public boolean isAllowComments() {
return this.allowComments;
}
public void setAllowComments(boolean allowComments) {
... | * {@link kotlinx.serialization.json.JsonNamingStrategy} implementations that cannot
* be directly referenced.
*/
public enum JsonNamingStrategy {
/**
* Snake case strategy.
*/
SNAKE_CASE,
/**
* Kebab case strategy.
*/
KEBAB_CASE
}
} | repos\spring-boot-4.0.1\module\spring-boot-kotlinx-serialization-json\src\main\java\org\springframework\boot\kotlinx\serialization\json\autoconfigure\KotlinxSerializationJsonProperties.java | 2 |
请完成以下Java代码 | public static void main(String[] args) {
// Seed for HMAC-SHA1 - 20 bytes
String seed = "3132333435363738393031323334353637383930";
// Seed for HMAC-SHA256 - 32 bytes
String seed32 = "3132333435363738393031323334353637383930" +
"313233343536373839303132";
// Seed ... | logger.info("| " + fmtTime + " | " + utcTime +
" | " + steps + " |");
logger.info(generateTOTP(seed, steps, "8",
"HmacSHA1") + "| SHA1 |");
logger.info("| " + fmtTime + " | " + utcTime +
" | " + steps + " |... | repos\springboot-demo-master\MFA\src\main\java\com\et\mfa\domain\TOTP.java | 1 |
请完成以下Java代码 | /* package */void setColumnName(final String columnName)
{
this.columnName = columnName;
}
/**
* Get Info Name
*
* @return Info Name
*/
public String getInfoName()
{
return infoName;
} // getInfoName
public Operator getOperator()
{
return operator;
}
/**
* Get Info Operator
*
* @return ... | {
if (infoDisplayTo == null)
{
return infoDisplay;
}
StringBuilder sb = new StringBuilder(infoDisplay);
sb.append(" - ").append(infoDisplayTo);
return sb.toString();
} // getInfoDisplay
public Object getCode()
{
return code;
}
public String getInfoDisplay()
{
return infoDisplay;
}
public O... | repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MQuery.java | 1 |
请完成以下Java代码 | protected String doIt() throws Exception
{
final IExternalSystemChildConfigId externalSystemChildConfigId = getExternalSystemChildConfigId();
addLog("Calling with params: externalSystemChildConfigId: {}", externalSystemChildConfigId);
final Iterator<I_S_ExternalReference> externalRefIterator = getSelectedExter... | @NonNull
private Iterator<I_S_ExternalReference> getSelectedExternalReferenceRecords()
{
final IQueryBuilder<I_S_ExternalReference> externalReferenceQuery = retrieveSelectedRecordsQueryBuilder(I_S_ExternalReference.class);
return externalReferenceQuery
.create()
.iterate(I_S_ExternalReference.class);
}
... | repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\export\externalreference\S_ExternalReference_SyncTo_ExternalSystem.java | 1 |
请完成以下Java代码 | public void validateUOM(final I_M_ProductPrice productPrice)
{
if (productPrice.getM_Product_ID() <= 0)
{
return; // nothing to do yet
}
final UomId uomId = UomId.ofRepoId(productPrice.getC_UOM_ID());
if (uomDAO.isUOMForTUs(uomId))
{
validateTuUom(productPrice);
productPrice.setIsHUPrice(true);
... | .markAsUserValidationError();
}
}
private void validatePriceUOM(@NonNull final I_M_ProductPrice productPrice)
{
final UomId productPriceUOMId = UomId.ofRepoId(productPrice.getC_UOM_ID());
final UOMConversionsMap uomConversionsMap = uomConversionDAO.getProductConversions(ProductId.ofRepoId(productPrice.getM_P... | repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\model\validator\M_ProductPrice.java | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.