⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 associatormanagefacade.java

📁 STRUTS数据库项目开发宝典
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
      // Add a an order by on all primary keys to assure reproducable results.
      String orderByPart = "";
      orderByPart += " order by e.hykh";
      queryString += orderByPart;
      Query query = hibernateHelper.createQuery(queryString);
      List list = hibernateHelper.list(query);
      return list;
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }

   /**
    * Returns a subset of all hy instances.
    *
    * @param startIndex the start index within the result set (1 = first record);
    * any zero/negative values are regarded as 1, and any values greater than or equal to
    * the total number of hy instances will simply return an empty set.
    * @param endIndex the end index within the result set (<code>getHyListSize()</code> = last record),
    * any values greater than or equal to the total number of hy instances will cause
    * the full set to be returned.
    * @return a collection of HyIf objects, of size <code>(endIndex - startIndex)</code>.
    */
   public Collection getHyList(int startIndex, int endIndex) throws GenericBusinessException {
      if (startIndex < 1) {
         startIndex = 1;
      }
      if ( (endIndex - startIndex) < 0) {
         // Just return an empty list.
         return new ArrayList();
      }
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
         String queryString = "from HyBean e";
         // Add a an order by on all primary keys to assure reproducable results.
         String orderByPart = "";
         orderByPart += " order by e.hykh";
         queryString += orderByPart;
         // Get a hibernate session.
         Query query = hibernateHelper.createQuery(queryString);
         query.setFirstResult(startIndex - 1);
         query.setMaxResults(endIndex - startIndex + 1);
         List list = hibernateHelper.list(query);
         return list;
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }

   /**
    * Obtains the total number of hy objects in the database.
    *
    * @return an integer value.
    */
   public int getHyListSize() throws GenericBusinessException {
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
         String queryString = "select count(*) from HyBean";
         // Get a hibernate session.
         Query query = hibernateHelper.createQuery(queryString);
         List list = hibernateHelper.list(query);
         Integer countResult = (Integer) list.get(0);
         return countResult.intValue();
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }
   /**
    * Retrieves a data object from the database by its primary key.
    *
    * @param id the unique reference
    * @return HyklxIf the data object
    */
   public org.helpsoft.entity.hyklx.HyklxIf getHyklx(java.lang.String id) throws GenericBusinessException {
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
      // Get a hibernate session.
      HyklxBean bean = (HyklxBean) hibernateHelper.load(HyklxBean.class, id);
      return bean;
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }

   /**
    * Returns a collection of all hyklx instances.
    *
    * @return a collection of HyklxIf objects.
    */
   public Collection getHyklxList() throws GenericBusinessException {
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
      String queryString = "from HyklxBean e";
      // Add a an order by on all primary keys to assure reproducable results.
      String orderByPart = "";
      orderByPart += " order by e.hykmm";
      queryString += orderByPart;
      Query query = hibernateHelper.createQuery(queryString);
      List list = hibernateHelper.list(query);
      return list;
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }

   /**
    * Returns a subset of all hyklx instances.
    *
    * @param startIndex the start index within the result set (1 = first record);
    * any zero/negative values are regarded as 1, and any values greater than or equal to
    * the total number of hyklx instances will simply return an empty set.
    * @param endIndex the end index within the result set (<code>getHyklxListSize()</code> = last record),
    * any values greater than or equal to the total number of hyklx instances will cause
    * the full set to be returned.
    * @return a collection of HyklxIf objects, of size <code>(endIndex - startIndex)</code>.
    */
   public Collection getHyklxList(int startIndex, int endIndex) throws GenericBusinessException {
      if (startIndex < 1) {
         startIndex = 1;
      }
      if ( (endIndex - startIndex) < 0) {
         // Just return an empty list.
         return new ArrayList();
      }
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
         String queryString = "from HyklxBean e";
         // Add a an order by on all primary keys to assure reproducable results.
         String orderByPart = "";
         orderByPart += " order by e.hykmm";
         queryString += orderByPart;
         // Get a hibernate session.
         Query query = hibernateHelper.createQuery(queryString);
         query.setFirstResult(startIndex - 1);
         query.setMaxResults(endIndex - startIndex + 1);
         List list = hibernateHelper.list(query);
         return list;
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }

   /**
    * Obtains the total number of hyklx objects in the database.
    *
    * @return an integer value.
    */
   public int getHyklxListSize() throws GenericBusinessException {
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
         String queryString = "select count(*) from HyklxBean";
         // Get a hibernate session.
         Query query = hibernateHelper.createQuery(queryString);
         List list = hibernateHelper.list(query);
         Integer countResult = (Integer) list.get(0);
         return countResult.intValue();
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }
   /**
    * Retrieves a data object from the database by its primary key.
    *
    * @param id the unique reference
    * @return HyxfIf the data object
    */
   public org.helpsoft.entity.hyxf.HyxfIf getHyxf(java.lang.String id) throws GenericBusinessException {
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
      // Get a hibernate session.
      HyxfBean bean = (HyxfBean) hibernateHelper.load(HyxfBean.class, id);
      return bean;
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }

   /**
    * Returns a collection of all hyxf instances.
    *
    * @return a collection of HyxfIf objects.
    */
   public Collection getHyxfList() throws GenericBusinessException {
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
      String queryString = "from HyxfBean e";
      // Add a an order by on all primary keys to assure reproducable results.
      String orderByPart = "";
      orderByPart += " order by e.wzkqjg";
      queryString += orderByPart;
      Query query = hibernateHelper.createQuery(queryString);
      List list = hibernateHelper.list(query);
      return list;
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }

   /**
    * Returns a subset of all hyxf instances.
    *
    * @param startIndex the start index within the result set (1 = first record);
    * any zero/negative values are regarded as 1, and any values greater than or equal to
    * the total number of hyxf instances will simply return an empty set.
    * @param endIndex the end index within the result set (<code>getHyxfListSize()</code> = last record),
    * any values greater than or equal to the total number of hyxf instances will cause
    * the full set to be returned.
    * @return a collection of HyxfIf objects, of size <code>(endIndex - startIndex)</code>.
    */
   public Collection getHyxfList(int startIndex, int endIndex) throws GenericBusinessException {
      if (startIndex < 1) {
         startIndex = 1;
      }
      if ( (endIndex - startIndex) < 0) {
         // Just return an empty list.
         return new ArrayList();
      }
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
         String queryString = "from HyxfBean e";
         // Add a an order by on all primary keys to assure reproducable results.
         String orderByPart = "";
         orderByPart += " order by e.wzkqjg";
         queryString += orderByPart;
         // Get a hibernate session.
         Query query = hibernateHelper.createQuery(queryString);
         query.setFirstResult(startIndex - 1);
         query.setMaxResults(endIndex - startIndex + 1);
         List list = hibernateHelper.list(query);
         return list;
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }

   /**
    * Obtains the total number of hyxf objects in the database.
    *
    * @return an integer value.
    */
   public int getHyxfListSize() throws GenericBusinessException {
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
         String queryString = "select count(*) from HyxfBean";
         // Get a hibernate session.
         Query query = hibernateHelper.createQuery(queryString);
         List list = hibernateHelper.list(query);
         Integer countResult = (Integer) list.get(0);
         return countResult.intValue();
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }
   /**
    * Retrieves a data object from the database by its primary key.
    *
    * @param id the unique reference
    * @return SpIf the data object
    */
   public org.helpsoft.entity.sp.SpIf getSp(java.lang.String id) throws GenericBusinessException {
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
      // Get a hibernate session.
      SpBean bean = (SpBean) hibernateHelper.load(SpBean.class, id);
      return bean;
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }

   /**
    * Returns a collection of all sp instances.
    *
    * @return a collection of SpIf objects.
    */
   public Collection getSpList() throws GenericBusinessException {
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
      String queryString = "from SpBean e";
      // Add a an order by on all primary keys to assure reproducable results.
      String orderByPart = "";
      orderByPart += " order by e.spbm";
      queryString += orderByPart;
      Query query = hibernateHelper.createQuery(queryString);
      List list = hibernateHelper.list(query);
      return list;
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }

   /**
    * Returns a subset of all sp instances.
    *
    * @param startIndex the start index within the result set (1 = first record);
    * any zero/negative values are regarded as 1, and any values greater than or equal to
    * the total number of sp instances will simply return an empty set.
    * @param endIndex the end index within the result set (<code>getSpListSize()</code> = last record),
    * any values greater than or equal to the total number of sp instances will cause
    * the full set to be returned.
    * @return a collection of SpIf objects, of size <code>(endIndex - startIndex)</code>.
    */
   public Collection getSpList(int startIndex, int endIndex) throws GenericBusinessException {
      if (startIndex < 1) {
         startIndex = 1;
      }
      if ( (endIndex - startIndex) < 0) {
         // Just return an empty list.
         return new ArrayList();
      }
      org.helpsoft.HibernateQueryHelper hibernateHelper = new org.helpsoft.HibernateQueryHelper();   
      try {
         String queryString = "from SpBean e";
         // Add a an order by on all primary keys to assure reproducable results.
         String orderByPart = "";
         orderByPart += " order by e.spbm";
         queryString += orderByPart;
         // Get a hibernate session.
         Query query = hibernateHelper.createQuery(queryString);
         query.setFirstResult(startIndex - 1);
         query.setMaxResults(endIndex - startIndex + 1);
         List list = hibernateHelper.list(query);
         return list;
      } finally {
         if (hibernateHelper != null) {
         	hibernateHelper.close();
         }
      }
   }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -