Package org.eclipse.persistence.sequencing

Examples of org.eclipse.persistence.sequencing.NativeSequence


     * Preallocation can be supported on Oracle by setting the increment size of the
     * SEQUENCE object to match the preallocation size.)
     */
    public void useNativeSequencing() {
        if(!shouldUseNativeSequencing()) {
            getPlatform().setDefaultSequence(new NativeSequence(getPlatform().getDefaultSequence().getName(),
                    getPlatform().getDefaultSequence().getPreallocationSize(),
                    getPlatform().getDefaultSequence().getInitialValue()));
        }
    }
View Full Code Here


   
    /**
     * INTERNAL:
     */
    public NativeSequence process(MetadataLogger logger) {
        NativeSequence sequence = new NativeSequence();
       
        // Process the sequence name.
        if (m_sequenceName == null || m_sequenceName.equals("")) {
            logger.logConfigMessage(logger.SEQUENCE_GENERATOR_SEQUENCE_NAME, m_name, getAccessibleObject(), getLocation());
            sequence.setName(m_name);
        } else {
            sequence.setName(m_sequenceName);
        }
       
        // Set the should use identity flag.
        sequence.setShouldUseIdentityIfPlatformSupports(m_useIdentityIfPlatformSupports);
       
        // Process the allocation size
        sequence.setPreallocationSize(m_allocationSize == null ? Integer.valueOf(50) : m_allocationSize);
       
        // Process the initial value
        sequence.setInitialValue(m_initialValue == null ? Integer.valueOf(1) :  m_initialValue);
       
        // Process the schema and catalog qualifier
        sequence.setQualifier(processQualifier());
       
        return sequence;
    }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.sequencing.NativeSequence

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.