Package org.encuestame.persistence.domain.application

Examples of org.encuestame.persistence.domain.application.Application


     */
    @SuppressWarnings("unchecked")
    public Application getApplicationByKey(final String key) throws Exception{
         final DetachedCriteria criteria = DetachedCriteria.forClass(Application.class);
         criteria.add(Restrictions.eq("apiKey", key) );
         final Application app = (Application) DataAccessUtils.uniqueResult(getHibernateTemplate().findByCriteria(criteria));
         log.debug("Application debug "+app);
         if(app == null){
             throw new Exception("application key not found");
         }
         return app;
View Full Code Here


     * @return
     * @throws Exception
     */
    public ApplicationConnection
           connectApplication(final Long accountId, final String apiKey) throws Exception{
        final Application application = getApplicationByKey(apiKey);
        final UserAccount account = getAccountDaoImp().getUserAccountById(accountId);
        final ApplicationConnection app = searchConnectionByAppIdAndUserId(account, application);
        ApplicationConnection applicationConnection = null;
        if (app != null) {
            log.debug("Removing application connection id "+app.getConnectionId());
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.application.Application

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.