Realm 处理List<String> 问题 Type parameter 'java.lang.String' is not within its bound; should implement 'io.realm.RealmModel

public class InitAppBean extends RealmObject {
    private String sapling;
    private String logistics;
    private RealmList<DeliverTypeListBean> deliverTypeList;
    private RealmList<RealmString> countryList;

    public String getSapling() {
        return sapling;
    }

    public void setSapling(String sapling) {
        this.sapling = sapling;
    }

    public String getLogistics() {
        return logistics;
    }

    public void setLogistics(String logistics) {
        this.logistics = logistics;
    }

    public List<DeliverTypeListBean> getDeliverTypeList() {
        return deliverTypeList;
    }

    public void setDeliverTypeList(RealmList<DeliverTypeListBean> deliverTypeList) {
        this.deliverTypeList = deliverTypeList;
    }

    public RealmList<RealmString> getCountryList() {
        return countryList;
    }

    public void setCountryList(RealmList<RealmString> countryList) {
        this.countryList = countryList;
    }

  新创建String类继承RealmObject

public class RealmString extends RealmObject {
    private String val;

    public String getValue() {
        return val;
    }

    public void setValue(String value) {
        this.val = value;
    }
}

  

Realm 处理List<String> 问题 Type parameter 'java.lang.String' is not within its bound; should implement 'io.realm.RealmModel

原文地址:https://www.cnblogs.com/freexiaoyu/p/10207292.html

时间: 2025-01-09 08:39:29

Realm 处理List<String> 问题 Type parameter 'java.lang.String' is not within its bound; should implement 'io.realm.RealmModel的相关文章

spring3+struts2+hibernate3整合出现的问题,No mapping found for dependency [type=java.lang.String, name=&#39;struts.objectFactory.spring.enableAopSupport&#39;]

七月 11, 2016 3:49:24 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:EBook' did not find a matching property.七月 11, 2016 3:4

java.lang.String类

复制下来的java.lang.String源码.在此基础上添加自己的注释,偷懒了,用来加深印象吧.英语不好,没有翻译,不理解的方法直接百度的.然后按照自己的理解描述. /* * @(#)String.java 1.205 09/02/26 * * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */

java.lang.String 类源码解读

String类定义实现了java.io.Serializable, Comparable<String>, CharSequence 三个接口:并且为final修饰. public final class String defined String由char[]数组实现 /** The value is used for character storage. */ private final char value[]; /** Cache the hash code for the strin

java.lang.String 的 + 号操作到底做了什么事情?

https://www.cnblogs.com/panzi/p/11956782.html 前言  在之前的面试经历中,对于String的考察还是挺频繁的,大致考察以下几个知识点: String 常量池 new String() == 和 equals 的区别 native 方法 String.intern()虽然面试中大体答对了,但是今天早上微信群里的一个问题我却答不上来,这个问题是这样的: String str3 = "what"; String str4 = str3 + &qu

Name for argument type [java.lang.String] not avai

项目通过MyEclipe部署到Tomcat运行一切OK 使用Jekins,Ant进行管理,部署也OK,但是访问项目时就出现: Name for argument type [java.lang.String] not available, and parameter name information not found in class file either. 参考 http://m.blog.csdn.net/blog/kouwoo/42869779 采用第二种方法最活力,使用Ant编译ja

页面不能访问,抛出 spring java.lang.IllegalArgumentException: Name for argument type [java.lang.String] 异常

情况描述: web工程在windows环境eclipse下编译部署没有问题,使用ant打包部署到jboss上,启动正常没有错误,访问一些页面也没有问题,但是有的页面确不能访问,抛出异常如下: 13:28:17,656 ERROR [[springmvc]] Servlet.service() for servlet springmvc threw exceptionjava.lang.IllegalArgumentException: Name for argument type [java.l

Name for argument type java lang String not available and

1.错误描述 [ERROR:]2015-11-15 21:13:48,029 [异常拦截] exception.ExceptionHandler java.lang.IllegalArgumentException: Name for argument type [java.lang.String] not available, and parameter name information not found in class file either. at org.springframewor

javax.el.PropertyNotFoundException: Property &#39;name&#39; not found on type java.lang.String

javax.el.PropertyNotFoundException: Property 'name' not found on type java.lang.String javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193) javax.el.BeanELResolver.property(BeanELResolver.java:267) javax.el.BeanELResolver.getValue(Bean

spring mvc出现 Failed to convert property value of type &#39;java.lang.String&#39; to required type &#39;java.util.Date&#39; for property &#39;endtime&#39;

在使用spring mvc中,绑定页面传递时间字符串数据给Date类型是出错: Failed to convert property value of type [java.lang.String] to required type [java.util.Date] for property 'expert.birthdate'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of typ