Class TableSchemaFactory

    • Constructor Detail

      • TableSchemaFactory

        public TableSchemaFactory()
    • Method Detail

      • getTable

        public String getTable()
        The name of the schema definition table. Defaults to OPENJPA_SCHEMA.
      • setTable

        public void setTable​(String name)
        The name of the schema definition table. Defaults to OPENJPA_SCHEMA.
      • setPrimaryKeyColumn

        public void setPrimaryKeyColumn​(String name)
        The name of the primary key column on the schema definition table. Defaults to ID.
      • getPrimaryKeyColumn

        public String getPrimaryKeyColumn()
        The name of the primary key column on the schema definition table. Defaults to ID.
      • setSchemaColumn

        public void setSchemaColumn​(String name)
        The name of the schema column on the schema definition table. Defaults to SCHEMA_DEF.
      • getSchemaColumn

        public String getSchemaColumn()
        The name of the schema column on the schema definition table. Defaults to SCHEMA_DEF.
      • startConfiguration

        public void startConfiguration()
        Description copied from interface: Configurable
        Invoked before bean property configuration is begun on this object.
        Specified by:
        startConfiguration in interface Configurable
      • endConfiguration

        public void endConfiguration()
        Description copied from interface: Configurable
        Invoked upon completion of bean property configuration for this object.
        Specified by:
        endConfiguration in interface Configurable
      • storeSchema

        public void storeSchema​(SchemaGroup schema)
        Description copied from interface: SchemaFactory
        Record the schema group after changes may have been made.
        Specified by:
        storeSchema in interface SchemaFactory
        Parameters:
        schema - the schema definition for the entire system
      • refreshTable

        public void refreshTable()
                          throws SQLException
        Creates the schema table in the DB.
        Throws:
        SQLException
      • writeSchemaColumn

        public void writeSchemaColumn​(String schema)
                               throws SQLException
        Writes the schema as a string to the database.
        Throws:
        SQLException
      • main

        public static void main​(String[] args)
                         throws IOException,
                                SQLException
        Usage: java org.apache.openjpa.jdbc.schema.TableSchemaFactory [option]* -action/-a <add | drop> Where the following options are recognized.
        • -properties/-p <properties file or resource>: The path or resource name of a OpenJPA properties file containing information such as the license key and connection data as outlined in JDBCConfiguration. Optional.
        • -<property name> <property value>: All bean properties of the OpenJPA JDBCConfiguration can be set by using their names and supplying a value. For example: -licenseKey adslfja83r3lkadf
        The various actions are as follows.
        • add: Create the schema table.
        • drop: Drop the schema table.
        Throws:
        IOException
        SQLException