Package org.mybeans.dao

Examples of org.mybeans.dao.DAOException


  }
  public int getLogSideNum(String UserName) throws DAOException{
    try{
      return factory.match(MatchArg.equals("owner",UserName)).length;
    }catch(RollbackException e){
      throw new DAOException(e);
    }
  }
View Full Code Here


  }
  public int size() throws DAOException{
    try{
      return factory.getBeanCount();
    }catch(RollbackException e){
      throw new DAOException(e);
    }
  }
View Full Code Here

        }
        Transaction.commit();
        return Large;
      }catch (RollbackException e) {
        try {
          throw new DAOException(e);
        } catch (DAOException e1) {
          // TODO Auto-generated catch block
          e1.printStackTrace();
        }
      }
View Full Code Here

      BeanTable<SideEffect> MedTable = BeanTable.getInstance(SideEffect.class, "SideEffect_table");
      if(!MedTable.exists()) MedTable.create("sideid");
      MedTable.setIdleConnectionCleanup(true);
      factory = MedTable.getFactory();
    }catch(BeanFactoryException e){
      throw new DAOException(e);
    }
  }
View Full Code Here

      Transaction.begin();
      SideEffect dbSide = factory.create(side.getSideid());
      factory.copyInto(side,dbSide);
      Transaction.commit();
    }catch(DuplicateKeyException e){
      throw new DAOException("A Side effect  named " + side.getName() + "has already existed.");
    }catch(RollbackException e){
      throw new DAOException(e);
    }finally{
      if(Transaction.isActive()) Transaction.rollback();
    }
  }
View Full Code Here

  public SideEffect lookup(int SideId){
    try{
      return factory.lookup(SideId);
    }catch(RollbackException e){
      try {
        throw new DAOException(e);
      } catch (DAOException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
      }
    }
View Full Code Here

    try{
        Transaction.begin();
      factory.delete(sideid);
        Transaction.commit();
    }catch (RollbackException e){
      throw new DAOException(e);
    }
  }
View Full Code Here

    try{
      SideEffect[] meds = factory.match(MatchArg.equals("owner",UserName));
      return meds;
    }catch(RollbackException e){
      try {
        throw new DAOException(e);
      } catch (DAOException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
      }
    }
View Full Code Here

  public SideEffect getSideName(int Sideid){
    try{
      return factory.lookup(Sideid);
    }catch(RollbackException e){
      try {
        throw new DAOException(e);
      } catch (DAOException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
      }
    }
View Full Code Here

  }
  public int getSideNum(String UserName) throws DAOException{
    try{
      return factory.match(MatchArg.equals("owner",UserName)).length;
    }catch(RollbackException e){
      throw new DAOException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.mybeans.dao.DAOException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.