2015-07-08 16:42:43 +02:00
|
|
|
package org.gcube.accounting.analytics.persistence;
|
|
|
|
|
2015-07-08 17:28:33 +02:00
|
|
|
import java.net.URI;
|
|
|
|
|
2015-07-08 16:42:43 +02:00
|
|
|
import org.gcube.accounting.persistence.AccountingPersistenceConfiguration;
|
2015-07-14 18:45:48 +02:00
|
|
|
import org.gcube.common.resources.gcore.ServiceEndpoint;
|
2015-07-08 16:42:43 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Luca Frosini (ISTI - CNR) http://www.lucafrosini.com/
|
|
|
|
*
|
|
|
|
*/
|
2015-10-14 15:10:06 +02:00
|
|
|
public class AccountingPersistenceBackendQueryConfiguration extends AccountingPersistenceConfiguration {
|
2015-07-08 16:42:43 +02:00
|
|
|
|
2015-09-29 16:25:58 +02:00
|
|
|
/**
|
|
|
|
* Default Constructor
|
|
|
|
*/
|
2015-10-14 15:10:06 +02:00
|
|
|
public AccountingPersistenceBackendQueryConfiguration(){
|
2015-07-08 17:28:33 +02:00
|
|
|
super();
|
|
|
|
}
|
|
|
|
|
2015-09-29 16:25:58 +02:00
|
|
|
/**
|
|
|
|
* @param uri the URI of the persistence
|
|
|
|
* @param username the username to connect to persistence
|
|
|
|
* @param password the password to connect to persistence
|
|
|
|
*/
|
2015-10-14 15:10:06 +02:00
|
|
|
public AccountingPersistenceBackendQueryConfiguration(URI uri, String username, String password){
|
2015-07-08 17:28:33 +02:00
|
|
|
super(uri, username, password);
|
|
|
|
}
|
2015-07-08 16:42:43 +02:00
|
|
|
|
2015-09-29 16:25:58 +02:00
|
|
|
/**
|
|
|
|
* @param persistenceClassName The classname of the persistence to instantiate
|
|
|
|
* @throws Exception if fails
|
|
|
|
*/
|
2015-10-14 15:10:06 +02:00
|
|
|
public AccountingPersistenceBackendQueryConfiguration(String persistenceClassName) throws Exception{
|
2015-07-14 18:45:48 +02:00
|
|
|
super.init();
|
|
|
|
ServiceEndpoint serviceEndpoint = getServiceEndpoint(SERVICE_ENDPOINT_CATEGORY, SERVICE_ENDPOINT_NAME, persistenceClassName);
|
|
|
|
setValues(serviceEndpoint, persistenceClassName);
|
2015-07-08 17:28:33 +02:00
|
|
|
}
|
2015-07-08 16:42:43 +02:00
|
|
|
}
|