Examples of TableGeneratorMetadata


Examples of org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata

            m_sequenceGenerator = new SequenceGeneratorMetadata(getAnnotation(SequenceGenerator.class), this);
        }
       
        // Set the table generator if one is present.       
        if (isAnnotationPresent(TableGenerator.class)) {
            m_tableGenerator = new TableGeneratorMetadata(getAnnotation(TableGenerator.class), this);
        }
       
        // Set the return insert if one is present.
        if (isAnnotationPresent(ReturnInsert.class)) {
            m_returnInsert = new ReturnInsertMetadata(getAnnotation(ReturnInsert.class), this);
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata

        // Schema could be "" or null, need to check for an XML default.
        sequenceGenerator.setSchema(MetadataHelper.getName(sequenceGenerator.getSchema(), defaultSchema, sequenceGenerator.getSchemaContext(), m_logger, sequenceGenerator.getLocation()));
       
       
        // Check if the name is used with a table generator.
        TableGeneratorMetadata tableGenerator = m_tableGenerators.get(name);
        if (tableGenerator != null) {
            if (sequenceGenerator.shouldOverride(tableGenerator)) {
                m_tableGenerators.remove(name);
            } else {
                throw ValidationException.conflictingSequenceAndTableGeneratorsSpecified(name, sequenceGenerator.getLocation(), tableGenerator.getLocation());
            }
        }
           
        for (TableGeneratorMetadata otherTableGenerator : m_tableGenerators.values()) {
            if ((tableGenerator != otherTableGenerator) && otherTableGenerator.getPkColumnValue().equals(sequenceGenerator.getSequenceName())) {
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata

        if (m_tableGenerator != null) {
            getProject().addTableGenerator(m_tableGenerator, getDescriptor().getDefaultCatalog(), getDescriptor().getDefaultSchema());
        }
       
        if (isAnnotationPresent(TableGenerator.class)) {
            getProject().addTableGenerator(new TableGeneratorMetadata(getAnnotation(TableGenerator.class), getAccessibleObject()), getDescriptor().getDefaultCatalog(), getDescriptor().getDefaultSchema());
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata

            m_sequenceGenerator = new SequenceGeneratorMetadata(getAnnotation(SequenceGenerator.class), accessibleObject);
        }
       
        // Set the table generator if one is present.       
        if (isAnnotationPresent(TableGenerator.class)) {
            m_tableGenerator = new TableGeneratorMetadata(getAnnotation(TableGenerator.class), accessibleObject);
        }
       
        // Set the return insert if one is present.
        if (isAnnotationPresent(ReturnInsert.class)) {
            m_returnInsert = new ReturnInsertMetadata(getAnnotation(ReturnInsert.class), accessibleObject);
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata

     * Process a TableGenerator annotation into a common metadata table
     * generator and add it to the project.
     */
    protected void processTableGenerator() {
        if (isAnnotationPresent(TableGenerator.class)) {
            getProject().addTableGenerator(new TableGeneratorMetadata(getAnnotation(TableGenerator.class), getAccessibleObject()), getDescriptor().getDefaultCatalog(), getDescriptor().getDefaultSchema());
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata

        // Schema could be "" or null, need to check for an XML default.
        sequenceGenerator.setSchema(MetadataHelper.getName(sequenceGenerator.getSchema(), defaultSchema, sequenceGenerator.getSchemaContext(), m_logger, sequenceGenerator.getLocation()));
       
       
        // Check if the name is used with a table generator.
        TableGeneratorMetadata tableGenerator = m_tableGenerators.get(name);
        if (tableGenerator != null) {
            throw ValidationException.conflictingSequenceAndTableGeneratorsSpecified(name, sequenceGenerator.getLocation(), tableGenerator.getLocation());         
        }
           
        for (TableGeneratorMetadata otherTableGenerator : m_tableGenerators.values()) {
            if (otherTableGenerator.getPkColumnValue().equals(sequenceGenerator.getSequenceName())) {
                // generator name will be used instead of an empty sequence name / pk column name
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata

            m_sequenceGenerator = new SequenceGeneratorMetadata(getAnnotation(SequenceGenerator.class), accessibleObject);
        }
       
        // Set the table generator if one is present.       
        if (isAnnotationPresent(TableGenerator.class)) {
            m_tableGenerator = new TableGeneratorMetadata(getAnnotation(TableGenerator.class), accessibleObject);
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata

* @since EclipseLink 2.5.1
*/
public class TableGeneratorImpl extends MetadataImpl<TableGeneratorMetadata> implements TableGenerator {

    public TableGeneratorImpl() {
        super(new TableGeneratorMetadata());
       
        getMetadata().setIndexes(new ArrayList<IndexMetadata>());
        getMetadata().setUniqueConstraints(new ArrayList<UniqueConstraintMetadata>());       
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata

        if (m_tableGenerator != null) {
            getProject().addTableGenerator(m_tableGenerator, getDescriptor().getDefaultCatalog(), getDescriptor().getDefaultSchema());
        }
       
        if (isAnnotationPresent(JPA_TABLE_GENERATOR)) {
            getProject().addTableGenerator(new TableGeneratorMetadata(getAnnotation(JPA_TABLE_GENERATOR), this), getDescriptor().getDefaultCatalog(), getDescriptor().getDefaultSchema());
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata

            m_sequenceGenerator = new SequenceGeneratorMetadata(getAnnotation(JPA_SEQUENCE_GENERATOR), this);
        }
       
        // Set the table generator if one is present.       
        if (isAnnotationPresent(JPA_TABLE_GENERATOR)) {
            m_tableGenerator = new TableGeneratorMetadata(getAnnotation(JPA_TABLE_GENERATOR), this);
        }
       
        // Set the table generator if one is present.       
        if (isAnnotationPresent(UuidGenerator.class)) {
            m_uuidGenerator = new UuidGeneratorMetadata(getAnnotation(UuidGenerator.class), this);
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.