Package javax.persistence

Examples of javax.persistence.IdClass


                                singularAttribute);

                        if (checkSimpleId(attribute) && checkIdClass(managedType.getJavaType()))

                        {
                            IdClass anno = managedType.getJavaType().getAnnotation(IdClass.class);
                            AbstractManagedType superType = onSuperType(anno.value(), true);
                            onDeclaredFields(anno.value(), superType);
                            ((AbstractIdentifiableType<X>) managedType).addIdAttribute(singularAttribute, true,
                                    superType.getDeclaredSingularAttributes());
                        }
                        else if (checkEmbeddedId(attribute))
                        {
View Full Code Here


      introspectInheritance(type, entityType, parentType);
     
      introspectTableCache(entityType, type);

      getInternalIdClassConfig(type, _annotationCfg);
      IdClass idClassAnn = (IdClass) _annotationCfg.getAnnotation();
      IdClassConfig idClassConfig = _annotationCfg.getIdClassConfig();

      Class idClass = null;
      if (! _annotationCfg.isNull()) {
        if (idClassAnn != null)
          idClass = idClassAnn.value();
        else {
          String s = idClassConfig.getClassName();
          idClass = _persistenceUnit.loadTempClass(s);
        }
View Full Code Here

     * 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

     * 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

TOP

Related Classes of javax.persistence.IdClass

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.