操作EntityManager
Interacting with an EntityManager
接下来如何正确地操作EntityManager。EntityManager API包含了插入和删除实体的数据库操作方法,将游离的实体实例合并更新到数据库的方法。它还包含了一组丰富的查询API,你可以藉此来创建查询对象。
package javax.persistence;
public interface EntityManager {
public void persist(Object entity);
public
public
public
public void remove(Object entity);
public void lock(Object entity, LockModeType lockMode);
public void refresh(Object entity);
public boolean contains(Object entity);
public void clear();
public void joinTransaction();
public void flush();
public FlushModeType getFlushMode();
public void setFlushMode(FlushModeType type);
public Query createQuery(String queryString);
public Query createNamedQuery(String name);
public Query createNativeQuery(String sqlString);
public Query createNativeQuery(String sqlString, String resultSetMapping);
public Query createNativeQuery(String sqlString, Class resultClass);
public Object getDelegate();
public void close();
public boolean isOpen();
}
vlist.get(0)[0]=1
vlist.get(0)[1]=1
vlist.get(0)[2]=2
vlist.get(0)[3]=3
………………=4
int类型不可以toString啊