instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class GroupEntity implements Group, Serializable, DbEntity, HasDbRevision { private static final long serialVersionUID = 1L; protected String id; protected int revision; protected String name; protected String type; public GroupEntity() { } public GroupEntity(String id) { this.id = id...
this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getType() { return type; } public void setType(String type) { this.type = type; } public int getRevision() { return revision; } public void setRevisio...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\GroupEntity.java
1
请完成以下Java代码
public abstract class BaseNativeQuery<T extends NativeQuery<?, ?>, U> implements NativeQuery<T, U>, Serializable { private static final long serialVersionUID = 1L; protected enum ResultType { LIST, LIST_PAGE, SINGLE_RESULT, COUNT } protected int maxResults = -1; protected int firstResult ...
String orderBy = (String) parameterMap.get("orderBy"); if (orderBy != null && !"".equals(orderBy)) { orderBy = "RES." + orderBy; } else { orderBy = "RES.ID_ asc"; } parameterMap.put("orderBy", "order by " + orderBy); parameterMap.put("orderByForWindow", "o...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\query\BaseNativeQuery.java
1
请完成以下Java代码
public final class AdImageId implements RepoIdAware { @JsonCreator @Nullable public static AdImageId ofNullableObject(@Nullable final Object obj) { if (obj == null) { return null; } try { final int id = NumberUtils.asInt(obj, -1); return ofRepoIdOrNull(id); } catch (final Exception ex) { ...
{ return repoId > 0 ? ofRepoId(repoId) : null; } private final int repoId; public AdImageId(final int repoId) { Check.assumeGreaterThanZero(repoId, "AD_Image_ID"); this.repoId = repoId; } @JsonValue @Override public int getRepoId() { return repoId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\image\AdImageId.java
1
请在Spring Boot框架中完成以下Java代码
public class Article implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "article_id") private int articleId; @Column(name = "title") private String title; @Column(name = "category") private Str...
public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } }
repos\SpringBootBucket-master\springboot-hibernate\src\main\java\com\xncoding\pos\dao\entity\Article.java
2
请完成以下Java代码
public IViewRowType getType() { return DefaultRowType.Row; } @Override public boolean isProcessed() { return false; } @Override public DocumentPath getDocumentPath() { return documentPath; } public TableRecordReference getTableRecordReference() { return createTableRecordReferenceFromShipmentSched...
{ return false; } @Override public IViewRowAttributes getAttributes() throws EntityNotFoundException { throw new EntityNotFoundException("Row does not support attributes"); } @Override public ViewId getIncludedViewId() { return includedViewId; } public ShipmentScheduleId getShipmentScheduleId() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\picking\packageable\PackageableRow.java
1
请完成以下Java代码
private String convertLessThanOneThousand(int number) { String soFar; // Below 20 if (number % 100 < 20) { soFar = numNames[number % 100]; number /= 100; } else { soFar = numNames[number % 10]; number /= 10; soFar = tensNames[number % 10] + " " + soFar; number /= 10; } soFar = hundredName...
long dollars = Long.parseLong(amount.substring(0, newpos)); sb.append(convert(dollars)); for (int i = 0; i < oldamt.length(); i++) { if (pos == i) // we are done { String cents = oldamt.substring(i + 1); sb.append(' ').append(cents).append("/100"); break; } } return sb.toString(); } // get...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\util\AmtInWords_PL.java
1
请完成以下Java代码
public class BPartnerProductStatsEventSender { public static final Topic TOPIC_InOut = Topic.distributed("de.metas.bpartner.product.stats.updates.inout"); public static final Topic TOPIC_Invoice = Topic.distributed("de.metas.bpartner.product.stats.updates.invoice"); private static final String EVENT_PROPERTY_Conten...
return Event.builder() .putProperty(EVENT_PROPERTY_Content, objectSerializer.serialize(event)) .shallBeLogged() .build(); } public static InOutChangedEvent extractInOutChangedEvent(@NonNull final Event event) { return extractEvent(event, InOutChangedEvent.class); } public static InvoiceChangedEvent...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\bpartner\product\stats\BPartnerProductStatsEventSender.java
1
请完成以下Java代码
public static class StringCacheKey implements CacheKey{ private final String value; public StringCacheKey(String value) { this.value = value; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass(...
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; LongCacheKey that = (LongCacheKey) o; return value.equals(that.value); } @Override public int hashCode() { ...
repos\tutorials-master\core-java-modules\core-java-collections-maps-5\src\main\java\com\baeldung\map\multikey\WrapperInterfaceUserCache.java
1
请完成以下Java代码
public void setQtyReserved (BigDecimal QtyReserved) { set_ValueNoCheck (COLUMNNAME_QtyReserved, QtyReserved); } /** Get Reserved Quantity. @return Reserved Quantity */ public BigDecimal getQtyReserved () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_QtyReserved); if (bd == null) return Env.ZE...
@return Bar Code (Universal Product Code or its superset European Article Number) */ public String getUPC () { return (String)get_Value(COLUMNNAME_UPC); } /** Set Search Key. @param Value Search key for the record in the format required - must be unique */ public void setValue (String Value) { se...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_RV_WarehousePrice.java
1
请完成以下Java代码
public boolean isCollecting() { return params != null; } /** * Directly append all sqlParams from the given {@code sqlQueryFilter}. * * @param sqlQueryFilter * */ public void collectAll(@NonNull final ISqlQueryFilter sqlQueryFilter) { final List<Object> sqlParams = sqlQueryFilter.getSqlParams(Env....
/** * Collects given SQL value and returns an SQL placeholder, i.e. "?" * * In case this is in non-collecting mode, the given SQL value will be converted to SQL code and it will be returned. * The internal list won't be affected, because it does not exist. */ public String placeholder(@Nullable final Object...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\sql\SqlParamsCollector.java
1
请在Spring Boot框架中完成以下Java代码
default List<EntityLink> findEntityLinksByScopeIdAndType(String scopeId, String scopeType, String linkType) { return createInternalEntityLinkQuery() .scopeId(scopeId) .scopeType(scopeType) .linkType(linkType) .list(); } default List<Entity...
.referenceScopeId(referenceScopeId) .referenceScopeType(scopeType) .linkType(linkType) .list(); } InternalEntityLinkQuery<EntityLink> createInternalEntityLinkQuery(); EntityLink createEntityLink(); void insertEntityLink(EntityLink entityLink); ...
repos\flowable-engine-main\modules\flowable-entitylink-service-api\src\main\java\org\flowable\entitylink\api\EntityLinkService.java
2
请在Spring Boot框架中完成以下Java代码
public static class ServletUiConfiguration { @Configuration(proxyBeanMethods = false) public static class AdminUiWebMvcConfig implements WebMvcConfigurer { private final AdminServerUiProperties adminUi; private final AdminServerProperties adminServer; private final ApplicationContext applicationContext...
@Override public void addResourceHandlers( org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry registry) { registry.addResourceHandler(this.adminServer.path("/**")) .addResourceLocations(this.adminUi.getResourceLocations()) .setCacheControl(this.adminUi.getCache().toCacheCont...
repos\spring-boot-admin-master\spring-boot-admin-server-ui\src\main\java\de\codecentric\boot\admin\server\ui\config\AdminServerUiAutoConfiguration.java
2
请完成以下Java代码
public int getZipode() { return zipode; } public void setZipode(int zipode) { this.zipode = zipode; } public String getStreet() { return street; } public void setStreet(String street) { this.street = street; }
public String getCity() { return city; } public void setCity(String city) { this.city = city; } public Person getPerson() { return person; } public void setPerson(Person person) { this.person = person; } }
repos\tutorials-master\persistence-modules\hibernate-annotations-2\src\main\java\com\baeldung\hibernate\mapsid\Address.java
1
请完成以下Java代码
default Instant getIssuedAt() { return getClaimAsInstant(OAuth2TokenIntrospectionClaimNames.IAT); } /** * Returns a timestamp {@code (nbf)} indicating when the token is not to be used * before * @return a timestamp indicating when the token is not to be used before */ @Nullable default Instant getNotBefo...
*/ @Nullable default List<String> getAudience() { return getClaimAsStringList(OAuth2TokenIntrospectionClaimNames.AUD); } /** * Returns the issuer {@code (iss)} of the token * @return the issuer of the token */ @Nullable default URL getIssuer() { return getClaimAsURL(OAuth2TokenIntrospectionClaimNames.I...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\OAuth2TokenIntrospectionClaimAccessor.java
1
请完成以下Java代码
private String getAccessToken() { return getAuthResponse().getAccessToken(); } private synchronized JsonAuthResponse getAuthResponse() { JsonAuthResponse authResponse = _authResponse; if (authResponse == null || authResponse.isExpired()) { authResponse = _authResponse = authenticate(config); } ...
.setParameter("errorDescription", authResponse.getErrorDescription()); } } catch (final AdempiereException ex) { throw ex; } catch (final Exception ex) { final Throwable cause = AdempiereException.extractCause(ex); throw new AdempiereException(MSG_AUTHORIZATION_FAILED, cause); } } private s...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\client\SecurPharmClientAuthenticator.java
1
请完成以下Java代码
public Criteria andProductAttrNotBetween(String value1, String value2) { addCriterion("product_attr not between", value1, value2, "productAttr"); return (Criteria) this; } } public static class Criteria extends GeneratedCriteria { protected Criteria() { super...
} protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } e...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\OmsCartItemExample.java
1
请完成以下Java代码
class WebExpressionConfigAttribute implements ConfigAttribute, EvaluationContextPostProcessor<FilterInvocation> { private final Expression authorizeExpression; private final EvaluationContextPostProcessor<FilterInvocation> postProcessor; WebExpressionConfigAttribute(Expression authorizeExpression, EvaluationCo...
public EvaluationContext postProcess(EvaluationContext context, FilterInvocation fi) { return (this.postProcessor != null) ? this.postProcessor.postProcess(context, fi) : context; } @Override public String getAttribute() { return null; } @Override public String toString() { return this.authorizeExpression...
repos\spring-security-main\access\src\main\java\org\springframework\security\web\access\expression\WebExpressionConfigAttribute.java
1
请在Spring Boot框架中完成以下Java代码
public void configure() throws Exception { //@formatter:off errorHandler(defaultErrorHandler()); onException(Exception.class) .to(direct(MF_ERROR_ROUTE_ID)); from(direct(PUSH_BOM_PRODUCTS_ROUTE_ID)) .routeId(PUSH_BOM_PRODUCTS_ROUTE_ID) .log("Route invoked!") .unmarshal(setupJacksonDataFormatFo...
} private void processExternalSystemInfo(@NonNull final Exchange exchange) { final PushBOMsRouteContext context = ProcessorHelper.getPropertyOrThrowError(exchange, GRSSignumConstants.ROUTE_PROPERTY_PUSH_BOMs_CONTEXT, PushBOMsRouteContext.class); final JsonExternalSyst...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\from_grs\bom\PushBOMProductsRouteBuilder.java
2
请在Spring Boot框架中完成以下Java代码
public List<Person> findAll() { personMapper.findAll(); personMapper.findAll(); personMapper.findAll(); personMapper.findAll(); personMapper.findAll(); personMapper.findAll(); personMapper.findAll(); personMapper.findAll(); personMapper.findAll(); ...
public void insert(Person person) { personMapper.insert(person); } @Override @Transactional(rollbackFor = Exception.class) public int updateAge(long id) { int result = personMapper.updateAge(id); int i = atomicInteger.getAndIncrement(); System.out.println(i); try...
repos\spring-boot-student-master\spring-boot-student-mybatis-plus\src\main\java\com\xiaolyuh\service\impl\PersonServiceImpl.java
2
请完成以下Java代码
private int getOnly_Product_ID() { if (!Env.isSOTrx(Env.getCtx(), m_WindowNo)) { return 0; // No product restrictions for PO } // String only_Product = Env.getContext(Env.getCtx(), m_WindowNo, "M_Product_ID", true); int only_Product_ID = 0; try { if (only_Product != null && only_Product.length()...
return; } final LocatorId locatorId = Services.get(IWarehouseBL.class).getOrCreateDefaultLocatorId(warehouseId); if (locatorId == null) { return; } setValue(locatorId.getRepoId()); } // metas @Override public boolean isAutoCommit() { return true; } @Override public ICopyPasteSupportEditor ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VLocator.java
1
请完成以下Java代码
private Object getCSRFTokenSession(HttpSession session) { return session.getAttribute(CsrfConstants.CSRF_TOKEN_SESSION_ATTR_NAME); } private String getCSRFTokenHeader(HttpServletRequest request) { return request.getHeader(CsrfConstants.CSRF_TOKEN_HEADER_NAME); } private Object getSessionMutex(HttpSess...
if (request.getPathInfo() != null) { path = path + request.getPathInfo(); } return path; } private Set<String> parseURLs(String urlString) { Set<String> urlSet = new HashSet<>(); if (urlString != null && !urlString.isEmpty()) { String values[] = urlString.split(","); for (String...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\filter\CsrfPreventionFilter.java
1
请完成以下Java代码
public void registerCallout() { Services.get(IProgramaticCalloutProvider.class).registerAnnotatedCallout(this); } /** * Note that because of C_Payment.C_Order_ID's validation rule we can one have only prepay orders in this field. * Before the payment is made, the prepay-order is not even completed, so the pay...
record.setIsPrepayment(true); record.setWriteOffAmt(BigDecimal.ZERO); record.setIsOverUnderPayment(false); record.setOverUnderAmt(BigDecimal.ZERO); // record.setPayAmt(priceActual); record.setDiscountAmt(discountAmount); paymentBL.validateDocTypeIsInSync(record); } @DocValidate(timings = { ModelValid...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\payment\C_Payment.java
1
请在Spring Boot框架中完成以下Java代码
public void addListener(TenantId tenantId, EntityId listenerId, Consumer<DeviceProfile> profileListener, BiConsumer<DeviceId, DeviceProfile> deviceListener) { if (profileListener != null) { profileListeners.computeIfAbsent(tenantId, id -> new C...
ConcurrentMap<EntityId, Consumer<DeviceProfile>> tenantListeners = profileListeners.get(profile.getTenantId()); if (tenantListeners != null) { tenantListeners.forEach((id, listener) -> listener.accept(profile)); } } private void notifyDeviceListeners(TenantId tenantId, DeviceId devi...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\profile\DefaultTbDeviceProfileCache.java
2
请完成以下Java代码
public void setC_LicenseFeeSettings_ID (final int C_LicenseFeeSettings_ID) { if (C_LicenseFeeSettings_ID < 1) set_ValueNoCheck (COLUMNNAME_C_LicenseFeeSettings_ID, null); else set_ValueNoCheck (COLUMNNAME_C_LicenseFeeSettings_ID, C_LicenseFeeSettings_ID); } @Override public int getC_LicenseFeeSettings_...
set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setPointsPrecision (final int PointsPrecision) { set_Value (COLUMNNAME_PointsPrecision, PointsPrecision); } @Override public int getPointsPrecision() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\commission\model\X_C_LicenseFeeSettings.java
1
请在Spring Boot框架中完成以下Java代码
public class CityRepository { private ConcurrentMap<Long, City> repository = new ConcurrentHashMap<>(); private static final AtomicLong idGenerator = new AtomicLong(0); public Long save(City city) { Long id = idGenerator.incrementAndGet(); city.setId(id); repository.put(id, city);...
public City findCityById(Long id) { return repository.get(id); } public Long updateCity(City city) { repository.put(city.getId(), city); return city.getId(); } public Long deleteCity(Long id) { repository.remove(id); return id; } }
repos\springboot-learning-example-master\springboot-webflux-2-restful\src\main\java\org\spring\springboot\dao\CityRepository.java
2
请完成以下Java代码
private void assertRestAPIColumnNames(final String tableName, final Collection<String> columnNames) { if (columnNames.isEmpty()) { return; } final RESTApiTableInfo tableInfo = repository.getByTableNameOrNull(tableName); final Collection<String> notValidColumnNames; if (tableInfo == null) { notVal...
private CustomColumnsJsonValues convertToJsonValues(final @NonNull PO record, final ZoneId zoneId) { final POInfo poInfo = record.getPOInfo(); final ImmutableMap.Builder<String, Object> map = ImmutableMap.builder(); streamCustomRestAPIColumns(poInfo) .forEach(customColumn -> { final String columnName ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\custom_columns\CustomColumnService.java
1
请完成以下Java代码
public boolean contains(String id) { return cache.containsKey(id); } @Override public void add(String id, ProcessDefinitionInfoCacheObject obj) { cache.put(id, obj); } @Override public void remove(String id) { cache.remove(id); } @Override public void clear...
if (cache.containsKey(processDefinitionId)) { cacheObject = cache.get(processDefinitionId); } else { cacheObject = new ProcessDefinitionInfoCacheObject(); cacheObject.setRevision(0); cacheObject.setInfoNode(objectMapper.createObjectNode()); } Proc...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\persistence\deploy\ProcessDefinitionInfoCache.java
1
请完成以下Java代码
public class ProductQty { private final int productId; private final BigDecimal qty; public ProductQty(int productId, BigDecimal qty) { super(); this.productId = productId; this.qty = qty; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + productI...
} @Override public String toString() { return "ProductQty [productId=" + productId + ", qty=" + qty + "]"; } public int getProductId() { return productId; } public BigDecimal getQty() { return qty; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\adempiere\model\ProductQty.java
1
请完成以下Java代码
public void deleteAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); List<AttachmentEntity> attachments = findAttachmentsByTaskId(taskId); boolean dispatchEvents = getEventDispatcher().isEnabled(); String processInstanceId = null; String processDefinitionId = null; ...
ActivitiEventType.ENTITY_DELETED, attachment, executionId, processInstanceId, processDefinitionId ) ); } } } protected void checkHistoryEnabled() { if ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\AttachmentEntityManagerImpl.java
1
请在Spring Boot框架中完成以下Java代码
public static class Jedis { /** * Jedis pool configuration. */ private final Pool pool = new Pool(); public Pool getPool() { return this.pool; } } /** * Lettuce client properties. */ public static class Lettuce { /** * Shutdown timeout. */ private Duration shutdownTimeout = Durati...
} public static class Refresh { /** * Whether to discover and query all cluster nodes for obtaining the * cluster topology. When set to false, only the initial seed nodes are * used as sources for topology discovery. */ private boolean dynamicRefreshSources = true; /** * Clust...
repos\spring-boot-4.0.1\module\spring-boot-data-redis\src\main\java\org\springframework\boot\data\redis\autoconfigure\DataRedisProperties.java
2
请完成以下Java代码
public static synchronized void destroy() { if (isInitialized()) { Map<String, ProcessEngine> engines = new HashMap<String, ProcessEngine>(processEngines); processEngines = new HashMap<String, ProcessEngine>(); for (String processEngineName : engines.keySet()) { ...
processEngineInfosByResourceUrl.clear(); processEngineInfos.clear(); setInitialized(false); } } public static boolean isInitialized() { return isInitialized; } public static void setInitialized(boolean isInitialized) { ProcessEngines.isInitialized = isI...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\ProcessEngines.java
1
请完成以下Java代码
public long iterateUsingKeySetAndEnhanceForLoop() { return mapIteration.iterateUsingKeySetAndEnhanceForLoop(map); } @Benchmark public long iterateUsingStreamAPIAndEntrySet() { return mapIteration.iterateUsingStreamAPIAndEntrySet(map); } @Benchmark public long iterateUsingStream...
} @Benchmark public long iterateUsingMapIteratorApacheCollection() { return mapIteration.iterateUsingMapIteratorApacheCollection(iterableMap); } @Benchmark public long iterateEclipseMap() throws IOException { return mapIteration.iterateEclipseMap(mutableMap); } @Benchmark ...
repos\tutorials-master\core-java-modules\core-java-collections-maps\src\main\java\com\baeldung\map\iteration\MapIterationBenchmark.java
1
请在Spring Boot框架中完成以下Java代码
public class PricingDAO implements IPricingDAO { private static final Logger logger = LogManager.getLogger(PricingDAO.class); private final CCache<Integer, ImmutableList<PricingRuleDescriptor>> // pricingRuleDescriptorsCache = CCache.<Integer, ImmutableList<PricingRuleDescriptor>> builder() .cacheName("pricingRu...
.map(this::toPricingRuleDescriptorNoFail) .filter(Objects::nonNull) .collect(GuavaCollectors.distinctBy(PricingRuleDescriptor::getPricingRuleClass)) .collect(ImmutableList.toImmutableList()); } private PricingRuleDescriptor toPricingRuleDescriptorNoFail(final I_C_PricingRule record) { try { retur...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\service\impl\PricingDAO.java
2
请完成以下Java代码
public class HUConsolidationJob { @NonNull HUConsolidationJobId id; @NonNull BPartnerLocationId shipToBPLocationId; @NonNull ImmutableSet<PickingSlotId> pickingSlotIds; @NonNull @With HUConsolidationJobStatus docStatus; @Nullable @With UserId responsibleId; @Nullable @With HUConsolidationTarget currentTarget; ...
public BPartnerId getCustomerId() {return shipToBPLocationId.getBpartnerId();} @NonNull public HUConsolidationTarget getCurrentTargetNotNull() { return Check.assumeNotNull(currentTarget, "job has a current target"); } public boolean isProcessed() {return docStatus.isProcessed();} public boolean containsPicki...
repos\metasfresh-new_dawn_uat\backend\de.metas.hu_consolidation.mobile\src\main\java\de\metas\hu_consolidation\mobile\job\HUConsolidationJob.java
1
请完成以下Java代码
public int getRevision() { return revision; } public void setRevision(int revision) { this.revision = revision; } public int getRevisionNext() { return revision + 1; } @SuppressWarnings("unchecked") public <T extends Query<?, ?>> Filter extend(T extendingQuery) { ensureNotNull(NotValidE...
} protected FilterEntity copyFilter() { FilterEntity copy = new FilterEntity(getResourceType()); copy.setName(getName()); copy.setOwner(getOwner()); copy.setQueryInternal(getQueryInternal()); copy.setPropertiesInternal(getPropertiesInternal()); return copy; } public void postLoad() { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\FilterEntity.java
1
请完成以下Java代码
public CmmnExternalWorkerTransitionBuilder createCmmnExternalWorkerTransitionBuilder(String externalJobId, String workerId) { return new CmmnExternalWorkerTransitionBuilderImpl(commandExecutor, externalJobId, workerId); } @Override public void unacquireExternalWorkerJob(String jobId, String wor...
public <T> T executeCommand(Command<T> command) { if (command == null) { throw new FlowableIllegalArgumentException("The command is null"); } return commandExecutor.execute(command); } public <T> T executeCommand(CommandConfig config, Command<T> command) { if (config...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\CmmnManagementServiceImpl.java
1
请完成以下Java代码
public class TbLwM2mRedisClientOtaInfoStore implements TbLwM2MClientOtaInfoStore { private static final String OTA_EP = "OTA#EP#"; private final RedisConnectionFactory connectionFactory; public TbLwM2mRedisClientOtaInfoStore(RedisConnectionFactory connectionFactory) { this.connectionFactory = conn...
put(OtaPackageType.FIRMWARE, info); } @Override public LwM2MClientSwOtaInfo getSw(String endpoint) { return getLwM2MClientOtaInfo(OtaPackageType.SOFTWARE, endpoint, LwM2MClientSwOtaInfo.class); } @Override public void putSw(LwM2MClientSwOtaInfo info) { put(OtaPackageType.SOFTWA...
repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\store\TbLwM2mRedisClientOtaInfoStore.java
1
请完成以下Java代码
public <I, O> O put( @NonNull final I requestBody, @NonNull final ParameterizedTypeReference<O> returnType, @NonNull final String url) { try (final MDCCloseable ignored = MDC.putCloseable("httpMethod", "PUT"); final MDCCloseable ignored1 = MDC.putCloseable("url", url); final MDCCloseable ignored2 = ...
.setParameter("url", url); } } private RestTemplate createRestTemplate() { return new RestTemplateBuilder().rootUri(BASE_URL).build(); } private HttpHeaders createHeaders() { final HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.setAccept(ImmutableList.of(MediaType.APPLICATION_JSON)); httpHea...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\cleverreach\src\main\java\de\metas\marketing\gateway\cleverreach\CleverReachLowLevelClient.java
1
请完成以下Java代码
public class WEBUI_SalesOrder_PricingConditionsView_Launcher extends JavaProcess implements IProcessPrecondition { @Override public ProcessPreconditionsResolution checkPreconditionsApplicable(final IProcessPreconditionsContext context) { if (!context.isSingleSelection()) { return ProcessPreconditionsResolutio...
return ProcessPreconditionsResolution.accept(); } @Override protected String doIt() { final Set<TableRecordReference> salesOrderLineRefs = getSelectedIncludedRecordIds(I_C_OrderLine.class) .stream() .map(recordId -> TableRecordReference.of(I_C_OrderLine.Table_Name, recordId)) .collect(ImmutableSet.to...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\order\pricingconditions\process\WEBUI_SalesOrder_PricingConditionsView_Launcher.java
1
请完成以下Java代码
public String getFeeNameForProducedProduct(final I_M_Product product) { Check.assumeNotNull(product, "product not null"); // TODO: configure some where // e.g. for product "Futterkarotten" return "Zusätzliche Sortierkosten" //return product.getName(); return "Zus\u00e4tzliche Sortierkosten"; } @Override ...
@Override public boolean isFeeForScrap() { return getScrapPercentageTreshold().compareTo(new BigDecimal("100")) < 0; } private DocTypeId loadDocType(final DocSubType docSubType) { final IContextAware context = getContext(); final Properties ctx = context.getCtx(); final int adClientId = Env.getAD_Client_...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\ch\lagerkonf\impl\AbstractQualityBasedConfig.java
1
请完成以下Java代码
default int getAD_User_InCharge_ID(final I_C_Invoice_Candidate ic) { return getHandlerRecord().getAD_User_InCharge_ID(); } boolean isUserInChargeUserEditable(); /** * Set NetAmtToInvoice = PriceActual * QtyToInvoice - DiscountAmt, rounded to currency precision.<br> * (i.e. method responsible for setting {@l...
* <ul> * <li>Bill_BPartner_ID * <li>Bill_Location_ID * <li>Bill_User_ID * </ul> * of the given invoice candidate. */ void setBPartnerData(I_C_Invoice_Candidate ic); default void setInvoiceScheduleAndDateToInvoice(@NonNull final I_C_Invoice_Candidate ic) { final IBPartnerDAO bpartnerDAO = Services.get(...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\spi\IInvoiceCandidateHandler.java
1
请在Spring Boot框架中完成以下Java代码
public void addCacheResetListener(@NonNull final DocOutboundConfigChangedListener listener) { final ICacheResetListener cacheResetListener = (request) -> { listener.onConfigChanged(); return 1L; }; final CacheMgt cacheMgt = CacheMgt.get(); cacheMgt.addCacheResetListener(I_C_Doc_Outbound_Config.Table_Nam...
return DocOutboundConfig.builder() .id(DocOutboundConfigId.ofRepoId(record.getC_Doc_Outbound_Config_ID())) .tableId(AdTableId.ofRepoId(record.getAD_Table_ID())) .docBaseType(DocBaseType.ofNullableCode(record.getDocBaseType())) .printFormatId(PrintFormatId.ofRepoIdOrNull(record.getAD_PrintFormat_ID())) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive\de.metas.document.archive.base\src\main\java\de\metas\document\archive\config\DocOutboundConfigRepository.java
2
请完成以下Java代码
public DmnDeploymentBuilder execute(CommandContext commandContext) { return new DmnDeploymentBuilderImpl(); } }); } public DmnDeployment deploy(DmnDeploymentBuilderImpl deploymentBuilder) { return commandExecutor.execute(new DeployCmd<DmnDeployment>(deploymentBuilder...
@Override public DmnDeploymentQuery createDeploymentQuery() { return new DmnDeploymentQueryImpl(commandExecutor); } @Override public NativeDmnDeploymentQuery createNativeDeploymentQuery() { return new NativeDmnDeploymentQueryImpl(commandExecutor); } @Override public DmnDeci...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\DmnRepositoryServiceImpl.java
1
请完成以下Java代码
public String getCharge() { return charge; } /** * Sets the value of the charge property. * * @param value * allowed object is * {@link String } * */ public void setCharge(String value) { this.charge = value; } /** * Gets the va...
*/ public XMLGregorianCalendar getVerfalldatum() { return verfalldatum; } /** * Sets the value of the verfalldatum property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setVerfalldatum(XMLGregorianCalenda...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.msv3.schema.v2\src\main\java-xjc\de\metas\vertical\pharma\vendor\gateway\msv3\schema\v2\RetourePositionType.java
1
请完成以下Java代码
public class CasePageTask extends Task { public static final String TYPE = "casePage"; protected String type; protected String formKey; protected boolean sameDeployment = true; protected String label; protected String icon; protected String assignee; protected String owner; pro...
public void setOwner(String owner) { this.owner = owner; } public List<String> getCandidateUsers() { return candidateUsers; } public void setCandidateUsers(List<String> candidateUsers) { this.candidateUsers = candidateUsers; } public List<String> getCandidateGroups() {...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\CasePageTask.java
1
请完成以下Java代码
protected String doIt() throws Exception { updateFlatrateTermsPartner(); return MSG_OK; } private void updateFlatrateTermsPartner() { final List<I_C_Flatrate_Term> flatrateTermsToChange = getFlatrateTermsToChange(); flatrateTermsToChange.forEach(this::updateFlatrateTermPartner); } private void update...
private void updateFlatrateTermBillBPartner(final I_C_Flatrate_Term term) { final BPartnerId bPartnerId = BPartnerId.ofRepoId(p_billBPartnerId); final BPartnerLocationId bPartnerLocationId = BPartnerLocationId.ofRepoId(p_billBPartnerId, p_billLocationId); final BPartnerContactId bPartnerContactId = BPartnerCont...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\flatrate\process\C_Flatrate_Term_Change_BillPartner_Base.java
1
请完成以下Java代码
public class ProcessEngineFactoryBean implements FactoryBean<ProcessEngine>, DisposableBean, ApplicationContextAware { protected ProcessEngineConfigurationImpl processEngineConfiguration; protected ApplicationContext applicationContext; protected ProcessEngineImpl processEngine; public void destroy() throws...
} public Class<ProcessEngine> getObjectType() { return ProcessEngine.class; } public boolean isSingleton() { return true; } // getters and setters ////////////////////////////////////////////////////// public ProcessEngineConfigurationImpl getProcessEngineConfiguration() { return process...
repos\camunda-bpm-platform-master\engine-spring\core\src\main\java\org\camunda\bpm\engine\spring\ProcessEngineFactoryBean.java
1
请完成以下Java代码
public final Message toMessage(Object object, MessageProperties messageProperties) throws MessageConversionException { return toMessage(object, messageProperties, null); } @Override public final Message toMessage(Object object, @Nullable MessageProperties messagePropertiesArg, @Nullable Type genericType) ...
* @param messageProperties the message properties (headers) * @param genericType the type to convert from - used to populate type headers. * @return a message * @since 2.1 */ protected Message createMessage(Object object, MessageProperties messageProperties, @Nullable Type genericType) { return createMessage...
repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\support\converter\AbstractMessageConverter.java
1
请完成以下Java代码
public Criteria andReducePriceNotIn(List<BigDecimal> values) { addCriterion("reduce_price not in", values, "reducePrice"); return (Criteria) this; } public Criteria andReducePriceBetween(BigDecimal value1, BigDecimal value2) { addCriterion("reduce_price between", val...
super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; thi...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsProductFullReductionExample.java
1
请完成以下Java代码
public final class AuthorizationGrantType implements Serializable { private static final long serialVersionUID = 620L; public static final AuthorizationGrantType AUTHORIZATION_CODE = new AuthorizationGrantType("authorization_code"); public static final AuthorizationGrantType REFRESH_TOKEN = new AuthorizationGrant...
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || this.getClass() != obj.getClass()) { return false; } AuthorizationGrantType that = (AuthorizationGrantType) obj; return this.getValue().equals(that.getValue()); } @Override public int hashCode() { return thi...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\AuthorizationGrantType.java
1
请完成以下Java代码
public void setCostDistributionMethod (final String CostDistributionMethod) { set_Value (COLUMNNAME_CostDistributionMethod, CostDistributionMethod); } @Override public String getCostDistributionMethod() { return get_ValueAsString(COLUMNNAME_CostDistributionMethod); } @Override public I_C_OrderLine getCrea...
return get_ValueAsPO(COLUMNNAME_M_CostElement_ID, I_M_CostElement.class); } @Override public void setM_CostElement(final I_M_CostElement M_CostElement) { set_ValueFromPO(COLUMNNAME_M_CostElement_ID, I_M_CostElement.class, M_CostElement); } @Override public void setM_CostElement_ID (final int M_CostElement_ID...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Order_Cost.java
1
请在Spring Boot框架中完成以下Java代码
public class VoidSubscriptionRelatedToOrderHandler implements VoidOrderAndRelatedDocsHandler { @Override public RecordsToHandleKey getRecordsToHandleKey() { return RecordsToHandleKey.of(I_C_Flatrate_Term.Table_Name); } @Override public void handleOrderVoided(@NonNull final VoidOrderAndRelatedDocsRequest reques...
.build(); final IPair<RecordsToHandleKey, List<ITableRecordReference>> recordsToHandle = request.getRecordsToHandle(); final IContractChangeBL contractChangeBL = Services.get(IContractChangeBL.class); for (final ITableRecordReference currentRecordToHandle : recordsToHandle.getRight()) { // note: that we ne...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\subscription\order\restart\VoidSubscriptionRelatedToOrderHandler.java
2
请完成以下Java代码
public class InvoicePaidInspector implements IRecordInspector { public static InvoicePaidInspector INSTANCE = new InvoicePaidInspector(); private InvoicePaidInspector() { } @Override public int inspectRecord(Object model) { final I_C_Invoice invoice = InterfaceWrapperHelper.create(model, I_C_Invoice.class); ...
{ return IMigratorService.DLM_Level_LIVE; } return IMigratorService.DLM_Level_ARCHIVE; } /** * Returns <code>true</code> if the given model has an <code>Updated</code> column. */ @Override public boolean isApplicableFor(Object model) { return I_C_Invoice.Table_Name.equals(InterfaceWrapperHelper.getMo...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\dlm\InvoicePaidInspector.java
1
请完成以下Java代码
public void handleHttpRequest(VariableContainer execution, HttpRequest httpRequest, FlowableHttpClient client) { HttpRequestHandler httpRequestHandler = getHttpRequestHandlerInstance(); CommandContextUtil.getProcessEngineConfiguration().getDelegateInterceptor().handleInvocation(new HttpRequestHandlerInv...
} else { throw new FlowableIllegalArgumentException(delegateInstance.getClass().getName() + " doesn't implement " + HttpRequestHandler.class); } } protected HttpResponseHandler getHttpResponseHandlerInstance() { Object delegateInstance = instantiateDelegate(className, fieldDeclarati...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\http\handler\ClassDelegateHttpHandler.java
1
请在Spring Boot框架中完成以下Java代码
public void setInvoiceReference(DocumentReferenceType value) { this.invoiceReference = value; } /** * Gets the value of the stockEntryReference property. * * @return * possible object is * {@link DocumentR...
* * <p> * Objects of the following type(s) are allowed in the list * {@link DocumentReferenceType } * * */ public List<DocumentReferenceType> getAdditionalReferences() { if (additionalReferences == null) { ...
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\INVRPTListLineItemExtensionType.java
2
请在Spring Boot框架中完成以下Java代码
public static class Exposure { /** * Endpoint IDs that should be included or '*' for all. */ private Set<String> include = new LinkedHashSet<>(); /** * Endpoint IDs that should be excluded or '*' for all. */ private Set<String> exclude = new LinkedHashSet<>(); public Set<String> getInclude() { ...
public void setInclude(Set<String> include) { this.include = include; } public Set<String> getExclude() { return this.exclude; } public void setExclude(Set<String> exclude) { this.exclude = exclude; } } }
repos\spring-boot-4.0.1\module\spring-boot-actuator-autoconfigure\src\main\java\org\springframework\boot\actuate\autoconfigure\endpoint\jmx\JmxEndpointProperties.java
2
请完成以下Java代码
protected Date getOrCalculateRemovalTime(SetRemovalTimeBatchConfiguration batchConfiguration, HistoricBatchEntity instance, CommandContext commandContext) { if (batchConfiguration.hasRemovalTime()) { return batchConfiguration.getRemovalTime(); } else if (hasBaseTime(instance, commandContext)) { ret...
.selectById(ByteArrayEntity.class, byteArrayId); } protected HistoricBatchEntity findBatchById(String instanceId, CommandContext commandContext) { return commandContext.getHistoricBatchManager() .findHistoricBatchById(instanceId); } public JobDeclaration<BatchJobContext, MessageEntity> getJobDeclara...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\batch\removaltime\BatchSetRemovalTimeJobHandler.java
1
请完成以下Java代码
void rewriteLocation(ServerWebExchange exchange, Config config) { final String location = exchange.getResponse().getHeaders().getFirst(config.getLocationHeaderName()); final String host = config.getHostValue() != null ? config.getHostValue() : exchange.getRequest().getHeaders().getFirst(HttpHeaders.HOST); fin...
this.stripVersion = stripVersion; return this; } public String getLocationHeaderName() { return locationHeaderName; } public Config setLocationHeaderName(String locationHeaderName) { this.locationHeaderName = locationHeaderName; return this; } public @Nullable String getHostValue() { retur...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RewriteLocationResponseHeaderGatewayFilterFactory.java
1
请完成以下Java代码
public boolean isToleranceExceeded() { return get_ValueAsBoolean(COLUMNNAME_IsToleranceExceeded); } @Override public void setLine (final int Line) { set_Value (COLUMNNAME_Line, Line); } @Override public int getLine() { return get_ValueAsInt(COLUMNNAME_Line); } @Override public void setPP_Order_We...
set_ValueNoCheck (COLUMNNAME_PP_Order_Weighting_Run_ID, null); else set_ValueNoCheck (COLUMNNAME_PP_Order_Weighting_Run_ID, PP_Order_Weighting_Run_ID); } @Override public int getPP_Order_Weighting_Run_ID() { return get_ValueAsInt(COLUMNNAME_PP_Order_Weighting_Run_ID); } @Override public void setWeight...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_PP_Order_Weighting_RunCheck.java
1
请完成以下Java代码
class AdWindowIdSelection implements Iterable<AdWindowId> { private static final ImmutableSet<AdWindowId> SKIP_WINDOW_IDS = ImmutableSet.of( AdWindowId.ofRepoId(540371), // Picking Tray Clearing - placeholder window AdWindowId.ofRepoId(540674), // Shipment Schedule Editor - placeholder window AdWindowId.ofRep...
public @NotNull Iterator<AdWindowId> iterator() { return selectedWindowIds.iterator(); } public boolean contains(@NonNull final AdWindowId adWindowId) { return selectedWindowIds.contains(adWindowId); } public boolean contains(final ContextPath path) { return contains(path.getAdWindowId()); } public bo...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\health\AdWindowIdSelection.java
1
请在Spring Boot框架中完成以下Java代码
public class WebSecurityConfig { @Bean public WebSecurityCustomizer webSecurityCustomizer() { return (web) -> web.ignoring() .requestMatchers("/js/**", "/css/**"); } @Bean SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.cors(AbstractHttpConfig...
.formLogin(form -> form.defaultSuccessUrl("/welcome")) .httpBasic(Customizer.withDefaults()); return http.build(); } @Bean public UserDetailsService userDetailsService() { UserDetails user = User.withDefaultPasswordEncoder() .username("User") .password("p...
repos\tutorials-master\spring-security-modules\spring-security-core-2\src\main\java\com\baeldung\springsecuritymigration\configuration\WebSecurityConfig.java
2
请在Spring Boot框架中完成以下Java代码
public class PricingSystemId implements RepoIdAware { @JsonCreator public static PricingSystemId ofRepoId(final int repoId) { if (repoId == NONE.repoId) { return NONE; } return new PricingSystemId(repoId); } @Nullable public static PricingSystemId ofRepoIdOrNull(final int repoId) { return repoId > ...
public boolean isNone() { return repoId == NONE.repoId; } @Override @JsonValue public int getRepoId() { return repoId; } public static int toRepoId(@Nullable final PricingSystemId id) { return id != null ? id.getRepoId() : -1; } public static boolean equals(@Nullable final PricingSystemId o1, @Nulla...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\pricing\PricingSystemId.java
2
请完成以下Java代码
private boolean initDesktopWorkbenches() { String sql = "SELECT AD_Workbench_ID " + "FROM AD_DesktopWorkbench " + "WHERE AD_Desktop_ID=? AND IsActive='Y' " + "ORDER BY SeqNo"; try { PreparedStatement pstmt = DB.prepareStatement(sql, null); pstmt.setInt(1, AD_Desktop_ID); ResultSet rs = pstmt.ex...
/** * Get AD_Workbench_ID of index * @param index index * @return -1 if not valid */ public int getAD_Workbench_ID (int index) { if (index < 0 || index > m_workbenches.size()) return -1; Integer id = (Integer)m_workbenches.get(index); return id.intValue(); } // getAD_Workbench_ID } // MDes...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MDesktop.java
1
请完成以下Java代码
public class GitInfoContributor extends InfoPropertiesInfoContributor<GitProperties> { public GitInfoContributor(GitProperties properties) { this(properties, Mode.SIMPLE); } public GitInfoContributor(GitProperties properties, Mode mode) { super(properties, mode); } @Override public void contribute(Info.Bui...
@Override protected void postProcessContent(Map<String, Object> content) { replaceValue(getNestedMap(content, "commit"), "time", getProperties().getCommitTime()); replaceValue(getNestedMap(content, "build"), "time", getProperties().getInstant("build.time")); } static class GitInfoContributorRuntimeHints impleme...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\info\GitInfoContributor.java
1
请完成以下Java代码
public I_C_UOM getC_UOM() { return uom; } @Override public BigDecimal getQtyFree() { final IUOMConversionBL uomConversionBL = Services.get(IUOMConversionBL.class); final Capacity capacityAvailable = capacityTotal.subtractQuantity(getQty(), uomConversionBL); if (capacityAvailable.isInfiniteCapacity()) { ...
{ throw new AdempiereException("Adding Qty is not supported on this level"); } @Override public IAllocationRequest removeQty(final IAllocationRequest request) { throw new AdempiereException("Removing Qty is not supported on this level"); } /** * Returns always false because negative storages are not suppo...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\HUProductStorage.java
1
请完成以下Java代码
public UpdateJobDefinitionSuspensionStateBuilderImpl processDefinitionWithoutTenantId() { this.processDefinitionTenantId = null; this.isProcessDefinitionTenantIdSet = true; return this; } @Override public UpdateJobDefinitionSuspensionStateBuilderImpl processDefinitionTenantId(String tenantId) { e...
public String getProcessDefinitionKey() { return processDefinitionKey; } public String getProcessDefinitionId() { return processDefinitionId; } public String getProcessDefinitionTenantId() { return processDefinitionTenantId; } public boolean isProcessDefinitionTenantIdSet() { return isPro...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\management\UpdateJobDefinitionSuspensionStateBuilderImpl.java
1
请完成以下Java代码
private Document convertObjectToDocument(final Object xmlObj) { try { return convertObjectToDocument0(xmlObj); } catch (final Exception e) { throw new AdempiereException("Error while converting object '" + xmlObj + "' to XML document", e); } } private Document convertObjectToDocument0(final Object...
return document; } private String createTransactionId() { final String transactionId = UUID.randomUUID().toString(); return transactionId; } @Override public LoginResponse login(final LoginRequest loginRequest) { throw new UnsupportedOperationException(); // final PRTLoginRequestType xmlLoginRequest = ...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.embedded-client\src\main\java\de\metas\printing\client\endpoint\LoopbackPrintConnectionEndpoint.java
1
请完成以下Java代码
public static FieldExtension getListenerField(DelegatePlanItemInstance planItemInstance, String fieldName) { List<FieldExtension> fieldExtensions = getListenerFields(planItemInstance); if (fieldExtensions == null || fieldExtensions.size() == 0) { return null; } for (FieldExte...
return getListenerFieldExpression(planItemInstance, fieldName); } else { return getCmmnElementFieldExpression(planItemInstance, fieldName); } } public static Expression getCmmnElementFieldExpression(DelegatePlanItemInstance planItemInstance, String fieldName) { FieldExtensio...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\delegate\CmmnDelegateHelper.java
1
请完成以下Java代码
public class PropertiesHandlerMethodReturnValueHandler implements HandlerMethodReturnValueHandler { @Override public boolean supportsReturnType(MethodParameter returnType) { return Properties.class.equals(returnType.getMethod().getReturnType()); } @Override public void handleReturnValue(Ob...
charset = contentType.getCharset(); } charset = charset == null ? Charset.forName("UTF-8") : charset; // 获取请求体 OutputStream body = servletServerHttpResponse.getBody(); OutputStreamWriter outputStreamWriter = new OutputStreamWriter(body, charset); properties.store(outpu...
repos\SpringAll-master\47.Spring-Boot-Content-Negotiation\src\main\java\com\example\demo\handler\PropertiesHandlerMethodReturnValueHandler.java
1
请在Spring Boot框架中完成以下Java代码
public List<DocumentReferenceType> getDocumentReference() { if (documentReference == null) { documentReference = new ArrayList<DocumentReferenceType>(); } return this.documentReference; } /** * Deprecated. Please supply the phone number in Contact/Phone * * @...
* */ public void setGLN(String value) { this.gln = value; } /** * Further contact details. * * @return * possible object is * {@link ContactType } * */ public ContactType getContact() { return contact; } /** * Sets...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\BusinessEntityType.java
2
请完成以下Java代码
public void setVolume (final @Nullable BigDecimal Volume) { set_Value (COLUMNNAME_Volume, Volume); } @Override public BigDecimal getVolume() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Volume); return bd != null ? bd : BigDecimal.ZERO; } @Override public org.compiere.model.I_C_Location get...
set_Value (COLUMNNAME_Warehouse_Location_ID, null); else set_Value (COLUMNNAME_Warehouse_Location_ID, Warehouse_Location_ID); } @Override public int getWarehouse_Location_ID() { return get_ValueAsInt(COLUMNNAME_Warehouse_Location_ID); } @Override public void setWeight (final @Nullable BigDecimal Weigh...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\eevolution\model\X_DD_Order_Header_v.java
1
请完成以下Java代码
protected boolean isValidSortByValue(String value) { return VALID_SORT_BY_VALUES.contains(value); } @Override protected EventSubscriptionQuery createNewQuery(ProcessEngine engine) { return engine.getRuntimeService().createEventSubscriptionQuery(); } @Override protected void applyFilters(EventSubsc...
if (TRUE.equals(withoutTenantId)) { query.withoutTenantId(); } if (TRUE.equals(includeEventSubscriptionsWithoutTenantId)) { query.includeEventSubscriptionsWithoutTenantId(); } } @Override protected void applySortBy(EventSubscriptionQuery query, String sortBy, Map<String, Object> parameter...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\runtime\EventSubscriptionQueryDto.java
1
请完成以下Java代码
public void alphanumericIteration(Blackhole blackhole) { boolean result = true; for (int i = 0; i < TEST_STRING.length(); ++i) { final int codePoint = TEST_STRING.codePointAt(i); if (!isAlphanumeric(codePoint)) { result = false; break; ...
for (final char c : TEST_STRING.toCharArray()) { if (!isAlphanumeric(c)) { result = false; break; } } blackhole.consume(result); } @Benchmark @BenchmarkMode(Mode.Throughput) public void alphanumericIterationWithStream(Blackhole bla...
repos\tutorials-master\core-java-modules\core-java-regex\src\main\java\com\baeldung\alphanumeric\AlphanumericPerformanceBenchmark.java
1
请在Spring Boot框架中完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } @ApiModelProperty(example = "http://localhost:8182/repository/models/5") public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } @...
public String getDeploymentUrl() { return deploymentUrl; } public void setDeploymentUrl(String deploymentUrl) { this.deploymentUrl = deploymentUrl; } @ApiModelProperty(example = "null") @Override public String getTenantId() { return tenantId; } @Override pu...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\repository\ModelResponse.java
2
请完成以下Java代码
public Result enqueueSelection(@NonNull final EnqueuePPOrderCandidateRequest request) { final PInstanceId adPInstanceId = request.getAdPInstanceId(); final LockOwner lockOwner = LockOwner.newOwner(PPOrderCandidateEnqueuer.class.getSimpleName(), adPInstanceId.getRepoId()); final ILockCommand elementsLocker = lo...
public static class Result { private final List<QueueWorkPackageId> enqueuedWorkpackageIds = new ArrayList<>(); public int getEnqueuedPackagesCount() { return enqueuedWorkpackageIds.size(); } public ImmutableList<QueueWorkPackageId> getEnqueuedPackageIds() { return ImmutableList.copyOf(enqueuedWork...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\productioncandidate\async\PPOrderCandidateEnqueuer.java
1
请完成以下Java代码
public String getId() { return id; } public String getSubject() { return subject; } public String getTeacher() { return teacher; } public String getStudentGroup() { return studentGroup; }
public Timeslot getTimeslot() { return timeslot; } public void setTimeslot(Timeslot timeslot) { this.timeslot = timeslot; } public Room getRoom() { return room; } public void setRoom(Room room) { this.room = room; } }
repos\springboot-demo-master\Timefold Solver\src\main\java\org\acme\schooltimetabling\domain\Lesson.java
1
请在Spring Boot框架中完成以下Java代码
public class SeparateFlowsExample { @MessagingGateway public interface NumbersClassifier { @Gateway(requestChannel = "multipleOfThreeFlow.input") void multipleofThree(Collection<Integer> numbers); @Gateway(requestChannel = "remainderIsOneFlow.input") void remainderIsOne(Collecti...
} boolean isRemainderTwo(Integer number) { return number % 3 == 2; } @Bean public IntegrationFlow multipleOfThreeFlow() { return flow -> flow.split() .<Integer> filter(this::isMultipleOfThree) .channel("multipleOfThreeChannel"); } @Bean public Integ...
repos\tutorials-master\spring-integration\src\main\java\com\baeldung\subflows\separateflows\SeparateFlowsExample.java
2
请完成以下Java代码
public static BigDecimal roundToBigDecimal(@NonNull final BigDecimal argToRound, @NonNull final BigDecimal roundingArg) { BigDecimal actualRoundingArg = roundingArg; BigDecimal actualArgToRound = argToRound; BigDecimal decimalAdjustments = BigDecimal.ONE; if (roundingArg.scale() > 0 || argToRound.scale() > 0) ...
} } } @Nullable public static BigDecimal sumNullSafe(@Nullable final BigDecimal ag1, @Nullable final BigDecimal ag2) { if (ag1 == null && ag2 == null) { return null; } else if (ag1 == null) { return ag2; } else if (ag2 == null) { return ag1; } else { return ag1.add(ag2); } } ...
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-util\src\main\java\de\metas\common\util\NumberUtils.java
1
请完成以下Java代码
public Long sumDataSizeByTenantId(TenantId tenantId) { return resourceRepository.sumDataSizeByTenantId(tenantId.getId()); } @Override public TbResource findByTenantIdAndExternalId(UUID tenantId, UUID externalId) { return DaoUtil.getData(resourceRepository.findByTenantIdAndExternalId(tenantI...
public PageData<TbResourceId> findIdsByTenantId(UUID tenantId, PageLink pageLink) { return DaoUtil.pageToPageData(resourceRepository.findIdsByTenantId(tenantId, DaoUtil.toPageable(pageLink)) .map(TbResourceId::new)); } @Override public TbResourceId getExternalIdByInternal(TbResource...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\resource\JpaTbResourceDao.java
1
请完成以下Java代码
public class UnzipFile { public static void main(final String[] args) throws IOException { final String fileZip = "src/main/resources/unzipTest/compressed.zip"; final File destDir = new File("src/main/resources/unzipTest"); final byte[] buffer = new byte[1024]; final ZipInputStream z...
} zipEntry = zis.getNextEntry(); } zis.closeEntry(); zis.close(); } /** * @see https://snyk.io/research/zip-slip-vulnerability */ public static File newFile(File destinationDir, ZipEntry zipEntry) throws IOException { File destFile = new File(destinatio...
repos\tutorials-master\core-java-modules\core-java-io\src\main\java\com\baeldung\unzip\UnzipFile.java
1
请完成以下Java代码
private static IStringExpression toStringExpression(@NonNull final String sql, @Nullable final String joinTableName) { String sqlNorm = StringUtils.trimBlankToOptional(sql) .orElseThrow(() -> new AdempiereException("sql shall not be empty")); final String joinTableNameNorm = StringUtils.trimBlankToNull(joinTa...
String sqlBuilt = this._sqlBuilt; if (sqlBuilt == null) { final String joinTableNameOrAliasIncludingDot = joinTableNameOrAlias != null ? joinTableNameOrAlias + "." : ""; final Evaluatee2 evalCtx = Evaluatees.ofSingleton(CTX_JoinTableNameOrAliasIncludingDot.toStringWithoutMarkers(), joinTableNameOrAliasIncludi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\column\ColumnSql.java
1
请在Spring Boot框架中完成以下Java代码
public Set<HuId> getFinishedGoodsReceivedHUIds(@NonNull final PPOrderId ppOrderId) { return huPPOrderQtyBL.getFinishedGoodsReceivedHUIds(ppOrderId); } @NonNull public ManufacturingJob recomputeQtyToIssueForSteps(@NonNull final PPOrderId ppOrderId) { final ManufacturingJob job = getJobById(ppOrderId); final ...
@NonNull private Optional<Quantity> extractTargetCatchWeight(@NonNull final JsonManufacturingOrderEvent.ReceiveFrom receiveFrom) { if (receiveFrom.getCatchWeight() == null || Check.isBlank(receiveFrom.getCatchWeightUomSymbol())) { return Optional.empty(); } return uomDAO.getBySymbol(receiveFrom.getCatchWe...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\job\service\ManufacturingJobService.java
2
请完成以下Java代码
public boolean isInitialCare() { return get_ValueAsBoolean(COLUMNNAME_IsInitialCare); } @Override public void setIsPrivateSale (final boolean IsPrivateSale) { set_Value (COLUMNNAME_IsPrivateSale, IsPrivateSale); } @Override public boolean isPrivateSale() { return get_ValueAsBoolean(COLUMNNAME_IsPriva...
} @Override public java.lang.String getSalesLineId() { return get_ValueAsString(COLUMNNAME_SalesLineId); } @Override public void setStartDate (final @Nullable java.sql.Timestamp StartDate) { set_Value (COLUMNNAME_StartDate, StartDate); } @Override public java.sql.Timestamp getStartDate() { return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_C_OLCand_AlbertaOrder.java
1
请在Spring Boot框架中完成以下Java代码
public StringToMapConverter stringToMapConverter(@Lazy ObjectMapper objectMapper) { return new StringToMapConverter(objectMapper); } @Bean public MapToStringConverter mapToStringConverter(@Lazy ObjectMapper objectMapper) { return new MapToStringConverter(objectMapper); } @Bean ...
@Bean public LocalDateToStringConverter localDateToStringConverter() { return new LocalDateToStringConverter(); } @Bean public StringToListConverter sringToListConverter(@Lazy ObjectMapper objectMapper) { return new StringToListConverter(objectMapper); } @Bean public ListTo...
repos\Activiti-develop\activiti-core\activiti-api-impl\activiti-api-process-model-impl\src\main\java\org\activiti\api\runtime\conf\impl\ProcessModelAutoConfiguration.java
2
请在Spring Boot框架中完成以下Java代码
public void addLog(String logContent, Integer logType, Integer operatetype, LoginUser user) { LogDTO sysLog = new LogDTO(); sysLog.setId(String.valueOf(IdWorker.getId())); //注解上的描述,操作日志内容 sysLog.setLogContent(logContent); sysLog.setLogType(logType); sysLog.setOperateType(...
} sysLog.setCreateTime(new Date()); //保存日志(异常捕获处理,防止数据太大存储失败,导致业务失败)JT-238 try { baseCommonMapper.saveLog(sysLog); } catch (Exception e) { log.warn(" LogContent length : "+sysLog.getLogContent().length()); log.warn(e.getMessage()); } } ...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\modules\base\service\impl\BaseCommonServiceImpl.java
2
请完成以下Java代码
public Object aroundReadFrom(ReaderInterceptorContext context) throws IOException, WebApplicationException { byte[] buffer = IOUtils.toByteArray(context.getInputStream()); logger.info("The contents of request body is: \n" + new String(buffer, "UTF-8") + "\n"); context.setInputStream(new ByteArra...
} @Override public void write(byte[] b) throws IOException { buffer.write(b); output.write(b); } @Override public void write(byte[] b, int off, int len) throws IOException { buffer.write(b, off, len); output.write(b, off, len); ...
repos\springBoot-master\springboot-dubbo\abel-user-provider\src\main\java\cn\abel\user\filter\RestInterceptor.java
1
请完成以下Java代码
public InputStream export() { final PipedOutputStream pipeOut = new PipedOutputStream(); PipedInputStream pipeIn = null; try { pipeIn = new PipedInputStream(pipeOut, 1024 * 16); } catch (IOException e) { throw new AdempiereException(e.getLocalizedMessage(), e); } executeAsync(pipeOut); retu...
if (exportStatus == ExportStatus.Finished) { break; } if (prevRowCount >= rowCount) { // the export thread is stagnating... we will need to stop everything break; } prevRowCount = rowCount; } executorService.shutdownNow(); } }; futureExportResult = execu...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\data\export\api\impl\ASyncExporterWrapper.java
1
请完成以下Java代码
public void setInParameters(List<IOParameter> inParameters) { this.inParameters = inParameters; } @Override public List<IOParameter> getOutParameters() { return outParameters; } @Override public void addOutParameter(IOParameter outParameter) { this.outParameters.add(out...
setCaseInstanceName(otherElement.getCaseInstanceName()); setBusinessKey(otherElement.getBusinessKey()); setInheritBusinessKey(otherElement.isInheritBusinessKey()); setSameDeployment(otherElement.isSameDeployment()); setFallbackToDefaultTenant(otherElement.isFallbackToDefaultTenant()); ...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\CaseServiceTask.java
1
请在Spring Boot框架中完成以下Java代码
public void requestTaxiOrderStatus() throws Exception{ List<Orders> ordersList = orderRepository.findAllByStatusAndPaymentNumberIsNotNull(OrderStatus.awaitingPayment); for(Orders orders: ordersList){ OrderStatus prevOrderStatus = orders.getStatus(); Map<String, String> mapResul...
} } } private void ordersSave(Orders orders, OrderStatus status, Map<String, String> mapResult) { orders.setCarColor(mapResult.get("car_color")); orders.setCarMark(mapResult.get("car_mark")); orders.setCarModel(mapResult.get("car_model")); orders.setCarNumber(mapResu...
repos\SpringBoot-Projects-FullStack-master\Part-9.SpringBoot-React-Projects\Project-2.SpringBoot-React-ShoppingMall\fullstack\backend\src\main\java\com\urunov\schedule\OrderStatusRequester.java
2
请完成以下Java代码
public void setM_Warehouse_ID (final int M_Warehouse_ID) { if (M_Warehouse_ID < 1) set_Value (COLUMNNAME_M_Warehouse_ID, null); else set_Value (COLUMNNAME_M_Warehouse_ID, M_Warehouse_ID); } @Override public int getM_Warehouse_ID() { return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID); } @Override ...
} @Override public void setQtyToBeShipped (final @Nullable BigDecimal QtyToBeShipped) { set_Value (COLUMNNAME_QtyToBeShipped, QtyToBeShipped); } @Override public BigDecimal getQtyToBeShipped() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyToBeShipped); return bd != null ? bd : BigDecimal.Z...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_MD_Available_For_Sales.java
1
请完成以下Java代码
public class IntermediateThrowEscalationEventActivityBehavior extends AbstractBpmnActivityBehavior { private static final long serialVersionUID = 1L; protected final EscalationEventDefinition escalationEventDefinition; protected String escalationCode; protected String escalationName; public Inter...
} else { escalationCode = escalationEventDefinition.getEscalationCode(); escalationName = escalationCode; } this.escalationEventDefinition = escalationEventDefinition; } @Override public void execute(DelegateExecution execution) { CommandContext commandConte...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\bpmn\behavior\IntermediateThrowEscalationEventActivityBehavior.java
1
请在Spring Boot框架中完成以下Java代码
public Result<String> delete(@RequestParam(name = "id", required = true) String id) { sysCommentService.removeById(id); return Result.OK("删除成功!"); } /** * 批量删除 * * @param ids * @return */ //@AutoLog(value = "系统评论回复表-批量删除") @Operation(summary = "系统评论回复表-批量删除") ...
return Result.OK(sysComment); } /** * 导出excel * * @param request * @param sysComment */ //@RequiresPermissions("org.jeecg.modules.demo:sys_comment:exportXls") @RequestMapping(value = "/exportXls") public ModelAndView exportXls(HttpServletRequest request, SysComment sysComme...
repos\JeecgBoot-main\jeecg-boot\jeecg-module-system\jeecg-system-biz\src\main\java\org\jeecg\modules\system\controller\SysCommentController.java
2
请完成以下Java代码
public void prohibitVoidAndClose(final I_C_Flatrate_Conditions cond) { throw new AdempiereException(MainValidator.MSG_FLATRATE_DOC_ACTION_NOT_SUPPORTED_0P); } @DocValidate(timings = { ModelValidator.TIMING_BEFORE_COMPLETE }) public void beforeComplete(final I_C_Flatrate_Conditions cond) { final IFlatrateDAO f...
} } @DocValidate(timings = { ModelValidator.TIMING_BEFORE_REACTIVATE }) public void beforeReactivate(final I_C_Flatrate_Conditions cond) { // check if the conditions are already used somewhere final IFlatrateDAO flatrateDB = Services.get(IFlatrateDAO.class); final List<I_C_Flatrate_Term> terms = flatrateDB.r...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\interceptor\C_Flatrate_Conditions.java
1
请在Spring Boot框架中完成以下Java代码
public class ProgramPayController extends BaseController { private static final Logger logger = LoggerFactory.getLogger(ProgramPayController.class); @Autowired private RpTradePaymentManagerService tradePaymentManagerService; @Autowired private CnpPayService cnpPayService; private static final...
logger.error("系统异常:", e); payResultJson = "系统异常"; } httpServletResponse.setContentType(CONTENT_TYPE); write(httpServletResponse, payResultJson); } @RequestMapping("/authorize") @ResponseBody public String wxAuthorize(@RequestParam("code") String code) { Stri...
repos\roncoo-pay-master\roncoo-pay-web-gateway\src\main\java\com\roncoo\pay\controller\ProgramPayController.java
2
请完成以下Java代码
public class SaveTaskCmd implements Command<Void>, Serializable { private static final long serialVersionUID = 1L; protected TaskEntity task; public SaveTaskCmd(Task task) { this.task = (TaskEntity) task; } @Override public Void execute(CommandContext commandContext) { if (ta...
// completely different. if (Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) { Context.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent( ActivitiEventBuilder.createEntityEvent(FlowableEngineEventType.TASK_CREATED, task), ...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\cmd\SaveTaskCmd.java
1
请完成以下Java代码
public void setName(String name) { nameAttribute.setValue(this, name); } public MultiplicityEnum getMultiplicity() { return multiplicityAttribute.getValue(this); } public void setMultiplicity(MultiplicityEnum multiplicity) { multiplicityAttribute.setValue(this, multiplicity); } public CaseFil...
.instanceProvider(new ModelTypeInstanceProvider<CaseFileItem>() { public CaseFileItem newInstance(ModelTypeInstanceContext instanceContext) { return new CaseFileItemImpl(instanceContext); } }); nameAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_NAME) .build()...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CaseFileItemImpl.java
1
请完成以下Java代码
protected final <T extends IView> boolean isViewClass(@NonNull final Class<T> expectedViewClass) { final IView view = _view; if (view == null) { return false; } return expectedViewClass.isAssignableFrom(view.getClass()); } protected final void invalidateView(@NonNull final IView view) { viewsRepo.i...
.limit(limit.toIntOr(Integer.MAX_VALUE)) .map(row -> row.getId().toId(idMapper)) .collect(ImmutableSet.toImmutableSet()); } else { return selectedRowsIds.toIdsFromInt(idMapper); } } @OverridingMethodsMustInvokeSuper protected IViewRow getSingleSelectedRow() { final DocumentIdsSelection selec...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\process\adprocess\ViewBasedProcessTemplate.java
1
请完成以下Java代码
public int getCB_Differences_Acct () { Integer ii = (Integer)get_Value(COLUMNNAME_CB_Differences_Acct); if (ii == null) return 0; return ii.intValue(); } public I_C_ValidCombination getCB_Expense_A() throws RuntimeException { return (I_C_ValidCombination)MTable.get(getCtx(), I_C_ValidCombination.Ta...
/** Get Cash Book Receipt. @return Cash Book Receipts Account */ public int getCB_Receipt_Acct () { Integer ii = (Integer)get_Value(COLUMNNAME_CB_Receipt_Acct); if (ii == null) return 0; return ii.intValue(); } public I_C_CashBook getC_CashBook() throws RuntimeException { return (I_C_CashBook...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_CashBook_Acct.java
1
请完成以下Java代码
public boolean isValidNumericStringResult() { return validNumericStringResult; } public void setValidNumericStringResult(boolean validNumericStringResult) { this.validNumericStringResult = validNumericStringResult; } public boolean isInvalidNumericStringResult() { return invali...
} public boolean isValidFormatOfHorsePower() { return validFormatOfHorsePower; } public void setValidFormatOfHorsePower(boolean validFormatOfHorsePower) { this.validFormatOfHorsePower = validFormatOfHorsePower; } @Override public String toString() { return "SpelRegex{"...
repos\tutorials-master\spring-spel\src\main\java\com\baeldung\spring\spel\examples\SpelRegex.java
1
请完成以下Java代码
public class InvocationDecoder extends ByteToMessageDecoder { private Logger logger = LoggerFactory.getLogger(getClass()); @Override protected void decode(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) { // 标记当前读取位置 in.markReaderIndex(); // 判断是否能够读取 length 长度 if (...
// 如果 message 不够可读,则退回到原读取位置 if (in.readableBytes() < length) { in.resetReaderIndex(); return; } // 读取内容 byte[] content = new byte[length]; in.readBytes(content); // 解析成 Invocation Invocation invocation = JSON.parseObject(content, Invocatio...
repos\SpringBoot-Labs-master\lab-67\lab-67-netty-demo\lab-67-netty-demo-common\src\main\java\cn\iocoder\springboot\lab67\nettycommondemo\codec\InvocationDecoder.java
1