Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for copyMapToNewBean (0.31 sec)

  1. src/main/java/org/codelibs/core/beans/util/BeanUtil.java

         */
        public static <T> T copyMapToNewBean(final Map<String, ? extends Object> src, final Class<T> destClass) {
            return copyMapToNewBean(src, destClass, DEFAULT_OPTIONS);
        }
    
        public static <T> T copyMapToNewBean(final Map<String, ? extends Object> src, final Class<T> destClass,
                final Consumer<CopyOptions> option) {
            return copyMapToNewBean(src, destClass, buildCopyOptions(option));
        }
    
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 21.5K bytes
    - Viewed (0)
  2. fess-crawler-opensearch/src/main/java/org/codelibs/fess/crawler/service/impl/OpenSearchDataService.java

                    for (final SearchHit searchHit : searchHits) {
                        final Map<String, Object> source = searchHit.getSourceAsMap();
                        final OpenSearchAccessResult accessResult = BeanUtil.copyMapToNewBean(source, OpenSearchAccessResult.class, option -> {
                            option.converter(new EsTimestampConverter(), timestampFields).excludeWhitespace();
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Nov 07 04:44:10 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  3. fess-crawler-opensearch/src/main/java/org/codelibs/fess/crawler/service/impl/AbstractCrawlerService.java

            if (response.isExists()) {
                final Map<String, Object> source = response.getSource();
                final T bean = BeanUtil.copyMapToNewBean(source, clazz, option -> {
                    option.converter(new EsTimestampConverter(), timestampFields).excludeWhitespace();
                    option.exclude(OpenSearchAccessResult.ACCESS_RESULT_DATA);
                });
    Registered: Sun Nov 10 03:50:12 UTC 2024
    - Last Modified: Thu Nov 07 04:44:10 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/core/beans/util/BeanUtilTest.java

         */
        @Test
        public void testCopy_mapToNewBean() throws Exception {
            final BeanMap src = new BeanMap();
            src.put("aaa", "aaa");
            final MyBean dest = BeanUtil.copyMapToNewBean(src, MyBean.class);
            assertThat(dest.aaa, is("aaa"));
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testCopy_mapToNewMap() throws Exception {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 34.5K bytes
    - Viewed (0)
Back to top