instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void setDayOfDelivery (final @Nullable BigDecimal DayOfDelivery) { set_Value (COLUMNNAME_DayOfDelivery, DayOfDelivery); } @Override public BigDecimal getDayOfDelivery() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_DayOfDelivery); return bd != null ? bd : BigDecimal.ZERO; } @Override ...
} @Override public void setIsInitialCare (final boolean IsInitialCare) { set_Value (COLUMNNAME_IsInitialCare, IsInitialCare); } @Override public boolean isInitialCare() { return get_ValueAsBoolean(COLUMNNAME_IsInitialCare); } @Override public void setIsSeriesOrder (final boolean IsSeriesOrder) { se...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.healthcare.alberta\src\main\java-gen\de\metas\vertical\healthcare\alberta\model\X_Alberta_Order.java
1
请在Spring Boot框架中完成以下Java代码
SecurityFilterChain httpSecurity(HttpSecurity http) throws Exception { return http.authorizeHttpRequests(authorize -> authorize.anyRequest() .authenticated()) .csrf(Customizer.withDefaults()) .build(); } @Bean UserDetailsService userDetailsService() { P...
.password("password") .passwordEncoder(passwordEncoder::encode) .roles("USER") .build(); UserDetails admin = User.builder() .username("admin") .password("password") .passwordEncoder(passwordEncoder::encode) .roles("ADMIN") ...
repos\tutorials-master\spring-security-modules\spring-security-authorization\spring-security-annotation-template-parameter\src\main\java\com\baeldung\security\SecurityConfiguration.java
2
请完成以下Java代码
public static String stream(String url) throws Exception { try (InputStream input = new URI(url).toURL().openStream()) { InputStreamReader isr = new InputStreamReader(input, Charset.forName("UTF-8")); BufferedReader reader = new BufferedReader(isr); StringBuilder json = new S...
ObjectMapper mapper = new ObjectMapper(); T entity = mapper.readValue(new URI(url).toURL(), type); return entity; } public static String getString(String url) throws Exception { return get(url).toPrettyString(); } public static JSONObject getJson(String url) throws Exception { ...
repos\tutorials-master\jackson-modules\jackson-conversions-3\src\main\java\com\baeldung\jackson\jsonurlreader\JsonUrlReader.java
1
请完成以下Java代码
private void createQuarantineHUsByLotNoQuarantineId(final int lotNoQuarantineId) { final LotNumberQuarantine lotNoQuarantine = lotNoQuarantineRepo.getById(lotNoQuarantineId); final I_M_Attribute lotNoAttribute = lotNumberDateAttributeDAO.getLotNumberAttribute(); if (lotNoAttribute == null) { throw new Adem...
private List<I_M_HU> retrieveHUsForAttributeStringValue( final int productId, final I_M_Attribute attribute, final String value) { final IHUQueryBuilder huQueryBuilder = Services.get(IHandlingUnitsDAO.class) .createHUQueryBuilder() .addOnlyWithAttribute(attribute, value) .addHUStatusesToInclude(...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\product\process\WEBUI_M_Product_LotNumber_Quarantine.java
1
请完成以下Java代码
public abstract class AbstractSettings implements Serializable { @Serial private static final long serialVersionUID = 7434920549178503670L; private final Map<String, Object> settings; protected AbstractSettings(Map<String, Object> settings) { Assert.notEmpty(settings, "settings cannot be empty"); this.settin...
* @param value the value of the setting * @return the {@link AbstractBuilder} for further configuration */ public B setting(String name, Object value) { Assert.hasText(name, "name cannot be empty"); Assert.notNull(value, "value cannot be null"); getSettings().put(name, value); return getThis(); } ...
repos\spring-security-main\oauth2\oauth2-authorization-server\src\main\java\org\springframework\security\oauth2\server\authorization\settings\AbstractSettings.java
1
请在Spring Boot框架中完成以下Java代码
public class JSONDocumentFilter { public static DocumentFilterList unwrapList(final List<JSONDocumentFilter> jsonFilters, final DocumentFilterDescriptorsProvider filterDescriptorProvider) { if (jsonFilters == null || jsonFilters.isEmpty()) { return DocumentFilterList.EMPTY; } return jsonFilters .stream...
return new JSONDocumentFilter(filterId, filter.getCaption(jsonOpts.getAdLanguage()), jsonParameters); } @JsonProperty("filterId") String filterId; @JsonProperty("caption") @JsonInclude(JsonInclude.Include.NON_EMPTY) String caption; @JsonProperty("parameters") List<JSONDocumentFilterParam> parameters; @Json...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\document\filter\json\JSONDocumentFilter.java
2
请完成以下Java代码
public void save(DataOutputStream out) throws Exception { out.writeInt(o.length); for (char c : o) { out.writeChar(c); } out.writeInt(w.length); for (double v : w) { out.writeDouble(v); } } @Override public boolean ...
int size = byteArray.nextInt(); o = new char[size]; for (int i = 0; i < size; ++i) { o[i] = byteArray.nextChar(); } size = byteArray.nextInt(); w = new double[size]; for (int i = 0; i < size; ++i) { w[i] = byteArray.nextDouble(); ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\FeatureFunction.java
1
请在Spring Boot框架中完成以下Java代码
public class AuditLogsCleanUpService extends AbstractCleanUpService { private final AuditLogDao auditLogDao; private final SqlPartitioningRepository partitioningRepository; @Value("${sql.ttl.audit_logs.ttl:0}") private long ttlInSec; @Value("${sql.audit_logs.partition_size:168}") private int p...
public void cleanUp() { long auditLogsExpTime = getCurrentTimeMillis() - TimeUnit.SECONDS.toMillis(ttlInSec); log.debug("cleanup {}", auditLogsExpTime); if (isSystemTenantPartitionMine()) { auditLogDao.cleanUpAuditLogs(auditLogsExpTime); } else { partitioningRepos...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\ttl\AuditLogsCleanUpService.java
2
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public Department getDepartment() {
return department; } public void setDepartment(Department department) { this.department = department; } public List<Phone> getPhones() { return phones; } public void setPhones(List<Phone> phones) { this.phones = phones; } }
repos\tutorials-master\persistence-modules\spring-data-jpa-query\src\main\java\com\baeldung\joins\model\Employee.java
1
请在Spring Boot框架中完成以下Java代码
public AuthenticationSuccessHandler loginSuccessHandler() { return new CustomLoginSuccessHandler(); } /** * Authentication beans */ @Bean public PasswordEncoder encoder() { return new BCryptPasswordEncoder(); } @Bean public DaoAuthenticationProvider authenticatio...
.exceptionHandling(httpSecurityExceptionHandlingConfigurer -> httpSecurityExceptionHandlingConfigurer.accessDeniedHandler(accessDeniedHandler())) .authenticationProvider(authenticationProvider()); /** Disabled for local testing */ http.csrf(AbstractHttpConfigurer::disable); /** Thi...
repos\tutorials-master\spring-security-modules\spring-security-web-sockets\src\main\java\com\baeldung\springsecuredsockets\config\SecurityConfig.java
2
请完成以下Java代码
private PackToInfo extractPackToInfo( @NonNull final PickingCandidate pickingCandidate, @NonNull final ShipmentSchedulesCache shipmentSchedulesCache) { final PackToSpec packToSpec = pickingCandidate.getPackToSpec(); if (packToSpec == null) { throw new AdempiereException("Pack To Instructions shal...
} else if (packedToHUs.size() != 1) { final String packedHUsDisplayStr = packedToHUs.stream().map(hu -> String.valueOf(hu.getM_HU_ID())).collect(Collectors.joining(", ")); throw new AdempiereException("More than one HU was packed from " + pickFromHUId + ": " + packedHUsDisplayStr) .appendParametersT...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\candidate\commands\ProcessPickingCandidatesCommand.java
1
请完成以下Java代码
private void updateRecord(final I_UI_Trace record, final UITraceEventCreateRequest from) { record.setExternalId(from.getId().getAsString()); record.setEventName(from.getEventName()); record.setTimestamp(Timestamp.from(from.getTimestamp())); record.setURL(from.getUrl()); record.setUserName(from.getUsername())...
if (properties == null) { return ""; } try { return jsonObjectMapper.writeValueAsString(properties); } catch (JsonProcessingException e) { logger.warn("Failed converting request's properties to string: {}", request, e); return properties.toString(); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\ui_trace\UITraceRepository.java
1
请完成以下Java代码
public int indexOf(Object o) { return ruleResults.indexOf(o); } @Override public int lastIndexOf(Object o) { return ruleResults.lastIndexOf(o); } @Override public ListIterator<DmnDecisionResultEntries> listIterator() { return asUnmodifiableList().listIterator(); } @Override public ListI...
@Override public List<DmnDecisionResultEntries> subList(int fromIndex, int toIndex) { return asUnmodifiableList().subList(fromIndex, toIndex); } @Override public String toString() { return ruleResults.toString(); } protected List<DmnDecisionResultEntries> asUnmodifiableList() { return Collecti...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnDecisionResultImpl.java
1
请完成以下Java代码
public String outputFile(TableInfo tableInfo) { // custom file name return projectDir + "/src/main/resources/mybatis/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML; } }); cfg.setFileOutConfigList(focList); ...
.setMapper("/templates/mapper.java") // mapper template .setController("/templates/controller.java") // service template .setService("/templates/service.java") // serviceImpl template .setServiceImpl("/templates/serviceImpl.java"); // controller template...
repos\springboot-demo-master\generator\src\main\java\com\et\generator\Generator.java
1
请完成以下Java代码
public static <T, R> Collector<T, ?, R> collectUsingListAccumulator(@NonNull final Function<List<T>, R> finisher) { final Supplier<List<T>> supplier = ArrayList::new; final BiConsumer<List<T>, T> accumulator = List::add; final BinaryOperator<List<T>> combiner = (acc1, acc2) -> { acc1.addAll(acc2); return a...
@NonNull final Function<T, V> valueMapper, @NonNull final Function<Map<K, V>, R> finisher) { final Supplier<Map<K, V>> supplier = LinkedHashMap::new; final BiConsumer<Map<K, V>, T> accumulator = (map, item) -> map.put(keyMapper.apply(item), valueMapper.apply(item)); final BinaryOperator<Map<K, V>> combiner = ...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\GuavaCollectors.java
1
请完成以下Java代码
public final boolean isDebugTrxCloseStacktrace() { return debugTrxCloseStacktrace; } @Override public final void setDebugTrxCloseStacktrace(final boolean debugTrxCloseStacktrace) { this.debugTrxCloseStacktrace = debugTrxCloseStacktrace; } @Override public final void setDebugClosedTransactions(final boolea...
{ return Collections.emptyList(); } return new ArrayList<>(debugClosedTransactionsList); } finally { trxName2trxLock.unlock(); } } @Override public void setDebugConnectionBackendId(boolean debugConnectionBackendId) { this.debugConnectionBackendId = debugConnectionBackendId; } @Override p...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\api\impl\AbstractTrxManager.java
1
请完成以下Java代码
public String amounts(final ICalloutField calloutField) { if (isCalloutActive()) // assuming it is resetting value { return NO_ERROR; } final I_C_PaymentAllocate paymentAlloc = calloutField.getModel(I_C_PaymentAllocate.class); // No Invoice final int C_Invoice_ID = paymentAlloc.getC_Invoice_ID(); ...
final BigDecimal OverUnderAmt = paymentAlloc.getOverUnderAmt(); final BigDecimal InvoiceAmt = paymentAlloc.getInvoiceAmt(); // Changed Column final String colName = calloutField.getColumnName(); // PayAmt - calculate write off if (I_C_PaymentAllocate.COLUMNNAME_Amount.equals(colName)) { WriteOffAmt = In...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\CalloutPaymentAllocate.java
1
请完成以下Java代码
public class CharPrimitiveLookup extends Lookup { private char[] elements; private final char pivot = 'b'; @Setup @Override public void prepare() { char common = 'a'; elements = new char[s]; for (int i = 0; i < s - 1; i++) { elements[i] = common; } ...
} @Benchmark @BenchmarkMode(Mode.AverageTime) public int findPosition() { int index = 0; while (pivot != elements[index]) { index++; } return index; } @Override public String getSimpleClassName() { return CharPrimitiveLookup.class.getSimpleN...
repos\tutorials-master\core-java-modules\core-java-lang-2\src\main\java\com\baeldung\primitive\CharPrimitiveLookup.java
1
请在Spring Boot框架中完成以下Java代码
public class MultipartProperties { /** * Whether to enable support of multipart uploads. */ private boolean enabled = true; /** * Intermediate location of uploaded files. */ private @Nullable String location; /** * Max file size. */ private DataSize maxFileSize = DataSize.ofMegabytes(1); /** * ...
} public DataSize getFileSizeThreshold() { return this.fileSizeThreshold; } public void setFileSizeThreshold(DataSize fileSizeThreshold) { this.fileSizeThreshold = fileSizeThreshold; } public boolean isResolveLazily() { return this.resolveLazily; } public void setResolveLazily(boolean resolveLazily) { ...
repos\spring-boot-4.0.1\module\spring-boot-servlet\src\main\java\org\springframework\boot\servlet\autoconfigure\MultipartProperties.java
2
请完成以下Java代码
public ProcessPreconditionsResolution checkPreconditionsApplicable(final @NonNull IProcessPreconditionsContext context) { if (context.isNoSelection()) { return ProcessPreconditionsResolution.rejectBecauseNoSelection(); } return ProcessPreconditionsResolution.accept(); } @Override protected void prepare...
if (selectionCount <= 0) { throw new AdempiereException("@NoSelection@"); } } @Override protected String doIt() throws Exception { enqueuer.enqueueSelection(getProcessInfo().getPinstanceId()); return MSG_OK; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\process\C_Invoice_CancelAndRecreate.java
1
请完成以下Java代码
public List<I_AD_Printer_Tray> retrieveTrays(final LogicalPrinterId printerId) { return queryBL.createQueryBuilder(I_AD_Printer_Tray.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_AD_Printer_Tray.COLUMNNAME_AD_Printer_ID, printerId) .create() .list(); } @Override public Stream<I_AD_Print...
return queryBL.createQueryBuilder(I_AD_PrinterHW_MediaTray.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_AD_PrinterHW_MediaTray.COLUMNNAME_AD_PrinterHW_ID, hardwarePrinterId) .create() .list(); } @Override public Stream<I_AD_PrinterHW_MediaTray> streamActiveMediaTrays() { return queryBL...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\api\impl\AbstractPrintingDAO.java
1
请完成以下Java代码
public static ShipmentScheduleAndJobSchedulesCollection ofList(final List<ShipmentScheduleAndJobSchedules> list) { return list.isEmpty() ? EMPTY : new ShipmentScheduleAndJobSchedulesCollection(list); } public static ShipmentScheduleAndJobSchedulesCollection ofShipmentSchedules(final Collection<? extends de.metas....
public ImmutableSet<ShipmentScheduleId> getShipmentScheduleIdsWithoutJobSchedules() { return getShipmentScheduleIds(schedule -> !schedule.hasJobSchedules()); } public ImmutableSet<ShipmentScheduleId> getShipmentScheduleIdsWithJobSchedules() { return getShipmentScheduleIds(ShipmentScheduleAndJobSchedules::hasJo...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipmentschedule\api\ShipmentScheduleAndJobSchedulesCollection.java
1
请完成以下Java代码
private static class AttributeAggregator { private final AttributeCode attributeCode; private final AttributeValueType attributeValueType; private final HashSet<Object> values = new HashSet<>(); void collect(@NonNull final IAttributeSet from) { final Object value = attributeValueType.map(new AttributeVal...
return from.getValueAsDate(attributeCode); } @Nullable @Override public Object list() { return from.getValueAsString(attributeCode); } }); values.add(value); } void updateAggregatedValueTo(@NonNull final IAttributeSet to) { if (values.size() == 1 && to.hasAttribute(attribu...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\impl\AttributeSetAggregator.java
1
请完成以下Java代码
private @Nullable String extractMatchAllRemainingPathSegmentsVariable(String path) { Matcher matcher = ALL_REMAINING_PATH_SEGMENTS_VAR_PATTERN.matcher(path); return matcher.matches() ? matcher.group(1) : null; } /** * Returns the path for the operation. * @return the path */ public String getPath() { re...
result = result && this.httpMethod == other.httpMethod; result = result && this.canonicalPath.equals(other.canonicalPath); result = result && this.produces.equals(other.produces); return result; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + this.cons...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\endpoint\web\WebOperationRequestPredicate.java
1
请完成以下Java代码
public class Md4PasswordEncoder extends AbstractValidatingPasswordEncoder { private static final String PREFIX = "{"; private static final String SUFFIX = "}"; private StringKeyGenerator saltGenerator = new Base64StringKeyGenerator(); private boolean encodeHashAsBase64; public void setEncodeHashAsBase64(boole...
* in the salt and encoding that value * @param rawPassword plain text password * @param encodedPassword previously encoded password * @return true or false */ @Override protected boolean matchesNonNull(String rawPassword, String encodedPassword) { String salt = extractSalt(encodedPassword); String rawPass...
repos\spring-security-main\crypto\src\main\java\org\springframework\security\crypto\password\Md4PasswordEncoder.java
1
请完成以下Java代码
protected void prepare() { return; } @Override protected String doIt() throws Exception { final IADValidatorRegistryBL validatorRegistry = Services.get(IADValidatorRegistryBL.class); final List<Class<?>> registeredClasses = validatorRegistry.getRegisteredClasses(); for (final Class<?> registeredClass : ...
logAllExceptions(errorLog, validatorRegistry.getValidator(registeredClass)); } return "OK"; } private void logAllExceptions(final IADValidatorResult errorLog, final IADValidator<?> validator) { for (final IADValidatorViolation violation : errorLog.getViolations()) { addLog(validator.getLogMessage(violat...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\appdict\validation\process\AppDictValidator.java
1
请完成以下Java代码
private Runtime.Version getVersion(URL url) { // The standard JDK handler uses #runtime to indicate that the runtime version // should be used. This unfortunately doesn't work for us as // jdk.internal.loader.URLClassPath only adds the runtime fragment when the URL // is using the internal JDK handler. We need ...
Files.copy(in, local, StandardCopyOption.REPLACE_EXISTING); JarFile jarFile = new UrlJarFile(local.toFile(), version, closeAction); local.toFile().deleteOnExit(); return jarFile; } catch (Throwable ex) { deleteIfPossible(local, ex); throw ex; } } private void deleteIfPossible(Path local, Throwab...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\net\protocol\jar\UrlJarFileFactory.java
1
请完成以下Java代码
public void setLastEnqueued (final @Nullable java.sql.Timestamp LastEnqueued) { set_Value (COLUMNNAME_LastEnqueued, LastEnqueued); } @Override public java.sql.Timestamp getLastEnqueued() { return get_ValueAsTimestamp(COLUMNNAME_LastEnqueued); } @Override public void setLastProcessed (final @Nullable java...
set_Value (COLUMNNAME_Name, Name); } @Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public de.metas.async.model.I_C_Async_Batch getParent_Async_Batch() { return get_ValueAsPO(COLUMNNAME_Parent_Async_Batch_ID, de.metas.async.model.I_C_Async_Batch.class...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Async_Batch.java
1
请完成以下Java代码
public String getName() { return name; } /** * The {@link User.getId() userId} of the person responsible for this task. */ public String getOwner() { return owner; } /** * indication of how important/urgent this task is with a number between 0 and * 100 where higher values mean a higher ...
@Override public String toString() { return this.getClass().getSimpleName() + "[id=" + id + ", eventName=" + eventName + ", name=" + name + ", createTime=" + createTime + ", lastUpdated=" + lastUpdated + ", executionId=" + executionId + ", processDefinitionI...
repos\camunda-bpm-platform-master\spring-boot-starter\starter\src\main\java\org\camunda\bpm\spring\boot\starter\event\TaskEvent.java
1
请完成以下Java代码
public static EmbeddedDatabaseConnection get(@Nullable ClassLoader classLoader) { for (EmbeddedDatabaseConnection candidate : EmbeddedDatabaseConnection.values()) { String driverClassName = candidate.getDriverClassName(); if (candidate != NONE && driverClassName != null && ClassUtils.isPresent(driverClassName, ...
OptionsCapableConnectionFactory optionsCapable = OptionsCapableConnectionFactory.unwrapFrom(connectionFactory); Assert.state(optionsCapable != null, () -> "Cannot determine database's type as ConnectionFactory is not options-capable. To be " + "options-capable, a ConnectionFactory should be created with " ...
repos\spring-boot-4.0.1\module\spring-boot-r2dbc\src\main\java\org\springframework\boot\r2dbc\EmbeddedDatabaseConnection.java
1
请完成以下Java代码
public class ExceptionMappingAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler { private final Map<String, String> failureUrlMap = new HashMap<>(); @Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) ...
* valid. */ public void setExceptionMappings(Map<?, ?> failureUrlMap) { this.failureUrlMap.clear(); for (Map.Entry<?, ?> entry : failureUrlMap.entrySet()) { Object exception = entry.getKey(); Object url = entry.getValue(); Assert.isInstanceOf(String.class, exception, "Exception key must be a String (the...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\ExceptionMappingAuthenticationFailureHandler.java
1
请完成以下Java代码
public int getM_Warehouse_ID() { return get_ValueAsInt(COLUMNNAME_M_Warehouse_ID); } @Override public void setPP_Maturing_Candidates_v_ID (final int PP_Maturing_Candidates_v_ID) { if (PP_Maturing_Candidates_v_ID < 1) set_ValueNoCheck (COLUMNNAME_PP_Maturing_Candidates_v_ID, null); else set_ValueNoC...
@Override public void setPP_Product_BOMVersions(final org.eevolution.model.I_PP_Product_BOMVersions PP_Product_BOMVersions) { set_ValueFromPO(COLUMNNAME_PP_Product_BOMVersions_ID, org.eevolution.model.I_PP_Product_BOMVersions.class, PP_Product_BOMVersions); } @Override public void setPP_Product_BOMVersions_ID (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PP_Maturing_Candidates_v.java
1
请完成以下Java代码
public static boolean contains0x00(final String s) { return s != null && s.contains("\u0000"); } public static String randomNumeric(int length) { return RandomStringUtils.secure().nextNumeric(length); } public static String random(int length) { return RandomStringUtils.secure()...
int truncatedSymbols = string.length() - maxLength; return string.substring(0, maxLength) + truncationMarkerFunc.apply(truncatedSymbols); } public static List<String> splitByCommaWithoutQuotes(String value) { List<String> splitValues = List.of(value.trim().split("\\s*,\\s*")); List<Stri...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\StringUtils.java
1
请完成以下Java代码
public boolean cancel(boolean mayInterruptIfRunning) { // already completed, always return false return false; } @Override public boolean isCancelled() { return false; } @Override public boolean isDone() {
return true; } @Override public T get() { return value; } @Override public T get(long timeout, TimeUnit unit) { return value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\concurrent\InstantFuture.java
1
请完成以下Java代码
public void configure(Map<String, ?> configs, boolean isKey) { if (NO_PARSER.equals(this.parser)) { String parserMethod = (String) configs.get(isKey ? KEY_PARSER : VALUE_PARSER); Assert.state(parserMethod != null, "A parser must be provided either via a constructor or consumer properties"); this.parser ...
/** * Set a charset to use when converting byte[] to {@link String}. Default UTF-8. * @param charset the charset. */ public void setCharset(Charset charset) { Assert.notNull(charset, "'charset' cannot be null"); this.charset = charset; } /** * Get the configured charset. * @return the charset. */ ...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\ParseStringDeserializer.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO (Properties ctx) { org.compiere.model.POInfo poi = org.compiere.model.POInfo.getPOInfo (ctx, Table_Name, get_TrxName()); return poi; } @Override public de.metas.shipper.gateway.go.model.I_GO_DeliveryOrder getGO_DeliveryOrder() throws RuntimeException { ...
@Override public org.compiere.model.I_M_Package getM_Package() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_M_Package_ID, org.compiere.model.I_M_Package.class); } @Override public void setM_Package(org.compiere.model.I_M_Package M_Package) { set_ValueFromPO(COLUMNNAME_M_Package_ID, org.compiere....
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java-gen\de\metas\shipper\gateway\go\model\X_GO_DeliveryOrder_Package.java
1
请完成以下Java代码
public class XMLHandlerFactory implements IXMLHandlerFactory { /** * Map: Bean Class -> Converter Class * * e.g. I_AD_Migration -> MigrationHandler */ private final Map<Class<?>, Class<?>> handlerByBeanClass = new HashMap<Class<?>, Class<?>>(); /** * Map: NodeName -> Bean Class * * e.g. "Migration" -...
return getHandler(beanClass); } @Override public <T> IXMLHandler<T> getHandler(Class<T> clazz) { final Class<?> converterClass = handlerByBeanClass.get(clazz); try { @SuppressWarnings("unchecked") IXMLHandler<T> converter = (IXMLHandler<T>)converterClass.newInstance(); return converter; } catch ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\xml\impl\XMLHandlerFactory.java
1
请完成以下Java代码
public int addArchivePartToPDF(@NonNull final PrintingData data, @NonNull final PrintingSegment segment) { try { return addArchivePartToPDF0(data, segment); } catch (final Exception e) { throw new PrintingQueueAggregationException(data.getPrintingQueueItemId().getRepoId(), e); } } private int addA...
logger.debug("PageFrom={}, PageTo={}, NumberOfPages={}", pageFrom, pageTo, archivePageNums); for (int page = pageFrom; page <= pageTo; page++) { try { pdfCopy.addPage(pdfCopy.getImportedPage(reader, page)); } catch (final BadPdfFormatException e) { throw new AdempiereException("@Inv...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\printingdata\PrintingDataToPDFWriter.java
1
请完成以下Java代码
public void setLeichMehl_PluFile_Config_ID (final int LeichMehl_PluFile_Config_ID) { if (LeichMehl_PluFile_Config_ID < 1) set_ValueNoCheck (COLUMNNAME_LeichMehl_PluFile_Config_ID, null); else set_ValueNoCheck (COLUMNNAME_LeichMehl_PluFile_Config_ID, LeichMehl_PluFile_Config_ID); } @Override public int ...
{ return get_ValueAsString(COLUMNNAME_TargetFieldName); } /** * TargetFieldType AD_Reference_ID=541611 * Reference name: AttributeTypeList */ public static final int TARGETFIELDTYPE_AD_Reference_ID=541611; /** textArea = textArea */ public static final String TARGETFIELDTYPE_TextArea = "textArea"; /** E...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java-gen\de\metas\externalsystem\model\X_LeichMehl_PluFile_Config.java
1
请完成以下Java代码
public class SponsorNoObject { private String sponsorNo; private String name; private int sponsorID; // private String stringRepresentation = null; public SponsorNoObject(int sponsorID, String sponsorNo, String name) { super(); this.sponsorID = sponsorID; this.sponsorNo = sponsorNo; this.name = name; }...
{ this.stringRepresentation = stringRepresentation; } @Override public boolean equals(Object obj) { if (!(obj instanceof SponsorNoObject)) return false; if (this == obj) return true; // SponsorNoObject sno = (SponsorNoObject)obj; return this.sponsorNo == sno.sponsorNo; } @Override public Stri...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\gui\search\SponsorNoObject.java
1
请完成以下Java代码
public class GetExecutionVariablesCmd implements Command<VariableMap>, Serializable { private static final long serialVersionUID = 1L; protected String executionId; protected Collection<String> variableNames; protected boolean isLocal; protected boolean deserializeValues; public GetExecutionVariablesCmd(S...
.findExecutionById(executionId); ensureNotNull("execution " + executionId + " doesn't exist", "execution", execution); checkGetExecutionVariables(execution, commandContext); VariableMapImpl executionVariables = new VariableMapImpl(); // collect variables from execution execution.collectVariables...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmd\GetExecutionVariablesCmd.java
1
请完成以下Java代码
private static Font getCellStyle(Cell cell) throws DocumentException, IOException { Font font = new Font(); CellStyle cellStyle = cell.getCellStyle(); org.apache.poi.ss.usermodel.Font cellFont = cell.getSheet() .getWorkbook() .getFontAt(cellStyle.getFontIndexAsInt()); ...
} String fontName = cellFont.getFontName(); if (FontFactory.isRegistered(fontName)) { font.setFamily(fontName); // Use extracted font family if supported by iText } else { logger.warn("Unsupported font type: {}", fontName); // - Use a fallback font (e.g., Hel...
repos\tutorials-master\text-processing-libraries-modules\pdf-2\src\main\java\com\baeldung\exceltopdf\ExcelToPDFConverter.java
1
请完成以下Java代码
public class SerializableDataFormat implements DataFormat { private static final SerializableLogger LOG = ExternalTaskClientLogger.SERIALIZABLE_FORMAT_LOGGER; protected String name; public SerializableDataFormat(String name) { this.name = name; } public String getName() { return name; } publi...
public <T> T readValue(String value, String typeIdentifier) { return readValue(value); } public <T> T readValue(String value, Class<T> cls) { return readValue(value); } @SuppressWarnings("unchecked") protected <T> T readValue(String value) { Decoder decoder = Base64.getDecoder(); byte[] base...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\variable\impl\format\serializable\SerializableDataFormat.java
1
请完成以下Java代码
public void setMTree(MTree tree) { m_MTree = tree; } @Override public MTreeNode getRoot() { return (MTreeNode)super.getRoot(); } public boolean saveChildren(MTreeNode parent) { return saveChildren(parent, parent.getChildrenList()); } public boolean saveChildren(MTreeNode parent, List<MTreeNode> chil...
log.error(e.getLocalizedMessage(), e); return false; } return true; } // metas: begin public void filterIds(final List<Integer> ids) { Check.assumeNotNull(ids, "Param 'ids' is not null"); Services.get(IADTreeBL.class).filterIds(getRoot(), ids); reload(); } // metas: end }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\tree\AdempiereTreeModel.java
1
请完成以下Java代码
private PerformanceMonitoringService performanceMonitoringService() { PerformanceMonitoringService performanceMonitoringService = _performanceMonitoringService; if (performanceMonitoringService == null || performanceMonitoringService instanceof NoopPerformanceMonitoringService) { performanceMonitoringService ...
{ return sessionBL().isChangeLogEnabled(); } public String getInsertChangeLogType(final int adClientId) { return sysConfigBL().getValue("SYSTEM_INSERT_CHANGELOG", "N", adClientId); } public void saveChangeLogs(final List<ChangeLogRecord> changeLogRecords) { sessionDAO().saveChangeLogs(changeLogRecords); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\POServicesFacade.java
1
请完成以下Java代码
public class Artist implements Serializable { private String name; private String country; private String genre; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getCountry() { return country; }...
result = prime * result + ((country == null) ? 0 : country.hashCode()); result = prime * result + ((genre == null) ? 0 : genre.hashCode()); result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } @Override public boolean equals(Object obj) { if (th...
repos\tutorials-master\persistence-modules\hibernate-libraries\src\main\java\com\baeldung\hibernate\types\Artist.java
1
请完成以下Java代码
public void setPasswordEncoder(PasswordEncoder passwordEncoder) { Assert.notNull(passwordEncoder, "passwordEncoder cannot be null"); this.passwordEncoder = () -> passwordEncoder; this.userNotFoundEncodedPassword = null; } protected PasswordEncoder getPasswordEncoder() { return this.passwordEncoder.get(); } ...
Assert.notNull(userDetailsPasswordService, "userDetailsPasswordService cannot be null"); this.userDetailsPasswordService = userDetailsPasswordService; } /** * Sets the {@link CompromisedPasswordChecker} to be used before creating a successful * authentication. Defaults to {@code null}. * @param compromisedPa...
repos\spring-security-main\core\src\main\java\org\springframework\security\authentication\dao\DaoAuthenticationProvider.java
1
请完成以下Java代码
public class RabbitChannelMessageListenerAdapter implements MessageListener { protected EventRegistry eventRegistry; protected InboundChannelModel inboundChannelModel; public RabbitChannelMessageListenerAdapter(EventRegistry eventRegistry, InboundChannelModel inboundChannelModel) { this.eventRegis...
return eventRegistry; } public void setEventRegistry(EventRegistry eventRegistry) { this.eventRegistry = eventRegistry; } public InboundChannelModel getInboundChannelModel() { return inboundChannelModel; } public void setInboundChannelModel(InboundChannelModel inboundChannelMo...
repos\flowable-engine-main\modules\flowable-event-registry-spring\src\main\java\org\flowable\eventregistry\spring\rabbit\RabbitChannelMessageListenerAdapter.java
1
请在Spring Boot框架中完成以下Java代码
public GetArticlesResult findByFilters(String tag, String author, String favorited, Integer limit, Integer offset) { return bus.executeQuery...
} @Override public FavoriteArticleResult favorite(String slug) { return bus.executeCommand(new FavoriteArticle(slug)); } @Override public UnfavoriteArticleResult unfavorite(String slug) { return bus.executeCommand(new UnfavoriteArticle(slug)); } @Override public GetCom...
repos\realworld-backend-spring-master\service\src\main\java\com\github\al\realworld\infrastructure\web\ArticleController.java
2
请完成以下Java代码
public String getRootProcessInstanceId() { return rootProcessInstanceId; } public Date getRemovalTime() { return removalTime; } public void setRemovalTime(Date removalTime) { this.removalTime = removalTime; } public void setRootProcessInstanceId(String rootProcessInstanceId) { this.rootPr...
+ ", revision=" + revision + ", name=" + name + ", description=" + description + ", type=" + type + ", taskId=" + taskId + ", processInstanceId=" + processInstanceId + ", rootProcessInstanceId=" + rootProcessInstanceId + ", removalTime=" + rem...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\AttachmentEntity.java
1
请完成以下Java代码
public void setModels(List<CarModel> models) { this.models = models; } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); ...
return false; CarMaker other = (CarMaker) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (models == null) { if (other.models != null) return false; } ...
repos\tutorials-master\apache-olingo\src\main\java\com\baeldung\examples\olingo2\domain\CarMaker.java
1
请完成以下Java代码
public class Main { static String filePath = Objects.requireNonNull(Main.class.getClassLoader().getResource("myFile.gz")).getFile(); public static void main(String[] args) throws IOException { // Test readGZipFile method List<String> fileContents = readGZipFile(filePath); System.out.pri...
return lines; } public static List<String> findInZipFile(String filePath, String toFind) throws IOException { try (InputStream inputStream = new FileInputStream(filePath); GZIPInputStream gzipInputStream = new GZIPInputStream(inputStream); InputStreamReader inputStreamReader =...
repos\tutorials-master\core-java-modules\core-java-io-5\src\main\java\com\baeldung\usinggzipInputstream\Main.java
1
请完成以下Java代码
public @Nullable String resolveCsrfTokenValue(HttpServletRequest request, CsrfToken csrfToken) { String actualToken = super.resolveCsrfTokenValue(request, csrfToken); if (actualToken == null) { return null; } return getTokenValue(actualToken, csrfToken.getToken()); } private static @Nullable String getTok...
} return xoredCsrf; } private static final class CachedCsrfTokenSupplier implements Supplier<CsrfToken> { private final Supplier<CsrfToken> delegate; private @Nullable CsrfToken csrfToken; private CachedCsrfTokenSupplier(Supplier<CsrfToken> delegate) { this.delegate = delegate; } @Override publi...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\csrf\XorCsrfTokenRequestAttributeHandler.java
1
请在Spring Boot框架中完成以下Java代码
private ConnectionInfo parseXForwardedInfo(ConnectionInfo connectionInfo, HttpRequest request) { String ipHeader = request.headers().get(X_FORWARDED_IP_HEADER); if (ipHeader != null) { connectionInfo = connectionInfo.withRemoteAddress( AddressUtils.parseAddress(ipHeader.split(",", 2)[0], connectionInfo.getR...
if (portHeader != null && !portHeader.isEmpty()) { String portStr = portHeader.split(",", 2)[0].trim(); if (portStr.chars().allMatch(Character::isDigit)) { int port = Integer.parseInt(portStr); connectionInfo = connectionInfo.withHostAddress( AddressUtils.createUnresolved(connectionInfo.getHostAddre...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\config\DefaultNettyHttpForwardedHeaderHandler.java
2
请完成以下Spring Boot application配置
spring.ai.vectorstore.redis.uri=redis://127.0.0.1:6379 spring.ai.vectorstore.redis.index=default-index spring.ai.vectorstore.redis.prefix=default # API key if needed, e.g. OpenAI spri
ng.ai.openai.api.key=<api-key> spring.main.allow-bean-definition-overriding=true
repos\springboot-demo-master\RedisVectorStore\src\main\resources\application.properties
2
请完成以下Java代码
public boolean equals(final Object obj) { if (this == obj) { return true; } final PMMBalanceSegment other = EqualsBuilder.getOther(this, obj); if (other == null) { return false; } return new EqualsBuilder() .append(C_BPartner_ID, other.C_BPartner_ID) .append(M_Product_ID, other.M_Produc...
private Builder() { super(); } public PMMBalanceSegment build() { return new PMMBalanceSegment(this); } public Builder setC_BPartner_ID(final int C_BPartner_ID) { this.C_BPartner_ID = C_BPartner_ID; return this; } public Builder setM_Product_ID(final int M_Product_ID) { this.M_Prod...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\balance\PMMBalanceSegment.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult create(@RequestBody SmsHomeAdvertise advertise) { int count = advertiseService.create(advertise); if (count > 0) return CommonResult.success(count); return CommonResult.failed(); } @ApiOperation("删除广告") @RequestMapping(value = "/delete", method = Requ...
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST) @ResponseBody public CommonResult update(@PathVariable Long id, @RequestBody SmsHomeAdvertise advertise) { int count = advertiseService.update(id, advertise); if (count > 0) return CommonResult.success(count); ...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\SmsHomeAdvertiseController.java
2
请完成以下Java代码
public RuleChain findDefaultEntityByTenantId(UUID tenantId) { return findRootRuleChainByTenantIdAndType(tenantId, RuleChainType.CORE); } @Override public PageData<RuleChain> findAllByTenantId(TenantId tenantId, PageLink pageLink) { return findRuleChainsByTenantId(tenantId.getId(), pageLink)...
public List<EntityInfo> findByResource(String reference, int limit) { return ruleChainRepository.findRuleChainsByResource(reference, PageRequest.of(0, limit)); } @Override public List<RuleChainFields> findNextBatch(UUID id, int batchSize) { return ruleChainRepository.findNextBatch(id, Limit...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\sql\rule\JpaRuleChainDao.java
1
请完成以下Java代码
public class SameBehaviorInstructionValidator implements MigrationInstructionValidator { public static final List<Set<Class<?>>> EQUIVALENT_BEHAVIORS = new ArrayList<Set<Class<?>>>(); static { EQUIVALENT_BEHAVIORS.add(CollectionUtil.<Class<?>>asHashSet( CallActivityBehavior.class, CaseCallActivity...
ActivityImpl sourceActivity = instruction.getSourceActivity(); ActivityImpl targetActivity = instruction.getTargetActivity(); Class<?> sourceBehaviorClass = sourceActivity.getActivityBehavior().getClass(); Class<?> targetBehaviorClass = targetActivity.getActivityBehavior().getClass(); if (!sameBehavio...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\validation\instruction\SameBehaviorInstructionValidator.java
1
请在Spring Boot框架中完成以下Java代码
private boolean isEdqsType(TenantId tenantId, ObjectType objectType) { if (objectType == null) { return false; } if (!tenantId.isSysTenantId()) { return ObjectType.edqsTypes.contains(objectType); } else { return ObjectType.edqsSystemTypes.contains(obje...
@SneakyThrows private void saveSyncState(EdqsSyncStatus status) { saveSyncState(status, null); } @SneakyThrows private void saveSyncState(EdqsSyncStatus status, Set<ObjectType> objectTypes) { EdqsSyncState state = new EdqsSyncState(status, objectTypes); log.info("New EDQS sync s...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\edqs\DefaultEdqsService.java
2
请在Spring Boot框架中完成以下Java代码
public void setId(Long id) { this.id = id; } public String getLogin() { return login; } // Lowercase the login before saving it in database public void setLogin(String login) { this.login = StringUtils.lowerCase(login, Locale.ENGLISH); } public String getPassword()...
this.resetKey = resetKey; } public Instant getResetDate() { return resetDate; } public void setResetDate(Instant resetDate) { this.resetDate = resetDate; } public String getLangKey() { return langKey; } public void setLangKey(String langKey) { this.lan...
repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\domain\User.java
2
请完成以下Java代码
public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return...
} public String getIban() { return iban; } public void setIban(String iban) { this.iban = iban; } public String getWebsite() { return website; } public void setWebsite(String website) { this.website = website; } public File getMainDirectory() { ...
repos\tutorials-master\apache-libraries-2\src\main\java\com\baeldung\apache\bval\model\User.java
1
请完成以下Java代码
public static <T> List<List<T>> partition(Collection<T> values, int partitionSize) { if (values == null) { return null; } else if (values.isEmpty()) { return Collections.emptyList(); } List<T> valuesList; if (values instanceof List) { valuesLi...
} else { for (int startIndex = 0; startIndex < valuesSize; startIndex += partitionSize) { int endIndex = startIndex + partitionSize; if (endIndex > valuesSize) { endIndex = valuesSize; // endIndex in #subList is exclusive } ...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\util\CollectionUtil.java
1
请完成以下Java代码
public CommentEntity findCommentByProcessInstanceIdAndCommentId(String processInstanceId, String commentId) { checkHistoryEnabled(); Map<String, String> parameters = new HashMap<>(); parameters.put("processInstanceId", processInstanceId); parameters.put("id", commentId); return (CommentEntity) get...
return getDbEntityManager() .updatePreserveOrder(CommentEntity.class, "updateCommentsByProcessInstanceId", parameters); } public DbOperation deleteCommentsByRemovalTime(Date removalTime, int minuteFrom, int minuteTo, int batchSize) { Map<String, Object> parameters = new HashMap<>(); parameters.put("r...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\CommentManager.java
1
请完成以下Java代码
public class X_C_BPartner_DocType extends org.compiere.model.PO implements I_C_BPartner_DocType, org.compiere.model.I_Persistent { private static final long serialVersionUID = 835197703L; /** Standard Constructor */ public X_C_BPartner_DocType (final Properties ctx, final int C_BPartner_DocType_ID, @Nullabl...
return get_ValueAsPO(COLUMNNAME_C_BPartner_Report_Text_ID, I_C_BPartner_Report_Text.class); } @Override public void setC_BPartner_Report_Text(final I_C_BPartner_Report_Text C_BPartner_Report_Text) { set_ValueFromPO(COLUMNNAME_C_BPartner_Report_Text_ID, I_C_BPartner_Report_Text.class, C_BPartner_Report_Text); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.fresh\de.metas.fresh.base\src\main\java\de\metas\fresh\partnerreporttext\model\X_C_BPartner_DocType.java
1
请在Spring Boot框架中完成以下Java代码
public class QueryHelper { @NonNull @VisibleForTesting public static JsonQuery buildEqualsJsonQuery(@NonNull final String key, @NonNull final String value) { return JsonQuery.builder() .field(key) .queryType(QueryType.EQUALS) .value(value) .build(); } @NonNull public static MultiQueryRequest b...
.build()) .build(); } @NonNull @VisibleForTesting public static JsonQuery buildUpdatedAfterJsonQueries(@NonNull final String updatedAfter) { final HashMap<String, String> parameters = new HashMap<>(); parameters.put(PARAMETERS_GTE, updatedAfter); return JsonQuery.builder() .queryType(QueryType.MULT...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-shopware6\src\main\java\de\metas\camel\externalsystems\shopware6\api\model\QueryHelper.java
2
请完成以下Java代码
public void setKeepResponseBodyDays (final int KeepResponseBodyDays) { set_Value (COLUMNNAME_KeepResponseBodyDays, KeepResponseBodyDays); } @Override public int getKeepResponseBodyDays() { return get_ValueAsInt(COLUMNNAME_KeepResponseBodyDays); } @Override public void setKeepResponseDays (final int KeepR...
public static final String NOTIFYUSERINCHARGE_AllenAufrufen = "ALWAYS "; @Override public void setNotifyUserInCharge (final @Nullable java.lang.String NotifyUserInCharge) { set_Value (COLUMNNAME_NotifyUserInCharge, NotifyUserInCharge); } @Override public java.lang.String getNotifyUserInCharge() { return ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_API_Audit_Config.java
1
请在Spring Boot框架中完成以下Java代码
public class UserGroupId implements RepoIdAware { @JsonCreator public static UserGroupId ofRepoId(final int repoId) { return new UserGroupId(repoId); } public static UserGroupId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new UserGroupId(repoId) : null; } public static int toRepoId(final UserGr...
} private final int repoId; private UserGroupId(final int repoId) { this.repoId = Check.assumeGreaterOrEqualToZero(repoId, "AD_UserGroup_ID"); } @Override @JsonValue public int getRepoId() { return repoId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\UserGroupId.java
2
请在Spring Boot框架中完成以下Java代码
public class DefaultDependencyMetadataProvider implements DependencyMetadataProvider { @Override @Cacheable(cacheNames = "initializr.dependency-metadata", key = "#p1") public DependencyMetadata get(InitializrMetadata metadata, Version bootVersion) { Map<String, Dependency> dependencies = new LinkedHashMap<>(); ...
Map<String, BillOfMaterials> boms = new LinkedHashMap<>(); for (Dependency dependency : dependencies.values()) { if (dependency.getBom() != null) { boms.put(dependency.getBom(), metadata.getConfiguration().getEnv().getBoms().get(dependency.getBom()).resolve(bootVersion)); } } // Each resolved bom ...
repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\support\DefaultDependencyMetadataProvider.java
2
请完成以下Java代码
private static String clean(String s){ if(s==null) return null; // 去除结尾控制符/空白(不影响中间合法空格) return s.replaceAll("[\\p{Cntrl}]+","").trim(); } /* -------- 若仍需要旧接口,可保留 (不建议再用于新前端) -------- */ @Deprecated public static String desEncrypt(String data) throws Exception { return d...
if (plaintextLength % blockSize != 0) { plaintextLength += (blockSize - (plaintextLength % blockSize)); } byte[] plaintext = new byte[plaintextLength]; System.arraycopy(dataBytes, 0, plaintext, 0, dataBytes.length); SecretKeySpec keyspec = new SecretKeySpe...
repos\JeecgBoot-main\jeecg-boot\jeecg-boot-base-core\src\main\java\org\jeecg\common\util\encryption\AesEncryptUtil.java
1
请完成以下Java代码
public String encrypt(String text) { return new String(Base64.getEncoder().encode(encrypt(text.getBytes(this.charset))), this.defaultCharset); } @Override public String decrypt(String encryptedText) { if (this.privateKey == null) { throw new IllegalStateException("Private key must be provided for decryption"...
throw new IllegalStateException("Cannot encrypt", ex); } } private static byte[] decrypt(byte[] text, @Nullable RSAPrivateKey key, RsaAlgorithm alg) { ByteArrayOutputStream output = new ByteArrayOutputStream(text.length); try { final Cipher cipher = Cipher.getInstance(alg.getJceName()); int maxLength = g...
repos\spring-security-main\crypto\src\main\java\org\springframework\security\crypto\encrypt\RsaRawEncryptor.java
1
请完成以下Java代码
public void setBackground (boolean error) { if (error) setBackground(AdempierePLAF.getFieldBackground_Error()); else if (!isReadWrite()) setBackground(AdempierePLAF.getFieldBackground_Inactive()); else if (m_mandatory) setBackground(AdempierePLAF.getFieldBackground_Mandatory()); else setBackground(...
* Return Editor value * @return current value */ @Override public Object getValue() { return new String(super.getPassword()); } // getValue /** * Return Display Value * @return displayed String value */ @Override public String getDisplay() { return new String(super.getPassword()); } // ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CPassword.java
1
请完成以下Java代码
public void setBankName (String BankName) { set_Value (COLUMNNAME_BankName, BankName); } /** Get Bank Name. @return Bank Name */ public String getBankName () { return (String)get_Value(COLUMNNAME_BankName); } /** Set Cheque No. @param ChequeNo Cheque No */ public void setChequeNo (String ChequeNo...
public void setU_BlackListCheque_ID (int U_BlackListCheque_ID) { if (U_BlackListCheque_ID < 1) set_ValueNoCheck (COLUMNNAME_U_BlackListCheque_ID, null); else set_ValueNoCheck (COLUMNNAME_U_BlackListCheque_ID, Integer.valueOf(U_BlackListCheque_ID)); } /** Get Black List Cheque. @return Black List Chequ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_U_BlackListCheque.java
1
请完成以下Java代码
private void writeStackTrace(PrintWriter writer, ThreadInfo info, MonitorInfo[] lockedMonitors) { int depth = 0; for (StackTraceElement element : info.getStackTrace()) { writeStackTraceElement(writer, element, info, lockedMonitorsForDepth(lockedMonitors, depth), depth == 0); depth++; } } private List<Mon...
return String.format("<%x> (a %s)", lockInfo.getIdentityHashCode(), lockInfo.getClassName()); } private void writeMonitors(PrintWriter writer, List<MonitorInfo> lockedMonitorsAtCurrentDepth) { for (MonitorInfo lockedMonitor : lockedMonitorsAtCurrentDepth) { writer.printf("\t- locked %s%n", format(lockedMonitor)...
repos\spring-boot-4.0.1\module\spring-boot-actuator\src\main\java\org\springframework\boot\actuate\management\PlainTextThreadDumpFormatter.java
1
请完成以下Java代码
public DataEntryRecord getById(@NonNull final DataEntryRecordId dataEntryRecordId) { final I_DataEntry_Record record = getRecordById(dataEntryRecordId); return toDataEntryRecord(record); } private I_DataEntry_Record getRecordById(final DataEntryRecordId dataEntryRecordId) { return load(dataEntryRecordId, I_D...
final DataEntryRecordId dataEntryRecordId = DataEntryRecordId.ofRepoId(dataRecord.getDataEntry_Record_ID()); dataEntryRecord.setId(dataEntryRecordId); return dataEntryRecordId; } public void deleteBy(@NonNull final DataEntryRecordQuery query) { query(query).delete(); } private IQuery<I_DataEntry_Record> q...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dataentry\data\DataEntryRecordRepository.java
1
请在Spring Boot框架中完成以下Java代码
public R<Tenant> detail(Tenant tenant) { Tenant detail = tenantService.getOne(Condition.getQueryWrapper(tenant)); return R.data(detail); } /** * 分页 */ @GetMapping("/list") @Parameters({ @Parameter(name = "tenantId", description = "参数名称", in = ParameterIn.QUERY, schema = @Schema(type = "string")), @Para...
public R submit(@Valid @RequestBody Tenant tenant) { return R.status(tenantService.saveTenant(tenant)); } /** * 删除 */ @PostMapping("/remove") @Operation(summary = "逻辑删除", description = "传入ids") public R remove(@Parameter(description = "主键集合", required = true) @RequestParam String ids) { return R.status(t...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\controller\TenantController.java
2
请完成以下Java代码
public void attachState(MigratingTransitionInstance targetTransitionInstance) { attachTo(targetTransitionInstance.resolveRepresentativeExecution()); for (MigratingInstance dependentInstance : migratingDependentInstances) { dependentInstance.attachState(targetTransitionInstance); } } protected vo...
jobEntity.setDeploymentId(processDefinition.getDeploymentId()); } public void migrateDependentEntities() { for (MigratingInstance migratingDependentInstance : migratingDependentInstances) { migratingDependentInstance.migrateState(); } } public void remove() { jobEntity.delete(); } publi...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigratingJobInstance.java
1
请完成以下Java代码
private Map<InvoicePaySelectionLinesAggregationKey, AggregatedInvoicePaySelectionLines> getInvoiceKeyToGroupedPaySelectionLines(@NonNull final List<I_C_PaySelectionLine> paySelectionLines) { return paySelectionLines.stream() // No Bank account. Nothing to do. .filter(this::hasBusinessPartnerBankAccount) ...
@NonNull private CreateSEPAExportFromPaySelectionCommand.InvoicePaySelectionLinesAggregationKey extractPaySelectionLinesKey(@NonNull final I_C_PaySelectionLine paySelectionLine) { final BankAccountId bankAccountId = BankAccountId.ofRepoId(paySelectionLine.getC_BP_BankAccount_ID()); final BankAccount bpBankAccount...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java\de\metas\payment\sepa\api\impl\CreateSEPAExportFromPaySelectionCommand.java
1
请完成以下Java代码
public void setCalendarDay (final @Nullable java.lang.String CalendarDay) { set_Value (COLUMNNAME_CalendarDay, CalendarDay); } @Override public java.lang.String getCalendarDay() { return get_ValueAsString(COLUMNNAME_CalendarDay); } @Override public void setCalendarMonth (final @Nullable java.lang.String ...
return get_ValueAsString(COLUMNNAME_CalendarYear); } @Override public void setCurrentNext (final int CurrentNext) { set_Value (COLUMNNAME_CurrentNext, CurrentNext); } @Override public int getCurrentNext() { return get_ValueAsInt(COLUMNNAME_CurrentNext); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Sequence_No.java
1
请完成以下Java代码
public Config setInClass(ParameterizedTypeReference inTypeReference) { this.inClass = inTypeReference; return this; } public @Nullable ParameterizedTypeReference getOutClass() { return outClass; } public Config setOutClass(Class outClass) { return setOutClass(ParameterizedTypeReference.forType(out...
RewriteFunction<T, R> rewriteFunction) { setInClass(inClass); setOutClass(outClass); setRewriteFunction(rewriteFunction); return this; } public <T, R> Config setRewriteFunction(ParameterizedTypeReference<T> inClass, ParameterizedTypeReference<R> outClass, RewriteFunction<T, R> rewriteFunction) { ...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\rewrite\ModifyRequestBodyGatewayFilterFactory.java
1
请完成以下Java代码
public boolean canHandle(Object object) { return object instanceof List; } public String detectType(Object object) { return constructType(object).toCanonical(); } protected JavaType constructType(Object object) { TypeFactory typeFactory = TypeFactory.defaultInstance(); if (object instanceof L...
} } return typeFactory.constructType(object.getClass()); } private boolean bindingsArePresent(Class<?> erasedType) { TypeVariable<?>[] vars = erasedType.getTypeParameters(); int varLen = (vars == null) ? 0 : vars.length; if (varLen == 0) { return false; } if (varLen != 1) { ...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\variable\impl\format\json\ListJacksonJsonTypeDetector.java
1
请完成以下Java代码
public boolean isSuspended() { return suspended; } public String getTenantId() { return tenantId; } public String getCreateUserId() { return createUserId; } public Date getStartTime() { return startTime; } public void setStartTime(final Date startTime) { this.startTime = startTim...
} public static BatchDto fromBatch(Batch batch) { BatchDto dto = new BatchDto(); dto.id = batch.getId(); dto.type = batch.getType(); dto.totalJobs = batch.getTotalJobs(); dto.jobsCreated = batch.getJobsCreated(); dto.batchJobsPerSeed = batch.getBatchJobsPerSeed(); dto.invocationsPerBatchJ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\batch\BatchDto.java
1
请完成以下Java代码
public String toString(int indentFactor) throws JSONException { return toString(indentFactor, 0); } /** * Make a prettyprinted JSON text of this JSONArray. Warning: This method assumes that the signalData structure is acyclical. * * @param indentFactor * The number of space...
sb.append(']'); return sb.toString(); } /** * Write the contents of the JSONArray as JSON text to a writer. For compactness, no whitespace is added. * <p> * Warning: This method assumes that the signalData structure is acyclical. * * @return The writer. * @throws JSONExcep...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\json\JSONArray.java
1
请完成以下Java代码
public final class HUListCursor { private final ArrayList<I_M_HU> list = new ArrayList<>(); private int currentIndex = -1; private I_M_HU currentItem = null; private boolean currentItemSet = false; /** * Append item at the end of the underlying list. */ public void append(final I_M_HU item) { list.add(it...
return currentIndex + 1 < size; } } public I_M_HU next() { // Calculate the next index final int nextIndex; if (currentIndex < 0) { nextIndex = 0; } else { nextIndex = currentIndex + 1; } // Make sure the new index is valid final int size = list.size(); if (nextIndex >= size) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\util\HUListCursor.java
1
请完成以下Java代码
public DocTypeId getDocTypeId( @NonNull final DocBaseType docBaseType, @NonNull final OrgId orgId) { return getDocTypeId(docBaseType, DocSubType.NONE, orgId); } @NonNull public DocTypeId getDocTypeId( @NonNull final DocBaseType docBaseType, @NonNull final DocSubType docSubType, @NonNull final OrgI...
final DocTypeQuery query = DocTypeQuery .builder() .docBaseType(docBaseType) .docSubType(docSubType) .adClientId(orgRecord.getAD_Client_ID()) .adOrgId(orgRecord.getAD_Org_ID()) .build(); return docTypeDAO.getDocTypeId(query); } @NonNull public Optional<JsonOrderDocType> getOrderDocType(@N...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\order\impl\DocTypeService.java
1
请完成以下Java代码
public class CmmnExternalWorkerTransitionBuilderImpl implements CmmnExternalWorkerTransitionBuilder { protected final CommandExecutor commandExecutor; protected final String externalJobId; protected final String workerId; protected Map<String, Object> variables; public CmmnExternalWorkerTransitio...
@Override public CmmnExternalWorkerTransitionBuilder variable(String name, Object value) { if (this.variables == null) { this.variables = new LinkedHashMap<>(); } this.variables.put(name, value); return this; } @Override public void complete() { comma...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\runtime\CmmnExternalWorkerTransitionBuilderImpl.java
1
请在Spring Boot框架中完成以下Java代码
public String toPage(){ return "/imgUpload"; } @RequestMapping(value = "/transfer",method = RequestMethod.POST) @ResponseBody public ResponseEntity<InputStreamResource> imt2txt(@RequestParam("file") MultipartFile file){ try { String originalFilename = file.getOriginalFilenam...
File error = new File(img2TxtService.getErrorPath()); headers.add("Cache-Control", "no-cache, no-store, must-revalidate"); headers.add("Content-Disposition", String.format("attachment; filename=\"%s\"", error.getName())); headers.add("Pragma", "no-cache"); ...
repos\spring-boot-quick-master\quick-img2txt\src\main\java\com\quick\controller\Img2TxtController.java
2
请在Spring Boot框架中完成以下Java代码
public DataScopeModel getDataScopeByMapper(String mapperId, String roleId) { List<Object> args = new ArrayList<>(Collections.singletonList(mapperId)); List<Long> roleIds = Func.toLongList(roleId); args.addAll(roleIds); // 增加searched字段防止未配置的参数重复读库导致缓存击穿 // 后续若有新增配置则会清空缓存重新加载 DataScopeModel dataScope; List<...
// 增加searched字段防止未配置的参数重复读库导致缓存击穿 // 后续若有新增配置则会清空缓存重新加载 DataScopeModel dataScope; List<DataScopeModel> list = jdbcTemplate.query(DataScopeConstant.DATA_BY_CODE, new Object[]{code}, new BeanPropertyRowMapper<>(DataScopeModel.class)); if (CollectionUtil.isNotEmpty(list)) { dataScope = list.iterator().next(); ...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\feign\DataScopeClient.java
2
请完成以下Java代码
public FlowableScriptEvaluationRequest script(String script) { if (StringUtils.isEmpty(script)) { throw new FlowableIllegalArgumentException("script is empty"); } this.script = script; return this; } @Override public FlowableScript...
@Override public ScriptEvaluation evaluate() throws FlowableScriptException { if (StringUtils.isEmpty(language)) { throw new FlowableIllegalArgumentException("language is required"); } if (StringUtils.isEmpty(script)) { throw new FlowableIlleg...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\scripting\JSR223FlowableScriptEngine.java
1
请完成以下Java代码
public PermissionCheckBuilder atomicCheckForResourceId(Resource resource, String resourceId, Permission permission) { if (!isPermissionDisabled(permission)) { PermissionCheck permCheck = new PermissionCheck(); permCheck.setResource(resource); permCheck.setResourceId(resourceId); permCheck.se...
permissionCheck.setAtomicChecks(atomicChecks); permissionCheck.setCompositeChecks(compositeChecks); return permissionCheck; } public List<PermissionCheck> getAtomicChecks() { return atomicChecks; } protected void validate() { if (!atomicChecks.isEmpty() && !compositeChecks.isEmpty()) { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\PermissionCheckBuilder.java
1
请完成以下Java代码
public void dispose() { } // dispose private String m_columnName; private String m_oldText; private String m_initialText; private volatile boolean m_setting = false; private GridField m_mField; // /** Logger */ // private static Logger log = CLogMgt.getLogger(VTextLong.class); /** * Set Edit...
/************************************************************************** * Key Listener Interface * @param e event */ @Override public void keyTyped(KeyEvent e) {} @Override public void keyPressed(KeyEvent e) {} /** * Key Released * if Escape restore old Text. * @param e event */ @Override p...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VTextLong.java
1
请在Spring Boot框架中完成以下Java代码
public class ReactiveAccountDao { private ConnectionFactory connectionFactory; public ReactiveAccountDao(ConnectionFactory connectionFactory) { this.connectionFactory = connectionFactory; } public Mono<Account> findById(long id) { return Mono.from(connectionFactory.create()) ...
acc.setBalance(row.get("balance", BigDecimal.class)); return acc; }))); } public Mono<Account> createAccount(Account account) { return Mono.from(connectionFactory.create()) .flatMap(c -> Mono.from(c.beginTransaction()) .then(Mono.from(c.cre...
repos\tutorials-master\persistence-modules\r2dbc\src\main\java\com\baeldung\examples\r2dbc\ReactiveAccountDao.java
2
请完成以下Java代码
public void setQty (final BigDecimal Qty) { set_Value (COLUMNNAME_Qty, Qty); } @Override public BigDecimal getQty() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQtyCalculated (final BigDecimal QtyCalculated) { set...
@Override public java.lang.String getUserElementString4() { return get_ValueAsString(COLUMNNAME_UserElementString4); } @Override public void setUserElementString5 (final @Nullable java.lang.String UserElementString5) { set_Value (COLUMNNAME_UserElementString5, UserElementString5); } @Override public jav...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_ForecastLine.java
1
请完成以下Java代码
public boolean hasNext() { return hasPeeked || iterator.hasNext(); } @Override public E next() { if (!hasPeeked) { final E result = iterator.next(); return result; } final E result = peekedElement; hasPeeked = false; peekedElement = null; return result; } @Override public void remove() ...
@Override public E peek() { if (!hasPeeked) { peekedElement = iterator.next(); hasPeeked = true; } return peekedElement; } @Override public Iterator<E> getParentIterator() { return iterator; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\collections\PeekIteratorWrapper.java
1
请完成以下Java代码
public class Question { private String id; private String description; private String correctAnswer; private List<String> options; // Needed by Caused by: com.fasterxml.jackson.databind.JsonMappingException: // Can not construct instance of com.in28minutes.springboot.model.Question: // no suitable constructor f...
public List<String> getOptions() { return options; } @Override public String toString() { return String .format("Question [id=%s, description=%s, correctAnswer=%s, options=%s]", id, description, correctAnswer, options); } @Override public int hashCode() { final int prime = 31; int result = 1; ...
repos\SpringBootForBeginners-master\05.Spring-Boot-Advanced\src\main\java\com\in28minutes\springboot\model\Question.java
1
请完成以下Java代码
private static MediaType getContentType(final @Nullable HttpHeaders httpHeaders) { return httpHeaders != null ? httpHeaders.getContentType() : null; } @NonNull private static Charset getCharset(final @NonNull ContentCachingResponseWrapper responseWrapper) { final String charset = StringUtils.trimBlankToNull(r...
if (bodyCandidate == null) { return null; } final MediaType contentType = getContentType(httpHeaders); if (contentType == null) { return null; } else if (contentType.includes(MediaType.TEXT_PLAIN)) { return bodyCandidate; } else if (contentType.includes(MediaType.APPLICATION_JSON)) { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.util.web\src\main\java\de\metas\util\web\audit\dto\ApiResponseMapper.java
1
请完成以下Java代码
public @Nullable String getHostValue() { return hostValue; } public RewriteLocationResponseHeaderConfig setHostValue(String hostValue) { this.hostValue = hostValue; return this; } public String getProtocolsRegex() { return protocolsRegex; } public RewriteLocationResponseHeaderConfig setProtoc...
this.hostPortVersionPattern = compileHostPortVersionPattern(protocolsRegex); return this; } public Pattern getHostPortPattern() { return hostPortPattern; } public Pattern getHostPortVersionPattern() { return hostPortVersionPattern; } } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\filter\RewriteLocationResponseHeaderFilterFunctions.java
1
请完成以下Java代码
public String name() { return this.fileSystem.toString(); } @Override public String type() { return "nestedfs"; } @Override public boolean isReadOnly() { return this.fileSystem.isReadOnly(); } @Override public long getTotalSpace() throws IOException { return 0; } @Override public long getUsableS...
@Override public Object getAttribute(String attribute) throws IOException { try { return getJarPathFileStore().getAttribute(attribute); } catch (UncheckedIOException ex) { throw ex.getCause(); } } protected FileStore getJarPathFileStore() { try { return Files.getFileStore(this.fileSystem.getJarPa...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\nio\file\NestedFileStore.java
1
请完成以下Java代码
public UserRolePermissionsBuilder setMobileApplicationAccesses(final MobileApplicationPermissions mobileApplicationAccesses) { this.mobileApplicationAccesses = mobileApplicationAccesses; return this; } UserRolePermissionsBuilder setMiscPermissions(final GenericPermissions permissions) { Check.assumeNull(misc...
Check.assumeNotNull(userRolePermissionsIncluded, "userRolePermissionsIncluded not null"); return userRolePermissionsIncluded; } public UserRolePermissionsBuilder setMenuInfo(final UserMenuInfo menuInfo) { this._menuInfo = menuInfo; return this; } public UserMenuInfo getMenuInfo() { if (_menuInfo == null...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\impl\UserRolePermissionsBuilder.java
1
请完成以下Java代码
/*package */final class GridTabCalloutStateChangeListener implements StateChangeListener { public static final void bind(final GridTab gridTab, final ITabCallout callouts) { if(callouts == null || callouts == ITabCallout.NULL) { return; // nothing to bind } final GridTabCalloutStateChangeListener listen...
callouts.onNew(gridTab); break; case DATA_DELETE: callouts.onDelete(gridTab); break; case DATA_SAVE: callouts.onSave(gridTab); break; case DATA_IGNORE: callouts.onIgnore(gridTab); break; default: // tolerate all other events, event if they are meaningless for us // throw ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\GridTabCalloutStateChangeListener.java
1