Package com.impetus.kundera.metadata.model

Examples of com.impetus.kundera.metadata.model.SequenceGeneratorDiscriptor


            TableGeneratorDiscriptor tgd = processTableGenerator(clazz, idField, m, generatorName);
            keyValue.setTableDiscriptor(tgd);
            keyValue.setStrategy(GenerationType.TABLE);
            break;
        case SEQUENCE:
            SequenceGeneratorDiscriptor sgd = processSequenceGenerator(clazz, idField, m, generatorName);
            keyValue.setSequenceDiscriptor(sgd);
            keyValue.setStrategy(GenerationType.SEQUENCE);
            break;
        case IDENTITY:
            keyValue.setStrategy(GenerationType.IDENTITY);
View Full Code Here


    }

    private SequenceGeneratorDiscriptor processSequenceGenerator(Class<?> clazz, Field idField, EntityMetadata m,
            String generatorName)
    {
        SequenceGeneratorDiscriptor sgd = null;
        if (!generatorName.isEmpty())
        {
            SequenceGenerator sequenceGenerator = idField.getAnnotation(SequenceGenerator.class);
            if (sequenceGenerator == null || !sequenceGenerator.name().equals(generatorName))
            {
                sequenceGenerator = clazz.getAnnotation(SequenceGenerator.class);
            }
            sgd = new SequenceGeneratorDiscriptor(sequenceGenerator, m.getSchema());
        }
        else
        {
            sgd = new SequenceGeneratorDiscriptor(m.getSchema());
        }
        return sgd;
    }
View Full Code Here

TOP

Related Classes of com.impetus.kundera.metadata.model.SequenceGeneratorDiscriptor

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.