public List < EndpointOverride > getPaths ( int profileId , String clientUUID , String [ ] filters ) throws Exception { ArrayList < EndpointOverride > properties = new ArrayList < EndpointOverride > ( ) ; PreparedStatement statement = null ; ResultSet results = null ; try ( Connection sqlConnection = sqlService . getConnection ( ) ) { String queryString = this . getPathSelectString ( ) ; queryString += " AND " + Constants . DB_TABLE_PATH + "." + Constants . GENERIC_PROFILE_ID + "=? " + " ORDER BY " + Constants . PATH_PROFILE_PATH_ORDER + " ASC" ; statement = sqlConnection . prepareStatement ( queryString ) ; statement . setString ( 1 , clientUUID ) ; statement . setInt ( 2 , profileId ) ; results = statement . executeQuery ( ) ; while ( results . next ( ) ) { EndpointOverride endpoint = this . getEndpointOverrideFromResultSet ( results ) ; endpoint . setFilters ( filters ) ; properties . add ( endpoint ) ; } } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { try { if ( results != null ) { results . close ( ) ; } } catch ( Exception e ) { } try { if ( statement != null ) { statement . close ( ) ; } } catch ( Exception e ) { } } return properties ; }
Returns an array of all endpoints