Package com.dotmarketing.exception

Examples of com.dotmarketing.exception.DotDataException


    } catch (Exception e) {

      if (localTransaction) {
        HibernateUtil.rollbackTransaction();
      }
      throw new DotDataException(e.getMessage(),e);
    }
  }
View Full Code Here


                                + newPrettyName + "/" + newMinor );
                        ret = newPrettyName;
                    }

                } else {
                    throw new DotDataException( "Unknown return code: " + method.getStatusCode() + " (" + method.getStatusText() + ")" );
                }
            }
        } catch ( HttpException e ) {
            Logger.error( UpdateUtil.class, "HttpException: " + e.getMessage(),
                    e );
            throw new DotDataException( "HttpException: " + e.getMessage(), e );

        } catch ( IOException e ) {
            Logger.error( UpdateUtil.class, "IOException: " + e.getMessage(), e );
            throw new DotDataException( "IOException: " + e.getMessage(), e );
        }

        return ret;
    }
View Full Code Here

                smt.executeUpdate("unlock tables");
                smt.close();
            }
        }
        catch(Exception ex) {
            throw new DotDataException(ex.getMessage(),ex);
        }
    }
View Full Code Here

            Statement smt=conn.createStatement();
            smt.execute(lock);
            smt.close();
        }
        catch(Exception ex) {
            throw new DotDataException(ex.getMessage(),ex);
        }
    }
View Full Code Here

          value = results.get(i).get("userid");
          try {
            user = APILocator.getUserAPI().loadUserById(value,APILocator.getUserAPI().getSystemUser(),true);
          } catch (Exception e) {
            Logger.error(this, e.getMessage(),e);
            throw new DotDataException(e.getMessage(), e);
          }
          users.add(user);
          usersProxy.add(getUserProxy(user.getUserId()));
         
          value = results.get(i).get("group_name");
View Full Code Here

    HibernateUtil.delete(object);
    try {
      cleanParentChildrenCaches(object);
      catCache.remove(object);
    } catch (DotCacheException e) {
      throw new DotDataException(e.getMessage(), e);
    }
  }
View Full Code Here

      }
      if(cat != null)
        try {
          catCache.put(cat);
        } catch (DotCacheException e) {
          throw new DotDataException(e.getMessage(), e);
        }
    }
    return cat;
  }
View Full Code Here

  }

  @Override
  protected Category findByKey(String key) throws DotDataException {
    if(key==null){
      throw new DotDataException("null key passed in");
    }
    Category cat = catCache.getByKey(key);
    if(cat ==null){
      HibernateUtil hu = new HibernateUtil(Category.class);
      hu.setQuery("from " + Category.class.getName() + " as cat where lower(cat.key) = ? and category0__1_.type='category'");
      hu.setParam(key.toLowerCase());
      cat = (Category) hu.load();
      if(cat != null)
        try {
          catCache.put(cat);
        } catch (DotCacheException e) {
          throw new DotDataException(e.getMessage(), e);
        }
    }
    return cat;
  }
View Full Code Here

      //Updating the cache since we are already loading all the categories
      if(catCache.get(cat.getInode()) == null)
        try {
          catCache.put(cat);
        } catch (DotCacheException e) {
          throw new DotDataException(e.getMessage(), e);
        }
    }
    return cats;
  }
View Full Code Here

        BeanUtils.copyProperties(cat,object);
        HibernateUtil.saveOrUpdate(cat);
        cleanParentChildrenCaches(object);

      }catch(Exception ex){
        throw new DotDataException(ex.getMessage(),ex);
      }
    }else{
      HibernateUtil.save(object);
      try {
        cleanParentChildrenCaches(object);
        catCache.remove(object);
      } catch (DotCacheException e) {
        throw new DotDataException(e.getMessage(), e);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.dotmarketing.exception.DotDataException

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.