instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public void savePermissionDataRule(SysPermissionDataRule sysPermissionDataRule) { this.save(sysPermissionDataRule); SysPermission permission = sysPermissionMapper.selectById(sysPermissionDataRule.getPermissionId()); boolean flag = permission != null && (permission.getRuleFlag() == null || permission.getRule...
this.removeById(dataRuleId); Long count = this.baseMapper.selectCount(new LambdaQueryWrapper<SysPermissionDataRule>().eq(SysPermissionDataRule::getPermissionId, dataRule.getPermissionId())); //注:同一个事务中删除后再查询是会认为数据已被删除的 若事务回滚上述删除无效 if(count==null || count==0) { SysPermission permission = sysPermissionMappe...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\service\impl\SysPermissionDataRuleImpl.java
2
请完成以下Java代码
protected CTableModelRowSorter createModelRowSorter() { return new CTableModelRowSorter(this) { @Override protected void sort (final int modelColumnIndex) { final int rows = getRowCount(); if (rows <= 0) return; // final TableModel model = getModel(); if (!(model instanceof G...
*/ @Override public boolean editCellAt (int row, int column, java.util.EventObject e) { if (!super.editCellAt(row, column, e)) return false; // log.debug( "VTable.editCellAt", "r=" + row + ", c=" + column); Object ed = getCellEditor(); if (ed instanceof VEditor) ((Component)ed).requestFocus(); else i...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\VTable.java
1
请完成以下Java代码
public String getPipelineDelegateExpression() { return pipelineDelegateExpression; } public void setPipelineDelegateExpression(String pipelineDelegateExpression) { this.pipelineDelegateExpression = pipelineDelegateExpression; } public ChannelEventKeyDetection getChannelEventKeyDetectio...
public Object getInboundEventProcessingPipeline() { return inboundEventProcessingPipeline; } public void setInboundEventProcessingPipeline(Object inboundEventProcessingPipeline) { this.inboundEventProcessingPipeline = inboundEventProcessingPipeline; } public Object getInboundEventChann...
repos\flowable-engine-main\modules\flowable-event-registry-model\src\main\java\org\flowable\eventregistry\model\InboundChannelModel.java
1
请完成以下Java代码
public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setProcCreate (final @Nullable java.lang.String ProcCreate) { set_Value (COLUMNNAME_ProcCreate, Proc...
@Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } @Override public void setValidFrom (final java.sql.Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); } @Override public java.sql.Timestamp getValidFrom() { return get_ValueAsTimestamp(COLUMN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PriceList_Version.java
1
请在Spring Boot框架中完成以下Java代码
public void setAcceptingPartyGLN(String value) { this.acceptingPartyGLN = value; } /** * Gets the value of the contractNumber property. * * @return * possible object is * {@link String } * */ public String getContractNumber() { return contrac...
/** * Sets the value of the nonReturnableContainer property. * * @param value * allowed object is * {@link Boolean } * */ public void setNonReturnableContainer(Boolean value) { this.nonReturnableContainer = value; } /** * Gets the value of the s...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\INVOICListLineItemExtensionType.java
2
请完成以下Java代码
protected final CustomPostgRESTParameters beforePostgRESTCall() { final I_EDI_Document_Extension record = loadRecordOutOfTrx(); record.setEDI_ExportStatus(I_EDI_Document.EDI_EXPORTSTATUS_SendingStarted); saveRecord(record); final boolean calledViaAPI = isCalledViaAPI(); return CustomPostgRESTParameters.bui...
record.setEDI_ExportStatus(I_EDI_Document.EDI_EXPORTSTATUS_Sent); saveRecord(record); return MSG_OK; } @Override protected Exception handleException(@NonNull final Exception e) { final I_EDI_Document_Extension record = loadRecordOutOfTrx(); record.setEDI_ExportStatus(I_EDI_Document.EDI_EXPORTSTATUS_Err...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\process\export\json\EDI_Export_JSON.java
1
请完成以下Java代码
public String getCmmnElementRef() { return cmmnElementRef; } public void setCmmnElementRef(String cmmnElementRef) { this.cmmnElementRef = cmmnElementRef; } public String getTargetCmmnElementRef() { return targetCmmnElementRef; } public void setTargetCmmnElementRef(...
this.waypoints.add(graphicInfo); } public List<GraphicInfo> getWaypoints() { return waypoints; } public void setWaypoints(List<GraphicInfo> waypoints) { this.waypoints = waypoints; } public GraphicInfo getLabelGraphicInfo() { return labelGraphicInfo; } public ...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\CmmnDiEdge.java
1
请完成以下Java代码
public ConfigurationPropertyName map(String propertySourceName) { // Use a local copy in case another thread changes things LastMapping<String, ConfigurationPropertyName> last = this.lastMappedPropertyName; if (last != null && last.isFrom(propertySourceName)) { return last.getMapping(); } ConfigurationProp...
this.from = from; this.mapping = mapping; } boolean isFrom(T from) { return ObjectUtils.nullSafeEquals(from, this.from); } M getMapping() { return this.mapping; } } }
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\properties\source\DefaultPropertyMapper.java
1
请完成以下Java代码
public String getId() { return id; } public String[] getIds() { return ids; } public String getFirstName() { return firstName; } public String getFirstNameLike() { return firstNameLike; } public String getLastName() { return lastName; } public String getLastNameLike() {
return lastNameLike; } public String getEmail() { return email; } public String getEmailLike() { return emailLike; } public String getGroupId() { return groupId; } public String getTenantId() { return tenantId; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\UserQueryImpl.java
1
请完成以下Java代码
public void registerCallout() { Services.get(IProgramaticCalloutProvider.class).registerAnnotatedCallout(this); } @ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE }, ifColumnsChanged = { I_M_ProductPrice.COLUMNNAME_C_UOM_ID, I_M_ProductPrice.COLUMNNAME_M_Product_ID }) ...
{ final Object errorParameter = CoalesceUtil.coalesceNotNull(packingMaterial.getName(), packingMaterial.getM_HU_PI_Item_Product_ID()); throw new AdempiereException(MSG_ERR_M_PRODUCT_PRICE_PACKING_ITEM_INFINITE_CAPACITY, errorParameter) .markAsUserValidationError(); } } private void validatePriceUOM(@Non...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\model\validator\M_ProductPrice.java
1
请在Spring Boot框架中完成以下Java代码
public class DynamicSecurityFilter extends AbstractSecurityInterceptor implements Filter { @Autowired private DynamicSecurityMetadataSource dynamicSecurityMetadataSource; @Autowired private IgnoreUrlsConfig ignoreUrlsConfig; @Autowired public void setMyAccessDecisionManager(DynamicAccessDecisi...
} } @Override public void destroy() { } @Override public Class<?> getSecureObjectClass() { return FilterInvocation.class; } @Override public SecurityMetadataSource obtainSecurityMetadataSource() { return dynamicSecurityMetadataSource; } }
repos\mall-master\mall-security\src\main\java\com\macro\mall\security\component\DynamicSecurityFilter.java
2
请完成以下Java代码
public ByteArrayRef getByteArrayRef() { return byteArrayRef; } // common methods ////////////////////////////////////////////////////////// @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("HistoricVariableInstanceEntity["); sb.appe...
if (doubleValue != null) { sb.append(", doubleValue=").append(doubleValue); } if (textValue != null) { sb.append(", textValue=").append(StringUtils.abbreviate(textValue, 40)); } if (textValue2 != null) { sb.append(", textValue2=").append(StringUtils.ab...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\HistoricVariableInstanceEntityImpl.java
1
请完成以下Java代码
private void createEndOfPause( final I_C_Flatrate_Term term, final Timestamp pauseUntil, final int seqNoOfPauseRecord) { final I_C_SubscriptionProgress pauseEnd = newInstance(I_C_SubscriptionProgress.class); pauseEnd.setEventType(X_C_SubscriptionProgress.EVENTTYPE_EndOfPause); pauseEnd.setC_Flatrate_Te...
private ImmutableList<I_C_SubscriptionProgress> collectSpsAfterEndOfPause(final List<I_C_SubscriptionProgress> sps, final Timestamp pauseUntil) { final ImmutableList<I_C_SubscriptionProgress> spsAfterPause = sps.stream() .filter(sp -> sp.getEventDate().after(pauseUntil)) .collect(ImmutableList.toImmutableLis...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\subscription\impl\subscriptioncommands\InsertPause.java
1
请完成以下Java代码
private void printLabel( final DeliveryOrder deliveryOrder, final PackageLabel packageLabel, @NonNull final DeliveryOrderService deliveryOrderRepo, @Nullable final AsyncBatchId asyncBatchId) { final IArchiveStorageFactory archiveStorageFactory = Services.get(IArchiveStorageFactory.class); final String...
archive.setAD_Table_ID(deliveryOrderRef.getAD_Table_ID()); archive.setRecord_ID(deliveryOrderRef.getRecord_ID()); archive.setC_BPartner_ID(deliveryOrder.getDeliveryAddress().getBpartnerId()); // archive.setAD_Org_ID(); // TODO: do we need to orgId too? archive.setName(fileName); archiveStorage.setBinaryData(a...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\async\DeliveryOrderWorkpackageProcessor.java
1
请在Spring Boot框架中完成以下Java代码
public List<?> produceEvents() { final WorkflowLaunchersList newResult = computeNewResult(); final WorkflowLaunchersList previousResult = lastResultHolder.setValueAndReturnPrevious(newResult); if (previousResult != null && previousResult.equalsIgnoringTimestamp(newResult)) { // nothing changed, don't flood...
.build(); } private WorkflowLaunchersList computeNewResult() { final WorkflowLaunchersQuery query = queryTemplate.withMaxStaleAccepted(getMaxStaleAccepted()); return workflowRestAPIService.getLaunchers(query); } private Duration getMaxStaleAccepted() { final int durationSec = sysConfigBL.getIntValue(SYSCO...
repos\metasfresh-new_dawn_uat\backend\de.metas.workflow.rest-api\src\main\java\de\metas\workflow\rest_api\controller\v2\ws\WorkflowLaunchersWebSocketProducer.java
2
请完成以下Java代码
public double getV1() { return getV(0); } @JsonIgnore public double getV2() { return getV(1); } @JsonIgnore public double getV3() { return getV(2); } @JsonIgnore public double getV4() { return getV(3); } @JsonIgnore public double getV5(...
return getV(4); } private double getV(int idx) { if (values.length < idx + 1) { throw new IllegalArgumentException("Can't get value at index " + idx + ". There are " + values.length + " values present."); } else { return values[idx]; } } @Override pu...
repos\thingsboard-master\common\script\script-api\src\main\java\org\thingsboard\script\api\tbel\TbelCfTsMultiDoubleVal.java
1
请完成以下Java代码
public int read() throws IOException { int nextCharacter = wrappedReader.read(); if (nextCharacter != -1) { if (pos < buffer.length) { buffer[pos] = (char) nextCharacter; pos++; } else if (rewindable && pos >= buffer.length) { rewindable = false; } } return ne...
throw LOG.unableToRewindReader(); } wrappedReader.unread(buffer, 0, pos); pos = 0; } public int getRewindBufferSize() { return buffer.length; } /** * * @return the number of characters that can still be read and rewound. */ public int getCurrentRewindableCapacity() { return buf...
repos\camunda-bpm-platform-master\spin\core\src\main\java\org\camunda\spin\impl\util\RewindableReader.java
1
请在Spring Boot框架中完成以下Java代码
public class OrderService { private List<Order> orders = Arrays.asList( new Order(1, 1, "A101", "2020/02/14"), new Order(2, 1, "A101", "2020/02/14"), new Order(3, 2, "A150", "2020/02/17")); @GetMapping public List<Order> getAllOrders() { return orders; } ...
.filter(order -> order.getCustomerId() == id).collect(Collectors.toList()); } @PostMapping("/create") public OrderResponse createOrder(@RequestBody OrderDTO request) { int lastIndex = orders.size(); Order order = new Order(); order.setId(lastIndex + 1); order.setCustomerId(...
repos\tutorials-master\spring-cloud-modules\spring-cloud-bootstrap\order-service\order-server\src\main\java\com\baeldung\orderservice\OrderService.java
2
请完成以下Java代码
protected void postProcessJob(RestartProcessInstancesBatchConfiguration configuration, JobEntity job, RestartProcessInstancesBatchConfiguration jobConfiguration) { if (job.getDeploymentId() == null) { CommandContext commandContext = Context.getCommandContext(); ProcessDefinitionEntity processDefinitionE...
} @Override public JobDeclaration<BatchJobContext, MessageEntity> getJobDeclaration() { return JOB_DECLARATION; } @Override protected RestartProcessInstancesBatchConfiguration createJobConfiguration(RestartProcessInstancesBatchConfiguration configuration, List<String> processIdsForJob) { retur...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\RestartProcessInstancesJobHandler.java
1
请在Spring Boot框架中完成以下Java代码
public class DeleteProcessDefinitionsBuilderImpl implements DeleteProcessDefinitionsBuilder, DeleteProcessDefinitionsSelectBuilder, DeleteProcessDefinitionsTenantBuilder { private final CommandExecutor commandExecutor; private String processDefinitionKey; private List<String> processDefinitionIds; private ...
return this; } @Override public DeleteProcessDefinitionsBuilderImpl cascade() { this.cascade = true; return this; } @Override public DeleteProcessDefinitionsBuilderImpl skipCustomListeners() { this.skipCustomListeners = true; return this; } @Override public DeleteProcessDefinitionsB...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\repository\DeleteProcessDefinitionsBuilderImpl.java
2
请完成以下Java代码
private void registerProxy(RuntimeHints hints, Class<?> clazz) { Class<?> proxied = this.proxyFactory.proxy(clazz); if (proxied == null) { return; } if (Proxy.isProxyClass(proxied)) { hints.proxies().registerJdkProxy(proxied.getInterfaces()); return; } if (SpringProxy.class.isAssignableFrom(proxied...
private void traverseType(List<Class<?>> toProxy, Class<?> clazz) { if (clazz == Object.class || this.visitedClasses.contains(clazz)) { return; } this.visitedClasses.add(clazz); for (Method m : clazz.getDeclaredMethods()) { AuthorizeReturnObject object = this.scanner.scan(m, clazz); if (object == null)...
repos\spring-security-main\core\src\main\java\org\springframework\security\aot\hint\AuthorizeReturnObjectHintsRegistrar.java
1
请完成以下Java代码
public class DeserializationException extends KafkaException { @Nullable private transient Headers headers; private final byte[] data; private final boolean isKey; /** * Construct an instance with the provided properties. * @param message the message. * @param data the data (value or key). * @param isK...
* @param headers the headers. */ public void setHeaders(@Nullable Headers headers) { this.headers = headers; } /** * Get the data that failed deserialization (value or key). * @return the data. */ public byte[] getData() { return this.data; // NOSONAR array reference } /** * True if deserializatio...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\DeserializationException.java
1
请完成以下Java代码
public void setService_Fee_Invoice_ID (final int Service_Fee_Invoice_ID) { if (Service_Fee_Invoice_ID < 1) set_Value (COLUMNNAME_Service_Fee_Invoice_ID, null); else set_Value (COLUMNNAME_Service_Fee_Invoice_ID, Service_Fee_Invoice_ID); } @Override public int getService_Fee_Invoice_ID() { return get...
{ if (Service_Product_ID < 1) set_Value (COLUMNNAME_Service_Product_ID, null); else set_Value (COLUMNNAME_Service_Product_ID, Service_Product_ID); } @Override public int getService_Product_ID() { return get_ValueAsInt(COLUMNNAME_Service_Product_ID); } @Override public void setService_Tax_ID (fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_RemittanceAdvice_Line.java
1
请完成以下Java代码
private static ObjectNode pruneNode(ObjectNode node, Set<String> keys, String prefix, ObjectMapper mapper) { ObjectNode pruned = mapper.createObjectNode(); Iterator<Map.Entry<String, JsonNode>> fields = node.fields(); while (fields.hasNext()) { Map.Entry<String, JsonNode> entry = fie...
File sourceFolder = new File(args[0]); File destFolder = new File(args[1]); File referenceFile = new File(destFolder, "locale.constant-en_US.json"); ObjectMapper mapper = new ObjectMapper(); JsonNode usRoot = mapper.readTree(referenceFile); Set<String> validK...
repos\thingsboard-master\tools\src\main\java\org\thingsboard\client\tools\i18n\TranslationPruner.java
1
请完成以下Java代码
public static void main(String[] args) throws Exception{ File file = ResourceUtils.getFile("classpath:static/shpTest[Point]/dp_tl.shp"); // 从shp文件里面读取属性信息 readShpByPath(file.getAbsolutePath(),10); System.out.println("=================下面开始往shp文件里面写几何对象==================="); // ...
String linestringWkt="LINESTRING(113.511315990174 41.7274734296674,113.51492087909 41.7284983348307,113.516079593384 41.727649586406,113.515907932007 41.7262243043929,113.514019656861 41.7247989907606,113.512131381714 41.7250872589898,113.51138036319 41.7256637915682,113.511315990174 41.7274734296674)"; LineStr...
repos\springboot-demo-master\GeoTools\src\main\java\com\et\geotools\geotools\ShpTools.java
1
请完成以下Java代码
public IWorkPackageBuilder end() { return _parentBuilder; } /* package */void setC_Queue_WorkPackage(final I_C_Queue_WorkPackage workpackage) { assertNotBuilt(); _workpackage = workpackage; } private I_C_Queue_WorkPackage getC_Queue_WorkPackage() { Check.assumeNotNull(_workpackage, "workpackage not nul...
{ assertNotBuilt(); if (parameters == null) { return this; } final Collection<String> parameterNames = parameters.getParameterNames(); if(parameterNames.isEmpty()) { return this; } for (final String parameterName : parameterNames) { Check.assumeNotEmpty(parameterName, "parameterName no...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\api\impl\WorkPackageParamsBuilder.java
1
请完成以下Java代码
public Duration getDurationReal(@NonNull final PPOrderRoutingActivity activity, @NonNull final CostCollectorType costCollectorType) { return computeDuration(activity, costCollectorType, I_PP_Cost_Collector.COLUMNNAME_DurationReal); } private Duration computeDuration(final PPOrderRoutingActivity activity, final Co...
{ duration = BigDecimal.ZERO; } final int durationInt = duration.setScale(0, RoundingMode.UP).intValueExact(); return Duration.of(durationInt, activity.getDurationUnit().getTemporalUnit()); } @Override public void save(@NonNull final I_PP_Cost_Collector cc) { saveRecord(cc); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\impl\PPCostCollectorDAO.java
1
请完成以下Java代码
private LULoaderItemInstance addLUItemIfPossible(final I_M_HU_Item luItem) { final IHandlingUnitsBL handlingUnitsBL = Services.get(IHandlingUnitsBL.class); // // Check if it's a handling unit item if (!Objects.equals(handlingUnitsBL.getItemType(luItem), X_M_HU_Item.ITEMTYPE_HandlingUnit)) { // Note: we a...
// // Check same Locator if (!LocatorId.equalsByRepoId(tuHU.getM_Locator_ID(), LocatorId.toRepoId(locatorId))) { return false; } // // Check same HUStatus final String huStatus = tuHU.getHUStatus(); if (!Objects.equals(huStatus, this.huStatus)) { return false; } // // Default: accept r...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\LULoaderInstance.java
1
请完成以下Java代码
public void requestCarrierAdvises(@NonNull final ShipmentScheduleQuery query) { shipmentScheduleService.getBy(query) .forEach(schedule -> requestCarrierAdvise(schedule, false)); } private void requestCarrierAdvise(@NonNull final ShipmentSchedule shipmentSchedule, final boolean isIncludeCarrierAdviseManual) {...
public void updateEligibleShipmentSchedules(@NonNull final CarrierAdviseUpdateRequest request) { shipmentScheduleService.updateByQuery(request.getQuery(), schedule -> updateEligibleShipmentSchedule(schedule, request)); } private void updateEligibleShipmentSchedule(@NonNull final ShipmentSchedule schedule, @NonNul...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\process\CarrierAdviseProcessService.java
1
请在Spring Boot框架中完成以下Java代码
class PropertiesRabbitConnectionDetails implements RabbitConnectionDetails { private final RabbitProperties properties; private final @Nullable SslBundles sslBundles; PropertiesRabbitConnectionDetails(RabbitProperties properties, @Nullable SslBundles sslBundles) { this.properties = properties; this.sslBundles...
} @Override public @Nullable SslBundle getSslBundle() { Ssl ssl = this.properties.getSsl(); if (!ssl.determineEnabled()) { return null; } if (StringUtils.hasLength(ssl.getBundle())) { Assert.notNull(this.sslBundles, "SSL bundle name has been set but no SSL bundles found in context"); return this.ssl...
repos\spring-boot-4.0.1\module\spring-boot-amqp\src\main\java\org\springframework\boot\amqp\autoconfigure\PropertiesRabbitConnectionDetails.java
2
请在Spring Boot框架中完成以下Java代码
public SignatureVerificationResultType getSignatureVerificationResult() { return signatureVerificationResult; } /** * Sets the value of the signatureVerificationResult property. * * @param value * allowed object is * {@link SignatureVerificationResultType } * ...
* {@link String } * */ public void setSignatureVerificationOmittedErrorCode(String value) { this.signatureVerificationOmittedErrorCode = value; } /** * Gets the value of the signatureVerified property. * */ public boolean isSignatureVerified() { return...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\messaging\header\SignatureVerificationType.java
2
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescritpion() { return descritpion; } public void setDescritpion(String descritpion) { this.descritpion = descritpion; } public String getU...
} public int getPid() { return pid; } public void setPid(int pid) { this.pid = pid; } public String getMethod() { return method; } public void setMethod(String method) { this.method = method; } }
repos\springBoot-master\springboot-springSecurity3\src\main\java\com\us\example\domain\Permission.java
1
请完成以下Java代码
public class DuplicatesCounter { public static <T> Map<T, Long> countByClassicalLoop(List<T> inputList) { Map<T, Long> resultMap = new HashMap<>(); for (T element : inputList) { if (resultMap.containsKey(element)) { resultMap.put(element, resultMap.get(element) + 1L); ...
public static <T> Map<T, Long> countByForEachLoopWithMapCompute(List<T> inputList) { Map<T, Long> resultMap = new HashMap<>(); inputList.forEach(e -> resultMap.compute(e, (k, v) -> v == null ? 1L : v + 1L)); return resultMap; } public static <T> Map<T, Long> countByForEachLoopWithMapMer...
repos\tutorials-master\core-java-modules\core-java-collections-list-3\src\main\java\com\baeldung\list\duplicatescounter\DuplicatesCounter.java
1
请完成以下Java代码
public int getSalesRep_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_SalesRep_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_C_ElementValue getUser1() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_User1_ID, org.compiere.model.I_C_ElementV...
/** Set Nutzer 2. @param User2_ID User defined list element #2 */ @Override public void setUser2_ID (int User2_ID) { if (User2_ID < 1) set_Value (COLUMNNAME_User2_ID, null); else set_Value (COLUMNNAME_User2_ID, Integer.valueOf(User2_ID)); } /** Get Nutzer 2. @return User defined list element...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Movement.java
1
请完成以下Java代码
public class QueryTypesExamples { EntityManagerFactory emf; public QueryTypesExamples() { Map properties = new HashMap(); properties.put("hibernate.show_sql", "true"); properties.put("hibernate.format_sql", "true"); emf = Persistence.createEntityManagerFactory("jpa-query-types"...
namedQuery.setParameter("userId", id); return (UserEntity) namedQuery.getSingleResult(); } public UserEntity getUserByIdWithNativeQuery(Long id) { Query nativeQuery = getEntityManager().createNativeQuery("SELECT * FROM users WHERE id=:userId", UserEntity.class); nativeQuery.setParameter...
repos\tutorials-master\persistence-modules\java-jpa-2\src\main\java\com\baeldung\jpa\querytypes\QueryTypesExamples.java
1
请完成以下Java代码
public boolean isSameProduct(final I_I_Product importRecord) { final I_I_Product currentImportRecord = getCurrentImportRecord(); return currentImportRecord != null && Objects.equals(importRecord.getValue(), currentImportRecord.getValue()); } public boolean isCurrentProductIdSet() { return getCurrentProd...
} public ProductId getCurrentProductIdOrNull() { final I_I_Product currentImportRecord = getCurrentImportRecord(); return currentImportRecord != null ? ProductId.ofRepoIdOrNull(currentImportRecord.getM_Product_ID()) : null; } public void setCurrentProductId(@NonNull final ProductId productId) { fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\product\impexp\ProductImportContext.java
1
请在Spring Boot框架中完成以下Java代码
public ContentNegotiatingViewResolver viewResolver(ContentNegotiationManager cnManager) { ContentNegotiatingViewResolver cnvResolver = new ContentNegotiatingViewResolver(); cnvResolver.setContentNegotiationManager(cnManager); List<ViewResolver> resolvers = new ArrayList<>(); InternalRes...
StandardServletMultipartResolver multipartResolver = new StandardServletMultipartResolver(); return multipartResolver; } @Override public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { converters.add(new StringHttpMessageConverter()); converters.add(new ...
repos\tutorials-master\spring-web-modules\spring-mvc-basics-2\src\main\java\com\baeldung\spring\configuration\ApplicationConfiguration.java
2
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getIsbn() { return isbn; } public void ...
public void setAuthor(Author author) { this.author = author; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof Book)) { return false; } return id != null && id.equals(((Book) obj).id...
repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoViaFullJoins\src\main\java\com\bookstore\entity\Book.java
1
请完成以下Java代码
public PasswordSalt getPasswordSalt() { return passwordSalt; } public IdmEngineConfiguration setPasswordSalt(PasswordSalt passwordSalt) { this.passwordSalt = passwordSalt; return this; } @Override public IdmEngineConfiguration setSessionFactories(Map<Class<?>, SessionFactor...
this.eventListeners = eventListeners; return this; } @Override public IdmEngineConfiguration setTypedEventListeners(Map<String, List<FlowableEventListener>> typedEventListeners) { this.typedEventListeners = typedEventListeners; return this; } @Override public IdmEngineC...
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\IdmEngineConfiguration.java
1
请完成以下Java代码
default String getGroupId() { throw new UnsupportedOperationException("This container does not support retrieving the group id"); } /** * The 'id' attribute of a {@code @KafkaListener} or the bean name for spring-managed * containers. * @return the id or bean name. * @since 2.2.5 */ default String getLi...
*/ default boolean isInExpectedState() { return true; } /** * Stop the container after some exception so that {@link #isInExpectedState()} will * return false. * @param callback the callback. * @since 2.8 * @see #isInExpectedState() */ default void stopAbnormally(Runnable callback) { stop(callback...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\MessageListenerContainer.java
1
请完成以下Java代码
public abstract class AbstractListeningExecutor implements ListeningExecutor { private ListeningExecutorService service; @PostConstruct public void init() { this.service = MoreExecutors.listeningDecorator(ThingsBoardExecutors.newWorkStealingPool(getThreadPollSize(), getClass())); } @PreDe...
public ListenableFuture<?> executeAsync(Runnable task) { return service.submit(task); } @Override public void execute(Runnable command) { service.execute(command); } public ListeningExecutorService executor() { return service; } protected abstract int getThreadPoll...
repos\thingsboard-master\common\util\src\main\java\org\thingsboard\common\util\AbstractListeningExecutor.java
1
请完成以下Java代码
public void createDirectory(Path dir, FileAttribute<?>... attrs) throws IOException { throw new ReadOnlyFileSystemException(); } @Override public void delete(Path path) throws IOException { throw new ReadOnlyFileSystemException(); } @Override public void copy(Path source, Path target, CopyOption... options)...
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代码
private static void checkScope(OAuth2Authorization.Token<OAuth2AccessToken> authorizedAccessToken, Set<String> requiredScope) { Collection<String> authorizedScope = Collections.emptySet(); if (authorizedAccessToken.getClaims().containsKey(OAuth2ParameterNames.SCOPE)) { authorizedScope = (Collection<String>) a...
if (validRedirectUri.getFragment() != null) { return false; } } catch (URISyntaxException ex) { return false; } } return true; } private static void throwInvalidClientRegistration(String errorCode, String fieldName) { OAuth2Error error = new OAuth2Error(errorCode, "Invalid Client Registr...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\authentication\OAuth2ClientRegistrationAuthenticationProvider.java
1
请在Spring Boot框架中完成以下Java代码
public class ShipmentOrderLogRepository { private final ObjectMapper objectMapper = JsonObjectMapperHolder.sharedJsonObjectMapper(); public void save(@NonNull final ShipmentOrderLogCreateRequest logRequest) { final I_Carrier_ShipmentOrder_Log log = InterfaceWrapperHelper.newInstance(I_Carrier_ShipmentOrder_Log.cl...
@NonNull private String toJson(@NonNull final Object object) { if (object instanceof String) { return (String)object; } try { return objectMapper.writeValueAsString(object); } catch (final JsonProcessingException e) { return object.toString(); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\model\ShipmentOrderLogRepository.java
2
请完成以下Spring Boot application配置
spring: application: name: listener-demo server: port: ${random.int[10000,19999]} # 随机端口,方便启动多个消费者 # rocketmq 配置项,对应 RocketMQProperties
配置类 rocketmq: name-server: 127.0.0.1:9876 # RocketMQ Namesrv
repos\SpringBoot-Labs-master\labx-20\labx-20-sca-bus-rocketmq-demo-listener\src\main\resources\application.yml
2
请完成以下Java代码
public UserInfo grant(TokenParameter tokenParameter) { HttpServletRequest request = WebUtil.getRequest(); String tenantId = Func.toStr(request.getHeader(TokenUtil.TENANT_HEADER_KEY), TokenUtil.DEFAULT_TENANT_ID); // 开放平台来源 String sourceParameter = request.getParameter("source"); // 匹配是否有别名定义 String source =...
authUser = (AuthUser) authResponse.getData(); } else { throw new ServiceException("social grant failure, auth response is not success"); } // 组装数据 UserOauth userOauth = Objects.requireNonNull(BeanUtil.copyProperties(authUser, UserOauth.class)); userOauth.setSource(authUser.getSource()); userOauth.setTen...
repos\SpringBlade-master\blade-auth\src\main\java\org\springblade\auth\granter\SocialTokenGranter.java
1
请完成以下Java代码
public void addInputMethodListener (InputMethodListener l) { m_textArea.addInputMethodListener(l); } /** * Get text Input Method Requests * @return requests */ @Override public InputMethodRequests getInputMethodRequests() { return m_textArea.getInputMethodRequests(); } /** * Set Text Input Verifie...
* @param l */ @Override public void setInputVerifier (InputVerifier l) { m_textArea.setInputVerifier(l); } @Override public final ICopyPasteSupportEditor getCopyPasteSupport() { return copyPasteSupport; } } // CTextArea
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CTextArea.java
1
请完成以下Java代码
public void keyPressed(KeyEvent e) { } // keyPressed /** * key Released * @see java.awt.event.KeyListener#keyReleased(java.awt.event.KeyEvent) * @param e */ @Override public void keyReleased(KeyEvent e) { } // keyReleased /** * key Typed * @see java.awt.event.KeyListener#keyTyped(java.awt.event....
@Override public final ICopyPasteSupportEditor getCopyPasteSupport() { return copyPasteSupport; } @Override public boolean processKeyBinding(KeyStroke ks, KeyEvent e, int condition, boolean pressed) { // NOTE: overridden just to make it public return super.processKeyBinding(ks, e, condition, pressed); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CTextField.java
1
请完成以下Java代码
public static PlainPackingMaterialDocumentLineSource of(final I_M_HU_PackingMaterial packingMaterial, final int qty) { return of(packingMaterial, qty, null, 0); } public static PlainPackingMaterialDocumentLineSource of(final I_M_HU_PackingMaterial packingMaterial, final int qty, fina...
BigDecimal qtyLU; private PlainPackingMaterialDocumentLineSource(final I_M_HU_PackingMaterial packingMaterial, final int qty, @Nullable final ProductId lUProductId, final int qtyLU) { super(); Check.assumeNotNull(packingMaterial, "packingMaterial not null"); M_HU_Pa...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\PlainPackingMaterialDocumentLineSource.java
1
请完成以下Java代码
private static RuleServiceProvider instantiateJessInstance() throws ClassNotFoundException, ConfigurationException { // Load the rule service provider of the reference implementation. // Loading this class will automatically register this provider with the provider manager. Class.forName(RULE_SE...
while (itr.hasNext()) { Object obj = itr.next(); if (obj instanceof Answer) { log.info(obj.toString()); } } } private static void registerRules(String rulesFile, String rulesURI, RuleServiceProvider serviceProvider) throws ConfigurationException, Rule...
repos\tutorials-master\rule-engines-modules\jess\src\main\java\com\baeldung\rules\jess\JessWithJsr94.java
1
请在Spring Boot框架中完成以下Java代码
public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } public String getMerchantName() { return merchantName; } public void setMerchantName(String merchantName) { this.merchantNa...
public void setTradeStatus(TradeStatusEnum tradeStatus) { this.tradeStatus = tradeStatus; } public boolean isAuth() { return isAuth; } public void setAuth(boolean auth) { isAuth = auth; } public Map<String, PayTypeEnum> getPayTypeEnumMap() { return payTypeEnumM...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\vo\AuthInitResultVo.java
2
请完成以下Java代码
class UseZonedDateTime { ZonedDateTime getZonedDateTime(LocalDateTime localDateTime, ZoneId zoneId) { return ZonedDateTime.of(localDateTime, zoneId); } ZonedDateTime getZonedDateTimeUsingParseMethod(String parsableString) { return ZonedDateTime.parse(parsableString); } ZonedDateTi...
ZonedDateTime getStartOfDayFromZonedDateTime(ZonedDateTime zonedDateTime) { ZonedDateTime startOfDay = zonedDateTime.toLocalDateTime() .toLocalDate() .atStartOfDay(zonedDateTime.getZone()); return startOfDay; } ZonedDateTime getStartOfDayAtMinTime(ZonedDateTime zonedDate...
repos\tutorials-master\core-java-modules\core-java-8-datetime\src\main\java\com\baeldung\datetime\UseZonedDateTime.java
1
请在Spring Boot框架中完成以下Java代码
public String getPayKey() { return payKey; } public void setPayKey(String payKey) { this.payKey = payKey; } public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName; } public...
public String getSign() { return sign; } public void setSign(String sign) { this.sign = sign; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getPayType() { return payT...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\bo\F2FPayRequestBo.java
2
请完成以下Java代码
public class DynamicDataSourceModel { public DynamicDataSourceModel() { } public DynamicDataSourceModel(Object dbSource) { if (dbSource != null) { BeanUtils.copyProperties(dbSource, this); } } /** * id */ private java.lang.String id; /** * 数据源编码...
// /** // * 数据库名称 // */ // private java.lang.String dbName; /** * 用户名 */ private java.lang.String dbUsername; /** * 密码 */ private java.lang.String dbPassword; }
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\system\vo\DynamicDataSourceModel.java
1
请完成以下Java代码
protected void convertCommonTaskAttributes(XMLStreamReader xtr, Task task) { task.setName(xtr.getAttributeValue(null, CmmnXmlConstants.ATTRIBUTE_NAME)); String isBlockingString = xtr.getAttributeValue(null, CmmnXmlConstants.ATTRIBUTE_IS_BLOCKING); if (StringUtils.isNotEmpty(isBlockingString)) {...
String isExclusiveString = xtr.getAttributeValue(CmmnXmlConstants.FLOWABLE_EXTENSIONS_NAMESPACE, CmmnXmlConstants.ATTRIBUTE_IS_EXCLUSIVE); if (StringUtils.isNotEmpty(isExclusiveString)) { task.setExclusive(Boolean.valueOf(isExclusiveString)); } String isAsyncLeaveString ...
repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\TaskXmlConverter.java
1
请完成以下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_CM_Container_URL[") .append(get_ID()).append("]"); return sb.toString(); } /** S...
if (ii == null) return 0; return ii.intValue(); } /** Set Last Result. @param Last_Result Contains data on the last check result */ public void setLast_Result (String Last_Result) { set_Value (COLUMNNAME_Last_Result, Last_Result); } /** Get Last Result. @return Contains data on the last check ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Container_URL.java
1
请完成以下Java代码
private void checkExpression(@NonNull final ContextPath path, @NonNull final ContextVariablesExpression expression) { if (expression.isConstant()) {return;} try { for (final String contextVariable : expression.getRequiredContextVariables()) { if (checkContextVariableResolved(path, contextVariable)) ...
missingContextVariables.recordContextVariableUsed(path, contextVariable, isFound); return isFound || missingContextVariables.isKnownAsMissing(path, contextVariable); } private AdempiereException newException(final String message) { final AdempiereException exception = new AdempiereException(message); fillCon...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\health\ContextVariablesCheckCommand.java
1
请完成以下Java代码
public abstract class KafkaEvent extends ApplicationEvent { private static final long serialVersionUID = 1L; private static final String UNCHECKED = "unchecked"; private transient final Object container; public KafkaEvent(Object source, Object container) { super(source); this.container = container; } /**...
return (T) this.container; } /** * Get the container (source) that published the event. This is provided as an * alternative to {@link #getSource()} to avoid the need to cast in user code. The * type is required here to avoid a dependency tangle between the event and listener * packages. * @param type the ...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\event\KafkaEvent.java
1
请完成以下Java代码
public Filter saveFilter(Filter filter) { return commandExecutor.execute(new SaveFilterCmd(filter)); } public Filter getFilter(String filterId) { return commandExecutor.execute(new GetFilterCmd(filterId)); } public void deleteFilter(String filterId) { commandExecutor.execute(new DeleteFilterCmd(fi...
} @SuppressWarnings("unchecked") public <T> T singleResult(String filterId) { return (T) commandExecutor.execute(new ExecuteFilterSingleResultCmd(filterId)); } @SuppressWarnings("unchecked") public <T, Q extends Query<?, T>> T singleResult(String filterId, Q extendingQuery) { return (T) commandExecu...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\FilterServiceImpl.java
1
请完成以下Java代码
public static void doDBFunctionCall( @NonNull final DBFunction function, @Nullable final DataImportConfigId dataImportConfigId, final int recordId) { final String sql = new StringBuilder() .append("SELECT ") .append(function.getSchema()) .append(".") .append(function.getName()) .append("...
/** * Used to call import DB functions using c_dataimport_run_id */ public static void doDBFunctionCall( @NonNull final DBFunction function, @Nullable final DataImportRunId dataImportRunId) { final String sql = new StringBuilder() .append("SELECT ") .append(function.getSchema()) .append(".") ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\processing\DBFunctionHelper.java
1
请完成以下Java代码
public abstract class DeviceAwareSessionContext implements SessionContext { @Getter protected final UUID sessionId; @Getter private volatile DeviceId deviceId; @Getter private volatile TenantId tenantId; @Getter protected volatile TransportDeviceInfo deviceInfo; @Getter @Setter ...
@Override public void onDeviceUpdate(TransportProtos.SessionInfoProto sessionInfo, Device device, Optional<DeviceProfile> deviceProfileOpt) { this.sessionInfo = sessionInfo; this.deviceInfo.setDeviceProfileId(device.getDeviceProfileId()); this.deviceInfo.setDeviceType(device.getType()); ...
repos\thingsboard-master\common\transport\transport-api\src\main\java\org\thingsboard\server\common\transport\session\DeviceAwareSessionContext.java
1
请完成以下Java代码
public static String jsonObject() throws IOException { return JSON.std.with(JSON.Feature.PRETTY_PRINT_OUTPUT) .asString(new LinkedHashMap<String, Object>() {{ put("name", "John Doe"); put("age", 30); }}); } public static String jsonComposer() throws IOExc...
protected void register(ExtensionContext extensionContext) { extensionContext.insertProvider(new MyHandlerProvider()); } }) .build() .with(JSON.Feature.PRETTY_PRINT_OUTPUT) .asString(person); } public static Person objectDeserialization(St...
repos\tutorials-master\jackson-modules\jackson-jr\src\main\java\com\baeldung\jacksonjr\JacksonJrFeatures.java
1
请完成以下Java代码
public String getUserId() { return userId; } /** * @return the id of the resource if there * is only one {@link MissingAuthorization}, {@code null} otherwise * * @deprecated Use {@link #getMissingAuthorizations()} to get the id of the resource * of the {@link MissingAuthorization}(s). This metho...
first = false; } sBuilder.append(generateMissingAuthorizationMessage(missingAuthorization)); } return sBuilder.toString(); } /** * Generated exception message for the missing authorization. * * @param exceptionInfo to use */ private static String generateMissingAuthorizationMessag...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\AuthorizationException.java
1
请完成以下Java代码
public class MissingResourceException extends AdempiereException { private static final long serialVersionUID = -3485523266695546853L; /** * * @param resourceName name of the resource in terms of the respective endpoint. Example: {@code "billPartner"}. * @param resourceIdentifier identifier with which the look...
private static ITranslatableString buildMessage( @NonNull final String resourceName, @Nullable final String resourceIdentifier, @Nullable final ITranslatableString detail) { final TranslatableStringBuilder result = TranslatableStrings.builder(); result.append(TranslatableStrings.constant("The resource wit...
repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\exception\MissingResourceException.java
1
请完成以下Java代码
public void setLetterSubject (java.lang.String LetterSubject) { set_Value (COLUMNNAME_LetterSubject, LetterSubject); } /** Get Subject. @return Subject */ @Override public java.lang.String getLetterSubject () { return (java.lang.String)get_Value(COLUMNNAME_LetterSubject); } /** Set Datensatz-ID. @p...
set_ValueNoCheck (COLUMNNAME_Record_ID, null); else set_ValueNoCheck (COLUMNNAME_Record_ID, Integer.valueOf(Record_ID)); } /** Get Datensatz-ID. @return Direct internal record ID */ @Override public int getRecord_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Record_ID); if (ii == null) re...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\letters\model\X_C_Letter.java
1
请完成以下Java代码
public class WEBUI_ProcessHelper { private static final String SYSCONFIG_ALLOW_INFINIT_CAPACITY_TUS = "de.metas.ui.web.handlingunits.process.WEBUI_M_HU_Transform.AllowNewTUsWithInfiniteCapacity"; /** * This method can be used by process methods that are annotated with {@link de.metas.ui.web.process.descriptor.Proc...
/** * Creates a string of the form "PI-Version-Name (Qty x Included-PI)", e.g. "Palette (20 x IFCO)". * * @param huPIItem may not be {@code null} * @return */ public String buildHUPIItemString(@NonNull final I_M_HU_PI_Item huPIItem) { final IHandlingUnitsDAO handlingUnitsDAO = Services.get(IHandlingUnitsD...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\util\WEBUI_ProcessHelper.java
1
请完成以下Java代码
public PostingException setAcctSchema(final AcctSchema acctSchema) { _acctSchema = acctSchema; resetMessageBuilt(); return this; } public ITranslatableString getDetailMessage() { return _detailMessage; } /** * Sets the detail message. * <p> * NOTE: any other detail message which was appended by {@...
*/ public PostingException setPreserveDocumentPostedStatus() { _preserveDocumentPostedStatus = true; resetMessageBuilt(); return this; } public PostingException setDocLine(final DocLine<?> docLine) { _docLine = docLine; resetMessageBuilt(); return this; } public DocLine<?> getDocLine() { return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\doc\PostingException.java
1
请完成以下Java代码
public class SysTenantPackUser implements Serializable { private static final long serialVersionUID = 1L; /**id*/ @TableId(type = IdType.ASSIGN_ID) @Schema(description = "id") private java.lang.String id; /**租户产品包ID*/ @Excel(name = "租户产品包ID", width = 15) @Schema(description = "租户产品包ID")...
private transient String realname; private transient String packName; private transient String packCode; /** * 状态(申请状态0 正常状态1) */ private Integer status; public SysTenantPackUser(){ } public SysTenantPackUser(Integer tenantId, String packId, String userId) { th...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\entity\SysTenantPackUser.java
1
请完成以下Java代码
public SpringApplicationRunListener getRunListener(SpringApplication application) { return new SpringApplicationRunListener() { @Override public void contextLoaded(ConfigurableApplicationContext context) { throw new AbandonedRunException(context); } }; } private <T> GenericApplicationConte...
catch (AbandonedRunException ex) { ApplicationContext context = ex.getApplicationContext(); Assert.state(context instanceof GenericApplicationContext, () -> "AOT processing requires a GenericApplicationContext but got a " + ((context != null) ? context.getClass().getName() : "null")); return (...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\SpringApplicationAotProcessor.java
1
请完成以下Java代码
public int hashCode() { return Objects.hash(getFirstName(), getLastName(), getSeatNumber()); } @Override public String toString() { final StringBuilder toStringBuilder = new StringBuilder(getClass().getSimpleName()); toStringBuilder.append("{ id=").append(id); toStringBuilde...
Long getId() { return id; } String getFirstName() { return firstName; } String getLastName() { return lastName; } Integer getSeatNumber() { return seatNumber; } }
repos\tutorials-master\persistence-modules\spring-data-jpa-query\src\main\java\com\baeldung\boot\passenger\Passenger.java
1
请在Spring Boot框架中完成以下Java代码
public void create(DictDetail resources) { dictDetailRepository.save(resources); // 清理缓存 delCaches(resources); } @Override @Transactional(rollbackFor = Exception.class) public void update(DictDetail resources) { DictDetail dictDetail = dictDetailRepository.findById(resou...
@Override @Transactional(rollbackFor = Exception.class) public void delete(Long id) { DictDetail dictDetail = dictDetailRepository.findById(id).orElseGet(DictDetail::new); // 清理缓存 delCaches(dictDetail); dictDetailRepository.deleteById(id); } public void delCaches(DictDet...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\system\service\impl\DictDetailServiceImpl.java
2
请完成以下Java代码
public List<I_AD_JavaClass> retrieveJavaClasses( @CacheCtx final Properties ctx, final String javaClassTypeInternalName) { if (javaClassTypeInternalName == null) { return Collections.emptyList(); } final IQueryBL queryBL = Services.get(IQueryBL.class); return queryBL.createQueryBuilder(I_AD_JavaCla...
@Override @Cached(cacheName = I_AD_JavaClass_Type.Table_Name + "#by#" + I_AD_JavaClass_Type.COLUMNNAME_InternalName) public I_AD_JavaClass_Type retrieveJavaClassTypeOrNull( @CacheCtx final Properties ctx, final String internalName) { final IQueryBL queryBL = Services.get(IQueryBL.class); return queryBL.cre...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\javaclasses\impl\JavaClassDAO.java
1
请完成以下Java代码
public static void putIfAbsent() { HashMap<String, Product> productsByName = new HashMap<>(); Product chocolate = new Product("chocolate", "something sweet"); productsByName.putIfAbsent("E-Bike", chocolate); //Prior to Java 8: if(productsByName.containsKey("E-Bike")) { ...
} public static void compute() { HashMap<String, Product> productsByName = new HashMap<>(); Product eBike2 = new Product("E-Bike", "A bike with a battery"); productsByName.compute("E-Bike", (k,v) -> { if(v != null) { return v.addTagsOfOtherProduct(eBike2); ...
repos\tutorials-master\core-java-modules\core-java-collections-maps\src\main\java\com\baeldung\map\hashmapguide\Product.java
1
请完成以下Java代码
public void waitIsNotEmpty() throws InterruptedException { synchronized (IS_NOT_EMPTY) { IS_NOT_EMPTY.wait(); } } public void add(Message message) { queue.add(message); notifyIsNotEmpty(); } public Message poll() { Message mess = queue.poll(); ...
public Integer getSize() { return queue.size(); } private void notifyIsNotFull() { synchronized (IS_NOT_FULL) { IS_NOT_FULL.notify(); } } private void notifyIsNotEmpty() { synchronized (IS_NOT_EMPTY) { IS_NOT_EMPTY.notify(); } } }
repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-7\src\main\java\com\baeldung\producerconsumer\DataQueue.java
1
请在Spring Boot框架中完成以下Java代码
public class DocumentPostingUserNotificationService { private static final Topic NOTIFICATIONS_TOPIC = Topic.distributed("de.metas.acct.UserNotifications"); @NonNull private final INotificationBL userNotifications = Services.get(INotificationBL.class); public void notifyPostingError( @NonNull final UserId recip...
private static UserNotificationRequest toUserNotificationRequestOrNull( @NonNull final DocumentPostRequest postRequest, @NonNull final String message) { final UserId recipientUserId = postRequest.getOnErrorNotifyUserId(); if (recipientUserId == null) {return null;} return UserNotificationRequest.builder()...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\posting\DocumentPostingUserNotificationService.java
2
请完成以下Java代码
public void process(TransportProtos.SessionInfoProto sessionInfo, DeviceId gatewayId, List<GatewayMetadata> data, long serverReceiveTs) { states.computeIfAbsent(gatewayId, k -> new GatewayMetricsState(sessionInfo)).update(data, serverReceiveTs); } public void onDeviceUpdate(TransportProtos.SessionInfoP...
if (state.isEmpty()) { return; } var result = state.getStateResult(); var kvProto = TransportProtos.KeyValueProto.newBuilder() .setKey(GATEWAY_METRICS) .setType(TransportProtos.KeyValueType.JSON_V) .setJsonV(JacksonUtil.toString(result)...
repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\gateway\GatewayMetricsService.java
1
请完成以下Java代码
public class ProductItem { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.INCREMENT) int id; String name; String description; String status; double price; public ProductItem() { } public ProductItem(String name, String description, String status, double price) { ...
public void setDescription(String description) { this.description = description; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } public String getStatus() { return status; } public void setStatus(...
repos\tutorials-master\libraries-data-db-2\src\main\java\com\baeldung\libraries\jdo\query\ProductItem.java
1
请完成以下Java代码
LocalDate computeEasterDateWithGaussAlgorithm(int year) { int a = year % 19; int b = year % 4; int c = year % 7; int k = year / 100; int p = (13 + 8*k) / 25; int q = k / 4; int M = (15 - p + k - q) % 30; int N = (4 + k - q) % 7; int d = (19*a + M) ...
int n = t / 31; int o = t % 31; return LocalDate.of(year, n, o+1); } LocalDate computeEasterDateWithConwayAlgorithm(int year) { int s = year / 100; int t = year % 100; int a = t / 4; int p = s % 4; int x = (9 - 2*p) % 7; int y = (x + t + a) % 7; ...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-8\src\main\java\com\baeldung\algorithms\eastersunday\EasterDateCalculator.java
1
请完成以下Java代码
public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object v...
protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.s...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsPrefrenceAreaProductRelationExample.java
1
请完成以下Java代码
public boolean isOnlyAllowedTrxNamePrefixes() { return false; } @Override public ITrxConstraints addAllowedTrxNamePrefix(String trxNamePrefix) { return this; } @Override public ITrxConstraints removeAllowedTrxNamePrefix(String trxNamePrefix) { return this; } @Override public Set<String> getAllowed...
return 0; } @Override public ITrxConstraints setMaxSavepoints(int maxSavePoints) { return this; } @Override public boolean isAllowTrxAfterThreadEnd() { return false; } @Override public ITrxConstraints setAllowTrxAfterThreadEnd(boolean allow) { return this; } @Override public void reset() { } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\util\trxConstraints\api\impl\TrxConstraintsDisabled.java
1
请完成以下Java代码
public void append(final JdbcExportDataSource source) { final StringBuilder sqlInsert = new StringBuilder(); final StringBuilder sqlSelect = new StringBuilder(); final List<Object> sqlSelectParams = new ArrayList<Object>(); for (final Column field : fields.values()) { final String columnName = field.getC...
.append("\nFROM (").append(source.getSqlSelect()).append(") t") .toString(); final List<Object> sqlParams = new ArrayList<Object>(); sqlParams.addAll(sqlSelectParams); sqlParams.addAll(source.getSqlParams()); final String trxName = Trx.TRXNAME_None; final int count = DB.executeUpdateAndThrowExceptionOnF...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\data\export\api\impl\JdbcTableExportDataDestination.java
1
请完成以下Java代码
public Optional<QtyAvailableStatus> getQtyAvailableStatus() { Optional<QtyAvailableStatus> qtyAvailableStatus = this._qtyAvailableStatus; //noinspection OptionalAssignedToNull if (qtyAvailableStatus == null) { qtyAvailableStatus = this._qtyAvailableStatus = computeQtyAvailableStatus(); } return qtyAvail...
{ return singleProduct != null ? singleProduct.getProductId() : null; } @Nullable public Quantity getSingleQtyToDeliverOrNull() { return singleProduct != null ? singleProduct.getQtyToDeliver() : null; } @Nullable public Quantity getSingleQtyAvailableToPickOrNull() { return singleProduct != null ? single...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJobCandidateProducts.java
1
请在Spring Boot框架中完成以下Java代码
class ChatbotConfiguration { @Bean @Primary ChatClient primaryChatClient(OpenAiChatModel chatModel) { return ChatClient.create(chatModel); } @Bean ChatClient secondaryChatClient(AnthropicChatModel chatModel) { return ChatClient.create(chatModel); } @Bean ChatModel ...
) { AnthropicChatOptions chatOptions = anthropicChatModel.getDefaultOptions().copy(); chatOptions.setModel(tertiaryModelName); return AnthropicChatModel.builder() .anthropicApi(anthropicApi) .defaultOptions(chatOptions) .build(); } @Bean ChatClien...
repos\tutorials-master\spring-ai-modules\spring-ai-multiple-llms\src\main\java\com\baeldung\multillm\ChatbotConfiguration.java
2
请完成以下Java代码
public String getUserAgent () { return (String)get_Value(COLUMNNAME_UserAgent); } public I_W_ClickCount getW_ClickCount() throws RuntimeException { return (I_W_ClickCount)MTable.get(getCtx(), I_W_ClickCount.Table_Name) .getPO(getW_ClickCount_ID(), get_TrxName()); } /** Set Click Count. @param W_Clic...
} /** Set Web Click. @param W_Click_ID Individual Web Click */ public void setW_Click_ID (int W_Click_ID) { if (W_Click_ID < 1) set_ValueNoCheck (COLUMNNAME_W_Click_ID, null); else set_ValueNoCheck (COLUMNNAME_W_Click_ID, Integer.valueOf(W_Click_ID)); } /** Get Web Click. @return Individual...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_Click.java
1
请完成以下Java代码
public int getSO_DocTypeTarget_ID() { return get_ValueAsInt(COLUMNNAME_SO_DocTypeTarget_ID); } @Override public void setSO_TargetDocTypeReason (final @Nullable java.lang.String SO_TargetDocTypeReason) { set_Value (COLUMNNAME_SO_TargetDocTypeReason, SO_TargetDocTypeReason); } @Override public java.lang.St...
} @Override public java.lang.String getURL3() { return get_ValueAsString(COLUMNNAME_URL3); } @Override public void setValue (final java.lang.String Value) { set_Value (COLUMNNAME_Value, Value); } @Override public java.lang.String getValue() { return get_ValueAsString(COLUMNNAME_Value); } @Overr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner.java
1
请完成以下Java代码
public class ClassPathFileSystemWatcher implements InitializingBean, DisposableBean, ApplicationContextAware { private final FileSystemWatcher fileSystemWatcher; private final @Nullable ClassPathRestartStrategy restartStrategy; @SuppressWarnings("NullAway.Init") private ApplicationContext applicationContext; p...
public void afterPropertiesSet() throws Exception { if (this.restartStrategy != null) { FileSystemWatcher watcherToStop = null; if (this.stopWatcherOnRestart) { watcherToStop = this.fileSystemWatcher; } this.fileSystemWatcher.addListener( new ClassPathFileChangeListener(this.applicationContext, t...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\classpath\ClassPathFileSystemWatcher.java
1
请在Spring Boot框架中完成以下Java代码
public ResponseResult write(@RequestBody ShpInfo shpInfo) throws Exception{ return shpService.writeShp(shpInfo); } /** * 查询一个shp文件 * @param shpFilePath 文件绝对路径 * @param limit 指定显示多少条shp特征【features】 * @return * @throws Exception */ @GetMapping("/query") public Respo...
*/ @GetMapping("/show") public void show(@RequestParam(value = "path",required = true) String path, @RequestParam(value = "imagePath",required = false) String imagePath, @RequestParam(value = "color",required = false) String color, HttpServletRe...
repos\springboot-demo-master\GeoTools\src\main\java\com\et\geotools\controller\ShpController.java
2
请完成以下Java代码
public class OrderCheckupPrintingQueueHandler extends PrintingQueueHandlerAdapter { public static final transient OrderCheckupPrintingQueueHandler instance = new OrderCheckupPrintingQueueHandler(); private static final transient Logger logger = LogManager.getLogger(OrderCheckupPrintingQueueHandler.class); private ...
*/ @Override public boolean isApplyHandler(final I_C_Printing_Queue queueItem_IGNOED, final I_AD_Archive printOut) { return Services.get(IADTableDAO.class).isTableId(I_C_Order_MFGWarehouse_Report.Table_Name, printOut.getAD_Table_ID()); } private final void setUserToPrint(final I_C_Printing_Queue queueItem, fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\ordercheckup\printing\spi\impl\OrderCheckupPrintingQueueHandler.java
1
请完成以下Java代码
public void setDscntApldAmt(ActiveOrHistoricCurrencyAndAmount value) { this.dscntApldAmt = value; } /** * Gets the value of the cdtNoteAmt property. * * @return * possible object is * {@link ActiveOrHistoricCurrencyAndAmount } * */ public ActiveOrHis...
* * * <p> * Objects of the following type(s) are allowed in the list * {@link DocumentAdjustment1 } * * */ public List<DocumentAdjustment1> getAdjstmntAmtAndRsn() { if (adjstmntAmtAndRsn == null) { adjstmntAmtAndRsn = new ArrayList<DocumentAdjustment1>(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\RemittanceAmount1.java
1
请完成以下Java代码
public void setAuditFileFolder (final java.lang.String AuditFileFolder) { set_Value (COLUMNNAME_AuditFileFolder, AuditFileFolder); } @Override public java.lang.String getAuditFileFolder() { return get_ValueAsString(COLUMNNAME_AuditFileFolder); } @Override public void setDescription (final @Nullable java....
set_Value (COLUMNNAME_ExternalSystem_ID, ExternalSystem_ID); } @Override public int getExternalSystem_ID() { return get_ValueAsInt(COLUMNNAME_ExternalSystem_ID); } @Override public void setName (final java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getN...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_ExternalSystem_Config.java
1
请完成以下Java代码
public BlockingQueue<Runnable> getThreadPoolQueue() { return threadPoolQueue; } public void setThreadPoolQueue(BlockingQueue<Runnable> threadPoolQueue) { this.threadPoolQueue = threadPoolQueue; } public String getThreadPoolNamingPattern() { return getConfiguration().getThreadPo...
this.threadFactory = threadFactory; } public RejectedExecutionHandler getRejectedExecutionHandler() { return rejectedExecutionHandler; } public void setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler) { this.rejectedExecutionHandler = rejectedExecutionHandler...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\async\DefaultAsyncTaskExecutor.java
1
请完成以下Java代码
public abstract class AbstractEntity { @Id @GeneratedValue private Long id; private boolean deleted = false; @NotNull private String uuid = UUID.randomUUID().toString(); // // Versioning and created/updated timestamps protected static final int VERSION_INITIAL = 0; @Version private final int version = VER...
@Temporal(TemporalType.TIMESTAMP) private Date dateCreated; @Setter(AccessLevel.NONE) @Temporal(TemporalType.TIMESTAMP) private Date dateUpdated; @PreUpdate @PrePersist public void updateCreatedUpdated() { final Date now = new Date(); this.dateUpdated = now; if (dateCreated == null) { dateCreated =...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.server\src\main\java\de\metas\vertical\pharma\msv3\server\jpa\AbstractEntity.java
1
请完成以下Java代码
public boolean supportsContext(Observation.Context context) { return context instanceof AuthorizationObservationContext<?>; } private String getAuthenticationType(AuthorizationObservationContext<?> context) { if (context.getAuthentication() == null) { return "n/a"; } return context.getAuthentication().get...
} return String.valueOf(context.getAuthorizationResult().isGranted()); } private String getAuthorities(AuthorizationObservationContext<?> context) { if (context.getAuthentication() == null) { return "n/a"; } return String.valueOf(context.getAuthentication().getAuthorities()); } private String getDecisi...
repos\spring-security-main\core\src\main\java\org\springframework\security\authorization\AuthorizationObservationConvention.java
1
请完成以下Java代码
public class X_S_TimeType extends PO implements I_S_TimeType, I_Persistent { /** * */ private static final long serialVersionUID = 20090915L; /** Standard Constructor */ public X_S_TimeType (Properties ctx, int S_TimeType_ID, String trxName) { super (ctx, S_TimeType_ID, trxName); /** if...
Comment or Hint */ public void setHelp (String Help) { set_Value (COLUMNNAME_Help, Help); } /** Get Comment/Help. @return Comment or Hint */ public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public v...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_S_TimeType.java
1
请在Spring Boot框架中完成以下Java代码
private void setFirstCacheConfig(LayeringCacheManager layeringCacheManager) { // 设置默认的一级缓存配置 String specification = this.cacheProperties.getCaffeine().getSpec(); if (StringUtils.hasText(specification)) { layeringCacheManager.setCaffeineSpec(CaffeineSpec.parse(specification)); ...
// 设置每个二级缓存的过期时间和自动刷新时间 Map<String, SecondaryCacheSetting> secondaryCacheSettings = new HashMap<>(); secondaryCacheSettings.put("people", new SecondaryCacheSetting(selectCacheTimeout, selectCacheRefresh)); secondaryCacheSettings.put("people1", new SecondaryCacheSetting(5, 0, false,true)); ...
repos\spring-boot-student-master\spring-boot-student-cache-redis-caffeine\src\main\java\com\xiaolyuh\config\CacheConfig.java
2
请在Spring Boot框架中完成以下Java代码
protected final RabbitProperties getRabbitProperties() { return this.rabbitProperties; } /** * Configure the specified rabbit listener container factory. The factory can be * further tuned and default settings can be overridden. * @param factory the {@link AbstractRabbitListenerContainerFactory} instance to ...
} factory.setObservationEnabled(configuration.isObservationEnabled()); ListenerRetry retryConfig = configuration.getRetry(); if (retryConfig.isEnabled()) { RetryInterceptorBuilder<?, ?> builder = (retryConfig.isStateless()) ? RetryInterceptorBuilder.stateless() : RetryInterceptorBuilder.stateful(); bui...
repos\spring-boot-4.0.1\module\spring-boot-amqp\src\main\java\org\springframework\boot\amqp\autoconfigure\AbstractRabbitListenerContainerFactoryConfigurer.java
2
请完成以下Java代码
public int getC_Order_Cost_ID() { return get_ValueAsInt(COLUMNNAME_C_Order_Cost_ID); } @Override public I_C_OrderLine getC_OrderLine() { return get_ValueAsPO(COLUMNNAME_C_OrderLine_ID, I_C_OrderLine.class); } @Override public void setC_OrderLine(final I_C_OrderLine C_OrderLine) { set_ValueFromPO(COLUM...
} @Override public BigDecimal getLineNetAmt() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_LineNetAmt); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setM_Product_ID (final int M_Product_ID) { if (M_Product_ID < 1) set_Value (COLUMNNAME_M_Product_ID, null); else ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Order_Cost_Detail.java
1
请完成以下Java代码
public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getCustomerName() { return customerName; } public void setCustomerName(String customerName) { this.customerName = customerName; } public String getCusto...
return customerEmail; } public void setCustomerEmail(String customerEmail) { this.customerEmail = customerEmail; } public Set<OrderItem> getOrderItems() { return orderItems; } public void setOrderItems(Set<OrderItem> orderItems) { this.orderItems = orderItems; } }
repos\Spring-Boot-Advanced-Projects-main\Springboot-Multiple-DataStructure\src\main\java\spring\mvc\orders\entities\Order.java
1
请完成以下Java代码
default CookieSameSiteSupplier when(Predicate<Cookie> predicate) { Assert.notNull(predicate, "'predicate' must not be null"); return (cookie) -> predicate.test(cookie) ? getSameSite(cookie) : null; } /** * Return a new {@link CookieSameSiteSupplier} that always returns * {@link SameSite#NONE}. * @return th...
* {@link SameSite#STRICT}. * @return the supplier instance */ static CookieSameSiteSupplier ofStrict() { return of(SameSite.STRICT); } /** * Return a new {@link CookieSameSiteSupplier} that always returns the given * {@link SameSite} value. * @param sameSite the value to return * @return the supplier ...
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\servlet\CookieSameSiteSupplier.java
1
请完成以下Java代码
public class TableColumnPath implements ITableColumnPath { private String valueTableName; private String valueColumnName; private int valueDisplayType; private String keyTableName; private String keyColumnName; private int recordId; final private List<ITableColumnPathElement> elements = new ArrayList<ITableColum...
} @Override public String getKeyTableName() { return keyTableName; } @Override public String getKeyColumnName() { return keyColumnName; } @Override public int getRecordId() { return recordId; } @Override public String toString() { return "TableColumnPath [valueTableName=" + valueTableName + "...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\model\TableColumnPath.java
1