instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public List<I_AD_UI_Section> getUISections(final AdTabId adTabId) { // Generate the UI elements if needed if (!adTabId2sections.containsKey(adTabId)) { final WindowUIElementsGenerator generator = WindowUIElementsGenerator.forConsumer(this); final I_AD_Tab adTab = Services.get(IADWindowDAO.class).getTabByI...
logger.debug("Generated in memory {} for {}", uiElement, parent); elementGroup2elements.put(parent, uiElement); } @Override public List<I_AD_UI_Element> getUIElements(final I_AD_UI_ElementGroup uiElementGroup) { return elementGroup2elements.get(uiElementGroup); } @Override public List<I_AD_UI_Element> getU...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\factory\standard\InMemoryUIElementsProvider.java
1
请完成以下Java代码
private static MessageDigest getSha512Digest() { try { return MessageDigest.getInstance("SHA-512"); } catch (NoSuchAlgorithmException ex) { throw new RuntimeException(ex.getMessage()); } } /** * Calculates the SHA digest and returns the value as a <code>byte[]</code>. * @param data Data to digest ...
* @param data Data to digest * @return SHA digest as a hex string */ public static String shaHex(byte[] data) { return new String(Hex.encode(sha(data))); } /** * Calculates the SHA digest and returns the value as a hex string. * @param data Data to digest * @return SHA digest as a hex string */ publi...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\token\Sha512DigestUtils.java
1
请完成以下Java代码
public ServerResponse render(String name, Map<String, ?> model) { return new GatewayRenderingResponseBuilder(name).status(this.statusCode) .headers(headers -> headers.putAll(this.headers)) .cookies(cookies -> cookies.addAll(this.cookies)) .modelAttributes(model) .build(); } @Override public ServerResp...
WriteFunctionResponse(HttpStatusCode statusCode, HttpHeaders headers, MultiValueMap<String, Cookie> cookies, WriteFunction writeFunction) { super(statusCode, headers, cookies); Objects.requireNonNull(writeFunction, "WriteFunction must not be null"); this.writeFunction = writeFunction; } @Override p...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webmvc\src\main\java\org\springframework\cloud\gateway\server\mvc\handler\GatewayServerResponseBuilder.java
1
请完成以下Java代码
public void setDataEntry_TargetWindow(final org.compiere.model.I_AD_Window DataEntry_TargetWindow) { set_ValueFromPO(COLUMNNAME_DataEntry_TargetWindow_ID, org.compiere.model.I_AD_Window.class, DataEntry_TargetWindow); } @Override public void setDataEntry_TargetWindow_ID (final int DataEntry_TargetWindow_ID) { ...
public void setSeqNo (final int SeqNo) { set_Value (COLUMNNAME_SeqNo, SeqNo); } @Override public int getSeqNo() { return get_ValueAsInt(COLUMNNAME_SeqNo); } @Override public void setTabName (final java.lang.String TabName) { set_Value (COLUMNNAME_TabName, TabName); } @Override public java.lang.Str...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\de\metas\dataentry\model\X_DataEntry_Tab.java
1
请完成以下Java代码
public class MapDeserializer implements JsonDeserializer<Map<String, Object>> { @Override public Map<String, Object> deserialize(JsonElement elem, Type type, JsonDeserializationContext context) throws JsonParseException { return elem.getAsJsonObject() .entrySet() .stream() ...
return i; } else if ((l = toLong(bigDec)) != null) { return l; } else { return bigDec.doubleValue(); } } } private Long toLong(BigDecimal val) { try { return val.toBigIntegerExact().longValue(); } catch (Ari...
repos\tutorials-master\json-modules\gson\src\main\java\com\baeldung\gson\serialization\MapDeserializer.java
1
请完成以下Java代码
public ResponseEntity<UserDTO> updateUser(@Valid @RequestBody UserDTO userDTO) { log.debug("REST request to update User : {}", userDTO); Optional<User> existingUser = userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()); if (existingUser.isPresent() && (!existingUser.get().getId().equals(...
@GetMapping("/users/{login:" + Constants.LOGIN_REGEX + "}") public ResponseEntity<UserDTO> getUser(@PathVariable String login) { log.debug("REST request to get User : {}", login); return ResponseUtil.wrapOrNotFound( userService.getUserWithAuthoritiesByLogin(login) .map(Us...
repos\tutorials-master\jhipster-6\bookstore-monolith\src\main\java\com\baeldung\jhipster6\web\rest\UserResource.java
1
请完成以下Java代码
public org.compiere.model.I_C_BP_Group getC_BP_Group_Match() { return get_ValueAsPO(COLUMNNAME_C_BP_Group_Match_ID, org.compiere.model.I_C_BP_Group.class); } @Override public void setC_BP_Group_Match(final org.compiere.model.I_C_BP_Group C_BP_Group_Match) { set_ValueFromPO(COLUMNNAME_C_BP_Group_Match_ID, org....
} @Override public void setC_LicenseFeeSettingsLine_ID (final int C_LicenseFeeSettingsLine_ID) { if (C_LicenseFeeSettingsLine_ID < 1) set_ValueNoCheck (COLUMNNAME_C_LicenseFeeSettingsLine_ID, null); else set_ValueNoCheck (COLUMNNAME_C_LicenseFeeSettingsLine_ID, C_LicenseFeeSettingsLine_ID); } @Overri...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java-gen\de\metas\contracts\commission\model\X_C_LicenseFeeSettingsLine.java
1
请完成以下Java代码
public static LookupValuesPage ofValuesAndHasMoreFlag(@NonNull final List<LookupValue> values, boolean hasMoreRecords) { return ofValuesAndHasMoreFlag(LookupValuesList.fromCollection(values), hasMoreRecords); } public static LookupValuesPage ofValuesAndHasMoreFlag(@NonNull final LookupValuesList values, boolean h...
.build(); } public static LookupValuesPage ofNullable(@Nullable final LookupValue lookupValue) { if (lookupValue == null) { return EMPTY; } return allValues(LookupValuesList.fromNullable(lookupValue)); } public <T> T transform(@NonNull final Function<LookupValuesPage, T> transformation) { return t...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\LookupValuesPage.java
1
请完成以下Java代码
public class RegistrationForm { @NotBlank(groups = BasicInfo.class) private String firstName; @NotBlank(groups = BasicInfo.class) private String lastName; @Email(groups = BasicInfo.class) private String email; @NotBlank(groups = BasicInfo.class) private String phone; @NotBlank(group...
public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public...
repos\tutorials-master\javaxval\src\main\java\com\baeldung\javaxval\validationgroup\RegistrationForm.java
1
请完成以下Java代码
public void beforeSave_M_HU_PI_Item_Product(final I_M_HU_PI_Item_Product itemProduct) { updateItemProduct(itemProduct); setUOMItemProduct(itemProduct); Services.get(IHUPIItemProductBL.class).setNameAndDescription(itemProduct); // Validate the item product only if is saved. validateItemProduct(itemProduct)...
itemProduct.setM_Product_ID(-1); itemProduct.setIsInfiniteCapacity(true); } } private void setUOMItemProduct(final I_M_HU_PI_Item_Product huPiItemProduct) { final ProductId productId = ProductId.ofRepoIdOrNull(huPiItemProduct.getM_Product_ID()); if (productId == null) { // nothing to do return; }...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\model\validator\M_HU_PI_Item_Product.java
1
请在Spring Boot框架中完成以下Java代码
public String getId() { return id; } /** * Sets the value of the id property. * * @param value * allowed object is * {@link String } * */ public void setId(String value) { this.id = value; } /** * Gets the value of the codeQuali...
*/ public String getInternalId() { return internalId; } /** * Sets the value of the internalId property. * * @param value * allowed object is * {@link String } * */ public void setInternalId(String value) { this.internalId = value; } ...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\messaging\header\SenderType.java
2
请完成以下Java代码
private static List<String> getColumnHeaders() { return ImmutableList.of( I_M_HU_Trace.COLUMNNAME_LotNumber, I_M_HU_Trace.COLUMNNAME_HUTraceType, I_M_HU_Trace.COLUMNNAME_M_Product_ID, I_M_HU_Trace.COLUMNNAME_M_InOut_ID, I_M_HU_Trace.COLUMNNAME_PP_Order_ID, I_M_HU_Trace.COLUMNNAME_M_Inventory_...
"Finished_Product_UOM", "Finished_Product_Lot", "Vendor_Lot", "Finished_Product_Mhd", "Finished_Product_Clearance", "Customer_Vendor_No", "Customer_Vendor", "ShipmentQty", "Shipment_Note", "Shipment_Date", "Prod_Stock", "TraceId", "ReportDate" ); } }
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\trace\process\M_HU_Trace_Report_Excel.java
1
请完成以下Java代码
private final void markSkipped(final I_PMM_QtyReport_Event event, final I_PMM_PurchaseCandidate candidate, final String errorMsg) { event.setErrorMsg(errorMsg); InterfaceWrapperHelper.save(event); if (errorMsg != null) { Loggables.addLog("Event " + event + " skipped: " + errorMsg); } countSkipped.incre...
static PMMBalanceChangeEvent createPMMBalanceChangeEvent(final I_PMM_QtyReport_Event qtyReportEvent) { final BigDecimal qtyPromisedDiff = qtyReportEvent.getQtyPromised().subtract(qtyReportEvent.getQtyPromised_Old()); final BigDecimal qtyPromisedTUDiff = qtyReportEvent.getQtyPromised_TU().subtract(qtyReportEvent.ge...
repos\metasfresh-new_dawn_uat\backend\de.metas.procurement.base\src\main\java\de\metas\procurement\base\event\impl\PMMQtyReportEventTrxItemProcessor.java
1
请完成以下Java代码
public File locatePom(File projectDirectory) { File pomFile = new File(projectDirectory, JSON_POM); if (!pomFile.exists()) { pomFile = new File(projectDirectory, XML_POM); } return pomFile; } @Override public Model read(InputStream input, Map<String, ?> options) ...
public Model read(Reader reader, Map<String, ?> options) throws IOException, ModelParseException { FileModelSource source = (options != null) ? (FileModelSource) options.get(SOURCE) : null; if (source != null && source.getLocation().endsWith(JSON_EXT)) { Model model = objectMapper.readValue(...
repos\tutorials-master\maven-modules\maven-polyglot\maven-polyglot-json-extension\src\main\java\com\demo\polyglot\CustomModelProcessor.java
1
请完成以下Java代码
public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Name */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set URL. @param URL Full URL address - e.g. http://www.adempiere.org */ @Ov...
@Override public java.lang.String getURL () { return (java.lang.String)get_Value(COLUMNNAME_URL); } /** Set Suchschlüssel. @param Value Suchschlüssel für den Eintrag im erforderlichen Format - muss eindeutig sein */ @Override public void setValue (java.lang.String Value) { set_Value (COLUMNNAME_Value...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\impex\model\X_AD_InputDataSource.java
1
请完成以下Java代码
public class StatsActor extends ContextAwareActor { public StatsActor(ActorSystemContext context) { super(context); } @Override protected boolean doProcess(TbActorMsg msg) { log.debug("Received message: {}", msg); if (msg.getMsgType().equals(MsgType.STATS_PERSIST_MSG)) { ...
); } private JsonNode toBodyJson(String serviceId, long messagesProcessed, long errorsOccurred) { return JacksonUtil.newObjectNode().put("server", serviceId).put("messagesProcessed", messagesProcessed).put("errorsOccurred", errorsOccurred); } public static class ActorCreator extends ContextBas...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\actors\stats\StatsActor.java
1
请完成以下Java代码
private void setIsExportedShipmentToCustomsInvoice(@NonNull final CustomsInvoice customsInvoice) { customsInvoice .getLines() .stream() .forEach(line -> setIsExportedShipmentToCustomsInvoiceLine(line)); } private void setIsExportedShipmentToCustomsInvoiceLine(@NonNull final CustomsInvoiceLine customs...
final ProductPrice inoutLinePrice = getInOutLinePriceConverted(inOutAndLineId, currencyId); final Quantity inoutLineQtyInPriceUOM = uomConversionBL.convertQuantityTo(inoutLineQty, UOMConversionContext.of(customsInvoiceLineForProduct.getProductId()), inoutLinePrice.getUomId()); newAlloc = CustomsInvoiceLineAlloc....
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\customs\CustomsInvoiceService.java
1
请完成以下Java代码
public class XmlIntrospectionUtil { private static final String SCHEMA_LOCATION = "schemaLocation"; public static String extractXsdValueOrNull(@NonNull final byte[] xmlInput) { return extractXsdValueOrNull(new ByteArrayInputStream(xmlInput)); } /** * Extracts the XSD schema name; For the sake of performance,...
} return null; // only checked the first element } } return null; } catch (final XMLStreamException e) { throw new XsdValueExtractionFailedException(e); } } public static class XsdValueExtractionFailedException extends RuntimeException { private static final long serialVersionUID = 84569...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\de\metas\util\xml\XmlIntrospectionUtil.java
1
请完成以下Java代码
public class TextEditorContextMenuAction extends AbstractContextMenuAction { private Boolean scriptEditor = null; public boolean isScriptEditor() { if (scriptEditor != null) { return scriptEditor; } final VEditor editor = getEditor(); if (editor == null) { return false; } final GridField gr...
else { return false; } } @Override public boolean isRunnable() { return true; } @Override public void run() { final VEditor editor = getEditor(); final GridField gridField = editor.getField(); final Object value = editor.getValue(); final String text = value == null ? null : value.toString()...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\ed\menu\TextEditorContextMenuAction.java
1
请在Spring Boot框架中完成以下Java代码
public String getNextServiceDate() { return nextServiceDate; } public void setNextServiceDate(String nextServiceDate) { this.nextServiceDate = nextServiceDate; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o....
@Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class DeviceToCreateMaintenances {\n"); sb.append(" maintenanceCode: ").append(toIndentedString(maintenanceCode)).append("\n"); sb.append(" maintenanceInterval: ").append(toIndentedString(maintenanceInte...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\alberta-article-api\src\main\java\io\swagger\client\model\DeviceToCreateMaintenances.java
2
请完成以下Java代码
public class UserDao { SessionFactory sessionFactory; public UserDao() { this(null); } @Inject public UserDao(SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } public Object add(User user) { Session session = sessionFactory.openSession(); ...
session.getTransaction().commit(); return Id; } public User findByEmail(String email) { Session session = sessionFactory.openSession(); session.beginTransaction(); Criteria criteria = session.createCriteria(User.class); criteria.add(Restrictions.eq("email", email)); ...
repos\tutorials-master\web-modules\vraptor\src\main\java\com\baeldung\daos\UserDao.java
1
请完成以下Java代码
public String getModus() { if (modus == null) { return "production"; } else { return modus; } } /** * Sets the value of the modus property. * * @param value * allowed object is * {@link String } * */ public voi...
*/ public Long getValidationStatus() { return validationStatus; } /** * Sets the value of the validationStatus property. * * @param value * allowed object is * {@link Long } * */ public void setValidationStatus(Long value) { this.validati...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\RequestType.java
1
请完成以下Java代码
default String getNonce() { return this.getClaimAsString(IdTokenClaimNames.NONCE); } /** * Returns the Authentication Context Class Reference {@code (acr)}. * @return the Authentication Context Class Reference */ default String getAuthenticationContextClass() { return this.getClaimAsString(IdTokenClaimNam...
} /** * Returns the Access Token hash value {@code (at_hash)}. * @return the Access Token hash value */ default String getAccessTokenHash() { return this.getClaimAsString(IdTokenClaimNames.AT_HASH); } /** * Returns the Authorization Code hash value {@code (c_hash)}. * @return the Authorization Code ha...
repos\spring-security-main\oauth2\oauth2-core\src\main\java\org\springframework\security\oauth2\core\oidc\IdTokenClaimAccessor.java
1
请完成以下Java代码
private void logRequest(final MTLinkRequest request, final String msgSuffix) { logger.debug(request + msgSuffix); // log the request Loggables.addLog(request.getModel() + msgSuffix); // don't be too verbose in the user/admin output; keep it readable. } @Override public boolean unlinkModelFromMaterialTrackings(...
boolean atLeastOneUnlinked = false; for (final I_M_Material_Tracking_Ref exitingRef : existingRefs) { if (exitingRef.getM_Material_Tracking_ID() != materialTracking.getM_Material_Tracking_ID()) { continue; } unlinkModelFromMaterialTracking(model, exitingRef); atLeastOneUnlinked = true; } return...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\impl\MaterialTrackingBL.java
1
请完成以下Java代码
public FacetCollectorRequestBuilder<ModelType> includeFacetCategory(final IFacetCategory facetCategory) { facetCategoryIncludesExcludes.include(facetCategory); return this; } /** * Advice to NOT collect facets from given exclude facet categories, even if they were added to include list. * * @param facetC...
{ return false; } // Only categories which have "eager refresh" set (if asked) if (onlyEagerRefreshCategories && !facetCategory.isEagerRefresh()) { return false; } // accept the facet category return true; } /** * Collect facets only for categories which have {@link IFacetCategory#isEagerRefr...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\facet\FacetCollectorRequestBuilder.java
1
请完成以下Java代码
public DmnTypeDefinition getTypeDefinition() { return typeDefinition; } public void setTypeDefinition(DmnTypeDefinition typeDefinition) { this.typeDefinition = typeDefinition; } public String getExpressionLanguage() { return expressionLanguage; } public void setExpressionLanguage(String expre...
"id='" + id + '\'' + ", name='" + name + '\'' + ", typeDefinition=" + typeDefinition + ", expressionLanguage='" + expressionLanguage + '\'' + ", expression='" + expression + '\'' + '}'; } public void cacheCompiledScript(CompiledScript compiledScript) { this.cachedCompiledScript = ...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\DmnExpressionImpl.java
1
请完成以下Java代码
public void setProxyPort (int ProxyPort) { set_Value (COLUMNNAME_ProxyPort, Integer.valueOf(ProxyPort)); } /** Get Proxy port. @return Port of your proxy server */ @Override public int getProxyPort () { Integer ii = (Integer)get_Value(COLUMNNAME_ProxyPort); if (ii == null) return 0; return ii.i...
} /** Get User ID. @return User ID or account number */ @Override public java.lang.String getUserID () { return (java.lang.String)get_Value(COLUMNNAME_UserID); } /** Set Vendor ID. @param VendorID Vendor ID for the Payment Processor */ @Override public void setVendorID (java.lang.String Vendor...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PaymentProcessor.java
1
请完成以下Java代码
static DataFetcherExceptionResolverAdapter forSingleError( BiFunction<Throwable, DataFetchingEnvironment, GraphQLError> resolver) { return new DataFetcherExceptionResolverAdapter() { @Override protected GraphQLError resolveToSingleError(Throwable ex, DataFetchingEnvironment env) { return resolver.apply...
* {@link graphql.execution.ExecutionStrategy}'s. Applications may also use * this method to create an exception handler when they to need to initialize * a custom {@code ExecutionStrategy}. * <p>Resolvers are invoked in turn until one resolves the exception by * emitting a (possibly empty) {@code GraphQLError} ...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\execution\DataFetcherExceptionResolver.java
1
请完成以下Java代码
public void setRecord (int AD_Table_ID, int Record_ID) { setAD_Table_ID(AD_Table_ID); setRecord_ID(Record_ID); } // setRecord public void setRecord (final TableRecordReference record) { if(record != null) { setRecord(record.getAD_Table_ID(), record.getRecord_ID()); } else { setRecord(-1, -1); ...
/** * String Representation * @return info */ @Override public String toString() { StringBuffer sb = new StringBuffer ("MNote[") .append(get_ID()).append(",AD_Message_ID=").append(getAD_Message_ID()) .append(",").append(getReference()) .append(",Processed=").append(isProcessed()) .append("]"); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MNote.java
1
请完成以下Java代码
public VPanelFormFieldBuilder setAutocomplete(boolean autocomplete) { this.autocomplete = autocomplete; return this; } private int getAD_Column_ID() { // not set is allowed return AD_Column_ID; } /** * @param AD_Column_ID Column for lookups. */ public VPanelFormFieldBuilder setAD_Column_ID(int AD_C...
this.editorListener = listener; return this; } public VPanelFormFieldBuilder setBindEditorToModel(boolean bindEditorToModel) { this.bindEditorToModel = bindEditorToModel; return this; } public VPanelFormFieldBuilder setReadOnly(boolean readOnly) { this.readOnly = readOnly; return this; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\compiere\grid\VPanelFormFieldBuilder.java
1
请完成以下Java代码
public void setC_BPartner_ID (int C_BPartner_ID) { if (C_BPartner_ID < 1) set_Value (COLUMNNAME_C_BPartner_ID, null); else set_Value (COLUMNNAME_C_BPartner_ID, Integer.valueOf(C_BPartner_ID)); } /** Get Geschäftspartner. @return Bezeichnet einen Geschäftspartner */ @Override public int getC_BPart...
} @Override public void setManufacturer(org.compiere.model.I_C_BPartner Manufacturer) { set_ValueFromPO(COLUMNNAME_Manufacturer_ID, org.compiere.model.I_C_BPartner.class, Manufacturer); } /** Set Hersteller. @param Manufacturer_ID Hersteller des Produktes */ @Override public void setManufacturer_ID (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_BannedManufacturer.java
1
请完成以下Java代码
public class WebLogAspect { @Around("execution(public * com..controller.*.*(..))") public Object doAround(ProceedingJoinPoint pjp) throws Throwable { //获取当前请求对象 ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); HttpServletReque...
* 根据方法和传入的参数获取请求参数 */ private Object getParameter(Method method, Object[] args) { List<Object> argList = new ArrayList<>(); Parameter[] parameters = method.getParameters(); for (int i = 0; i < parameters.length; i++) { //将RequestBody注解修饰的参数作为请求参数 RequestBody requ...
repos\spring-boot-quick-master\quick-platform-component\src\main\java\com\quick\component\config\logAspect\WebLogAspect.java
1
请完成以下Java代码
public static Object convertToDisplayType(final String value, final String columnName, final int displayType) { // true NULL if (value == null || value.isEmpty()) { return null; } // see also MTable.readData try { // // Handle hardcoded cases // IDs & Integer & CreatedBy/UpdatedBy if (!Ch...
} return null; } /** * Delegates to {@link StringUtils#toBoolean(Object, Boolean)}. */ @Nullable public static Boolean toBoolean(@Nullable final Object value, @Nullable final Boolean defaultValue) { return StringUtils.toBoolean(value, defaultValue); } @NonNull public static Boolean toBooleanNonNull(@N...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\util\DisplayType.java
1
请完成以下Java代码
public class Declarables { private final Collection<Declarable> declarables; public Declarables(Declarable... declarables) { if (!ObjectUtils.isEmpty(declarables)) { this.declarables = new ArrayList<>(declarables.length); this.declarables.addAll(Arrays.asList(declarables)); } else { this.declarables ...
/** * Return the elements that are instances of the provided class. * @param <T> The type. * @param type the type's class. * @return the filtered list. * @since 2.2 */ public <T extends Declarable> List<T> getDeclarablesByType(Class<? extends T> type) { return this.declarables.stream() .filter(type::...
repos\spring-amqp-main\spring-amqp\src\main\java\org\springframework\amqp\core\Declarables.java
1
请完成以下Java代码
public static ContextPath ofJson(@NonNull String json) { return new ContextPath( SPLITTER.splitToList(json) .stream() .map(ContextPathElement::ofJson) .collect(ImmutableList.toImmutableList()) ); } public static ContextPath root(@NonNull final DocumentEntityDescriptor entityDescriptor) { ...
public AdWindowId getAdWindowId() { return AdWindowId.ofRepoId(elements.get(0).getId()); } @Override public int compareTo(@NonNull final ContextPath other) { return toJson().compareTo(other.toJson()); } } @Value class ContextPathElement { @NonNull String name; int id; @JsonCreator public static Context...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\health\ContextPath.java
1
请完成以下Java代码
public void validate(ValidatingMigrationInstruction instruction, final ValidatingMigrationInstructions instructions, MigrationInstructionValidationReportImpl report) { ActivityImpl targetActivity = instruction.getTargetActivity(); FlowScopeWalker flowScopeWalker = new FlowScopeWalker(targetActivity.getFl...
protected ScopeImpl firstMiBody; @Override public void visit(ScopeImpl obj) { if (firstMiBody == null && obj != null && isMiBody(obj)) { firstMiBody = obj; } } protected boolean isMiBody(ScopeImpl scope) { return scope.getActivityBehavior() instanceof MultiInstanceActivityBeh...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\migration\validation\instruction\CannotAddMultiInstanceBodyValidator.java
1
请完成以下Java代码
public static boolean checkContainment(Geometry point, Geometry polygon) { boolean isInside = polygon.contains(point); log.info("Is the point inside polygon? {}", isInside); return isInside; } public static boolean checkIntersect(Geometry rectangle1, Geometry rectangle2) { boole...
log.info("Union Result: {}", union); return union; } public static Geometry getDifference(Geometry base, Geometry cut) { Geometry result = base.difference(cut); log.info("Resulting Geometry: {}", result); return result; } public static Geometry validateAndRepair(Geometr...
repos\tutorials-master\jts\src\main\java\com\baeldung\jts\operations\JTSOperationUtils.java
1
请在Spring Boot框架中完成以下Java代码
public class RedisHttpSessionConfiguration extends AbstractRedisHttpSessionConfiguration<RedisSessionRepository> implements EmbeddedValueResolverAware, ImportAware { private StringValueResolver embeddedValueResolver; private SessionIdGenerator sessionIdGenerator = UuidSessionIdGenerator.getInstance(); @Bean @O...
Map<String, Object> attributeMap = importMetadata .getAnnotationAttributes(EnableRedisHttpSession.class.getName()); AnnotationAttributes attributes = AnnotationAttributes.fromMap(attributeMap); if (attributes == null) { return; } setMaxInactiveInterval(Duration.ofSeconds(attributes.<Integer>getNumber("max...
repos\spring-session-main\spring-session-data-redis\src\main\java\org\springframework\session\data\redis\config\annotation\web\http\RedisHttpSessionConfiguration.java
2
请完成以下Java代码
public void sendError(int sc) throws IOException { appendSameSiteIfMissing(); super.sendError(sc); } @Override public void sendError(int sc, String msg) throws IOException { appendSameSiteIfMissing(); super.sendError(sc, msg); } @Override public void sendRedirect(String...
public ServletOutputStream getOutputStream() throws IOException { appendSameSiteIfMissing(); return super.getOutputStream(); } protected void appendSameSiteIfMissing() { Collection<String> cookieHeaders = response.getHeaders(CookieConstants.SET_COOKIE_HEADER_NAME); boolean firstHeader =...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\filter\SessionCookieFilter.java
1
请完成以下Java代码
private void invoiceNew (MRequest request) { m_invoice = new MInvoice (getCtx(), 0, get_TrxName()); m_invoice.setIsSOTrx(true); I_C_BPartner partner = Services.get(IBPartnerDAO.class).getById(request.getC_BPartner_ID()); m_invoice.setBPartner(partner); m_invoice.save(); m_linecount = 0; } // invoice...
// if (updates[i].getC_InvoiceLine_ID() > 0) // continue; MInvoiceLine il = new MInvoiceLine(m_invoice); m_linecount++; il.setLine(m_linecount*10); // il.setQty(qty); // Product int M_Product_ID = updates[i].getM_ProductSpent_ID(); if (M_Product_ID == 0) M_Product_ID = p_M_Product_ID;...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\process\RequestInvoice.java
1
请完成以下Java代码
public String getDepartment() { return department; } /** * Sets the value of the department property. * * @param value * allowed object is * {@link String } * */ public void setDepartment(String value) { this.department = value; } /*...
/** * Gets the value of the telecom property. * * @return * possible object is * {@link TelecomAddressType } * */ public TelecomAddressType getTelecom() { return telecom; } /** * Sets the value of the telecom property. * * @param valu...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_440_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_440\request\CompanyType.java
1
请完成以下Java代码
public void setGreaterThanAlphabetic(boolean greaterThanAlphabetic) { this.greaterThanAlphabetic = greaterThanAlphabetic; } public boolean isGreaterThanOrEqual() { return greaterThanOrEqual; } public void setGreaterThanOrEqual(boolean greaterThanOrEqual) { this.greaterThanOrEqu...
} public void setNotAlphabetic(boolean notAlphabetic) { this.notAlphabetic = notAlphabetic; } @Override public String toString() { return "SpelRelational{" + "equal=" + equal + ", equalAlphabetic=" + equalAlphabetic + ", notEqual=" + notE...
repos\tutorials-master\spring-spel\src\main\java\com\baeldung\spring\spel\examples\SpelRelational.java
1
请完成以下Java代码
public void setDefault() { } // setDefault // ----------------------------------------------------- @Override public ColorUIResource getFocusColor() { return getPrimary2(); } @Override public ColorUIResource getPrimaryControlShadow() { return getPrimary3(); } @Override public ColorUIResource getMen...
{ return new ColorUIResource(220, 241, 203); } @Override public void addCustomEntriesToTable(final UIDefaults table) { super.addCustomEntriesToTable(table); final Object[] uiDefaults = { "ScrollBar.thumbHighlight", getPrimaryControlHighlight(), PlasticScrollBarUI.MAX_BUMPS_WIDTH_KEY, new Integer(22...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\adempiere\plaf\AdempiereTheme.java
1
请完成以下Java代码
protected String getCleanVersion(String versionString) { Matcher matcher = CLEAN_VERSION_REGEX.matcher(versionString); if (!matcher.find()) { throw new FlowableException("Illegal format for version: " + versionString); } String cleanString = matcher.group(); try { ...
protected ProcessEngineConfigurationImpl getProcessEngineConfiguration() { return CommandContextUtil.getProcessEngineConfiguration(); } @Override protected String getResourcesRootDirectory() { return "org/flowable/db/"; } @Override public String getContext() { retur...
repos\flowable-engine-main\modules\flowable-engine\src\main\java\org\flowable\engine\impl\db\ProcessDbSchemaManager.java
1
请完成以下Java代码
public LookupDataSourceContext.Builder newContextForFetchingList() { return prepareNewContext() .requiresParameters(dependsOnContextVariables) .requiresFilterAndLimit(); } private LookupDataSourceContext.Builder prepareNewContext() { return LookupDataSourceContext.builder(CONTEXT_LookupTableName); } ...
} @Override public SqlForFetchingLookupById getSqlForFetchingLookupByIdExpression() { if (attributeValuesProvider instanceof DefaultAttributeValuesProvider) { final DefaultAttributeValuesProvider defaultAttributeValuesProvider = (DefaultAttributeValuesProvider)attributeValuesProvider; final AttributeId at...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pattribute\ASILookupDescriptor.java
1
请完成以下Java代码
public long getId() { return id; } public void setId(long id) { this.id = id; } public String getCreate_datetime() { return create_datetime; } public void setCreate_datetime(String create_datetime) { this.create_datetime = create_datetime; } public St...
public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getSex() { return sex; } public void setSex(String sex) { this.sex = sex; } public String getZone() { return zone; } pu...
repos\SpringBoot-vue-master\src\main\java\com\boylegu\springboot_vue\entities\Persons.java
1
请完成以下Java代码
protected mxRectangle apply(TreeNode node, mxRectangle bounds) { mxRectangle g = graph.getModel().getGeometry(node.cell); if (node.cell != null && g != null) { if (isVertexMovable(node.cell)) { g = setVertexLocation(node.cell, node.x, node.y); } if (...
*/ protected Polygon contour = new Polygon(); /** * */ public TreeNode(Object cell) { this.cell = cell; } } /** * */ protected static class Polygon { /** * */ protected Polyline lowerHead, lowerTail,...
repos\Activiti-develop\activiti-core\activiti-bpmn-layout\src\main\java\org\activiti\bpmn\BPMNLayout.java
1
请完成以下Java代码
public void addReview(Review review) { this.reviews.add(review); review.setBook(this); } public void removeReview(Review review) { review.setBook(null); this.reviews.remove(review); } public void removeReviews() { Iterator<Review> iterator = this.reviews.iterato...
public void setReviews(List<Review> reviews) { this.reviews = reviews; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootPropertyExpressions\src\main\java\com\bookstore\entity\Book.java
1
请在Spring Boot框架中完成以下Java代码
public String getMessageAcknowledgementCode() { return messageAcknowledgementCode; } /** * Sets the value of the messageAcknowledgementCode property. * * @param value * allowed object is * {@link String } * */ public void setMessageAcknowledgementCod...
* {@link String } * */ public String getFunctionalGroupAcknowledgementCode() { return functionalGroupAcknowledgementCode; } /** * Sets the value of the functionalGroupAcknowledgementCode property. * * @param value * allowed object is * {@link Str...
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\CONTRLExtensionType.java
2
请在Spring Boot框架中完成以下Java代码
public SyncProduct createSyncProduct(final String name, final String packingInfo) { final SyncProduct.SyncProductBuilder product = SyncProduct.builder() .uuid(randomUUID()) .name(name) .packingInfo(packingInfo) .shared(true); for (final String language : languages) { product.nameTrl(language,...
{ continue; } final ContractLine contractLine = contractLines.get(0); final Product product = contractLine.getProduct(); productSuppliesService.reportSupply(IProductSuppliesService.ReportDailySupplyRequest.builder() .bpartner(bpartner) .contractLine(contractLine) .productId(prod...
repos\metasfresh-new_dawn_uat\misc\services\procurement-webui\procurement-webui-backend\src\main\java\de\metas\procurement\webui\util\DummyDataProducer.java
2
请完成以下Java代码
public String login(final int AD_Org_ID, final int AD_Role_ID, final int AD_User_ID) { // nothing to do return null; } @Override public String docValidate(final PO po, final int timing) { // nothing to do return null; } @Override public String modelChange(final PO po, int type) { if (type != TYPE_B...
if (po instanceof MStorage) { final MStorage st = (MStorage)po; if (st.getQtyReserved().signum() < 0) { st.setQtyReserved(BigDecimal.ZERO); // no need for the warning & stacktrace for now. // final AdempiereException ex = new AdempiereException("@" + C_OrderLine.ERR_NEGATIVE_QTY_RESERVED + "@. Setting...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\adempiere\modelvalidator\ProhibitNegativeQtyReserved.java
1
请完成以下Java代码
public List<ExecutionListener> getExecutionListeners(String eventName) { return (List) super.getListeners(eventName); } @Deprecated public void addExecutionListener(String eventName, ExecutionListener executionListener) { super.addListener(eventName, executionListener); } @Deprecated public void a...
public boolean isSubProcessScope() { return isSubProcessScope; } public void setSubProcessScope(boolean isSubProcessScope) { this.isSubProcessScope = isSubProcessScope; } @Override public ProcessDefinitionImpl getProcessDefinition() { return processDefinition; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\process\ScopeImpl.java
1
请完成以下Java代码
public PickingJobLine withNewStep(@NonNull final PickingJob.AddStepRequest request) { final PickingJobStep newStep = PickingJobStep.builder() .id(request.getNewStepId()) .isGeneratedOnFly(request.isGeneratedOnFly()) .salesOrderAndLineId(salesOrderAndLineId) .scheduleId(scheduleId) .productId(prod...
{ return !CurrentPickingTarget.equals(this.currentPickingTarget, currentPickingTarget) ? toBuilder().currentPickingTarget(currentPickingTarget).build() : this; } PickingJobLine withCurrentPickingTarget(@NonNull final UnaryOperator<CurrentPickingTarget> currentPickingTargetMapper) { final CurrentPickingT...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJobLine.java
1
请在Spring Boot框架中完成以下Java代码
public void run(Integer id) { var process = lookup(id); if (!State.CREATED.equals(process.state())) { return; } start(process); verify(process); finish(process); } private void finish(Process process) { template.update(Process.class).matching(Query.query(Criteria.where("id").is(process.id()))) ...
} void start(Process process) { template.update(Process.class).matching(Query.query(Criteria.where("id").is(process.id()))) .apply(Update.update("state", State.ACTIVE).inc("transitionCount", 1)).first(); } Process lookup(Integer id) { return repository.findById(id).get(); } void verify(Process process)...
repos\spring-data-examples-main\mongodb\transactions\src\main\java\example\springdata\mongodb\imperative\TransitionService.java
2
请完成以下Java代码
public final class HUQRCodeUniqueId { @NonNull String idBase; @Getter @NonNull String displayableSuffix; private HUQRCodeUniqueId(@NonNull final String idBase, @NonNull final String displayableSuffix) { this.idBase = idBase; this.displayableSuffix = displayableSuffix; } public static HUQRCodeUniqueId rand...
@JsonCreator public static HUQRCodeUniqueId ofJson(@NonNull final String json) { final int idx = json.indexOf('-'); if (idx <= 0) { throw new AdempiereException("Invalid ID: `" + json + "`"); } final String idBase = json.substring(0, idx); final String displayableSuffix = json.substring(idx + 1); re...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\qrcodes\model\HUQRCodeUniqueId.java
1
请完成以下Java代码
public void dispose() { } // dispose // private int m_fieldLength; private String m_columnName; private String m_oldText; private String m_initialText; private volatile boolean m_setting = false; private GridField m_mField; /** * Set Editor to value * @param value value */ @Override p...
{ // ESC if (e.getKeyCode() == KeyEvent.VK_ESCAPE) setText(m_initialText); m_setting = true; try { fireVetoableChange(m_columnName, m_oldText, getText()); } catch (PropertyVetoException pve) {} m_setting = false; } // keyReleased /** * Set Field/WindowNo for ValuePreference (NOP) * @para...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VText.java
1
请完成以下Java代码
public class User { @NotBlank(message = "User name must be present") @Size(min = 3, max = 50, message = "User name size not valid") private String name; @NotBlank(message = "User email must be present") @Email(message = "User email format is incorrect") private String email; public User()...
public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } }
repos\tutorials-master\javaxval-2\src\main\java\com\baeldung\javaxval\childvalidation\User.java
1
请完成以下Java代码
protected class SameSiteResponseProxy extends HttpServletResponseWrapper { protected HttpServletResponse response; public SameSiteResponseProxy(HttpServletResponse resp) { super(resp); response = resp; } @Override public void sendError(int sc) throws IOException { appendSameSite...
public PrintWriter getWriter() throws IOException { appendSameSiteIfMissing(); return super.getWriter(); } @Override public ServletOutputStream getOutputStream() throws IOException { appendSameSiteIfMissing(); return super.getOutputStream(); } protected void appendSameSiteI...
repos\camunda-bpm-platform-master\webapps\assembly\src\main\java\org\camunda\bpm\webapp\impl\security\filter\SessionCookieFilter.java
1
请完成以下Java代码
public Date getBirthday() { return birthday; } public void setBirthday(Date birthday) { this.birthday = birthday; } public List<String> getHobbies() { return hobbies; } public void setHobbies(List<String> hobbies) { this.hobbies = hobbies; } public Map...
} @Override public String toString() { StringBuilder str = new StringBuilder("Person [name=" + name + ", fullName=" + fullName + ", age=" + age + ", birthday=" + birthday + ", hobbies=" + hobbies + ", clothes=" + clothes + "]\n"); if (friends != null) { ...
repos\SpringBootBucket-master\springboot-echarts\src\main\java\com\xncoding\benchmark\json\model\Person.java
1
请完成以下Java代码
private Optional<I_EDI_DesadvLine_InOutLine> getRecordByInOutLineIdIfExists(@NonNull final InOutLineId shipmentLineId) { return queryBL.createQueryBuilder(I_EDI_DesadvLine_InOutLine.class) .addEqualsFilter(I_EDI_DesadvLine_InOutLine.COLUMNNAME_M_InOutLine_ID, shipmentLineId) .create() .firstOnlyOptional(...
.map(UomId::ofRepoIdOrNull) .map(bpartnerUOMId -> Quantitys.of(record.getQtyEnteredInBPartnerUOM(), bpartnerUOMId)) .orElse(null)) .qtyDeliveredInStockingUOM(StockQtyAndUOMQtys .ofQtyInStockUOM(record.getQtyDeliveredInStockingUOM(), productId) .getStockQty()) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\api\impl\EDIDesadvInOutLineDAO.java
1
请完成以下Java代码
public class ApplicationServerImpl implements ApplicationServer { protected String vendor; protected String version; public ApplicationServerImpl(String vendor, String version) { this.vendor = vendor; this.version = version; } public ApplicationServerImpl(String version) { this.vendor = parseSe...
} public void setVendor(String vendor) { this.vendor = vendor; } public String getVersion() { return version; } public void setVersion(String version) { this.version = version; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\telemetry\dto\ApplicationServerImpl.java
1
请完成以下Java代码
public static Optional<ShippingWeightSourceTypes> ofCommaSeparatedString(@Nullable final String string) { final String stringNorm = StringUtils.trimBlankToNull(string); if (stringNorm == null) { return Optional.empty(); } final ImmutableList<ShippingWeightSourceType> result = SPLITTER.splitToList(stringN...
{ return list.iterator(); } public Optional<Quantity> calculateWeight(final Function<ShippingWeightSourceType, Optional<Quantity>> calculateWeightFunc) { for (final ShippingWeightSourceType weightSourceType : list) { final Optional<Quantity> weight = calculateWeightFunc.apply(weightSourceType); if (weig...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\shipping\weighting\ShippingWeightSourceTypes.java
1
请完成以下Java代码
public void setDebugClosedTransactions(boolean enabled) { getTrxManager().setDebugClosedTransactions(enabled); } @Override public boolean isDebugClosedTransactions() { return getTrxManager().isDebugClosedTransactions(); } @Override public String[] getActiveTransactionInfos() { final List<ITrx> trxs = g...
final ITrx trx = trxManager.getTrx(trxName); if (trxManager.isNull(trx)) { // shall not happen because getTrx is already throwning an exception throw new IllegalArgumentException("No transaction was found for: " + trxName); } boolean rollbackOk = false; try { rollbackOk = trx.rollback(true); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\jmx\JMXTrxManager.java
1
请完成以下Java代码
public BusinessRulesCollection getRules() { return ruleRepository.getAll(); } public void addRulesChangedListener(final BusinessRulesChangedListener listener) { ruleRepository.addCacheResetListener(listener); } public void fireTriggersForSourceModel(@NonNull final Object sourceModel, @NonNull final TriggerT...
.timing(timing) // .build().execute(); } public void processEvents(@NonNull final QueryLimit limit) { BusinessRuleEventProcessorCommand.builder() .ruleRepository(ruleRepository) .eventRepository(eventRepository) .recordWarningRepository(recordWarningRepository) .logger(logger) .recordM...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\business_rule\BusinessRuleService.java
1
请完成以下Java代码
public int getAD_Tab_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_Tab_ID); if (ii == null) return 0; return ii.intValue(); } @Override public org.compiere.model.I_AD_Window getAD_Window() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_AD_Window_ID, org.compiere.model.I_AD_Window.c...
*/ @Override public void setAD_Window_ID (int AD_Window_ID) { if (AD_Window_ID < 1) set_Value (COLUMNNAME_AD_Window_ID, null); else set_Value (COLUMNNAME_AD_Window_ID, Integer.valueOf(AD_Window_ID)); } /** Get Fenster. @return Eingabe- oder Anzeige-Fenster */ @Override public int getAD_Window_I...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Element_Link.java
1
请完成以下Java代码
public static final HUItemsLocalCache getCreate(final I_M_HU hu) { HUItemsLocalCache cache = InterfaceWrapperHelper.getDynAttribute(hu, DYNATTR_Instance); if (cache == null) { cache = new HUItemsLocalCache(hu); cache.setCacheDisabled(HUConstants.DEBUG_07504_Disable_HUItemsLocalCache); InterfaceWrapperHe...
final List<I_M_HU_Item> items = queryBuilder .create() .list() .stream() .peek(item -> item.setM_HU(hu)) // Make sure item.getM_HU() will return our HU .sorted(createItemsComparator()) .collect(Collectors.toList()); return items; } @Override protected Object mkKey(final I_M_HU_Item item) ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\impl\HUItemsLocalCache.java
1
请完成以下Java代码
protected POInfo initPO (Properties ctx) { POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName()); return poi; } public String toString() { StringBuffer sb = new StringBuffer ("X_K_IndexLog[") .append(get_ID()).append("]"); return sb.toString(); } /** Set Ind...
if (K_IndexLog_ID < 1) set_ValueNoCheck (COLUMNNAME_K_IndexLog_ID, null); else set_ValueNoCheck (COLUMNNAME_K_IndexLog_ID, Integer.valueOf(K_IndexLog_ID)); } /** Get Index Log. @return Text search log */ public int getK_IndexLog_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_K_IndexLog_ID); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_K_IndexLog.java
1
请完成以下Java代码
public int getCM_WebProject_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_CM_WebProject_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Manual. @param IsManual This is a manual process */ public void setIsManual (boolean IsManual) { set_Value (COLUMNNAME_IsManual, Boolean....
public void setK_IndexStop_ID (int K_IndexStop_ID) { if (K_IndexStop_ID < 1) set_ValueNoCheck (COLUMNNAME_K_IndexStop_ID, null); else set_ValueNoCheck (COLUMNNAME_K_IndexStop_ID, Integer.valueOf(K_IndexStop_ID)); } /** Get Index Stop. @return Keyword not to be indexed */ public int getK_IndexStop_...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_K_IndexStop.java
1
请完成以下Java代码
public void setTU_HU_PI_Item_Product_ID(final int tu_HU_PI_Item_Product_ID) { this.tu_HU_PI_Item_Product_ID = tu_HU_PI_Item_Product_ID; } public BigDecimal getQtyCUsPerTU() { return qtyCUsPerTU; } public void setQtyCUsPerTU(final BigDecimal qtyCU) { this.qtyCUsPerTU = qtyCU; } /** * Called from the ...
{ if (isReceiveIndividualCUs == null) { isReceiveIndividualCUs = computeIsReceiveIndividualCUs(); } return isReceiveIndividualCUs; } private boolean computeIsReceiveIndividualCUs() { if (selectedRow.getType() != PPOrderLineType.MainProduct || selectedRow.getUomId() == null || !selectedRow.getUo...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pporder\process\PackingInfoProcessParams.java
1
请完成以下Java代码
public void setMessageQueueMode(boolean isMessageQueueMode) { this.messageQueueMode = isMessageQueueMode; } public int getMaxTimerJobsPerAcquisition() { return maxTimerJobsPerAcquisition; } public void setMaxTimerJobsPerAcquisition(int maxTimerJobsPerAcquisition) { this.maxTime...
} public void setAsyncJobLockTimeInMillis(int asyncJobLockTimeInMillis) { this.asyncJobLockTimeInMillis = asyncJobLockTimeInMillis; } public int getRetryWaitTimeInMillis() { return retryWaitTimeInMillis; } public void setRetryWaitTimeInMillis(int retryWaitTimeInMillis) { t...
repos\Activiti-develop\activiti-core\activiti-spring-boot-starter\src\main\java\org\activiti\spring\boot\AsyncExecutorProperties.java
1
请完成以下Java代码
public Long getOrder_id() { return order_id; } public void setOrder_id(Long order_id) { this.order_id = order_id; } public LocalDate getOrderDate() { return orderDate; } public void setOrderDate(LocalDate orderDate) { this.orderDate = orderDate; } publ...
return productName; } public void setProductName(String productName) { this.productName = productName; } public Double getProductPrice() { return productPrice; } public void setProductPrice(Double productPrice) { this.productPrice = productPrice; } }
repos\tutorials-master\persistence-modules\spring-data-jpa-repo-3\src\main\java\com\baeldung\spring\data\jpa\joinquery\DTO\ResultDTO.java
1
请完成以下Java代码
public Resource performGet(@NonNull final GetRequest getRequest) { final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(getRequest.getBaseURL()); Loggables.withLogger(log, Level.DEBUG).addLog("*** performGet(): for request {}", getRequest); if (!Check.isEmpty(getRequest.getPathVariables())) {...
acceptableMediaTypes.add(MediaType.valueOf(responseFormat.getContentType())); final HttpHeaders headers = new HttpHeaders(); headers.setAccept(acceptableMediaTypes); return headers; } private RestTemplate restTemplate() { final OrgId orgId = Env.getOrgId(); final PostgRESTConfig config = configReposito...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\postgrest\client\PostgRESTClient.java
1
请完成以下Java代码
public void deletePicture(User user) { UserEntity userEntity = (UserEntity) user; if (userEntity.getPictureByteArrayRef() != null) { userEntity.getPictureByteArrayRef().delete(); } } @Override public void delete(String userId) { UserEntity user = findById(userId)...
UserEntity userEntity = (UserEntity) user; return userEntity.getPicture(); } @Override public void setUserPicture(User user, Picture picture) { UserEntity userEntity = (UserEntity) user; userEntity.setPicture(picture); dataManager.update(userEntity); } @Override ...
repos\flowable-engine-main\modules\flowable-idm-engine\src\main\java\org\flowable\idm\engine\impl\persistence\entity\UserEntityManagerImpl.java
1
请完成以下Java代码
public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo cxRequestInfo) throws ResourceException { ManagedConnection result = null; Iterator it = connectionSet.iterator(); while (result == null && it.hasNext()) { ManagedConnection mc = (ManagedConnecti...
public void setResourceAdapter(ResourceAdapter ra) { this.ra = ra; } @Override public int hashCode() { return 31; } @Override public boolean equals(Object other) { if (other == null) return false; if (other == this) return true; if (!(other instanceof JcaExecutorServiceMana...
repos\camunda-bpm-platform-master\javaee\jobexecutor-ra\src\main\java\org\camunda\bpm\container\impl\threading\ra\outbound\JcaExecutorServiceManagedConnectionFactory.java
1
请完成以下Java代码
public String getCanonicalName() { return "activity-stack-init"; } public void execute(PvmExecutionImpl execution) { ScopeInstantiationContext executionStartContext = execution.getScopeInstantiationContext(); InstantiationStack instantiationStack = executionStartContext.getInstantiationStack(); Li...
propagatingExecution.performOperation(operationOnScopeInitialization); } public boolean isAsync(PvmExecutionImpl instance) { return false; } public PvmExecutionImpl getStartContextExecution(PvmExecutionImpl execution) { return execution; } public boolean isAsyncCapable() { return false; } }
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\pvm\runtime\operation\PvmAtomicOperationActivityInitStack.java
1
请完成以下Java代码
public class TaxCharges2 { @XmlElement(name = "Id") protected String id; @XmlElement(name = "Rate") protected BigDecimal rate; @XmlElement(name = "Amt") protected ActiveOrHistoricCurrencyAndAmount amt; /** * Gets the value of the id property. * * @return * possible...
* @param value * allowed object is * {@link BigDecimal } * */ public void setRate(BigDecimal value) { this.rate = value; } /** * Gets the value of the amt property. * * @return * possible object is * {@link ActiveOrHistoricCurrencyA...
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\TaxCharges2.java
1
请完成以下Java代码
private GrantedAuthority mapAuthority(String name) { if (this.convertToUpperCase) { name = name.toUpperCase(Locale.ROOT); } else if (this.convertToLowerCase) { name = name.toLowerCase(Locale.ROOT); } if (this.prefix.length() > 0 && !name.startsWith(this.prefix)) { name = this.prefix + name; } ret...
* Whether to convert the authority value to upper case in the mapping. * @param convertToUpperCase defaults to {@code false} */ public void setConvertToUpperCase(boolean convertToUpperCase) { this.convertToUpperCase = convertToUpperCase; } /** * Whether to convert the authority value to lower case in the ma...
repos\spring-security-main\core\src\main\java\org\springframework\security\core\authority\mapping\SimpleAuthorityMapper.java
1
请完成以下Java代码
public static JSONJavaException ofNullable(@Nullable final Exception exception, @NonNull final JSONOptions jsonOpts) { return exception != null ? of(exception, jsonOpts) : null; } @NonNull public static JSONJavaException of(@NonNull final Exception exception, @NonNull final JSONOptions jsonOpts) { return buil...
if (exception instanceof AdempiereException) { final Map<String, Object> exceptionAttributes = ((AdempiereException)exception).getParameters(); if (exceptionAttributes == null || exceptionAttributes.isEmpty()) { return null; } return exceptionAttributes.entrySet() .stream() .map(entry ->...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONJavaException.java
1
请在Spring Boot框架中完成以下Java代码
public Optional<JsonRequestUOMConversionUpsert> getUOMConversionUpsertRequest(@NonNull final ProductRow productRow) { if (productRow.getQty() == null) { return Optional.empty(); } final String toUomCode = UOMCodeEnum.getX12DE355CodeByPCMCode(productRow.getUomCode()) .orElse(productRow.getUomCode()); ...
{ final String taxCategoryMappings = externalSystemRequest.getParameters().get(ExternalSystemConstants.PARAM_TAX_CATEGORY_MAPPINGS); if (Check.isBlank(taxCategoryMappings)) { return ImmutableMap.of(); } final ObjectMapper mapper = JsonObjectMapperHolder.sharedJsonObjectMapper(); try { return mappe...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-pcm-file-import\src\main\java\de\metas\camel\externalsystems\pcm\product\ProductUpsertProcessor.java
2
请完成以下Java代码
public class DBRes_fr extends ListResourceBundle { /** Translation Content */ static final Object[][] contents = new String[][] { { "CConnectionDialog", "Connexion Server" }, { "Name", "Nom" }, { "AppsHost", "Hote d'Application" }, { "AppsPort", "Port de l'A...
{ "TerminalServer", "Terminal Server" }, { "VPN", "VPN" }, { "WAN", "WAN" }, { "ConnectionError", "Erreur Connexion" }, { "ServerNotActive", "Serveur Non Actif" } }; /** * Get Contsnts * @return contents */ public Object[][] getContents() { return contents; } // getContents }...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\db\connectiondialog\i18n\DBRes_fr.java
1
请在Spring Boot框架中完成以下Java代码
public class HULabelConfigRepository { private final IQueryBL queryBL = Services.get(IQueryBL.class); private final CCache<Integer, HULabelConfigMap> cache = CCache.<Integer, HULabelConfigMap>builder() .tableName(I_M_HU_Label_Config.Table_Name) .initialCapacity(1) .build(); public ExplainedOptional<HULabe...
// // // // // private static class HULabelConfigMap { private final ImmutableList<HULabelConfigRoute> orderedList; public HULabelConfigMap(final ImmutableList<HULabelConfigRoute> list) { this.orderedList = list.stream() .sorted(Comparator.comparing(HULabelConfigRoute::getSeqNo)) .collect(Imm...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\report\labels\HULabelConfigRepository.java
2
请在Spring Boot框架中完成以下Java代码
public JsonExternalSystemLeichMehlPluFileConfigs getPluFileConfigs(@NonNull final Map<String, String> params) { final String pluFileConfigs = params.get(ExternalSystemConstants.PARAM_PLU_FILE_CONFIG); if (Check.isBlank(pluFileConfigs)) { throw new RuntimeException("Missing mandatory param: " + ExternalSystemC...
return exchange -> { final ExportPPOrderRouteContext context = ProcessorHelper.getPropertyOrThrowError(exchange, ROUTE_PROPERTY_EXPORT_PP_ORDER_CONTEXT, ExportPPOrderRouteContext.class); return context.isPluFileExportAuditEnabled(); }; } public static Integer getPPOrderMetasfreshId(@NonNull final Map<String...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\de-metas-camel-leichundmehl\src\main\java\de\metas\camel\externalsystems\leichundmehl\to_leichundmehl\pporder\ExportPPOrderHelper.java
2
请在Spring Boot框架中完成以下Java代码
public Money getPriceStdAsMoney() { return Money.of(getPriceStd(), getCurrencyId()); } /** * @return discount, never {@code null} */ @Override @NonNull public Percent getDiscount() { return CoalesceUtil.coalesceNotNull(discount, Percent.ZERO); } @Override public void setDiscount(@NonNull final Perce...
priceStd = scaleToPrecision(priceStd); priceLimit = scaleToPrecision(priceLimit); priceList = scaleToPrecision(priceList); } @Nullable private BigDecimal scaleToPrecision(@Nullable final BigDecimal priceToRound) { if (priceToRound == null || precision == null) { return priceToRound; } return precis...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\pricing\service\impl\PricingResult.java
2
请在Spring Boot框架中完成以下Java代码
public class M_ShipmentSchedule { @NonNull private final ShipmentScheduleService shipmentScheduleService; @ModelChange(timings = { ModelValidator.TYPE_BEFORE_NEW, ModelValidator.TYPE_BEFORE_CHANGE }, ifColumnsChanged = { I_M_ShipmentSchedule.COLUMNNAME_QtyToDeliver, I_M_ShipmentSchedule.COLUMNNAME_QtyToD...
ModelValidator.TYPE_AFTER_CHANGE }, ifColumnsChanged = { I_M_ShipmentSchedule.COLUMNNAME_Carrier_Advising_Status }) public void requestCarrierAdvice(final I_M_ShipmentSchedule shipmentSchedule) { if (!isMarkedAsCarrierAdviceRequested(shipmentSchedule)) { return; } final ShipmentScheduleId shipmentSchedu...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.commons\src\main\java\de\metas\shipper\gateway\commons\model\interceptor\M_ShipmentSchedule.java
2
请在Spring Boot框架中完成以下Java代码
private Pharmacy getPharmacyOrNull( @NonNull final PharmacyApi pharmacyApi, @NonNull final AlbertaConnectionDetails albertaConnectionDetails, @Nullable final String pharmacyId) throws ApiException { if (EmptyUtil.isBlank(pharmacyId)) { return null; } final Pharmacy pharmacy = pharmacyApi.getPharma...
@NonNull final AlbertaConnectionDetails albertaConnectionDetails, @Nullable final String userId) throws ApiException { if (EmptyUtil.isBlank(userId)) { return null; } final Users user = userApi.getUser(albertaConnectionDetails.getApiKey(), userId); if (user == null) { throw new RuntimeException(...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-externalsystems\alberta\de-metas-camel-alberta-camelroutes\src\main\java\de\metas\camel\externalsystems\alberta\patient\processor\CreateBPartnerReqProcessor.java
2
请完成以下Java代码
public void onMessage(@NonNull final Message message) { String text = null; final String messageReference = "onMessage-startAt-millis-" + SystemTime.millis(); try (final IAutoCloseable ignored = setupLoggable(messageReference)) { text = extractMessageBodyAsString(message); Loggables.withLogger(logger, ...
final String encoding = message.getMessageProperties().getContentEncoding(); if (Check.isEmpty(encoding)) { Loggables.withLogger(logger, Level.WARN) .addLog("Incoming RabbitMQ message lacks content encoding info; assuming UTF-8; messageId={}", message.getMessageProperties().getMessageId()); return new S...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\server\rpl\imp\RabbitMqListener.java
1
请完成以下Java代码
private static List prepareData() { List data = new ArrayList(); data.add(new Question("Can I have a bonus?", -5)); return data; } private static void checkResults(List results) { Iterator itr = results.iterator(); while (itr.hasNext()) { Object obj = itr.nex...
private static void registerRules(String rulesFile, String rulesURI, RuleServiceProvider serviceProvider) throws ConfigurationException, RuleExecutionSetCreateException, IOException, RuleExecutionSetRegisterException { // Get the rule administrator. RuleAdministrator ruleAdministrator = serviceProvider...
repos\tutorials-master\rule-engines-modules\jess\src\main\java\com\baeldung\rules\jess\JessWithJsr94.java
1
请完成以下Java代码
public String getProcessDefinitionId() { return processDefinitionId; } public void setProcessDefinitionId(String processDefinitionId) { this.processDefinitionId = processDefinitionId; } public boolean isInitialVariables() { return initialVariables; } public void setInitialVariables(boolean in...
public boolean isSkipIoMappings() { return skipIoMappings; } public void setSkipIoMappings(boolean skipIoMappings) { this.skipIoMappings = skipIoMappings; } public boolean isWithoutBusinessKey() { return withoutBusinessKey; } public void setWithoutBusinessKey(boolean withoutBusinessKey) { ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\RestartProcessInstancesBatchConfiguration.java
1
请在Spring Boot框架中完成以下Java代码
public String getApplicationRef() { return applicationRef; } /** * Sets the value of the applicationRef property. * * @param value * allowed object is * {@link String } * */ public void setApplicationRef(String value) { this.applicationRef = ...
* allowed object is * {@link String } * */ public void setAckRequest(String value) { this.ackRequest = value; } /** * Gets the value of the agreementId property. * * @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\messaging\header\InterchangeHeaderType.java
2
请在Spring Boot框架中完成以下Java代码
public Collection<GrantedAuthority> convert(Jwt jwt) { Collection<String> tokenScopes = parseScopesClaim(jwt); if ( tokenScopes.isEmpty()) { return Collections.emptyList(); } return tokenScopes.stream() .map(s -> scopes.getOrDefault(s, s)) ...
if ( v == null ) { return Collections.emptyList(); } if ( v instanceof String) { return Arrays.asList(v.toString().split(" ")); } else if ( v instanceof Collection ) { return ((Collection<?>)v).stream() .map(Object::toString) ...
repos\tutorials-master\spring-security-modules\spring-security-oidc\src\main\java\com\baeldung\openid\oidc\jwtauthorities\config\MappingJwtGrantedAuthoritiesConverter.java
2
请在Spring Boot框架中完成以下Java代码
public class RuleController { public static final Logger logger = LoggerFactory.getLogger(RuleController.class); @Autowired RuleService ruleService; @ResponseBody @RequestMapping("address") public Object test(int num) { AddressCheckResult result = new AddressCheckResult(); Addr...
/** * 修改规则 * * @return * @throws IOException */ @ResponseBody @RequestMapping("update") public Rule update(Rule rule) throws IOException { return ruleService.update(rule); } /** * 新增规则 * * @return * @throws IOException */ @ResponseBody ...
repos\spring-boot-student-master\spring-boot-student-drools\src\main\java\com\xiaolyuh\controller\RuleController.java
2
请完成以下Java代码
public class WorkflowLaunchersList implements Iterable<WorkflowLauncher> { @NonNull private final ImmutableList<WorkflowLauncher> launchers; @NonNull @Getter private final ImmutableList<OrderBy> orderByFields; @Nullable @Getter private final PrintableScannedCode filterByQRCode; @Nullable @Getter private final Immut...
public Stream<WorkflowLauncher> stream() {return launchers.stream();} public boolean isEmpty() {return launchers.isEmpty();} public boolean isStaled(@NonNull final Duration maxStaleAccepted) { return maxStaleAccepted.compareTo(Duration.ZERO) <= 0 // explicitly asked for a fresh value || SystemTime.asInstant(...
repos\metasfresh-new_dawn_uat\backend\de.metas.workflow.rest-api\src\main\java\de\metas\workflow\rest_api\model\WorkflowLaunchersList.java
1
请完成以下Java代码
public void setRecord_Source_ID (int Record_Source_ID) { if (Record_Source_ID < 1) set_Value (COLUMNNAME_Record_Source_ID, null); else set_Value (COLUMNNAME_Record_Source_ID, Integer.valueOf(Record_Source_ID)); } /** Get Quell-Datensatz-ID. @return Quell-Datensatz-ID */ public int getRecord_Source_...
return ii.intValue(); } /** Set Reihenfolge. @param SeqNo Zur Bestimmung der Reihenfolge der Einträge; die kleinste Zahl kommt zuerst */ public void setSeqNo (int SeqNo) { set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo)); } /** Get Reihenfolge. @return Zur Bestimmung der Reihenfolge der Einträge...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_Relation.java
1
请在Spring Boot框架中完成以下Java代码
public CommonResult login(@RequestParam String username, @RequestParam String password) { String token = memberService.login(username, password); if (token == null) { return CommonResult.validateFailed("用户名或密码错误"); } Map<String, String> tokenMap ...
@RequestMapping(value = "/updatePassword", method = RequestMethod.POST) @ResponseBody public CommonResult updatePassword(@RequestParam String telephone, @RequestParam String password, @RequestParam String authCode) { memberService.updateP...
repos\mall-master\mall-portal\src\main\java\com\macro\mall\portal\controller\UmsMemberController.java
2
请在Spring Boot框架中完成以下Java代码
public class Person { @Id private int id; @Column(name = "first_name") private String firstName; // switch these two lines to reproduce the exception // @Column(name = "first_name") @Column(name = "last_name") private String lastName; public int getId() { return id; }...
} public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } }
repos\tutorials-master\persistence-modules\hibernate-exceptions-2\src\main\java\com\baeldung\hibernate\columnduplicatedmapping\Person.java
2
请完成以下Java代码
public void afterModelUnlinked(final Object model, final I_M_Material_Tracking materialTrackingOld) { final I_M_InOutLine receiptLine = InterfaceWrapperHelper.create(model, I_M_InOutLine.class); if (!isEligible(receiptLine, materialTrackingOld)) { return; } final BigDecimal qtyReceivedToRemove = receiptL...
// check if the inoutLine's product is our tracked product. if (materialTracking.getM_Product_ID() != inoutLine.getM_Product_ID()) { return false; } final I_M_InOut inout = inoutLine.getM_InOut(); // Shipments are not eligible (just in case) if (inout.isSOTrx()) { return false; } return true; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\spi\impl\listeners\InOutLineMaterialTrackingListener.java
1
请完成以下Java代码
public String getF_ALLOWADD() { return F_ALLOWADD; } public void setF_ALLOWADD(String f_ALLOWADD) { F_ALLOWADD = f_ALLOWADD; } public String getF_MEMO() { return F_MEMO; } public void setF_MEMO(String f_MEMO) { F_MEMO = f_MEMO; } public String getF_LEV...
public void setF_ISSTD(String f_ISSTD) { F_ISSTD = f_ISSTD; } public Timestamp getF_EDITTIME() { return F_EDITTIME; } public void setF_EDITTIME(Timestamp f_EDITTIME) { F_EDITTIME = f_EDITTIME; } public String getF_PLATFORM_ID() { return F_PLATFORM_ID; } ...
repos\SpringBootBucket-master\springboot-batch\src\main\java\com\xncoding\trans\modules\common\vo\BscTollItem.java
1
请完成以下Java代码
public String getActivityInstanceId() { return activityInstanceId; } public String getExecutionId() { return executionId; } public String getCaseDefinitionKey() { return caseDefinitionKey; } public String getCaseDefinitionId() { return caseDefinitionId; } public String getCaseInstanc...
HistoricDetailDto dto = null; if (historicDetail instanceof HistoricFormField) { HistoricFormField historicFormField = (HistoricFormField) historicDetail; dto = HistoricFormFieldDto.fromHistoricFormField(historicFormField); } else if (historicDetail instanceof HistoricVariableUpdate) { Histo...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\history\HistoricDetailDto.java
1
请完成以下Java代码
public class JuelExpression implements Expression { protected String expressionText; protected ValueExpression valueExpression; public JuelExpression(ValueExpression valueExpression, String expressionText) { this.valueExpression = valueExpression; this.expressionText = expressionText; ...
@Override public void setValue(Object value, VariableContainer variableContainer) { ELContext elContext = Context.getProcessEngineConfiguration().getExpressionManager().getElContext((VariableScope) variableContainer); try { ExpressionSetInvocation invocation = new ExpressionSetInvocation...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\el\JuelExpression.java
1
请在Spring Boot框架中完成以下Java代码
public class AcquireJobsCmd implements Command<List<? extends JobInfoEntity>> { protected AsyncExecutor asyncExecutor; protected int remainingCapacity; protected JobInfoEntityManager<? extends JobInfoEntity> jobEntityManager; public AcquireJobsCmd(AsyncExecutor asyncExecutor) { this(asyncExecu...
return jobs; } protected void lockJob(JobInfoEntity job, int lockTimeInMillis, JobServiceConfiguration jobServiceConfiguration) { GregorianCalendar gregorianCalendar = calculateLockExpirationTime(lockTimeInMillis, jobServiceConfiguration); job.setLockOwner(asyncExecutor.getLockOwner()); ...
repos\flowable-engine-main\modules\flowable-job-service\src\main\java\org\flowable\job\service\impl\cmd\AcquireJobsCmd.java
2