instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
private void initializeSocketForBroadcasting() throws SocketException { socket = new DatagramSocket(); socket.setBroadcast(true); } private void copyMessageOnBuffer(String msg) { buf = msg.getBytes(); } private void broadcastPacket(InetAddress address) throws IOException { ...
while (serversDiscovered != expectedServerCount) { receivePacket(); serversDiscovered++; } return serversDiscovered; } private void receivePacket() throws IOException { DatagramPacket packet = new DatagramPacket(buf, buf.length); socket.receive(packet); ...
repos\tutorials-master\core-java-modules\core-java-networking-5\src\main\java\com\baeldung\networking\udp\broadcast\BroadcastingClient.java
1
请完成以下Java代码
public BigDecimal getA_Purchase_Price () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_A_Purchase_Price); if (bd == null) return Env.ZERO; return bd; } /** Set Business Partner . @param C_BPartner_ID Identifies a Business Partner */ public void setC_BPartner_ID (int C_BPartner_ID) { if (...
return 0; return ii.intValue(); } /** Set Text Message. @param TextMsg Text Message */ public void setTextMsg (String TextMsg) { set_Value (COLUMNNAME_TextMsg, TextMsg); } /** Get Text Message. @return Text Message */ public String getTextMsg () { return (String)get_Value(COLUMNNAME_TextMs...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Info_Fin.java
1
请完成以下Java代码
private <T> List<String> appendImports(Stream<T> candidates, Function<T, Collection<String>> mapping) { return candidates.map(mapping).flatMap(Collection::stream).collect(Collectors.toList()); } private String getUnqualifiedName(String name) { if (!name.contains(".")) { return name; } return name.substrin...
} @Override public CodeBlock arrayOf(CodeBlock... values) { return CodeBlock.of("[ $L ]", CodeBlock.join(Arrays.asList(values), ", ")); } @Override public CodeBlock classReference(ClassName className) { return CodeBlock.of("$T", className); } } }
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\groovy\GroovySourceCodeWriter.java
1
请完成以下Java代码
public final String toString() { StringBuffer sb = new StringBuffer(); if ( getCodeset() != null ) { if (doctype != null) sb.append (doctype.toString(getCodeset())); sb.append (html.toString(getCodeset())); return (sb.toString()); ...
sb.append (doctype.toString(getCodeset())); sb.append (html.toString(getCodeset())); return(sb.toString()); } /** Allows the document to be cloned. Doesn't return an instance of document returns instance of html. NOTE: If you have a doctype set, then it will ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\tools\src\main\java-legacy\org\apache\ecs\XhtmlDocument.java
1
请在Spring Boot框架中完成以下Java代码
public String getPayType() { return payType; } public void setPayType(String payType) { this.payType = payType; } public String getOpenId() { return openId; } public void setOpenId(String openId) { this.openId = openId; } public String getNotifyUrl() {...
this.notifyUrl = notifyUrl; } @Override public String toString() { return "ProgramPayRequestBo{" + "payKey='" + payKey + '\'' + ", openId='" + openId + '\'' + ", productName='" + productName + '\'' + ", orderNo='" + orderNo + '\'' + ...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\trade\bo\ProgramPayRequestBo.java
2
请完成以下Java代码
public void setHeaderName(String headerName) { Assert.hasLength(headerName, "headerName can't be null"); this.headerName = headerName; } /** * Sets the cookie path * @param cookiePath The cookie path */ public void setCookiePath(String cookiePath) { this.cookiePath = cookiePath; } private CsrfToken c...
} private CsrfToken createCsrfToken(String tokenValue) { return new DefaultCsrfToken(this.headerName, this.parameterName, tokenValue); } private String createNewToken() { return UUID.randomUUID().toString(); } private String getRequestContext(ServerHttpRequest request) { String contextPath = request.getPa...
repos\spring-security-main\web\src\main\java\org\springframework\security\web\server\csrf\CookieServerCsrfTokenRepository.java
1
请完成以下Java代码
public long reset(final CacheInvalidateMultiRequest multiRequest) { final ITrxManager trxManager = Services.get(ITrxManager.class); final ITrx currentTrx = trxManager.getThreadInheritedTrx(OnTrxMissingPolicy.ReturnTrxNone); if (trxManager.isNull(currentTrx)) { async.execute(() -> resetNow(extractTableNames...
if (tableNames.isEmpty()) { return; } lookupDataSourceFactory.cacheInvalidateOnRecordsChanged(tableNames); } private static final class TableNamesToResetCollector { private final Set<String> tableNames = new HashSet<>(); public Set<String> toSet() { return ImmutableSet.copyOf(tableNames); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\LookupCacheInvalidationDispatcher.java
1
请完成以下Java代码
public String getName() { return getActionType().getAD_Message(); } @Override public String getIcon() { return null; } @Override public KeyStroke getKeyStroke() { return getActionType().getKeyStroke(); } @Override public boolean isAvailable() { return !NullCopyPasteSupportEditor...
public boolean isRunnable() { return getCopyPasteSupport().isCopyPasteActionAllowed(getActionType()); } @Override public boolean isHideWhenNotRunnable() { return false; // just gray it out } @Override public void run() { getCopyPasteSupport().executeCopyPasteAction(getActionType()); } } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\CopyPasteContextMenuAction.java
1
请完成以下Java代码
public Builder setC_Activity_ID(final int C_Activity_ID) { setSegmentValue(AcctSegmentType.Activity, C_Activity_ID); return this; } public Builder setSalesOrderId(final int C_OrderSO_ID) { setSegmentValue(AcctSegmentType.SalesOrder, C_OrderSO_ID); return this; } public Builder setUser1_ID(fina...
public Builder setUserElementString4(final String userElementString4) { setSegmentValue(AcctSegmentType.UserElementString4, userElementString4); return this; } public Builder setUserElementString5(final String userElementString5) { setSegmentValue(AcctSegmentType.UserElementString5, userElementString5...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\acct\api\AccountDimension.java
1
请在Spring Boot框架中完成以下Java代码
public class ProductsAttachFileProcessor implements Processor { @Override public void process(final Exchange exchange) { final PushBOMsRouteContext context = ProcessorHelper.getPropertyOrThrowError(exchange, GRSSignumConstants.ROUTE_PROPERTY_PUSH_BOMs_CONTEXT, PushBOMsRouteContext.class); if (Check.isBlank(cont...
return null; } final String bpartnerMetasfreshId = jsonBOM.getBPartnerMetasfreshId(); if (Check.isBlank(bpartnerMetasfreshId)) { throw new RuntimeCamelException("Missing METASFRESHID! ARTNRID=" + jsonBOM.getProductId()); } final JsonExternalReferenceTarget targetBPartner = JsonExternalReferenceTarge...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-grssignum\src\main\java\de\metas\camel\externalsystems\grssignum\from_grs\bom\processor\ProductsAttachFileProcessor.java
2
请完成以下Java代码
public void setM_HU_LUTU_Configuration_ID (final int M_HU_LUTU_Configuration_ID) { if (M_HU_LUTU_Configuration_ID < 1) set_Value (COLUMNNAME_M_HU_LUTU_Configuration_ID, null); else set_Value (COLUMNNAME_M_HU_LUTU_Configuration_ID, M_HU_LUTU_Configuration_ID); } @Override public int getM_HU_LUTU_Configu...
public int getM_HU_Snapshot_ID() { return get_ValueAsInt(COLUMNNAME_M_HU_Snapshot_ID); } @Override public void setM_Locator_ID (final int M_Locator_ID) { if (M_Locator_ID < 1) set_Value (COLUMNNAME_M_Locator_ID, null); else set_Value (COLUMNNAME_M_Locator_ID, M_Locator_ID); } @Override public i...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Snapshot.java
1
请完成以下Java代码
public class PlainEventEnqueuer implements EventEnqueuer { private final EventsQueue eventsQueue = new EventsQueue(); @Override public void enqueueDistributedEvent(final Event event, final Topic topic) { eventsQueue.enqueue(event, topic); } @Override public void enqueueLocalEvent(final Event event, final Top...
{ eventsQueue.add(ImmutablePair.of(event, topic)); processQueue(); } private synchronized void processQueue() { while (!eventsQueue.isEmpty()) { final ImmutablePair<Event, Topic> eventAndTopic = eventsQueue.poll(); final IEventBus eventBus = busFactory.getEventBus(eventAndTopic.getRight());...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\impl\PlainEventEnqueuer.java
1
请完成以下Java代码
public Aggregation retrieveAggregation(@CacheCtx final Properties ctx, @NonNull final AggregationId aggregationId) { // // Load aggregation definition final I_C_Aggregation aggregationDef = InterfaceWrapperHelper.create(ctx, AggregationId.toRepoId(aggregationId), I_C_Aggregation.class, ITrx.TRXNAME_None); if (...
{ return; } if (trace.containsKey(includedAggregationId)) { throw new AdempiereException("Cycle detected: " + trace.values()); } final I_C_Aggregation includedAggregationDef = aggregationItemDef.getC_Aggregation(); trace.put(includedAggregationId, includedAggregationDef); final List<I_C_Aggregatio...
repos\metasfresh-new_dawn_uat\backend\de.metas.aggregation\src\main\java\de\metas\aggregation\api\impl\AggregationDAO.java
1
请完成以下Java代码
public MinMaxDescriptor getFromWarehouseMinMaxDescriptor() {return getDdOrderCandidate().getFromWarehouseMinMaxDescriptor();} @Nullable @JsonIgnore public ResourceId getTargetPlantId() {return getDdOrderCandidate().getTargetPlantId();} @NonNull @JsonIgnore public WarehouseId getTargetWarehouseId() {return getDd...
@Nullable @JsonIgnore public MaterialDispoGroupId getMaterialDispoGroupId() {return getDdOrderCandidate().getMaterialDispoGroupId();} @Nullable @JsonIgnore public PPOrderRef getForwardPPOrderRef() {return getDdOrderCandidate().getForwardPPOrderRef();} @JsonIgnore public int getExistingDDOrderCandidateId() {ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\event\src\main\java\de\metas\material\event\ddordercandidate\AbstractDDOrderCandidateEvent.java
1
请完成以下Java代码
public int addWord(String word) { assert word != null; char[] charArray = word.toCharArray(); Integer id = wordId.get(charArray); if (id == null) { id = wordId.size(); wordId.put(charArray, id); idWord.add(word); assert idWord.s...
{ return idWord.size(); } public String[] getWordIdArray() { String[] wordIdArray = new String[idWord.size()]; if (idWord.isEmpty()) return wordIdArray; int p = -1; Iterator<String> iterator = idWord.iterator(); while (iterator.hasNext()) { ...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\classification\corpus\Lexicon.java
1
请完成以下Java代码
public List<String> shortcutFieldOrder() { return Arrays.asList(NAME_KEY); } @Override public GatewayFilter apply(NameConfig config) { // AbstractChangeRequestUriGatewayFilterFactory.apply() returns // OrderedGatewayFilter OrderedGatewayFilter gatewayFilter = (OrderedGatewayFilter) super.apply(config); re...
@Override protected Optional<URI> determineRequestUri(ServerWebExchange exchange, NameConfig config) { String name = Objects.requireNonNull(config.getName(), "name must not be null"); String requestUrl = exchange.getRequest().getHeaders().getFirst(name); return Optional.ofNullable(requestUrl).map(url -> { try...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\RequestHeaderToRequestUriGatewayFilterFactory.java
1
请在Spring Boot框架中完成以下Java代码
public Recipient save(String accountName, Recipient recipient) { recipient.setAccountName(accountName); recipient.getScheduledNotifications().values() .forEach(settings -> { if (settings.getLastNotified() == null) { settings.setLastNotified(new Date()); } }); repository.save(recipient); ...
public List<Recipient> findReadyToNotify(NotificationType type) { switch (type) { case BACKUP: return repository.findReadyForBackup(); case REMIND: return repository.findReadyForRemind(); default: throw new IllegalArgumentException(); } } /** * {@inheritDoc} */ @Override public void ma...
repos\piggymetrics-master\notification-service\src\main\java\com\piggymetrics\notification\service\RecipientServiceImpl.java
2
请完成以下Java代码
protected Integer getVersion(CmmnActivityExecution execution) { CmmnExecution caseExecution = (CmmnExecution) execution; return getCallableElement().getVersion(caseExecution); } protected String getDeploymentId(CmmnActivityExecution execution) { return getCallableElement().getDeploymentId(); } pro...
} protected boolean isDeploymentBinding() { return getCallableElement().isDeploymentBinding(); } protected boolean isVersionBinding() { return getCallableElement().isVersionBinding(); } protected boolean isVersionTagBinding() { return getCallableElement().isVersionTagBinding(); } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\cmmn\behavior\CallingTaskActivityBehavior.java
1
请完成以下Java代码
public void run(final String localTrxName) throws Exception { final PlainContextAware localCtx = PlainContextAware.newWithTrxName(ctx.getCtx(), localTrxName); final TableRecordReference reference = TableRecordReference.of(tableName, (int)ids[0]); final IDLMAware model = reference.getModel(localCtx, ...
model.setDLM_Level(IMigratorService.DLM_Level_LIVE); InterfaceWrapperHelper.save(model); unArchiveWorked.setValue(true); } }); return unArchiveWorked.getValue(); } catch (final Exception e) { throw AdempiereException.wrapIfNeeded(e); } } }
repos\metasfresh-new_dawn_uat\backend\de.metas.dlm\base\src\main\java\de\metas\dlm\po\UnArchiveRecordHandler.java
1
请完成以下Java代码
public BBANCodeEntryType getCodeType() { return codeType; } public void setCodeType(BBANCodeEntryType codeType) { this.codeType = codeType; } /** * Basic Bank Account Number Entry Types. */ public enum BBANCodeEntryType { bank_code, branch_code,
account_number, national_check_digit, account_type, owener_account_type, seqNo } public enum EntryCharacterType { n, // Digits (numeric characters 0 to 9 only) a, // Upper case letters (alphabetic characters A-Z only) c // upper and lower case alphanumeric characters (...
repos\metasfresh-new_dawn_uat\backend\de.metas.payment.sepa\base\src\main\java\de\metas\payment\sepa\wrapper\BBANStructureEntry.java
1
请完成以下Java代码
protected void writePlanItemDefinitionSpecificAttributes(Stage stage, XMLStreamWriter xtw) throws Exception { super.writePlanItemDefinitionSpecificAttributes(stage, xtw); if (StringUtils.isNotEmpty(stage.getFormKey())) { xtw.writeAttribute(FLOWABLE_EXTENSIONS_PREFIX, FLOWABLE_EXTENSIONS_NAME...
@Override protected void writePlanItemDefinitionBody(CmmnModel model, Stage stage, XMLStreamWriter xtw, CmmnXmlConverterOptions options) throws Exception { super.writePlanItemDefinitionBody(model, stage, xtw, options); for (PlanItem planItem : stage.getPlanItems()) { PlanItemExport.write...
repos\flowable-engine-main\modules\flowable-cmmn-converter\src\main\java\org\flowable\cmmn\converter\export\StageExport.java
1
请完成以下Java代码
public class X_T_BoilerPlate_Spool extends org.compiere.model.PO implements I_T_BoilerPlate_Spool, org.compiere.model.I_Persistent { /** * */ private static final long serialVersionUID = 317800812L; /** Standard Constructor */ public X_T_BoilerPlate_Spool (Properties ctx, int T_BoilerPlate_Spool_ID, St...
/** Get Process Instance. @return Instance of the process */ @Override public int getAD_PInstance_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_PInstance_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Message Text. @param MsgText Textual Informational, Menu or Error Me...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\letters\model\X_T_BoilerPlate_Spool.java
1
请完成以下Java代码
private void fillProcessDefinitionData(HistoricIdentityLinkLogEventEntity event, IdentityLink identityLink) { String processDefinitionId = identityLink.getProcessDefId(); if (processDefinitionId != null) { fillProcessDefinitionData(event, processDefinitionId); } else { event.setProcessDefinition...
String processDefinitionId = userOperationLogContextEntry.getProcessDefinitionId(); if (processDefinitionId != null) { fillProcessDefinitionData(event, processDefinitionId); } else { event.setProcessDefinitionId(userOperationLogContextEntry.getProcessDefinitionId()); event.setProcessDefinition...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\history\producer\DefaultHistoryEventProducer.java
1
请完成以下Java代码
private int getFixedWidth(final TableColumn column) { if (tableColumnFixedWidthCallback == null) { return -1; } return tableColumnFixedWidthCallback.getWidth(column); } /** * Class used to store column attributes when the column it is hidden. We need those informations to restore the column in case it ...
{ // i.e. we are in JTable constructor and modelRowSorter was not yet set // => do nothing } else if (!modelRowSorter.isEnabled()) { setupViewRowSorter(); } } private final void setupViewRowSorter() { final TableModel model = getModel(); viewRowSorter.setModel(model); if (modelRowSorter !=...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\swing\CTable.java
1
请完成以下Java代码
public Date getTokenDate() { return tokenDate; } public Date getTokenDateBefore() { return tokenDateBefore; } public Date getTokenDateAfter() { return tokenDateAfter; } public String getIpAddress() { return ipAddress; } public String getIpAddressLike()...
public String getUserId() { return userId; } public String getUserIdLike() { return userIdLike; } public String getTokenData() { return tokenData; } public String getTokenDataLike() { return tokenDataLike; } }
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\TokenQueryImpl.java
1
请完成以下Java代码
public void deleteNotificationTemplateById(TenantId tenantId, NotificationTemplateId id) { deleteEntity(tenantId, id, false); } @Override public void deleteEntity(TenantId tenantId, EntityId id, boolean force) { if (!force) { if (notificationRequestDao.existsByTenantIdAndStatusA...
@Override public void deleteNotificationTemplatesByTenantId(TenantId tenantId) { notificationTemplateDao.removeByTenantId(tenantId); } @Override public void deleteByTenantId(TenantId tenantId) { deleteNotificationTemplatesByTenantId(tenantId); } @Override public Optional<Ha...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\notification\DefaultNotificationTemplateService.java
1
请完成以下Java代码
public void setRetryAfterDays (java.math.BigDecimal RetryAfterDays) { set_Value (COLUMNNAME_RetryAfterDays, RetryAfterDays); } /** Get Creditpass-Prüfung wiederholen . @return Creditpass-Prüfung wiederholen */ @Override public java.math.BigDecimal getRetryAfterDays () { BigDecimal bd = (BigDecimal)get_...
public int getSeqNo () { Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo); if (ii == null) return 0; return ii.intValue(); } /** Set Reihenfolge. @param SeqNo Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst */ @Override public void setSeqNo (int SeqNo) { set_Value ...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.creditscore\creditpass\src\main\java-gen\de\metas\vertical\creditscore\creditpass\model\X_CS_Creditpass_Config.java
1
请完成以下Java代码
public class X_CM_AccessListBPGroup extends PO implements I_CM_AccessListBPGroup, I_Persistent { /** * */ private static final long serialVersionUID = 20090915L; /** Standard Constructor */ public X_CM_AccessListBPGroup (Properties ctx, int CM_AccessListBPGroup_ID, String trxName) { super (ct...
/** Set Business Partner Group. @param C_BP_Group_ID Business Partner Group */ public void setC_BP_Group_ID (int C_BP_Group_ID) { if (C_BP_Group_ID < 1) set_ValueNoCheck (COLUMNNAME_C_BP_Group_ID, null); else set_ValueNoCheck (COLUMNNAME_C_BP_Group_ID, Integer.valueOf(C_BP_Group_ID)); } /** Get...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_AccessListBPGroup.java
1
请在Spring Boot框架中完成以下Java代码
public class PaymentConditionsExtensionType { @XmlElement(name = "DiscountDuration") protected Object discountDuration; @XmlElement(name = "PaymentCondition") protected String paymentCondition; @XmlElement(name = "PaymentMeans") protected String paymentMeans; /** * Gets the value of t...
* {@link String } * */ public void setPaymentCondition(String value) { this.paymentCondition = value; } /** * Payment means coded. Please use EDIFACT code list values. (PAI 4461) * * @return * possible object is * {@link String } * ...
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\PaymentConditionsExtensionType.java
2
请完成以下Java代码
public Map<String, String> getContext() { userSession.assertLoggedIn(); final LinkedHashMap<String, String> map = new LinkedHashMap<>(); final Properties ctx = Env.getCtx(); final ArrayList<String> keys = new ArrayList<>(ctx.stringPropertyNames()); Collections.sort(keys); for (final String key : keys) ...
// logger.info("Sent a CacheInvalidateMultiRequest of {} events. So far we sent {} of {}. It took {}.", // buffer.size(), countEventsGenerated, eventsCount, stopwatch); buffer.clear(); } final int recordId = rs.getInt(1); buffer.add(CacheInvalidateRequest.rootRecord(tableName, recordId));...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\debug\DebugRestController.java
1
请在Spring Boot框架中完成以下Java代码
public Result save(@RequestBody Article article, @TokenToUser AdminUser loginUser) { if (article.getAddName()==null){ return ResultGenerator.genErrorResult(Constants.RESULT_CODE_PARAM_ERROR, "作者不能为空!"); } if (loginUser == null) { return ResultGenerator.genErrorResult(Cons...
} } /** * 删除 */ @RequestMapping(value = "/delete", method = RequestMethod.DELETE) public Result delete(@RequestBody Integer[] ids, @TokenToUser AdminUser loginUser) { if (loginUser == null) { return ResultGenerator.genErrorResult(Constants.RESULT_CODE_NOT_LOGIN, "未登录!"); ...
repos\spring-boot-projects-main\SpringBoot前后端分离实战项目源码\spring-boot-project-front-end&back-end\src\main\java\cn\lanqiao\springboot3\controller\ArticleController.java
2
请完成以下Java代码
public class PersonBuilder { private String jsonString; private SimpleDateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); public PersonBuilder(String jsonString) { this.jsonString = jsonString; } public Person build() throws IOException, ParseException { JsonReader reader ...
person.setLastName(jsonObject.getString("lastName")); person.setBirthdate(dateFormat.parse(jsonObject.getString("birthdate"))); JsonArray emailsJson = jsonObject.getJsonArray("emails"); List<String> emails = emailsJson.getValuesAs(JsonString.class).stream() .map(JsonString::getString...
repos\tutorials-master\web-modules\jee-7\src\main\java\com\baeldung\json\PersonBuilder.java
1
请完成以下Java代码
public class ReverseDraftIssues { private final transient IHandlingUnitsBL handlingUnitsBL = Services.get(IHandlingUnitsBL.class); private final transient IHUStatusBL huStatusBL = Services.get(IHUStatusBL.class); private final transient IHUPPOrderQtyDAO huPPOrderQtyDAO = Services.get(IHUPPOrderQtyDAO.class); privat...
handlingUnitsDAO.saveHU(huToIssue); // Delete PP_Order_ProductAttributes for issue candidate's HU ppOrderProductAttributeDAO.deleteForHU(candidate.getPP_Order_ID(), huToIssue.getM_HU_ID()); // // Delete the candidate huPPOrderQtyDAO.delete(candidate); // Make sure the HU is marked as source final HuId ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\pporder\api\impl\hu_pporder_issue_producer\ReverseDraftIssues.java
1
请在Spring Boot框架中完成以下Java代码
public String getContent() { return content; } public void setContent(String content) { this.content = content; } public UserEntity getCompanyEntity() { return companyEntity; } public void setCompanyEntity(UserEntity companyEntity) { this.companyEntity = compan...
"id='" + id + '\'' + ", prodName='" + prodName + '\'' + ", marketPrice='" + marketPrice + '\'' + ", shopPrice='" + shopPrice + '\'' + ", stock=" + stock + ", sales=" + sales + ", weight='" + weight + '\'' + "...
repos\SpringBoot-Dubbo-Docker-Jenkins-master\Gaoxi-Common-Service-Facade\src\main\java\com\gaoxi\entity\product\ProductEntity.java
2
请在Spring Boot框架中完成以下Java代码
public void updateLinesOnSchemaChanged(@NonNull final PhonecallSchemaVersionId phonecallSchemaVersionId) { final int phonecallSchemaTableId = getTableId(I_C_Phonecall_Schema.class); final PhonecallSchemaId phonecallSchemaId = phonecallSchemaVersionId.getPhonecallSchemaId(); final List<I_C_Phonecall_Schema_Versi...
} public void updateSchedulesOnSchemaChanged(@NonNull final PhonecallSchemaVersionId phonecallSchemaVersionId) { final PhonecallSchemaId phonecallSchemaId = phonecallSchemaVersionId.getPhonecallSchemaId(); final List<I_C_Phonecall_Schedule> schedulesWithDifferentSchema = retrieveSchedulesWithDifferentSchemas(ph...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\phonecall\service\PhonecallSchemaRepository.java
2
请完成以下Java代码
public void updateCurrencyRate(final I_GL_Journal glJournal) { // // Extract data from source Journal final CurrencyId currencyId = CurrencyId.ofRepoIdOrNull(glJournal.getC_Currency_ID()); if (currencyId == null) { // not set yet return; } final CurrencyConversionTypeId conversionTypeId = Currency...
dateAcct, conversionTypeId, adClientId, adOrgId) .map(CurrencyRate::getConversionRate) .orElse(BigDecimal.ZERO); } else { currencyRate = BigDecimal.ONE; } // glJournal.setCurrencyRate(currencyRate); } // Old/missing callouts // "GL_Journal";"C_Period_ID";"org.compiere.model....
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\acct\callout\GL_Journal.java
1
请在Spring Boot框架中完成以下Java代码
public Builder authnRequestsSigned(Boolean authnRequestsSigned) { this.authnRequestsSigned = authnRequestsSigned; return this; } /** * Apply this {@link Consumer} to further configure the Asserting Party metadata * @param assertingPartyMetadata The {@link Consumer} to apply * @return the {@link Buil...
if (this.singleLogoutServiceBindings.isEmpty()) { this.singleLogoutServiceBindings.add(Saml2MessageBinding.POST); } AssertingPartyMetadata party = this.assertingPartyMetadataBuilder.build(); return new RelyingPartyRegistration(this.registrationId, this.entityId, this.assertionConsumerServiceLocation,...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\registration\RelyingPartyRegistration.java
2
请在Spring Boot框架中完成以下Java代码
public static class Remoteip { /** * Internal proxies that are to be trusted. Can be set as a comma separate list of * CIDR or as a regular expression. */ private String internalProxies = "192.168.0.0/16, 172.16.0.0/12, 169.254.0.0/16, fc00::/7, " + "10.0.0.0/8, 100.64.0.0/10, 127.0.0.0/8, fe80::/10, ...
public String getHostHeader() { return this.hostHeader; } public void setHostHeader(String hostHeader) { this.hostHeader = hostHeader; } public void setProtocolHeaderHttpsValue(String protocolHeaderHttpsValue) { this.protocolHeaderHttpsValue = protocolHeaderHttpsValue; } public String getPortHea...
repos\spring-boot-4.0.1\module\spring-boot-tomcat\src\main\java\org\springframework\boot\tomcat\autoconfigure\TomcatServerProperties.java
2
请完成以下Java代码
protected void process(String deviceName, Consumer<T> onSuccess, Consumer<Throwable> onFailure) { ListenableFuture<T> deviceCtxFuture = onDeviceConnect(deviceName, DEFAULT_DEVICE_TYPE); process(deviceCtxFuture, onSuccess, onFailure); } @SneakyThrows protected <T> void process(ListenableFutu...
ack(msgId, pubAck); } } private void closeDeviceSession(String deviceName, MqttReasonCodes.Disconnect returnCode) { try { if (MqttVersion.MQTT_5.equals(deviceSessionCtx.getMqttVersion())) { MqttTransportAdaptor adaptor = deviceSessionCtx.getPayloadAdaptor(); ...
repos\thingsboard-master\common\transport\mqtt\src\main\java\org\thingsboard\server\transport\mqtt\session\AbstractGatewaySessionHandler.java
1
请完成以下Java代码
private void syncPriceEnteredOverrideToCandidate( @NonNull final NewManualInvoiceCandidateBuilder candidate, @NonNull final ProductId productId, @NonNull final JsonCreateInvoiceCandidatesRequestItem item) { final JsonPrice priceEnteredOverride = item.getPriceEnteredOverride(); final ProductPrice price = ...
final UomId priceUomId; try { priceUomId = uomDAO.getUomIdByX12DE355(uomCode); } catch (final AdempiereException e) { throw MissingResourceException.builder().resourceName("uom").resourceIdentifier("priceUomCode").parentResource(item).cause(e).build(); } return priceUomId; } private InvoiceCandid...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\invoicecandidates\impl\CreateInvoiceCandidatesService.java
1
请完成以下Java代码
public void setOrderConfirmed() { this.orderStatus = OrderStatus.CONFIRMED; } public void setOrderShipped() { this.orderStatus = OrderStatus.SHIPPED; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || g...
} Order that = (Order) o; return Objects.equals(orderId, that.orderId) && Objects.equals(products, that.products) && orderStatus == that.orderStatus; } @Override public int hashCode() { return Objects.hash(orderId, products, orderStatus); } @Override public String toStr...
repos\tutorials-master\patterns-modules\axon\src\main\java\com\baeldung\axon\coreapi\queries\Order.java
1
请完成以下Java代码
public class ScriptException extends RuntimeException { /** * */ private static final long serialVersionUID = 5438314907624287813L; private final String _message; private final Map<String, Object> params = new LinkedHashMap<String, Object>(); public ScriptException(final String message, final Throwable cause...
continue; } out.println(name + ":"); for (final Object item : list) { out.println("\t" + item); } } else { out.println(name + ": " + value); } } if (printStackTrace) { out.println("Stack trace: "); this.printStackTrace(out); } } public String toStringX() { ...
repos\metasfresh-new_dawn_uat\backend\de.metas.migration\de.metas.migration.base\src\main\java\de\metas\migration\exception\ScriptException.java
1
请完成以下Java代码
public EventSubscriptionQuery eventName(String eventName) { ensureNotNull("event name", eventName); this.eventName = eventName; return this; } public EventSubscriptionQueryImpl executionId(String executionId) { ensureNotNull("execution id", executionId); this.executionId = executionId; retu...
} //results ////////////////////////////////////////// @Override public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext .getEventSubscriptionManager() .findEventSubscriptionCountByQueryCriteria(this); } @Override public List<EventSubscription> ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\EventSubscriptionQueryImpl.java
1
请完成以下Java代码
public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext.getModelEntityManager().findModelCountByQueryCriteria(this); } public List<Model> executeList(CommandContext commandContext, Page page) { checkQueryOk(); return commandContext.getMode...
public String getDeploymentId() { return deploymentId; } public boolean isNotDeployed() { return notDeployed; } public boolean isDeployed() { return deployed; } public String getTenantId() { return tenantId; } public String getTenantIdLike() { ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\ModelQueryImpl.java
1
请完成以下Java代码
public List<String> shortcutFieldOrder() { return Collections.singletonList(NAME_KEY); } public GatewayFilter apply() { return apply((NameConfig) null); } @Override public GatewayFilter apply(@Nullable NameConfig config) { String defaultClientRegistrationId = (config == null) ? null : config.getName(); r...
if (clientRegistrationId == null && principal instanceof OAuth2AuthenticationToken) { clientRegistrationId = ((OAuth2AuthenticationToken) principal).getAuthorizedClientRegistrationId(); } return Mono.justOrEmpty(clientRegistrationId) .map(OAuth2AuthorizeRequest::withClientRegistrationId) .map(builder -> bu...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\TokenRelayGatewayFilterFactory.java
1
请完成以下Java代码
public long findTaskCountByQueryCriteria(TaskQueryImpl taskQuery) { return taskDataManager.findTaskCountByQueryCriteria(taskQuery); } @Override public List<Task> findTasksByNativeQuery(Map<String, Object> parameterMap, int firstResult, int maxResults) { return taskDataManager.findTasksByNat...
public void deleteTask(String taskId, String deleteReason, boolean cascade) { this.deleteTask(taskId, deleteReason, cascade, false); } @Override public void updateTaskTenantIdForDeployment(String deploymentId, String newTenantId) { taskDataManager.updateTaskTenantIdForDeployment(deploymentI...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\TaskEntityManagerImpl.java
1
请完成以下Java代码
public I_M_HU_Item_Storage retrieveItemStorage(final I_M_HU_Item huItem, @NonNull final ProductId productId) { return Services.get(IQueryBL.class).createQueryBuilder(I_M_HU_Item_Storage.class, huItem) .filter(new EqualsQueryFilter<I_M_HU_Item_Storage>(I_M_HU_Item_Storage.COLUMNNAME_M_HU_Item_ID, huItem.getM_HU_I...
{ huItemStorage.setM_HU_Item(huItem); } return huItemStorages; } @Override public void save(final I_M_HU_Item_Storage storageLine) { InterfaceWrapperHelper.save(storageLine); } @Override public void save(final I_M_HU_Item item) { InterfaceWrapperHelper.save(item); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\storage\impl\HUStorageDAO.java
1
请完成以下Java代码
public String getInstrForDbtrAgt() { return instrForDbtrAgt; } /** * Sets the value of the instrForDbtrAgt property. * * @param value * allowed object is * {@link String } * */ public void setInstrForDbtrAgt(String value) { this.instrForDbtrA...
* </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link RegulatoryReporting3 } * * */ public List<RegulatoryReporting3> getRgltryRptg() { if (rgltryRptg == null) { rgltryRptg = new ArrayList<RegulatoryReporting3>(); ...
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\CreditTransferTransactionInformation10CH.java
1
请完成以下Java代码
public void deleteCustomersByTenantId(TenantId tenantId) { log.trace("Executing deleteCustomersByTenantId, tenantId [{}]", tenantId); Validator.validateId(tenantId, id -> "Incorrect tenantId " + id); customersByTenantRemover.removeEntities(tenantId, tenantId); } @Override public Lis...
} }; @Override public Optional<HasId<?>> findEntity(TenantId tenantId, EntityId entityId) { return Optional.ofNullable(findCustomerById(tenantId, new CustomerId(entityId.getId()))); } @Override public FluentFuture<Optional<HasId<?>>> findEntityAsync(TenantId tenantId, EntityId ...
repos\thingsboard-master\dao\src\main\java\org\thingsboard\server\dao\customer\CustomerServiceImpl.java
1
请完成以下Java代码
public List<FormValue> getFormValues() { return formValues; } public void setFormValues(List<FormValue> formValues) { this.formValues = formValues; } public FormProperty clone() { FormProperty clone = new FormProperty(); clone.setValues(this); return clone; ...
setExpression(otherProperty.getExpression()); setVariable(otherProperty.getVariable()); setType(otherProperty.getType()); setDefaultExpression(otherProperty.getDefaultExpression()); setDatePattern(otherProperty.getDatePattern()); setReadable(otherProperty.isReadable()); s...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\FormProperty.java
1
请完成以下Java代码
public void inactivate(final I_M_DeliveryDay deliveryDay, final String trxName) { Check.assumeNotNull(deliveryDay, "deliveryDay not null"); deliveryDay.setIsActive(false); InterfaceWrapperHelper.save(deliveryDay, trxName); } @Override public void invalidate(final I_M_DeliveryDay deliveryDay) { Check.assum...
@NonNull final ZonedDateTime datePromised, @NonNull final BPartnerLocationId bpartnerLocationId) { LocalDate preparationDay = datePromised.toLocalDate(); // // Create Delivery Day Query Parameters final PlainDeliveryDayQueryParams deliveryDayQueryParams = new PlainDeliveryDayQueryParams(); deliveryDayQue...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\tourplanning\api\impl\DeliveryDayBL.java
1
请完成以下Java代码
private CallOrderDetailData buildCallOrderData(@NonNull final CallOrderSummaryId callOrderSummaryId, @NonNull final I_C_InvoiceLine invoiceLine) { final Quantity qtyInvoiced = invoiceLineBL.getQtyInvoicedStockUOM(InterfaceWrapperHelper.create(invoiceLine, de.metas.adempiere.model.I_C_InvoiceLine.class)); return C...
.orderLineId(OrderLineId.ofRepoId(ol.getC_OrderLine_ID())) .qtyEntered(qtyEntered) .build(); } @NonNull private CallOrderDetailData buildCallOrderData(@NonNull final CallOrderSummaryId summaryId, @NonNull final I_M_InOutLine shipmentLine) { return CallOrderDetailData .builder() .summaryId(summary...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\callorder\detail\CallOrderDetailService.java
1
请完成以下Java代码
public ActiveOrHistoricCurrencyAndAmount getTaxAmt() { return taxAmt; } /** * Sets the value of the taxAmt property. * * @param value * allowed object is * {@link ActiveOrHistoricCurrencyAndAmount } * */ public void setTaxAmt(ActiveOrHistoricCurrency...
} return this.adjstmntAmtAndRsn; } /** * Gets the value of the rmtdAmt property. * * @return * possible object is * {@link ActiveOrHistoricCurrencyAndAmount } * */ public ActiveOrHistoricCurrencyAndAmount getRmtdAmt() { return rmtdAmt; } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.camt53\src\main\java-xjc\de\metas\banking\camt53\jaxb\camt053_001_02\RemittanceAmount1.java
1
请完成以下Java代码
public void setQtyItemCapacity (final @Nullable BigDecimal QtyItemCapacity) { set_Value (COLUMNNAME_QtyItemCapacity, QtyItemCapacity); } @Override public BigDecimal getQtyItemCapacity() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_QtyItemCapacity); return bd != null ? bd : BigDecimal.ZERO; } ...
public void setUPC_CU (final @Nullable java.lang.String UPC_CU) { set_Value (COLUMNNAME_UPC_CU, UPC_CU); } @Override public java.lang.String getUPC_CU() { return get_ValueAsString(COLUMNNAME_UPC_CU); } @Override public void setUPC_TU (final @Nullable java.lang.String UPC_TU) { set_Value (COLUMNNAME_UP...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java-gen\de\metas\esb\edi\model\X_EDI_DesadvLine.java
1
请完成以下Java代码
public void setStatusToolTip(final String tip) { statusLine.setToolTipText(tip); } // setStatusToolTip /** * Set Status DB Info * * @param text text * @param dse data status event */ @Override public void setStatusDB(final String text, final DataStatusEvent dse) { // log.info( "StatusBar.setStatu...
*/ public void setStatusDB(final int no) { setStatusDB(String.valueOf(no), null); } // setStatusDB /** * Set Info Line * * @param text text */ @Override public void setInfo(final String text) { infoLine.setVisible(true); infoLine.setText(text); } // setInfo /** * Show {@link RecordInfo} dia...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\apps\StatusBar.java
1
请完成以下Java代码
public void fromAnnotation(ExternalTaskSubscription config) { setAutoOpen(config.autoOpen()); String topicName = config.topicName(); setTopicName(isNull(topicName) ? null : topicName); long lockDuration = config.lockDuration(); setLockDuration(isNull(lockDuration) ? null : lockDuration); Stri...
setTenantIdIn(isNull(tenantIdIn) ? null : Arrays.asList(tenantIdIn)); setIncludeExtensionProperties(config.includeExtensionProperties()); } protected static boolean isNull(String[] values) { return values.length == 1 && STRING_NULL_VALUE.equals(values[0]); } protected static boolean isNull(String val...
repos\camunda-bpm-platform-master\spring-boot-starter\starter-client\spring\src\main\java\org\camunda\bpm\client\spring\impl\subscription\SubscriptionConfiguration.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult deleteBatch(@RequestParam("ids") List<Long> ids) { int count = brandService.deleteBrand(ids); if (count > 0) { return CommonResult.success(count); } else { return CommonResult.failed(); } } @ApiOperation(value = "批量更新显示状态") @Reques...
} else { return CommonResult.failed(); } } @ApiOperation(value = "批量更新厂家制造商状态") @RequestMapping(value = "/update/factoryStatus", method = RequestMethod.POST) @ResponseBody public CommonResult updateFactoryStatus(@RequestParam("ids") List<Long> ids, ...
repos\mall-master\mall-admin\src\main\java\com\macro\mall\controller\PmsBrandController.java
2
请在Spring Boot框架中完成以下Java代码
public void updateData(RpUserBankAccount rpUserBankAccount) { rpUserBankAccountDao.update(rpUserBankAccount); } /** * 根据用户编号获取银行账户 */ @Override public RpUserBankAccount getByUserNo(String userNo){ Map<String, Object> paramMap = new HashMap<String, Object>(); paramMap.put("userNo", userNo); paramMap.put...
}else{ bankAccount.setEditTime(new Date()); bankAccount.setAreas(rpUserBankAccount.getAreas()); bankAccount.setBankAccountName(rpUserBankAccount.getBankAccountName()); bankAccount.setBankAccountNo(rpUserBankAccount.getBankAccountNo()); bankAccount.setBankAccountType(rpUserBankAccount.getBankAccountType()...
repos\roncoo-pay-master\roncoo-pay-service\src\main\java\com\roncoo\pay\user\service\impl\RpUserBankAccountServiceImpl.java
2
请完成以下Java代码
public void debugPerformOperationStep(String stepName) { logDebug( "041", "Performing deployment operation step '{}'", stepName); } public void debugSuccessfullyPerformedOperationStep(String stepName) { logDebug( "041", "Successfully performed deployment operation step '{}'"...
"'{} is not a valid Camunda Platform configuration resource location.", bpmPlatformFileLocation), e); } public void camundaBpmPlatformSuccessfullyStarted(String serverInfo) { logInfo( "048", "Camunda Platform sucessfully started at '{}'.", serverInfo); } public void camundaBpmPlatformStopp...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\container\impl\ContainerIntegrationLogger.java
1
请完成以下Java代码
public Set<String> getNamespaceSet() { return namespaceSet; } public ClusterServerStateVO setNamespaceSet(Set<String> namespaceSet) { this.namespaceSet = namespaceSet; return this; } public Integer getPort() { return port; } public ClusterServerStateVO setPort(...
public ClusterServerStateVO setEmbedded(Boolean embedded) { this.embedded = embedded; return this; } @Override public String toString() { return "ClusterServerStateVO{" + "appName='" + appName + '\'' + ", transport=" + transport + ", flow=" + flow...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\cluster\state\ClusterServerStateVO.java
1
请完成以下Java代码
public void run() { releaseAll(); } private void releaseAll() { IOException exceptionChain = null; exceptionChain = releaseInflators(exceptionChain); exceptionChain = releaseInputStreams(exceptionChain); exceptionChain = releaseZipContent(exceptionChain); exceptionChain = releaseZipContentForManifest(exc...
this.zipContent = null; } } return exceptionChain; } private IOException releaseZipContentForManifest(IOException exceptionChain) { ZipContent zipContentForManifest = this.zipContentForManifest; if (zipContentForManifest != null) { try { zipContentForManifest.close(); } catch (IOException ex)...
repos\spring-boot-4.0.1\loader\spring-boot-loader\src\main\java\org\springframework\boot\loader\jar\NestedJarFileResources.java
1
请完成以下Java代码
public void setRecord_ID (final int Record_ID) { if (Record_ID < 0) set_Value (COLUMNNAME_Record_ID, null); else set_Value (COLUMNNAME_Record_ID, Record_ID); } @Override public int getRecord_ID() { return get_ValueAsInt(COLUMNNAME_Record_ID); } @Override public de.metas.handlingunits.model.I_M_...
{ return get_ValueAsInt(COLUMNNAME_ReversalLine_ID); } @Override public de.metas.handlingunits.model.I_M_HU_Item getVHU_Item() { return get_ValueAsPO(COLUMNNAME_VHU_Item_ID, de.metas.handlingunits.model.I_M_HU_Item.class); } @Override public void setVHU_Item(final de.metas.handlingunits.model.I_M_HU_Item V...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java-gen\de\metas\handlingunits\model\X_M_HU_Trx_Line.java
1
请在Spring Boot框架中完成以下Java代码
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ShippingFulfillment shippingFulfillment = (ShippingFulfillment)o; return Objects.equals(this.fulfillmentId, shippingFulfillment.fulfillmentId) && Objects.equals(thi...
sb.append("class ShippingFulfillment {\n"); sb.append(" fulfillmentId: ").append(toIndentedString(fulfillmentId)).append("\n"); sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n"); sb.append(" shipmentTrackingNumber: ").append(toIndentedString(shipmentTrackingNumber)).append("\n");...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-ebay\ebay-api-client\src\main\java\de\metas\camel\externalsystems\ebay\api\model\ShippingFulfillment.java
2
请完成以下Java代码
public static class Builder { private final PathPatternParser parser; Builder(PathPatternParser parser) { this.parser = parser; } /** * Match messages having this destination pattern. * * <p> * Path patterns always start with a slash and may contain placeholders. They can * also be followed...
* descendents, capturing the value of the subdirectory in * {@link MessageAuthorizationContext#getVariables()}</li> * </ul> * * <p> * A more comprehensive list can be found at {@link PathPattern}. * * <p> * A dot-based message pattern is also supported when configuring a * {@link PathPatternP...
repos\spring-security-main\messaging\src\main\java\org\springframework\security\messaging\util\matcher\PathPatternMessageMatcher.java
1
请在Spring Boot框架中完成以下Java代码
private void copyDiscountSchemaBreakWithProductId( @NonNull final PricingConditionsBreakId discountSchemaBreakId, @NonNull final PricingConditionsId toPricingConditionsId, @Nullable final ProductId toProductId) { final I_M_DiscountSchemaBreak from = getPricingConditionsBreakbyId(discountSchemaBreakId); f...
final Set<ProductId> distinctProductsForSelection = retrieveDistinctProductIdsForSelection(selectionFilter); if (distinctProductsForSelection.isEmpty()) { return null; } if (distinctProductsForSelection.size() > 1) { throw new AdempiereException("Multiple products or none in the selected rows") ....
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\service\impl\PricingConditionsRepository.java
2
请完成以下Java代码
public IAllocationResult createAllocationResult() { final List<IHUTransactionAttribute> attributeTrxs = getAndClearTransactions(); if (attributeTrxs.isEmpty()) { // no transactions, nothing to do return AllocationUtils.nullResult(); } return AllocationUtils.createQtyAllocationResult( BigDecimal.ZE...
final IAllocationResult result = createAllocationResult(); Services.get(IHUTrxBL.class).createTrx(huContext, result); return result; } @Override public void dispose() { // Unregister the listener/collector if (attributeStorageFactory != null && trxAttributesCollector != null) { trxAttributesCollector...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\attribute\impl\HUTransactionAttributeBuilder.java
1
请完成以下Java代码
public FlowableHttpClient determineHttpClient() { if (httpClient != null) { return httpClient; } else if (isApacheHttpComponentsPresent) { // Backwards compatibility, if apache HTTP Components is present then it has priority this.httpClient = new ApacheHttpComponentsF...
} public boolean isDefaultParallelInSameTransaction() { return defaultParallelInSameTransaction; } public void setDefaultParallelInSameTransaction(boolean defaultParallelInSameTransaction) { this.defaultParallelInSameTransaction = defaultParallelInSameTransaction; } public void cl...
repos\flowable-engine-main\modules\flowable-http-common\src\main\java\org\flowable\http\common\impl\HttpClientConfig.java
1
请在Spring Boot框架中完成以下Java代码
public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } ...
} public void setVersion(int version) { this.version = version; } public List<FormField> getFields() { return fields; } public void setFields(List<FormField> fields) { this.fields = fields; } public List<FormOutcome> getOutcomes() { return outcomes; } ...
repos\flowable-engine-main\modules\flowable-cmmn-rest\src\main\java\org\flowable\cmmn\rest\service\api\FormModelResponse.java
2
请完成以下Java代码
public HistoricActivityInstanceQuery orderByActivityId() { orderBy(HistoricActivityInstanceQueryProperty.ACTIVITY_ID); return this; } public HistoricActivityInstanceQueryImpl orderByActivityName() { orderBy(HistoricActivityInstanceQueryProperty.ACTIVITY_NAME); return this; }...
return activityType; } public String getAssignee() { return assignee; } public boolean isFinished() { return finished; } public boolean isUnfinished() { return unfinished; } public String getActivityInstanceId() { return activityInstanceId; } ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\HistoricActivityInstanceQueryImpl.java
1
请完成以下Java代码
public org.compiere.model.I_C_Period getC_Period() { return get_ValueAsPO(COLUMNNAME_C_Period_ID, org.compiere.model.I_C_Period.class); } @Override public void setC_Period(final org.compiere.model.I_C_Period C_Period) { set_ValueFromPO(COLUMNNAME_C_Period_ID, org.compiere.model.I_C_Period.class, C_Period); }...
/** * ExportType AD_Reference_ID=541172 * Reference name: DatevExportType */ public static final int EXPORTTYPE_AD_Reference_ID=541172; /** Payment = Payment */ public static final String EXPORTTYPE_Payment = "Payment"; /** Commission Invoice = CommissionInvoice */ public static final String EXPORTTYPE_Comm...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_DatevAcctExport.java
1
请完成以下Java代码
protected int get_AccessLevel() { return accessLevel.intValue(); } /** Load Meta Data */ protected POInfo initPO (Properties ctx) { POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); return poi; } public String toString() { StringBuffer sb = new Strin...
*/ public void setDescription (String Description) { set_Value (COLUMNNAME_Description, Description); } /** Get Description. @return Optional short description of the record */ public String getDescription () { return (String)get_Value(COLUMNNAME_Description); } /** Set Name. @param Name Alphan...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Cycle.java
1
请在Spring Boot框架中完成以下Java代码
public class SysPermission implements Serializable { @Id @GeneratedValue private Integer id; private String name; @Column(columnDefinition="enum('menu','button')") private String resourceType; // [menu|button] private String url; private String permission; // menu example:role:*,butt...
public String getPermission() { return permission; } public void setPermission(String permission) { this.permission = permission; } public Long getParentId() { return parentId; } public void setParentId(Long parentId) { this.parentId = parentId; } publ...
repos\springboot-demo-master\shiro\src\main\java\com\et\shiro\entity\SysPermission.java
2
请完成以下Java代码
public class OrderOffer extends CalloutEngine { public String setOfferValidDays (final ICalloutField calloutField) { I_C_Order order = calloutField.getModel(I_C_Order.class); setOfferValidDate(order); return ""; } private static void setOfferValidDate(I_C_Order order) { if (order.isProcessed()) return...
private static boolean isOffer(final I_C_Order order) { DocTypeId docTypeId = DocTypeId.ofRepoIdOrNull(order.getC_DocType_ID()); if (docTypeId == null) { docTypeId = DocTypeId.ofRepoIdOrNull(order.getC_DocTypeTarget_ID()); } if (docTypeId == null) { return false; } return Services.get(IDocTypeBL...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\callout\OrderOffer.java
1
请完成以下Java代码
final class DataEntryRecordsMap { public static DataEntryRecordsMap of(@NonNull final Collection<DataEntryRecord> records) { if (records.isEmpty()) { return EMPTY; } return new DataEntryRecordsMap(records); } private static final DataEntryRecordsMap EMPTY = new DataEntryRecordsMap(); private final Im...
} private DataEntryRecordsMap() { map = ImmutableMap.of(); } public Set<DataEntrySubTabId> getSubTabIds() { return map.keySet(); } public Optional<DataEntryRecord> getBySubTabId(final DataEntrySubTabId id) { final DataEntryRecord record = map.get(id); return Optional.ofNullable(record); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\dataentry\impl\DataEntryRecordsMap.java
1
请完成以下Java代码
private LookupValuesList getLookupValuesList(final Evaluatee parentEvaluatee) { return cacheByPartition.getOrLoad( createLookupDataSourceContext(parentEvaluatee), evalCtx -> fetcher.retrieveEntities(evalCtx).getValues()); } @NonNull private LookupDataSourceContext createLookupDataSourceContext(final Eval...
final ImmutableList<Object> idsNormalized = LookupValue.normalizeIds(ids, fetcher.isNumericKey()); if (idsNormalized.isEmpty()) { return LookupValuesList.EMPTY; } final LookupValuesList partition = getLookupValuesList(Evaluatees.empty()); return partition.getByIdsInOrder(idsNormalized); } @Override p...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\model\lookup\FullyCachedLookupDataSource.java
1
请在Spring Boot框架中完成以下Java代码
public List<String> getMappingFileNames() { return mappingFileNames; } @Override public List<URL> getJarFileUrls() { return Collections.emptyList(); } @Override public URL getPersistenceUnitRootUrl() { return null; } @Override public List<String> getMana...
} public Properties getProperties() { return properties; } @Override public String getPersistenceXMLSchemaVersion() { return JPA_VERSION; } @Override public ClassLoader getClassLoader() { return Thread.currentThread().getContextClassLoader(); } @Overri...
repos\tutorials-master\patterns-modules\design-patterns-architectural\src\main\java\com\baeldung\daopattern\config\PersistenceUnitInfoImpl.java
2
请完成以下Java代码
public void addOrQuery(HistoricTaskInstanceQueryImpl orQuery) { orQuery.isOrQueryActive = true; this.queries.add(orQuery); } public void setOrQueryActive() { isOrQueryActive = true; } @Override public HistoricTaskInstanceQuery or() { if (this != queries.get(0)) { throw new ProcessEngin...
orQuery.isOrQueryActive = true; orQuery.queries = queries; queries.add(orQuery); return orQuery; } @Override public HistoricTaskInstanceQuery endOr() { if (!queries.isEmpty() && this != queries.get(queries.size()-1)) { throw new ProcessEngineException("Invalid query usage: cannot set endOr(...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\HistoricTaskInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isDynamic() { return true; } public void fetchAlarmCount() { alarmCountInvocationAttempts++; log.trace("[{}] Fetching alarms: {}", cmdId, alarmCountInvocationAttempts); if (alarmCountInvocationAttempts <= maxAlarmQueriesPerRefreshInterval) { int newCou...
} private void createAlarmSubscriptionForEntity(EntityId entityId) { int subIdx = sessionRef.getSessionSubIdSeq().incrementAndGet(); subToEntityIdMap.put(subIdx, entityId); log.trace("[{}][{}][{}] Creating alarms subscription for [{}] ", serviceId, cmdId, subIdx, entityId); TbAlarms...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\subscription\TbAlarmCountSubCtx.java
2
请完成以下Java代码
public void infoJobExecutorDoesNotHandleHistoryCleanupJobs(ProcessEngineConfigurationImpl config) { logInfo("029", "JobExecutor is configured for priority range {}-{}. History cleanup jobs will not be handled, because they are outside the priority range ({}).", config.getJobExecutorPriorityRangeMin(...
logDebug("036", "Available job execution threads for the process engine '{}' : {}", processEngine, numAvailableThreads); } public void currentJobExecutions(String processEngine, int numExecutions) { logDebug("037", "Jobs currently in execution for the process engine '{}' : {}", processEngine, numExecut...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\JobExecutorLogger.java
1
请完成以下Java代码
public PageDescriptor createNext() { return PageDescriptor.builder() .selectionUid(pageIdentifier.getSelectionUid()) .pageUid(UIDStringUtil.createNext()) .offset(offset + pageSize) .pageSize(pageSize) .totalSize(totalSize) .selectionTime(selectionTime) .build(); } @Builder private Pag...
} public PageDescriptor withSize(final int adjustedSize) { if (pageSize == adjustedSize) { return this; } return PageDescriptor.builder() .selectionUid(pageIdentifier.getSelectionUid()) .pageUid(pageIdentifier.getPageUid()) .offset(offset) .pageSize(adjustedSize) .totalSize(totalSize) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dao\selection\pagination\PageDescriptor.java
1
请完成以下Java代码
public void setBPartnerData(@NonNull final I_C_Invoice_Candidate ic) { final I_C_Commission_Share commissionShareRecord = getCommissionShareRecord(ic); final SOTrx soTrx = SOTrx.ofBoolean(commissionShareRecord.isSOTrx()); ic.setBill_BPartner_ID(soTrx.isSales() ? commissionShareRecord.getC_BPartner_Pa...
{ // note that SOTrx is about the share record's settlement. // I.e. if the sales-rep receives money from the commission, then it's a purchase order trx return CommissionConstants.CommissionDocType.COMMISSION; } else if (shareRecord.getC_LicenseFeeSettingsLine_ID() > 0) { return CommissionConstants.Co...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\commission\invoicecandidate\CommissionShareHandler.java
1
请完成以下Java代码
public class X_MSV3_BestellungAntwort extends org.compiere.model.PO implements I_MSV3_BestellungAntwort, org.compiere.model.I_Persistent { /** * */ private static final long serialVersionUID = -2094677833L; /** Standard Constructor */ public X_MSV3_BestellungAntwort (Properties ctx, int MSV3_Bestellung...
} /** Set Id. @param MSV3_Id Id */ @Override public void setMSV3_Id (java.lang.String MSV3_Id) { set_Value (COLUMNNAME_MSV3_Id, MSV3_Id); } /** Get Id. @return Id */ @Override public java.lang.String getMSV3_Id () { return (java.lang.String)get_Value(COLUMNNAME_MSV3_Id); } /** Set NachtBetrie...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma.vendor.gateway.msv3\src\main\java-gen\de\metas\vertical\pharma\vendor\gateway\msv3\model\X_MSV3_BestellungAntwort.java
1
请在Spring Boot框架中完成以下Java代码
public int getPort() { return port; } public void setPort(int port) { this.port = port; } public String getIp() { return ip; } public void setIp(String ip) { this.ip = ip; } public String getZkServers() { return zkServers;
} public void setZkServers(String zkServers) { this.zkServers = zkServers; } public List<String> getDestination() { return destination; } public void setDestination(List<String> destination) { this.destination = destination; } }
repos\spring-boot-leaning-master\2.x_data\3-3 使用 canal 将业务数据从 Mysql 同步到 MongoDB\spring-boot-canal-mongodb\src\main\java\com\neo\canal\config\CanalProperties.java
2
请完成以下Java代码
public boolean equalsByPriceRelevantFields(@NonNull final PricingConditionsBreak reference) { if (this == reference) { return true; } return Objects.equals(priceSpecification, reference.priceSpecification) && Objects.equals(coalesce(discount, Percent.ZERO), coalesce(reference.discount, Percent.ZERO)) ...
} public PricingConditionsBreak toTemporaryPricingConditionsBreakIfPriceRelevantFieldsChanged(@NonNull final PricingConditionsBreak reference) { if (isTemporaryPricingConditionsBreak()) { return this; } if (equalsByPriceRelevantFields(reference)) { return this; } return toTemporaryPricingCondit...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\conditions\PricingConditionsBreak.java
1
请完成以下Java代码
public class HitPolicyOutputOrder extends AbstractHitPolicy implements ComposeDecisionResultBehavior { public HitPolicyOutputOrder() { super(true); } @Override public String getHitPolicyName() { return HitPolicy.OUTPUT_ORDER.getValue(); } @Override public void composeDecis...
// sort on predefined list(s) of output values ruleResults.sort((o1, o2) -> { CompareToBuilder compareToBuilder = new CompareToBuilder(); for (Map.Entry<String, List<Object>> entry : executionContext.getOutputValues().entrySet()) { List<Object> outputValues = entry.getVal...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\hitpolicy\HitPolicyOutputOrder.java
1
请完成以下Java代码
public class SendTaskValidator extends ExternalInvocationTaskValidator { @Override protected void executeValidation(BpmnModel bpmnModel, Process process, List<ValidationError> errors) { List<SendTask> sendTasks = process.findFlowElementsOfType(SendTask.class); for (SendTask sendTask : sendTasks...
List<ValidationError> errors ) { if ( ImplementationType.IMPLEMENTATION_TYPE_WEBSERVICE.equalsIgnoreCase(sendTask.getImplementationType()) && StringUtils.isNotEmpty(sendTask.getOperationRef()) ) { boolean operationFound = false; if (bpmnModel.getInterf...
repos\Activiti-develop\activiti-core\activiti-process-validation\src\main\java\org\activiti\validation\validator\impl\SendTaskValidator.java
1
请完成以下Java代码
public boolean isMatching(@NonNull final CampaignPrice price) { if (!ProductId.equals(price.getProductId(), getProductId())) { return false; } if (price.getBpartnerId() != null && !BPartnerId.equals(price.getBpartnerId(), getBpartnerId())) { return false; } if (price.getBpGroupId() != null && !BP...
if (!CountryId.equals(price.getCountryId(), getCountryId())) { return false; } if (!CurrencyId.equals(price.getCurrencyId(), getCurrencyId())) { return false; } if (!price.getValidRange().contains(getDate())) { return false; } return true; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\rules\campaign_price\CampaignPriceQuery.java
1
请完成以下Spring Boot application配置
spring.application.name=chapter74 elasticjob.reg-center.server-lists=localhost:2181 elasticjob.reg-center.namespace=${spring.application.name} elasticjob.jobs.my-simple-job.elastic-job-class=com.didispace.chapter74.MySimpleJob e
lasticjob.jobs.my-simple-job.cron=0/5 * * * * ? elasticjob.jobs.my-simple-job.sharding-total-count=1
repos\SpringBoot-Learning-master\2.x\chapter7-4\src\main\resources\application.properties
2
请完成以下Java代码
boolean isReadLockAvailable() { return readLock.tryLock(); } public static void main(String[] args) throws InterruptedException { final int threadCount = 3; final ExecutorService service = Executors.newFixedThreadPool(threadCount); SynchronizedHashMapWithRWLock object = new Syn...
} } } private static class Writer implements Runnable { SynchronizedHashMapWithRWLock object; public Writer(SynchronizedHashMapWithRWLock object) { this.object = object; } @Override public void run() { for (int i = 0; i < 10; i++) { ...
repos\tutorials-master\core-java-modules\core-java-concurrency-advanced\src\main\java\com\baeldung\concurrent\locks\SynchronizedHashMapWithRWLock.java
1
请完成以下Java代码
private DhlCustomsItem toDhlCustomsItem(@NonNull final PackageItem packageItem) { final ProductId productId = packageItem.getProductId(); final I_M_Product product = productDAO.getById(productId); final BigDecimal weightInKg = computeNominalGrossWeightInKg(packageItem).orElse(BigDecimal.ZERO); Quantity package...
.weightInKg(weightInKg) .packagedQuantity(packagedQuantity.intValueExact()) .itemValue(Amount.of(orderLine.getPriceEntered(), currencyCode)) .build(); } private Optional<BigDecimal> computeNominalGrossWeightInKg(final PackageItem packageItem) { final ProductId productId = packageItem.getProductId(); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.dhl\src\main\java\de\metas\shipper\gateway\dhl\DhlDeliveryOrderService.java
1
请完成以下Java代码
public static PickingJobCandidateProducts newInstance() {return new PickingJobCandidateProducts(ImmutableMap.of());} public static PickingJobCandidateProducts ofList(final List<PickingJobCandidateProduct> list) { return new PickingJobCandidateProducts(Maps.uniqueIndex(list, PickingJobCandidateProduct::getProductId...
.map(updater) .collect(ImmutableMap.toImmutableMap(PickingJobCandidateProduct::getProductId, product -> product)); return Objects.equals(this.byProductId, byProductIdNew) ? this : new PickingJobCandidateProducts(byProductIdNew); } @Nullable public ProductId getSingleProductIdOrNull() { return sing...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJobCandidateProducts.java
1
请完成以下Java代码
public Mono<Account> findById(long id) { return Mono.from(connectionFactory.create()) .flatMap(c -> Mono.from(c.createStatement("select id,iban,balance from Account where id = $1") .bind("$1", id) .execute()) .doFinally((st) -> close(c))) .map(result -> ...
.bind("$1", account.getIban()) .bind("$2", account.getBalance()) .returnGeneratedValues("id") .execute())) .map(result -> result.map((row, meta) -> new Account(row.get("id", Long.class), account.getIban(), account...
repos\tutorials-master\persistence-modules\r2dbc\src\main\java\com\baeldung\examples\r2dbc\ReactiveAccountDao.java
1
请完成以下Java代码
public KotlinPropertyDeclaration emptyValue() { return new KotlinPropertyDeclaration(this); } /** * Sets the given value. * @param valueCode the code for the value * @return the property declaration */ public KotlinPropertyDeclaration value(CodeBlock valueCode) { this.valueCode = valueCode; ...
return this; } /** * Sets the body. * @param code the code for the body * @return this for method chaining */ public AccessorBuilder<?> withBody(CodeBlock code) { this.code = code; return this; } /** * Builds the accessor. * @return the parent getter / setter */ public T buildAc...
repos\initializr-main\initializr-generator\src\main\java\io\spring\initializr\generator\language\kotlin\KotlinPropertyDeclaration.java
1
请在Spring Boot框架中完成以下Java代码
public ConfigDataResource getResource() { return this.resource; } /** * Return the original location that was resolved to determine the resource. * @return the location or {@code null} if no location is available */ public @Nullable ConfigDataLocation getLocation() { return this.location; } @Override ...
* Throw a {@link ConfigDataNotFoundException} if the specified {@link Path} does not * exist. * @param resource the config data resource * @param pathToCheck the path to check */ public static void throwIfDoesNotExist(ConfigDataResource resource, Path pathToCheck) { throwIfNot(resource, Files.exists(pathToCh...
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\context\config\ConfigDataResourceNotFoundException.java
2
请完成以下Java代码
public Object getInstance() { return instance; } public void setInstance(Object instance) { this.instance = instance; } /** * Return the script info, if present. * <p> * ScriptInfo must be populated, when {@code <executionListener type="script" ...>} e.g. when * imp...
} @Override public FlowableListener clone() { FlowableListener clone = new FlowableListener(); clone.setValues(this); return clone; } public void setValues(FlowableListener otherListener) { super.setValues(otherListener); setEvent(otherListener.getEvent()); ...
repos\flowable-engine-main\modules\flowable-bpmn-model\src\main\java\org\flowable\bpmn\model\FlowableListener.java
1
请完成以下Java代码
public void deleteWithRelatedData() { delete(); } // getters //////////////////////////////////////////// @Override public String getId() { return id; } public Set<String> getIds() { return ids; } public String getDecisionDefinitionId() { return decisi...
public String getScopeType() { return scopeType; } public boolean isWithoutScopeType() { return withoutScopeType; } public String getProcessInstanceIdWithChildren() { return processInstanceIdWithChildren; } public String getCaseInstanceIdWithChildren() { return...
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\HistoricDecisionExecutionQueryImpl.java
1
请完成以下Java代码
public Object execute(CommandContext commandContext) { AttachmentEntity attachment = commandContext.getAttachmentEntityManager().findById(attachmentId); String processInstanceId = attachment.getProcessInstanceId(); String processDefinitionId = null; if (attachment.getProcessInstanceId()...
attachment.getProcessInstanceId(), attachment.getName(), false ); } if (commandContext.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) { commandContext .getProcessEngineConfiguration() ...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\cmd\DeleteAttachmentCmd.java
1
请完成以下Java代码
public void afterChange(final I_DD_Order_Candidate record) { final DDOrderCandidateData data = toDDOrderCandidateData(record); final UserId userId = UserId.ofRepoId(record.getUpdatedBy()); materialEventService.enqueueEventAfterNextCommit(DDOrderCandidateUpdatedEvent.of(data, userId)); } @ModelChange(timings =...
materialEventService.enqueueEventAfterNextCommit(DDOrderCandidateDeletedEvent.of(data, userId)); } private DDOrderCandidateData toDDOrderCandidateData(final I_DD_Order_Candidate record) { final DDOrderCandidate candidate = DDOrderCandidateRepository.fromRecord(record); return candidate.toDDOrderCandidateData()...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddordercandidate\material_dispo\interceptor\DD_Order_Candidate.java
1
请完成以下Java代码
public POSPayment changingStatusToSuccessful() { if (paymentProcessingStatus == POSPaymentProcessingStatus.SUCCESSFUL) { return this; } return toBuilder().paymentProcessingStatus(POSPaymentProcessingStatus.SUCCESSFUL).build(); } public POSPayment changingStatusToDeleted() { if (isDeleted()) { re...
public POSPayment withCashTenderedAmount(@NonNull final BigDecimal cashTenderedAmountBD) { paymentMethod.assertCash(); Check.assume(cashTenderedAmountBD.signum() > 0, "Cash Tendered Amount must be positive"); final Money cashTenderedAmountNew = Money.of(cashTenderedAmountBD, this.cashTenderedAmount.getCurrencyI...
repos\metasfresh-new_dawn_uat\backend\de.metas.pos.base\src\main\java\de\metas\pos\POSPayment.java
1
请完成以下Java代码
private static String formatDateCell(final Object value, final DateTimeFormatter dateFormatter) { if (value == null) { return null; } else if (value instanceof java.util.Date) { final java.util.Date date = (java.util.Date)value; return dateFormatter.format(TimeUtil.asLocalDate(date)); } else if ...
{ throw new AdempiereException("Cannot convert/format value to Date: " + value + " (" + value.getClass() + ")"); } } private static String formatNumberCell(final Object value, final ThreadLocalDecimalFormatter numberFormatter) { if (value == null) { return null; } return numberFormatter.format(valu...
repos\metasfresh-new_dawn_uat\backend\de.metas.datev\src\main\java\de\metas\datev\DATEVCsvExporter.java
1