Back to project page android-orm-benchmark.
The source code is released under:
Apache License
If you think the Android project android-orm-benchmark listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.littleinc.orm_benchmark.greendao; //from w w w .j a va2 s .com import android.database.sqlite.SQLiteDatabase; import java.util.Map; import de.greenrobot.dao.AbstractDao; import de.greenrobot.dao.AbstractDaoSession; import de.greenrobot.dao.identityscope.IdentityScopeType; import de.greenrobot.dao.internal.DaoConfig; import com.littleinc.orm_benchmark.greendao.User; import com.littleinc.orm_benchmark.greendao.Message; import com.littleinc.orm_benchmark.greendao.UserDao; import com.littleinc.orm_benchmark.greendao.MessageDao; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * {@inheritDoc} * * @see de.greenrobot.dao.AbstractDaoSession */ public class DaoSession extends AbstractDaoSession { private final DaoConfig userDaoConfig; private final DaoConfig messageDaoConfig; private final UserDao userDao; private final MessageDao messageDao; public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> daoConfigMap) { super(db); userDaoConfig = daoConfigMap.get(UserDao.class).clone(); userDaoConfig.initIdentityScope(type); messageDaoConfig = daoConfigMap.get(MessageDao.class).clone(); messageDaoConfig.initIdentityScope(type); userDao = new UserDao(userDaoConfig, this); messageDao = new MessageDao(messageDaoConfig, this); registerDao(User.class, userDao); registerDao(Message.class, messageDao); } public void clear() { userDaoConfig.getIdentityScope().clear(); messageDaoConfig.getIdentityScope().clear(); } public UserDao getUserDao() { return userDao; } public MessageDao getMessageDao() { return messageDao; } }