コード例 #1
0
 public static QueryBuilder getQueryBuilder(
     AbstractDao dao, WhereCondition cond, WhereCondition... condmore) {
   setIfLog();
   QueryBuilder qb = dao.queryBuilder();
   qb.where(cond, condmore);
   return qb;
 }
コード例 #2
0
 /**
  * Executes the query and returns the result as a list containing all entities loaded into memory.
  *
  * @param dao
  * @param orderProperty
  * @param whereCondition
  * @param whereConditions
  * @return
  */
 public static List getList(
     AbstractDao dao,
     Property orderProperty,
     WhereCondition whereCondition,
     WhereCondition... whereConditions) {
   setIfLog();
   List indexFavList =
       dao.queryBuilder().where(whereCondition, whereConditions).orderAsc(orderProperty).list();
   return indexFavList;
 }
コード例 #3
0
 /**
  * Executes the query and returns the result as a list containing all entities loaded into memory.
  *
  * @param dao
  * @param isAsc
  * @param orderProperty
  * @return
  */
 public static List getList(AbstractDao dao, boolean isAsc, Property... orderProperty) {
   setIfLog();
   QueryBuilder queryBuilder = dao.queryBuilder();
   if (isAsc) {
     queryBuilder = queryBuilder.orderAsc(orderProperty);
   } else {
     queryBuilder = queryBuilder.orderDesc(orderProperty);
   }
   List indexFavList = queryBuilder.list();
   return indexFavList;
 }
コード例 #4
0
 /**
  * Deletes the given entity from the database. Currently, only single value PK entities are
  * supported.
  *
  * @param dao
  * @param entity
  */
 public static void delete(AbstractDao dao, Object entity) {
   dao.delete(entity);
 }
コード例 #5
0
 public static void insertOrReplace(AbstractDao dao, List entities) {
   dao.insertOrReplace(entities);
 }
コード例 #6
0
 @Override
 protected void attachEntity(PokemonSpeciesProse entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #7
0
 @Override
 protected void attachEntity(ConquestWarriorNames entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #8
0
 @Override
 protected void attachEntity(TokensBD entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #9
0
ファイル: FirsatlarimDao.java プロジェクト: royan367/Harita
 @Override
 protected void attachEntity(Firsatlarim entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #10
0
 @Override
 protected void attachEntity(ItemFlagProse entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #11
0
 /**
  * Deletes all matching entities without detaching them from the identity scope (aka
  * session/cache). Note that this method may lead to stale entity objects in the session cache.
  * Stale entities may be returned when loaded by their primary key, but not using queries.
  *
  * @param dao
  * @param cond
  * @param condmore
  */
 public static void deleteByCondition(
     AbstractDao dao, WhereCondition cond, WhereCondition... condmore) {
   setIfLog();
   QueryBuilder qb = dao.queryBuilder();
   qb.where(cond, condmore).buildDelete().executeDeleteWithoutDetachingEntities();
 }
コード例 #12
0
 @Override
 protected void attachEntity(DolphinContext entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #13
0
 @Override
 protected void attachEntity(EncounterSlots entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
 @Override
 protected void attachEntity(CapitalMarketsRevenue entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #15
0
 @Override
 protected void attachEntity(DbGroupUserMappingVo entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #16
0
 @Override
 protected void attachEntity(Natures entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #17
0
 @Override
 protected void attachEntity(StaffsTasks entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #18
0
 /**
  * Deletes the given entities in the database using a transaction.
  *
  * @param dao
  * @param entities
  */
 public static void delete(AbstractDao dao, List entities) {
   dao.deleteInTx(entities);
 }
コード例 #19
0
 /**
  * @see #getList(de.greenrobot.dao.AbstractDao, de.greenrobot.dao.Property,
  *     de.greenrobot.dao.query.WhereCondition, de.greenrobot.dao.query.WhereCondition...)
  * @param dao
  * @return
  */
 public static List getList(AbstractDao dao) {
   setIfLog();
   List indexFavList = dao.queryBuilder().list();
   return indexFavList;
 }
コード例 #20
0
 @Override
 protected void attachEntity(ThirdGameDownInfo entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #21
0
 /**
  * Creates a repeatable Query object based on the given raw SQL where you can pass any WHERE
  * clause and arguments.
  *
  * @param dao
  * @param queryString
  * @param queryValue
  * @return
  */
 public static Query query(AbstractDao dao, String queryString, String queryValue) {
   // queryString=", GROUP G WHERE G.NAME=? AND T.GROUP_ID=G._ID"
   // queryValue="admin"
   Query query = dao.queryRawCreate(queryString, queryValue);
   return query;
 }
コード例 #22
0
  /**
   * Creates a repeatable Query object based on the given raw SQL where you can pass any WHERE
   * clause and arguments.
   *
   * @param dao
   * @param queryString
   * @return
   */
  public static Query query(AbstractDao dao, String queryString) {
    // queryString="_ID IN " + "(SELECT USER_ID FROM USER_MESSAGE WHERE READ_FLAG = 0)"

    Query query = dao.queryBuilder().where(new WhereCondition.StringCondition(queryString)).build();
    return query;
  }
コード例 #23
0
ファイル: MunkaKepDao.java プロジェクト: parmalazs/schonherz
 @Override
 protected void attachEntity(MunkaKep entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #24
0
 /**
  * Insert an entity into the table associated with a concrete DAO.
  *
  * @param dao
  * @param entity
  */
 public static void insert(AbstractDao dao, Object entity) {
   dao.insert(entity);
 }
コード例 #25
0
 protected void attachEntity(FavoriteFood favoritefood)
 {
     super.attachEntity(favoritefood);
     favoritefood.__setDaoSession(daoSession);
 }
コード例 #26
0
 /**
  * Insert an entity into the table associated with a concrete DAO.
  *
  * @param dao
  * @param entities
  */
 public static void insert(AbstractDao dao, List entities) {
   dao.insertInTx(entities);
 }
コード例 #27
0
 protected void attachEntity(FoodLogEntry foodlogentry)
 {
     super.attachEntity(foodlogentry);
     foodlogentry.__setDaoSession(daoSession);
 }
コード例 #28
0
 public static void insertOrReplace(AbstractDao dao, Object entity) {
   dao.insertOrReplace(entity);
 }
コード例 #29
0
ファイル: CategoryDao.java プロジェクト: CytoDev/BrainPhaser
 @Override
 protected void attachEntity(Category entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
コード例 #30
0
 @Override
 protected void attachEntity(RelationSource2 entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }