instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public class VolatileVarNotThreadSafe { private static final Logger LOG = LoggerFactory.getLogger(VolatileVarNotThreadSafe.class); private static volatile int count = 0; private static final int MAX_LIMIT = 1000; public static void increment() { count++; } public static int ge...
Thread t2 = new Thread(new Runnable() { @Override public void run() { for(int index=0; index<MAX_LIMIT; index++) { increment(); } } }); t1.start(); t2.start(); t1.join(); t2.join()...
repos\tutorials-master\core-java-modules\core-java-concurrency-advanced-4\src\main\java\com\baeldung\volatilekeywordthreadsafety\VolatileVarNotThreadSafe.java
1
请完成以下Java代码
public class ZipCodeResource { private ZipCodeRepo zipRepo; public ZipCodeResource(ZipCodeRepo zipRepo) { this.zipRepo = zipRepo; } @GET @Path("/{zipcode}") public Uni<ZipCode> findById(@PathParam("zipcode") String zipcode) { return getById(zipcode); } @GET ...
.onItem() .ifNull() .switchTo(createZipCode(zipCode)) .onFailure(PersistenceException.class) .recoverWithUni(() -> getById(zipCode.getZip())); } private Uni<ZipCode> getById(String zipCode) { return zipRepo.findById(zipCode); } private Uni<ZipCod...
repos\tutorials-master\quarkus-modules\quarkus-vs-springboot\quarkus-project\src\main\java\com\baeldung\quarkus_project\ZipCodeResource.java
1
请完成以下Java代码
public String getReferenceNumber() { return referenceNumber; } /** * Sets the value of the referenceNumber property. * * @param value * allowed object is * {@link String } * */ public void setReferenceNumber(String value) { this.referenceNumb...
this.codingLine1 = value; } /** * Gets the value of the codingLine2 property. * * @return * possible object is * {@link String } * */ public String getCodingLine2() { return codingLine2; } /** * Sets the value of the codingLine2 propert...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\EsrRedType.java
1
请完成以下Java代码
public void createPackingMaterialMovementLines(final I_M_Movement movement) { final IHUMovementBL huMovementBL = Services.get(IHUMovementBL.class); huMovementBL.createPackingMaterialMovementLines(movement); } @DocValidate(timings = ModelValidator.TIMING_BEFORE_REACTIVATE) public void deletePackingMaterialMovem...
// Fetch HUs which are currently assigned to Receipt Line final List<I_M_HU> hus = Services.get(IHUAssignmentDAO.class).retrieveTopLevelHUsForModel(receiptLine); if (hus.isEmpty()) { return; } // // Assign them to movement line Services.get(IHUMovementBL.class).setAssignedHandlingUnits(movementLine, h...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\model\validator\M_Movement.java
1
请完成以下Java代码
public void addMouseListener (MouseListener l) { m_textArea.addMouseListener(l); } /** * Add Text Key Listener * @param l */ @Override public void addKeyListener (KeyListener l) { m_textArea.addKeyListener(l); } /** * Add Text Input Method Listener * @param l */ @Override public void addInpu...
* @param l */ @Override public void setInputVerifier (InputVerifier l) { m_textArea.setInputVerifier(l); } @Override public final ICopyPasteSupportEditor getCopyPasteSupport() { return copyPasteSupport; } } // CTextArea
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CTextArea.java
1
请在Spring Boot框架中完成以下Java代码
public Boolean getIncludeEnded() { return includeEnded; } public void setIncludeEnded(Boolean includeEnded) { this.includeEnded = includeEnded; } public Boolean getIncludeLocalVariables() { return includeLocalVariables; } public void setIncludeLocalVariables(boolean in...
this.tenantId = tenantId; } public Boolean getWithoutTenantId() { return withoutTenantId; } public void setWithoutTenantId(Boolean withoutTenantId) { this.withoutTenantId = withoutTenantId; } public Set<String> getCaseInstanceIds() { return caseInstanceIds; } ...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\runtime\planitem\PlanItemInstanceQueryRequest.java
2
请完成以下Java代码
private Optional<Environment> asEnvironment(@Nullable Object target) { Environment environment = target instanceof Environment ? (Environment) target : target instanceof EnvironmentCapable ? ((EnvironmentCapable) target).getEnvironment() : null; return Optional.ofNullable(environment); } /** * @inherit...
return new TypedValue(value); } /** * @inheritDoc * @return {@literal false}. */ @Override public boolean canWrite(EvaluationContext context, @Nullable Object target, String name) { return false; } /** * @inheritDoc */ @Override public void write(EvaluationContext context, @Nullable Object target,...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\expression\SmartEnvironmentAccessor.java
1
请完成以下Java代码
public class DelegatingByTopicSerializer extends DelegatingByTopicSerialization<Serializer<?>> implements Serializer<Object> { /** * Construct an instance that will be configured in {@link #configure(Map, boolean)} * with producer properties {@link #VALUE_SERIALIZATION_TOPIC_CONFIG} and * {@link #KEY_SERIALIZ...
} @Override public byte[] serialize(String topic, Object data) { throw new UnsupportedOperationException(); } @SuppressWarnings({"unchecked", "NullAway"}) // Dataflow analysis limitation @Override public byte[] serialize(String topic, Headers headers, Object data) { if (data == null) { return null; } ...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\support\serializer\DelegatingByTopicSerializer.java
1
请完成以下Java代码
protected @NonNull Environment getEnvironment() { return this.environment; } /** * Gets the {@link String key} (property) of this {@code Map.Entry}. * * @return the {@link String key} (property) of this {@code Map.Entry}. */ @Override public @NonNull String getKey() { return this.key; } ...
* @see org.springframework.core.env.Environment#getProperty(String) * @see #getEnvironment() * @see #getKey() */ @Override public @Nullable String getValue() { return getEnvironment().getProperty(getKey()); } /** * @inheritDoc * @throws UnsupportedOperationException */ @Override public...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode\src\main\java\org\springframework\geode\core\env\EnvironmentMapAdapter.java
1
请完成以下Java代码
public class Book extends Item { private String ISBN; private Date published; private BigDecimal pages; private String binding; public Book() { } public Book(String title, Author author) { super(title, author); } public String getISBN() { return ISBN; } p...
public void setPages(BigDecimal pages) { this.pages = pages; } @JsonProperty("binding") public String coverBinding() { return binding; } @JsonProperty("binding") public void configureBinding(String binding) { this.binding = binding; } }
repos\tutorials-master\video-tutorials\jackson-annotations-video\src\main\java\com\baeldung\jacksonannotation\general\jsonproperty\Book.java
1
请完成以下Java代码
public void setMarketingPlatformGatewayId (java.lang.String MarketingPlatformGatewayId) { set_Value (COLUMNNAME_MarketingPlatformGatewayId, MarketingPlatformGatewayId); } /** Get Marketing Platform GatewayId. @return Marketing Platform GatewayId */ @Override public java.lang.String getMarketingPlatformGate...
public int getMKTG_Platform_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_MKTG_Platform_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ @Override public void setName (java.lang.String Name) { set_Value (COLUMNNAME...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\base\src\main\java-gen\de\metas\marketing\base\model\X_MKTG_Platform.java
1
请完成以下Java代码
public void onError(Throwable t) { logger.warn("error:{}", t.getMessage()); } }; } @Override public StreamObserver<Stock> bidirectionalStreamingGetListsStockQuotes(final StreamObserver<StockQuote> responseObserver) { return new StreamO...
@Override public void onError(Throwable t) { logger.warn("error:{}", t.getMessage()); } }; } } private static double fetchStockPriceBid(Stock stock) { return stock.getTickerSymbol() .length() + ThreadLocalR...
repos\tutorials-master\grpc\src\main\java\com\baeldung\grpc\streaming\StockServer.java
1
请在Spring Boot框架中完成以下Java代码
public void setRepairServicePerformed_Product_ID (final int RepairServicePerformed_Product_ID) { if (RepairServicePerformed_Product_ID < 1) set_Value (COLUMNNAME_RepairServicePerformed_Product_ID, null); else set_Value (COLUMNNAME_RepairServicePerformed_Product_ID, RepairServicePerformed_Product_ID); } ...
public static final String STATUS_Completed = "CO"; @Override public void setStatus (final java.lang.String Status) { set_Value (COLUMNNAME_Status, Status); } @Override public java.lang.String getStatus() { return get_ValueAsString(COLUMNNAME_Status); } /** * Type AD_Reference_ID=541243 * Reference...
repos\metasfresh-new_dawn_uat\backend\de.metas.servicerepair.base\src\main\java-gen\de\metas\servicerepair\repository\model\X_C_Project_Repair_Task.java
2
请完成以下Java代码
public class CamundaConnectorImpl extends BpmnModelElementInstanceImpl implements CamundaConnector { protected static ChildElement<CamundaConnectorId> camundaConnectorIdChild; protected static ChildElement<CamundaInputOutput> camundaInputOutputChild; public static void registerType(ModelBuilder modelBuilder) { ...
} public void setCamundaConnectorId(CamundaConnectorId camundaConnectorId) { camundaConnectorIdChild.setChild(this, camundaConnectorId); } public CamundaInputOutput getCamundaInputOutput() { return camundaInputOutputChild.getChild(this); } public void setCamundaInputOutput(CamundaInputOutput camund...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\camunda\CamundaConnectorImpl.java
1
请完成以下Java代码
public void afterEach(ExtensionContext context) { BrokerRunningSupport brokerRunning = BROKER_RUNNING_HOLDER.get(); if (brokerRunning != null && brokerRunning.isPurgeAfterEach()) { brokerRunning.purgeTestQueues(); } } @Override public void afterAll(ExtensionContext context) { BROKER_RUNNING_HOLDER.remove...
: brokerRunning; } private Store getStore(ExtensionContext context) { return context.getStore(Namespace.create(getClass(), context)); } private Store getParentStore(ExtensionContext context) { ExtensionContext parent = context.getParent().get(); return parent.getStore(Namespace.create(getClass(), parent)); ...
repos\spring-amqp-main\spring-rabbit-junit\src\main\java\org\springframework\amqp\rabbit\junit\RabbitAvailableCondition.java
1
请完成以下Java代码
public ApplicationContext getApplicationContext() { return applicationContext; } @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.applicationContext = applicationContext; } public String getDeploymentMode() { re...
* @param mode * the mode to get the strategy for * @return the deployment strategy to use for the mode. Never <code>null</code> */ protected AutoDeploymentStrategy getAutoDeploymentStrategy(final String mode) { AutoDeploymentStrategy result = defaultAutoDeploymentStrategy; fo...
repos\Activiti-develop\activiti-core\activiti-spring\src\main\java\org\activiti\spring\SpringProcessEngineConfiguration.java
1
请完成以下Java代码
public class RolePermissionsNotFoundException extends AdempiereException { private static final String MSG = "RolePermissionsNotFoundException"; /** * */ private static final long serialVersionUID = -5635853326303323078L; public RolePermissionsNotFoundException(final String additionalInfo) { this(buildMsg...
} private static String buildMsg(String additionalInfo) { final StringBuilder sb = new StringBuilder() .append("@").append(MSG).append("@"); if (!Check.isEmpty(additionalInfo, true)) { sb.append(": ").append(additionalInfo); } return sb.toString(); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\security\impl\RolePermissionsNotFoundException.java
1
请完成以下Java代码
private static ImmutableList<LocalToRemoteSyncResult> createErrorResults( @NonNull final ImmutableListMultimap<String, ContactPerson> email2contactPersons, @NonNull final InvalidEmail invalidEmailInfo) { final String errorMsg = invalidEmailInfo.getErrorMessage(); final String invalidAddress = invalidEmailInf...
final Campaign campaignWithRemoteId = campaign .toBuilder() .remoteId(Integer.toString(createdGroup.getId())) .build(); return LocalToRemoteSyncResult.inserted(campaignWithRemoteId); } updateGroup(campaign); return LocalToRemoteSyncResult.updated(campaign); } @Override public void sendEmail...
repos\metasfresh-new_dawn_uat\backend\de.metas.marketing\cleverreach\src\main\java\de\metas\marketing\gateway\cleverreach\CleverReachClient.java
1
请完成以下Java代码
public Mono<UserViewWrapper> login(@RequestBody @Valid UserAuthenticationRequestWrapper request) { return userFacade.login(request.getContent()) .map(UserViewWrapper::new); } @PostMapping("/users") @ResponseStatus(HttpStatus.CREATED) public Mono<UserViewWrapper> signup(@RequestB...
@GetMapping("/profiles/{username}") public Mono<ProfileWrapper> getProfile(@PathVariable String username) { return userSessionProvider.getCurrentUserOrEmpty() .flatMap((currentUser -> userFacade.getProfile(username, currentUser))) .switchIfEmpty(userFacade.getProfile(username...
repos\realworld-spring-webflux-master\src\main\java\com\realworld\springmongo\api\UserController.java
1
请完成以下Java代码
public Queue build() { return new Queue(this.name, this.durable, this.exclusive, this.autoDelete, getArguments()); } /** * Overflow argument values. */ public enum Overflow { /** * Drop the oldest message. */ dropHead("drop-head"), /** * Reject the new message. */ rejectPublish("reject-p...
* Deploy on the node with the fewest queue leaders. */ minLeaders("min-masters"), /** * Deploy on the node we are connected to. */ clientLocal("client-local"), /** * Deploy on a random node. */ random("random"); private final String value; LeaderLocator(String value) { this.value = v...
repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\core\QueueBuilder.java
1
请完成以下Java代码
public String cipher(String message, int offset) { StringBuilder result = new StringBuilder(); for (char character : message.toCharArray()) { if (character != ' ') { int originalAlphabetPosition = character - LETTER_A; int newAlphabetPosition = (originalAlpha...
return IntStream.rangeClosed(LETTER_A, LETTER_Z) .mapToLong(letter -> countLetter((char) letter, message)) .toArray(); } private long countLetter(char letter, String message) { return message.chars() .filter(character -> character == letter) .count(); } ...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-6\src\main\java\com\baeldung\algorithms\caesarcipher\CaesarCipher.java
1
请完成以下Java代码
public Set<QueuePackageProcessorId> getPackageProcessorIds() { return packageProcessorIds; } /** * @param packageProcessorIds the packageProcessorIds to set */ public void setPackageProcessorIds(@Nullable final Set<QueuePackageProcessorId> packageProcessorIds) { if (packageProcessorIds != null) { Che...
} /** * @param priorityFrom the priorityFrom to set */ public void setPriorityFrom(final String priorityFrom) { this.priorityFrom = priorityFrom; } @Override public String toString() { return "WorkPackageQuery [" + "processed=" + processed + ", readyForProcessing=" + readyForProcessing + ",...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\async\api\impl\WorkPackageQuery.java
1
请完成以下Java代码
public void setMessage(final String newMessage) { m_message = newMessage; fMessage.setText(m_message); fMessage.setCaretPosition(0); } // setMessage /** * Get Message */ public String getMessage() { m_message = fMessage.getText(); return m_message; } // getMessage public void setAttributes(fi...
dispose(); } } // actionPerformed public void setPrintOnOK(final boolean value) { m_isPrintOnOK = value; } public boolean isPressedOK() { return m_isPressedOK; } public boolean isPrinted() { return m_isPrinted; } public File getPDF() { return fMessage.getPDF(getTitle()); } public RichTextE...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\LetterDialog.java
1
请在Spring Boot框架中完成以下Java代码
public int delete(List<Long> ids) { OmsOrderReturnApplyExample example = new OmsOrderReturnApplyExample(); example.createCriteria().andIdIn(ids).andStatusEqualTo(3); return returnApplyMapper.deleteByExample(example); } @Override public int updateStatus(Long id, OmsUpdateStatusParam ...
returnApply.setReceiveMan(statusParam.getReceiveMan()); returnApply.setReceiveNote(statusParam.getReceiveNote()); }else if(status.equals(3)){ //拒绝退货 returnApply.setId(id); returnApply.setStatus(3); returnApply.setHandleTime(new Date()); ret...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\OmsOrderReturnApplyServiceImpl.java
2
请完成以下Java代码
public PO getPO(final Properties ctx, final String tableName, final String whereClause, final Object[] params, final String trxName) { final PO po = retrievePO(ctx, tableName, whereClause, params, trxName); if (po != null) { final IModelCacheService modelCacheService = Services.get(IModelCacheService.class); ...
return po; } public <ModelType> ModelType retrieveModel(final Properties ctx, final String tableName, final Class<?> modelClass, final ResultSet rs, final String trxName) { final PO po = getPO(ctx, tableName, rs, trxName); // // Case: we have a modelClass specified if (modelClass != null) { final Clas...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\persistence\TableModelLoader.java
1
请完成以下Java代码
public void pointcut() { } @Around("pointcut()") public Object around(ProceedingJoinPoint joinPoint) throws Throwable { HttpServletRequest request = RequestHolder.getHttpServletRequest(); MethodSignature signature = (MethodSignature) joinPoint.getSignature(); Method signatureMethod ...
/** * 限流脚本 */ private String buildLuaScript() { return "local c" + "\nc = redis.call('get',KEYS[1])" + "\nif c and tonumber(c) > tonumber(ARGV[1]) then" + "\nreturn c;" + "\nend" + "\nc = redis.call('incr',KEYS[1])" + ...
repos\eladmin-master\eladmin-common\src\main\java\me\zhengjie\aspect\LimitAspect.java
1
请完成以下Java代码
public class HandleHistoryCleanupTimerJobCmd implements Command<Object>, Serializable { private static final long serialVersionUID = 1L; @Override public Object execute(CommandContext commandContext) { CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfigurat...
} for (int i = 1; i < cleanupJobs.size(); i++) { managementService.deleteTimerJob(cleanupJobs.get(i).getId()); } } return null; } protected void scheduleTimerJob(CmmnEngineConfiguration cmmnEngineConfiguration) { TimerJobService timerJobService ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\HandleHistoryCleanupTimerJobCmd.java
1
请完成以下Java代码
public void setS_ResourceAssignment_ID (int S_ResourceAssignment_ID) { if (S_ResourceAssignment_ID < 1) set_Value (COLUMNNAME_S_ResourceAssignment_ID, null); else set_Value (COLUMNNAME_S_ResourceAssignment_ID, Integer.valueOf(S_ResourceAssignment_ID)); } /** Get Resource Assignment. @return Resource A...
Time and Expense Report Line */ public void setS_TimeExpenseLine_ID (int S_TimeExpenseLine_ID) { if (S_TimeExpenseLine_ID < 1) set_ValueNoCheck (COLUMNNAME_S_TimeExpenseLine_ID, null); else set_ValueNoCheck (COLUMNNAME_S_TimeExpenseLine_ID, Integer.valueOf(S_TimeExpenseLine_ID)); } /** Get Expense L...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_S_TimeExpenseLine.java
1
请在Spring Boot框架中完成以下Java代码
public final class MetricsAspectsAutoConfiguration { @Bean @ConditionalOnMissingBean CountedAspect countedAspect(MeterRegistry registry, ObjectProvider<CountedMeterTagAnnotationHandler> countedMeterTagAnnotationHandler) { CountedAspect countedAspect = new CountedAspect(registry); countedMeterTagAnnotationHan...
CountedMeterTagAnnotationHandler countedMeterTagAnnotationHandler(BeanFactory beanFactory, ValueExpressionResolver valueExpressionResolver) { return new CountedMeterTagAnnotationHandler(beanFactory::getBean, (ignored) -> valueExpressionResolver); } @Bean @ConditionalOnMissingBean MeterTagAnnotationHandl...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-metrics\src\main\java\org\springframework\boot\micrometer\metrics\autoconfigure\MetricsAspectsAutoConfiguration.java
2
请完成以下Java代码
public Integer getPublishCount() { return publishCount; } public void setPublishCount(Integer publishCount) { this.publishCount = publishCount; } public Integer getUseCount() { return useCount; } public void setUseCount(Integer useCount) { this.useCount = useCo...
} public Integer getMemberLevel() { return memberLevel; } public void setMemberLevel(Integer memberLevel) { this.memberLevel = memberLevel; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); ...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\SmsCoupon.java
1
请完成以下Java代码
public void setOnMouseOver (String script) { addAttribute ("onmouseover", script); } /** * The onmousemove event occurs when the pointing device is moved while it * is over an element. This attribute may be used with most elements. * * @param script script */ public void setOnMouseMove (St...
* The onkeydown event occurs when a key is pressed down over an element. * This attribute may be used with most elements. * * @param script script */ public void setOnKeyDown (String script) { addAttribute ("onkeydown", script); } /** * The onkeyup event occurs when a key is released over ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\xhtml\acronym.java
1
请完成以下Java代码
public void setFieldMinWidth(final int fieldMinWidth) { this.fieldMinWidth = fieldMinWidth; } public void setFieldMaxWidth(final int fieldMaxWidth) { this.fieldMaxWidth = fieldMaxWidth; } public void updateMinWidthFrom(final CLabel label) { final int labelWidth = label.getPreferredSize().width; labelMi...
logger.trace("LabelMinWidth={} ({})", new Object[] { labelMinWidth, label }); } public void updateMinWidthFrom(final VEditor editor) { final JComponent editorComp = swingEditorFactory.getEditorComponent(editor); final int editorCompWidth = editorComp.getPreferredSize().width; if (editorCompWidth > fieldMinWid...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\VPanelLayoutCallback.java
1
请完成以下Java代码
private void setAdditionalContactFields( @NonNull final JsonCustomerBuilder customerBuilder, @NonNull final BPartnerLocation bPartnerLocation) { customerBuilder .contactEmail(bPartnerLocation.getEmail()) .contactName(bPartnerLocation.getBpartnerName()) .contactPhone(bPartnerLocation.getPhone()); ...
@Nullable final BPartnerContactId contactId) { if (contactId == null) { return; } final BPartnerContact contact = composite.extractContact(contactId) .orElseThrow(() -> new ShipmentCandidateExportException("Unable to get the contact info from bPartnerComposite!") .appendParametersToMessage() ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v2\shipping\ShipmentCandidateAPIService.java
1
请完成以下Java代码
protected boolean beforeSave (boolean newRecord) { if (getAD_Org_ID() != 0) setAD_Org_ID(0); return true; } // beforeSave /** * After Save. * Insert * - create tree * @param newRecord insert * @param success save success * @return success */ protected boolean afterSave (boolean newRecord, b...
insert_Tree(MTree_Base.TREETYPE_SalesRegion); // Value/Name change if (!newRecord && (is_ValueChanged("Value") || is_ValueChanged("Name"))) MAccount.updateValueDescription(getCtx(), "C_SalesRegion_ID=" + getC_SalesRegion_ID(), get_TrxName()); return true; } // afterSave /** * After Delete * @param suc...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MSalesRegion.java
1
请完成以下Java代码
public abstract class AbstractSessionEvent extends ApplicationEvent { private final String sessionId; private final Session session; AbstractSessionEvent(Object source, Session session) { super(source); this.session = session; this.sessionId = session.getId(); } /** * Gets the {@link Session} that was ...
* this may be null. * @param <S> the type of Session * @return the expired {@link Session} or null if the data store does not support * obtaining it */ @SuppressWarnings("unchecked") public <S extends Session> S getSession() { return (S) this.session; } public String getSessionId() { return this.sessio...
repos\spring-session-main\spring-session-core\src\main\java\org\springframework\session\events\AbstractSessionEvent.java
1
请完成以下Java代码
default Context createContext(long dueTimestamp, String listenerId, TopicPartition topicPartition, @Nullable Consumer<?, ?> messageConsumer) { return new Context(dueTimestamp, topicPartition, listenerId, messageConsumer); } /** * Provides the state that will be used for backing off. * @since 2.7 */ ...
this.listenerId = listenerId; this.topicPartition = topicPartition; this.consumerForTimingAdjustment = consumerForTimingAdjustment; } public long getDueTimestamp() { return this.dueTimestamp; } public String getListenerId() { return this.listenerId; } public TopicPartition getTopicPartition()...
repos\spring-kafka-main\spring-kafka\src\main\java\org\springframework\kafka\listener\KafkaConsumerBackoffManager.java
1
请完成以下Java代码
private Step step() throws Exception { return stepBuilderFactory.get("step") .<TestData, TestData>chunk(2) .reader(simpleReader) .writer(xmlFileItemWriter()) .build(); } private StaxEventItemWriter<TestData> xmlFileItemWriter() throws IOEx...
marshaller.setAliases(map); // 设置xml标签 writer.setRootTagName("tests"); // 设置根标签 writer.setMarshaller(marshaller); FileSystemResource file = new FileSystemResource("/Users/mrbird/Desktop/file.xml"); Path path = Paths.get(file.getPath()); if (!Files.exists(path)) { Fi...
repos\SpringAll-master\69.spring-batch-itemwriter\src\main\java\cc\mrbird\batch\job\XmlFileItemWriterDemo.java
1
请完成以下Java代码
public String modelChange(final PO po, int type) { assert po instanceof MInvoiceLine : po; if (type == TYPE_BEFORE_CHANGE || type == TYPE_BEFORE_NEW) { final IInvoiceLineBL invoiceLineBL = Services.get(IInvoiceLineBL.class); final I_C_InvoiceLine il = InterfaceWrapperHelper.create(po, I_C_InvoiceLine.clas...
} return null; } void beforeDelete(final org.compiere.model.I_C_InvoiceLine invoiceLine) { final IInvoiceDAO invoiceDAO = Services.get(IInvoiceDAO.class); final InvoiceAndLineId invoiceAndLineId = InvoiceAndLineId.ofRepoId(invoiceLine.getC_Invoice_ID(), invoiceLine.getC_InvoiceLine_ID()); for (final I_C_I...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\modelvalidator\InvoiceLine.java
1
请完成以下Spring Boot application配置
spring.application.name=spring-boot-persistence server.port=8082 #spring boot mongodb spring.data.mongodb.host=localhost spring.data.mongodb.port=0 spring.data.mongodb.database=springboot-mongo spring.thymeleaf.cache=false spring.servlet.multipart.max-file-size=256MB spring.servlet.multipart.max-request-size
=256MB spring.servlet.multipart.enabled=true spring.data.mongodb.uri=mongodb://localhost de.flapdoodle.mongodb.embedded.version=8.0.5
repos\tutorials-master\persistence-modules\spring-boot-persistence-mongodb\src\main\resources\application.properties
2
请在Spring Boot框架中完成以下Java代码
private void performNameRequest(final NameRequest nameRequest, IWebSession webSession) { try { CompletableFuture<NameAnalysisEntity> nameAnalysis = this.nameAnalysisService.searchForName(nameRequest); NameAnalysisEntity nameAnalysisEntity = nameAnalysis.get(30, TimeUnit.SECONDS); ...
SessionNameRequest sessionNameRequest = sessionNameRequestFactory.getInstance(nameRequest); List<SessionNameRequest> requests = getRequestsFromSession(webSession); requests.add(0, sessionNameRequest); } private List<SessionNameRequest> getRequestsFromSession(IWebSession session) { Objec...
repos\tutorials-master\spring-web-modules\spring-thymeleaf-attributes\accessing-session-attributes\src\main\java\com\baeldung\accesing_session_attributes\web\controllers\NameAnalysisController.java
2
请在Spring Boot框架中完成以下Java代码
public class CreatePriceListSchemaRequest { @NonNull PricingConditionsId discountSchemaId; int seqNo; @Nullable ProductId productId; @Nullable ProductCategoryId productCategoryId; @Nullable BPartnerId bPartnerId; @Nullable TaxCategoryId taxCategoryId; @Nullable TaxCategoryId taxCategoryTargetId; @NonN...
String limit_Rounding; @NonNull BigDecimal list_AddAmt; @NonNull String list_Base; @NonNull BigDecimal list_Discount; @NonNull BigDecimal list_MaxAmt; @NonNull BigDecimal list_MinAmt; @NonNull String list_Rounding; @NonNull BigDecimal std_AddAmt; @NonNull String std_Base; @NonNull BigDecimal std_Dis...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\service\CreatePriceListSchemaRequest.java
2
请完成以下Java代码
private DocTypeId getDocTypeId() { Integer docTypeId = (Integer)m_mTab.getValue("C_DocType_ID"); if (docTypeId == null || docTypeId.intValue() <= 0) { docTypeId = (Integer)m_mTab.getValue("C_DocTypeTarget_ID"); } return docTypeId != null ? DocTypeId.ofRepoIdOrNull(docTypeId) : null; } /** * Check St...
{ dispose(); m_OKpressed = true; } } else if (e.getActionCommand().equals(ConfirmPanel.A_CANCEL)) { dispose(); } // // ActionCombo: display the description for the selection else if (e.getSource() == actionCombo) { final IDocActionItem selectedDocAction = actionCombo.getSelectedItem(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VDocAction.java
1
请完成以下Spring Boot application配置
server.port=8081 spring.application.name=config spring.cloud.config.server.git.uri=file:///${user.home}/application-config eureka.client.region = default eureka.client.registryFetchIntervalSeconds = 5 eureka.client.serviceUrl.defaultZone=http://discUser:discPassword@l
ocalhost:8082/eureka/ security.user.name=configUser security.user.password=configPassword security.user.role=SYSTEM
repos\tutorials-master\spring-cloud-modules\spring-cloud-bootstrap\config\src\main\resources\application.properties
2
请完成以下Java代码
public void onOpen(Session session, @PathParam("userId") String userId) { this.session = session; this.userId = userId; if (webSocketMap.containsKey(userId)) { webSocketMap.remove(userId); webSocketMap.put(userId, this); } else { webSocketMap.put(userI...
} } } /** * 发生错误时调用 * * @param session * @param error */ @OnError public void onError(Session session, Throwable error) { log.error("用户错误:" + this.userId + ",原因:" + error.getMessage()); error.printStackTrace(); } /** * 实现服务器主动推送 */ ...
repos\springboot-demo-master\websocket\src\main\java\com\et\websocket\channel\WebSocketServer.java
1
请完成以下Java代码
public @Nullable <D> D toEntity(Class<D> entityType) { return toEntity(ResolvableType.forType(entityType)); } @Override public @Nullable <D> D toEntity(ParameterizedTypeReference<D> entityType) { return toEntity(ResolvableType.forType(entityType)); } @Override public <D> List<D> toEntityList(Class<D> elemen...
throw new FieldAccessException(this.response.getRequest(), this.response, this); } DataBufferFactory bufferFactory = DefaultDataBufferFactory.sharedInstance; MimeType mimeType = MimeTypeUtils.APPLICATION_JSON; Map<String, Object> hints = Collections.emptyMap(); try { DataBuffer buffer = ((Encoder<T>) this...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\client\DefaultClientResponseField.java
1
请完成以下Java代码
public void setPA_ReportLineSet_ID (int PA_ReportLineSet_ID) { if (PA_ReportLineSet_ID < 1) set_ValueNoCheck (COLUMNNAME_PA_ReportLineSet_ID, null); else set_ValueNoCheck (COLUMNNAME_PA_ReportLineSet_ID, Integer.valueOf(PA_ReportLineSet_ID)); } /** Get Report Line Set. @return Report Line Set */ pu...
/** Get Process Now. @return Process Now */ public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_PA_ReportLineSet.java
1
请完成以下Java代码
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Case.class, CMMN_ELEMENT_CASE) .extendsType(CmmnElement.class) .namespaceUri(CMMN11_NS) .instanceProvider(new ModelTypeInstanceProvider<Case>() { public Case n...
caseRolesChild = sequenceBuilder.element(CaseRoles.class) .build(); inputCollection = sequenceBuilder.elementCollection(InputCaseParameter.class) .build(); outputCollection = sequenceBuilder.elementCollection(OutputCaseParameter.class) .build(); typeBuilder.build(); } @Overri...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CaseImpl.java
1
请完成以下Java代码
public int getScore() { return score; } public void setScore(int score) { this.score = score; } public Date getBookingDate() { return bookingDate; } public void setBookingDate(Date bookingDate) { this.bookingDate = bookingDate; }
public int getAmout() { return amout; } public void setAmout(int amout) { this.amout = amout; } public Person getPerson() { return person; } public void setPerson(Person person) { this.person = person; } }
repos\spring-boot-student-master\spring-boot-student-drools\src\main\java\com\xiaolyuh\domain\model\Order.java
1
请完成以下Java代码
public static void validateXML(final File xmlFile, final File schemaFile) throws SAXException, IOException { System.out.println("Validating:"); System.out.println("Schema: " + schemaFile); System.out.println("Test XML File: " + xmlFile); final SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.o...
return line.getAD_Reference_Override_ID(); } final I_AD_Column column = line.getAD_Column(); if (column == null || column.getAD_Column_ID() <= 0) { return defaultDisplayType; } final int displayType = column.getAD_Reference_ID(); if (displayType <= 0) { return defaultDisplayType; } return d...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\esb\util\CanonicalXSDGenerator.java
1
请完成以下Java代码
private static JsonActualImport toJson(@Nullable final ActualImportRecordsResult result) { if (result == null) { return null; } return JsonActualImport.builder() .importTableName(result.getImportTableName()) .targetTableName(result.getTargetTableName()) .countImportRecordsConsidered(result.getC...
.parameter("importLineNo", String.valueOf(error.getLineNo())) .parameter("importLineContent", error.getLineContent()) .build(); } private static JsonErrorItem toJsonErrorItem(final ActualImportRecordsResult.Error error) { return JsonErrorItem.builder() .message(error.getMessage()) .adIssueId(JsonM...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\data_import\DataImportRestController.java
1
请完成以下Java代码
public List<String> getUnigramTempls_() { return unigramTempls_; } public void setUnigramTempls_(List<String> unigramTempls_) { this.unigramTempls_ = unigramTempls_; } public List<String> getBigramTempls_() { return bigramTempls_; } public void setBigramTem...
public List<List<Path>> getPathList_() { return pathList_; } public void setPathList_(List<List<Path>> pathList_) { this.pathList_ = pathList_; } public List<List<Node>> getNodeList_() { return nodeList_; } public void setNodeList_(List<List<Node>> nodeList...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\model\crf\crfpp\FeatureIndex.java
1
请完成以下Java代码
public final class ObjectValueExpression extends jakarta.el.ValueExpression { private static final long serialVersionUID = 1L; private final TypeConverter converter; private final Object object; private final Class<?> type; /** * Wrap an object into a value expression. * @param converter type converter * @...
} /** * Answer <code>null</code>. */ @Override public String getExpressionString() { return null; } /** * Answer <code>false</code>. */ @Override public boolean isLiteralText() { return false; } /** * Answer <code>null</code>. */ @Override public Class<?> getType(ELContext context) { ret...
repos\camunda-bpm-platform-master\juel\src\main\java\org\camunda\bpm\impl\juel\ObjectValueExpression.java
1
请完成以下Java代码
private @Nullable Method getMainMethod(StackTraceElement element) { try { Class<?> elementClass = Class.forName(element.getClassName()); Method method = getMainMethod(elementClass); if (Modifier.isStatic(method.getModifiers())) { return method; } } catch (Exception ex) { // Ignore } return ...
} } /** * Returns the actual main method. * @return the main method */ Method getMethod() { return this.method; } /** * Return the name of the declaring class. * @return the declaring class name */ String getDeclaringClassName() { return this.method.getDeclaringClass().getName(); } }
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\restart\MainMethod.java
1
请在Spring Boot框架中完成以下Java代码
public List<RfqQty> getQuantities() { return quantities; } public ImmutableSet<LocalDate> generateAllDaysSet() { final ArrayList<LocalDate> dates = DateUtils.getDaysList(getDateStart(), getDateEnd()); dates.addAll(quantities .stream() .map(RfqQty::getDatePromised) .collect(ImmutableSet.toImmutabl...
return null; } private void updateConfirmedByUser() { this.confirmedByUser = computeConfirmedByUser(); } private boolean computeConfirmedByUser() { if (pricePromised.compareTo(pricePromisedUserEntered) != 0) { return false; } for (final RfqQty rfqQty : quantities) { if (!rfqQty.isConfirmedByU...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\model\Rfq.java
2
请在Spring Boot框架中完成以下Java代码
public class TaxCategoryId implements RepoIdAware { public static TaxCategoryId NOT_FOUND = new TaxCategoryId(100); @JsonCreator public static TaxCategoryId ofRepoId(final int repoId) { if (repoId == NOT_FOUND.getRepoId()) { return NOT_FOUND; } else { return new TaxCategoryId(repoId); } } publ...
return id != null ? id.getRepoId() : -1; } public static boolean equals(final TaxCategoryId o1, final TaxCategoryId o2) { return Objects.equals(o1, o2); } int repoId; private TaxCategoryId(final int repoId) { this.repoId = Check.assumeGreaterThanZero(repoId, "C_TaxCategory_ID"); } @Override @JsonValue...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\tax\api\TaxCategoryId.java
2
请完成以下Java代码
public java.math.BigDecimal getTransfertTime () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TransfertTime); if (bd == null) return BigDecimal.ZERO; return bd; } /** Set Working Time. @param WorkingTime Workflow Simulation Execution Time */ @Override public void setWorkingTime (java.math....
Integer ii = (Integer)get_Value(COLUMNNAME_Yield); if (ii == null) return 0; return ii.intValue(); } @Override public void setC_Manufacturing_Aggregation_ID (final int C_Manufacturing_Aggregation_ID) { if (C_Manufacturing_Aggregation_ID < 1) set_Value (COLUMNNAME_C_Manufacturing_Aggregation_ID, null);...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\product\model\X_M_Product_PlanningSchema.java
1
请完成以下Java代码
public BigDecimal getQtyFree() { final Capacity capacityAvailable = itemStorage.getAvailableCapacity(getProductId(), getC_UOM(), date); if (capacityAvailable.isInfiniteCapacity()) { return Quantity.QTY_INFINITE; } return capacityAvailable.toBigDecimal(); } @Override public Quantity getQty() { retur...
{ return itemStorage.requestQtyToDeallocate(request); } @Override public void markStaled() { // nothing, so far, itemStorage is always database coupled, no in memory values } @Override public boolean isEmpty() { return itemStorage.isEmpty(getProductId()); } @Override public boolean isAllowNegativeSt...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\HUItemProductStorage.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 String toString() { StringBuilder sb = new StringBuilder ("X_M_PropertiesConfig[") ...
*/ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set Suchschlüssel. @param Value Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein */ @Override public void setValue (java.lang.String Value) { set_Value (COLUMNNA...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_PropertiesConfig.java
1
请完成以下Java代码
public TbQueueProducer<TbProtoQueueMsg<ToRuleEngineMsg>> createRuleEngineMsgProducer() { return new InMemoryTbQueueProducer<>(storage, topicService.buildTopicName(transportApiSettings.getRequestsTopic())); } @Override public TbQueueProducer<TbProtoQueueMsg<ToCoreMsg>> createTbCoreMsgProducer() { ...
public TbQueueConsumer<TbProtoQueueMsg<ToTransportMsg>> createTransportNotificationsConsumer() { return new InMemoryTbQueueConsumer<>(storage, topicService.buildTopicName(transportNotificationSettings.getNotificationsTopic() + "." + serviceInfoProvider.getServiceId())); } @Override public TbQueuePr...
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\provider\InMemoryTbTransportQueueFactory.java
1
请完成以下Java代码
public class Personne { private String nom; private String surnom; private int age; public Personne() { } public Personne(String nom, String surnom, int age) { super(); this.nom = nom; this.surnom = surnom; this.age = age; } public String getNom() { ...
return surnom; } public void setSurnom(String surnom) { this.surnom = surnom; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } }
repos\tutorials-master\libraries-data\src\main\java\com\baeldung\dozer\Personne.java
1
请完成以下Java代码
public class PrintJobInstructionsConfirm implements Serializable { /** * */ private static final long serialVersionUID = -9040749090880603823L; private String printJobInstructionsID; private String errorMsg; private PrintJobInstructionsStatusEnum status; public String getPrintJobInstructionsID() { return...
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((errorMsg == null) ? 0 : errorMsg.hashCode()); result = prime * result + ((printJobInstructionsID == null) ? 0 : printJobInstructionsID.hashCode()); result = prime * result + ((status == null) ? 0 : status.has...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing.common\de.metas.printing.api\src\main\java\de\metas\printing\esb\api\PrintJobInstructionsConfirm.java
1
请完成以下Java代码
public void onReportingPeriodEnd() { log.debug("Going to end reporting period."); for (Map.Entry<Key, ActivityStateWrapper> entry : states.entrySet()) { Key key = entry.getKey(); ActivityStateWrapper stateWrapper = entry.getValue(); try { reportLastEve...
log.debug("Going to report last activity event for key: [{}]. Event time: [{}].", key, timeToReport); reportActivity(key, metadata, timeToReport, new ActivityReportCallback<>() { @Override public void onSuccess(Key key, long reportedTime) { updateLastRepor...
repos\thingsboard-master\common\transport\transport-api\src\main\java\org\thingsboard\server\common\transport\activity\AbstractActivityManager.java
1
请完成以下Java代码
private Mono<Boolean> findLeakedPassword(String encodedPassword) { String prefix = encodedPassword.substring(0, PREFIX_LENGTH).toUpperCase(Locale.ROOT); String suffix = encodedPassword.substring(PREFIX_LENGTH).toUpperCase(Locale.ROOT); return getLeakedPasswordsForPrefix(prefix).any((leakedPw) -> leakedPw.startsWi...
this.webClient = webClient; } private Mono<byte[]> getHash(@Nullable String rawPassword) { return Mono.justOrEmpty(rawPassword) .map((password) -> this.sha1Digest.digest(password.getBytes(StandardCharsets.UTF_8))) .subscribeOn(Schedulers.boundedElastic()) .publishOn(Schedulers.parallel()); } private st...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\authentication\password\HaveIBeenPwnedRestApiReactivePasswordChecker.java
1
请在Spring Boot框架中完成以下Java代码
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.csrf() .disable() .authorizeRequests() .antMatchers("/login*", "/signin/**", "/signup/**") .permitAll() .anyRequest() .authenticated() .and() ...
ConnectionFactoryLocator connectionFactoryLocator = connectionFactoryLocator(); UsersConnectionRepository usersConnectionRepository = getUsersConnectionRepository(connectionFactoryLocator); ((InMemoryUsersConnectionRepository) usersConnectionRepository).setConnectionSignUp(facebookConnectionSignup); ...
repos\tutorials-master\spring-security-modules\spring-security-social-login\src\main\java\com\baeldung\config\SecurityConfig.java
2
请完成以下Java代码
public int getK_Topic_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_K_Topic_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. ...
set_Value (COLUMNNAME_TextMsg, TextMsg); } /** Get Text Message. @return Text Message */ public String getTextMsg () { return (String)get_Value(COLUMNNAME_TextMsg); } /** Set Valid to. @param ValidTo Valid to including this date (last day) */ public void setValidTo (Timestamp ValidTo) { set_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_K_Entry.java
1
请完成以下Java代码
public class OAuth2AuthorizationCodeGrantRequest extends AbstractOAuth2AuthorizationGrantRequest { private final OAuth2AuthorizationExchange authorizationExchange; /** * Constructs an {@code OAuth2AuthorizationCodeGrantRequest} using the provided * parameters. * @param clientRegistration the client registrati...
*/ static MultiValueMap<String, String> defaultParameters(OAuth2AuthorizationCodeGrantRequest grantRequest) { OAuth2AuthorizationExchange authorizationExchange = grantRequest.getAuthorizationExchange(); MultiValueMap<String, String> parameters = new LinkedMultiValueMap<>(); parameters.set(OAuth2ParameterNames.CO...
repos\spring-security-main\oauth2\oauth2-client\src\main\java\org\springframework\security\oauth2\client\endpoint\OAuth2AuthorizationCodeGrantRequest.java
1
请完成以下Java代码
public class CopyFromOrder extends JavaProcess { /** The Order */ private int p_C_Order_ID = 0; /** * Prepare - e.g., get Parameters. */ protected void prepare() { ProcessInfoParameter[] para = getParametersAsArray(); for (int i = 0; i < para.length; i++) { String name = para[i].getParameterName...
*/ protected String doIt() throws Exception { int To_C_Order_ID = getRecord_ID(); log.info("From C_Order_ID=" + p_C_Order_ID + " to " + To_C_Order_ID); if (To_C_Order_ID == 0) throw new IllegalArgumentException("Target C_Order_ID == 0"); if (p_C_Order_ID == 0) throw new IllegalArgumentException("Source ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\process\CopyFromOrder.java
1
请完成以下Java代码
public static Component searchComponent(Container parent, Class<?> clazz, boolean remove) { Container con = parent; Component retVal = null; Component c = null; for(int i = 0; i < con.getComponentCount(); i++) { c = con.getComponent(i); //Found the given class and breaks the loop if(clazz.isInsta...
} }; c.addContainerListener(ca); } public static KeyStroke getKeyStrokeFor(String name, List<KeyStroke> usedStrokes) { return (name == null) ? null : getKeyStrokeFor(name.charAt(0), usedStrokes); } public static KeyStroke getKeyStrokeFor(char c, List<KeyStroke> usedStrokes) { int m = Event.CTRL...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\tools\swing\SwingTool.java
1
请完成以下Java代码
private TsKvEntry convertResultToTsKvEntry(Row row) { String key = row.getString(ModelConstants.KEY_COLUMN); long ts = row.getLong(ModelConstants.TS_COLUMN); return new BasicTsKvEntry(ts, toKvEntry(row, key)); } protected TsKvEntry convertResultToTsKvEntry(String key, Row row) { ...
} } private BasicTsKvEntry getBasicTsKvEntry(String key, Row row) { Optional<String> foundKeyOpt = getKey(row); long ts = row.getLong(ModelConstants.TS_COLUMN); return new BasicTsKvEntry(ts, toKvEntry(row, foundKeyOpt.orElse(key))); } private Optional<String> getKey(Row row){ ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\timeseries\AbstractCassandraBaseTimeseriesDao.java
1
请完成以下Java代码
public boolean isAnyComponentIssue(@Nullable final PPOrderBOMLineId orderBOMLineId) { return isComponentIssue() || isMaterialMethodChangeVariance(orderBOMLineId); } public boolean isActivityControl() { return this == ActivityControl; } public boolean isVariance() { return this == MethodChangeVariance...
{ return this == UsageVariance && activityId != null; } public boolean isRateVariance() { return this == RateVariance; } public boolean isMethodChangeVariance() { return this == MethodChangeVariance; } public boolean isMaterialMethodChangeVariance(@Nullable final PPOrderBOMLineId orderBOMLineId) { r...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\CostCollectorType.java
1
请完成以下Java代码
private void setupInfoColumnControllerBindings() { for (int i = 0; i < p_layout.length; i++) { final int columnIndexModel = i; final Info_Column infoColumn = p_layout[columnIndexModel]; final IInfoColumnController columnController = infoColumn.getColumnController(); final List<Info_Column> dependentCol...
{ final int colIndexModel = getColumnIndex(infoColumn); if (colIndexModel < 0) { return; } p_table.setValueAt(value, rowIndexModel, colIndexModel); } @Override public void setValueByColumnName(final String columnName, final int rowIndexModel, final Object value) { final int colIndexModel = getColum...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\apps\search\InfoSimple.java
1
请完成以下Java代码
public class X_C_Async_Batch_Type extends org.compiere.model.PO implements I_C_Async_Batch_Type, org.compiere.model.I_Persistent { private static final long serialVersionUID = 851172719L; /** Standard Constructor */ public X_C_Async_Batch_Type (final Properties ctx, final int C_Async_Batch_Type_ID, @Nullabl...
{ return get_ValueAsString(COLUMNNAME_InternalName); } @Override public void setKeepAliveTimeHours (final @Nullable String KeepAliveTimeHours) { set_Value (COLUMNNAME_KeepAliveTimeHours, KeepAliveTimeHours); } @Override public String getKeepAliveTimeHours() { return get_ValueAsString(COLUMNNAME_KeepAliv...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java-gen\de\metas\async\model\X_C_Async_Batch_Type.java
1
请完成以下Java代码
public BpmnDiagram newInstance(ModelTypeInstanceContext instanceContext) { return new BpmnDiagramImpl(instanceContext); } }); SequenceBuilder sequenceBuilder = typeBuilder.sequence(); bpmnPlaneChild = sequenceBuilder.element(BpmnPlane.class) .required() .build(); bpmnL...
super(instanceContext); } public BpmnPlane getBpmnPlane() { return bpmnPlaneChild.getChild(this); } public void setBpmnPlane(BpmnPlane bpmnPlane) { bpmnPlaneChild.setChild(this, bpmnPlane); } public Collection<BpmnLabelStyle> getBpmnLabelStyles() { return bpmnLabelStyleCollection.get(this); ...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\bpmndi\BpmnDiagramImpl.java
1
请完成以下Java代码
public AggregationKey buildAggregationKey(I_C_Invoice_Candidate model) { final List<Object> keyValues = getValues(model); final ArrayKey key = Util.mkKey(keyValues.toArray()); final AggregationId aggregationId = null; return new AggregationKey(key, aggregationId); } private List<Object> getValues(@NonNull f...
final int pricingSystemId = IPriceListDAO.M_PricingSystem_ID_None; // 08511 workaround values.add(pricingSystemId); values.add(invoiceCandBL.isTaxIncluded(ic)); // task 08451 final Boolean compact = true; values.add(compact ? toHashcode(ic.getDescriptionHeader()) : ic.getDescriptionHeader()); values.add(com...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\agg\key\impl\ICHeaderAggregationKeyBuilder_OLD.java
1
请完成以下Java代码
public ListenableFuture<Integer> getCartId() { return lExecService.submit(() -> { TimeUnit.MILLISECONDS.sleep(500); return new Random().nextInt(Integer.MAX_VALUE); }); } public ListenableFuture<String> getCustomerName() { String[] names = new String[] { "Mark", "...
public ListenableFuture<String> generateUsername(String firstName) { return lExecService.submit(() -> { TimeUnit.MILLISECONDS.sleep(500); return firstName.replaceAll("[^a-zA-Z]+","") .concat("@service.com"); }); } public ListenableFuture<String> gener...
repos\tutorials-master\guava-modules\guava-concurrency\src\main\java\com\baeldung\guava\future\ListenableFutureService.java
1
请完成以下Java代码
public List<Comment> findCommentsByProcessInstanceId(String processInstanceId) { checkHistoryEnabled(); return commentDataManager.findCommentsByProcessInstanceId(processInstanceId); } @Override public List<Comment> findCommentsByProcessInstanceId(String processInstanceId, String type) { ...
processDefinitionId = process.getProcessDefinitionId(); } } getEventDispatcher().dispatchEvent( ActivitiEventBuilder.createEntityEvent( ActivitiEventType.ENTITY_DELETED, commentEntity, processInstanceId, ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\CommentEntityManagerImpl.java
1
请在Spring Boot框架中完成以下Java代码
public long setAdd(String key, Object... values) { return setOperations.add(key, values); } public long setAdd(String key, long milliseconds, Object... values) { Long count = setOperations.add(key, values); if (milliseconds > 0) { expire(key, milliseconds); } ...
public boolean listRightPush(String key, Object value, long milliseconds) { listOperations.rightPush(key, value); if (milliseconds > 0) { return expire(key, milliseconds); } return false; } public long listRightPushAll(String key, List<Object> value) { return...
repos\spring-boot-best-practice-master\spring-boot-redis\src\main\java\cn\javastack\springboot\redis\service\RedisOptService.java
2
请完成以下Java代码
protected BigDecimalStringExpression createGeneralExpression(final ExpressionContext context, final String expressionStr, final List<Object> expressionChunks) { return new GeneralExpression(context, this, expressionStr, expressionChunks); } }); } private static final class BigDecimalValueConverter implem...
public ConstantExpression(final Compiler<BigDecimal, BigDecimalStringExpression> compiler, final String expressionStr, final BigDecimal constantValue) { super(ExpressionContext.EMPTY, compiler, expressionStr, constantValue); } } private static final class SingleParameterExpression extends SingleParameterExpr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\expression\api\impl\BigDecimalStringExpressionSupport.java
1
请完成以下Java代码
public XMLGregorianCalendar getCreDtTm() { return creDtTm; } /** * Sets the value of the creDtTm property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setCreDtTm(XMLGregorianCalendar value) { this.cre...
*/ public void setCtrlSum(BigDecimal value) { this.ctrlSum = value; } /** * Gets the value of the initgPty property. * * @return * possible object is * {@link PartyIdentification32CHNameAndId } * */ public PartyIdentification32CHNameAndId getInit...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\schema-pain_001_01_03_ch_02\src\main\java-xjc\de\metas\payment\sepa\jaxb\sct\pain_001_001_03_ch_02\GroupHeader32CH.java
1
请完成以下Java代码
private void updateShipmentFromResponse(@NonNull final ShipmentSchedule shipmentSchedule, @NonNull final JsonDeliveryAdvisorResponse response) { if (response.isError()) { shipmentSchedule.setCarrierAdviseErrorMessage(response.getErrorMessage()); updateAdviseStatusAndSave(shipmentSchedule, CarrierAdviseStatus...
@NonNull private CarrierGoodsTypeId extractCarrierGoodsTypeId(@NonNull final ShipperId shipperId, final @NonNull JsonGoodsType jsonGoodsType) { final CarrierGoodsType goodsType = goodsTypeRepository.getOrCreateGoodsType(shipperId, jsonGoodsType.getId(), jsonGoodsType.getName()); return goodsType.getId(); } @No...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\CarrierAdviseCommand.java
1
请完成以下Java代码
public static String encode16(String password) { return encode32(password).substring(8, 24); } /** * 16位大写MD5签名值 * @param password * @return */ public static String encode16ToUpperCase(String password) { return encode32ToUpperCase(password).substring(8,24); } pu...
private static Object byteToHexChar(byte b) { int n = b; if (n < 0) { n = 256 + n; } int d1 = n / 16; int d2 = n % 16; return hex[d1] + hex[d2]; } public static void main(String [] args ){ String ss = "test"; System.out.println(MD5Uti...
repos\roncoo-pay-master\roncoo-pay-common-core\src\main\java\com\roncoo\pay\common\core\utils\MD5Util.java
1
请完成以下Java代码
public boolean isInserted() { return isInserted; } @Override public void setInserted(boolean isInserted) { this.isInserted = isInserted; } @Override public boolean isUpdated() { return isUpdated; } @Override public void setUpdated(boolean isUpdated) { ...
@Override public boolean isDeleted() { return isDeleted; } @Override public void setDeleted(boolean isDeleted) { this.isDeleted = isDeleted; } @Override public Object getOriginalPersistentState() { return originalPersistentState; } @Override public void...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\persistence\entity\AbstractEntityNoRevision.java
1
请完成以下Java代码
public String completeIt(final DocumentTableFields docFields) { final I_SAP_GLJournal glJournalRecord = extractRecord(docFields); assertPeriodOpen(glJournalRecord); glJournalService.updateWhileSaving( glJournalRecord, glJournal -> { glJournal.assertHasLines(); glJournal.updateLineAcctAmounts(...
@Override public void reactivateIt(final DocumentTableFields docFields) { final I_SAP_GLJournal glJournalRecord = extractRecord(docFields); assertPeriodOpen(glJournalRecord); glJournalService.updateWhileSaving( glJournalRecord, glJournal -> glJournal.setProcessed(false) ); factAcctDAO.deleteForDocu...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\gljournal_sap\document\SAPGLJournalDocumentHandler.java
1
请在Spring Boot框架中完成以下Java代码
public boolean refresh(final I_AD_Table_MView mview, final PO sourcePO, final RefreshMode refreshMode, final String trxName) { final boolean[] ok = new boolean[] { false }; Services.get(ITrxManager.class).run(trxName, new TrxRunnable2() { @Override public void run(String trxName) { refreshEx(mview, ...
public boolean isSourceChanged(MViewMetadata mdata, PO sourcePO, int changeType) { final String sourceTableName = sourcePO.get_TableName(); final Set<String> sourceColumns = mdata.getSourceColumns(sourceTableName); if (sourceColumns == null || sourceColumns.isEmpty()) return false; if (changeType == ModelV...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\service\impl\TableMViewBL.java
2
请完成以下Java代码
private void addForParentTable(final ParentChildInfo info) { final String parentTableName = info.getParentTableName(); factoriesByTableName.put(parentTableName, DirectModelCacheInvalidateRequestFactory.instance); // NOTE: always invalidate parent table name, even if info.isParentNeedsRemoteCacheInvalidatio...
{ factoriesByTableName.put(childTableName, factory); } } catch (final Exception ex) { logger.warn("Failed to create model cache invalidate for {}: {}", childTableName, info, ex); } if (info.isChildNeedsRemoteCacheInvalidation()) { tableNamesToEnableRemoveCacheInvalidation.add(childTa...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\WindowBasedModelCacheInvalidateRequestFactoryGroup.java
1
请完成以下Java代码
public int getEXP_FormatLine_ID() { return get_ValueAsInt(COLUMNNAME_EXP_FormatLine_ID); } /** * FilterOperator AD_Reference_ID=541875 * Reference name: FilterOperator_for_EXP_FormatLine */ public static final int FILTEROPERATOR_AD_Reference_ID=541875; /** Equals = E */ public static final String FILTE...
@Override public java.lang.String getName() { return get_ValueAsString(COLUMNNAME_Name); } @Override public void setPosition (final int Position) { set_Value (COLUMNNAME_Position, Position); } @Override public int getPosition() { return get_ValueAsInt(COLUMNNAME_Position); } /** * Type AD_Refe...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_EXP_FormatLine.java
1
请完成以下Java代码
default List<URL> getAuthorizationServers() { List<String> authorizationServers = getClaimAsStringList( OAuth2ProtectedResourceMetadataClaimNames.AUTHORIZATION_SERVERS); List<URL> urls = new ArrayList<>(); authorizationServers.forEach((authorizationServer) -> { try { urls.add(new URI(authorizationServe...
return getClaimAsStringList(OAuth2ProtectedResourceMetadataClaimNames.BEARER_METHODS_SUPPORTED); } /** * Returns the name of the protected resource intended for display to the end user * {@code (resource_name)}. * @return the name of the protected resource intended for display to the end user */ default Str...
repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\OAuth2ProtectedResourceMetadataClaimAccessor.java
1
请完成以下Java代码
protected void prepare() { ProcessInfoParameter[] para = getParametersAsArray(); for (int i = 0; i < para.length; i++) { String name = para[i].getParameterName(); if (para[i].getParameter() == null) ; else if (name.equals("AD_Role_ID")) { p_role_id = para[i].getParameterAsInt(); } ...
@Override protected String doIt() throws Exception { if (p_role_id == 0) { throw new Exception("No Role defined or cannot assign menus to System Administrator"); } String sqlStmt = "SELECT U_WebMenu_ID, IsActive FROM U_WebMenu"; PreparedStatement pstmt = null; ResultSet rs = null; try { p...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\process\UpdateRoleMenu.java
1
请完成以下Java代码
public String getGivenName() { return this.givenName; } public String getSn() { return this.sn; } public String[] getCn() { return this.cn.toArray(new String[0]); } public String getDescription() { return this.description; } public String getTelephoneNumber() { return this.telephoneNumber; } pr...
super(copyMe); setGivenName(copyMe.givenName); setSn(copyMe.sn); setDescription(copyMe.getDescription()); setTelephoneNumber(copyMe.getTelephoneNumber()); ((Person) this.instance).cn = new ArrayList<>(copyMe.cn); } @Override protected LdapUserDetailsImpl createTarget() { return new Person(); ...
repos\spring-security-main\ldap\src\main\java\org\springframework\security\ldap\userdetails\Person.java
1
请完成以下Java代码
public void onDocValidate(@NonNull final Object model, @NonNull final DocTimingType timing) { Check.assume(isDocument, "isDocument flag is set"); // shall not happen // // Create missing invoice candidates for given document if (timing == createInvoiceCandidatesTiming) { createMissingInvoiceCandidates(mo...
* Creates missing invoice candidates for given model, if this is enabled. */ private void createMissingInvoiceCandidates(@NonNull final Object model) { final CandidatesAutoCreateMode modeForCurrentModel = handler.getSpecificCandidatesAutoCreateMode(model); switch (modeForCurrentModel) { case DONT: // just ...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\invoicecandidate\modelvalidator\ilhandler\ILHandlerModelInterceptor.java
1
请在Spring Boot框架中完成以下Java代码
public Mono<City> findCityById(@PathVariable("id") Long id) { return cityHandler.findCityById(id); } @GetMapping() @ResponseBody public Flux<City> findAllCity() { return cityHandler.findAllCity(); } @PostMapping() @ResponseBody public Mono<Long> saveCity(@RequestBody Ci...
@GetMapping("/hello") public Mono<String> hello(final Model model) { model.addAttribute("name", "泥瓦匠"); model.addAttribute("city", "浙江温岭"); String path = "hello"; return Mono.create(monoSink -> monoSink.success(path)); } private static final String CITY_LIST_PATH_NAME = "ci...
repos\springboot-learning-example-master\springboot-webflux-4-thymeleaf\src\main\java\org\spring\springboot\webflux\controller\CityWebFluxController.java
2
请完成以下Java代码
public void contribute(Path projectRoot) throws IOException { S sourceCode = this.sourceFactory.get(); String applicationName = this.description.getApplicationName(); C compilationUnit = sourceCode.createCompilationUnit(this.description.getPackageName(), applicationName); T mainApplicationType = compilationUnit...
} @SuppressWarnings("unchecked") private void customizeMainCompilationUnit(C compilationUnit) { List<MainCompilationUnitCustomizer<?, ?>> customizers = this.mainCompilationUnitCustomizers.orderedStream() .collect(Collectors.toList()); LambdaSafe.callbacks(MainCompilationUnitCustomizer.class, customizers, comp...
repos\initializr-main\initializr-generator-spring\src\main\java\io\spring\initializr\generator\spring\code\MainSourceCodeProjectContributor.java
1
请完成以下Java代码
class JettyServer { private Server server; void start() throws Exception { int maxThreads = 100; int minThreads = 10; int idleTimeout = 120; QueuedThreadPool threadPool = new QueuedThreadPool(maxThreads, minThreads, idleTimeout); server = new Server(threadPool); ...
ServletHandler servletHandler = new ServletHandler(); server.setHandler(servletHandler); servletHandler.addServletWithMapping(BlockingServlet.class, "/status"); servletHandler.addServletWithMapping(AsyncServlet.class, "/heavy/async"); server.start(); } void stop() throws Exce...
repos\tutorials-master\libraries-server\src\main\java\com\baeldung\jetty\JettyServer.java
1
请在Spring Boot框架中完成以下Java代码
public class BaseComponentDescriptorService implements ComponentDescriptorService { @Autowired private ComponentDescriptorDao componentDescriptorDao; @Autowired private DataValidator<ComponentDescriptor> componentValidator; @Override public ComponentDescriptor saveComponent(TenantId tenantId,...
Validator.validateString(clazz, "Incorrect clazz for delete request."); componentDescriptorDao.deleteByClazz(tenantId, clazz); } @Override public boolean validate(TenantId tenantId, ComponentDescriptor component, JsonNode configuration) { try { if (!component.getConfigurationDes...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\component\BaseComponentDescriptorService.java
2
请在Spring Boot框架中完成以下Java代码
class SurveyController { @Autowired private SurveyService surveyService; @GetMapping("/surveys/{surveyId}/questions") public List<Question> retrieveQuestions(@PathVariable String surveyId) { return surveyService.retrieveQuestions(surveyId); } // GET "/surveys/{surveyId}/questions/{questionId}" @GetMapping("/...
Question question = surveyService.addQuestion(surveyId, newQuestion); if (question == null) return ResponseEntity.noContent().build(); // Success - URI of the new resource in Response Header // Status - created // URI -> /surveys/{surveyId}/questions/{questionId} // question.getQuestionId() URI locatio...
repos\SpringBootForBeginners-master\05.Spring-Boot-Advanced\src\main\java\com\in28minutes\springboot\controller\SurveyController.java
2
请在Spring Boot框架中完成以下Java代码
public String uploadFile(@RequestParam final String username, @RequestParam final String password, @RequestParam("file") final MultipartFile file) { if (!file.isEmpty()) { try { final DateFormat dateFormat = new SimpleDateFormat("yyyy_MM_dd_HH.mm.ss"); final String fi...
if (!file.isEmpty()) { try { final DateFormat dateFormat = new SimpleDateFormat("yyyy_MM_dd_HH.mm.ss"); final String fileName = dateFormat.format(new Date()); final File fileServer = new File(fileName); fileServer.createNewFile(); ...
repos\tutorials-master\spring-boot-modules\spring-boot-runtime\src\main\java\com\baeldung\sampleapp\web\controller\SimplePostController.java
2
请完成以下Java代码
public class CardSecurityInformation1 { @XmlElement(name = "CSCMgmt", required = true) @XmlSchemaType(name = "string") protected CSCManagement1Code cscMgmt; @XmlElement(name = "CSCVal") protected String cscVal; /** * Gets the value of the cscMgmt property. * * @return * ...
*/ public String getCSCVal() { return cscVal; } /** * Sets the value of the cscVal property. * * @param value * allowed object is * {@link String } * */ public void setCSCVal(String value) { this.cscVal = value; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_04\CardSecurityInformation1.java
1
请完成以下Java代码
public void setNote (final @Nullable java.lang.String Note) { set_Value (COLUMNNAME_Note, Note); } @Override public java.lang.String getNote() { return get_ValueAsString(COLUMNNAME_Note); } @Override public void setProcessed (final boolean Processed) { set_Value (COLUMNNAME_Processed, Processed); } ...
{ final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Qty_Planned); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setQty_Reported (final @Nullable BigDecimal Qty_Reported) { set_Value (COLUMNNAME_Qty_Reported, Qty_Reported); } @Override public BigDecimal getQty_Reported() { fin...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Flatrate_DataEntry.java
1
请完成以下Java代码
public class Region extends Country implements Externalizable { private static final long serialVersionUID = 1L; private String climate; private Double population; private Community community; public String getClimate() { return climate; } public void setClimate(String climate) {...
out.writeUTF(climate); community = new Community(); community.setId(5); out.writeObject(community); } @Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); this.climate = in.readUTF(); communit...
repos\tutorials-master\core-java-modules\core-java-serialization\src\main\java\com\baeldung\externalizable\Region.java
1
请在Spring Boot框架中完成以下Java代码
private HUQRCodeAttribute toHUQRCodeAttribute(final HUQRCodeGenerateRequest.Attribute request) { final AttributeId attributeId; final I_M_Attribute attribute; if (request.getAttributeId() != null) { attributeId = request.getAttributeId(); attribute = attributeDAO.getAttributeRecordById(attributeId); } ...
{ value = null; valueRendered = null; } break; default: throw new AdempiereException("Unsupported attribute value type: " + valueType); } return HUQRCodeAttribute.builder() .code(AttributeCode.ofString(attribute.getValue())) .displayName(attribute.getName()) .value(value) ....
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\service\HUQRCodeGenerateCommand.java
2