Examples of IdClass


Examples of javax.persistence.IdClass

     * In JPA 2, there is a shortcut if the id class is the Pk of the associated class pointed to by the id
     * it ought to be treated as an embedded and not a real IdClass (at least in the Hibernate's internal way
     */
    XClass classWithIdClass = inheritanceState.getClassWithIdClass( false );
    if ( classWithIdClass != null ) {
      IdClass idClass = classWithIdClass.getAnnotation( IdClass.class );
      XClass compositeClass = mappings.getReflectionManager().toXClass( idClass.value() );
      PropertyData inferredData = new PropertyPreloadedData(
          entityBinder.getPropertyAccessType(), "id", compositeClass
      );
      PropertyData baseInferredData = new PropertyPreloadedData(
          entityBinder.getPropertyAccessType(), "id", classWithIdClass
View Full Code Here

Examples of javax.persistence.IdClass

        void onEntity(
                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            IdClass annotation = element.getAnnotation(IdClass.class);
            JpaIdClass idClass = new JpaIdClass();
            idClass.setClassName(annotation.value().getName());
            entity.setIdClass(idClass);
        }
View Full Code Here

Examples of javax.persistence.IdClass

        @Override
        void onMappedSuperclass(
                JpaMappedSuperclass superclass,
                AnnotatedElement element,
                AnnotationProcessorStack context) {
            IdClass annotation = element.getAnnotation(IdClass.class);
            JpaIdClass idClass = new JpaIdClass();
            idClass.setClassName(annotation.value().getName());
            superclass.setIdClass(idClass);
        }
View Full Code Here

Examples of javax.persistence.IdClass

     * @return
     */
    private static AnnotatedField getFieldWithFullAnnotations(Field f) {
        AnnotatedField ret = new AnnotatedField(f);

        IdClass idClass = f.getDeclaringClass().getAnnotation(IdClass.class);
        if (idClass != null) {
            try {
                Field correspondingIdField = idClass.value().getDeclaredField(f.getName());
                ret.addAnnotations(correspondingIdField.getAnnotations());
            } catch (Exception e) {
            }
        }

View Full Code Here

Examples of javax.persistence.IdClass

        void onEntity(
                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            IdClass annotation = element.getAnnotation(IdClass.class);
            JpaIdClass idClass = new JpaIdClass();
            idClass.setClassName(annotation.value().getName());
            entity.setIdClass(idClass);
        }
View Full Code Here

Examples of javax.persistence.IdClass

        @Override
        void onMappedSuperclass(
                JpaMappedSuperclass superclass,
                AnnotatedElement element,
                AnnotationProcessorStack context) {
            IdClass annotation = element.getAnnotation(IdClass.class);
            JpaIdClass idClass = new JpaIdClass();
            idClass.setClassName(annotation.value().getName());
            superclass.setIdClass(idClass);
        }
View Full Code Here

Examples of javax.persistence.IdClass

        void onEntity(
                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            IdClass annotation = element.getAnnotation(IdClass.class);
            JpaIdClass idClass = new JpaIdClass();
            idClass.setClassName(annotation.value().getName());
            entity.setIdClass(idClass);
        }
View Full Code Here

Examples of javax.persistence.IdClass

        @Override
        void onMappedSuperclass(
                JpaMappedSuperclass superclass,
                AnnotatedElement element,
                AnnotationProcessorStack context) {
            IdClass annotation = element.getAnnotation(IdClass.class);
            JpaIdClass idClass = new JpaIdClass();
            idClass.setClassName(annotation.value().getName());
            superclass.setIdClass(idClass);
        }
View Full Code Here

Examples of javax.persistence.IdClass

        void onEntity(
                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            IdClass annotation = element.getAnnotation(IdClass.class);
            JpaIdClass idClass = new JpaIdClass();
            idClass.setClassName(annotation.value().getName());
            entity.setIdClass(idClass);
        }
View Full Code Here

Examples of javax.persistence.IdClass

        @Override
        void onMappedSuperclass(
                JpaMappedSuperclass superclass,
                AnnotatedElement element,
                AnnotationProcessorStack context) {
            IdClass annotation = element.getAnnotation(IdClass.class);
            JpaIdClass idClass = new JpaIdClass();
            idClass.setClassName(annotation.value().getName());
            superclass.setIdClass(idClass);
        }
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.