instruction
string
input
string
output
string
source_file
string
priority
int64
请在Spring Boot框架中完成以下Java代码
public class NettyServerHandlerInitializer extends ChannelInitializer<Channel> { /** * 心跳超时时间 */ private static final Integer READ_TIMEOUT_SECONDS = 3 * 60; @Autowired private MessageDispatcher messageDispatcher; @Autowired private NettyServerHandler nettyServerHandler; @Overrid...
channelPipeline // 空闲检测 .addLast(new ReadTimeoutHandler(READ_TIMEOUT_SECONDS, TimeUnit.SECONDS)) // 编码器 .addLast(new InvocationEncoder()) // 解码器 .addLast(new InvocationDecoder()) // 消息分发器 .add...
repos\SpringBoot-Labs-master\lab-67\lab-67-netty-demo\lab-67-netty-demo-server\src\main\java\cn\iocoder\springboot\lab67\nettyserverdemo\server\handler\NettyServerHandlerInitializer.java
2
请完成以下Java代码
public class WeightHUCommand { private final IHandlingUnitsBL handlingUnitsBL = Services.get(IHandlingUnitsBL.class); private final HUQtyService huQtyService; private final HuId huId; private final PlainWeightable targetWeight; @Builder private WeightHUCommand( @NonNull final HUQtyService huQtyService, //...
} private void updateHUWeights() { final I_M_HU hu = handlingUnitsBL.getById(huId); final IWeightable huAttributes = getHUAttributes(hu); huAttributes.setWeightTareAdjust(targetWeight.getWeightTareAdjust()); huAttributes.setWeightGross(targetWeight.getWeightGross()); huAttributes.setWeightNet(targetWeight...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\weighting\WeightHUCommand.java
1
请完成以下Java代码
public class DataObjectImpl extends FlowElementImpl implements DataObject { protected static AttributeReference<ItemDefinition> itemSubjectRefAttribute; protected static Attribute<Boolean> isCollectionAttribute; protected static ChildElement<DataState> dataStateChild; public static void registerType(ModelBuil...
@Override public DataState getDataState() { return dataStateChild.getChild(this); } @Override public void setDataState(DataState dataState) { dataStateChild.setChild(this, dataState); } @Override public boolean isCollection() { return isCollectionAttribute.getValue(this); } @Override ...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\DataObjectImpl.java
1
请完成以下Java代码
public class FullResponseBuilder { public static String getFullResponse(HttpURLConnection con) throws IOException { StringBuilder fullResponseBuilder = new StringBuilder(); fullResponseBuilder.append(con.getResponseCode()) .append(" ") .append(con.getResponseMessage()) ...
Reader streamReader = null; if (con.getResponseCode() > 299) { streamReader = new InputStreamReader(con.getErrorStream()); } else { streamReader = new InputStreamReader(con.getInputStream()); } BufferedReader in = new BufferedReader(streamReader); String...
repos\tutorials-master\core-java-modules\core-java-networking\src\main\java\com\baeldung\httprequest\FullResponseBuilder.java
1
请完成以下Java代码
public void setDebug(boolean debug) { this.debug = debug; } public void setMultiTier(boolean multiTier) { this.multiTier = multiTier; } private static final class LoginConfig extends Configuration { private boolean debug; private LoginConfig(boolean debug) { super(); this.debug = debug; } @Ov...
this.password = password; } @Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { for (Callback callback : callbacks) { if (callback instanceof NameCallback) { NameCallback ncb = (NameCallback) callback; ncb.setName(this.username); } else i...
repos\spring-security-main\kerberos\kerberos-core\src\main\java\org\springframework\security\kerberos\authentication\sun\SunJaasKerberosClient.java
1
请完成以下Java代码
public String getPlaceholder() { return PasswordPolicyUserDataRuleImpl.PLACEHOLDER; } @Override public Map<String, String> getParameters() { return null; } @Override public boolean execute(String password) { return false; } @Override public boolean execute(String candidatePassword, User...
String firstName = upperCase(user.getFirstName()); String lastName = upperCase(user.getLastName()); String email = upperCase(user.getEmail()); return !(isNotBlank(id) && candidatePassword.contains(id) || isNotBlank(firstName) && candidatePassword.contains(firstName) || i...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\identity\PasswordPolicyUserDataRuleImpl.java
1
请在Spring Boot框架中完成以下Java代码
public List<TaskDTO> getTasks() { return tasks; } /** * Get tasks for specific taskid * * @param taskId * @return */ @RequestMapping(value = "{taskId}", method = RequestMethod.GET, headers = "Accept=application/json") public TaskDTO getTaskByTaskId(@PathVariable("taskId") String taskId) { TaskDTO ta...
return taskToReturn; } /** * Get tasks for specific user that is passed in * * @param taskId * @return */ @RequestMapping(value = "/usertask/{userName}", method = RequestMethod.GET, headers = "Accept=application/json") public List<TaskDTO> getTasksByUserName(@PathVariable("userName") String userName) { ...
repos\spring-boot-microservices-master\task-webservice\src\main\java\com\rohitghatol\microservices\task\apis\TaskController.java
2
请完成以下Java代码
public void setM_Shipment_Declaration_Correction_ID (int M_Shipment_Declaration_Correction_ID) { if (M_Shipment_Declaration_Correction_ID < 1) set_Value (COLUMNNAME_M_Shipment_Declaration_Correction_ID, null); else set_Value (COLUMNNAME_M_Shipment_Declaration_Correction_ID, Integer.valueOf(M_Shipment_Decla...
*/ @Override public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Process Now. @param Processing Process Now */ @Override publi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_Shipment_Declaration.java
1
请完成以下Java代码
public String toString() { StringBuffer sb = new StringBuffer ("X_C_ChargeType[") .append(get_ID()).append("]"); return sb.toString(); } /** Set Charge Type. @param C_ChargeType_ID Charge Type */ public void setC_ChargeType_ID (int C_ChargeType_ID) { if (C_ChargeType_ID < 1) se...
} /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getN...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_ChargeType.java
1
请完成以下Java代码
public Builder setDetailId(final String detailIdStr) { setDetailId(DetailId.fromJson(detailIdStr)); return this; } public Builder setDetailId(final DetailId detailId) { this.detailId = detailId; return this; } public Builder setRowId(final String rowIdStr) { final DocumentId rowId = Docum...
this.rowIds.addAll(rowIds.toSet()); return this; } public Builder allowNullRowId() { rowId_allowNull = true; return this; } public Builder allowNewRowId() { rowId_allowNew = true; return this; } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\DocumentPath.java
1
请完成以下Java代码
public void setPaymentRule (final @Nullable java.lang.String PaymentRule) { set_Value (COLUMNNAME_PaymentRule, PaymentRule); } @Override public java.lang.String getPaymentRule() { return get_ValueAsString(COLUMNNAME_PaymentRule); } @Override public void setPhone (final @Nullable java.lang.String Phone) ...
set_Value (COLUMNNAME_Processed, Processed); } @Override public boolean isProcessed() { return get_ValueAsBoolean(COLUMNNAME_Processed); } @Override public void setReferrer (final @Nullable java.lang.String Referrer) { set_Value (COLUMNNAME_Referrer, Referrer); } @Override public java.lang.String get...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_QuickInput.java
1
请完成以下Java代码
public record SearchHotelsResult(List<HotelService.HotelOffer> offers) { } public static class SearchHotels implements Functional { @JsonPropertyDescription("City name, for example: Tokyo") @JsonProperty(required = true) public String city; @JsonPropertyDescription("Check-in d...
public String checkIn; @JsonPropertyDescription("Number of nights to stay") @JsonProperty(required = true) public int nights; @JsonPropertyDescription("Number of guests") @JsonProperty(required = true) public int guests; @JsonPropertyDescription("Guest full nam...
repos\tutorials-master\libraries-ai\src\main\java\com\baeldung\simpleopenai\HotelFunctions.java
1
请完成以下Java代码
public List<AppDeploymentResourceResponse> createDeploymentResourceResponseList(String deploymentId, List<String> resourceList, ContentTypeResolver contentTypeResolver) { AppRestUrlBuilder urlBuilder = createUrlBuilder(); // Add additional metadata to the artifact-strings before returning List<A...
String resourceUrl = urlBuilder.buildUrl(AppRestUrls.URL_DEPLOYMENT_RESOURCE, deploymentId, resourceId); String resourceContentUrl = urlBuilder.buildUrl(AppRestUrls.URL_DEPLOYMENT_RESOURCE_CONTENT, deploymentId, resourceId); // Determine type String type = "resource"; if (resourceId.end...
repos\flowable-engine-main\modules\flowable-app-engine-rest\src\main\java\org\flowable\app\rest\AppRestResponseFactory.java
1
请在Spring Boot框架中完成以下Java代码
ApplicationListener<ClassPathChangedEvent> liveReloadTriggeringClassPathChangedEventListener( OptionalLiveReloadServer optionalLiveReloadServer) { return (event) -> { String url = this.remoteUrl + this.properties.getRemote().getContextPath(); this.executor.execute( new DelayedLiveReloadTrigger(opti...
@Bean FileSystemWatcherFactory getFileSystemWatcherFactory() { return this::newFileSystemWatcher; } private FileSystemWatcher newFileSystemWatcher() { Restart restartProperties = this.properties.getRestart(); FileSystemWatcher watcher = new FileSystemWatcher(true, restartProperties.getPollInterval(), ...
repos\spring-boot-4.0.1\module\spring-boot-devtools\src\main\java\org\springframework\boot\devtools\remote\client\RemoteClientConfiguration.java
2
请完成以下Java代码
protected String doIt() { Check.assume(p_AD_User_ID > 0, "User should not be empty! "); final int targetUser_ID = getRecord_ID(); Check.assume(targetUser_ID > 0, "There is no record selected! "); final I_AD_User targetUser = Services.get(IUserDAO.class).getById(targetUser_ID); Check.assume(targetUser...
} return "Count: " + cnt; } /** * check if the TreeBar already exists */ private boolean existsAlready(final int AD_User_ID, final int Node_ID) { final String whereClause = I_AD_TreeBar.COLUMNNAME_AD_User_ID + " = ? AND " + I_AD_TreeBar.COLUMNNAME_Node_ID + " = ?"; return new TypedSqlQu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\user\process\AD_User_CopyFavoritesPanel.java
1
请完成以下Java代码
public class DepositAccountAsyncEvent implements AccountAsyncEvent { private final String id; private final String accountId; private final Integer credit; @JsonCreator public DepositAccountAsyncEvent(@JsonProperty("id") String id, @JsonProperty("account") Strin...
} @Override public String keyMessageKey() { return accountId; } public String getAccountId() { return accountId; } public Integer getCredit() { return credit; } }
repos\spring-examples-java-17\spring-kafka\kafka-common\src\main\java\itx\examples\spring\kafka\events\DepositAccountAsyncEvent.java
1
请完成以下Java代码
public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Division getDivision() { return division;
} public void setDivision(Division division) { this.division = division; } public Date getStartDt() { return startDt; } public void setStartDt(Date startDt) { this.startDt = startDt; } }
repos\tutorials-master\mapstruct\src\main\java\com\baeldung\entity\Employee.java
1
请完成以下Java代码
private ADReferenceService adReferenceService() { ADReferenceService adReferenceService = this._adReferenceService; if (adReferenceService == null) { adReferenceService = this._adReferenceService = ADReferenceService.get(); } return adReferenceService; } @SuppressWarnings("BooleanMethodIsAlwaysInverted...
return sysConfigBL().getBooleanValue(sysConfigName, defaultValue); } public boolean isChangeLogEnabled() { return sessionBL().isChangeLogEnabled(); } public String getInsertChangeLogType(final int adClientId) { return sysConfigBL().getValue("SYSTEM_INSERT_CHANGELOG", "N", adClientId); } public void saveC...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\POServicesFacade.java
1
请完成以下Java代码
private boolean evaluateAsStrings(final Object valueObj, final String value1S, final String value2S) { final String valueObjS = String.valueOf(valueObj); // if (X_AD_WF_NextCondition.OPERATION_Eq.equals(operation)) return valueObjS.compareTo(value1S) == 0; else if (X_AD_WF_NextCondition.OPERATION_Gt.equals(...
*/ private boolean evaluateAsBooleans(final Boolean valueObj, final String value1S) { final Boolean value1B = StringUtils.toBoolean(value1S); // if (X_AD_WF_NextCondition.OPERATION_Eq.equals(operation)) { return valueObj.equals(value1B); } else if (X_AD_WF_NextCondition.OPERATION_NotEq.equals(operation...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\WFNodeTransitionCondition.java
1
请完成以下Java代码
public void postHandleSingleHistoryEventCreated(HistoryEvent event) { ((ExternalTaskEntity) externalTask).setLastFailureLogId(event.getId()); } }); } } public void fireExternalTaskSuccessfulEvent(final ExternalTask externalTask) { if (isHistoryEventProduced(HistoryEventTypes.EXTERNA...
public HistoryEvent createHistoryEvent(HistoryEventProducer producer) { return producer.createHistoricExternalTaskLogDeletedEvt(externalTask); } }); } } // helper ///////////////////////////////////////////////////////// protected boolean isHistoryEventProduced(HistoryEventType event...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\persistence\entity\HistoricExternalTaskLogManager.java
1
请完成以下Java代码
public class FlowableEventListenerValidator extends ProcessLevelValidator { @Override protected void executeValidation(BpmnModel bpmnModel, Process process, List<ValidationError> errors) { List<EventListener> eventListeners = process.getEventListeners(); if (eventListeners != null) { ...
if (!ImplementationType.IMPLEMENTATION_TYPE_CLASS.equals(eventListener.getImplementationType()) && !ImplementationType.IMPLEMENTATION_TYPE_DELEGATEEXPRESSION.equals(eventListener.getImplementationType()) && !ImplementationType.IMPLEMENTATION_TYPE_THROW_SIGNAL_EVEN...
repos\flowable-engine-main\modules\flowable-process-validation\src\main\java\org\flowable\validation\validator\impl\FlowableEventListenerValidator.java
1
请完成以下Java代码
public static MContainerElement get(Properties ctx, int CM_ContainerElement_ID, String trxName) { MContainerElement thisContainerElement = null; String sql = "SELECT * FROM CM_Container_Element WHERE CM_Container_Element_ID=?"; PreparedStatement pstmt = null; try { pstmt = DB.prepareStatement(sql, trxName)...
/** Parent */ private MContainer m_parent = null; /** * Get Container get's related Container * @return MContainer */ public MContainer getParent() { if (m_parent == null) m_parent = new MContainer (getCtx(), getCM_Container_ID(), get_TrxName()); return m_parent; /** No reason to do this ?? - ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MContainerElement.java
1
请完成以下Java代码
public List<InvoiceRow> getInvoiceRowsListByInvoiceId( @NonNull final Collection<InvoiceId> invoiceIds, @NonNull final ZonedDateTime evaluationDate) { if (invoiceIds.isEmpty()) { return ImmutableList.of(); } final InvoiceToAllocateQuery query = InvoiceToAllocateQuery.builder() .evaluationDate(eva...
public Optional<PaymentRow> getPaymentRowByPaymentId( @NonNull final PaymentId paymentId, @NonNull final ZonedDateTime evaluationDate) { final List<PaymentRow> paymentRows = getPaymentRowsListByPaymentId(ImmutableList.of(paymentId), evaluationDate); if (paymentRows.isEmpty()) { return Optional.empty(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\PaymentAndInvoiceRowsRepo.java
1
请完成以下Java代码
private MInOutLine[] createShipmentLines(MRMA rma, MInOut shipment) { ArrayList<MInOutLine> shipLineList = new ArrayList<MInOutLine>(); MRMALine rmaLines[] = rma.getLines(true); for (MRMALine rmaLine : rmaLines) { if (rmaLine.getM_InOutLine_ID() != 0) { MInOutLine shipLine = new MInOutLine(shipment)...
MInOutLine shipmentLines[] = createShipmentLines(rma, shipment); if (shipmentLines.length == 0) { log.warn("No shipment lines created: M_RMA_ID=" + M_RMA_ID + ", M_InOut_ID=" + shipment.get_ID()); } StringBuffer processMsg = new StringBuffer(shipment.getDocumentNo()); if (!shipment.processIt(p_d...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\adempiere\process\InOutGenerateRMA.java
1
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getAdminId() { return adminId; } public void setAdminId(Long adminId) { this.adminId = adminId; } public Date getCreateTime() { return createTime; }...
public void setUserAgent(String userAgent) { this.userAgent = userAgent; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\UmsAdminLoginLog.java
1
请完成以下Java代码
public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } /** Get Record ID/ColumnName @return ID/ColumnName pair */ public KeyNam...
/** Get Remote Client. @return Remote Client to be used to replicate / synchronize data with. */ public int getRemote_Client_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_Remote_Client_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Remote Organization. @param Remote_Org_ID ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Replication.java
1
请完成以下Java代码
public User findById(Long id) { return userRepo.findOne(id); } @Override public User findBySample(User sample) { return userRepo.findOne(whereSpec(sample)); } @Override public List<User> findAll() { return userRepo.findAll(); } @Override public List<User> f...
predicates.add(cb.equal(root.<Long>get("id"), sample.getId())); } if (StringUtils.hasLength(sample.getUsername())){ predicates.add(cb.equal(root.<String>get("username"),sample.getUsername())); } return cb.and(predicates.toArray(new Predicate[predicates.s...
repos\spring-boot-quick-master\quick-oauth2\quick-github-oauth\src\main\java\com\github\oauth\user\UserService.java
1
请完成以下Java代码
public class CachingAndArtifactsManager { /** * Ensures that the definition is cached in the appropriate places, including the deployment's collection of deployed artifacts and the deployment manager's cache. */ public void updateCachingAndArtifacts(ParsedDeployment parsedDeployment) { final ...
DecisionService decisionService = parsedDeployment.getDecisionServiceForDecisionEntity(decisionEntity); cacheEntry = new DecisionCacheEntry(decisionEntity, dmnDefinition, decisionService); } else { Decision decision = parsedDeployment.getDecisionForDecisionEntity(decisionEnti...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\deployer\CachingAndArtifactsManager.java
1
请在Spring Boot框架中完成以下Java代码
public Clob createClob() throws SQLException { return delegate.createClob(); } @Override public Blob createBlob() throws SQLException { return delegate.createBlob(); } @Override public NClob createNClob() throws SQLException { return delegate.createNClob(); } @Override public SQLXML createSQLXML() ...
} @Override public Array createArrayOf(String typeName, Object[] elements) throws SQLException { return delegate.createArrayOf(typeName, elements); } @Override public Struct createStruct(String typeName, Object[] attributes) throws SQLException { return delegate.createStruct(typeName, attributes); } @Ov...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\data_source\JasperJdbcConnection.java
2
请在Spring Boot框架中完成以下Java代码
public I_AD_Sequence retrieveTableSequenceOrNull(@NonNull final Properties ctx, @NonNull final String tableName, @Nullable final String trxName) { final IQueryBuilder<I_AD_Sequence> queryBuilder = queryBL .createQueryBuilder(I_AD_Sequence.class, ctx, trxName); final ICompositeQueryFilter<I_AD_Sequence> filter...
final String dbSequenceNameOld = DB.getTableSequenceName(tableNameOld); final String dbSequenceNameNew = DB.getTableSequenceName(tableNameNew); DB.getDatabase().renameSequence(dbSequenceNameOld, dbSequenceNameNew); } } @Override @NonNull public Optional<I_AD_Sequence> retrieveSequenceByName(@NonNull final ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\service\impl\SequenceDAO.java
2
请完成以下Java代码
protected void setLocalizationProperty( String language, String id, String propertyName, String propertyValue, ObjectNode infoNode ) { ObjectNode localizationNode = createOrGetLocalizationNode(infoNode); if (!localizationNode.has(language)) { local...
} ((ObjectNode) languageNode.get(id)).put(propertyName, propertyValue); } protected ObjectNode createOrGetLocalizationNode(ObjectNode infoNode) { if (!infoNode.has(LOCALIZATION_NODE)) { infoNode.putObject(LOCALIZATION_NODE); } return (ObjectNode) infoNode.get(LOCALI...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\DynamicBpmnServiceImpl.java
1
请完成以下Java代码
public void apply(final Document document, final JSONDocumentField jsonField) { if (!jsonField.isReadonly()) { if (isReadonly(document)) { jsonField.setReadonly(true, "no document access"); return; } } // TODO: check column level access } public void apply(final DocumentPath documentPath, ...
Boolean allowDocumentEdit = null; for (final Iterator<DocumentStandardAction> it = standardActions.iterator(); it.hasNext(); ) { final DocumentStandardAction action = it.next(); if (action.isDocumentWriteAccessRequired()) { if (allowDocumentEdit == null) { allowDocumentEdit = DocumentPermiss...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONDocumentPermissions.java
1
请完成以下Java代码
public void deployResources(final String deploymentNameHint, final Resource[] resources, final RepositoryService repositoryService) { // Create a deployment for each distinct parent folder using the name // hint // as a prefix final Map<String, Set<Resource>> resourcesMap = createMap(re...
private String determineGroupName(final Resource resource) { String result = determineResourceName(resource); try { if (resourceParentIsDirectory(resource)) { result = resource.getFile().getParentFile().getName(); } } catch (IOException e) { //...
repos\flowable-engine-main\modules\flowable5-spring\src\main\java\org\activiti\spring\autodeployment\ResourceParentFolderAutoDeploymentStrategy.java
1
请完成以下Java代码
public @Nullable Set<Session.SessionTrackingMode> getTrackingModes() { return this.trackingModes; } public void setTrackingModes(@Nullable Set<Session.SessionTrackingMode> trackingModes) { this.trackingModes = trackingModes; } /** * Return whether to persist session data between restarts. * @return {@code...
* Available session tracking modes (mirrors * {@link jakarta.servlet.SessionTrackingMode}). */ public enum SessionTrackingMode { /** * Send a cookie in response to the client's first request. */ COOKIE, /** * Rewrite the URL to append a session ID. */ URL, /** * Use SSL build-in mechani...
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\servlet\Session.java
1
请完成以下Java代码
private static void handleRequests(List<ClientConnection> clientConnections) { Iterator<ClientConnection> iterator = clientConnections.iterator(); while (iterator.hasNext()) { ClientConnection client = iterator.next(); if (client.getSocket() .isClosed()) { ...
} } catch (IOException e) { logger.error("Error reading from client {}", client.getSocket() .getInetAddress(), e); } } } private static void closeClientConnection(List<ClientConnection> clientConnections) { for (ClientConnection client...
repos\tutorials-master\core-java-modules\core-java-sockets\src\main\java\com\baeldung\threading\request\ThreadPerRequestServer.java
1
请在Spring Boot框架中完成以下Java代码
public TaskResponse getTaskById(@PathVariable("id") String id) { Task task = taskRepository.getTaskById(id); if (task == null) { throw new UnknownTaskException(); } return buildResponse(task); } private TaskResponse buildResponse(Task task) { return new Tas...
} var user = userRepository.getUserById(userId); if (user == null) { return null; } return new UserResponse(user.id(), user.name()); } @ExceptionHandler(UnknownTaskException.class) @ResponseStatus(HttpStatus.NOT_FOUND) public void handleUnknownTask() { ...
repos\tutorials-master\lightrun\lightrun-api-service\src\main\java\com\baeldung\apiservice\adapters\http\TasksController.java
2
请在Spring Boot框架中完成以下Java代码
public R submit(@Valid @RequestBody Role role, BladeUser user) { CacheUtil.clear(SYS_CACHE); if (Func.isEmpty(role.getId())) { role.setTenantId(user.getTenantId()); } return R.status(roleService.saveOrUpdate(role)); } /** * 删除 */ @PostMapping("/remove") @ApiOperationSupport(order = 6) @Operation(su...
CacheUtil.clear(SYS_CACHE); return R.status(roleService.removeByIds(Func.toLongList(ids))); } /** * 设置菜单权限 */ @PostMapping("/grant") @ApiOperationSupport(order = 7) @Operation(summary = "权限设置", description = "传入roleId集合以及menuId集合") public R grant(@RequestBody GrantVO grantVO) { CacheUtil.clear(SYS_CACHE)...
repos\SpringBlade-master\blade-service\blade-system\src\main\java\org\springblade\system\controller\RoleController.java
2
请完成以下Java代码
private static void mergeIfPossible(Map<String, Object> source, MutablePropertySources sources, Map<String, Object> resultingSource) { PropertySource<?> existingSource = sources.get(NAME); if (existingSource != null) { Object underlyingSource = existingSource.getSource(); if (underlyingSource instanceof Ma...
moveToEnd(environment.getPropertySources()); } /** * Move the 'defaultProperties' property source so that it's the last source in the * given {@link MutablePropertySources}. * @param propertySources the property sources to update */ public static void moveToEnd(MutablePropertySources propertySources) { Pr...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\env\DefaultPropertiesPropertySource.java
1
请在Spring Boot框架中完成以下Java代码
private @Nullable String cleanContextPath(@Nullable String contextPath) { String candidate = null; if (StringUtils.hasLength(contextPath)) { candidate = contextPath.strip(); } if (StringUtils.hasText(candidate) && candidate.endsWith("/")) { return candidate.substring(0, candidate.length() - 1); }...
} public void setMaxSessions(int maxSessions) { this.maxSessions = maxSessions; } public Cookie getCookie() { return this.cookie; } } } /** * Strategies for supporting forward headers. */ public enum ForwardHeadersStrategy { /** * Use the underlying container's native support for...
repos\spring-boot-4.0.1\module\spring-boot-web-server\src\main\java\org\springframework\boot\web\server\autoconfigure\ServerProperties.java
2
请在Spring Boot框架中完成以下Java代码
public class ValidatingItemProcessorDemo { @Autowired private JobBuilderFactory jobBuilderFactory; @Autowired private StepBuilderFactory stepBuilderFactory; @Autowired private ListItemReader<TestData> simpleReader; @Bean public Job validatingItemProcessorJob() { return jobBuild...
.writer(list -> list.forEach(System.out::println)) .build(); } private ValidatingItemProcessor<TestData> validatingItemProcessor() { ValidatingItemProcessor<TestData> processor = new ValidatingItemProcessor<>(); processor.setValidator(value -> { // 对每一条数据进行校验 ...
repos\SpringAll-master\70.spring-batch-itemprocessor\src\main\java\cc\mrbird\batch\entity\job\ValidatingItemProcessorDemo.java
2
请完成以下Spring Boot application配置
spring.profiles.active=dev logging.level.org.springframework.web.servlet=DEBUG app.name=in28Minutes welcome.message=Welcome message from property file! Welcome to ${a
pp.name} basic.value=true basic.message=Dynamic Message basic.number=100
repos\spring-boot-examples-master\spring-boot-kotlin-basics-configuration\src\main\resources\application.properties
2
请完成以下Java代码
public class CommissionSettlementShare { /** a settlement share doesn't make sense without a sales commission share. */ private CommissionShareId salesCommissionShareId; @Setter(AccessLevel.NONE) private CommissionPoints pointsToSettleSum; @Setter(AccessLevel.NONE) private CommissionPoints settledPointsSum; /...
case TO_SETTLE: pointsToSettleSum = pointsToSettleSum.add(fact.getPoints()); break; case SETTLED: settledPointsSum = settledPointsSum.add(fact.getPoints()); break; default: throw new AdempiereException("fact has unsupported state " + fact.getState()) .appendParametersToMessage() .s...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\commissioninstance\businesslogic\settlement\CommissionSettlementShare.java
1
请完成以下Java代码
private void validateUOM(@NonNull final I_C_OLCand olCand) { final ProductId productId = olCandEffectiveValuesBL.getM_Product_Effective_ID(olCand); final I_C_UOM targetUOMRecord = olCandEffectiveValuesBL.getC_UOM_Effective(olCand); if (uomsDAO.isUOMForTUs(UomId.ofRepoId(targetUOMRecord.getC_UOM_ID()))) { i...
productId, targetUOMRecord, olCandEffectiveValuesBL.getEffectiveQtyEntered(olCand)); if (convertedQty == null) { final String productName = productBL.getProductName(productId); final String productValue = productBL.getProductValue(productId); final String productX12de355 = productBL.getStockUOM(pr...
repos\metasfresh-new_dawn_uat\backend\de.metas.salescandidate.base\src\main\java\de\metas\ordercandidate\spi\impl\DefaultOLCandValidator.java
1
请完成以下Java代码
public ModificationBuilder createModification(String processDefinitionId) { return new ModificationBuilderImpl(commandExecutor, processDefinitionId); } @Override public RestartProcessInstanceBuilder restartProcessInstances(String processDefinitionId) { return new RestartProcessInstanceBuilderImpl(command...
@Override public void resolveIncident(String incidentId) { commandExecutor.execute(new ResolveIncidentCmd(incidentId)); } @Override public void setAnnotationForIncidentById(String incidentId, String annotation) { commandExecutor.execute(new SetAnnotationForIncidentCmd(incidentId, annotation)); } @...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\RuntimeServiceImpl.java
1
请完成以下Java代码
private CountryId getCountryId(@NonNull final TaxQuery taxQuery) { if (taxQuery.getShippingCountryId() != null) { return taxQuery.getShippingCountryId(); } final BPartnerLocationAndCaptureId bpartnerLocationId = taxQuery.getBPartnerLocationId(); if (bpartnerLocationId == null) { throw new Adempiere...
return locationDAO.getCountryIdByLocationId(LocationId.ofRepoId(bpartnerLocation.getC_Location_ID())); } @Override public Optional<TaxId> getIdByName(@NonNull final String name, @NonNull final ClientId clientId) { return queryBL.createQueryBuilder(I_C_Tax.class) .addOnlyActiveRecordsFilter() .addEqualsFi...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\tax\api\impl\TaxDAO.java
1
请在Spring Boot框架中完成以下Java代码
public void setWithoutProcessInstanceId(Boolean withoutProcessInstanceId) { this.withoutProcessInstanceId = withoutProcessInstanceId; } public String getTaskCandidateGroup() { return taskCandidateGroup; } public void setTaskCandidateGroup(String taskCandidateGroup) { this.taskC...
} public void setParentScopeId(String parentScopeId) { this.parentScopeId = parentScopeId; } public Set<String> getScopeIds() { return scopeIds; } public void setScopeIds(Set<String> scopeIds) { this.scopeIds = scopeIds; } public String getScopeId() { retu...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\history\task\HistoricTaskInstanceQueryRequest.java
2
请完成以下Java代码
public class SimpleObjectSerializer { private static final SimpleObjectSerializer INSTANCE = new SimpleObjectSerializer(); private final ObjectMapper objectMapper; private SimpleObjectSerializer() { objectMapper = JsonObjectMapperHolder.newJsonObjectMapper(); objectMapper.configure(DeserializationFeature.FAIL...
} catch (final JsonProcessingException e) { throw new RuntimeException(e); } } public <T> T deserialize(final String eventJson, final Class<T> clazz) { try { return objectMapper.readValue(eventJson, clazz); } catch (final IOException e) { throw new RuntimeException(e); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\SimpleObjectSerializer.java
1
请在Spring Boot框架中完成以下Java代码
public class JsonAlbertaOrderLineInfo { @JsonProperty("externalId") @NonNull String externalId; @JsonProperty("salesLineId") @Nullable String salesLineId; @JsonProperty("unit") @Nullable String unit; @JsonProperty("isPrivateSale") @Nullable Boolean isPrivateSale; @JsonProperty("isRentalEquipment")
@Nullable Boolean isRentalEquipment; @JsonProperty("updated") @Nullable Instant updated; @JsonProperty("durationAmount") @Nullable BigDecimal durationAmount; @JsonProperty("timePeriod") @Nullable BigDecimal timePeriod; }
repos\metasfresh-new_dawn_uat\misc\de-metas-common\de-metas-common-ordercandidates\src\main\java\de\metas\common\ordercandidates\v2\request\alberta\JsonAlbertaOrderLineInfo.java
2
请完成以下Java代码
public class ProcessEngineFactory { protected ProcessEngineConfiguration processEngineConfiguration; protected Bundle bundle; protected ProcessEngineImpl processEngine; public void init() throws Exception { ClassLoader previous = Thread.currentThread().getContextClassLoader(); try { ...
} } public ProcessEngine getObject() throws Exception { return processEngine; } public ProcessEngineConfiguration getProcessEngineConfiguration() { return processEngineConfiguration; } public void setProcessEngineConfiguration(ProcessEngineConfiguration processEngineConfigurat...
repos\flowable-engine-main\modules\flowable-osgi\src\main\java\org\flowable\osgi\blueprint\ProcessEngineFactory.java
1
请完成以下Java代码
public final class ReachabilityMetadataProperties { /** * Location of the properties file. Must be formatted using * {@link String#format(String, Object...)} with the group id, artifact id and version * of the dependency. */ public static final String REACHABILITY_METADATA_PROPERTIES_LOCATION_TEMPLATE = "MET...
*/ public static ReachabilityMetadataProperties fromInputStream(InputStream inputStream) throws IOException { Properties properties = new Properties(); properties.load(inputStream); return new ReachabilityMetadataProperties(properties); } /** * Returns the location of the properties for the given coordinate...
repos\spring-boot-4.0.1\loader\spring-boot-loader-tools\src\main\java\org\springframework\boot\loader\tools\ReachabilityMetadataProperties.java
1
请完成以下Java代码
public void submitRejectedBatch(String engineName, List<String> jobIds) { CollectionUtil.addToMapOfLists(rejectedJobBatchesByEngine, engineName, jobIds); } public void submitAcquiredJobs(String engineName, AcquiredJobs acquiredJobs) { acquiredJobsByEngine.put(engineName, acquiredJobs); } public void s...
public Map<String, AcquiredJobs> getAcquiredJobsByEngine() { return acquiredJobsByEngine; } /** * Jobs that were rejected from execution in the acquisition cycle * due to lacking execution resources. * With an execution thread pool, these jobs could not be submitted due to * saturation of the under...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\JobAcquisitionContext.java
1
请完成以下Java代码
public abstract class TableItemImpl extends CmmnElementImpl implements TableItem { protected static AttributeReferenceCollection<ApplicabilityRule> applicabilityRuleRefCollection; protected static AttributeReferenceCollection<Role> authorizedRoleRefCollection; public TableItemImpl(ModelTypeInstanceContext insta...
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(TableItem.class, CMMN_ELEMENT_TABLE_ITEM) .namespaceUri(CMMN11_NS) .abstractType() .extendsType(CmmnElement.class); applicabilityRuleRefCollection = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_APPLICABILITY_RULE_REFS) .idA...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\TableItemImpl.java
1
请完成以下Java代码
public String getFrom() { return from; } public void setFrom(String from) { this.from = from; } public String getSubject() { return subject; } public void setSubject(String subject) { this.subject = subject; } public String getValue() { return ...
Objects.equals(value, that.value) ); } @Override public int hashCode() { return Objects.hash(from, subject, type, value); } @Override public String toString() { return ( "TemplateDefinition{" + "from='" + from + '\'' + ...
repos\Activiti-develop\activiti-core\activiti-spring-process-extensions\src\main\java\org\activiti\spring\process\model\TemplateDefinition.java
1
请完成以下Java代码
private I_M_ProductPrice toProductPriceRecord(@NonNull final ProductPrice request) { final I_M_ProductPrice record = getRecordById(request.getProductPriceId()); record.setAD_Org_ID(request.getOrgId().getRepoId()); record.setM_Product_ID(request.getProductId().getRepoId()); record.setM_PriceList_Version_ID(req...
@NonNull private I_M_ProductPrice getRecordById(@NonNull final ProductPriceId productPriceId) { return queryBL .createQueryBuilder(I_M_ProductPrice.class) .addEqualsFilter(I_M_ProductPrice.COLUMNNAME_M_ProductPrice_ID, productPriceId.getRepoId()) .create() .firstOnlyNotNull(I_M_ProductPrice.class); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\productprice\ProductPriceRepository.java
1
请在Spring Boot框架中完成以下Java代码
public class RuleEngineTbQueueAdminFactory { @Autowired(required = false) private TbKafkaTopicConfigs kafkaTopicConfigs; @Autowired(required = false) private TbKafkaSettings kafkaSettings; @ConditionalOnExpression("'${queue.type:null}'=='kafka'") @Bean public TbQueueAdmin createKafkaAdmin(...
@Override public void createTopicIfNotExists(String topic, String properties, boolean force) { } @Override public void deleteTopic(String topic) { } @Override public void destroy() { } }; } }
repos\thingsboard-master\common\queue\src\main\java\org\thingsboard\server\queue\RuleEngineTbQueueAdminFactory.java
2
请完成以下Java代码
public abstract class AbstractHitPolicy implements ContinueEvaluatingBehavior, ComposeRuleResultBehavior, ComposeDecisionResultBehavior { protected boolean multipleResults = false; public AbstractHitPolicy() { } public AbstractHitPolicy(boolean multipleResults) { this.multipleResults = multip...
* Default behavior for ComposeRuleOutput behavior */ @Override public void composeDecisionResults(ELExecutionContext executionContext) { List<Map<String, Object>> decisionResults = new ArrayList<>(executionContext.getRuleResults().values()); updateStackWithDecisionResults(decisionResults, ...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\hitpolicy\AbstractHitPolicy.java
1
请完成以下Java代码
public class SendTask extends TaskWithFieldExtensions { protected String type; protected String implementationType; protected String operationRef; public String getType() { return type; } public void setType(String type) { this.type = type; } public String getImplemen...
public SendTask clone() { SendTask clone = new SendTask(); clone.setValues(this); return clone; } public void setValues(SendTask otherElement) { super.setValues(otherElement); setType(otherElement.getType()); setImplementationType(otherElement.getImplementationTy...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\SendTask.java
1
请在Spring Boot框架中完成以下Java代码
public String getContent() { return content; } /** * Sets the value of the content property. * * @param value * allowed object is * {@link String } * */ public void setContent(String value) { this.content = value; } /** * Gets t...
*/ public String getParty() { return party; } /** * Sets the value of the party property. * * @param value * allowed object is * {@link String } * */ public void setParty(String value) { this.party = value; } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\extensions\edifact\GroupDescriptionType.java
2
请完成以下Java代码
public static IAutoCloseable temporaryForceSendingChangeEventsIf(final boolean condition) { return forceSendChangeEventsThreadLocal.temporarySetToTrueIf(condition); } private static boolean isForceSendingChangeEvents() { return forceSendChangeEventsThreadLocal.isTrue(); } private IEventBus getEventBus() {re...
public void fireNewTransaction(@NonNull final SumUpTransaction trx) { fireLocalAndRemoteListenersAfterTrxCommit(SumUpTransactionStatusChangedEvent.ofNewTransaction(trx)); } public void fireStatusChangedIfNeeded( @NonNull final SumUpTransaction trx, @NonNull final SumUpTransaction trxPrev) { if (!isForceS...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sumup\src\main\java\de\metas\payment\sumup\SumUpEventsDispatcher.java
1
请完成以下Java代码
public String getSalt() { return salt; } /** * 设置 md5密码盐. * * @param salt md5密码盐. */ public void setSalt(String salt) { this.salt = salt; } /** * 获取 联系电话. * * @return 联系电话. */ public String getPhone() { return phone; } /*...
* 设置 状态 1:正常 2:禁用. * * @param state 状态 1:正常 2:禁用. */ public void setState(Integer state) { this.state = state; } /** * 获取 创建时间. * * @return 创建时间. */ public Date getCreatedTime() { return createdTime; } /** * 设置 创建时间. * * @param ...
repos\SpringBootBucket-master\springboot-jwt\src\main\java\com\xncoding\jwt\dao\domain\Manager.java
1
请在Spring Boot框架中完成以下Java代码
public class JobInitializer implements ApplicationListener<ContextRefreshedEvent> { @Autowired private ApplicationJobRepository jobRepository; @Autowired private Scheduler scheduler; @Override public void onApplicationEvent(ContextRefreshedEvent event) { for (ApplicationJob job : jobR...
Trigger trigger = TriggerBuilder.newTrigger() .forJob(detail) .withSchedule(SimpleScheduleBuilder.simpleSchedule() .withIntervalInSeconds(30) .repeatForever()) .build(); try { scheduler.sch...
repos\tutorials-master\spring-quartz\src\main\java\org\baeldung\recovery\custom\JobInitializer.java
2
请完成以下Java代码
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Long getPrefrenceAreaId() { return prefrenceAreaId; } public void setPrefrenceAreaId(Long prefrenceAreaId) { this.prefrenceAreaId = prefrenceAreaId; } public Long ge...
this.productId = productId; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", prefrenceAr...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\CmsPrefrenceAreaProductRelation.java
1
请完成以下Java代码
private Optional<ExternalSystemLeichMehlConfigProductMapping> matchProductMappingConfig( @NonNull final I_PP_Order ppOrder, @NonNull final PLUType pluType) { final BPartnerId bPartnerId = BPartnerId.ofRepoIdOrNull(ppOrder.getC_BPartner_ID()); final ProductId ppOrderProductId = ProductId.ofRepoId(ppOrder.get...
{ throw AdempiereException.wrapIfNeeded(e); } } @NonNull private static String toJsonPluFileConfig(@NonNull final List<ExternalSystemLeichMehlPluFileConfig> configs) { final List<JsonExternalSystemLeichMehlPluFileConfig> jsonConfigs = configs.stream() .map(config -> JsonExternalSystemLeichMehlPluFileCon...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\leichmehl\ExportPPOrderToLeichMehlService.java
1
请完成以下Java代码
public void setIsReadOnly (boolean IsReadOnly) { set_Value (COLUMNNAME_IsReadOnly, Boolean.valueOf(IsReadOnly)); } /** Get Read Only. @return Field is read only */ public boolean isReadOnly () { Object oo = get_Value(COLUMNNAME_IsReadOnly); if (oo != null) { if (oo instanceof Boolean) ret...
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identi...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_UserDef_Tab.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setC_BPartner_ID (final int C_BPartner_ID) { if (C_BPartner_ID < 1) set_Value (COLUMNNAME_C_BPartner_ID, null); else set_Value (COLUMNNAME_C_BPartner_ID,...
} @Override public int getC_Flatrate_Data_ID() { return get_ValueAsInt(COLUMNNAME_C_Flatrate_Data_ID); } @Override public void setHasContracts (final boolean HasContracts) { set_Value (COLUMNNAME_HasContracts, HasContracts); } @Override public boolean isHasContracts() { return get_ValueAsBoolean(C...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\model\X_C_Flatrate_Data.java
1
请完成以下Java代码
public BigDecimal getOvertimeCost () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OvertimeCost); if (bd == null) return Env.ZERO; return bd; } /** Set Valid from. @param ValidFrom Valid from including this date (first day) */ public void setValidFrom (Timestamp ValidFrom) { set_Value (C...
} /** Set Valid to. @param ValidTo Valid to including this date (last day) */ public void setValidTo (Timestamp ValidTo) { set_Value (COLUMNNAME_ValidTo, ValidTo); } /** Get Valid to. @return Valid to including this date (last day) */ public Timestamp getValidTo () { return (Timestamp)get_Val...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_UserRemuneration.java
1
请在Spring Boot框架中完成以下Java代码
public void run(String... args) throws JobExecutionException { logger.info("Running default command line with: " + Arrays.asList(args)); Properties properties = StringUtils.splitArrayElementsIntoProperties(args, "="); launchJobFromProperties((properties != null) ? properties : new Properties()); } protected vo...
} } execute(job, jobParameters); } } private void executeRegisteredJobs(JobParameters jobParameters) throws JobExecutionException { if (this.jobRegistry != null && StringUtils.hasText(this.jobName)) { if (!isLocalJob(this.jobName)) { Job job = this.jobRegistry.getJob(this.jobName); Assert.notNul...
repos\spring-boot-4.0.1\module\spring-boot-batch\src\main\java\org\springframework\boot\batch\autoconfigure\JobLauncherApplicationRunner.java
2
请完成以下Java代码
public String getMobilephone() { return mobilephone; } public void setMobilephone(String mobilephone) { this.mobilephone = mobilephone; } public String getTelephone() { return telephone; } public void setTelephone(String telephone) { this.telephone = telephone;...
public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public Integer getDisabled() { return disabled; } public void setDisabled(Integer disabled) { this.disabled = disabled; } public String getTheme() { return theme; } public voi...
repos\springBoot-master\springboot-jpa\src\main\java\com\us\example\bean\User.java
1
请在Spring Boot框架中完成以下Java代码
public class ExternalSystemStatusRepository { @NonNull public ExternalSystemStatus create(@NonNull final ExternalSystemServiceInstanceId instanceId, @NonNull final StoreExternalSystemStatusRequest request) { final I_ExternalSystem_Status record = newInstance(I_ExternalSystem_Status.class); record.setExternalSys...
} @NonNull public ExternalSystemStatus ofStatusRecord(@NonNull final I_ExternalSystem_Status record) { return ExternalSystemStatus.builder() .id(ExternalSystemStatusId.ofRepoId(record.getExternalSystem_Status_ID())) .instanceId(ExternalSystemServiceInstanceId.ofRepoId(record.getExternalSystem_Service_Ins...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\externalservice\status\ExternalSystemStatusRepository.java
2
请完成以下Java代码
public String getTitle() { final String name = getName(); if (Check.isEmpty(name, true)) { return null; } return Services.get(IMsgBL.class).translate(Env.getCtx(), name); } /** @return action's name (not translated) */ protected abstract String getName(); public final VEditor getEditor() { if (c...
// Get value when in single mode else { final GridField gridField = getGridField(); if (gridField == null) { return null; } final Object value = gridField.getValue(); return value; } } protected final GridController getGridController() { final IContextMenuActionContext context = getCo...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\ui\AbstractContextMenuAction.java
1
请完成以下Java代码
public void setRemindDays (int RemindDays) { set_Value (COLUMNNAME_RemindDays, Integer.valueOf(RemindDays)); } /** Get Reminder Days. @return Days between sending Reminder Emails for a due or inactive Document */ public int getRemindDays () { Integer ii = (Integer)get_Value(COLUMNNAME_RemindDays); if ...
public void setSupervisor_ID (int Supervisor_ID) { if (Supervisor_ID < 1) set_Value (COLUMNNAME_Supervisor_ID, null); else set_Value (COLUMNNAME_Supervisor_ID, Integer.valueOf(Supervisor_ID)); } /** Get Supervisor. @return Supervisor for this user/organization - used for escalation and approval */ ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WorkflowProcessor.java
1
请完成以下Java代码
public static <T extends Spin<?>> T S(Object input) { return SpinFactory.INSTANCE.createSpin(input); } /** * Creates a spin wrapper for a data input. The data format of the * input is assumed to be XML. * * @param input the input to wrap * @return the spin wrapper for the input * * @throws...
/** * Writes the wrapped object to a existing writer. * * @param writer the writer to write to */ public abstract void writeToWriter(Writer writer); /** * Maps the wrapped object to an instance of a java class. * * @param type the java class to map to * @return the mapped object */ pub...
repos\camunda-bpm-platform-master\spin\core\src\main\java\org\camunda\spin\Spin.java
1
请完成以下Java代码
public void registerType(ModelElementType modelElementType, Class<? extends ModelElementInstance> instanceType) { QName qName = ModelUtil.getQName(modelElementType.getTypeNamespace(), modelElementType.getTypeName()); typesByName.put(qName, modelElementType); typesByClass.put(instanceType, modelElementType);...
return false; } if (getClass() != obj.getClass()) { return false; } ModelImpl other = (ModelImpl) obj; if (modelName == null) { if (other.modelName != null) { return false; } } else if (!modelName.equals(other.modelName)) { return false; } return true; }...
repos\camunda-bpm-platform-master\model-api\xml-model\src\main\java\org\camunda\bpm\model\xml\impl\ModelImpl.java
1
请完成以下Java代码
public void onAttributeValueChanged( @NonNull final IAttributeValueContext attributeValueContext, @NonNull final IAttributeStorage storage, IAttributeValue attributeValue, Object valueOld) { final AbstractHUAttributeStorage huAttributeStorage = AbstractHUAttributeStorage.castOrNull(storage); final boo...
final AttributeCode attributeCode = attributeValue.getAttributeCode(); final boolean relevantAttributeHasChanged = AttributeConstants.ATTR_LotNumber.equals(attributeCode); if (!relevantAttributeHasChanged) { return; } if (lotNumberQuarantineService.isQuarantineLotNumber(huAttributeStorage)) { storag...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\quarantine\QuarantineAttributeStorageListener.java
1
请完成以下Java代码
protected final String doIt() throws Exception { final I_M_ReceiptSchedule receiptSchedule = getM_ReceiptSchedule(); final IMutableHUContext huContextInitial = Services.get(IHUContextFactory.class).createMutableHUContextForProcessing(getCtx(), ClientAndOrgId.ofClientAndOrg(receiptSchedule.getAD_Client_ID(), receip...
// // Generate the HUs final List<I_M_HU> hus = huGenerator.generateWithinOwnTransaction(); hus.forEach(hu -> { updateAttributes(hu, receiptSchedule); }); openHUsToReceive(hus); return MSG_OK; } protected final I_M_ReceiptSchedule getM_ReceiptSchedule() { return getRecord(I_M_ReceiptSchedule.clas...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\handlingunits\process\WEBUI_M_ReceiptSchedule_ReceiveHUs_Base.java
1
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } public String getEdition() { return edition;
} public void setEdition(String edition) { this.edition = edition; } public InternalsImpl getInternals() { return internals; } public void setInternals(InternalsImpl internals) { this.internals = internals; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\telemetry\dto\ProductImpl.java
1
请完成以下Java代码
public class EDIFillMandatoryException extends AdempiereException { /** * */ private static final long serialVersionUID = 9074980284529933724L; /** * NOTE: fields are considered not translated and they will be translated * * @param fields */ public EDIFillMandatoryException(final Collection<String> f...
{ if (Check.isEmpty(recordName)) { return ""; } final StringBuilder sb = new StringBuilder() .append("[@").append(recordName).append("@"); if (!Check.isEmpty(recordIdentifier)) { sb.append(" (").append(recordIdentifier).append(")"); } sb.append("] "); return sb.toString(); } private sta...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\exception\EDIFillMandatoryException.java
1
请在Spring Boot框架中完成以下Java代码
public class CorsOnMethodsController { @PutMapping("/cors-disabled-endpoint") public Mono<String> corsDisabledEndpoint() { return Mono.just("CORS disabled endpoint"); } @CrossOrigin @PutMapping("/cors-enabled-endpoint") public Mono<String> corsEnabledEndpoint() { return Mono.ju...
public Mono<String> corsEnabledHeaderRestrictiveEndpoint() { return Mono.just("CORS enabled endpoint - Header Restrictive"); } @CrossOrigin(exposedHeaders = { "Baeldung-Exposed" }) @PutMapping("/cors-enabled-exposed-header-endpoint") public Mono<String> corsEnabledExposedHeadersEndpoint() { ...
repos\tutorials-master\spring-reactive-modules\spring-reactive-security\src\main\java\com\baeldung\reactive\cors\annotated\controllers\CorsOnMethodsController.java
2
请完成以下Java代码
public class Company implements Serializable { private String companyName; private Integer label; public String getCompanyName() { return companyName; } public void setCompanyName(String companyName) { this.companyName = companyName; } public Integer getLabel() {
return label; } public void setLabel(Integer label) { this.label = label; } @Override public String toString() { return "Company{" + "companyName='" + companyName + '\'' + ", label=" + label + '}'; } }
repos\spring-boot-quick-master\quick-redies\src\main\java\com\quick\redis\entity\Company.java
1
请完成以下Java代码
public static String decrypt(String value) { if (value == null) return null; if (s_engine == null) init(System.getProperties()); boolean inQuotes = value.startsWith("'") && value.endsWith("'"); if (inQuotes) value = value.substring(1, value.length() - 1); String retValue = null; if (value.startsWi...
String realClass = className; if (realClass == null || realClass.length() == 0) realClass = SecureInterface.METASFRESH_SECURE_DEFAULT; Exception cause = null; try { final Class<?> clazz = Class.forName(realClass); implementation = (SecureInterface)clazz.newInstance(); } catch (Exception e) { c...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\SecureEngine.java
1
请完成以下Java代码
public void handleDependentEventSubscriptions(MigratingActivityInstance migratingInstance, List<EventSubscriptionEntity> eventSubscriptions) { parser.getDependentEventSubscriptionHandler().handle(this, migratingInstance, eventSubscriptions); } public void handleDependentVariables(MigratingProcessElementInstanc...
ensureNoEntitiesAreLeft("incidents", incidents, processInstanceReport); ensureNoEntitiesAreLeft("jobs", jobs, processInstanceReport); ensureNoEntitiesAreLeft("event subscriptions", eventSubscriptions, processInstanceReport); ensureNoEntitiesAreLeft("variables", variables, processInstanceReport); } publ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\parser\MigratingInstanceParseContext.java
1
请完成以下Java代码
private String parseString(final String info) { if (info == null || info.isEmpty()) { return null; } String retValue = info; // Length restriction if (maxLength > 0 && retValue.length() > maxLength) { retValue = retValue.substring(0, maxLength); } // copy characters (we need to look through a...
{ return "0"; } final boolean hasPoint = info.indexOf('.') != -1; boolean hasComma = info.indexOf(',') != -1; // delete thousands if (hasComma && decimalSeparator.isDot()) { info = info.replace(',', ' '); } if (hasPoint && decimalSeparator.isComma()) { info = info.replace('.', ' '); } h...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\format\ImpFormatColumn.java
1
请完成以下Java代码
private void insertBPLocationExternalRefIfMissing( @NonNull final List<JsonRequestLocationUpsertItem> requestItems, @NonNull final Map<ExternalId, JsonMetasfreshId> externalLocationId2MetasfreshId, @Nullable final String orgCode) { requestItems.stream() .map(JsonRequestLocationUpsertItem::getLocationEx...
@NonNull final JsonSingleExternalReferenceCreateReq externalReferenceCreateReq, @NonNull final JsonMetasfreshId metasfreshId) { final JsonExternalReferenceItem referenceItemWithMFId = JsonExternalReferenceItem .builder() .metasfreshId(metasfreshId) .version(externalReferenceCreateReq.getExternalRefer...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\bpartner\bpartnercomposite\jsonpersister\JsonPersisterService.java
1
请完成以下Java代码
private List<GenericZoomIntoTableWindow> retrieveTableWindows( final @NonNull String tableName, final boolean ignoreExcludeFromZoomTargetsFlag) { String sql = "SELECT * FROM ad_table_windows_v where TableName=?"; if(!ignoreExcludeFromZoomTargetsFlag) { sql += " AND IsExcludeFromZoomTargets='N'"; } ...
return null; } // virtual column parent link is not supported if (poInfo.isVirtualColumn(parentLinkColumnName)) { return null; } return ParentLink.builder() .linkColumnName(parentLinkColumnName) .parentTableName(parentTableName) .build(); } @Nullable private ParentLink getParentLink_Sin...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\references\zoom_into\DefaultGenericZoomIntoTableInfoRepository.java
1
请完成以下Java代码
public void extractKeyParts(final CacheKeyBuilder keyBuilder, final Object targetObject, final Object[] params) { final Object ctxObj = params[parameterIndex]; if (ctxObj == null) { keyBuilder.setSkipCaching(); final CacheGetException ex = new CacheGetException("Got null context parameter.") .setTarg...
/** * Method used to compare if to contexts are considered to be equal from caching perspective. * Equality from caching perspective means that the following is equal: * <ul> * <li>AD_Client_ID * <li>AD_Role_ID * <li>AD_User_ID * <li>AD_Language * </ul> * * @param ctx1 * @param ctx2 * @return tr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\interceptor\CacheCtxParamDescriptor.java
1
请完成以下Java代码
public void completed(Integer result, ByteBuffer attachment) { if (attachment.hasRemaining()) { channel.write(attachment, attachment, this); } else { //读取客户端传回的数据 ByteBuffer readBuffer = B...
e.printStackTrace(); } } }); } @Override public void failed(Throwable exc, ByteBuffer attachment) { try { this.channel.close(); } catch (IOException e) { e.printStackTrace(); } } }
repos\spring-boot-student-master\spring-boot-student-netty\src\main\java\com\xiaolyuh\aio\server\AioReadHandler.java
1
请完成以下Java代码
protected void instantiateScopes( MigratingScopeInstance ancestorScopeInstance, MigratingScopeInstanceBranch executionBranch, List<ScopeImpl> scopesToInstantiate) { if (scopesToInstantiate.isEmpty()) { return; } ExecutionEntity ancestorScopeExecution = ancestorScopeInstance.resolve...
compensationScopeExecution.setActivity((PvmActivity) scope); compensationScopeExecution.setActive(false); compensationScopeExecution.activityInstanceStarting(); compensationScopeExecution.enterActivityInstance(); EventSubscriptionEntity eventSubscription = EventSubscriptionEntity.createAndInser...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\instance\MigrationCompensationInstanceVisitor.java
1
请在Spring Boot框架中完成以下Java代码
public class ProductService { public Product manualClone(Product original) { Product clone = new Product(); clone.setName(original.getName()); clone.setCategory(original.getCategory()); clone.setPrice(original.getPrice()); return clone; } public Product manualDeepCl...
return clone; // Return deep clone } public Product cloneUsingBeanUtils(Product original) throws InvocationTargetException, IllegalAccessException { Product clone = new Product(); BeanUtils.copyProperties(original, clone); clone.setId(null); return clone; } public Produ...
repos\tutorials-master\persistence-modules\java-jpa-4\src\main\java\com\baeldung\jpa\cloneentity\ProductService.java
2
请完成以下Java代码
public Map<String, LDAPGroupCacheEntry> getGroupCache() { return groupCache; } public void setGroupCache(Map<String, LDAPGroupCacheEntry> groupCache) { this.groupCache = groupCache; } public long getExpirationTime() { return expirationTime; } public void setExpirationT...
return groups; } public void setGroups(List<Group> groups) { this.groups = groups; } } // Cache listeners. Currently not yet exposed (only programmatically for the // moment) // Experimental stuff! public static interface LDAPGroupCacheListener { voi...
repos\flowable-engine-main\modules\flowable-ldap\src\main\java\org\flowable\ldap\LDAPGroupCache.java
1
请完成以下Java代码
public char skipTo(char to) throws JSONException { char c; try { int startIndex = this.index; int startCharacter = this.character; int startLine = this.line; reader.mark(Integer.MAX_VALUE); do { c = next(); if (c...
* * @param message * The error message. * @return A JSONException object, suitable for throwing */ public JSONException syntaxError(String message) { return new JSONException(message + toString()); } /** * Make a printable string of this JSONTokener. * * ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\util\json\JSONTokener.java
1
请完成以下Java代码
public boolean reActivateIt() { log.info(toString()); // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) return false; setProcessed(false); setDocAction(DOCACTION_Complete); // Note: // setting a...
return true; } // reverseAccrualIt @Override public boolean reverseCorrectIt() { log.info(toString()); // Before reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_REVERSECORRECT); if (m_processMsg != null) return false; // After reverseCorrec...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\model\MCFlatrateDataEntry.java
1
请完成以下Java代码
public String getPrefix() { return "graphql"; } @Override public Class<? extends ObservationConvention<? extends Observation.Context>> getDefaultConvention() { return DefaultDataLoaderObservationConvention.class; } @Override public KeyName[] getLowCardinalityKeyNames() { return DataLoaderLowCardi...
/** * Class name of the data fetching error. */ ERROR_TYPE { @Override public String asString() { return "graphql.error.type"; } } } public enum DataFetcherHighCardinalityKeyNames implements KeyName { /** * Path to the field being fetched. */ FIELD_PATH { @Override public Str...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\observation\GraphQlObservationDocumentation.java
1
请完成以下Spring Boot application配置
logging: level: org.springframework.cloud.gateway: INFO reactor.netty.http.client: INFO spring: redis: host: localhost port: 6379 cloud: gateway: filter: local-response-cache: enabled: true timeToLive: 20m size: 6MB routes: - id: req...
: 2 basedOnPreviousValue: false - id: circuitbreaker_route uri: https://httpbin.org predicates: - Path=/status/504 filters: - name: CircuitBreaker args: name: myCircuitBreaker fallbackUri: forward:/anything - RewriteP...
repos\tutorials-master\spring-cloud-modules\spring-cloud-gateway-2\src\main\resources\application-webfilters.yml
2
请在Spring Boot框架中完成以下Java代码
public class EventConfig { private Logger logger = LoggerFactory.getLogger(getClass()); @OnTransition(target = "UNPAID") public void create() { logger.info("订单创建,待支付"); } @OnTransition(source = "UNPAID", target = "WAITING_FOR_RECEIVE") public void pay() { logger.info("用户完成支付,待...
public void payStart() { logger.info("用户完成支付,待收货: start"); } @OnTransitionEnd(source = "UNPAID", target = "WAITING_FOR_RECEIVE") public void payEnd() { logger.info("用户完成支付,待收货: end"); } @OnTransition(source = "WAITING_FOR_RECEIVE", target = "DONE") public void receive() { ...
repos\SpringBoot-Learning-master\1.x\Chapter6-1-1\src\main\java\com\didispace\EventConfig.java
2
请完成以下Java代码
public static BinTrie<CoreDictionary.Attribute> getTrie() { return DEFAULT.getTrie(); } /** * 解析一段文本(目前采用了BinTrie+DAT的混合储存形式,此方法可以统一两个数据结构) * * @param text 文本 * @param processor 处理器 */ public static void parseText(char[] text, AhoCorasickDoubleArrayTrie.IHit<CoreDi...
* 最长匹配 * * @param text 文本 * @param processor 处理器 */ public static void parseLongestText(String text, AhoCorasickDoubleArrayTrie.IHit<CoreDictionary.Attribute> processor) { DEFAULT.parseLongestText(text, processor); } /** * 热更新(重新加载)<br> * 集群环境(或其他IOAdapter)需要自...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\dictionary\CustomDictionary.java
1
请完成以下Java代码
void sendAttachmentAsEmail( @NonNull final Mailbox mailBox, @NonNull final EMailAddress mailTo, @NonNull final AttachmentEntry attachmentEntry) { final byte[] data = attachmentEntryService.retrieveData(attachmentEntry.getId()); final String csvDataString = new String(data, DerKurierConstants.CSV_DATA_CHAR...
.html(false) .build()); // we don't have an AD_Archive.. // final I_AD_User user = loadOutOfTrx(Env.getAD_User_ID(), I_AD_User.class); // final IArchiveEventManager archiveEventManager = Services.get(IArchiveEventManager.class); // archiveEventManager.fireEmailSent( // null, // X_C_Doc_Outbound_Log_Lin...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.derkurier\src\main\java\de\metas\shipper\gateway\derkurier\misc\DerKurierDeliveryOrderEmailer.java
1
请在Spring Boot框架中完成以下Java代码
public class AsyncSecurPharmActionsDispatcher implements SecurPharmActionsDispatcher { private static final Topic TOPIC = Topic.distributed("de.metas.vertical.pharma.securpharm.actions"); private static final Logger logger = LogManager.getLogger(AsyncSecurPharmActionsDispatcher.class); private final IEventBus event...
@Override public void setSecurPharmService(@NonNull final SecurPharmService securPharmService) { this.handlers.forEach(handler -> handler.setSecurPharmService(securPharmService)); } @Override public void post(@NonNull final SecurPharmaActionRequest request) { eventBus.enqueueObject(request); } @ToString(o...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.securpharm\src\main\java\de\metas\vertical\pharma\securpharm\actions\AsyncSecurPharmActionsDispatcher.java
2
请在Spring Boot框架中完成以下Java代码
public class UmsMenuServiceImpl implements UmsMenuService { @Autowired private UmsMenuMapper menuMapper; @Override public int create(UmsMenu umsMenu) { umsMenu.setCreateTime(new Date()); updateLevel(umsMenu); return menuMapper.insert(umsMenu); } /** * 修改菜单层级 *...
example.setOrderByClause("sort desc"); example.createCriteria().andParentIdEqualTo(parentId); return menuMapper.selectByExample(example); } @Override public List<UmsMenuNode> treeList() { List<UmsMenu> menuList = menuMapper.selectByExample(new UmsMenuExample()); List<UmsMenu...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\service\impl\UmsMenuServiceImpl.java
2
请在Spring Boot框架中完成以下Java代码
public class Company { private Integer id; private String name; public Company(){} public Company(Integer id, String name){ this.id = id; this.name =name; } @Id @GeneratedValue(strategy = GenerationType.AUTO) public Integer getId(){
return id; } public void setId(Integer id){ this.id =id; } public String getName(){ return name; } public void setName(String name){ this.name = name; } }
repos\SpringBoot-Projects-FullStack-master\Part-5 Spring Boot Web Application\SpringMVC+DB\src\main\java\spring\mvc\domain\Company.java
2
请完成以下Java代码
public class PPOrderUserNotificationsProducer { public static final Topic USER_NOTIFICATIONS_TOPIC = Topic.builder() .name("de.metas.manufacturing.UserNotifications") .type(Type.DISTRIBUTED) .build(); private static final AdMessageKey MSG_Event_PPOrderGenerated = AdMessageKey.of("EVENT_PP_Order_Generated"); ...
private UserNotificationRequest createUserNotification(@NonNull final I_PP_Order ppOrder) { final UserId recipientUserId = getNotificationRecipientUserId(ppOrder); final TableRecordReference ppOrderRef = TableRecordReference.of(ppOrder); return newUserNotificationRequest() .recipientUserId(recipientUserId) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\manufacturing\event\PPOrderUserNotificationsProducer.java
1