Class SequenceMetaData

    • Field Detail

      • NAME_SYSTEM

        public static final String NAME_SYSTEM
        Sequence name that means to use the system default sequence.
        See Also:
        Constant Field Values
      • IMPL_NATIVE

        public static final String IMPL_NATIVE
        Default plugin alias name; every back end should have some 'native' sequence implementation.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SequenceMetaData

        public SequenceMetaData​(String name,
                                MetaDataRepository repos)
        Constructor; supply sequence name.
    • Method Detail

      • getName

        public String getName()
        The sequence name.
      • setSource

        public void setSource​(File file,
                              Object scope,
                              int srcType)
      • getLineNumber

        public int getLineNumber()
        Description copied from interface: SourceTracker
        Return the line number of the file at which this instance was parsed.
        Specified by:
        getLineNumber in interface SourceTracker
      • setLineNumber

        public void setLineNumber​(int lineNum)
      • getColNumber

        public int getColNumber()
        Description copied from interface: SourceTracker
        Return the column number in the line of the file at which this instance was parsed.
        Specified by:
        getColNumber in interface SourceTracker
      • setColNumber

        public void setColNumber​(int colNum)
      • getResourceName

        public String getResourceName()
        Description copied from interface: SourceTracker
        Return the domain-meaningful name of the resource that was loaded from this source. I.e., if we had loaded the source for a Java class, this would return the name of the class.
        Specified by:
        getResourceName in interface SourceTracker
      • getType

        public int getType()
        The sequence type.
      • setType

        public void setType​(int type)
        The sequence type.
      • getSequence

        public String getSequence()
        Native sequence name.
      • setSequence

        public void setSequence​(String sequence)
        Native sequence name.
      • getIncrement

        public int getIncrement()
        Sequence increment, or -1 for default.
      • setIncrement

        public void setIncrement​(int increment)
        Sequence increment, or -1 for default.
      • getAllocate

        public int getAllocate()
        Sequence values to allocate, or -1 for default.
      • setAllocate

        public void setAllocate​(int allocate)
        Sequence values to allocate, or -1 for default.
      • getInitialValue

        public int getInitialValue()
        Initial sequence value, or -1 for default.
      • setInitialValue

        public void setInitialValue​(int initial)
        Initial sequence value, or -1 for default.
      • getSequencePlugin

        public String getSequencePlugin()
        Plugin string describing the Seq.
      • setSequencePlugin

        public void setSequencePlugin​(String plugin)
        Plugin string describing the Seq.
      • getSequenceFactory

        public SequenceMetaData.SequenceFactory getSequenceFactory()
        A factory to transform spec sequences produced by user factories into the OpenJPA sequence type.
      • setSequenceFactory

        public void setSequenceFactory​(SequenceMetaData.SequenceFactory factory)
        A factory to transform spec sequences produced by user factories into the OpenJPA sequence type.
      • getInstance

        public Seq getInstance​(ClassLoader envLoader)
        Return the initialized sequence instance.
      • instantiate

        protected Seq instantiate​(ClassLoader envLoader)
        Create a new uninitialized instance of this sequence.
      • setSchema

        public void setSchema​(String schema)
      • getSchema

        public String getSchema()
      • setCatalog

        public void setCatalog​(String catalog)
      • getCatalog

        public String getCatalog()
      • newPluginValue

        protected PluginValue newPluginValue​(String property)
        Create a new plugin value for sequences. Returns a standard SeqValue by default.
      • addStandardProperties

        protected void addStandardProperties​(StringBuilder props)
        Add standard properties to the given properties buffer.
      • wrapValue

        protected String wrapValue​(String value)
        Wraps property values that may contain spaces or other special characters in double quotes so they are processed as a single valued argument.
      • appendProperty

        protected void appendProperty​(StringBuilder props,
                                      String name,
                                      String val)
        Add a string property to the buffer. Nothing will be added if value is null or empty string.
      • appendProperty

        protected void appendProperty​(StringBuilder props,
                                      String name,
                                      int val)
        Add an int property to the buffer. Nothing will be added if value is -1.
      • close

        public void close()
        Close user sequence instance.
        Specified by:
        close in interface Closeable