35 lines
1.0 KiB
Java
35 lines
1.0 KiB
Java
package org.gcube.accounting.aggregator.persistence;
|
|
|
|
/**
|
|
* @author Luca Frosini (ISTI-CNR)
|
|
*/
|
|
public class AggregatorPersistenceFactory {
|
|
|
|
private static AggregatorPersistenceStatus aggregatorPersistenceStatus;
|
|
|
|
private static AggregatorPersistenceSrc aggregatorPersistenceSrc;
|
|
private static AggregatorPersistenceDst aggregatorPersistenceDst;
|
|
|
|
public static AggregatorPersistenceStatus getAggregatorPersistenceStatus() throws Exception {
|
|
if(aggregatorPersistenceStatus == null) {
|
|
aggregatorPersistenceStatus = new PostgreSQLConnectorSrc();
|
|
}
|
|
return aggregatorPersistenceStatus;
|
|
}
|
|
|
|
public static AggregatorPersistenceSrc getAggregatorPersistenceSrc() throws Exception {
|
|
if(aggregatorPersistenceSrc == null) {
|
|
aggregatorPersistenceSrc = new PostgreSQLConnectorSrc();
|
|
}
|
|
return aggregatorPersistenceSrc;
|
|
}
|
|
|
|
public static AggregatorPersistenceDst getAggregatorPersistenceDst() throws Exception {
|
|
if(aggregatorPersistenceDst == null) {
|
|
aggregatorPersistenceDst = new PostgreSQLConnectorDst();
|
|
}
|
|
return aggregatorPersistenceDst;
|
|
}
|
|
|
|
}
|