Android RoboSpiceDatabaseHelper - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android RoboSpiceDatabaseHelper class.

This code example shows how to use the following methods:
        classCollection.add( Forecast.class ); 
        classCollection.add( Night.class ); 
        classCollection.add( Wind.class ); 
 
        // init 
        RoboSpiceDatabaseHelper databaseHelper = new RoboSpiceDatabaseHelper( application, "sample_database.db", 1 ); 
        InDatabaseObjectPersisterFactory inDatabaseObjectPersisterFactory = new InDatabaseObjectPersisterFactory( application, databaseHelper, classCollection ); 
        cacheManager.addPersister( inDatabaseObjectPersisterFactory ); 
        return cacheManager; 
    } 
 
    @Override 
    public RestTemplate createRestTemplate() { 
        RestTemplate restTemplate = new RestTemplate(); 
        // set timeout for requests 
 
        HttpComponentsClientHttpRequestFactory httpRequestFactory = new HttpComponentsClientHttpRequestFactory(); 
        httpRequestFactory.setReadTimeout( WEBSERVICES_TIMEOUT ); 
        httpRequestFactory.setConnectTimeout( WEBSERVICES_TIMEOUT ); 
        restTemplate.setRequestFactory( httpRequestFactory ); 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
        classCollection.add( Forecast.class ); 
        classCollection.add( Night.class ); 
        classCollection.add( Wind.class ); 
 
        // init 
        RoboSpiceDatabaseHelper databaseHelper = new RoboSpiceDatabaseHelper( application, "sample_database.db", 1 ); 
        InDatabaseObjectPersisterFactory inDatabaseObjectPersisterFactory = new InDatabaseObjectPersisterFactory( application, databaseHelper, classCollection ); 
        cacheManager.addPersister( inDatabaseObjectPersisterFactory ); 
        return cacheManager; 
    } 
 
    @Override 
    public RestTemplate createRestTemplate() { 
        RestTemplate restTemplate = new RestTemplate(); 
        // set timeout for requests 
 
        HttpComponentsClientHttpRequestFactory httpRequestFactory = new HttpComponentsClientHttpRequestFactory(); 
        httpRequestFactory.setReadTimeout( WEBSERVICES_TIMEOUT ); 
        httpRequestFactory.setConnectTimeout( WEBSERVICES_TIMEOUT ); 
        restTemplate.setRequestFactory( httpRequestFactory ); 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
        // add persisted classes to class collection 
        classCollection.add( Entry.class ); 
        classCollection.add( Feed.class ); 
 
        // init 
        RoboSpiceDatabaseHelper databaseHelper = new RoboSpiceDatabaseHelper( application, DATABASE_NAME, DATABASE_VERSION ); 
        InDatabaseObjectPersisterFactory inDatabaseObjectPersisterFactory = new InDatabaseObjectPersisterFactory( application, databaseHelper, classCollection ); 
        cacheManager.addPersister( inDatabaseObjectPersisterFactory ); 
        return cacheManager; 
    } 
 
    @Override 
    public RestTemplate createRestTemplate() { 
        RestTemplate restTemplate = new RestTemplate(); 
        // set timeout for requests 
 
        HttpComponentsClientHttpRequestFactory httpRequestFactory = new HttpComponentsClientHttpRequestFactory(); 
        httpRequestFactory.setReadTimeout( WEBSERVICES_TIMEOUT ); 
        httpRequestFactory.setConnectTimeout( WEBSERVICES_TIMEOUT ); 
        restTemplate.setRequestFactory( httpRequestFactory ); 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Android RoboSpiceDatabaseHelper Methods: