Class RecordToDBMapping

java.lang.Object
org.gcube.accounting.utility.postgresql.RecordToDBMapping

public class RecordToDBMapping extends Object
  • Field Details

  • Constructor Details

    • RecordToDBMapping

      public RecordToDBMapping()
  • Method Details

    • getRecordTypeByClass

      public static String getRecordTypeByClass(Class<? extends org.gcube.documentstore.records.Record> clz)
    • addRecordToDB

      public void addRecordToDB(Class<? extends org.gcube.documentstore.records.AggregatedRecord<?,?>> clz, org.gcube.documentstore.persistence.PersistenceBackendConfiguration configuration) throws Exception
      Throws:
      Exception
    • getRecordToDBFields

      public static RecordToDBFields getRecordToDBFields(Class<? extends org.gcube.documentstore.records.Record> clz) throws Exception
      Throws:
      Exception
    • createSchema

      public void createSchema() throws Exception
      Creates what is missing of the schema in every database the records are written to: one, unless the configuration gives a record type a database of its own.
      Throws:
      Exception - if a database cannot be reached or refuses the schema
    • getRecordDBInfo

      public RecordToDBConnection getRecordDBInfo(Class<? extends org.gcube.documentstore.records.Record> clz) throws Exception
      Throws:
      Exception