Package javax.persistence

Examples of javax.persistence.GenerationType


                    else if (annName.equals(JPAAnnotationUtils.DATASTORE_IDENTITY))
                    {
                        // JPOX extension to allow datastore-identity
                        identityType = org.jpox.metadata.IdentityType.DATASTORE.toString();
                        identityColumn = (String)annotationValues.get("column");
                        GenerationType type = (GenerationType) annotationValues.get("generationType");
                        identityStrategy = JPAAnnotationUtils.getIdentityStrategyString(type);
                        identityGenerator = (String) annotationValues.get("generator");
                    }
                    else if (annName.equals(JPAAnnotationUtils.TABLE))
                    {
View Full Code Here


                    cascades = (CascadeType[])annotationValues.get("cascade");
                    targetEntity = (Class)annotationValues.get("targetEntity");
                }
                else if (annName.equals(JPAAnnotationUtils.GENERATED_VALUE))
                {
                    GenerationType type = (GenerationType) annotationValues.get("strategy");
                    valueStrategy = JPAAnnotationUtils.getIdentityStrategyString(type);
                    valueGenerator = (String) annotationValues.get("generator");
                }
                else if (annName.equals(JPAAnnotationUtils.LOB))
                {
View Full Code Here

                cascades = new CascadeType[1];
                cascades[0] = CascadeType.ALL;
            }
            else if (annName.equals(JPAAnnotationUtils.GENERATED_VALUE))
            {
                GenerationType type = (GenerationType) annotationValues.get("strategy");
                valueStrategy = JPAAnnotationUtils.getIdentityStrategyString(type);
                valueGenerator = (String) annotationValues.get("generator");
            }
            else if (annName.equals(JPAAnnotationUtils.LOB))
            {
View Full Code Here

    /**
     * Sets value generation information for the given field.
     */
    private void parseGeneratedValue(FieldMetaData fmd, GeneratedValue gen) {
        GenerationType strategy = gen.strategy();
        String generator = gen.generator();
        parseGeneratedValue(fmd, strategy, generator);
    }
View Full Code Here

        if (!isMappingOverrideMode())
            return false;

        String strategy = attrs.getValue("strategy");
        String generator = attrs.getValue("generator");
        GenerationType type = StringUtils.isEmpty(strategy)
            ? GenerationType.AUTO : GenerationType.valueOf(strategy);

        FieldMetaData fmd = (FieldMetaData) currentElement();
        AnnotationPersistenceMetaDataParser.parseGeneratedValue(fmd, type,
            generator);
View Full Code Here

        //Set default value if not specified
        String strategy = attrs.getValue("strategy");
        if (StringUtils.isEmpty(strategy)) {
            strategy ="AUTO"    ;
        }
        GenerationType stratType = GenerationType.valueOf(strategy);
       
        AnnotationPersistenceMetaDataParser.parseDataStoreId(meta, stratType,
            attrs.getValue("generator"));
       
        return true;
View Full Code Here

    /**
     * Sets value generation information for the given field.
     */
    private void parseGeneratedValue(FieldMetaData fmd, GeneratedValue gen) {
        GenerationType strategy = gen.strategy();
        String generator = gen.generator();
        parseGeneratedValue(fmd, strategy, generator);
    }
View Full Code Here

        if (!isMappingOverrideMode())
            return false;

        String strategy = attrs.getValue("strategy");
        String generator = attrs.getValue("generator");
        GenerationType type = StringUtils.isEmpty(strategy)
            ? GenerationType.AUTO : GenerationType.valueOf(strategy);

        FieldMetaData fmd = (FieldMetaData) currentElement();
        AnnotationPersistenceMetaDataParser.parseGeneratedValue(fmd, type,
            generator);
View Full Code Here

    /**
     * Sets value generation information for the given field.
     */
    private void parseGeneratedValue(FieldMetaData fmd, GeneratedValue gen) {
        GenerationType strategy = gen.strategy();
        String generator = gen.generator();
        parseGeneratedValue(fmd, strategy, generator);
    }
View Full Code Here

        if ( generator == null ) {
          throw new MappingException( String.format( "Unable to find named generator %s", name ), null );
        }
      }
      else {
        GenerationType genType = JandexHelper.getEnumValue(
            generatedValueAnnotation,
            "strategy",
            GenerationType.class
        );
        String strategy = EnumConversionHelper.generationTypeToGeneratorStrategyName(
View Full Code Here

TOP

Related Classes of javax.persistence.GenerationType

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.