Examples of NativeSequence


Examples of org.eclipse.persistence.sequencing.NativeSequence

   
    /**
     * INTERNAL:
     */
    public NativeSequence process(MetadataLogger logger) {
        NativeSequence sequence = new NativeSequence();
       
        // Process the sequence name.
        if (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

Examples of org.eclipse.persistence.sequencing.NativeSequence

        } else if (sequence instanceof UnaryTableSequence ||
                   (sequence instanceof DefaultSequence && ((DefaultSequence)sequence).getDefaultSequence() instanceof UnaryTableSequence)) {
            return new UnaryTableSequenceDefinition(sequence);
        } else if (sequence instanceof NativeSequence ||
                   (sequence instanceof DefaultSequence && ((DefaultSequence)sequence).getDefaultSequence() instanceof NativeSequence)) {
            NativeSequence nativeSequence = null;
            if (sequence instanceof NativeSequence) {
                nativeSequence = (NativeSequence)sequence;
            } else {
                nativeSequence = (NativeSequence)((DefaultSequence)sequence).getDefaultSequence();
            }
            if (nativeSequence.hasDelegateSequence()) {
                return buildSequenceDefinition(((NativeSequence)sequence).getDelegateSequence());
            }
            return new SequenceObjectDefinition(sequence);
        } else {
            return null;
View Full Code Here

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

Examples of org.eclipse.persistence.sequencing.NativeSequence

   
    /**
     * 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
Copyright © 2018 www.massapi.com. 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.