agave-systems/systems-core/src/main/java/org/iplantc/service/systems/dao/SystemDao.java
/**
     * Finds system by systemId regardless of avaialbility and ownership.
     * Note: the tenant id will be pulled from the current context.
     *
     * @param systemId id of the system to fetch.
     * @return the system with the given {@code systemId} or null if no match is found.
     */
Finds system by systemId regardless of avaialbility and ownership.
Note: the tenant id will be pulled from the current context.

@param systemId id of the system to fetch.
@return the system with the given  systemId or null if no match is found.
Finds system by systemId regardless of avaialbility and ownership . Note : the tenant id will be pulled from the current context . @param systemId id of the system to fetch . @return the system with the given systemId or null if no match is found .
public RemoteSystem findActiveAndInactiveSystemBySystemId(String systemId) {
        RemoteSystem system = null;
        try {
            Session session = getSession();
            session.clear();
            String hql = "from RemoteSystem " + "where systemId = :systemId "
                    + "		and tenantId = :tenantId ";
            system = (RemoteSystem) session.createQuery(hql)
                    .setString("systemId", systemId)
                    .setString("tenantId", TenancyHelper.getCurrentTenantId())
                    .setCacheable(false)
                    .setCacheMode(CacheMode.IGNORE)
                    .setMaxResults(1)
                    .uniqueResult();
        } catch (ObjectNotFoundException ex) {
            return null;
        } catch (StaleStateException ex) {
        } catch (HibernateException ex) {
            throw ex;
        } finally {
            try {
                HibernateUtil.commitTransaction();
            } catch (Throwable ignored) {
            }
        }
        return system;
    }
public RemoteSystem findActiveAndInactiveSystemBySystemId ( String systemId ) { RemoteSystem system = null ; try { Session session = getSession ( ) ; session . clear ( ) ; String hql = "from RemoteSystem " + "where systemId = :systemId " + "		and tenantId = :tenantId " ; system = ( RemoteSystem ) session . createQuery ( hql ) . setString ( "systemId" , systemId ) . setString ( "tenantId" , TenancyHelper . getCurrentTenantId ( ) ) . setCacheable ( false ) . setCacheMode ( CacheMode . IGNORE ) . setMaxResults ( 1 ) . uniqueResult ( ) ; } catch ( ObjectNotFoundException ex ) { return null ; } catch ( StaleStateException ex ) { } catch ( HibernateException ex ) { throw ex ; } finally { try { HibernateUtil . commitTransaction ( ) ; } catch ( Throwable ignored ) { } } return system ; }
Finds system by systemId regardless of avaialbility and ownership.
Finds system by systemId regardless of avaialbility and ownership .
// skip due to unrelated issue