Class ClassTableJDBCSeq

    • Constructor Detail

      • ClassTableJDBCSeq

        public ClassTableJDBCSeq()
    • Method Detail

      • getIgnoreUnmapped

        public boolean getIgnoreUnmapped()
        Whether unmapped classes should be ignored as possible primary key values in the table. Defaults to false.
      • setIgnoreUnmapped

        public void setIgnoreUnmapped​(boolean ignore)
        Whether unmapped classes should be ignored as possible primary key values in the table. Defaults to false.
      • setIgnoreVirtual

        @Deprecated
        public void setIgnoreVirtual​(boolean ignore)
        Deprecated.
        Use setIgnoreUnmapped(boolean). Retained for backwards-compatibility for auto-configuration.
      • getUseAliases

        public boolean getUseAliases()
        Whether to use type alises for primary key values in place of class names. Defaults to false.
      • setUseAliases

        public void setUseAliases​(boolean aliases)
        Whether to use type alises for primary key values in place of class names. Defaults to false.
      • getPrimaryKey

        protected java.lang.Object getPrimaryKey​(ClassMapping mapping)
        Description copied from class: TableJDBCSeq
        Return the primary key value for the sequence table for the given class.
        Overrides:
        getPrimaryKey in class TableJDBCSeq
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Usage: java org.apache.openjpa.jdbc.kernel.ClassTableJDBCSeq [option]* -action/-a <add | drop | get | set> [class name | .java file | .class file | .jdo file] [value] 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 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.
        The various actions are as follows.
        • add: Create the sequence table.
        • drop: Drop the sequence table.
        • get: Print the current sequence value for the given class.
        • set: Set the sequence value for the given class.
        Throws:
        java.lang.Exception
      • run

        public static boolean run​(JDBCConfiguration conf,
                                  java.lang.String[] args,
                                  Options opts)
                           throws java.lang.Exception
        Run the tool. Returns false if invalid options were given.
        Throws:
        java.lang.Exception
      • run

        public static boolean run​(JDBCConfiguration conf,
                                  java.lang.String[] args,
                                  java.lang.String action,
                                  MappingRepository repos,
                                  java.lang.ClassLoader loader)
                           throws java.lang.Exception
        Run the tool. Return false if an invalid option was given.
        Throws:
        java.lang.Exception