本文整理了Java中com.j256.ormlite.dao.Dao.objectToString()
方法的一些代码示例,展示了Dao.objectToString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dao.objectToString()
方法的具体详情如下:
包路径:com.j256.ormlite.dao.Dao
类名称:Dao
方法名:objectToString
[英]Return the string version of the object with each of the known field values shown. Useful for testing and debugging.
[中]返回对象的字符串版本,并显示每个已知字段值。用于测试和调试。
代码示例来源:origin: j256/ormlite-core
/**
* @see Dao#objectToString(Object)
*/
@Override
public String objectToString(T data) {
return dao.objectToString(data);
}
代码示例来源:origin: com.j256.ormlite/ormlite-core
/**
* @see Dao#objectToString(Object)
*/
@Override
public String objectToString(T data) {
return dao.objectToString(data);
}
代码示例来源:origin: j256/ormlite-core
/**
* A call through to the {@link Dao#objectToString(Object)}.
*/
public String objectToString() {
try {
checkForDao();
} catch (SQLException e) {
throw new IllegalArgumentException(e);
}
@SuppressWarnings("unchecked")
T t = (T) this;
return dao.objectToString(t);
}
代码示例来源:origin: com.j256.ormlite/ormlite-core
/**
* A call through to the {@link Dao#objectToString(Object)}.
*/
public String objectToString() {
try {
checkForDao();
} catch (SQLException e) {
throw new IllegalArgumentException(e);
}
@SuppressWarnings("unchecked")
T t = (T) this;
return dao.objectToString(t);
}
代码示例来源:origin: com.j256.ormlite/ormlite-jdbc
@Test
public void testObjectToString() throws Exception {
Dao<Foo, Integer> fooDao = createDao(Foo.class, true);
String stuff = "foo123231";
Foo foo1 = new Foo();
foo1.stuff = stuff;
String objStr = fooDao.objectToString(foo1);
assertTrue(objStr.contains(Integer.toString(foo1.id)));
assertTrue(objStr.contains(stuff));
}
内容来源于网络,如有侵权,请联系作者删除!