Package javax.persistence

Examples of javax.persistence.GeneratedValue.generator()


    GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
    String generatorType = generatedValue != null ?
        generatorType( generatedValue.strategy(), mappings ) :
        "assigned";
    String generatorName = generatedValue != null ?
        generatedValue.generator() :
        BinderHelper.ANNOTATION_STRING_DEFAULT;
    if ( isComponent ) {
      generatorType = "assigned";
    } //a component must not have any generator
    BinderHelper.makeIdGenerator( idValue, generatorType, generatorName, mappings, localGenerators );
View Full Code Here


        GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
        String generatorType = generatedValue != null ? generatorType(
            generatedValue.strategy(), mappings
        ) : "assigned";
        String generator = generatedValue != null ? generatedValue.generator() : BinderHelper.ANNOTATION_STRING_DEFAULT;

        BinderHelper.makeIdGenerator(
            ( SimpleValue ) comp.getProperty( property.getName() ).getValue(),
            generatorType,
            generator,
View Full Code Here

      GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
      String generatorType = generatedValue != null ?
          generatorType( generatedValue.strategy() ) :
          "assigned";
      String generator = generatedValue != null ?
          generatedValue.generator() :
          BinderHelper.ANNOTATION_STRING_DEFAULT;
      if ( isComponent ) generatorType = "assigned"; //a component must not have any generator
           
      bindId(
          generatorType,
View Full Code Here

    GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
    String generatorType = generatedValue != null ?
        generatorType( generatedValue.strategy(), mappings ) :
        "assigned";
    String generatorName = generatedValue != null ?
        generatedValue.generator() :
        BinderHelper.ANNOTATION_STRING_DEFAULT;
    if ( isComponent ) {
      generatorType = "assigned";
    } //a component must not have any generator
    BinderHelper.makeIdGenerator( idValue, generatorType, generatorName, mappings, localGenerators );
View Full Code Here

        GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
        String generatorType = generatedValue != null ? generatorType(
            generatedValue.strategy(), mappings
        ) : "assigned";
        String generator = generatedValue != null ? generatedValue.generator() : BinderHelper.ANNOTATION_STRING_DEFAULT;

        BinderHelper.makeIdGenerator(
            ( SimpleValue ) comp.getProperty( property.getName() ).getValue(),
            generatorType,
            generator,
View Full Code Here

    GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
    String generatorType = generatedValue != null ?
        generatorType( generatedValue.strategy(), mappings ) :
        "assigned";
    String generatorName = generatedValue != null ?
        generatedValue.generator() :
        BinderHelper.ANNOTATION_STRING_DEFAULT;
    if ( isComponent ) {
      generatorType = "assigned";
    } //a component must not have any generator
    BinderHelper.makeIdGenerator( idValue, generatorType, generatorName, mappings, localGenerators );
View Full Code Here

        GeneratedValue generatedValue = property.getAnnotation( GeneratedValue.class );
        String generatorType = generatedValue != null ? generatorType(
            generatedValue.strategy(), mappings
        ) : "assigned";
        String generator = generatedValue != null ? generatedValue.generator() : BinderHelper.ANNOTATION_STRING_DEFAULT;

        BinderHelper.makeIdGenerator(
            ( SimpleValue ) comp.getProperty( property.getName() ).getValue(),
            generatorType,
            generator,
View Full Code Here

            String schemaName = table.schema();
            if (schemaName != null && schemaName.indexOf('@') > 0)
            {
                schemaName = schemaName.substring(0, schemaName.indexOf('@'));
                GeneratedValue generatedValue = field.getAnnotation(GeneratedValue.class);
                if (generatedValue != null && generatedValue.generator() != null
                        && !generatedValue.generator().isEmpty())
                {
                    if (!(field.isAnnotationPresent(TableGenerator.class)
                            || field.isAnnotationPresent(SequenceGenerator.class)
                            || clazz.isAnnotationPresent(TableGenerator.class) || clazz
View Full Code Here

            if (schemaName != null && schemaName.indexOf('@') > 0)
            {
                schemaName = schemaName.substring(0, schemaName.indexOf('@'));
                GeneratedValue generatedValue = field.getAnnotation(GeneratedValue.class);
                if (generatedValue != null && generatedValue.generator() != null
                        && !generatedValue.generator().isEmpty())
                {
                    if (!(field.isAnnotationPresent(TableGenerator.class)
                            || field.isAnnotationPresent(SequenceGenerator.class)
                            || clazz.isAnnotationPresent(TableGenerator.class) || clazz
                            .isAnnotationPresent(SequenceGenerator.class)))
View Full Code Here

                            || field.isAnnotationPresent(SequenceGenerator.class)
                            || clazz.isAnnotationPresent(TableGenerator.class) || clazz
                            .isAnnotationPresent(SequenceGenerator.class)))
                    {

                        throw new IllegalArgumentException("Unknown Id.generator: " + generatedValue.generator());
                    }
                    else
                    {
                        checkForGenerator(clazz, field, generatedValue, schemaName);
                    }
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.