Class VirtuosoAdapter

  • All Implemented Interfaces:
    DatastoreAdapter

    public class VirtuosoAdapter
    extends BaseDatastoreAdapter
    Provides methods for adapting SQL language elements to the Virtuoso database. See http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/
    • Constructor Detail

      • VirtuosoAdapter

        public VirtuosoAdapter​(java.sql.DatabaseMetaData metadata)
    • Method Detail

      • newSQLTypeInfo

        public SQLTypeInfo newSQLTypeInfo​(java.sql.ResultSet rs)
        Description copied from interface: DatastoreAdapter
        Create a new SQL type info from the current row of the passed ResultSet. Allows an adapter to override particular types where the JDBC driver is known to be buggy.
        Specified by:
        newSQLTypeInfo in interface DatastoreAdapter
        Overrides:
        newSQLTypeInfo in class BaseDatastoreAdapter
        Parameters:
        rs - ResultSet
        Returns:
        The SQL type info
      • getExistingIndexes

        public java.sql.ResultSet getExistingIndexes​(java.sql.Connection conn,
                                                     java.lang.String catalog,
                                                     java.lang.String schema,
                                                     java.lang.String table)
                                              throws java.sql.SQLException
        Provide the existing indexes in the database for the table.
        Specified by:
        getExistingIndexes in interface DatastoreAdapter
        Overrides:
        getExistingIndexes in class BaseDatastoreAdapter
        Parameters:
        conn - the JDBC connection
        catalog - the catalog name
        schema - the schema name.
        table - the table name
        Returns:
        a ResultSet with the format @see DatabaseMetaData#getIndexInfo(java.lang.String, java.lang.String, java.lang.String, boolean, boolean)
        Throws:
        java.sql.SQLException - if an error occurs
      • getIdentityLastValueStmt

        public java.lang.String getIdentityLastValueStmt​(Table table,
                                                         java.lang.String columnName)
        Accessor for the auto-increment sql statement for this datastore.
        Specified by:
        getIdentityLastValueStmt in interface DatastoreAdapter
        Overrides:
        getIdentityLastValueStmt in class BaseDatastoreAdapter
        Parameters:
        table - Name of the table that the autoincrement is for
        columnName - Name of the column that the autoincrement is for
        Returns:
        The statement for getting the latest auto-increment key
      • getIdentityKeyword

        public java.lang.String getIdentityKeyword​(org.datanucleus.store.StoreManager storeMgr)
        Accessor for the auto-increment keyword for generating DDLs (CREATE TABLEs...).
        Specified by:
        getIdentityKeyword in interface DatastoreAdapter
        Overrides:
        getIdentityKeyword in class BaseDatastoreAdapter
        Parameters:
        storeMgr - The Store Manager
        Returns:
        The keyword for a column using auto-increment
      • loadColumnMappings

        protected void loadColumnMappings​(org.datanucleus.plugin.PluginManager mgr,
                                          org.datanucleus.ClassLoaderResolver clr)
        Load all datastore mappings for this RDBMS database.
        Overrides:
        loadColumnMappings in class BaseDatastoreAdapter
        Parameters:
        mgr - the PluginManager
        clr - the ClassLoaderResolver