Added PortletUSageRecord Table sql
This commit is contained in:
parent
9ec79fc8c5
commit
ac846eac7a
|
@ -61,19 +61,6 @@ public class PersistencePostgreSQLTest extends ContextTest {
|
||||||
return serviceUsageRecord;
|
return serviceUsageRecord;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
protected AggregatedServiceUsageRecord getTestAggregatedServiceUsageRecord() throws Exception {
|
|
||||||
ServiceUsageRecord serviceUsageRecord = TestUsageRecord.createTestServiceUsageRecord();
|
|
||||||
AggregatedServiceUsageRecord aggregatedServiceUsageRecord = new AggregatedServiceUsageRecord(serviceUsageRecord);
|
|
||||||
return aggregatedServiceUsageRecord;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected AggregatedStorageUsageRecord getTestAggregatedStorageUsageRecord() throws Exception {
|
|
||||||
StorageUsageRecord storageUsageRecord = TestUsageRecord.createTestStorageUsageRecord();
|
|
||||||
AggregatedStorageUsageRecord aggregatedStorageUsageRecord = new AggregatedStorageUsageRecord(storageUsageRecord);
|
|
||||||
return aggregatedStorageUsageRecord;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected AggregatedJobUsageRecord getTestAggregatedJobUsageRecord() throws Exception {
|
protected AggregatedJobUsageRecord getTestAggregatedJobUsageRecord() throws Exception {
|
||||||
JobUsageRecord jobUsageRecord = TestUsageRecord.createTestJobUsageRecord();
|
JobUsageRecord jobUsageRecord = TestUsageRecord.createTestJobUsageRecord();
|
||||||
AggregatedJobUsageRecord aggregatedJobUsageRecord = new AggregatedJobUsageRecord(jobUsageRecord);
|
AggregatedJobUsageRecord aggregatedJobUsageRecord = new AggregatedJobUsageRecord(jobUsageRecord);
|
||||||
|
@ -86,12 +73,24 @@ public class PersistencePostgreSQLTest extends ContextTest {
|
||||||
return aggregatedPortletUsageRecord;
|
return aggregatedPortletUsageRecord;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected AggregatedServiceUsageRecord getTestAggregatedServiceUsageRecord() throws Exception {
|
||||||
|
ServiceUsageRecord serviceUsageRecord = TestUsageRecord.createTestServiceUsageRecord();
|
||||||
|
AggregatedServiceUsageRecord aggregatedServiceUsageRecord = new AggregatedServiceUsageRecord(serviceUsageRecord);
|
||||||
|
return aggregatedServiceUsageRecord;
|
||||||
|
}
|
||||||
|
|
||||||
protected AggregatedStorageStatusRecord getTestAggregatedStorageStatusRecord() throws Exception {
|
protected AggregatedStorageStatusRecord getTestAggregatedStorageStatusRecord() throws Exception {
|
||||||
StorageStatusRecord storageStatusRecord = TestUsageRecord.createTestStorageVolumeUsageRecord();
|
StorageStatusRecord storageStatusRecord = TestUsageRecord.createTestStorageVolumeUsageRecord();
|
||||||
AggregatedStorageStatusRecord aggregatedStorageStatusRecord = new AggregatedStorageStatusRecord(storageStatusRecord);
|
AggregatedStorageStatusRecord aggregatedStorageStatusRecord = new AggregatedStorageStatusRecord(storageStatusRecord);
|
||||||
return aggregatedStorageStatusRecord;
|
return aggregatedStorageStatusRecord;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected AggregatedStorageUsageRecord getTestAggregatedStorageUsageRecord() throws Exception {
|
||||||
|
StorageUsageRecord storageUsageRecord = TestUsageRecord.createTestStorageUsageRecord();
|
||||||
|
AggregatedStorageUsageRecord aggregatedStorageUsageRecord = new AggregatedStorageUsageRecord(storageUsageRecord);
|
||||||
|
return aggregatedStorageUsageRecord;
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSQLStatementString() throws Exception {
|
public void testSQLStatementString() throws Exception {
|
||||||
PersistencePostgreSQL persistencePostgreSQL = new PersistencePostgreSQL();
|
PersistencePostgreSQL persistencePostgreSQL = new PersistencePostgreSQL();
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
CREATE TABLE "portletusagerecord"(
|
||||||
|
id TEXT NOT NULL,
|
||||||
|
consumer_id TEXT NOT NULL,
|
||||||
|
creation_time TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||||
|
scope TEXT NOT NULL,
|
||||||
|
operation_result operation_result NOT NULL,
|
||||||
|
caller_qualifier TEXT NOT NULL DEFAULT 'TOKEN',
|
||||||
|
portlet_id TEXT NOT NULL,
|
||||||
|
operation_id TEXT NOT NULL,
|
||||||
|
operation_count INTEGER NOT NULL DEFAULT 1,
|
||||||
|
aggregated BOOLEAN NOT NULL DEFAULT true,
|
||||||
|
start_time TIMESTAMP WITH TIME ZONE NOT NULL,
|
||||||
|
end_time TIMESTAMP WITH TIME ZONE NOT NULL
|
||||||
|
);
|
Loading…
Reference in New Issue