instruction
string
input
string
output
string
source_file
string
priority
int64
请完成以下Java代码
protected String doIt() throws Exception { final I_C_InvoiceSchedule invoiceScheduleRecord; if (getProcessInfo().getRecord_ID() <= 0) { invoiceScheduleRecord = InterfaceWrapperHelper.newInstance(I_C_InvoiceSchedule.class); isNewRecord = true; } else { invoiceScheduleRecord = getProcessInfo().getRe...
return invoiceScheduleRecord.getInvoiceDay(); } else if (I_C_InvoiceSchedule.COLUMNNAME_InvoiceWeekDay.equals(parameter.getColumnName())) { return invoiceScheduleRecord.getInvoiceWeekDay(); } else if (I_C_InvoiceSchedule.COLUMNNAME_IsAmount.equals(parameter.getColumnName())) { return invoiceScheduleRe...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\invoice\process\C_InvoiceSchedule_CreateOrUpdate.java
1
请完成以下Java代码
public static void create(final JsonNodeTrx wtx) { wtx.insertObjectAsFirstChild(); wtx.insertObjectRecordAsFirstChild("foo", new ArrayValue()) .insertStringValueAsFirstChild("bar") .insertNullValueAsRightSibling() .insertNumberValueAsRightSibling(2.33); wtx.mov...
public static void createVersioned(final JsonNodeTrx wtx) { // Create sample document. JsonDocumentCreator.create(wtx); wtx.commit(); // Add changes and commit a second revision. wtx.moveToDocumentRoot().trx().moveToFirstChild(); wtx.insertObjectRecordAsFirstChild("revis...
repos\tutorials-master\persistence-modules\sirix\src\main\java\io\sirix\tutorial\json\JsonDocumentCreator.java
1
请完成以下Java代码
private void createArchive( final I_C_Print_Package printPackage, final byte[] data, final I_C_Async_Batch asyncBatch, final int current) { final TableRecordReference printPackageRef = TableRecordReference.of(printPackage); final Properties ctx = InterfaceWrapperHelper.getCtx(asyncBatch); final org....
AsyncHelper.setAsyncBatchId(archive, AsyncBatchId.ofRepoId(asyncBatch.getC_Async_Batch_ID())); InterfaceWrapperHelper.save(directArchive); } private void createPrintPackage(final I_C_Print_Job_Instructions printjobInstructions) { final IPrintPackageBL printPackageBL = Services.get(IPrintPackageBL.class); fi...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\async\spi\impl\PDFDocPrintingWorkpackageProcessor.java
1
请完成以下Java代码
public Mono<Authentication> authenticate(Authentication authentication) { // @formatter:off return Mono.justOrEmpty(authentication) .filter((a) -> a instanceof BearerTokenAuthenticationToken) .cast(BearerTokenAuthenticationToken.class) .map(BearerTokenAuthenticationToken::getToken) .flatMap(this.jwt...
*/ public void setJwtAuthenticationConverter( Converter<Jwt, ? extends Mono<? extends AbstractAuthenticationToken>> jwtAuthenticationConverter) { Assert.notNull(jwtAuthenticationConverter, "jwtAuthenticationConverter cannot be null"); this.jwtAuthenticationConverter = jwtAuthenticationConverter; } private Au...
repos\spring-security-main\oauth2\oauth2-resource-server\src\main\java\org\springframework\security\oauth2\server\resource\authentication\JwtReactiveAuthenticationManager.java
1
请完成以下Java代码
private static final class MessagePanel extends JScrollPane { private static final long serialVersionUID = 1L; private final StringBuffer messageBuf = new StringBuffer(); private final JEditorPane message = new JEditorPane() { private static final long serialVersionUID = 1L; @Override public Dimensi...
{ messageBuf.setLength(0); appendText(text); } public void appendText(final String text) { messageBuf.append(text); message.setText(messageBuf.toString()); } @Override public Dimension getPreferredSize() { final Dimension d = super.getPreferredSize(); final Dimension m = getMaximumSize...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\de\metas\process\ui\ProcessPanel.java
1
请完成以下Java代码
private @Nullable List<GraphQLError> resolveInternal(Throwable exception, DataFetchingEnvironment env) { try { return (this.threadLocalContextAware) ? ContextPropagationHelper.captureFrom(env.getGraphQlContext()) .wrap(() -> resolveToMultipleErrors(exception, env)) .call() : resolveToMultip...
GraphQLError error = resolveToSingleError(ex, env); return (error != null) ? Collections.singletonList(error) : null; } /** * Override this method to resolve an Exception to a single GraphQL error. * @param ex the exception to resolve * @param env the environment for the invoked {@code DataFetcher} * @retu...
repos\spring-graphql-main\spring-graphql\src\main\java\org\springframework\graphql\execution\DataFetcherExceptionResolverAdapter.java
1
请完成以下Java代码
public String toString() { StringBuffer sb = new StringBuffer("X_M_PackagingTreeItemSched[") .append(get_ID()).append("]"); return sb.toString(); } /** * Set Packaging Tree Item Schedule. * * @param M_PackagingTreeItemSched_ID * Packaging Tree Item Schedule */ public void setM_Packagi...
if (ii == null) return 0; return ii.intValue(); } @Override public I_M_ShipmentSchedule getM_ShipmentSchedule() throws RuntimeException { return (I_M_ShipmentSchedule)MTable.get(getCtx(), I_M_ShipmentSchedule.Table_Name) .getPO(getM_ShipmentSchedule_ID(), get_TrxName()); } @Override public int getM_...
repos\metasfresh-new_dawn_uat\backend\de.metas.swat\de.metas.swat.base\src\main\java-gen\org\compiere\model\X_M_PackagingTreeItemSched.java
1
请在Spring Boot框架中完成以下Java代码
class GitHubBasicService { private GitHubBasicApi gitHubApi; GitHubBasicService() { Retrofit retrofit = new Retrofit.Builder().baseUrl("https://api.github.com/").addConverterFactory(GsonConverterFactory.create()).build(); gitHubApi = retrofit.create(GitHubBasicApi.class); } List<Stri...
} private Stream<Contributor> getContributors(String userName, Repository repo) { List<Contributor> contributors = null; try { contributors = gitHubApi.listRepoContributors(userName, repo.getName()).execute().body(); } catch (IOException e) { e.printStackTrace(); ...
repos\tutorials-master\libraries-http-2\src\main\java\com\baeldung\retrofit\basic\GitHubBasicService.java
2
请完成以下Java代码
public Long call() { try { List<Worker> workers = new ArrayList<>(); CountDownLatch counter = new CountDownLatch(workerCount); for (int i = 0; i < workerCount; i++) { Connection conn = factory.newConnection(); workers.add(new Worke...
log.info("[I59] Tasks completed: #workers={}, #iterations={}, elapsed={}ms, stats={}", workerCount, iterations, elapsed); return throughput(workerCount, iterations, elapsed); } else { throw new RuntimeException("[E61] Timeout waiting workers to complete"); } ...
repos\tutorials-master\messaging-modules\rabbitmq\src\main\java\com\baeldung\benchmark\ConnectionPerChannelPublisher.java
1
请完成以下Java代码
public String getSubjectName() { return subjectName; } public void setSubjectName(String subjectName) { this.subjectName = subjectName; } public Integer getRecommendStatus() { return recommendStatus; } public void setRecommendStatus(Integer recommendStatus) { t...
this.sort = sort; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", subjectId=").append(s...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\SmsHomeRecommendSubject.java
1
请完成以下Java代码
private static final class ElementValuesMap { private final ImmutableMap<ElementValueId, ElementValue> byId; private ImmutableSet<ElementValueId> _openItemIds; private ElementValuesMap(final List<ElementValue> list) { byId = Maps.uniqueIndex(list, ElementValue::getId); } public ElementValue getById(fi...
public ImmutableSet<ElementValueId> getOpenItemIds() { ImmutableSet<ElementValueId> openItemIds = this._openItemIds; if (openItemIds == null) { openItemIds = this._openItemIds = byId.values() .stream() .filter(ElementValue::isOpenItem) .map(ElementValue::getId) .collect(ImmutableS...
repos\metasfresh-new_dawn_uat\backend\de.metas.acct.base\src\main\java\de\metas\elementvalue\ElementValueRepository.java
1
请完成以下Java代码
public void onC_Order_ID(final I_DD_Order ddOrder) { final I_C_Order order = ddOrder.getC_Order(); if (order == null || order.getC_Order_ID() <= 0) { return; } // Get Details ddOrder.setDateOrdered(order.getDateOrdered()); ddOrder.setPOReference(order.getPOReference()); ddOrder.setAD_Org_ID(order.g...
// Warehouse (05251 begin: we need to use the advisor) final WarehouseId warehouseId = Services.get(IWarehouseAdvisor.class).evaluateOrderWarehouse(order); Check.assumeNotNull(warehouseId, "IWarehouseAdvisor finds a ware house for {}", order); ddOrder.setM_Warehouse_ID(warehouseId.getRepoId()); // ddOrder.se...
repos\metasfresh-new_dawn_uat\backend\de.metas.manufacturing\src\main\java\de\metas\distribution\ddorder\lowlevel\callout\DD_Order.java
1
请完成以下Java代码
public ExpenseCategory getCategory() { return category == null ? null : ExpenseCategory.fromId(category); } public void setCategory(ExpenseCategory category) { this.category = category == null ? null : category.getId(); } public String getName() { return name; } public...
public Integer getVersion() { return version; } public void setVersion(Integer version) { this.version = version; } public UUID getId() { return id; } public void setId(UUID id) { this.id = id; } }
repos\tutorials-master\spring-boot-modules\jmix\src\main\java\com\baeldung\jmix\expensetracker\entity\Expense.java
1
请完成以下Java代码
public void setCamundaClass(String camundaClass) { camundaClassAttribute.setValue(this, camundaClass); } public String getCamundaExpression() { return camundaExpressionAttribute.getValue(this); } public void setCamundaExpression(String camundaExpression) { camundaExpressionAttribute.setValue(this,...
camundaDelegateExpressionAttribute.setValue(this, camundaDelegateExpression); } public Collection<CamundaField> getCamundaFields() { return camundaFieldCollection.get(this); } public CamundaScript getCamundaScript() { return camundaScriptChild.getChild(this); } public void setCamundaScript(Camund...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\camunda\CamundaExecutionListenerImpl.java
1
请完成以下Java代码
public boolean isSomethingReported(@NonNull final I_PP_Order ppOrder) { if (getQuantities(ppOrder).isSomethingReported()) { return true; } final PPOrderId ppOrderId = PPOrderId.ofRepoId(ppOrder.getPP_Order_ID()); return orderBOMsRepo.retrieveOrderBOMLines(ppOrderId) .stream() .map(this::getQuanti...
@Override public Set<ProductId> getProductIdsToIssue(final PPOrderId ppOrderId) { return getOrderBOMLines(ppOrderId, I_PP_Order_BOMLine.class) .stream() .filter(bomLine -> BOMComponentType.ofNullableCodeOrComponent(bomLine.getComponentType()).isIssue()) .map(bomLine -> ProductId.ofRepoId(bomLine.getM_Pr...
repos\metasfresh-new_dawn_uat\backend\de.metas.material\planning\src\main\java\de\metas\material\planning\pporder\impl\PPOrderBOMBL.java
1
请完成以下Java代码
public class GeoIP { private String ipAddress; private String city; private String latitude; private String longitude; public GeoIP() { } public GeoIP(String ipAddress) { this.ipAddress = ipAddress; } public GeoIP(String ipAddress, String city, String latitude, String lon...
public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getLatitude() { return latitude; } public void setLatitude(String latitude) { this.latitude = latitude; } public String getLongitude() { ...
repos\tutorials-master\spring-web-modules\spring-mvc-xml-2\src\main\java\com\baeldung\spring\form\GeoIP.java
1
请完成以下Java代码
public void setC_ElementValue_ID (int C_ElementValue_ID) { if (C_ElementValue_ID < 1) set_ValueNoCheck (COLUMNNAME_C_ElementValue_ID, null); else set_ValueNoCheck (COLUMNNAME_C_ElementValue_ID, Integer.valueOf(C_ElementValue_ID)); } /** Get Account Element. @return Account Element */ public int ge...
/** Get Comment/Help. @return Comment or Hint */ public String getHelp () { return (String)get_Value(COLUMNNAME_Help); } /** Set Name. @param Name Alphanumeric identifier of the entity */ public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanu...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_SubAcct.java
1
请在Spring Boot框架中完成以下Java代码
public class UserController { @Autowired private UserOneMapper userOneMapper; @Autowired private UserTwoMapper userTwoMapper; @RequestMapping("/getUsers") public List<UserEntity> getUsers() { List<UserEntity> usersOne=userOneMapper.getAll(); List<UserEntity> usersTwo=userTwoMapper.getAl...
@RequestMapping("/add") public void save(UserEntity user) { userOneMapper.insert(user); } @RequestMapping(value="update") public void update(UserEntity user) { userOneMapper.update(user); } @RequestMapping(value="/delete/{id}") public void delete(@PathVariable("id")...
repos\spring-boot-leaning-master\1.x\第08课:Mybatis Druid 多数据源\spring-boot-multi-mybatis-druid\src\main\java\com\neo\web\UserController.java
2
请完成以下Java代码
private ImmutableMultimap<Path, PrintingSegment> extractAndAssignPaths( @NonNull final String baseDirectory, @NonNull final PrintingData printingData) { final ImmutableMultimap.Builder<Path, PrintingSegment> path2Segments = new ImmutableMultimap.Builder<>(); for (final PrintingSegment segment : printingData...
path = Paths.get(baseDirectory, FileUtil.stripIllegalCharacters(printer.getName()), FileUtil.stripIllegalCharacters(tray.getTrayNumber() + "-" + tray.getName())); } else { path = Paths.get(baseDirectory, FileUtil.stripIllegalCharacters(printer.getName())); } path2Segments.put(path,...
repos\metasfresh-new_dawn_uat\backend\de.metas.printing\de.metas.printing.base\src\main\java\de\metas\printing\printingdata\PrintingDataToPDFFileStorer.java
1
请完成以下Java代码
public class InvokePCMAction extends AlterExternalSystemServiceStatusAction { private final InvokePCMService invokePCMService = SpringContextHolder.instance.getBean(InvokePCMService.class); public final ExternalSystemConfigRepo externalSystemConfigDAO = SpringContextHolder.instance.getBean(ExternalSystemConfigRepo.cl...
return invokePCMService.getParameters(pcmConfig, externalRequest, orgBPartnerLocationId.getBpartnerId()); } @Override protected String getTabName() { return getExternalSystemType().getValue(); } @Override protected ExternalSystemType getExternalSystemType() { return ExternalSystemType.ProCareManagement; ...
repos\metasfresh-new_dawn_uat\backend\de.metas.externalsystem\src\main\java\de\metas\externalsystem\process\InvokePCMAction.java
1
请完成以下Java代码
private Properties copy(Properties properties) { Properties copy = new Properties(); copy.putAll(properties); return copy; } private static final class PropertiesIterator implements Iterator<Entry> { private final Iterator<Map.Entry<Object, Object>> iterator; private PropertiesIterator(Properties propert...
public static final class Entry { private final String key; private final String value; private Entry(String key, String value) { this.key = key; this.value = value; } public String getKey() { return this.key; } public String getValue() { return this.value; } } }
repos\spring-boot-4.0.1\core\spring-boot\src\main\java\org\springframework\boot\info\InfoProperties.java
1
请完成以下Java代码
public java.lang.String getStatus () { return (java.lang.String)get_Value(COLUMNNAME_Status); } /** Set Summary. @param Summary Textual summary of this request */ @Override public void setSummary (java.lang.String Summary) { set_Value (COLUMNNAME_Summary, Summary); } /** Get Summary. @return Te...
/** 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, Value); } /** Get Suchschlüssel. @return Suchschlüssel für den Eintrag im erforderlichen Format - m...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_I_Request.java
1
请完成以下Java代码
protected ObjectNode mapType(Type type) { ObjectNode result = mapValue(type); result.put("action", type.getAction()); ObjectNode tags = nodeFactory.objectNode(); type.getTags().forEach(tags::put); result.set("tags", tags); return result; } private ObjectNode mapVersionMetadata(MetadataElement value) { ...
protected String formatVersion(String versionId) { Version version = VersionParser.DEFAULT.safeParse(versionId); return (version != null) ? version.format(Format.V1).toString() : versionId; } protected ObjectNode mapValue(MetadataElement value) { ObjectNode result = nodeFactory.objectNode(); result.put("id",...
repos\initializr-main\initializr-web\src\main\java\io\spring\initializr\web\mapper\InitializrMetadataV2JsonMapper.java
1
请在Spring Boot框架中完成以下Java代码
JerseyAdditionalHealthEndpointPathsResourcesRegistrar jerseyAdditionalHealthEndpointPathsResourcesRegistrar( WebEndpointsSupplier webEndpointsSupplier, HealthEndpointGroups healthEndpointGroups) { ExposableWebEndpoint health = getHealthEndpoint(webEndpointsSupplier); return new JerseyAdditionalHealthEndpointPath...
private final HealthEndpointGroups groups; JerseyAdditionalHealthEndpointPathsResourcesRegistrar(@Nullable ExposableWebEndpoint endpoint, HealthEndpointGroups groups) { this.endpoint = endpoint; this.groups = groups; } @Override public void customize(ResourceConfig config) { register(config); }...
repos\spring-boot-4.0.1\module\spring-boot-jersey\src\main\java\org\springframework\boot\jersey\autoconfigure\actuate\endpoint\web\HealthEndpointJerseyExtensionAutoConfiguration.java
2
请完成以下Java代码
public Map<Class< ? >, String> getDeleteStatements() { return deleteStatements; } public void setDeleteStatements(Map<Class< ? >, String> deleteStatements) { this.deleteStatements = deleteStatements; } public Map<Class< ? >, String> getSelectStatements() { return selectStatements; } public...
} public boolean isDmnEnabled() { return dmnEnabled; } public void setDmnEnabled(boolean dmnEnabled) { this.dmnEnabled = dmnEnabled; } public void setDatabaseTablePrefix(String databaseTablePrefix) { this.databaseTablePrefix = databaseTablePrefix; } public String getDatabaseTablePrefix() {...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\db\sql\DbSqlSessionFactory.java
1
请完成以下Java代码
public TenantEntity findTenantById(String tenantId) { checkAuthorization(Permissions.READ, Resources.TENANT, tenantId); return getDbEntityManager().selectById(TenantEntity.class, tenantId); } public TenantQuery createTenantQuery() { return new DbTenantQueryImpl(Context.getProcessEngineConfiguration().g...
key.put("userId", userId); } if (groupId != null) { key.put("groupId", groupId); } return ((Long) getDbEntityManager().selectOne("selectTenantMembershipCount", key)) > 0; } //authorizations //////////////////////////////////////////////////// @Override protected void configureQuery(@Supp...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\identity\db\DbReadOnlyIdentityServiceProvider.java
1
请完成以下Java代码
public class Example { private String name; private Integer n; private Boolean real; public Example() { } public Example(String name, Integer n, Boolean real) { this.name = name; this.n = n; this.real = real; } public String getName() { return name; ...
public Integer getN() { return n; } public void setN(Integer n) { this.n = n; } public Boolean getReal() { return real; } public void setReal(Boolean real) { this.real = real; } }
repos\tutorials-master\jackson-modules\jackson-conversions-3\src\main\java\com\baeldung\jackson\jsonurlreader\data\Example.java
1
请在Spring Boot框架中完成以下Java代码
public class Author implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "hilo") @GenericGenerator(name = "hilo", strategy = "org.hibernate.id.enhanced.SequenceStyleGenerator", parameters = { ...
public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
repos\Hibernate-SpringBoot-master\HibernateSpringBootHiLo\src\main\java\com\bookstore\entity\Author.java
2
请完成以下Java代码
public int getC_PricingRule_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_C_PricingRule_ID); if (ii == null) return 0; return ii.intValue(); } /** Set Java-Klasse. @param Classname Java-Klasse */ @Override public void setClassname (java.lang.String Classname) { set_Value (COLUMNNAME_Classna...
public void setName (java.lang.String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ @Override public java.lang.String getName () { return (java.lang.String)get_Value(COLUMNNAME_Name); } /** Set Reihenfolge. @param SeqNo Zur Bestimmun...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\adempiere\pricing\model\X_C_PricingRule.java
1
请在Spring Boot框架中完成以下Java代码
class TransitionService { final ProcessRepository repository; final MongoTemplate template; final AtomicInteger counter = new AtomicInteger(0); public Process newProcess() { return repository.save(new Process(counter.incrementAndGet(), State.CREATED, 0)); } @Transactional public void run(Integer id) { v...
} private void finish(Process process) { template.update(Process.class).matching(Query.query(Criteria.where("id").is(process.id()))) .apply(Update.update("state", State.DONE).inc("transitionCount", 1)).first(); } void start(Process process) { template.update(Process.class).matching(Query.query(Criteria.w...
repos\spring-data-examples-main\mongodb\transactions\src\main\java\example\springdata\mongodb\imperative\TransitionService.java
2
请在Spring Boot框架中完成以下Java代码
public PageData<TenantProfile> getTenantProfiles( @Parameter(description = PAGE_SIZE_DESCRIPTION, required = true) @RequestParam int pageSize, @Parameter(description = PAGE_NUMBER_DESCRIPTION, required = true) @RequestParam int page, @Parameter(description = T...
@RequestParam int pageSize, @Parameter(description = PAGE_NUMBER_DESCRIPTION, required = true) @RequestParam int page, @Parameter(description = TENANT_PROFILE_TEXT_SEARCH_DESCRIPTION) @RequestParam(required = false) String textSearch, @Parameter(description = ...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\controller\TenantProfileController.java
2
请完成以下Java代码
public void setTitle(String title) { this.title = title; } public int getPages() { return pages; } public void setPages(int pages) { this.pages = pages; } public Book getBook() { return book; } public void setBook(Book book) { this.book = book;...
} if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } return id != null && id.equals(((Chapter) obj).id); } @Override public int hashCode() { return 2021; } }
repos\Hibernate-SpringBoot-master\HibernateSpringBootDatabaseTriggers\src\main\java\com\bookstore\entity\Chapter.java
1
请完成以下Java代码
public User getUserProfile() { try { return facebookClient.fetchObject("me", User.class, Parameter.with("fields", "id,name,email")); } catch (FacebookOAuthException e) { // Handle expired/invalid token logger.log(Level.SEVERE,"Authentication failed: " + e.getMessage()...
logger.log(Level.INFO,"Photo uploaded. ID: " + response.getId()); } catch (IOException e) { logger.log(Level.SEVERE,"Failed to read image file: " + e.getMessage()); } } public String postToPage(String pageId, String message) { try { Page page = facebookClient.fet...
repos\tutorials-master\libraries-http-3\src\main\java\com\baeldung\facebook\FacebookService.java
1
请完成以下Java代码
public void deBefore(JoinPoint joinPoint) throws Throwable { // 接收到请求,记录请求内容 ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); HttpServletRequest request = attributes.getRequest(); // 记录下请求内容 System.out.println("URL : " ...
//后置最终通知,final增强,不管是抛出异常或者正常退出都会执行 @After("webLog()") public void after(JoinPoint jp){ System.out.println("方法最后执行....."); } //环绕通知,环绕增强,相当于MethodInterceptor @Around("webLog()") public Object arround(ProceedingJoinPoint pjp) { System.out.println("方法环绕start....."); try { ...
repos\SpringBootBucket-master\springboot-aop\src\main\java\com\xncoding\aop\aspect\LogAspect.java
1
请完成以下Java代码
public static String getDecisionRequirementsDiagramResourceName(String dmnFileResource, String decisionKey, String diagramSuffix) { String dmnFileResourceBase = stripDmnFileSuffix(dmnFileResource); return dmnFileResourceBase + decisionKey + "." + diagramSuffix; } /** * Finds the name of a ...
for (String diagramSuffix : DIAGRAM_SUFFIXES) { String possibleName = dmnResourceBase + key + "." + diagramSuffix; if (resources.containsKey(possibleName)) { return possibleName; } possibleName = dmnResourceBase + diagramSuffix; if (resources....
repos\flowable-engine-main\modules\flowable-dmn-engine\src\main\java\org\flowable\dmn\engine\impl\deployer\ResourceNameUtil.java
1
请完成以下Java代码
private PO load(final Properties ctx, final int id, final String trxName) { if (id < 0) { return null; } // NOTE: we call MTable.getPO because we want to hit the ModelCacheService. // If we are using Query directly then cache won't be asked to retrieve (but it will just be asked to put to cache) if (i...
} protected final String getParentColumnName() { return parentColumnName; } @Override public String toString() { return MoreObjects.toStringHelper(this) .omitNullValues() .add("parentColumnName", parentColumnName) .add("tableName", tableName) .add("idColumnName", idColumnName) .add("load...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\compiere\model\AbstractPOCacheLocal.java
1
请完成以下Java代码
public void setOneMinuteException(Long oneMinuteException) { this.oneMinuteException = oneMinuteException; } public Long getOneMinutePass() { return oneMinutePass; } public void setOneMinutePass(Long oneMinutePass) { this.oneMinutePass = oneMinutePass; } public Long ge...
public Long getOneMinuteTotal() { return oneMinuteTotal; } public void setOneMinuteTotal(Long oneMinuteTotal) { this.oneMinuteTotal = oneMinuteTotal; } public boolean isVisible() { return visible; } public void setVisible(boolean visible) { this.visible = visib...
repos\spring-boot-student-master\spring-boot-student-sentinel-dashboard\src\main\java\com\alibaba\csp\sentinel\dashboard\domain\vo\ResourceVo.java
1
请完成以下Java代码
public class GridTabValidationContext implements IValidationContext { private static final transient Logger logger = LogManager.getLogger(GridTabValidationContext.class); private final Properties ctx; private final int windowNo; private final int tabNo; private final String contextTableName; private final String...
} @Override public String getTableName() { return tableName; } /** * Gets the context value for the given {@code variableName} by calling {@link Env#getContext(Properties, int, int, String, Scope)} with {@link Scope#Window}. */ @Override public String get_ValueAsString(final String variableName) { Che...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\validationRule\impl\GridTabValidationContext.java
1
请完成以下Java代码
public void addVariableData(String variableName, String changeType, String scopeId, String scopeType, String scopeDefinitionId) { if (variableData == null) { variableData = new LinkedHashMap<>(); } if (!variableData.containsKey(variableName)) { variableData.put(v...
} @Override public void close() { } public Map<String, List<VariableListenerSessionData>> getVariableData() { return variableData; } public void setVariableData(Map<String, List<VariableListenerSessionData>> variableData) { this.variableData = variableData; } }
repos\flowable-engine-main\modules\flowable-engine-common\src\main\java\org\flowable\common\engine\impl\variablelistener\VariableListenerSession.java
1
请完成以下Java代码
private void executeAfterFinishSql(@NonNull final I_C_Queue_WorkPackage workPackage) { final String afterFinishSqlRaw = getParameters().getParameterAsString(PARAM_AFTER_FINISH_SQL); if (Check.isEmpty(afterFinishSqlRaw, true)) { return; } final String afterFinishSql = parseSql(afterFinishSqlRaw, workPacka...
{ // // Normalize String sql = sqlRaw.trim() .replaceAll("--.*[\r\n\t]", "") // remove one-line-comments (comments within /* and */ are OK) .replaceAll("[\r\n\t]", " "); // replace line-breaks with spaces // // Parse context variables { final IStringExpression sqlExpression = Services.get(IExpre...
repos\metasfresh-new_dawn_uat\backend\de.metas.async\src\main\java\de\metas\migration\async\ExecuteSQLWorkpackageProcessor.java
1
请完成以下Java代码
private void out(String t) { l.info(t); } private String calcNetHashRate(Block block) { String response = "Net hash rate not available"; if (block.getNumber() > thou) { long timeDelta = 0; for (int i = 0; i < thou; ++i) { Block parent = ethereum ...
} @Override public void onBlock(Block block, List<TransactionReceipt> receipts) { if (syncDone) { out("Net hash rate: " + calcNetHashRate(block)); out("Block difficulty: " + block.getDifficultyBI().toString()); out("Block transactions: " + block.getTransactionsList()...
repos\tutorials-master\ethereum\src\main\java\com\baeldung\ethereumj\listeners\EthListener.java
1
请完成以下Java代码
public class LoginFilter extends AbstractAuthenticationProcessingFilter { public LoginFilter(String url, AuthenticationManager authManager) { super(new AntPathRequestMatcher(url)); setAuthenticationManager(authManager); } @Override public Authentication attemptAuthentication(HttpServle...
creds.getPassword(), Collections.emptyList())); } @Override protected void successfulAuthentication(HttpServletRequest req, HttpServletResponse res, FilterChain chain, Authentication auth) throws IOException, ServletException { Collection<? extends GrantedAuthority> authorities = auth.getAutho...
repos\tutorials-master\persistence-modules\spring-jpa\src\main\java\com\baeldung\multitenant\security\LoginFilter.java
1
请完成以下Java代码
public static void fillJsonTypes(Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap) { convertersToBpmnMap.put(STENCIL_TASK_BUSINESS_RULE, BusinessRuleTaskJsonConverter.class); } public static void fillBpmnTypes( Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJso...
protected FlowElement convertJsonToElement( JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap ) { BusinessRuleTask task = new BusinessRuleTask(); task.setClassName(getPropertyValueAsString(PROPERTY_RULETASK_CLASS, elementNode)); task.setInputVar...
repos\Activiti-develop\activiti-core\activiti-json-converter\src\main\java\org\activiti\editor\language\json\converter\BusinessRuleTaskJsonConverter.java
1
请完成以下Java代码
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(SubProcess.class, BPMN_ELEMENT_SUB_PROCESS) .namespaceUri(BPMN20_NS) .extendsType(Activity.class) .instanceProvider(new ModelTypeInstanceProvider<SubProcess>() { publi...
public void setTriggeredByEvent(boolean triggeredByEvent) { triggeredByEventAttribute.setValue(this, triggeredByEvent); } public Collection<LaneSet> getLaneSets() { return laneSetCollection.get(this); } public Collection<FlowElement> getFlowElements() { return flowElementCollection.get(this); } ...
repos\camunda-bpm-platform-master\model-api\bpmn-model\src\main\java\org\camunda\bpm\model\bpmn\impl\instance\SubProcessImpl.java
1
请完成以下Java代码
public String getSkuCode() { return skuCode; } public void setSkuCode(String skuCode) { this.skuCode = skuCode; } public BigDecimal getPrice() { return price; } public void setPrice(BigDecimal price) { this.price = price; } public Integer getStock() { ...
} public void setPromotionPrice(BigDecimal promotionPrice) { this.promotionPrice = promotionPrice; } public Integer getLockStock() { return lockStock; } public void setLockStock(Integer lockStock) { this.lockStock = lockStock; } public String getSpData() { ...
repos\mall-master\mall-mbg\src\main\java\com\macro\mall\model\PmsSkuStock.java
1
请在Spring Boot框架中完成以下Java代码
public String getMHUPackagingCodeTUText() { return mhuPackagingCodeTUText; } /** * Sets the value of the mhuPackagingCodeTUText property. * * @param value * allowed object is * {@link String } * */ public void setMHUPackagingCodeTUText(String value) ...
* */ public BigInteger getLine() { return line; } /** * Sets the value of the line property. * * @param value * allowed object is * {@link BigInteger } * */ public void setLine(BigInteger value) { this.line = value; } }
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_metasfreshinhousev1\de\metas\edi\esb\jaxb\metasfreshinhousev1\EDIExpDesadvPackItemType.java
2
请完成以下Java代码
public Set<Map.Entry<String, TriaFrequency>> getTriGram() { return trieTria.entrySet(); } // public static void main(String[] args) // { // Occurrence occurrence = new Occurrence(); // occurrence.addAll("算法工程师\n" + // "算法(Algorithm)是一系列解决问题的清晰指令,也就是...
// "语言要求:英语要求是熟练,基本上能阅读国外专业书刊;\n" + // "必须掌握计算机相关知识,熟练使用仿真工具MATLAB等,必须会一门编程语言。\n" + // "\n" + // "2研究方向\n" + // "视频算法工程师、图像处理算法工程师、音频算法工程师 通信基带算法工程师\n" + /...
repos\springboot-demo-master\hanlp\src\main\java\demo\hankcs\hanlp\corpus\occurrence\Occurrence.java
1
请完成以下Java代码
public Publisher getPublisher() { return publisher; } public String getName() { return name; } @Override public int hashCode() { int hash = 7; hash = 97 * hash + Objects.hashCode(this.publisher); hash = 97 * hash + Objects.hashCode(this.name); return...
return false; } final AuthorId other = (AuthorId) obj; if (!Objects.equals(this.name, other.name)) { return false; } if (!Objects.equals(this.publisher, other.publisher)) { return false; } return true; } ...
repos\Hibernate-SpringBoot-master\HibernateSpringBootCompositeKeyEmbeddableMapRel\src\main\java\com\bookstore\entity\AuthorId.java
1
请完成以下Java代码
public List<ExecutionListener> getExecutionListeners(String eventName) { List<ExecutionListener> executionListenerList = getExecutionListeners().get(eventName); if (executionListenerList != null) { return executionListenerList; } return Collections.EMPTY_LIST; } publ...
} } public Map<String, List<ExecutionListener>> getExecutionListeners() { return executionListeners; } // getters and setters ////////////////////////////////////////////////////// @Override public List<ActivityImpl> getActivities() { return activities; } public IOSpe...
repos\flowable-engine-main\modules\flowable5-engine\src\main\java\org\activiti\engine\impl\pvm\process\ScopeImpl.java
1
请完成以下Java代码
public boolean isScheduledToMove(@NonNull final HuId huId) { // TODO: only not processed ones return queryBL.createQueryBuilder(I_DD_OrderLine_HU_Candidate.class) .addEqualsFilter(I_DD_OrderLine_HU_Candidate.COLUMNNAME_M_HU_ID, huId) .create() .anyMatch(); } public ImmutableList<DDOrderMoveSchedule...
{ return queryBL.createQueryBuilder(I_DD_Order_MoveSchedule.class) .addOnlyActiveRecordsFilter() .addEqualsFilter(I_DD_Order_MoveSchedule.COLUMNNAME_DD_Order_ID, ddOrderId) .addEqualsFilter(I_DD_Order_MoveSchedule.COLUMNNAME_Status, DDOrderMoveScheduleStatus.IN_PROGRESS) .create() .anyMatch(); } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.handlingunits.base\src\main\java\de\metas\distribution\ddorder\movement\schedule\DDOrderMoveScheduleRepository.java
1
请完成以下Java代码
public DocTypeSequenceMap retrieveDocTypeSequenceMap(final I_C_DocType docType) { final Properties ctx = InterfaceWrapperHelper.getCtx(docType); final int docTypeId = docType.getC_DocType_ID(); return retrieveDocTypeSequenceMap(ctx, docTypeId); } @Cached(cacheName = I_C_DocType_Sequence.Table_Name + "#by#" + ...
.addEqualsFilter(I_C_DocType_Sequence.COLUMNNAME_C_DocType_ID, docTypeId) .addOnlyActiveRecordsFilter() .create() .list(I_C_DocType_Sequence.class); for (final I_C_DocType_Sequence docTypeSequenceDef : docTypeSequenceDefs) { final ClientId adClientId = ClientId.ofRepoId(docTypeSequenceDef.getAD_Clie...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\impl\DocumentSequenceDAO.java
1
请完成以下Java代码
public long getHitCount() { return hitCount.longValue(); } @Override public void incrementHitCount() { hitCount.incrementAndGet(); } @Override public long getHitInTrxCount() { return hitInTrxCount.longValue(); } @Override public void incrementHitInTrxCount() { hitInTrxCount.incrementAndGet(); }...
return missInTrxCount.longValue(); } @Override public void incrementMissInTrxCount() { missInTrxCount.incrementAndGet(); } @Override public boolean isCacheEnabled() { if (cacheConfig != null) { return cacheConfig.isEnabled(); } // if no caching config is provided, it means we are dealing with an...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\cache\model\impl\TableCacheStatistics.java
1
请在Spring Boot框架中完成以下Java代码
public class UserResponse { protected String id; protected String firstName; protected String lastName; protected String displayName; protected String passWord; protected String url; protected String email; protected String tenantId; protected String pictureUrl; @ApiModelProper...
return displayName; } public void setDisplayName(String displayName) { this.displayName = displayName; } @JsonInclude(JsonInclude.Include.NON_NULL) public String getPassword() { return passWord; } public void setPassword(String passWord) { this.passWord = passWord;...
repos\flowable-engine-main\modules\flowable-rest\src\main\java\org\flowable\rest\service\api\identity\UserResponse.java
2
请完成以下Java代码
public int getAD_WorkflowProcessorLog_ID () { Integer ii = (Integer)get_Value(COLUMNNAME_AD_WorkflowProcessorLog_ID); if (ii == null) return 0; return ii.intValue(); } /** Set BinaryData. @param BinaryData Binary Data */ public void setBinaryData (byte[] BinaryData) { set_Value (COLUMNNAME_Bi...
/** Set Reference. @param Reference Reference for this record */ public void setReference (String Reference) { set_Value (COLUMNNAME_Reference, Reference); } /** Get Reference. @return Reference for this record */ public String getReference () { return (String)get_Value(COLUMNNAME_Reference); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_AD_WorkflowProcessorLog.java
1
请在Spring Boot框架中完成以下Java代码
public String getTypeName() { return TYPE_NAME; } @Override public void setValue(Object value, ValueFields valueFields) { if (value == null) { valueFields.setCachedValue(null); valueFields.setBytes(null); return; } String textValue = (Stri...
valueFields.setCachedValue(textValue); } @Override public boolean isAbleToStore(Object value) { if (value == null) { return false; } if (String.class.isAssignableFrom(value.getClass())) { String stringValue = (String) value; return stringValue.len...
repos\flowable-engine-main\modules\flowable-variable-service\src\main\java\org\flowable\variable\service\impl\types\LongStringType.java
2
请完成以下Java代码
public class StreamRoutingFilter implements GlobalFilter, Ordered { private final StreamBridge streamBridge; private final List<HttpMessageReader<?>> messageReaders; private final SetStatusGatewayFilterFactory setStatusFilter; public StreamRoutingFilter(StreamBridge streamBridge, List<HttpMessageReader<?>> mess...
return serverRequest.bodyToMono(byte[].class).flatMap(requestBody -> { ServerHttpRequest request = exchange.getRequest(); HttpHeaders headers = request.getHeaders(); Message<?> inputMessage = null; MessageBuilder<?> builder = MessageBuilder.withPayload(requestBody); if (!CollectionUtils.isEmpty(request...
repos\spring-cloud-gateway-main\spring-cloud-gateway-server-webflux\src\main\java\org\springframework\cloud\gateway\filter\StreamRoutingFilter.java
1
请完成以下Java代码
public IEventBus getEventBus(final Topic topic) { assertJUnitTestMode(); return eventBuses.computeIfAbsent(topic, this::createEventBus); } private EventBus createEventBus(final Topic topic) { final MicrometerEventBusStatsCollector micrometerEventBusStatsCollector = EventBusFactory.createMicrometerEventBusSta...
@Override public void destroyAllEventBusses() { assertJUnitTestMode(); // as of now, no unit test needs an implementation. } @Override public void registerGlobalEventListener(final Topic topic, final IEventListener listener) { assertJUnitTestMode(); // as of now, no unit test needs an implementation. } ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\event\impl\PlainEventBusFactory.java
1
请完成以下Java代码
public String getName() { return nameAttribute.getValue(this); } public void setName(String name) { nameAttribute.setValue(this, name); } public Sentry getSentry() { return sentryRefAttribute.getReferenceTargetElement(this); } public void setSentry(Sentry sentry) { sentryRefAttribute.setR...
public static void registerType(ModelBuilder modelBuilder) { ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Criterion.class, CMMN_ELEMENT_CRITERION) .extendsType(CmmnElement.class) .namespaceUri(CMMN11_NS) .abstractType(); nameAttribute = typeBuilder.stringAttribute(CMMN_...
repos\camunda-bpm-platform-master\model-api\cmmn-model\src\main\java\org\camunda\bpm\model\cmmn\impl\instance\CriterionImpl.java
1
请完成以下Java代码
public List<ObjectNode> getWidgetsConfig() { return getChildObjects("widgets"); } @JsonIgnore private List<ObjectNode> getChildObjects(String propertyName) { return Optional.ofNullable(configuration) .map(config -> config.get(propertyName)) .filter(node -> !n...
@Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("Dashboard [tenantId="); builder.append(getTenantId()); builder.append(", title="); builder.append(getTitle()); builder.append(", configuration="); builder.append(...
repos\thingsboard-master\common\data\src\main\java\org\thingsboard\server\common\data\Dashboard.java
1
请完成以下Java代码
public class MarketDataUtil { public static int encodeAndWrite(ByteBuffer buffer, MarketData marketData) { final int pos = buffer.position(); final UnsafeBuffer directBuffer = new UnsafeBuffer(buffer); final MessageHeaderEncoder headerEncoder = new MessageHeaderEncoder(); final Tr...
final UnsafeBuffer directBuffer = new UnsafeBuffer(buffer); final MessageHeaderDecoder headerDecoder = new MessageHeaderDecoder(); final TradeDataDecoder dataDecoder = new TradeDataDecoder(); dataDecoder.wrapAndApplyHeader(directBuffer, pos, headerDecoder); // set position fina...
repos\tutorials-master\libraries-3\src\main\java\com\baeldung\sbe\MarketDataUtil.java
1
请完成以下Java代码
public class Main { private static final transient Logger log = LoggerFactory.getLogger(Main.class); public static void main(String[] args) { Realm realm = new MyCustomRealm(); SecurityManager securityManager = new DefaultSecurityManager(realm); SecurityUtils.setSecurityManager(secur...
log.info("Welcome, Author"); } else { log.info("Welcome, Guest"); } if(currentUser.isPermitted("articles:compose")) { log.info("You can compose an article"); } else { log.info("You are not permitted to compose an article!"); } if(curr...
repos\tutorials-master\security-modules\apache-shiro\src\main\java\com\baeldung\intro\Main.java
1
请完成以下Java代码
public String getCanton() { return canton; } /** * Sets the value of the canton property. * * @param value * allowed object is * {@link String } * */ public void setCanton(String value) { this.canton = value; } /** * Gets the va...
* Sets the value of the apid property. * * @param value * allowed object is * {@link String } * */ public void setApid(String value) { this.apid = value; } /** * Gets the value of the acid property. * * @return * possible object i...
repos\metasfresh-new_dawn_uat\backend\vertical-healthcare_ch\forum_datenaustausch_ch.invoice_450_request\src\main\java-xjc\de\metas\vertical\healthcare_ch\forum_datenaustausch_ch\invoice_450\request\TreatmentType.java
1
请完成以下Java代码
protected org.compiere.model.POInfo initPO(final Properties ctx) { return org.compiere.model.POInfo.getPOInfo(Table_Name); } @Override public void setC_PO_OrderLine_Alloc_ID (final int C_PO_OrderLine_Alloc_ID) { if (C_PO_OrderLine_Alloc_ID < 1) set_ValueNoCheck (COLUMNNAME_C_PO_OrderLine_Alloc_ID, null); ...
return get_ValueAsPO(COLUMNNAME_C_SO_OrderLine_ID, org.compiere.model.I_C_OrderLine.class); } @Override public void setC_SO_OrderLine(final org.compiere.model.I_C_OrderLine C_SO_OrderLine) { set_ValueFromPO(COLUMNNAME_C_SO_OrderLine_ID, org.compiere.model.I_C_OrderLine.class, C_SO_OrderLine); } @Override pub...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_C_PO_OrderLine_Alloc.java
1
请完成以下Java代码
public class CollectCountHitPolicyHandler extends AbstractCollectNumberHitPolicyHandler { protected static final HitPolicyEntry HIT_POLICY = new HitPolicyEntry(HitPolicy.COLLECT, BuiltinAggregator.COUNT); @Override public HitPolicyEntry getHitPolicyEntry() { return HIT_POLICY; } @Override protected B...
// not used return 0; } @Override protected Long aggregateLongValues(List<Long> longValues) { // not used return 0L; } @Override protected Double aggregateDoubleValues(List<Double> doubleValues) { // not used return 0.0; } @Override public String toString() { return "Collect...
repos\camunda-bpm-platform-master\engine-dmn\engine\src\main\java\org\camunda\bpm\dmn\engine\impl\hitpolicy\CollectCountHitPolicyHandler.java
1
请完成以下Java代码
public static boolean lacksRole(String roleName) { return !hasRole(roleName); } /** * 验证当前用户是否属于以下任意一个角色。 * * @param roleNames 角色列表 * @return 属于:true,否则false */ public static boolean hasAnyRoles(String roleNames) { boolean hasAnyRole = false; Subject subject...
/** * 未认证通过用户,与authenticated标签相对应。与guest标签的区别是,该标签包含已记住用户。。 * * @return 没有通过身份验证:true,否则false */ public static boolean notAuthenticated() { return !isAuthenticated(); } /** * 认证通过或已记住的用户。与guset搭配使用。 * * @return 用户:true,否则 false */ public static boolean is...
repos\SpringBootBucket-master\springboot-jwt\src\main\java\com\xncoding\jwt\shiro\ShiroKit.java
1
请在Spring Boot框架中完成以下Java代码
protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() /*.antMatchers("/admin/**").hasRole("ADMIN")//Indicates that the user accessing the URL in the "/admin/**" mode must have the role of ADMIN .antMatchers("/user/**").access("hasAnyRole('ADMIN','USER')") .antMat...
.formLogin() .loginProcessingUrl("/login").permitAll() .and() .csrf().disable(); } @Bean CustomFilterInvocationSecurityMetadataSource cfisms() { return new CustomFilterInvocationSecurityMetadataSource(); } @Bean CustomAccessDecisionMana...
repos\springboot-demo-master\security\src\main\java\com\et\security\config\WebSecurityConfig.java
2
请完成以下Java代码
public final class JSONDocumentLayoutColumn { static List<JSONDocumentLayoutColumn> ofList(final List<DocumentLayoutColumnDescriptor> columns, final JSONDocumentLayoutOptions jsonOpts) { return columns.stream() .map(column -> of(column, jsonOpts)) .collect(GuavaCollectors.toImmutableList()); } private st...
@JsonCreator private JSONDocumentLayoutColumn( @JsonProperty("elementGroups") @Nullable final List<JSONDocumentLayoutElementGroup> elementGroups) { this.elementGroups = elementGroups == null ? ImmutableList.of() : ImmutableList.copyOf(elementGroups); } private JSONDocumentLayoutColumn(final DocumentLayoutColu...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\window\datatypes\json\JSONDocumentLayoutColumn.java
1
请完成以下Java代码
private I_C_BPartner createNewBPartner(@NonNull final I_I_Pharma_BPartner importRecord) { final I_C_BPartner bpartner = InterfaceWrapperHelper.newInstance(I_C_BPartner.class); bpartner.setAD_Org_ID(importRecord.getAD_Org_ID()); bpartner.setCompanyName(extractCompanyName(importRecord)); bpartner.setIsCompany(t...
final I_C_BPartner bpartner; bpartner = InterfaceWrapperHelper.create(importRecord.getC_BPartner(), I_C_BPartner.class); if (!Check.isEmpty(importRecord.getb00name1(), true)) { bpartner.setIsCompany(true); bpartner.setCompanyName(importRecord.getb00name1()); bpartner.setName(importRecord.getb00name1());...
repos\metasfresh-new_dawn_uat\backend\de.metas.vertical.pharma\src\main\java\de\metas\impexp\bpartner\IFABPartnerImportHelper.java
1
请完成以下Java代码
public boolean isUnconditional() { return !isStdUserWorkflow() && getConditions().isEmpty(); } // isUnconditional public BooleanWithReason checkAllowGoingAwayFrom(final WFActivity fromActivity) { if (isStdUserWorkflow()) { final IDocument document = fromActivity.getDocumentOrNull(); if (document != ...
boolean ok = conditions.get(0).evaluate(fromActivity); for (int i = 1; i < conditions.size(); i++) { final WFNodeTransitionCondition condition = conditions.get(i); if (condition.isOr()) { ok = ok || condition.evaluate(fromActivity); } else { ok = ok && condition.evaluate(fromActivity); ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\workflow\WFNodeTransition.java
1
请在Spring Boot框架中完成以下Java代码
public class Database { String url; String username; String password; public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getUsername() {
return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } }
repos\tutorials-master\spring-boot-modules\spring-boot-properties\src\main\java\com\baeldung\configurationproperties\Database.java
2
请完成以下Java代码
public static <T> Appender<T> compose(Appender<T> one, Appender<T> two) { return one == null ? two : two == null ? one : new CompositeAppender<>(one, two); } /** * Composes an array of {@link Appender Appenders} into a {@link CompositeAppender}. * * This operation is null-safe. * * @param <T> {@link Clas...
protected Appender<T> getAppenderOne() { return this.one; } protected Appender<T> getAppenderTwo() { return this.two; } @Override public void setContext(Context context) { super.setContext(context); getAppenderOne().setContext(context); getAppenderTwo().setContext(context); } @Override public Con...
repos\spring-boot-data-geode-main\spring-geode-project\spring-geode-starters\spring-geode-starter-logging\src\main\java\org\springframework\geode\logging\slf4j\logback\CompositeAppender.java
1
请完成以下Java代码
final class WarehouseRoutingsIndex { public static final WarehouseRoutingsIndex of(final List<WarehouseRouting> warehouseRoutings) { return new WarehouseRoutingsIndex(warehouseRoutings); } private final ImmutableListMultimap<WarehouseId, String> docBaseTypesByWarehouseId; private WarehouseRoutingsIndex(final L...
} public boolean isDocTypeAllowed(@NonNull final WarehouseId warehouseId, @NonNull final String docBaseType) { if (isAllowAnyDocType(warehouseId)) { return true; } return getDocBaseTypesForWarehouse(warehouseId).contains(docBaseType); } public Set<WarehouseId> getWarehouseIdsAllowedForDocType(final Se...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\warehouse\api\impl\WarehouseRoutingsIndex.java
1
请完成以下Java代码
private static LocalTime parseLocalTime(final String timeStr) { return !Check.isEmpty(timeStr, true) ? LocalTime.parse(timeStr, timeFormatter) : null; } private List<PackageLabels> createDeliveryPackageLabels(final Label goLabels) { return goLabels.getSendung() .stream() .map(goPackageLabels -> createP...
.type(GOPackageLabelType.DIN_A6_ROUTER_LABEL) .fileName(GOPackageLabelType.DIN_A6_ROUTER_LABEL.toString()) .contentType(PackageLabel.CONTENTTYPE_PDF) .labelData(pdfs.getRouterlabel()) .build()) .label(PackageLabel.builder() .type(GOPackageLabelType.DIN_A6_ROUTER_LABEL_ZEBRA) .fil...
repos\metasfresh-new_dawn_uat\backend\de.metas.shipper.gateway.go\src\main\java\de\metas\shipper\gateway\go\GOClient.java
1
请在Spring Boot框架中完成以下Java代码
public Boolean convert(BitSet bitSet) { return bitSet.get(0); } } @ReadingConverter public enum ZonedDateTimeReadConverter implements Converter<LocalDateTime, ZonedDateTime> { INSTANCE; @Override public ZonedDateTime convert(LocalDateTime localDateTime) { ...
INSTANCE; @Override public Long convert(Duration source) { return source != null ? source.toMillis() : null; } } @ReadingConverter public enum DurationReadConverter implements Converter<Long, Duration> { INSTANCE; @Override public Duration conve...
repos\tutorials-master\jhipster-8-modules\jhipster-8-microservice\gateway-app\src\main\java\com\gateway\config\DatabaseConfiguration.java
2
请完成以下Java代码
public void parseIntermediateTimerEventDefinition(Element timerEventDefinition, ActivityImpl timerActivity) { // start and end event listener are set by parseIntermediateCatchEvent() } @Override public void parseReceiveTask(Element receiveTaskElement, ScopeImpl scope, ActivityImpl activity) { addStartEve...
@Override public void parseIntermediateMessageCatchEventDefinition(Element messageEventDefinition, ActivityImpl nestedActivity) { } @Override public void parseBoundaryMessageEventDefinition(Element element, boolean interrupting, ActivityImpl messageActivity) { } @Override public void parseBoundaryEscala...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\application\impl\event\ProcessApplicationEventParseListener.java
1
请完成以下Java代码
protected Map<String, DiagramNode> fixFlowNodePositionsIfModelFromAdonis(Document bpmnModel, Map<String, DiagramNode> elementBoundsFromBpmnDi) { if (isExportedFromAdonis50(bpmnModel)) { Map<String, DiagramNode> mapOfFixedBounds = new HashMap<String, DiagramNode>(); XPathFactory xPathFactory = XPathFacto...
return "ADONIS".equals(bpmnModel.getDocumentElement().getAttribute("exporter")) && "5.0".equals(bpmnModel.getDocumentElement().getAttribute("exporterVersion")); } protected DocumentBuilderFactory getConfiguredDocumentBuilderFactory() { boolean isXxeParsingEnabled = Context.getProcessEngineConfigur...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\bpmn\diagram\ProcessDiagramLayoutFactory.java
1
请完成以下Java代码
public void setRequiredInputs(List<InformationRequirement> requiredInputs) { this.requiredInputs = requiredInputs; } public void addRequiredInput(InformationRequirement requiredInput) { this.requiredInputs.add(requiredInput); } public List<AuthorityRequirement> getAuthorityRequirements()...
public boolean isForceDMN11() { return forceDMN11; } public void setForceDMN11(boolean forceDMN11) { this.forceDMN11 = forceDMN11; } @JsonIgnore public DmnDefinition getDmnDefinition() { return dmnDefinition; } public void setDmnDefinition(DmnDefinition dmnDefinition...
repos\flowable-engine-main\modules\flowable-dmn-model\src\main\java\org\flowable\dmn\model\Decision.java
1
请在Spring Boot框架中完成以下Java代码
private void forwardToEventService(ErrorEventProto eventProto, TbCallback callback) { Event event = ErrorEvent.builder() .tenantId(toTenantId(eventProto.getTenantIdMSB(), eventProto.getTenantIdLSB())) .entityId(new UUID(eventProto.getEntityIdMSB(), eventProto.getEntityIdLSB())) ...
callback.onFailure(new RuntimeException("Message not handled!")); } private TenantId toTenantId(long tenantIdMSB, long tenantIdLSB) { return TenantId.fromUUID(new UUID(tenantIdMSB, tenantIdLSB)); } @Override protected void stopConsumers() { super.stopConsumers(); mainConsum...
repos\thingsboard-master\application\src\main\java\org\thingsboard\server\service\queue\DefaultTbCoreConsumerService.java
2
请在Spring Boot框架中完成以下Java代码
public String getDeliveryRequirements() { return deliveryRequirements; } /** * Sets the value of the deliveryRequirements property. * * @param value * allowed object is * {@link String } * */ public void setDeliveryRequirements(String value) { ...
*/ public void setCumulativeQuantity(ConditionalUnitType value) { this.cumulativeQuantity = value; } /** * Gets the value of the planningQuantityExtension property. * * @return * possible object is * {@link PlanningQuantityExtensionType } * */ pu...
repos\metasfresh-new_dawn_uat\misc\services\camel\de-metas-camel-edi\src\main\java-xjc_ecosio_remadv\at\erpel\schemas\_1p0\documents\PlanningQuantityType.java
2
请完成以下Java代码
public class SinglyLinkedList<S> { private int size; private Node<S> head = null; private Node<S> tail = null; public boolean isEmpty() { return size() == 0; } public int size() { return size; } public void add(S element) { Node<S> newTail = new Node<>(element...
} secondToLast.next = null; } --size; } public boolean contains(S element) { if (isEmpty()) { return false; } Node<S> current = head; while (current != null) { if (Objects.equals(element, current.element)) retu...
repos\tutorials-master\core-java-modules\core-java-collections-list-7\src\main\java\com\baeldung\linkedlistremove\SinglyLinkedList.java
1
请完成以下Java代码
private boolean validateAllocationLineAmounts(@Nullable final List<JsonPaymentAllocationLine> lines) { return !Check.isEmpty(lines) && lines.stream().anyMatch(line -> Check.isEmpty(line.getAmount())); } private OrgId retrieveOrg(@Nullable final String orgCode) { final Optional<OrgId> orgId; if (Check.isNotBl...
} private OrderQuery createOrderQuery(final IdentifierString identifierString, final OrgId orgId) { final IdentifierString.Type type = identifierString.getType(); final OrderQuery.OrderQueryBuilder builder = OrderQuery.builder().orgId(orgId); if (IdentifierString.Type.METASFRESH_ID.equals(type)) { return ...
repos\metasfresh-new_dawn_uat\backend\de.metas.business.rest-api-impl\src\main\java\de\metas\rest_api\v1\payment\JsonPaymentService.java
1
请完成以下Java代码
public final class DocActionOptionsContext { @NonNull private final UserRolePermissionsKey userRolePermissionsKey; @NonNull private final String tableName; @NonNull private final String docStatus; // NOTE: we are tolerating null/not set C_DocType_ID because not all of our documents have this column. @Nullabl...
private String docActionToUse; @NonNull @Default private ImmutableSet<String> docActions = ImmutableSet.of(); @Getter(AccessLevel.NONE) @NonNull private final IValidationContext validationContext; public ClientId getAdClientId() { return getUserRolePermissionsKey().getClientId(); } public String getPara...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\document\engine\DocActionOptionsContext.java
1
请完成以下Java代码
public String getType() { String structureRef = itemSubjectRef.getStructureRef(); return structureRef.substring(structureRef.indexOf(':') + 1); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o....
return false; } if (!otherObject.getId().equals(this.id)) { return false; } if (!otherObject.getName().equals(this.name)) { return false; } if (!otherObject.getValue().equals(this.value.toString())) { return false; } re...
repos\Activiti-develop\activiti-core\activiti-bpmn-model\src\main\java\org\activiti\bpmn\model\ValuedDataObject.java
1
请完成以下Java代码
public void warn(int WindowNo, String AD_Message) { logger.warn(AD_Message); } @Override public void warn(int WindowNo, String AD_Message, String message) { logger.warn("" + AD_Message + ": " + message); } @Override public void error(int WIndowNo, String AD_Message) { logger.warn("" + AD_Me...
public void showWindow(Object model) { throw new UnsupportedOperationException("Not implemented: ClientUI.showWindow()"); } @Override public IClientUIInvoker invoke() { throw new UnsupportedOperationException("not implemented"); } @Override public IClientUIAsyncInvoker invokeAsync() { throw...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\adempiere\form\impl\ClientUI.java
1
请完成以下Java代码
public void setName (String Name) { set_Value (COLUMNNAME_Name, Name); } /** Get Name. @return Alphanumeric identifier of the entity */ public String getName () { return (String)get_Value(COLUMNNAME_Name); } public I_M_Product getRelatedProduct() throws RuntimeException { return (I_M_Product)MT...
} /** RelatedProductType AD_Reference_ID=313 */ public static final int RELATEDPRODUCTTYPE_AD_Reference_ID=313; /** Web Promotion = P */ public static final String RELATEDPRODUCTTYPE_WebPromotion = "P"; /** Alternative = A */ public static final String RELATEDPRODUCTTYPE_Alternative = "A"; /** Supplemental = S ...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_M_RelatedProduct.java
1
请完成以下Java代码
public Image getImage() { //return smile image //java.awt.Toolkit.getDefaultToolkit().getImage(getImageURL()).flush(); //if (smileImage == null) { String src = (String)elem.getAttributes(). getAttribute(HTML.Attribute.SRC); //System.out.println("img load: " + src.substring(4)); URL url =...
if (false) { return getClass().getClassLoader(). getResource("javax/swing/text/html/icons/image-delayed.gif"); } else { String src = (String)elem.getAttributes(). getAttribute(HTML.Attribute.SRC); //System.out.println("img load: " + src.substring(4)); URL url = getClass().getClassLoade...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\client\src\main\java\org\adempiere\apps\graph\FCHtmlEditorKit.java
1
请完成以下Java代码
public boolean isDebugTrxCreateStacktrace() { return getTrxManager().isDebugTrxCreateStacktrace(); } @Override public void setDebugClosedTransactions(boolean enabled) { getTrxManager().setDebugClosedTransactions(enabled); } @Override public boolean isDebugClosedTransactions() { return getTrxManager().i...
{ // 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); } catch (SQLException e) { throw new RuntimeException("Could not rollback...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\trx\jmx\JMXTrxManager.java
1
请完成以下Java代码
protected void applyFilters(GroupQuery query) { if (id != null) { query.groupId(id); } if (ids != null) { query.groupIdIn(ids); } if (name != null) { query.groupName(name); } if (nameLike != null) { query.groupNameLike(nameLike); } if (type != null) { qu...
} } @Override protected void applySortBy(GroupQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) { if (sortBy.equals(SORT_BY_GROUP_ID_VALUE)) { query.orderByGroupId(); } else if (sortBy.equals(SORT_BY_GROUP_NAME_VALUE)) { query.orderByGroupName(); } else if ...
repos\camunda-bpm-platform-master\engine-rest\engine-rest\src\main\java\org\camunda\bpm\engine\rest\dto\identity\GroupQueryDto.java
1
请完成以下Java代码
protected <T> HttpClientResponseHandler<T> handleResponse(final Class<T> responseClass) { return new AbstractHttpClientResponseHandler<>() { public T handleEntity(HttpEntity responseEntity) throws IOException { T response = null; if (responseClass.isAssignableFrom(byte[].class)) { In...
return entity == null ? null : handleEntity(entity); } }; } protected <T> T deserializeResponse(HttpEntity httpEntity, Class<T> responseClass) { InputStream inputStream = null; try { inputStream = httpEntity.getContent(); return objectMapper.readValue(inputStream, responseClass); ...
repos\camunda-bpm-platform-master\clients\java\client\src\main\java\org\camunda\bpm\client\impl\RequestExecutor.java
1
请在Spring Boot框架中完成以下Java代码
public class PageDescriptor { PageIdentifier pageIdentifier; int offset; int pageSize; int totalSize; Instant selectionTime; public static PageDescriptor createNew( @NonNull final String querySelectionUUID, final int pageSize, final int totalSize, @NonNull final Instant selectionTime) { return...
@NonNull final String pageUid, final int offset, final int pageSize, final int totalSize, @NonNull final Instant selectionTime) { assumeNotEmpty(selectionUid, "Param selectionUid may not be empty"); assumeNotEmpty(pageUid, "Param selectionUid may not be empty"); this.pageIdentifier = PageIdentifier....
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\de\metas\dao\selection\pagination\PageDescriptor.java
2
请完成以下Java代码
public DocumentQueryOrderByList getDefaultOrderBys() { return DocumentQueryOrderByList.EMPTY; } @Override public SqlViewRowsWhereClause getSqlWhereClause(final DocumentIdsSelection rowIds, final SqlOptions sqlOpts) { // TODO Auto-generated method stub return null; } @Override public <T> List<T> retrieve...
} public Optional<HUEditorView> getPackingHUsViewIfExists(final PickingSlotRowId rowId) { final PickingSlotRow rootRow = getRootRowWhichIncludesRowId(rowId); final PackingHUsViewKey key = extractPackingHUsViewKey(rootRow); return packingHUsViewsCollection.getByKeyIfExists(key); } public HUEditorView compute...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pickingslotsClearing\PickingSlotsClearingView.java
1
请完成以下Java代码
public void setWEBUI_Board_CardField_ID (final int WEBUI_Board_CardField_ID) { if (WEBUI_Board_CardField_ID < 1) set_ValueNoCheck (COLUMNNAME_WEBUI_Board_CardField_ID, null); else set_ValueNoCheck (COLUMNNAME_WEBUI_Board_CardField_ID, WEBUI_Board_CardField_ID); } @Override public int getWEBUI_Board_Car...
@Override public void setWEBUI_Board(final de.metas.ui.web.base.model.I_WEBUI_Board WEBUI_Board) { set_ValueFromPO(COLUMNNAME_WEBUI_Board_ID, de.metas.ui.web.base.model.I_WEBUI_Board.class, WEBUI_Board); } @Override public void setWEBUI_Board_ID (final int WEBUI_Board_ID) { if (WEBUI_Board_ID < 1) set_Va...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java-gen\de\metas\ui\web\base\model\X_WEBUI_Board_CardField.java
1
请在Spring Boot框架中完成以下Java代码
private void applyKafkaConnectionDetailsForAdmin(Map<String, Object> properties, KafkaConnectionDetails connectionDetails) { Configuration admin = connectionDetails.getAdmin(); properties.put(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, admin.getBootstrapServers()); applySecurityProtocol(properties, admin.get...
if (StringUtils.hasLength(securityProtocol)) { properties.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, securityProtocol); } } static class KafkaRuntimeHints implements RuntimeHintsRegistrar { @Override public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) { hints.reflecti...
repos\spring-boot-4.0.1\module\spring-boot-kafka\src\main\java\org\springframework\boot\kafka\autoconfigure\KafkaAutoConfiguration.java
2
请完成以下Java代码
public void failedAcquisitionLocks(String processEngine, AcquiredJobs acquiredJobs) { logDebug("033", "Jobs failed to Lock during Acquisition of jobs for the process engine '{}' : {}", processEngine, acquiredJobs.getNumberOfJobsFailedToLock()); } public void jobsToAcquire(String processEngine, int numJ...
public void numJobsInQueue(String processEngine, int numJobsInQueue, int maxQueueSize) { logDebug("038", "Jobs currently in queue to be executed for the process engine '{}' : {} (out of the max queue size : {})", processEngine, numJobsInQueue, maxQueueSize); } public void availableThreadsCalcul...
repos\camunda-bpm-platform-master\engine\src\main\java\org\camunda\bpm\engine\impl\jobexecutor\JobExecutorLogger.java
1
请完成以下Java代码
public boolean isSummary () { Object oo = get_Value(COLUMNNAME_IsSummary); if (oo != null) { if (oo instanceof Boolean) return ((Boolean)oo).booleanValue(); return "Y".equals(oo); } return false; } /** Set Use Ad. @param IsUseAd Whether or not this templates uses Ad's */ public vo...
@param Processing Process Now */ public void setProcessing (boolean Processing) { set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing)); } /** Get Process Now. @return Process Now */ public boolean isProcessing () { Object oo = get_Value(COLUMNNAME_Processing); if (oo != null) { if (...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java-gen\org\compiere\model\X_CM_Template.java
1
请在Spring Boot框架中完成以下Java代码
public class ActiveMqListenerConfig { @Value("${tradeQueueName.notify}") private String tradeQueueDestinationName; /** * 队列目的地 * * @return 队列目的地 */ @Bean(name = "tradeQueueDestination") public ActiveMQQueue tradeQueueDestination() { return new ActiveMQQueue(tradeQueueDe...
* 消息监听容器 * * @param singleConnectionFactory 连接工厂 * @param tradeQueueDestination 消息目的地 * @param consumerSessionAwareMessageListener 监听器实现 * @return 消息监听容器 */ @Bean(name = "tradeQueueMessageListenerContainer") public DefaultMessageListenerContainer tradeQueu...
repos\roncoo-pay-master\roncoo-pay-app-notify\src\main\java\com\roncoo\pay\config\ActiveMqListenerConfig.java
2
请完成以下Java代码
public class MigrationExecutorContext implements IMigrationExecutorContext { private final Properties ctx; private final IMigrationExecutorProvider factory; private boolean failOnFirstError = true; private MigrationOperation migrationOperation = MigrationOperation.BOTH; private final List<IPostponedExecutable> p...
} @Override public boolean isApplyDML() { return migrationOperation == MigrationOperation.BOTH || migrationOperation == MigrationOperation.DML; } @Override public boolean isApplyDDL() { return migrationOperation == MigrationOperation.BOTH || migrationOperation == MigrationOperation.DDL; } @Override pub...
repos\metasfresh-new_dawn_uat\backend\de.metas.adempiere.adempiere\base\src\main\java\org\adempiere\ad\migration\executor\impl\MigrationExecutorContext.java
1
请在Spring Boot框架中完成以下Java代码
public Map<String, Boolean> getEnable() { return this.enable; } public void setEnable(Map<String, Boolean> enable) { this.enable = enable; } public Http getHttp() { return this.http; } public Map<String, String> getKeyValues() { return this.keyValues; } public void setKeyValues(Map<String, String> k...
private final ServerRequests requests = new ServerRequests(); public ServerRequests getRequests() { return this.requests; } public static class ServerRequests { /** * Name of the observation for server requests. */ private String name = "http.server.requests"; public String getNam...
repos\spring-boot-4.0.1\module\spring-boot-micrometer-observation\src\main\java\org\springframework\boot\micrometer\observation\autoconfigure\ObservationProperties.java
2
请在Spring Boot框架中完成以下Java代码
public Map<String, Object> getMap() { return map; } public void setMap(Map<String, Object> map) { this.map = map; } public List<Object> getList() { return list; } public void setList(List<Object> list) { this.list = list; } public Dog getDog() { ...
final StringBuilder sb = new StringBuilder( "{\"Person\":{" ); sb.append( "\"lastName\":\"" ) .append( lastName ).append( '\"' ); sb.append( ",\"age\":" ) .append( age ); sb.append( ",\"boss\":" ) .append( boss ); sb.append( ",\"birth\":\""...
repos\SpringBootLearning-master (1)\springboot-config\src\main\java\com\gf\entity\Person.java
2
请完成以下Java代码
public DocumentEntityDataBindingDescriptor getOrBuild() { return dataBinding; } } public static final class ASIAttributeFieldBinding implements DocumentFieldDataBindingDescriptor { private final AttributeId attributeId; private final String attributeName; private final boolean mandatory; private fina...
private void writeValue(final I_M_AttributeInstance ai, final IDocumentFieldView field) { writeMethod.accept(ai, field); } private static void writeValueFromLookup(final I_M_AttributeInstance ai, final IDocumentFieldView field, boolean isNumericKey) { final LookupValue lookupValue = isNumericKey ? f...
repos\metasfresh-new_dawn_uat\backend\de.metas.ui.web.base\src\main\java\de\metas\ui\web\pattribute\ASIDescriptorFactory.java
1