instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
public void lazyInit() { try { delegate = createNewFilterInstance(); if (initHook != null) { initHook.init(delegate); } delegate.init(filterConfig); } catch (Exception e) { throw new RuntimeException(e); } } @Override public void init(FilterConfig filterConfig) t...
delegate.destroy(); } } public InitHook<T> getInitHook() { return initHook; } public void setInitHook(InitHook<T> initHook) { this.initHook = initHook; } public Class<? extends T> getDelegateClass() { return delegateClass; } protected T createNewFilterInstance() throws InstantiationE...
repos\camunda-bpm-platform-master\spring-boot-starter\starter-webapp-core\src\main\java\org\camunda\bpm\spring\boot\starter\webapp\filter\LazyDelegateFilter.java
1
请完成以下Java代码
public class SignalEventSubscriptionEntityImpl extends EventSubscriptionEntityImpl implements SignalEventSubscriptionEntity { private static final long serialVersionUID = 1L; // Using json here, but not worth of adding json dependency lib for this private static final String CONFIGURATION_TEMPLATE...
public boolean isProcessInstanceScoped() { String scope = extractScopeFormConfiguration(); return (scope != null) && (Signal.SCOPE_PROCESS_INSTANCE.equals(scope)); } public boolean isGlobalScoped() { String scope = extractScopeFormConfiguration(); return (scope == null) || (Sign...
repos\Activiti-develop\activiti-core\activiti-engine\src\main\java\org\activiti\engine\impl\persistence\entity\SignalEventSubscriptionEntityImpl.java
1
请完成以下Java代码
public void setGO_DeliveryOrder_ID (int GO_DeliveryOrder_ID) { if (GO_DeliveryOrder_ID < 1) set_ValueNoCheck (COLUMNNAME_GO_DeliveryOrder_ID, null); else set_ValueNoCheck (COLUMNNAME_GO_DeliveryOrder_ID, Integer.valueOf(GO_DeliveryOrder_ID)); } /** Get GO Delivery Order. @return GO Delivery Order */...
{ return get_ValueAsPO(COLUMNNAME_M_Package_ID, org.compiere.model.I_M_Package.class); } @Override public void setM_Package(org.compiere.model.I_M_Package M_Package) { set_ValueFromPO(COLUMNNAME_M_Package_ID, org.compiere.model.I_M_Package.class, M_Package); } /** Set Packstück. @param M_Package_ID Shi...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java-gen\de\metas\shipper\gateway\go\model\X_GO_DeliveryOrder_Package.java
1
请完成以下Java代码
private void loadCurrency() { // Get Default int C_Currency_ID = Env.getContextAsInt(Env.getCtx(), m_WindowNo, "C_Currency_ID"); if (C_Currency_ID == 0) { C_Currency_ID = Env.getContextAsInt(Env.getCtx(), "$C_Currency_ID"); } String sql = "SELECT C_Currency_ID, ISO_Code FROM C_Currency " + "WHERE Is...
e.consume(); // does not work on JTextField if (code == KeyEvent.VK_DELETE) { input = 'A'; } else if (code == KeyEvent.VK_BACK_SPACE) { input = 'C'; } else if (code == KeyEvent.VK_ENTER) { input = '='; } else if (code == KeyEvent.VK_CANCEL || code == KeyEvent.VK_ESCAPE) { m_abort = t...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\Calculator.java
1
请完成以下Java代码
public void setIsToBeFetched (boolean IsToBeFetched) { set_Value (COLUMNNAME_IsToBeFetched, Boolean.valueOf(IsToBeFetched)); } /** Get Abholung. @return Abholung */ @Override public boolean isToBeFetched () { Object oo = get_Value(COLUMNNAME_IsToBeFetched); if (oo != null) { if (oo instanceof B...
public void setM_TourVersionLine_ID (int M_TourVersionLine_ID) { if (M_TourVersionLine_ID < 1) set_ValueNoCheck (COLUMNNAME_M_TourVersionLine_ID, null); else set_ValueNoCheck (COLUMNNAME_M_TourVersionLine_ID, Integer.valueOf(M_TourVersionLine_ID)); } /** Get Tour Version Line. @return Tour Version Lin...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\de\metas\tourplanning\model\X_M_TourVersionLine.java
1
请完成以下Java代码
public String readHeaderParam(@HeaderParam("headerParamToRead") String headerParamToRead) { return "Header parameter value is [" + headerParamToRead + "]"; } @GET @Path("/path/{pathParamToRead}") public String readPathParam(@PathParam("pathParamToRead") String pathParamToRead) { return ...
return "Form parameter value is [" + formParamToRead + "]"; } @GET @Path("/matrix") public String readMatrixParam(@MatrixParam("matrixParamToRead") String matrixParamToRead) { return "Matrix parameter value is [" + matrixParamToRead + "]"; } @POST @Path("/bean/{pathParam}") pub...
repos\tutorials-master\web-modules\jersey\src\main\java\com\baeldung\jersey\server\Items.java
1
请完成以下Java代码
public void setA_Effective_Date (Timestamp A_Effective_Date) { set_Value (COLUMNNAME_A_Effective_Date, A_Effective_Date); } /** Get A_Effective_Date. @return A_Effective_Date */ public Timestamp getA_Effective_Date () { return (Timestamp)get_Value(COLUMNNAME_A_Effective_Date); } /** A_Reval_Code AD_Re...
public static final String A_REVAL_MULTIPLIER_Index = "IND"; /** Set A_Reval_Multiplier. @param A_Reval_Multiplier A_Reval_Multiplier */ public void setA_Reval_Multiplier (String A_Reval_Multiplier) { set_Value (COLUMNNAME_A_Reval_Multiplier, A_Reval_Multiplier); } /** Get A_Reval_Multiplier. @return A_R...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_A_Asset_Reval_Index.java
1
请完成以下Java代码
public class HelpDocument { private final MustacheTemplateRenderer templateRenderer; private final BulletedSection<String> warnings; private final GettingStartedSection gettingStarted; private final PreDefinedSection nextSteps; private final LinkedList<Section> sections = new LinkedList<>(); public HelpDocu...
} /** * Add a section rendered by the specified mustache template and model. * @param templateName the name of the mustache template to render * @param model the model that should be used for the rendering * @return this document */ public HelpDocument addSection(String templateName, Map<String, Object> mo...
repos\initializr-main\initializr-generator-spring\src\main\java\io\spring\initializr\generator\spring\documentation\HelpDocument.java
1
请完成以下Java代码
private static Optional<OtaPackageUpdateStatus> toOtaPackageUpdateStatus(FirmwareUpdateState firmwareUpdateState) { switch (firmwareUpdateState) { case IDLE: return Optional.empty(); case DOWNLOADING: return Optional.of(DOWNLOADING); case DOWNL...
return Optional.of(DOWNLOADING); case SUCCESSFULLY_INSTALLED: return Optional.of(UPDATED); case SUCCESSFULLY_DOWNLOADED_VERIFIED: return Optional.of(VERIFIED); case NOT_ENOUGH_STORAGE: case OUT_OFF_MEMORY: case CONNECTION_LOST: ...
repos\thingsboard-master\common\transport\lwm2m\src\main\java\org\thingsboard\server\transport\lwm2m\server\ota\DefaultLwM2MOtaUpdateService.java
1
请完成以下Java代码
protected List<Term> segSentence(char[] sentence) { if (sentence.length == 0) return Collections.emptyList(); List<Term> termList = roughSegSentence(sentence); if (!(config.ner || config.useCustomDictionary || config.speechTagging)) return termList; List<Vertex> vertexLis...
/** * 将中间结果转换为词网顶点, * 这样就可以利用基于Vertex开发的功能, 如词性标注、NER等 * @param wordList * @param appendStart * @return */ protected List<Vertex> toVertexList(List<Term> wordList, boolean appendStart) { ArrayList<Vertex> vertexList = new ArrayList<Vertex>(wordList.size() + 2); if (...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\seg\CharacterBasedSegment.java
1
请完成以下Java代码
public String getRestTypeName() { return "long"; } @Override public Class<?> getVariableType() { return Long.class; } @Override public Object getVariableValue(EngineRestVariable result) { if (result.getValue() != null) { if (!(result.getValue() instanceof Nu...
} return null; } @Override public void convertVariableValue(Object variableValue, EngineRestVariable result) { if (variableValue != null) { if (!(variableValue instanceof Long)) { throw new FlowableIllegalArgumentException("Converter can only convert integers"); ...
repos\flowable-engine-main\modules\flowable-common-rest\src\main\java\org\flowable\common\rest\variable\LongRestVariableConverter.java
1
请完成以下Java代码
protected RestMultipartRequestContext createRequestContext(InputStream entityStream, String contentType) { return new RestMultipartRequestContext(entityStream, contentType); } /** * Exposes the REST request to commons fileupload * */ static class RestMultipartRequestContext implements RequestContext...
} public String getContentType() { return contentType; } public int getContentLength() { return -1; } public InputStream getInputStream() throws IOException { return inputStream; } } }
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\mapper\MultipartPayloadProvider.java
1
请完成以下Java代码
public String getCategory() { return category; } public void setCategory(String category) { this.category = category; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getMeasure() { ...
} public void setMeasure(String measure) { this.measure = measure; } public double getCalories() { return calories; } public void setCalories(double calories) { this.calories = calories; } }
repos\tutorials-master\apache-poi\src\main\java\com\baeldung\convert\exceldatatolist\FoodInfo.java
1
请完成以下Java代码
public boolean hasReadAccess(final AdWindowId adWindowId) { return true; } @Override public String addAccessSQL(final String sql, final String tableNameFQ) { return sql; } } @ToString private static class RoleBasedRelatedDocumentsPermissions implements RelatedDocumentsPermissions { private fin...
{ this.rolePermissions = rolePermissions; } @Override public boolean hasReadAccess(final AdWindowId adWindowId) { return rolePermissions.checkWindowPermission(adWindowId).hasReadAccess(); } @Override public String addAccessSQL(final String sql, final String tableNameFQ) { return rolePermissio...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\references\related_documents\RelatedDocumentsPermissionsFactory.java
1
请完成以下Java代码
public TreeNode iterativeParent(int target) { return iterativeParent(this, new TreeNode(target)); } private TreeNode iterativeParent(TreeNode current, TreeNode target) { Deque<TreeNode> parentCandidates = new LinkedList<>(); String notFoundMessage = format("No parent node found for 'ta...
while (current != null) { parentCandidates.addFirst(current); current = current.left; } current = parentCandidates.pollFirst(); if (target.equals(current.left) || target.equals(current.right)) { return current; } ...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-8\src\main\java\com\baeldung\algorithms\parentnodebinarytree\TreeNode.java
1
请完成以下Java代码
public ResponseEntity<UserRecord> getUser() throws FirebaseAuthException { UserRecord userRecord = userService.retrieve(); return ResponseEntity.ok(userRecord); } @PostMapping public ResponseEntity<Void> createUser(@RequestBody CreateUserRequest request) throws FirebaseAuthException { ...
return ResponseEntity.ok(response); } @PostMapping("/logout") public ResponseEntity<Void> logoutUser() throws FirebaseAuthException { userService.logout(); return ResponseEntity.ok().build(); } record CreateUserRequest(String emailId, String password) {} record LoginUserReques...
repos\tutorials-master\gcp-firebase\src\main\java\com\baeldung\gcp\firebase\auth\UserController.java
1
请完成以下Java代码
public int getNumberOfOptions() { return actionCombo.getItemCount(); } // getNumberOfOptions /** * Should the process be started? * * @return OK pressed */ public boolean isStartProcess() { return m_OKpressed; } // isStartProcess /** * Fill map with DocAction Ref_List(135) values */ private Ma...
} // // ActionCombo: display the description for the selection else if (e.getSource() == actionCombo) { final IDocActionItem selectedDocAction = actionCombo.getSelectedItem(); // Display description if (selectedDocAction != null) { message.setText(selectedDocAction.getDescription()); } } }...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java-legacy\org\compiere\grid\ed\VDocAction.java
1
请完成以下Java代码
public class MultithreadCalculator implements Calculator { private final int nThreads; private final ExecutorService pool; public MultithreadCalculator(int nThreads) { this.nThreads = nThreads; this.pool = Executors.newFixedThreadPool(nThreads); } private class SumTask implements C...
for (int i = 1; i <= nThreads; i++) { if (i == nThreads) { from = (i - 1) * chunk; to = numbers.length; } else { from = (i - 1) * chunk; to = i * chunk; } tasks.add(new SumTask(numbers, from, to)); } ...
repos\SpringBootBucket-master\springboot-echarts\src\main\java\com\xncoding\benchmark\sum\calc\impl\MultithreadCalculator.java
1
请完成以下Java代码
public class MessageEventSubscriptionResource implements EventSubscriptionResource { protected static final String MESSAGE_EVENT_TYPE = "message"; protected ProcessEngine engine; protected String executionId; protected String messageName; protected ObjectMapper objectMapper; public MessageEventSubscript...
RuntimeService runtimeService = engine.getRuntimeService(); try { VariableMap variables = VariableValueDto.toMap(triggerDto.getVariables(), engine, objectMapper); runtimeService.messageEventReceived(messageName, executionId, variables); } catch (AuthorizationException e) { throw e; } ca...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\runtime\impl\MessageEventSubscriptionResource.java
1
请完成以下Java代码
public int getC_Currency_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_Currency_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Datum von. @param DateFrom Startdatum eines Abschnittes */ @Override public void setDateFrom (java.sql.Timestamp DateFrom) { set_Value (COLUMN...
/** Get Freigegeben. @return Checkbox sagt aus, ob der Beleg verarbeitet wurde. */ @Override public boolean isProcessed () { Object oo = get_Value(COLUMNNAME_Processed); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return f...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_BPartner_CreditLimit.java
1
请在Spring Boot框架中完成以下Java代码
private static Function<I_InvoiceProcessingServiceCompany, InvoiceProcessingServiceCompanyConfig> toCompanyConfig( final ImmutableListMultimap<InvoiceProcessingServiceCompanyConfigId, InvoiceProcessingServiceCompanyConfigBPartnerDetails> bpartnerDetailsByCompanyConfig) { return record -> { final InvoiceProcess...
} @NonNull private static Function<I_InvoiceProcessingServiceCompany_BPartnerAssignment, ImmutableMapEntry<InvoiceProcessingServiceCompanyConfigId, InvoiceProcessingServiceCompanyConfigBPartnerDetails>> bpartnerDetailsToMapEntry() { return recordBP -> { final InvoiceProcessingServiceCompanyConfigBPartnerDetail...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\invoice\invoiceProcessingServiceCompany\InvoiceProcessingServiceCompanyConfigRepository.java
2
请完成以下Java代码
public void setDocumentNo (java.lang.String DocumentNo) { set_Value (COLUMNNAME_DocumentNo, DocumentNo); } /** Get Nr.. @return Document sequence number of the document */ @Override public java.lang.String getDocumentNo () { return (java.lang.String)get_Value(COLUMNNAME_DocumentNo); } /** Set Verarb...
{ set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ @Override public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); ret...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_Customs_Invoice.java
1
请完成以下Java代码
public static EdgeEvent constructEdgeEvent(TenantId tenantId, EdgeId edgeId, EdgeEventType type, EdgeEventActionType action, EntityI...
public static String createErrorMsgFromRootCauseAndStackTrace(Throwable t) { Throwable rootCause = Throwables.getRootCause(t); StringBuilder errorMsg = new StringBuilder(rootCause.getMessage() != null ? rootCause.getMessage() : ""); if (rootCause.getStackTrace().length > 0) { int idx...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\EdgeUtils.java
1
请在Spring Boot框架中完成以下Java代码
public class DistributionOrderDocumentReportAdvisor implements DocumentReportAdvisor { private final DDOrderLowLevelService ddOrderLowLevelService; private final DocumentReportAdvisorUtil util; public DistributionOrderDocumentReportAdvisor( @NonNull final DDOrderLowLevelService ddOrderLowLevelService, @NonNul...
() -> util.getDefaultPrintFormats(clientId).getDistributionOrderPrintFormatId()); if (printFormatId == null) { throw new AdempiereException("@NotFound@ @AD_PrintFormat_ID@"); } final Language language = util.getBPartnerLanguage(bpartner).orElse(null); final BPPrintFormatQuery bpPrintFormatQuery = BPPrint...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddorder\lowlevel\DistributionOrderDocumentReportAdvisor.java
2
请在Spring Boot框架中完成以下Java代码
public class Saml2AuthenticationException extends AuthenticationException { @Serial private static final long serialVersionUID = -2996886630890949105L; private final Saml2Error error; /** * Constructs a {@code Saml2AuthenticationException} using the provided parameters. * @param error the {@link Saml2Error S...
* @param cause the root cause */ public Saml2AuthenticationException(Saml2Error error, String message, Throwable cause) { super(message, cause); Assert.notNull(error, "error cannot be null"); this.error = error; } /** * Get the associated {@link Saml2Error} * @return the associated {@link Saml2Error} ...
repos\spring-security-main\saml2\saml2-service-provider\src\main\java\org\springframework\security\saml2\provider\service\authentication\Saml2AuthenticationException.java
2
请完成以下Spring Boot application配置
spring.h2.console.enabled=true spring.jpa.show-sql=true logging.level.org.hibernate.SQL=DEBUG spring.jpa.hibernate.ddl-auto=create spring.datasource.url=jdbc:h2:mem:test spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.pass
word=sa spring.jpa.database-platform=org.hibernate.dialect.H2Dialect spring.jpa.defer-datasource-initialization=true
repos\tutorials-master\persistence-modules\blaze-persistence\src\main\resources\application.properties
2
请完成以下Java代码
public int getAD_WF_Node_ID() { return get_ValueAsInt(COLUMNNAME_AD_WF_Node_ID); } @Override public void setAD_WF_Node_Para_ID (final int AD_WF_Node_Para_ID) { if (AD_WF_Node_Para_ID < 1) set_ValueNoCheck (COLUMNNAME_AD_WF_Node_Para_ID, null); else set_ValueNoCheck (COLUMNNAME_AD_WF_Node_Para_ID, A...
public java.lang.String getAttributeValue() { return get_ValueAsString(COLUMNNAME_AttributeValue); } @Override public void setDescription (final java.lang.String Description) { set_Value (COLUMNNAME_Description, Description); } @Override public java.lang.String getDescription() { return get_ValueAsSt...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WF_Node_Para.java
1
请完成以下Java代码
public List<PaymentRow> getPaymentRowsListByPaymentId( @NonNull final Collection<PaymentId> paymentIds, @NonNull final ZonedDateTime evaluationDate) { if (paymentIds.isEmpty()) { return ImmutableList.of(); } final PaymentToAllocateQuery query = PaymentToAllocateQuery.builder() .evaluationDate(eva...
{ throw new AdempiereException("Expected only one row for " + paymentId + " but got " + paymentRows); } } @Value @Builder private static class InvoiceRowLoadingContext { @NonNull ZonedDateTime evaluationDate; @NonNull ImmutableSet<InvoiceId> invoiceIdsWithServiceInvoiceAlreadyGenetated; public boolean...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\payment_allocation\PaymentAndInvoiceRowsRepo.java
1
请在Spring Boot框架中完成以下Java代码
public SQLXML createSQLXML() throws SQLException { return delegate.createSQLXML(); } @Override public boolean isValid(int timeout) throws SQLException { return delegate.isValid(timeout); } @Override public void setClientInfo(String name, String value) throws SQLClientInfoException { delegate.setClientI...
public void setSchema(String schema) throws SQLException { delegate.setSchema(schema); } @Override public String getSchema() throws SQLException { return delegate.getSchema(); } @Override public void abort(Executor executor) throws SQLException { delegate.abort(executor); } @Override public void se...
repos\metasfresh-new_dawn_uat\backend\de.metas.report\metasfresh-report-service\src\main\java\de\metas\report\jasper\data_source\JasperJdbcConnection.java
2
请完成以下Java代码
public Collection<Import> getImports() { return importCollection.get(this); } public Collection<ItemDefinition> getItemDefinitions() { return itemDefinitionCollection.get(this); } public Collection<DrgElement> getDrgElements() { return drgElementCollection.get(this); } public Collection<Artif...
namespaceAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_NAMESPACE) .required() .build(); exporterAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_EXPORTER) .build(); exporterVersionAttribute = typeBuilder.stringAttribute(DMN_ATTRIBUTE_EXPORTER_VERSION) .build(); Sequen...
repos\camunda-bpm-platform-master\model-api\dmn-model\src\main\java\org\camunda\bpm\model\dmn\impl\instance\DefinitionsImpl.java
1
请完成以下Java代码
protected @Nullable ApplicationEventPublisher getPublisher() { return this.publisher; } protected void enableBodyCaching(@Nullable String routeId) { if (routeId != null && getPublisher() != null) { // send an event to enable caching getPublisher().publishEvent(new EnableBodyCachingEvent(this, routeId)); ...
public static class NameConfig { private @Nullable String name; public @Nullable String getName() { return name; } public void setName(String name) { this.name = name; } } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\factory\AbstractGatewayFilterFactory.java
1
请在Spring Boot框架中完成以下Java代码
public class RestTemplateMethodsApplication { private final static RestTemplate restTemplate = new RestTemplate(); public static void main(String[] args) { } private static void postForEntity() { Book book = new Book( "Cruising Along with Java", "Venkat Subramaniam", ...
// extract required data from response return null; } } ); // Could also use some factory methods in RestTemplate for // the request callback and/or response extractor Book book = new Book( "Reactive Spring", "Jo...
repos\tutorials-master\spring-web-modules\spring-resttemplate-2\src\main\java\com\baeldung\resttemplate\json\methods\RestTemplateMethodsApplication.java
2
请完成以下Java代码
public class FeelEngineFactoryImpl implements FeelEngineFactory { public static final FeelEngineLogger LOG = FeelLogger.ENGINE_LOGGER; public static final int DEFAULT_EXPRESSION_CACHE_SIZE = 1000; protected final FeelEngine feelEngine; protected final int expressionCacheSize; protected final List<FeelToJu...
properties.put(ExpressionFactoryImpl.PROP_CACHE_SIZE, String.valueOf(expressionCacheSize)); try { return new ExpressionFactoryImpl(properties, createTypeConverter()); } catch (ELException e) { throw LOG.unableToInitializeFeelEngine(e); } } protected FeelTypeConverter createTypeConverte...
repos\camunda-bpm-platform-master\engine-dmn\feel-juel\src\main\java\org\camunda\bpm\dmn\feel\impl\juel\FeelEngineFactoryImpl.java
1
请完成以下Java代码
public static class UpdateMonthsUntilExpiryCommandBuilder { public UpdateMonthsUntilExpiryResult execute() { return build().execute(); } } public UpdateMonthsUntilExpiryResult execute() { int countChecked = 0; int countUpdated = 0; final Iterator<HuId> husWithExpiryDates = huWithExpiryDatesReposito...
if (!huAttributes.hasAttribute(AttributeConstants.ATTR_MonthsUntilExpiry)) { return false; } final OptionalInt monthsUntilExpiry = computeMonthsUntilExpiry(huAttributes, today); final int monthsUntilExpiryOld = huAttributes.getValueAsInt(AttributeConstants.ATTR_MonthsUntilExpiry); if (monthsUntilExpiry.or...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\expiry\UpdateMonthsUntilExpiryCommand.java
1
请完成以下Java代码
public IDocument createCounterDocument(final Object document, final boolean async) { if (async) { CreateCounterDocPP.schedule(document); return null; } else { final Pair<ICounterDocHandler, IDocument> handlerandDocAction = getHandlerOrNull(document); return handlerandDocAction.getFirst().createCo...
* @return may return the {@link NullCounterDocumentHandler}, but never <code>null</code>. */ private Pair<ICounterDocHandler, IDocument> getHandlerOrNull(final Object document) { final String tableName = InterfaceWrapperHelper.getModelTableNameOrNull(document); if (Check.isEmpty(tableName) || !handlers.contains...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java\de\metas\document\impl\CounterDocBL.java
1
请完成以下Java代码
public LookupValuesPage retrieveEntities(final LookupDataSourceContext evalCtx) { return lookupValues.apply(evalCtx); } @Override public Optional<WindowId> getZoomIntoWindowId() { return Optional.empty(); } // // // // // @SuppressWarnings("OptionalUsedAsFieldOrParameterType") public static class Bu...
public Builder setLookupSourceType(@NonNull final LookupSource lookupSourceType) { this.lookupSourceType = lookupSourceType; return this; } public Builder setLookupValues(final boolean numericKey, final Function<LookupDataSourceContext, LookupValuesPage> lookupValues) { this.numericKey = numericKey; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\ListLookupDescriptor.java
1
请完成以下Java代码
public int getAD_SchedulerLog_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_SchedulerLog_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Binärwert. @param BinaryData Binary Data */ @Override public void setBinaryData (byte[] BinaryData) { set_Value (COLUMNNAME_BinaryDa...
/** Set Zusammenfassung. @param Summary Textual summary of this request */ @Override public void setSummary (java.lang.String Summary) { set_Value (COLUMNNAME_Summary, Summary); } /** Get Zusammenfassung. @return Textual summary of this request */ @Override public java.lang.String getSummary () ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_SchedulerLog.java
1
请完成以下Java代码
public XMLGregorianCalendar getDt() { return dt; } /** * Sets the value of the dt property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setDt(XMLGregorianCalendar value) { this.dt = value; } ...
* This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the rcrd property. * * <p> * For example, to add a new...
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\TaxInformation3.java
1
请完成以下Java代码
public void flush() { // Nothing to do } @Override public void close() { // Nothing to do } @Override public String getDatabaseType() { return dbSqlSession.getDbSqlSessionFactory().getDatabaseType(); } @Override public String getDatabaseTablePrefix() { ...
@Override public String getDatabaseSchema() { String schema = dbSqlSession.getConnectionMetadataDefaultSchema(); DbSqlSessionFactory dbSqlSessionFactory = dbSqlSession.getDbSqlSessionFactory(); if (dbSqlSessionFactory.getDatabaseSchema() != null && dbSqlSessionFactory.getDatabaseSchema().len...
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\db\DbSqlSessionSchemaManagerConfiguration.java
1
请完成以下Java代码
public Set<String> getCaseInstanceIds() { return caseInstanceIds; } public boolean isNeedsCaseDefinitionOuterJoin() { if (isNeedsPaging()) { if (AbstractEngineConfiguration.DATABASE_TYPE_ORACLE.equals(databaseType) || AbstractEngineConfiguration.DATABASE_TYPE_DB2...
public List<List<String>> getSafeInvolvedGroups() { return safeInvolvedGroups; } public void setSafeInvolvedGroups(List<List<String>> safeInvolvedGroups) { this.safeInvolvedGroups = safeInvolvedGroups; } public String getRootScopeId() { return rootScopeId; } public Str...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\history\HistoricCaseInstanceQueryImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class DistributionNetworkLine { @NonNull DistributionNetworkLineId id; @NonNull WarehouseId sourceWarehouseId; @NonNull WarehouseId targetWarehouseId; int priorityNo; @NonNull ShipperId shipperId; @NonNull Percent transferPercent; @NonNull Duration transferDuration; boolean isAllowPush; boolean isKeep...
@NonNull final Duration transferDuration, final boolean isAllowPush, final boolean isKeepTargetPlant) { if (transferPercent != null && transferPercent.signum() < 0) { throw new AdempiereException("Transfer percent cannot be negative"); } this.id = id; this.sourceWarehouseId = sourceWarehouseId; t...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\material\planning\ddorder\DistributionNetworkLine.java
2
请完成以下Java代码
public class GraphQLServer { public static void main(String[] args) { ServerBuilder sb = Server.builder(); sb.http(8080); sb.tlsSelfSigned(); sb.https(8443); sb.accessLogWriter(AccessLogWriter.common(), true); sb.service("/graphql", GraphqlService.builder().graphql...
private static GraphQL buildSchema() { GraphQLSchema schema = GraphQLSchema.newSchema() .query(GraphQLObjectType.newObject() .name("query") .field(GraphQLFieldDefinition.newFieldDefinition() .name("name") .type(GraphQLString) ...
repos\tutorials-master\server-modules\armeria\src\main\java\com\baeldung\armeria\GraphQLServer.java
1
请完成以下Java代码
boolean isSOTrx() { return isSOTrx; } public ProcessDialogBuilder setWhereClause(final String whereClause) { this.whereClause = whereClause; return this; } String getWhereClause() { return whereClause; } public ProcessDialogBuilder setTableAndRecord(final int AD_Table_ID, final int Record_ID) { t...
final int windowNo = gridTab.getWindowNo(); final int tabNo = gridTab.getTabNo(); setWindowAndTabNo(windowNo, tabNo); setAdWindowId(gridTab.getAdWindowId()); setIsSOTrx(Env.isSOTrx(gridTab.getCtx(), windowNo)); setTableAndRecord(gridTab.getAD_Table_ID(), gridTab.getRecord_ID()); setWhereClause(gridTab.get...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\process\ui\ProcessDialogBuilder.java
1
请完成以下Java代码
public boolean reverseCorrectIt() { throw new AdempiereException("@NotSupported@"); } @Override public boolean reverseAccrualIt() { throw new AdempiereException("@NotSupported@"); } @Override public boolean reActivateIt() { // Before reActivate m_processMsg = ModelValidationEngine.get().fireDocValida...
@Override public int getDoc_User_ID() { return getAD_User_ID(); } @Override public int getC_Currency_ID() { final I_M_PriceList pl = Services.get(IPriceListDAO.class).getById(getM_PriceList_ID()); return pl.getC_Currency_ID(); } /** * Get Document Approval Amount * * @return amount */ @Override...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\model\MRequisition.java
1
请完成以下Java代码
public LU markedAsPreExistingLU() { return this.isPreExistingLU ? this : toBuilder().isPreExistingLU(true).build(); } public HuId getId() {return HuId.ofRepoId(hu.getM_HU_ID());} public I_M_HU toHU() {return hu;} public Stream<I_M_HU> streamAllLUAndTURecords() { return Stream.concat(Stream.of(hu), ...
return list2; } else { final HashMap<HuId, LU> lusNew = new HashMap<>(); list1.forEach(lu -> lusNew.put(lu.getId(), lu)); list2.forEach(lu -> lusNew.compute(lu.getId(), (luId, existingLU) -> existingLU == null ? lu : existingLU.mergeWith(lu))); return ImmutableList.copyOf(lusNew.values()); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\allocation\transfer\LUTUResult.java
1
请在Spring Boot框架中完成以下Java代码
public String doLogin(String username, String password) { Subject subject = SecurityUtils.getSubject(); try { subject.login(new UsernamePasswordToken(username, password)); System.out.println("登录成功!"); return "redirect:/index"; } catch (AuthenticationException ...
} @GetMapping("/login") @ResponseBody public String login() { return "please login!"; } @GetMapping("/vip") @ResponseBody public String vip() { return "hello vip"; } @GetMapping("/common") @ResponseBody public String common() { return "hello commo...
repos\spring-boot-quick-master\quick-shiro\src\main\java\com\shiro\quick\controller\LoginController.java
2
请在Spring Boot框架中完成以下Java代码
public class CreateWarehouseUpsertRequestProcessor implements Processor { @Override public void process(final Exchange exchange) throws Exception { final GetWarehouseFromFileRouteContext routeContext = ProcessorHelper .getPropertyOrThrowError(exchange, ImportConstants.ROUTE_PROPERTY_GET_WAREHOUSE_CONTEXT, GetW...
.build(); return Optional.of(requestWarehouseUpsertItem); } @NonNull private static JsonRequestWarehouse getJsonRequestWarehouse(@NonNull final WarehouseRow warehouseRow) { final JsonRequestWarehouse requestWarehouse = new JsonRequestWarehouse(); requestWarehouse.setName(warehouseRow.getName()); requestWa...
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\warehouse\processor\CreateWarehouseUpsertRequestProcessor.java
2
请完成以下Java代码
public String getText() { if (isCmmn11()) { return getTextContent(); } else { return getBody(); } } public void setText(String text) { if (isCmmn11()) { setTextContent(text); } else { setBody(text); } } public String getBody() { Body body = bodyChild...
.instanceProvider(new ModelTypeInstanceProvider<Expression>() { public Expression newInstance(ModelTypeInstanceContext instanceContext) { return new ExpressionImpl(instanceContext); } }); languageAttribute = typeBuilder.stringAttribute(CMMN_ATTRIBUTE_LANGUAGE) .defau...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\ExpressionImpl.java
1
请完成以下Java代码
public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final ArchiveSetDataResponse other = (ArchiveSetDataResponse)obj; if (adArchiveId != other.adArchiveId) { return false;
} return true; } public int getAdArchiveId() { return adArchiveId; } public void setAdArchiveId(final int adArchiveId) { this.adArchiveId = adArchiveId; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.document.archive.api\src\main\java\de\metas\document\archive\esb\api\ArchiveSetDataResponse.java
1
请在Spring Boot框架中完成以下Java代码
public class ImportRecordsRequest { private static final String PARAM_ImportTableName = "ImportTableName"; @NonNull String importTableName; private static final String PARAM_AD_Client_ID = "AD_Client_ID"; @NonNull ClientId clientId; private static final String PARAM_Selection_ID = IImportProcess.PARAM_Selection_...
this.additionalParameters = Params.builder() .putAll(additionalParameters != null ? additionalParameters : Params.EMPTY) .value(PARAM_ImportTableName, this.importTableName) .value(PARAM_AD_Client_ID, this.clientId) .value(PARAM_Selection_ID, this.selectionId) .value(PARAM_Limit, this.limit.toIntOrZe...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\impexp\ImportRecordsRequest.java
2
请完成以下Java代码
public boolean cancel(boolean mayInterruptIfRunning) { return mainFuture.cancel(mayInterruptIfRunning); } @Override public boolean isCancelled() { return mainFuture.isCancelled(); } @Override public boolean isDone() { return mainFuture.isDone(); } @Override ...
@Override public void addListener(Runnable listener, Executor executor) { mainFuture.addListener(listener, executor); } private TbResultSet getSafe() { try { return mainFuture.get(); } catch (InterruptedException | ExecutionException e) { throw new IllegalSta...
repos\thingsboard-master\common\dao-api\src\main\java\org\thingsboard\server\dao\nosql\TbResultSetFuture.java
1
请完成以下Java代码
public boolean hasDifferences() { return diffInvoiceMinusPay.signum() != 0; } public boolean isMoreInvoicedThanPaid() { final int invoicedAmtSign = invoicedAmt.signum(); final int paymentAmtSign = paymentTotalAmt.signum(); if (invoicedAmtSign >= 0) { // Positive invoiced, positive paid if (payment...
// // public static final class Builder { private BigDecimal invoicedAmt = BigDecimal.ZERO; private BigDecimal paymentExistingAmt = BigDecimal.ZERO; private BigDecimal paymentCandidatesAmt = BigDecimal.ZERO; private Builder() { super(); } public PaymentAllocationTotals build() { return new Pa...
repos\metasfresh-new_dawn_uat\backend\de.metas.banking\de.metas.banking.swingui\src\main\java\de\metas\banking\payment\paymentallocation\model\PaymentAllocationTotals.java
1
请完成以下Java代码
public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescritpion() { return descritpion; } public void setDescritpion(String descritpion) { this.descritpion = descritpion; } public String getU...
public void setUrl(String url) { this.url = url; } public int getPid() { return pid; } public void setPid(int pid) { this.pid = pid; } }
repos\springBoot-master\springboot-SpringSecurity1\src\main\java\com\us\example\domain\Permission.java
1
请完成以下Java代码
public class AddEventListenerCommand implements Command<Void> { protected FlowableEventListener listener; protected FlowableEngineEventType[] types; public AddEventListenerCommand(FlowableEventListener listener, FlowableEngineEventType[] types) { this.listener = listener; this.types = typ...
@Override public Void execute(CommandContext commandContext) { if (listener == null) { throw new FlowableIllegalArgumentException("The listener to be registered must not be null."); } if (types != null) { CommandContextUtil.getCmmnEngineConfiguration(commandContext)....
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\cmd\AddEventListenerCommand.java
1
请完成以下Java代码
public void setIsIncludeAllAttributeValues (boolean IsIncludeAllAttributeValues) { set_Value (COLUMNNAME_IsIncludeAllAttributeValues, Boolean.valueOf(IsIncludeAllAttributeValues)); } /** Get Alle Attributwerte. @return Alle Attributwerte */ @Override public boolean isIncludeAllAttributeValues () { Objec...
Produkt-Merkmal */ @Override public void setM_Attribute_ID (int M_Attribute_ID) { if (M_Attribute_ID < 1) set_Value (COLUMNNAME_M_Attribute_ID, null); else set_Value (COLUMNNAME_M_Attribute_ID, Integer.valueOf(M_Attribute_ID)); } /** Get Merkmal. @return Produkt-Merkmal */ @Override public i...
repos\metasfresh-new_dawn_uat\backend\de.metas.dimension\src\main\java-gen\de\metas\dimension\model\X_DIM_Dimension_Spec_Attribute.java
1
请完成以下Java代码
public void setEsr9(Esr9Type value) { this.esr9 = value; } /** * Gets the value of the esrRed property. * * @return * possible object is * {@link EsrRedType } * */ public EsrRedType getEsrRed() { return esrRed; } /** * Sets the ...
* Gets the value of the esrQR property. * * @return * possible object is * {@link EsrQRType } * */ public EsrQRType getEsrQR() { return esrQR; } /** * Sets the value of the esrQR property. * * @param value * allowed object is ...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_response\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\response\ReimbursementType.java
1
请完成以下Java代码
public void set(final T value) { if (done) { throw new IllegalStateException("Value was already set"); } this.value = value; this.exception = null; this.done = true; this.canceled = false; latch.countDown(); } public void setError(final Exception e) { if (done) { throw new IllegalStateExc...
{ latch.await(); return get0(); } @Override public T get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { latch.await(timeout, unit); return get0(); } private T get0() throws ExecutionException { if (!done) { throw new IllegalStateException("Value ...
repos\metasfresh-new_dawn_uat\backend\de.metas.util\src\main\java\org\adempiere\util\concurrent\FutureValue.java
1
请完成以下Java代码
public class MigrationInstructionDto { protected List<String> sourceActivityIds; protected List<String> targetActivityIds; protected Boolean updateEventTrigger; public List<String> getSourceActivityIds() { return sourceActivityIds; } public void setSourceActivityIds(List<String> sourceActivityIds) { ...
public static MigrationInstructionDto from(MigrationInstruction migrationInstruction) { if (migrationInstruction != null) { MigrationInstructionDto dto = new MigrationInstructionDto(); dto.setSourceActivityIds(Collections.singletonList(migrationInstruction.getSourceActivityId())); dto.setTargetAc...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\migration\MigrationInstructionDto.java
1
请完成以下Java代码
public boolean isEmpty() {return ids.isEmpty();} public int size() {return ids.size();} @Override @NonNull public Iterator<ShipmentScheduleAndJobScheduleId> iterator() {return ids.iterator();} public Stream<ShipmentScheduleAndJobScheduleId> stream() {return ids.stream();} public Set<ShipmentScheduleAndJobSche...
public void forEachShipmentScheduleId(@NonNull final BiConsumer<ShipmentScheduleId, Set<PickingJobScheduleId>> consumer) { final LinkedHashMap<ShipmentScheduleId, HashSet<PickingJobScheduleId>> map = new LinkedHashMap<>(); ids.forEach(id -> { final HashSet<PickingJobScheduleId> jobScheduleIds = map.computeIfAb...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\picking\api\ShipmentScheduleAndJobScheduleIdSet.java
1
请完成以下Java代码
public class GRPCRequestHeadersFilter implements HttpHeadersFilter, Ordered { @Override public HttpHeaders filter(HttpHeaders headers, ServerWebExchange exchange) { HttpHeaders updated = new HttpHeaders(); for (Map.Entry<String, List<String>> entry : headers.headerSet()) { updated.addAll(entry.getKey(), entr...
private boolean isGRPC(@Nullable String contentTypeValue) { return StringUtils.startsWithIgnoreCase(contentTypeValue, "application/grpc"); } @Override public boolean supports(Type type) { return Type.REQUEST.equals(type); } @Override public int getOrder() { return Ordered.LOWEST_PRECEDENCE; } }
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\headers\GRPCRequestHeadersFilter.java
1
请在Spring Boot框架中完成以下Java代码
public class SAPGLJournalId implements RepoIdAware { @JsonCreator public static SAPGLJournalId ofRepoId(final int repoId) { return new SAPGLJournalId(repoId); } public static SAPGLJournalId ofRepoIdOrNull(final int repoId) { return repoId > 0 ? new SAPGLJournalId(repoId) : null; } int repoId; private SA...
@JsonValue @Override public int getRepoId() { return repoId; } public static int toRepoId(@Nullable final SAPGLJournalId id) { return id != null ? id.getRepoId() : -1; } public static boolean equals(@Nullable final SAPGLJournalId id1, @Nullable final SAPGLJournalId id2) { return Objects.equals(id1, id2...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java\de\metas\acct\gljournal_sap\SAPGLJournalId.java
2
请完成以下Java代码
public BigDecimal getAlreadyInvoicedNetSum() { if (_alreadyInvoicedSum == null) { final IInvoicedSumProvider invoicedSumProvider = qualityBasedConfigProviderService.getInvoicedSumProvider(); _alreadyInvoicedSum = invoicedSumProvider.getAlreadyInvoicedNetSum(_materialTracking); } if (_alreadyInvoicedSum =...
builder.append(", _qualityBasedConfig="); builder.append(_qualityBasedConfig); builder.append(", _inspectionNumber="); builder.append(_inspectionNumber); builder.append(", _productionMaterials="); builder.append(_productionMaterials); builder.append(", _productionMaterial_Raw="); builder.append(_productio...
repos\metasfresh-new_dawn_uat\backend\de.metas.materialtracking\src\main\java\de\metas\materialtracking\qualityBasedInvoicing\impl\QualityInspectionOrder.java
1
请在Spring Boot框架中完成以下Java代码
public @Nullable Boolean isAutoIndexCreation() { return this.autoIndexCreation; } public void setAutoIndexCreation(@Nullable Boolean autoIndexCreation) { this.autoIndexCreation = autoIndexCreation; } public @Nullable Class<?> getFieldNamingStrategy() { return this.fieldNamingStrategy; } public void setFi...
this.database = database; } public @Nullable String getBucket() { return this.bucket; } public void setBucket(@Nullable String bucket) { this.bucket = bucket; } } public static class Representation { /** * Representation to use when converting a BigDecimal. */ private @Nullable BigDecim...
repos\spring-boot-4.0.1\module\spring-boot-data-mongodb\src\main\java\org\springframework\boot\data\mongodb\autoconfigure\DataMongoProperties.java
2
请完成以下Java代码
public void setC_AcctSchema_ID (int C_AcctSchema_ID) { if (C_AcctSchema_ID < 1) set_Value (COLUMNNAME_C_AcctSchema_ID, null); else set_Value (COLUMNNAME_C_AcctSchema_ID, Integer.valueOf(C_AcctSchema_ID)); } /** Get Buchführungs-Schema. @return Stammdaten für Buchhaltung */ @Override public int ge...
*/ @Override public void setM_CostElement_ID (int M_CostElement_ID) { if (M_CostElement_ID < 1) set_Value (COLUMNNAME_M_CostElement_ID, null); else set_Value (COLUMNNAME_M_CostElement_ID, Integer.valueOf(M_CostElement_ID)); } /** Get Kostenart. @return Produkt-Kostenart */ @Override public int ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_AcctSchema_CostElement.java
1
请完成以下Java代码
public ImmutableList<IDocumentDecorator> getDocumentDecorators() { return this.documentDecorators; } public Builder setRefreshViewOnChangeEvents(final boolean refreshViewOnChangeEvents) { this._refreshViewOnChangeEvents = refreshViewOnChangeEvents; return this; } private boolean isRefreshViewOnCh...
return false; } return CopyRecordFactory.isEnabledForTableName(tableName.get()); } public DocumentQueryOrderByList getDefaultOrderBys() { return getFieldBuilders() .stream() .filter(DocumentFieldDescriptor.Builder::isDefaultOrderBy) .sorted(Ordering.natural().onResultOf(DocumentFieldDesc...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\descriptor\DocumentEntityDescriptor.java
1
请完成以下Java代码
public void setVolume (final @Nullable BigDecimal Volume) { set_Value (COLUMNNAME_Volume, Volume); } @Override public BigDecimal getVolume() { final BigDecimal bd = get_ValueAsBigDecimal(COLUMNNAME_Volume); return bd != null ? bd : BigDecimal.ZERO; } @Override public void setWeight (final @Nullable Big...
@Override public void setExternalSystem_ID (final int ExternalSystem_ID) { if (ExternalSystem_ID < 1) set_Value (COLUMNNAME_ExternalSystem_ID, null); else set_Value (COLUMNNAME_ExternalSystem_ID, ExternalSystem_ID); } @Override public int getExternalSystem_ID() { return get_ValueAsInt(COLUMNNAME_Exte...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_InOut.java
1
请完成以下Java代码
public KeyNamePair getKeyNamePair() { return new KeyNamePair(get_ID(), getName()); } /** Set Subject. @param Subject Email Message Subject */ public void setSubject (String Subject) { set_Value (COLUMNNAME_Subject, Subject); } /** Get Subject. @return Email Message Subject */ pub...
.getPO(getW_Store_ID(), get_TrxName()); } /** Set Web Store. @param W_Store_ID A Web Store of the Client */ public void setW_Store_ID (int W_Store_ID) { if (W_Store_ID < 1) set_Value (COLUMNNAME_W_Store_ID, null); else set_Value (COLUMNNAME_W_Store_ID, Integer.valueOf(W_Store_ID)); } /** Get ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_W_MailMsg.java
1
请完成以下Java代码
public IncidentQuery jobDefinitionIdIn(String... jobDefinitionIds) { ensureNotNull("jobDefinitionIds", (Object[]) jobDefinitionIds); this.jobDefinitionIds = jobDefinitionIds; return this; } //ordering //////////////////////////////////////////////////// public IncidentQuery orderByIncidentId() { ...
} @Override public IncidentQuery orderByIncidentMessage() { return orderBy(IncidentQueryProperty.INCIDENT_MESSAGE); } //results //////////////////////////////////////////////////// @Override public long executeCount(CommandContext commandContext) { checkQueryOk(); return commandContext ...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\IncidentQueryImpl.java
1
请完成以下Java代码
protected void configure(HttpSecurity http) throws Exception { http .csrf().disable() .sessionManagement() .sessionCreationPolicy(SessionCreationPolicy.STATELESS) .and() .addFilter(new JwtUsernameAndPasswordAuthenticationFilter(auth...
.build(); UserDetails tomUser = User.builder() .username("tom") .password(passwordEncoder.encode("tom555")) .authorities(ADMINTRAINEE.name()) // .authorities(ADMINTRAINEE.getGrantedAuthorities()) .roles(ADMIN...
repos\SpringBoot-Projects-FullStack-master\Advanced-SpringSecure\jwt-secure\spring-jwt-secure\src\main\java\uz\bepro\springjwtsecure\security\ApplicationSecurityConfig.java
1
请完成以下Java代码
public void setApiKey(String apiKey) { this.apiKey = apiKey; } public String getApiKeyPrefix() { return apiKeyPrefix; } public void setApiKeyPrefix(String apiKeyPrefix) { this.apiKeyPrefix = apiKeyPrefix; } @Override public void applyToParams(MultiValueMap<String, ...
} String value; if (apiKeyPrefix != null) { value = apiKeyPrefix + " " + apiKey; } else { value = apiKey; } if (location.equals("query")) { queryParams.add(paramName, value); } else if (location.equals("header")) { headerPar...
repos\tutorials-master\spring-swagger-codegen-modules\spring-openapi-generator-api-client\src\main\java\com\baeldung\petstore\client\invoker\auth\ApiKeyAuth.java
1
请在Spring Boot框架中完成以下Java代码
private void bindEntityManagerFactoriesToRegistry(Map<String, EntityManagerFactory> entityManagerFactories, MeterRegistry registry) { entityManagerFactories.forEach((name, factory) -> bindEntityManagerFactoryToRegistry(name, factory, registry)); } private void bindEntityManagerFactoryToRegistry(String beanName,...
/** * Get the name of an {@link EntityManagerFactory} based on its {@code beanName}. * @param beanName the name of the {@link EntityManagerFactory} bean * @return a name for the given entity manager factory */ private String getEntityManagerFactoryName(String beanName) { if (beanName.length() > ENTITY_MANAGE...
repos\spring-boot-4.0.1\module\spring-boot-hibernate\src\main\java\org\springframework\boot\hibernate\autoconfigure\metrics\HibernateMetricsAutoConfiguration.java
2
请完成以下Java代码
public class OrderLine { @EntityId private final String productId; private Integer count; private boolean orderConfirmed; public OrderLine(String productId) { this.productId = productId; this.count = 1; } @CommandHandler public void handle(IncrementProductCountCommand ...
@EventSourcingHandler public void on(OrderConfirmedEvent event) { this.orderConfirmed = true; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ...
repos\tutorials-master\patterns-modules\axon\src\main\java\com\baeldung\axon\commandmodel\order\OrderLine.java
1
请完成以下Java代码
public List<User> getUserList() { List<User> r = new ArrayList<User>(users.values()); return r; } @ApiOperation(value="创建用户", notes="根据User对象创建用户") @ApiImplicitParam(name = "user", value = "用户详细实体user", required = true, dataType = "User") @RequestMapping(value="", method=RequestMethod.P...
@RequestMapping(value="/{id}", method=RequestMethod.PUT) public String putUser(@PathVariable Long id, @RequestBody User user) { User u = users.get(id); u.setName(user.getName()); u.setAge(user.getAge()); users.put(id, u); return "success"; } @ApiOperation(value="删除用户...
repos\SpringBoot-Learning-master\1.x\Chapter3-1-5\src\main\java\com\didispace\web\UserController.java
1
请完成以下Java代码
public I_C_Flatrate_Term getById(@NonNull final FlatrateTermId flatrateTermId) { return flatrateDAO.getById(flatrateTermId); } @Override public ImmutableList<I_C_Flatrate_Term> retrieveNextFlatrateTerms(@NonNull final I_C_Flatrate_Term term) { I_C_Flatrate_Term currentTerm = term; final ImmutableList.Build...
return nextFTsBuilder.build(); } @Override public final boolean existsTermForOrderLine(final I_C_OrderLine ol) { return Services.get(IQueryBL.class) .createQueryBuilder(I_C_Flatrate_Term.class, ol) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_C_Flatrate_Term.COLUMN_C_OrderLine_Term_ID, ol.getC_Or...
repos\metasfresh-new_dawn_uat\backend\de.metas.contracts\src\main\java\de\metas\contracts\impl\FlatrateBL.java
1
请完成以下Java代码
public WFActivityType getHandledActivityType() {return HANDLED_ACTIVITY_TYPE;} @Override public UIComponent getUIComponent( final @NonNull WFProcess wfProcess, final @NonNull WFActivity wfActivity, final @NonNull JsonOpts jsonOpts) { return SetScannedBarcodeSupportHelper.uiComponent() .alwaysAvailabl...
.caption(scaleDevice.getCaption().translate(adLanguage)) .build(); return JsonQRCode.builder() .qrCode(qrCode.toGlobalQRCodeJsonString()) .caption(qrCode.getCaption()) .build(); } @Override public WFActivityStatus computeActivityState(final WFProcess wfProcess, final WFActivity wfActivity) { r...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing.rest-api\src\main\java\de\metas\manufacturing\workflows_api\activity_handlers\scanScaleDevice\ScanScaleDeviceActivityHandler.java
1
请在Spring Boot框架中完成以下Java代码
public class BookstoreService { private final AuthorRepository authorRepository; private final BookRepository bookRepository; public BookstoreService(AuthorRepository authorRepository, BookRepository bookRepository) { this.authorRepository = authorRepository; this.bookRepositor...
books.forEach((e) -> System.out.println("Book title: " + e.getTitle() + ", Isbn: " + e.getIsbn() + ", author: " + e.getAuthor())); // causes extra SELECTs but the result is ok } // JOIN FETCH public void fetchAuthorsBooksByPriceJoinFetch() { List<Author> authors = authorRepository.f...
repos\Hibernate-SpringBoot-master\HibernateSpringBootJoinVSJoinFetch\src\main\java\com\bookstore\service\BookstoreService.java
2
请完成以下Java代码
public class SignalEventDefinition extends EventDefinition { protected String signalRef; protected String signalExpression; protected boolean async; public String getSignalRef() { return signalRef; } public void setSignalRef(String signalRef) { this.signalRef = signalRef; ...
} public SignalEventDefinition clone() { SignalEventDefinition clone = new SignalEventDefinition(); clone.setValues(this); return clone; } public void setValues(SignalEventDefinition otherDefinition) { super.setValues(otherDefinition); setSignalRef(otherDefinition.g...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\SignalEventDefinition.java
1
请在Spring Boot框架中完成以下Java代码
public class MiddleCategory implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; @OneToMany(cascade = CascadeType.ALL, mappedBy = "middleCategory", orphanRemoval = ...
public TopCategory getTopCategory() { return topCategory; } public void setTopCategory(TopCategory topCategory) { this.topCategory = topCategory; } @Override public int hashCode() { return 2018; } @Override public boolean equals(Object obj) { if (this =...
repos\Hibernate-SpringBoot-master\HibernateSpringBootDtoSqlResultSetMapping\src\main\java\com\app\entity\MiddleCategory.java
2
请完成以下Java代码
public boolean isMaterialReceipt() { return this == MaterialReceipt; } public boolean isMaterialReceiptOrCoProduct() { return isMaterialReceipt() || isCoOrByProductReceipt(); } public boolean isComponentIssue() { return this == ComponentIssue; } public boolean isAnyComponentIssueOrCoProduct(@Nullable ...
{ return this == UsageVariance; } public boolean isMaterialUsageVariance(@Nullable final PPOrderBOMLineId orderBOMLineId) { return this == UsageVariance && orderBOMLineId != null; } public boolean isResourceUsageVariance(@Nullable final PPOrderRoutingActivityId activityId) { return this == UsageVariance &...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\org\eevolution\api\CostCollectorType.java
1
请完成以下Java代码
public List<Coordinate> solve(Maze maze) { List<Coordinate> path = new ArrayList<>(); if (explore(maze, maze.getEntry() .getX(), maze.getEntry() .getY(), path)) { return path; } return Collections.emptyList(); } pri...
if (maze.isExit(row, col)) { return true; } for (int[] direction : DIRECTIONS) { Coordinate coordinate = getNextCoordinate(row, col, direction[0], direction[1]); if (explore(maze, coordinate.getX(), coordinate.getY(), path)) { return true; ...
repos\tutorials-master\algorithms-modules\algorithms-miscellaneous-2\src\main\java\com\baeldung\algorithms\maze\solver\DFSMazeSolver.java
1
请完成以下Java代码
private static void setPackagingGTINsToPack( @NonNull final HU rootHU, @NonNull final BPartnerId bPartnerId, @NonNull final CreateEDIDesadvPackRequest.CreateEDIDesadvPackRequestBuilder createEDIDesadvPackRequestBuilder) { final String packagingGTIN = rootHU.getPackagingGTIN(bPartnerId); if (isNotBlank(pac...
HU topLevelHU; @NonNull BPartnerId bPartnerId; @NonNull StockQtyAndUOMQty quantity; @NonNull ProductId productId; @NonNull I_EDI_DesadvLine desadvLineRecord; @NonNull I_M_InOutLine inOutLineRecord; @NonNull DesadvLineWithDraftedPackItems desadvLineWithPacks; @NonNull InvoicableQtyBasedOn inv...
repos\metasfresh-new_dawn_uat\backend\de.metas.edi\src\main\java\de\metas\edi\api\impl\pack\EDIDesadvPackService.java
1
请完成以下Java代码
public class QuartzJob extends BaseEntity implements Serializable { public static final String JOB_KEY = "JOB_KEY"; @Id @Column(name = "job_id") @NotNull(groups = {Update.class}) @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Transient @ApiModelProperty(value = ...
private String params; @NotBlank @ApiModelProperty(value = "cron表达式") private String cronExpression; @ApiModelProperty(value = "状态,暂时或启动") private Boolean isPause = false; @ApiModelProperty(value = "负责人") private String personInCharge; @ApiModelProperty(value = "报警邮箱") private St...
repos\eladmin-master\eladmin-system\src\main\java\me\zhengjie\modules\quartz\domain\QuartzJob.java
1
请完成以下Java代码
public final int hashCode() { String key = getKey(); Object value = getValue(); return (key == null ? 0 : key.hashCode()) ^ (value == null ? 0 : value.hashCode()); } }; } public void remove() { iterator.remove(); ...
} stringBuilder.append("}"); return stringBuilder.toString(); } public boolean equals(Object obj) { return asValueMap().equals(obj); } public int hashCode() { return asValueMap().hashCode(); } public Map<String, Object> asValueMap() { return new HashMap<String, Object>(this); } p...
repos\camunda-bpm-platform-master\commons\typed-values\src\main\java\org\camunda\bpm\engine\variable\impl\VariableMapImpl.java
1
请完成以下Java代码
private void queryFindByName() { Author author1 = this.authorRepository.queryFindByName("Josh Long").orElse(null); Author author2 = this.authorRepository.queryFindByName("Martin Kleppmann").orElse(null); System.out.printf("queryFindByName(): author1 = %s%n", author1); System.out.printf("queryFindByName(): auth...
System.out.printf("listAllAuthors(): author = %s%n", author); for (Book book : author.getBooks()) { System.out.printf("\t%s%n", book); } } } private void insertAuthors() { Author author1 = this.authorRepository.save(new Author(null, "Josh Long", Set.of(new Book(null, "Reactive Spring"), new Book(nu...
repos\spring-data-examples-main\jdbc\graalvm-native\src\main\java\example\springdata\jdbc\graalvmnative\CLR.java
1
请完成以下Java代码
public void sendDashboardItemChangedEvent( @NonNull final UserDashboard dashboard, @NonNull final UserDashboardItemChangeResult changeResult) { sendEvents( getWebsocketTopicNamesByDashboardId(dashboard.getId()), toJSONDashboardChangedEventsList(changeResult)); } private static JSONDashboardChangedEv...
if (websocketEndpoints.isEmpty() || events.isEmpty()) { return; } for (final WebsocketTopicName websocketEndpoint : websocketEndpoints) { websocketSender.convertAndSend(websocketEndpoint, events); logger.trace("Notified WS {}: {}", websocketEndpoint, events); } } private ImmutableSet<WebsocketTop...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\dashboard\websocket\UserDashboardWebsocketSender.java
1
请完成以下Java代码
public java.sql.Timestamp getRfq_BidEndDate () { return (java.sql.Timestamp)get_Value(COLUMNNAME_Rfq_BidEndDate); } /** Set Bid start date. @param Rfq_BidStartDate Bid start date */ @Override public void setRfq_BidStartDate (java.sql.Timestamp Rfq_BidStartDate) { set_Value (COLUMNNAME_Rfq_BidStartDate, ...
@Override public org.compiere.model.I_AD_User getSalesRep() throws RuntimeException { return get_ValueAsPO(COLUMNNAME_SalesRep_ID, org.compiere.model.I_AD_User.class); } @Override public void setSalesRep(org.compiere.model.I_AD_User SalesRep) { set_ValueFromPO(COLUMNNAME_SalesRep_ID, org.compiere.model.I_AD_...
repos\metasfresh-new_dawn_uat\backend\de.metas.rfq\src\main\java-gen\de\metas\rfq\model\X_C_RfQ.java
1
请完成以下Java代码
public StringBuffer get_rss2ItemCode(StringBuffer xmlCode, MNewsChannel thisChannel) { if (this != null) // never null ?? { xmlCode.append ("<item>"); xmlCode.append ("<CM_NewsItem_ID>"+ this.get_ID() + "</CM_NewsItem_ID>"); xmlCode.append (" <title><![CDATA[" + this.getTitle () + "]]></title>"); ...
} reIndex(newRecord); return success; } // afterSave /** * reIndex * @param newRecord */ public void reIndex(boolean newRecord) { int CMWebProjectID = 0; if (getNewsChannel()!=null) CMWebProjectID = getNewsChannel().getCM_WebProject_ID(); String [] toBeIndexed = new String[4]; toBeIndexed[0]...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-legacy\org\compiere\model\MNewsItem.java
1
请完成以下Java代码
public String getOnTransaction() { return onTransaction; } public void setOnTransaction(String onTransaction) { this.onTransaction = onTransaction; } /** * Return the script info, if present. * <p> * ScriptInfo must be populated, when {@code <executionListener type="scri...
public void setValues(FlowableListener otherListener) { super.setValues(otherListener); setEvent(otherListener.getEvent()); setSourceState(otherListener.getSourceState()); setTargetState(otherListener.getTargetState()); setImplementation(otherListener.getImplementation()); ...
repos\flowable-engine-main\modules\flowable-cmmn-model\src\main\java\org\flowable\cmmn\model\FlowableListener.java
1
请完成以下Java代码
public Quantity getSingleQtyToPickOrNull() { return extractQtyToPickOrNull(lines, PickingJobLine::getProductId, PickingJobLine::getQtyToPick); } @Nullable private static <T> Quantity extractQtyToPickOrNull( @NonNull final Collection<T> lines, @NonNull final Function<T, ProductId> extractProductId, @NonN...
return null; } } return qtyToPick; } @NonNull public ImmutableSet<HuId> getPickedHuIds(@Nullable final PickingJobLineId lineId) { return lineId != null ? getLineById(lineId).getPickedHUIds() : getAllPickedHuIds(); } public ImmutableSet<HuId> getAllPickedHuIds() { return streamLines() .m...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\handlingunits\picking\job\model\PickingJob.java
1
请完成以下Java代码
public class PairFrequency extends TermFrequency { /** * 互信息值 */ public double mi; /** * 左信息熵 */ public double le; /** * 右信息熵 */ public double re; /** * 分数 */ public double score; public String first; public String second; public char d...
return pairFrequency; } /** * 该共现是否统计的是否是从左到右的顺序 * @return */ public boolean isRight() { return delimiter == Occurrence.RIGHT; } @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append(first); sb.append...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\occurrence\PairFrequency.java
1
请在Spring Boot框架中完成以下Java代码
public Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) throws AuthenticationException, IOException, ServletException { if (!HttpMethod.POST.name().equals(request.getMethod())) { if(log.isDebugEnabled()) { log.debug("Authentic...
return this.getAuthenticationManager().authenticate(token); } @Override protected void successfulAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain chain, Authentication authResult) throws IOException, ServletException { ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\security\auth\rest\RestLoginProcessingFilter.java
2
请完成以下Java代码
protected ProcessEngineConfiguration getProcessEngineConfiguration() { return engine.getProcessEngineConfiguration(); } @Override public void deleteVariable(String variableName) { try { removeVariableEntity(variableName); } catch (AuthorizationException e) { throw e; } catch (ProcessE...
throw e; } catch (ProcessEngineException e) { String errorMessage = String.format("Cannot modify variables for %s %s: %s", getResourceTypeName(), resourceId, e.getMessage()); throw new RestException(Status.INTERNAL_SERVER_ERROR, e, errorMessage); } } protected abstract VariableMap getVariable...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\sub\impl\AbstractVariablesResource.java
1
请完成以下Java代码
public LookupValuesList computeTargetExportStatusLookupValues(final EDIExportStatus fromExportStatus) { final List<EDIExportStatus> availableTargetStatuses = ChangeEDI_ExportStatusHelper.getAvailableTargetExportStatuses(fromExportStatus); return availableTargetStatuses.stream() .map(s -> LookupValue.StringLoo...
{ final TableRecordReference recordReference = TableRecordReference.ofReferenced(docOutboundLog); if (!I_C_Invoice.Table_Name.equals(recordReference.getTableName())) { return true; } if (Check.isBlank(docOutboundLog.getEDI_ExportStatus())) { return true; } return false; } }
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\edi_desadv\ChangeEDI_ExportStatusHelper.java
1
请完成以下Java代码
public List<Object[]> findAllIdAndNamesUsingCriteriaBuilderArray() { CriteriaBuilder builder = entityManager.getCriteriaBuilder(); CriteriaQuery<Object[]> query = builder.createQuery(Object[].class); Root<Product> product = query.from(Product.class); query.select(builder.array(product.ge...
} public List<Object[]> findCountByCategoryUsingJPQL() { Query query = entityManager.createQuery("select p.category, count(p) from Product p group by p.category"); return query.getResultList(); } public List<Object[]> findCountByCategoryUsingCriteriaBuilder() { CriteriaBuil...
repos\tutorials-master\persistence-modules\java-jpa-2\src\main\java\com\baeldung\jpa\projections\ProductRepository.java
1
请完成以下Java代码
public String getCaseInstanceId() { return caseInstanceId; } @Override public void setCaseInstanceId(String caseInstanceId) { this.caseInstanceId = caseInstanceId; } @Override public String getPlanItemInstanceId() { return planItemInstanceId; } @Override pu...
this.onPartId = onPartId; } @Override public String getIfPartId() { return ifPartId; } @Override public void setIfPartId(String ifPartId) { this.ifPartId = ifPartId; } @Override public Date getTimeStamp() { return timeStamp; } @Override public ...
repos\flowable-engine-main\modules\flowable-cmmn-engine\src\main\java\org\flowable\cmmn\engine\impl\persistence\entity\SentryPartInstanceEntityImpl.java
1
请在Spring Boot框架中完成以下Java代码
public class YellowPagesController { private static final String HTML = "<html><title>Yellow Pages</title><body bgcolor=\"#F5FC1D\" text=\"black\"><h1>%s</h1><body><html>"; @Autowired private YellowPagesService yellowPages; @GetMapping("/") public String home() { return format("Near Caching Example"); } ...
} @GetMapping("/yellow-pages/{name}/update") public String update(@PathVariable("name") String name, @RequestParam(name = "email", required = false) String email, @RequestParam(name = "phoneNumber", required = false) String phoneNumber) { Person person = this.yellowPages.save(this.yellowPages.find(name), em...
repos\spring-boot-data-geode-main\spring-geode-samples\caching\near\src\main\java\example\app\caching\near\client\controller\YellowPagesController.java
2
请在Spring Boot框架中完成以下Java代码
public Long lSize(String key) { return redisTemplate.opsForList().size(key); } @Override public Object lIndex(String key, long index) { return redisTemplate.opsForList().index(key, index); } @Override public Long lPush(String key, Object value) { return redisTemplate.op...
return redisTemplate.opsForList().rightPushAll(key, values); } @Override public Long lPushAll(String key, Long time, Object... values) { Long count = redisTemplate.opsForList().rightPushAll(key, values); expire(key, time); return count; } @Override public Long lRemove(S...
repos\mall-master\mall-common\src\main\java\com\macro\mall\common\service\impl\RedisServiceImpl.java
2
请完成以下Java代码
public class InOutCreateConfirm extends JavaProcess { /** Shipment */ private int p_M_InOut_ID = 0; /** Confirmation Type */ private String p_ConfirmType = null; /** * Prepare - e.g., get Parameters. */ protected void prepare() { ProcessInfoParameter[] para = getParametersAsArray(); for (int i ...
p_M_InOut_ID = getRecord_ID(); } // prepare /** * Create Confirmation * @return document no * @throws Exception */ protected String doIt () throws Exception { log.info("M_InOut_ID=" + p_M_InOut_ID + ", Type=" + p_ConfirmType); MInOut shipment = new MInOut (getCtx(), p_M_InOut_ID, get_TrxName()); if ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business\src\main\java-legacy\org\compiere\process\InOutCreateConfirm.java
1
请在Spring Boot框架中完成以下Java代码
public boolean isCachable() { return true; } @Override public boolean isAbleToStore(Object value) { if (value == null) { return true; } return Instant.class.isAssignableFrom(value.getClass()); } @Override public Object getValue(ValueFields valueField...
return Instant.ofEpochMilli(longValue); } return null; } @Override public void setValue(Object value, ValueFields valueFields) { if (value != null) { Instant instant = (Instant) value; valueFields.setLongValue(instant.toEpochMilli()); } else { ...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\InstantType.java
2
请完成以下Java代码
public class NameAgeEntity { private Integer age; private Long count; private String name; public NameAgeEntity() { super(); } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public Long getCount() { ...
return false; if (getClass() != obj.getClass()) return false; NameAgeEntity other = (NameAgeEntity) obj; if (age == null) { if (other.age != null) return false; } else if (!age.equals(other.age)) return false; if (count == null)...
repos\tutorials-master\spring-web-modules\spring-thymeleaf-attributes\accessing-session-attributes\src\main\java\com\baeldung\accesing_session_attributes\business\entities\NameAgeEntity.java
1