instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void setMSV3_FaultInfo_ID (int MSV3_FaultInfo_ID) { if (MSV3_FaultInfo_ID < 1) set_ValueNoCheck (COLUMNNAME_MSV3_FaultInfo_ID, null); else set_ValueNoCheck (COLUMNNAME_MSV3_FaultInfo_ID, Integer.valueOf(MSV3_FaultInfo_ID)); } /** Get MSV3_FaultInfo. @return MSV3_FaultInfo */ @Override publi...
public static final String MSV3_FAULTINFOTYPE_ValidationFaultInfo = "ValidationFaultInfo"; /** Set FaultInfoType. @param MSV3_FaultInfoType FaultInfoType */ @Override public void setMSV3_FaultInfoType (java.lang.String MSV3_FaultInfoType) { set_Value (COLUMNNAME_MSV3_FaultInfoType, MSV3_FaultInfoType); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_FaultInfo.java
1
请完成以下Java代码
public class StringToNumericModifier implements IQueryFilterModifier { @Override public @NonNull String getColumnSql(@NonNull final String columnName) { return " cast_to_numeric_or_null (" + columnName + ") " ; } @Override public String getValueSql(final Object value, final List<Object> params) { if (value ...
params.add(value); return "?"; } @Nullable @Override public Object convertValue(@Nullable final String columnName, @Nullable final Object value, @Nullable final Object model) { if (value == null) { return null; } return NumberUtils.asBigDecimal(value); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\dao\impl\StringToNumericModifier.java
1
请完成以下Java代码
public CaseSentryPartQueryImpl sourceCaseExecutionId(String sourceCaseExecutionId) { ensureNotNull(NotValidException.class, "sourceCaseExecutionId", sourceCaseExecutionId); this.sourceCaseExecutionId = sourceCaseExecutionId; return this; } public CaseSentryPartQueryImpl standardEvent(String standardEve...
.findCaseSentryPartCountByQueryCriteria(this); } public List<CaseSentryPartEntity> executeList(CommandContext commandContext, Page page) { checkQueryOk(); List<CaseSentryPartEntity> result = commandContext .getCaseSentryPartManager() .findCaseSentryPartByQueryCriteria(this, page); return r...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\entity\runtime\CaseSentryPartQueryImpl.java
1
请完成以下Java代码
public Garnishment1 getGrnshmtRmt() { return grnshmtRmt; } /** * Sets the value of the grnshmtRmt property. * * @param value * allowed object is * {@link Garnishment1 } * */ public void setGrnshmtRmt(Garnishment1 value) { this.grnshmtRmt = va...
* <pre> * getAddtlRmtInf().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link String } * * */ public List<String> getAddtlRmtInf() { if (addtlRmtInf == null) { addtlRmtInf = new ArrayList<S...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.esr\src\main\java-xjc_camt054_001_06\de\metas\payment\camt054_001_06\StructuredRemittanceInformation13.java
1
请完成以下Java代码
default ProjectDescription createCopy() { throw new UnsupportedOperationException(); } /** * Return an immutable mapping of requested {@link Dependency dependencies}. * @return the requested dependencies */ Map<String, Dependency> getRequestedDependencies(); /** * Return the requested platform {@link Ve...
String getName(); /** * Return a human-readable description of the project. * @return the description of the project or {@code null} */ String getDescription(); /** * Return the name of the application as a standard Java identifier. * @return the name of the application or {@code null} */ String getAp...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\project\ProjectDescription.java
1
请完成以下Java代码
private Map<String, List<PropertyMigration>> getContent( Function<LegacyProperties, List<PropertyMigration>> extractor) { return this.content.entrySet() .stream() .filter((entry) -> !extractor.apply(entry.getValue()).isEmpty()) .collect( Collectors.toMap(Map.Entry::getKey, (entry) -> new ArrayList<>(...
void add(String name, List<PropertyMigration> properties) { this.content.put(name, new LegacyProperties(properties)); } private static class LegacyProperties { private final List<PropertyMigration> properties; LegacyProperties(List<PropertyMigration> properties) { this.properties = new ArrayList<>(propert...
repos\spring-boot-4.0.1\core\spring-boot-properties-migrator\src\main\java\org\springframework\boot\context\properties\migrator\PropertiesMigrationReport.java
1
请在Spring Boot框架中完成以下Java代码
public class DpdClientLogEvent { /** * Regexp explanation: .*? means ungreedy (while .* means greedy). */ private static final String PARCELLABELS_PDF_REGEX = "(?m)<parcellabelsPDF>(.*?\\s*?)</parcellabelsPDF>"; private static final String PARCELLABELS_PDF_REPLACEMENT_TEXT = "<parcellabelsPDF>PDF TEXT REMOVED!</...
{ return elementToString(responseElement); } @Nullable private String elementToString(@Nullable final Object element) { if (element == null) { return null; } try { final StringResult result = new StringResult(); marshaller.marshal(element, result); return cleanupPdfData(result.toString())...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dpd\src\main\java\de\metas\shipper\gateway\dpd\logger\DpdClientLogEvent.java
2
请完成以下Java代码
protected POInfo initPO (Properties ctx) { POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); return poi; } public String toString() { StringBuffer sb = new StringBuffer ("X_C_BankStatementMatcher[") .append(get_ID()).append("]"); return sb.toString(); } ...
} /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Re...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.base\src\main\java-gen\org\compiere\model\X_C_BankStatementMatcher.java
1
请完成以下Java代码
public int getRemovalTimeUpdateChunkSize() { return removalTimeUpdateChunkSize; } public ProcessEngineConfigurationImpl setRemovalTimeUpdateChunkSize(int removalTimeUpdateChunkSize) { this.removalTimeUpdateChunkSize = removalTimeUpdateChunkSize; return this; } /** * @return a exception code int...
public ProcessEngineConfiguration setDiagnosticsRegistry(DiagnosticsRegistry diagnosticsRegistry) { this.diagnosticsRegistry = diagnosticsRegistry; return this; } public boolean isLegacyJobRetryBehaviorEnabled() { return legacyJobRetryBehaviorEnabled; } public ProcessEngineConfiguration setLegac...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cfg\ProcessEngineConfigurationImpl.java
1
请完成以下Java代码
public int getC_BP_Group_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_BP_Group_ID); if (ii == null) return 0; return ii.intValue(); } /** Set CS Creditpass business partner group. @param CS_Creditpass_BP_Group_ID CS Creditpass business partner group */ @Override public void setCS_Creditpass...
{ return get_ValueAsPO(COLUMNNAME_CS_Creditpass_Config_ID, de.metas.vertical.creditscore.creditpass.model.I_CS_Creditpass_Config.class); } @Override public void setCS_Creditpass_Config(de.metas.vertical.creditscore.creditpass.model.I_CS_Creditpass_Config CS_Creditpass_Config) { set_ValueFromPO(COLUMNNAME_CS_Cr...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.creditscore\creditpass\src\main\java-gen\de\metas\vertical\creditscore\creditpass\model\X_CS_Creditpass_BP_Group.java
1
请完成以下Java代码
public void handleBpmnError(String externalTaskId, String workerId, String errorCode, String errorMessage, Map<String, Object> variables) { commandExecutor.execute(new HandleExternalTaskBpmnErrorCmd(externalTaskId, workerId, errorCode, errorMessage, variables)); } @Override public void unlock(String external...
public void setRetries(String externalTaskId, int retries) { setRetries(externalTaskId, retries, true); } @Override public void setRetries(List<String> externalTaskIds, int retries) { updateRetries() .externalTaskIds(externalTaskIds) .set(retries); } @Override public Batch setRetriesAs...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\ExternalTaskServiceImpl.java
1
请完成以下Java代码
public abstract class BpmnModelElementInstanceImpl extends ModelElementInstanceImpl implements BpmnModelElementInstance { public BpmnModelElementInstanceImpl(ModelTypeInstanceContext instanceContext) { super(instanceContext); } @SuppressWarnings("rawtypes") public AbstractBaseElementBuilder builder() { ...
public BpmnModelElementInstance getScope() { BpmnModelElementInstance parentElement = (BpmnModelElementInstance) getParentElement(); if (parentElement != null) { if (parentElement.isScope()) { return parentElement; } else { return parentElement.getScope(); } } els...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\BpmnModelElementInstanceImpl.java
1
请在Spring Boot框架中完成以下Java代码
public Map<String, String> getTaxiOrderStatus(Long orderId, Retailer retailer) throws ParseException { Gson gson = new Gson(); Map<String, String> resultMap = new HashMap<>(); OrderState orderState = null; DriverInfo driverInfo = null; String request = "order_id=" + orderId; ...
List<Phone> phoneList = driverInfo.getData().getPhones().stream().filter(Phone::getUseForCall).collect(Collectors.toList()); if (phoneList.size() > 0) resultMap.put("phones", phoneList.get(0).getPhone()); else result...
repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-2.SpringBoot-React-ShoppingMall\fullstack\backend\src\main\java\com\urunov\service\taxiMaster\TaxiOrderProcess.java
2
请在Spring Boot框架中完成以下Java代码
public class C_AllocationHdr { private final IInvoiceBL invoiceBL = Services.get(IInvoiceBL.class); private final IAllocationDAO allocationDAO = Services.get(IAllocationDAO.class); private final ITrxManager trxManager = Services.get(ITrxManager.class); /** * Updates C_Invoice.IsPaid on all referenced invoices ea...
private void testInvoiceAllocation0(@NonNull final PaymentAllocationId allocationId) { final I_C_AllocationHdr allocationHdrRecord = allocationDAO.getById(allocationId); final List<I_C_AllocationLine> allocationLineRecords = allocationDAO.retrieveLines(allocationHdrRecord); for (final I_C_AllocationLine allocati...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\interceptor\C_AllocationHdr.java
2
请完成以下Java代码
private static GlobalQRCode getScannedQRCode(final @NonNull WFProcess wfProcess, final @NonNull WFActivity wfActivity) { final ManufacturingJob job = ManufacturingMobileApplication.getManufacturingJob(wfProcess); final ManufacturingJobActivityId jobActivityId = wfActivity.getId().getAsId(ManufacturingJobActivityId...
} if (!LocatorQRCode.isTypeMatching(qrCode)) { throw new AdempiereException(QR_CODE_INVALID_TYPE_ERR_MSG); } final LocatorId scannedLocatorId = LocatorQRCode.ofGlobalQRCode(qrCode).getLocatorId(); if (!validateLocatorInfo.isLocatorIdValid(scannedLocatorId)) { throw new AdempiereException(QR_CODE_DO...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\validateLocator\ValidateLocatorActivityHandler.java
1
请在Spring Boot框架中完成以下Java代码
public String getMinAmount() { return minAmount; } public void setMinAmount(String minAmount) { this.minAmount = minAmount; } public String getMaxAmount() { return maxAmount; } public void setMaxAmount(String maxAmount) { this.maxAmount = maxAmount; } public String getBeginTime() { return beginTim...
BusCategoryEnum[] ary = BusCategoryEnum.values(); Map<String, Map<String, Object>> enumMap = new HashMap<String, Map<String, Object>>(); for (int num = 0; num < ary.length; num++) { Map<String, Object> map = new HashMap<String, Object>(); String key = ary[num].name(); map.put("desc", ary[num].getDesc()); ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\enums\BusCategoryEnum.java
2
请完成以下Java代码
public SqlAndParams getSqlValuesCommaSeparated() { final SqlAndParams.Builder sqlBuilder = SqlAndParams.builder(); for (final String keyColumnName : keyColumnNames) { final Object value = getValue(keyColumnName); if (!sqlBuilder.isEmpty()) { sqlBuilder.append(", "); } sqlBuilder.append("?", v...
sql.append(" AND "); } sql.append(tableAlias).append(".").append(keyFieldName); if (!JSONNullValue.isNull(idPart)) { sql.append("=").append(DB.TO_SQL(idPart)); } else { sql.append(" IS NULL"); } } return sql.toString(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\sql\SqlComposedKey.java
1
请完成以下Java代码
public class DBRes_in extends ListResourceBundle { /** Data */ static final Object[][] contents = new String[][]{ { "CConnectionDialog", "Koneksi Ke Server" }, { "Name", "Nama" }, { "AppsHost", "Pusat Aplikasi" }, { "AppsPort", "Port Aplikasi" }, { "TestApps", "Uji Server Aplikasi" }, { "DB...
{ "LAN", "LAN" }, { "TerminalServer", "Terminal Server" }, { "VPN", "VPN" }, { "WAN", "WAN" }, { "ConnectionError", "Kesalahan Koneksi" }, { "ServerNotActive", "Server tidak aktif" } }; /** * Get Contsnts * @return contents */ public Object[][] getContents() { return contents; } // ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\db\connectiondialog\i18n\DBRes_in.java
1
请完成以下Java代码
public HitPolicy getHitPolicy() { return hitPolicyAttribute.getValue(this); } public void setHitPolicy(HitPolicy hitPolicy) { hitPolicyAttribute.setValue(this, hitPolicy); } public BuiltinAggregator getAggregation() { return aggregationAttribute.getValue(this); } public void setAggregation(Bu...
hitPolicyAttribute = typeBuilder.namedEnumAttribute(DMN_ATTRIBUTE_HIT_POLICY, HitPolicy.class) .defaultValue(HitPolicy.UNIQUE) .build(); aggregationAttribute = typeBuilder.enumAttribute(DMN_ATTRIBUTE_AGGREGATION, BuiltinAggregator.class) .build(); preferredOrientationAttribute = typeBuilder....
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\DecisionTableImpl.java
1
请完成以下Java代码
public void setDn(String dn) { this.instance.dn = dn; } public void setDn(Name dn) { this.instance.dn = dn.toString(); } public void setEnabled(boolean enabled) { this.instance.enabled = enabled; } public void setPassword(String password) { this.instance.password = password; }
public void setUsername(String username) { this.instance.username = username; } public void setTimeBeforeExpiration(int timeBeforeExpiration) { this.instance.timeBeforeExpiration = timeBeforeExpiration; } public void setGraceLoginsRemaining(int graceLoginsRemaining) { this.instance.graceLoginsRemaini...
repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\userdetails\LdapUserDetailsImpl.java
1
请完成以下Java代码
public void logTaskWithoutExecution(String taskId) { logDebug("108", "Execution of external task {} is null. This indicates that the task was concurrently completed or deleted. " + "It is not returned by the current fetch and lock command.", taskId); } public ProcessEngineException multipleTe...
cause = cause.getCause(); } while (cause != null); return sqlExceptionList; } public static String collectExceptionMessages(Throwable cause) { StringBuilder message = new StringBuilder(cause.getMessage()); //collect real SQL exception messages in case of batch processing Throwable exCause = ca...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\EnginePersistenceLogger.java
1
请完成以下Java代码
public void deleteTenant() { ensureNotReadOnly(); identityService.deleteTenant(resourceId); } public ResourceOptionsDto availableOperations(UriInfo context) { ResourceOptionsDto dto = new ResourceOptionsDto(); // add links if operations are authorized URI uri = context.getBaseUriBuilder() ...
} public TenantGroupMembersResource getTenantGroupMembersResource() { return new TenantGroupMembersResourceImpl(getProcessEngine().getName(), resourceId, rootResourcePath, getObjectMapper()); } protected Tenant findTenantObject() { try { return identityService.createTenantQuery() .tenant...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\identity\impl\TenantResourceImpl.java
1
请完成以下Java代码
public void setLdapCacheListener(LDAPGroupCacheListener ldapCacheListener) { this.ldapCacheListener = ldapCacheListener; } // Helper classes //////////////////////////////////// static class LDAPGroupCacheEntry { protected Date timestamp; protected List<Group> groups; pub...
return groups; } public void setGroups(List<Group> groups) { this.groups = groups; } } // Cache listeners. Currently not yet exposed (only programmatically for the // moment) // Experimental stuff! public static interface LDAPGroupCacheListener { voi...
repos\flowable-engine-main\modules\flowable-ldap\src\main\java\org\flowable\ldap\LDAPGroupCache.java
1
请完成以下Java代码
public String getPropertyKeyWithValue(int lineNumber) throws IOException { List<String> fileLines = getFileLines(); // depending on the system, sometimes the first line will be a comment with a timestamp of the file read // the next line will make this method compatible with all systems ...
} Files.write(propertiesFile.toPath(), fileContent, StandardCharsets.UTF_8); // depending on the system, sometimes the first line will be a comment with a timestamp of the file read // the next line will make this method compatible with all systems if (fileContent.get(0).startsWith("#")...
repos\tutorials-master\core-java-modules\core-java-properties\src\main\java\com\baeldung\core\java\properties\FileAPIPropertyMutator.java
1
请在Spring Boot框架中完成以下Java代码
public Map<String, Object> startDepositWorkflow(DepositDetail depositDetail) { StartWorkflowRequest request = new StartWorkflowRequest(); request.setName("microservice_orchestration"); Map<String, Object> inputData = new HashMap<>(); inputData.put("amount", depositDetail.getAmount()); ...
request.setName("microservice_orchestration"); request.setVersion(1); Map<String, Object> inputData = new HashMap<>(); inputData.put("amount", depositDetail.getAmount()); inputData.put("accountId", depositDetail.getAccountId()); request.setInput(inputData); CompletableFu...
repos\tutorials-master\microservices-modules\event-driven-microservice\src\main\java\io\orkes\demo\banking\service\WorkflowService.java
2
请在Spring Boot框架中完成以下Java代码
public class SqlComponentDescriptorInsertRepository extends AbstractComponentDescriptorInsertRepository { private static final String ID = "id = :id"; private static final String CLAZZ_CLAZZ = "clazz = :clazz"; private static final String P_KEY_CONFLICT_STATEMENT = "(id)"; private static final String ...
return saveAndGet(entity, INSERT_OR_UPDATE_ON_P_KEY_CONFLICT, INSERT_OR_UPDATE_ON_UNQ_KEY_CONFLICT); } @Override protected ComponentDescriptorEntity doProcessSaveOrUpdate(ComponentDescriptorEntity entity, String query) { return (ComponentDescriptorEntity) getQuery(entity, query).getSingleResult(); ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\component\SqlComponentDescriptorInsertRepository.java
2
请完成以下Spring Boot application配置
# SSL server.port=8443 server.ssl.key-store=src/main/resources/securePC.p12 server.ssl.key-store-password=123456 # PKCS12 server.ssl.key-store-type=pkcs12 # server
.ssl.key-alias=securePC # Spring Security # security.require-ssl=true
repos\SpringBoot-Projects-FullStack-master\Part-6 Spring Boot Security\6. SpringSecureSSLHttps\src\main\resources\application.properties
2
请完成以下Java代码
public void setM_Product_ID (int M_Product_ID) { if (M_Product_ID < 1) set_ValueNoCheck (COLUMNNAME_M_Product_ID, null); else set_ValueNoCheck (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID)); } /** Get Product. @return Product, Service, Item */ public int getM_Product_ID () { Integer ...
{ set_Value (COLUMNNAME_PriceList, PriceList); } /** Get List Price. @return List Price */ public BigDecimal getPriceList () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_PriceList); if (bd == null) return Env.ZERO; return bd; } /** Set Standard Price. @param PriceStd Standard Price ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_ProductPriceVendorBreak.java
1
请完成以下Java代码
public PickingBOMsReversedIndex getPickingBOMsReversedIndex() { return pickingBOMsReversedIndexCache.getOrLoad(0, this::retrievePickingBOMsReversedIndex); } private PickingBOMsReversedIndex retrievePickingBOMsReversedIndex() { final Set<ProductBOMVersionsId> pickingBOMVersionsIds = productPlanningsRepo.retriev...
final ProductId componentId = ProductId.ofRepoId(bomLine.getM_Product_ID()); final ProductBOMId bomId = ProductBOMId.ofRepoId(bomLine.getPP_Product_BOM_ID()); final I_PP_Product_BOM bom = bomsById.get(bomId); final ProductId bomProductId = ProductId.ofRepoId(bom.getM_Product_ID()); bomProductIdsByComponentI...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\inoutcandidate\picking_bom\PickingBOMService.java
1
请完成以下Java代码
public java.lang.String getPassword () { return (java.lang.String)get_Value(COLUMNNAME_Password); } /** Set Port. @param Port Port */ @Override public void setPort (int Port) { set_Value (COLUMNNAME_Port, Integer.valueOf(Port)); } /** Get Port. @return Port */ @Override public int getPort () ...
if (R_RequestType_ID < 1) set_Value (COLUMNNAME_R_RequestType_ID, null); else set_Value (COLUMNNAME_R_RequestType_ID, Integer.valueOf(R_RequestType_ID)); } /** Get Request Type. @return Type of request (e.g. Inquiry, Complaint, ..) */ @Override public int getR_RequestType_ID () { Integer ii = (I...
repos\metasfresh-new_dawn_uat\backend\de.metas.inbound.mail\src\main\java-gen\de\metas\inbound\mail\model\X_C_InboundMailConfig.java
1
请完成以下Java代码
private static KPIField extractOpenTargetField(final List<KPIField> fields, @Nullable final KPIField... excludeFields) { final List<KPIField> remainingFields = excludeFields(fields, excludeFields); for (final KPIField field : remainingFields) { final String fieldName = field.getFieldName(); if ("Target".e...
final KPIDataSetValuesMap.KPIDataSetValuesMapBuilder resultEntry = data .dataSet("URLs") .dataSetValue(KPIDataSetValuesAggregationKey.of(url)) .put("url", url); loadField(resultEntry, rs, "caption", captionField); loadField(resultEntry, rs, "target", openTargetField); } public static void loadField(...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\kpi\data\sql\URLsSQLRowLoader.java
1
请完成以下Java代码
public class CommonSuffixExtractor { TFDictionary tfDictionary; public CommonSuffixExtractor() { tfDictionary = new TFDictionary(); } public void add(String key) { tfDictionary.add(key); } public List<String> extractSuffixExtended(int length, int size) { re...
List<String> suffixList = new ArrayList<String>(size); for (TermFrequency termFrequency : suffixTreeSet.values()) { if (suffixList.size() >= size) break; suffixList.add(termFrequency.getKey()); } return suffixList; } /** * 此方法认为后缀一定是整个的词语,所以length是以...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\dictionary\CommonSuffixExtractor.java
1
请完成以下Java代码
public class FlowableElContext extends ELContext { protected ELResolver elResolver; protected FlowableFunctionResolver functionResolver; protected ExpressionFactory expressionFactory; public FlowableElContext(ELResolver elResolver, FlowableFunctionResolver functionResolver, ExpressionFactory expressio...
@Override public FunctionMapper getFunctionMapper() { return new FlowableFunctionMapper(functionResolver); } @Override public VariableMapper getVariableMapper() { return null; } @Override protected ExpressionFactory getDefaultExpressionFactory() { return expressionF...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\el\FlowableElContext.java
1
请完成以下Java代码
public int getW_Inventory_Acct () { Integer ii = (Integer)get_Value(COLUMNNAME_W_Inventory_Acct); if (ii == null) return 0; return ii.intValue(); } public I_C_ValidCombination getW_Revaluation_A() throws RuntimeException { return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Table...
*/ public void setW_Revaluation_Acct (int W_Revaluation_Acct) { set_Value (COLUMNNAME_W_Revaluation_Acct, Integer.valueOf(W_Revaluation_Acct)); } /** Get Inventory Revaluation. @return Account for Inventory Revaluation */ public int getW_Revaluation_Acct () { Integer ii = (Integer)get_Value(COLUMNNAME_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Warehouse_Acct.java
1
请完成以下Java代码
private static GLCategory fromRecord(@NonNull final I_GL_Category record) { return GLCategory.builder() .id(GLCategoryId.ofRepoId(record.getGL_Category_ID())) .name(record.getName()) .categoryType(GLCategoryType.ofCode(record.getCategoryType())) .isDefault(record.isDefault()) .clientId(ClientId.o...
public Optional<GLCategoryId> getByCategoryType(@NonNull final GLCategoryType categoryType) { final GLCategory category = byCategoryType.get(categoryType); if (category != null) { return Optional.of(category.getId()); } return getDefaultId(); } public Optional<GLCategoryId> getDefaultId() {...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\GLCategoryRepository.java
1
请完成以下Java代码
private void createDirectories(@NonNull final Path path) { try { Files.createDirectories(path); } catch (final IOException e) { throw new AdempiereException("IOException trying to create output directory", e) .setParameter("path", path); } } private ImmutableMultimap<Path, PrintingSegment> ex...
{ final HardwareTray tray = printer.getTray(segment.getTrayId()); path = Paths.get(baseDirectory, FileUtil.stripIllegalCharacters(printer.getName()), FileUtil.stripIllegalCharacters(tray.getTrayNumber() + "-" + tray.getName())); } else { path = Paths.get(baseDirectory, FileUtil.st...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\printingdata\PrintingDataToPDFFileStorer.java
1
请完成以下Java代码
public String getKey() { return key; } public void setKey(String key) { this.key = key; } public Object getVal() { return val; } public void setVal(Object val) { this.val = val; } public long getTimeoutTi...
*/ public static Object get(String key){ if (key==null || key.trim().length()==0) { return null; } LocalCacheData localCacheData = cacheRepository.get(key); if (localCacheData!=null && System.currentTimeMillis()<localCacheData.getTimeoutTime()) { return localC...
repos\JeecgBoot-main\jeecg-boot\jeecg-server-cloud\jeecg-visual\jeecg-cloud-xxljob\src\main\java\com\xxl\job\admin\core\util\LocalCacheUtil.java
1
请完成以下Java代码
public Optional<String> getIsbn() { return Optional.ofNullable(isbn); } public void setIsbn(String isbn) { this.isbn = isbn; } public Optional<Author> getAuthor() { return Optional.ofNullable(author); } public void setAuthor(Author author) { this.author = autho...
if (!(obj instanceof Book)) { return false; } return id != null && id.equals(((Book) obj).id); } @Override public int hashCode() { return 2021; } @Override public String toString() { return "Book{" + "id=" + id + ", title=" + title + ", isbn=" + isbn...
repos\Hibernate-SpringBoot-master\HibernateSpringBootOptional\src\main\java\com\bookstore\entity\Book.java
1
请完成以下Java代码
public class WatchPods { private static Logger log = LoggerFactory.getLogger(WatchPods.class); public static void main(String[] args) throws Exception { ApiClient client = Config.defaultClient(); // Optional, put helpful during tests: disable client timeout and enable // HTTP wire-le...
log.info("[I52] Receiving events:"); for (Response<V1Pod> event : watch) { V1Pod pod = event.object; V1ObjectMeta meta = pod.getMetadata(); switch (event.type) { case "ADDED": case "MODIFIED": ...
repos\tutorials-master\kubernetes-modules\k8s-intro\src\main\java\com\baeldung\kubernetes\intro\WatchPods.java
1
请完成以下Java代码
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) { this.applicationEventPublisher = applicationEventPublisher; } /** * Return any exception thrown when attempting to bind the queue to the event exchange. * @return the exception. */ public @Nullable Exception getB...
} @Override public boolean isAutoStartup() { return this.autoStartup; } public void setAutoStartup(boolean autoStartup) { this.autoStartup = autoStartup; } @Override public void onMessage(Message message) { if (this.applicationEventPublisher != null) { this.applicationEventPublisher.publishEvent(new ...
repos\spring-amqp-main\spring-rabbit\src\main\java\org\springframework\amqp\rabbit\core\BrokerEventListener.java
1
请完成以下Java代码
public class FixedOrderComparator<T> implements Comparator<T> { private List<T> fixedOrderList; // private T notMatchedMarker; private int notMatchedMarkerIndex; public FixedOrderComparator(final T notMatchedMarker, final List<T> fixedOrderList) { Check.assumeNotNull(fixedOrderList, "fixedOrderList not null"); ...
public int compare(T o1, T o2) { int idx1 = fixedOrderList.indexOf(o1); if (idx1 < 0) { idx1 = notMatchedMarkerIndex; } int idx2 = fixedOrderList.indexOf(o2); if (idx2 < 0) { idx2 = notMatchedMarkerIndex; } return idx1 - idx2; } @Override public String toString() { return "FixedOrderCo...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\comparator\FixedOrderComparator.java
1
请在Spring Boot框架中完成以下Java代码
public Developer createDev(@Valid @RequestBody Developer developer){ return developerRepository.save(developer); } @PutMapping("/dev/{id}") public ResponseEntity<Developer> updateDeveloper ( @PathVariable(value = "id") Long devId, @Valid @RequestBody Developer developerDetai...
} @DeleteMapping("/dev/{id}") public Map<String, Boolean> deleteDev( @PathVariable(value = "id") Long devId) throws Exception{ Developer developer = developerRepository.findById(devId) .orElseThrow(()-> new ResourceNotFoundException("Developer cannot found on:: " + devId)); ...
repos\SpringBoot-Projects-FullStack-master\Part-4 Spring Boot REST API\SpringMySQL\src\main\java\spring\restapi\controller\DeveloperController.java
2
请完成以下Java代码
public BigDecimal getMinimumAmt () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MinimumAmt); if (bd == null) return Env.ZERO; return bd; } public I_M_PromotionGroup getM_PromotionGroup() throws RuntimeException { return (I_M_PromotionGroup)MTable.get(getCtx(), I_M_PromotionGroup.Table_Name) ...
/** Get Promotion. @return Promotion */ public int getM_Promotion_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_M_Promotion_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Promotion Line. @param M_PromotionLine_ID Promotion Line */ public void setM_PromotionLine_ID (int M_Pr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PromotionLine.java
1
请在Spring Boot框架中完成以下Java代码
public DaoAuthenticationProvider authenticationProvider() { final DaoAuthenticationProvider bean = new CustomDaoAuthenticationProvider(); bean.setUserDetailsService(customUserDetailsService); bean.setPasswordEncoder(encoder()); return bean; } /** * Order of precedence is ve...
.authenticationProvider(authenticationProvider()); /** Disabled for local testing */ http.csrf(AbstractHttpConfigurer::disable); /** This is solely required to support H2 console viewing in Spring MVC with Spring Security */ http.headers(headers -> headers.frameOptions(frameOptions -> ...
repos\tutorials-master\spring-security-modules\spring-security-web-sockets\src\main\java\com\baeldung\springsecuredsockets\config\SecurityConfig.java
2
请完成以下Java代码
public ListenableFuture<Integer> succeedingTask() { return Futures.immediateFuture(new Random().nextInt(Integer.MAX_VALUE)); } public <T> ListenableFuture<T> failingTask() { return Futures.immediateFailedFuture(new ListenableFutureException()); } public ListenableFuture<Integer> getCar...
public ListenableFuture<String> generateUsername(String firstName) { return lExecService.submit(() -> { TimeUnit.MILLISECONDS.sleep(500); return firstName.replaceAll("[^a-zA-Z]+","") .concat("@service.com"); }); } public ListenableFuture<String> gener...
repos\tutorials-master\guava-modules\guava-concurrency\src\main\java\com\baeldung\guava\future\ListenableFutureService.java
1
请在Spring Boot框架中完成以下Java代码
protected void start() { final RuntimeContainerDelegateImpl containerDelegate = getContainerDelegate(); containerDelegate.getServiceContainer().createDeploymentOperation("deploying Camunda Platform") .addStep(new EjbJarParsePlatformXmlStep()) .addStep(new DiscoverBpmPlatformPluginsStep()) .a...
LOGGER.log(Level.INFO, "Camunda Platform stopped."); } protected RuntimeContainerDelegateImpl getContainerDelegate() { return (RuntimeContainerDelegateImpl) RuntimeContainerDelegate.INSTANCE.get(); } // getters ////////////////////////////////////////////// public ProcessEngineService getProcessEngine...
repos\camunda-bpm-platform-master\javaee\ejb-service\src\main\java\org\camunda\bpm\container\impl\ejb\EjbBpmPlatformBootstrap.java
2
请完成以下Java代码
public Integer component1() { return getId(); } @Override public String component2() { return getFirstName(); } @Override public String component3() { return getLastName(); } @Override public Integer component4() { return getAge(); } @Overr...
value1(value1); value2(value2); value3(value3); value4(value4); return this; } // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- /** * Create...
repos\tutorials-master\persistence-modules\jooq\src\main\java\com\baeldung\jooq\model\tables\records\AuthorRecord.java
1
请完成以下Java代码
public Integer getMatchStrategy() { return matchStrategy; } public void setMatchStrategy(Integer matchStrategy) { this.matchStrategy = matchStrategy; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getCl...
} @Override public int hashCode() { return Objects.hash(pattern, matchStrategy); } @Override public String toString() { return "ApiPredicateItemEntity{" + "pattern='" + pattern + '\'' + ", matchStrategy=" + matchStrategy + '}'; } ...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\datasource\entity\gateway\ApiPredicateItemEntity.java
1
请完成以下Java代码
public String toString() { return MoreObjects.toStringHelper(this).addValue(applicationContext).toString(); } @Override public <T extends IService> T provideServiceImpl(@NonNull final Class<T> serviceClazz) { try { return applicationContext.getBean(serviceClazz); } catch (final NoUniqueBea...
// ok; the bean is not in the spring context, so let's just return null return null; } catch (final IllegalStateException e) { if (Adempiere.isUnitTestMode()) { // added for @SpringBootTests starting up with a 'Marked for closing' Context, mostly due to DirtiesContext.ClassMode.BEFORE_CLASS ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\StartupListener.java
1
请在Spring Boot框架中完成以下Java代码
public void setLastName(String lastName) { this.lastName = lastName; } /** * @return the pageDescription */ public String getPageDescription() { return pageDescription; } /** * @param pageDescription the pageDescription to set */ public void setPageDescripti...
} /** * @return the pageCounter */ public int getPageCounter() { return pageCounter; } /** * @param pageCounter the pageCounter to set */ public void setPageCounter(int pageCounter) { this.pageCounter = pageCounter; } }
repos\tutorials-master\web-modules\jsf\src\main\java\com\baeldung\springintegration\controllers\ELSampleBean.java
2
请在Spring Boot框架中完成以下Java代码
public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private int id; @Column(name = "first_name") private String firstName; @Column(name = "last_name") private String lastName; @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name =...
public void setId(int id) { this.id = id; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String la...
repos\tutorials-master\persistence-modules\hibernate-exceptions\src\main\java\com\baeldung\hibernate\exception\transientobject\entity\User.java
2
请在Spring Boot框架中完成以下Java代码
public int getC_POS_Payment_ID() { return get_ValueAsInt(COLUMNNAME_C_POS_Payment_ID); } @Override public void setDescription (final @Nullable java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return get_ValueAsStri...
/** CardPayment = CARD_PAY */ public static final String TYPE_CardPayment = "CARD_PAY"; /** CashInOut = CASH_INOUT */ public static final String TYPE_CashInOut = "CASH_INOUT"; /** CashClosingDifference = CASH_DIFF */ public static final String TYPE_CashClosingDifference = "CASH_DIFF"; @Override public void setTy...
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java-gen\de\metas\pos\repository\model\X_C_POS_JournalLine.java
2
请完成以下Java代码
public void setIsExclude (boolean IsExclude) { set_Value (COLUMNNAME_IsExclude, Boolean.valueOf(IsExclude)); } /** Get Exclude. @return Exclude access to the data - if not selected Include access to the data */ public boolean isExclude () { Object oo = get_Value(COLUMNNAME_IsExclude); if (oo != null) ...
/** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName(...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_AccessProfile.java
1
请完成以下Java代码
class ModelClassInfo implements IModelClassInfo { private final ModelClassIntrospector introspector; private final Class<?> modelClass; private final String tableName; private Map<Method, IModelMethodInfo> _modelMethodInfos; private final ReentrantLock modelMethodInfosLock = new ReentrantLock(); private Set<St...
/** * Gets the inner map of {@link Method} to {@link IModelMethodInfo}. * * NOTE: this method is not thread safe * * @return */ private final Map<Method, IModelMethodInfo> getMethodInfos0() { if (_modelMethodInfos == null) { _modelMethodInfos = introspector.createModelMethodInfos(getModelClass())...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\ModelClassInfo.java
1
请完成以下Java代码
protected String getStartCorrelationConfiguration(EventSubscription eventSubscription) { BpmnModel bpmnModel = processEngineConfiguration.getRepositoryService().getBpmnModel(eventSubscription.getProcessDefinitionId()); if (bpmnModel != null) { // There are potentially multiple start events,...
return correlationCfgExtensions.get(0).getElementText(); } } } } return null; } @Override protected EventSubscriptionQuery createEventSubscriptionQuery() { return new EventSubscriptionQueryImpl(commandExecutor, processEngineConfigura...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\eventregistry\BpmnEventRegistryEventConsumer.java
1
请完成以下Java代码
public static ApiResponse of(Integer code, String message, Object data) { return new ApiResponse(code, message, data); } /** * 构造一个成功且带数据的API返回 * * @param data 返回数据 * @return ApiResponse */ public static ApiResponse ofSuccess(Object data) { return ofStatus(Status.OK...
* @param status 状态 {@link Status} * @param data 返回数据 * @return ApiResponse */ public static ApiResponse ofStatus(Status status, Object data) { return of(status.getCode(), status.getMessage(), data); } /** * 构造一个异常且带数据的API返回 * * @param t 异常 * @param data 返回数据 ...
repos\spring-boot-demo-master\demo-exception-handler\src\main\java\com\xkcoding\exception\handler\model\ApiResponse.java
1
请完成以下Java代码
public void setThreadLocalContextAware(boolean threadLocalContextAware) { this.threadLocalContextAware = threadLocalContextAware; } /** * Whether ThreadLocal context needs to be restored for this resolver. */ public boolean isThreadLocalContextAware() { return this.threadLocalContextAware; } @SuppressWa...
return Mono.justOrEmpty(resolveToMultipleErrors(exception)); } } /** * Override this method to resolve the Exception to multiple GraphQL errors. * @param exception the exception to resolve * @return the resolved errors or {@code null} if unresolved */ protected @Nullable List<GraphQLError> resolveToMultip...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\execution\SubscriptionExceptionResolverAdapter.java
1
请完成以下Java代码
public boolean hasSingleElement(Collection<?> value) { return value != null && value.size() == 1; } @Override protected void serializeContents(Collection<?> value, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException { jsonGenerator.setCurrentValue(value); PropertySerial...
if (Objects.isNull(resolvedSerializer)) { resolvedSerializer = Objects.nonNull(this._elementType) && this._elementType.hasGenericTypes() ? this._findAndAddDynamic(dynamicSerializers, constructSpecializedType(serializerProvider, this._elementType, type), serializerProvider) : this._findAndAddDynamic(...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\jackson\databind\serializer\TypelessCollectionSerializer.java
1
请完成以下Java代码
public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } @Override public Date getTime() { return time; } public void setTime(Date time) { this.time = time; } @Override public String getProcessInstanceId() { return proc...
public Date getRemovalTime() { return removalTime; } public void setRemovalTime(Date removalTime) { this.removalTime = removalTime; } public String toEventMessage(String message) { String eventMessage = message.replaceAll("\\s+", " "); if (eventMessage.length() > 163) { eventMessage = ev...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\CommentEntity.java
1
请完成以下Java代码
private int computeFromNotAdjustedAmountMultiplier() { int multiplier = 1; // Do we have to SO adjust? if (isAPAdjusted) { final int multiplierAP = soTrx.isPurchase() ? -1 : +1; multiplier *= multiplierAP; } // Do we have to adjust by Credit Memo? if (isCreditMemoAdjusted) { final int multip...
* @return {@code true} for purchase-invoice and sales-creditmemo. {@code false} otherwise. */ public boolean isOutgoingMoney() { return isCreditMemo ^ soTrx.isPurchase(); } public InvoiceAmtMultiplier withAPAdjusted(final boolean isAPAdjustedNew) { return isAPAdjusted == isAPAdjustedNew ? this : toBuilder()...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\InvoiceAmtMultiplier.java
1
请完成以下Java代码
public final class SqlDocumentFilterConverters { /** * Convenient method to create the effective converter instance from the given <code>entityBinding</code>. * It will use * <ul> * <li>entity binding's registered converters list: {@link SqlEntityBinding#getFilterConverters()} * <li>{@link SqlDefaultDocument...
return decoratorOrNull != null ? decoratorOrNull.decorate(converters) : converters; } public static SqlDocumentFilterConvertersList.Builder listBuilder() { return SqlDocumentFilterConvertersList.builder(); } public static SqlDocumentFilterConvertersList emptyList() { return SqlDocumentFilterConverte...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\sql\SqlDocumentFilterConverters.java
1
请完成以下Java代码
public String getActivityId() { return activityId; } public String getFailedActivityId() { return failedActivityId; } public String getExecutionId() { return executionId; } public String getProcessInstanceId() { return processInstanceId; } public String getProcessDefinitionId() { ...
result.removalTime = historicJobLog.getRemovalTime(); result.jobId = historicJobLog.getJobId(); result.jobDueDate = historicJobLog.getJobDueDate(); result.jobRetries = historicJobLog.getJobRetries(); result.jobPriority = historicJobLog.getJobPriority(); result.jobExceptionMessage = historicJobLog.g...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricJobLogDto.java
1
请完成以下Java代码
public void caretUpdate(CaretEvent e) { if(log.isTraceEnabled()) log.trace("Dot=" + e.getDot() + ",Last=" + m_lastDot + ", Mark=" + e.getMark()); // Selection if (e.getDot() != e.getMark()) { m_lastDot = e.getDot(); return; } // // Is the current position a fixed character? if (e.getDot()+...
log.debug("OnFixedChar=" + m_mask.charAt(e.getDot()) + ", newDot=" + newDot + ", last=" + m_lastDot); // m_lastDot = e.getDot(); if (newDot >= 0 && newDot < getText().length()) m_tc.setCaretPosition(newDot); } // caretUpdate /** * Get Full Text * @return text */ private String getText() { String ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\MDocDate.java
1
请完成以下Java代码
public void setM_Securpharm_Productdata_Result(de.metas.vertical.pharma.securpharm.model.I_M_Securpharm_Productdata_Result M_Securpharm_Productdata_Result) { set_ValueFromPO(COLUMNNAME_M_Securpharm_Productdata_Result_ID, de.metas.vertical.pharma.securpharm.model.I_M_Securpharm_Productdata_Result.class, M_Securpharm_...
/** Set TransaktionsID Server. @param TransactionIDServer TransaktionsID Server */ @Override public void setTransactionIDServer (java.lang.String TransactionIDServer) { set_Value (COLUMNNAME_TransactionIDServer, TransactionIDServer); } /** Get TransaktionsID Server. @return TransaktionsID Server */ @Ov...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java-gen\de\metas\vertical\pharma\securpharm\model\X_M_Securpharm_Action_Result.java
1
请在Spring Boot框架中完成以下Java代码
public PackToHUsProducer newPackToHUsProducer() { return PackToHUsProducer.builder() .handlingUnitsBL(handlingUnitsBL) .huPIItemProductBL(hupiItemProductBL) .uomConversionBL(uomConversionBL) .inventoryService(inventoryService) .build(); } public IAutoCloseable newContext() { return HUContex...
final I_M_HU hu = handlingUnitsBL.getById(huId); final IHUStorageFactory storageFactory = handlingUnitsBL.getStorageFactory(); return Optional.ofNullable(storageFactory.getStorage(hu).getProductStorageOrNull(productId)); } public void assetHUContainsProduct(@NonNull final HUQRCode huQRCode, @NonNull final Produ...
repos\metasfresh-new_dawn_uat\backend\de.metas.distribution.rest-api\src\main\java\de\metas\distribution\mobileui\external_services\hu\DistributionHUService.java
2
请在Spring Boot框架中完成以下Java代码
public class TopMenuController extends BladeController { private final ITopMenuService topMenuService; /** * 详情 */ @GetMapping("/detail") @ApiOperationSupport(order = 1) @Operation(summary = "详情", description = "传入topMenu") public R<TopMenu> detail(TopMenu topMenu) { TopMenu detail = topMenuService.getOne...
/** * 删除 顶部菜单表 */ @PostMapping("/remove") @ApiOperationSupport(order = 7) @Operation(summary = "逻辑删除", description = "传入ids") public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status(topMenuService.deleteLogic(Func.toLongList(ids))); } /** * 设置顶部菜单 *...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\controller\TopMenuController.java
2
请完成以下Java代码
public ImmutableList<I_PP_Order_Candidate> getByProductBOMId(@NonNull final ProductBOMId productBOMId) { return queryBL .createQueryBuilder(I_PP_Order_Candidate.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_PP_Order_Candidate.COLUMNNAME_PP_Product_BOM_ID, productBOMId.getRepoId()) .create()...
public void deleteLines(@NonNull final PPOrderCandidateId ppOrderCandidateId) { queryBL.createQueryBuilder(I_PP_OrderLine_Candidate.class) .addEqualsFilter(I_PP_OrderLine_Candidate.COLUMNNAME_PP_Order_Candidate_ID, ppOrderCandidateId) .create() .deleteDirectly(); } public List<PPOrderCandidateId> list...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\productioncandidate\model\dao\PPOrderCandidateDAO.java
1
请在Spring Boot框架中完成以下Java代码
protected void applyFilters(CaseDefinitionQuery query) { if (caseDefinitionId != null) { query.caseDefinitionId(caseDefinitionId); } if (caseDefinitionIdIn != null && !caseDefinitionIdIn.isEmpty()) { query.caseDefinitionIdIn(caseDefinitionIdIn.toArray(new String[caseDefinitionIdIn.size()])); ...
query.caseDefinitionVersion(version); } if (TRUE.equals(latestVersion)) { query.latestVersion(); } if (tenantIds != null && !tenantIds.isEmpty()) { query.tenantIdIn(tenantIds.toArray(new String[tenantIds.size()])); } if (TRUE.equals(withoutTenantId)) { query.withoutTenantId(); ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\repository\CaseDefinitionQueryDto.java
2
请完成以下Java代码
public String getName() { return this.name; } @Override public String getDescription() { return this.description; } @Override public @Nullable String getUsageHelp() { return null; } @Override
public @Nullable String getHelp() { return null; } @Override public Collection<OptionHelp> getOptionsHelp() { return Collections.emptyList(); } @Override public @Nullable Collection<HelpExample> getExamples() { return null; } }
repos\spring-boot-4.0.1\cli\spring-boot-cli\src\main\java\org\springframework\boot\cli\command\AbstractCommand.java
1
请完成以下Java代码
public int getC_TaxPostal_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_TaxPostal_ID); if (ii == null) return 0; return ii.intValue(); } /** Set ZIP. @param Postal Postal code */ public void setPostal (String Postal) { set_Value (COLUMNNAME_Postal, Postal); } /** Get ZIP. @return ...
@param Postal_To Postal code to */ public void setPostal_To (String Postal_To) { set_Value (COLUMNNAME_Postal_To, Postal_To); } /** Get ZIP To. @return Postal code to */ public String getPostal_To () { return (String)get_Value(COLUMNNAME_Postal_To); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_TaxPostal.java
1
请完成以下Java代码
public T getVariable(String name) { return getVariablesMap().get(name); } public List<T> getVariables() { return new ArrayList<>(getVariablesMap().values()); } public List<T> getVariables(Collection<String> variableNames) { return new ArrayList<>(getVariablesMap(variableNames).values()); } p...
T value = getVariablesMap().remove(variableName); for (VariableStoreObserver<T> observer : observers) { observer.onRemove(value); } removedVariables.put(variableName, value); return value; } public void removeVariables() { Iterator<T> valuesIt = getVariablesMap().values().iterator(); ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\core\variable\scope\VariableStore.java
1
请完成以下Java代码
public EventSubscriptionQuery eventSubscriptionId(String id) { ensureNotNull("event subscription id", id); this.eventSubscriptionId = id; return this; } public EventSubscriptionQuery eventName(String eventName) { ensureNotNull("event name", eventName); this.eventName = eventName; return thi...
return orderBy(EventSubscriptionQueryProperty.CREATED); } public EventSubscriptionQuery orderByTenantId() { return orderBy(EventSubscriptionQueryProperty.TENANT_ID); } //results ////////////////////////////////////////// @Override public long executeCount(CommandContext commandContext) { checkQue...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\EventSubscriptionQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public Result<AiragApp> queryById(@RequestParam(name = "id", required = true) String id) { AiragApp airagApp = airagAppService.getById(id); if (airagApp == null) { return Result.error("未找到对应数据"); } return Result.OK(airagApp); } /** * 调试应用 * * @param a...
* @author chenrui * @date 2025/3/12 15:30 */ @GetMapping(value = "/prompt/generate") public Result<?> generatePrompt(@RequestParam(name = "prompt", required = true) String prompt) { return (Result<?>) airagAppService.generatePrompt(prompt,true); } /** * 根据需求生成提示词 * * @p...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-module\jeecg-boot-module-airag\src\main\java\org\jeecg\modules\airag\app\controller\AiragAppController.java
2
请在Spring Boot框架中完成以下Java代码
public List<IdentityLinkEntity> getQueryIdentityLinks() { if (queryIdentityLinks == null) { queryIdentityLinks = new LinkedList<>(); } return queryIdentityLinks; } public void setQueryIdentityLinks(List<IdentityLinkEntity> identityLinks) { queryIdentityLinks = identi...
@Override public void setVariableCount(int variableCount) { this.variableCount = variableCount; } @Override public int getVariableCount() { return variableCount; } @Override public void setIdentityLinkCount(int identityLinkCount) { this.identityLinkCount = identityL...
repos\flowable-engine-main\modules\flowable-task-service\src\main\java\org\flowable\task\service\impl\persistence\entity\TaskEntityImpl.java
2
请完成以下Java代码
private URLConnection openConnection(JarFile jarFile) throws IOException { URL url = this.cache.get(jarFile); return (url != null) ? url.openConnection() : null; } private void onClose(JarFile jarFile) { this.cache.remove(jarFile); } void clearCache() { this.cache.clear(); } /** * Internal cache. *...
synchronized (this) { JarFile cached = this.jarFileUrlToJarFile.get(urlKey); if (cached == null) { this.jarFileUrlToJarFile.put(urlKey, jarFile); this.jarFileToJarFileUrl.put(jarFile, jarFileUrl); return true; } return false; } } /** * Remove the given jar and any related URL f...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\net\protocol\jar\UrlJarFiles.java
1
请完成以下Java代码
public class X_C_DataImport extends org.compiere.model.PO implements I_C_DataImport, org.compiere.model.I_Persistent { private static final long serialVersionUID = 1991628502L; /** Standard Constructor */ public X_C_DataImport (final Properties ctx, final int C_DataImport_ID, @Nullable final String trxName)...
{ return get_ValueAsInt(COLUMNNAME_C_DataImport_ID); } /** * DataImport_ConfigType AD_Reference_ID=541535 * Reference name: C_DataImport_ConfigType */ public static final int DATAIMPORT_CONFIGTYPE_AD_Reference_ID=541535; /** Standard = S */ public static final String DATAIMPORT_CONFIGTYPE_Standard = "S";...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_DataImport.java
1
请完成以下Java代码
public static void handleTaskIdentityLinkDeletions(TaskEntity taskEntity, List<IdentityLinkEntity> identityLinks, boolean cascaseHistory, CmmnEngineConfiguration cmmnEngineConfiguration) { for (IdentityLinkEntity identityLinkEntity : identityLinks) { CountingTaskEntity countingT...
BaseHistoricTaskLogEntryBuilderImpl taskLogEntryBuilder = new BaseHistoricTaskLogEntryBuilderImpl(taskEntity); ObjectNode data = taskServiceConfiguration.getObjectMapper().createObjectNode(); if (identityLinkEntity.isUser()) { data.put("userId", identityLinkEntity.getUserId()); ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\util\IdentityLinkUtil.java
1
请完成以下Java代码
public void onModelChange(@NonNull final Object model, @NonNull final ModelChangeType changeType) { // // Create missing invoice candidates for given pseudo-document if (!isDocument && changeType.isNewOrChange() && changeType.isAfter()) { createMissingInvoiceCandidates(model); } } /** * Creates missi...
break; case CREATE_CANDIDATES: CreateMissingInvoiceCandidatesWorkpackageProcessor.schedule(model); break; case CREATE_CANDIDATES_AND_INVOICES: generateIcsAndInvoices(model); break; } } private void generateIcsAndInvoices(@NonNull final Object model) { final TableRecordReference modelRefere...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\modelvalidator\ilhandler\ILHandlerModelInterceptor.java
1
请完成以下Java代码
public class SysUserTenant implements Serializable { private static final long serialVersionUID = 1L; /**主键id*/ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "主键id") private String id; /**用户id*/ @Excel(name = "用户id", width = 15) @Schema(description = "用户id") private String userId; /*...
@Schema(description = "创建人登录名称") private String createBy; /**创建日期*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @Schema(description = "创建日期") private Date createTime; /**更新人登录名称*/ @Schema(description = "更新人登录名称") private String updateBy; /**更新...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\entity\SysUserTenant.java
1
请在Spring Boot框架中完成以下Java代码
public class CommentQueryService { private CommentReadService commentReadService; private UserRelationshipQueryService userRelationshipQueryService; public Optional<CommentData> findById(String id, User user) { CommentData commentData = commentReadService.findById(id); if (commentData == null) { re...
user.getId(), comments.stream() .map(commentData -> commentData.getProfileData().getId()) .collect(Collectors.toList())); comments.forEach( commentData -> { if (followingAuthors.contains(commentData.getProfileData().getId())) { ...
repos\spring-boot-realworld-example-app-master\src\main\java\io\spring\application\CommentQueryService.java
2
请在Spring Boot框架中完成以下Java代码
public class DATEVExportFormat { int id; String name; String csvEncoding; String csvFieldDelimiter; String csvFieldQuote; List<DATEVExportFormatColumn> columns; @Builder private DATEVExportFormat( final int id, final String name, final String csvEncoding, final String csvFieldDelimiter,
final String csvFieldQuote, @Singular final List<DATEVExportFormatColumn> columns) { Check.assumeNotEmpty(name, "name is not empty"); Check.assumeNotEmpty(columns, "columns is not empty"); this.id = id; this.name = name; this.csvEncoding = !Check.isEmpty(csvEncoding, true) ? csvEncoding : "UTF-8"; this...
repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java\de\metas\datev\DATEVExportFormat.java
2
请完成以下Java代码
public GenericEventListenerInstanceQuery orderByName() { innerQuery.orderByName(); return this; } @Override public GenericEventListenerInstanceQuery asc() { innerQuery.asc(); return this; } @Override public GenericEventListenerInstanceQuery desc() { inne...
} @Override public GenericEventListenerInstance singleResult() { PlanItemInstance instance = innerQuery.singleResult(); return GenericEventListenerInstanceImpl.fromPlanItemInstance(instance); } @Override public List<GenericEventListenerInstance> list() { return convertPlanI...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\GenericEventListenerInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public Integer getOrderStateCode() { return orderStateCode; } public void setOrderStateCode(Integer orderStateCode) { this.orderStateCode = orderStateCode; } public Str...
} public String getTotalPrice() { return totalPrice; } public void setTotalPrice(String totalPrice) { this.totalPrice = totalPrice; } @Override public String toString() { return "OrderUpdateReq{" + "id='" + id + '\'' + ", orderStateCode=...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\req\order\OrderUpdateReq.java
2
请完成以下Java代码
public class CalloutAssignment extends CalloutEngine { /** * Assignment_Product. * - called from S_ResourceAssignment_ID * - sets M_Product_ID, Description * - Qty.. * @param ctx context * @param WindowNo window no * @param mTab tab * @param mField field * @param value value * @return null or...
Description = rs.getString(3); Qty = rs.getBigDecimal(4); } } catch (SQLException e) { log.error("product", e); } finally { DB.close(rs, pstmt); rs = null; pstmt = null; } log.debug("S_ResourceAssignment_ID=" + S_ResourceAssignment_ID + " - M_Product_ID=" + M_Product_ID); if (M_Produc...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\CalloutAssignment.java
1
请完成以下Java代码
public DeploymentQueryImpl createDeploymentQuery() { return new DeploymentQueryImpl(); } public ProcessDefinitionQueryImpl createProcessDefinitionQuery() { return new ProcessDefinitionQueryImpl(); } public CaseDefinitionQueryImpl createCaseDefinitionQuery() { return new CaseDefinitionQueryImpl(); ...
} public HistoricJobLogQueryImpl createHistoricJobLogQuery() { return new HistoricJobLogQueryImpl(); } public UserQueryImpl createUserQuery() { return new DbUserQueryImpl(); } public GroupQueryImpl createGroupQuery() { return new DbGroupQueryImpl(); } public void registerOptimisticLockingL...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\entitymanager\DbEntityManager.java
1
请完成以下Java代码
public int getAge() { return age; } public Author age(int age) { this.age = age; return this; } public void setAge(int age) { this.age = age; } public List<Book> getBooks() { return books; }
public Author books(List<Book> books) { this.books = books; return this; } public void setBooks(List<Book> books) { this.books = books; } @Override public String toString() { return "Author{" + "id=" + id + ", name=" + name + ", genre=" + genre + ", ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootFluentApiAdditionalMethods\src\main\java\com\bookstore\entity\Author.java
1
请完成以下Java代码
public void setC_Tax_ID (int C_Tax_ID) { if (C_Tax_ID < 1) set_Value (COLUMNNAME_C_Tax_ID, null); else set_Value (COLUMNNAME_C_Tax_ID, Integer.valueOf(C_Tax_ID)); } /** Get Steuer. @return Steuerart */ @Override public int getC_Tax_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_Tax_ID);...
public void setValidFrom (java.sql.Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); } /** Get Gültig ab. @return Gültig ab inklusiv (erster Tag) */ @Override public java.sql.Timestamp getValidFrom () { return (java.sql.Timestamp)get_Value(COLUMNNAME_ValidFrom); } /** Set Gültig bi...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java-gen\de\metas\acct\model\X_C_VAT_Code.java
1
请完成以下Java代码
public class PerformanceIndicatorImpl extends BusinessContextElementImpl implements PerformanceIndicator { protected static ElementReferenceCollection<Decision, ImpactingDecisionReference> impactingDecisionRefCollection; public PerformanceIndicatorImpl(ModelTypeInstanceContext instanceContext) { super(instanc...
.instanceProvider(new ModelTypeInstanceProvider<PerformanceIndicator>() { public PerformanceIndicator newInstance(ModelTypeInstanceContext instanceContext) { return new PerformanceIndicatorImpl(instanceContext); } }); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); im...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\PerformanceIndicatorImpl.java
1
请完成以下Java代码
public String getAmtInWords (String amount) throws Exception { if (amount == null) return amount; // StringBuffer sb = new StringBuffer (); sb.append("RINGGIT "); int pos = amount.lastIndexOf ('.'); int pos2 = amount.lastIndexOf (','); if (pos2 > pos) pos = pos2; String oldamt = amount; amount ...
e.printStackTrace(); } } // print /** * Test * @param args ignored */ public static void main (String[] args) { AmtInWords_MS aiw = new AmtInWords_MS(); // aiw.print (".23"); Error aiw.print ("0.23"); aiw.print ("1.23"); aiw.print ("12.34"); aiw.print ("123.45"); aiw.print ("1,234.56"); ai...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\AmtInWords_MS.java
1
请在Spring Boot框架中完成以下Java代码
FanoutExchange parkingLotExchange() { return new FanoutExchange(EXCHANGE_PARKING_LOT); } @Bean Queue parkingLotQueue() { return QueueBuilder.durable(QUEUE_PARKING_LOT).build(); } @Bean Binding parkingLotBinding() { return BindingBuilder.bind(parkingLotQueue()).to(parkin...
return new FanoutExchange(DLX_EXCHANGE_MESSAGES); } @Bean Queue deadLetterQueue() { return QueueBuilder.durable(QUEUE_MESSAGES_DLQ).build(); } @Bean Binding deadLetterBinding() { return BindingBuilder.bind(deadLetterQueue()).to(deadLetterExchange()); } @Bean Direct...
repos\tutorials-master\messaging-modules\spring-amqp\src\main\java\com\baeldung\springamqp\errorhandling\configuration\DLXParkingLotAmqpConfiguration.java
2
请完成以下Java代码
public static void main(String[] args) { SpringApplication.run(MainApplication.class, args); } @Autowired BookRepository bookRepository; // Run this if app.db.init.enabled = true @Bean @ConditionalOnProperty(prefix = "app", name = "db.init.enabled", havingValue = "true") public Com...
LocalDate.of(2023, 8, 31)); Book b2 = new Book("Book B", BigDecimal.valueOf(19.99), LocalDate.of(2023, 7, 31)); Book b3 = new Book("Book C", BigDecimal.valueOf(29.99), LocalDate.of(2023, 6, 10)); Book b4 ...
repos\spring-boot-master\spring-data-jpa-postgresql\src\main\java\com\mkyong\MainApplication.java
1
请在Spring Boot框架中完成以下Java代码
public CloseableHttpClient httpClient() { RequestConfig requestConfig = RequestConfig.custom() .setConnectionRequestTimeout(p.getRequestTimeout()) .setConnectTimeout(p.getConnectTimeout()) .setSocketTimeout(p.getSocketTimeout()).build(); return HttpClient...
LOGGER.trace("run IdleConnectionMonitor - Http Client Connection manager is not initialised"); } } catch (Exception e) { LOGGER.error("run IdleConnectionMonitor - Exception occurred. msg={}, e={}", e.getMessage(), e); } } }; ...
repos\SpringBootBucket-master\springboot-resttemplate\src\main\java\com\xncoding\pos\config\HttpClientConfig.java
2
请在Spring Boot框架中完成以下Java代码
public CmmnDeploymentBuilder tenantId(String tenantId) { deployment.setTenantId(tenantId); return this; } @Override public CmmnDeploymentBuilder parentDeploymentId(String parentDeploymentId) { deployment.setParentDeploymentId(parentDeploymentId); return this; } ...
@Override public CmmnDeployment deploy() { return repositoryService.deploy(this); } public CmmnDeploymentEntity getDeployment() { return deployment; } public boolean isCmmnXsdValidationEnabled() { return isCmmn20XsdValidationEnabled; } public boolean isDuplicat...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\repository\CmmnDeploymentBuilderImpl.java
2
请完成以下Java代码
public class PeriodClosedException extends AdempiereException { /** * */ private static final long serialVersionUID = -2798371272365454799L; /** * */ public PeriodClosedException(final Timestamp dateAcct, final DocBaseType docBaseType) { super(buildMsg(dateAcct, docBaseType)); } private static ITra...
{ final ITranslatableString dateAcctTrl = dateAcct != null ? TranslatableStrings.dateAndTime(dateAcct) : TranslatableStrings.anyLanguage("?"); final ITranslatableString docBaseTypeTrl = docBaseType != null ? TranslatableStrings.adRefList(ReferenceId.ofRepoId(X_C_DocType.DOCBASETYPE_AD_Reference_ID), do...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\exceptions\PeriodClosedException.java
1
请完成以下Java代码
private WindowId getWindowId() { return WindowId.of(getProcessInfo().getAdWindowId().getRepoId()); } @NonNull private DocumentFilter createAreaSearchFilter(final I_C_Location location) { final DocumentEntityDescriptor entityDescriptor = documentCollection.getDocumentEntityDescriptor(getWindowId()); final G...
.visitorsAddress(visitorsAddress) .build(); } private I_C_Location getSelectedLocationOrFirstAvailable() { final Set<Integer> bpLocationIds = getSelectedIncludedRecordIds(I_C_BPartner_Location.class); if (!bpLocationIds.isEmpty()) { // retrieve the selected location final LocationId locationId = bpa...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\location\geocoding\process\C_BPartner_Window_AreaSearchProcess.java
1
请在Spring Boot框架中完成以下Java代码
public class SessionDataRedisProperties { /** * Namespace for keys used to store sessions. */ private String namespace = "spring:session"; /** * Sessions flush mode. Determines when session changes are written to the session * store. Not supported with a reactive session repository. */ private FlushMode...
public void setConfigureAction(ConfigureAction configureAction) { this.configureAction = configureAction; } public RepositoryType getRepositoryType() { return this.repositoryType; } public void setRepositoryType(RepositoryType repositoryType) { this.repositoryType = repositoryType; } /** * Strategies f...
repos\spring-boot-4.0.1\module\spring-boot-session-data-redis\src\main\java\org\springframework\boot\session\data\redis\autoconfigure\SessionDataRedisProperties.java
2
请完成以下Java代码
private CostElement extractCostElement(final @NonNull I_M_Cost record) { return costElementCache.computeIfAbsent(extractCostElementId(record), costElementRepo::getById); } @NonNull private static CostElementId extractCostElementId(final @NonNull I_M_Cost record) { return CostElementId.ofRepoId(record.getM_Cos...
private static UomId extractUomId(final @NonNull I_M_Cost record) { return UomId.ofRepoId(record.getC_UOM_ID()); } // // // @Value(staticConstructor = "of") private static class ProductAndAcctSchemaId { @NonNull ProductId productId; @NonNull AcctSchemaId acctSchemaId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\costing\impl\CurrentCostsLoader.java
1
请完成以下Java代码
private boolean isProcessVariableNull(Object variable) { return variable == null || NullNode.getInstance().equals(variable); } private Map<String, Object> resolveExpressions( MappingExecutionContext mappingExecutionContext, Map<String, Object> availableVariables, Map<String, Obj...
outboundVariables ); } return expressionResolver.resolveExpressionsMap( new VariableScopeExpressionEvaluator(mappingExecutionContext.getExecution()), outboundVariables ); } private boolean isTargetProcessVariableDefined( Extension extensions, ...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-runtime-impl\src\main\java\org\activiti\runtime\api\impl\ExtensionsVariablesMappingProvider.java
1
请完成以下Java代码
protected @Nullable CorsConfiguration getCorsConfiguration(Object handler, ServerWebExchange exchange) { // TODO: support cors configuration via properties on a route see gh-229 // see RequestMappingHandlerMapping.initCorsConfiguration() // also see // https://github.com/spring-projects/spring-framework/blob/ma...
* logger.trace("RouteDefinition did not match: " + routeDefinition.getId()); } */ } /** * Validate the given handler against the current request. * <p> * The default implementation is empty. Can be overridden in subclasses, for example * to enforce specific preconditions expressed in URL mappings. * @pa...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\handler\RoutePredicateHandlerMapping.java
1
请完成以下Java代码
public void disconnect(boolean onError) throws InterruptedException { if (!onError) { try { if (inputStream != null) { inputStream.onCompleted(); } } catch (Exception e) { log.error("Exception during onCompleted", e); ...
} } @Override public void sendSyncRequestMsg(boolean fullSyncRequired) { uplinkMsgLock.lock(); try { SyncRequestMsg syncRequestMsg = SyncRequestMsg.newBuilder() .setFullSync(fullSyncRequired) .build(); this.inputStream.onNext(R...
repos\thingsboard-master\common\edge-api\src\main\java\org\thingsboard\edge\rpc\EdgeGrpcClient.java
1