Android InDatabaseObjectPersisterFactory - 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 InDatabaseObjectPersisterFactory class.

This code example shows how to use the following methods:
        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 ); 
 
5
CodeRank
This code example shows how to use the following methods:
        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 ); 
 
5
CodeRank
This code example shows how to use the following methods:
        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 ); 
 
5
CodeRank
See Code Examples for Android InDatabaseObjectPersisterFactory Methods: