Package javax.persistence

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


     * 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

     * 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

      return idType;
    }

    private static Class<?> fallbackIdTypeLookup(IdentifiableType<?> type) {

      IdClass annotation = AnnotationUtils.findAnnotation(type.getJavaType(), IdClass.class);
      return annotation == null ? null : annotation.value();
    }
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

     * 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

    }
    final boolean subclassAndSingleTableStrategy = inheritanceState.type == InheritanceType.SINGLE_TABLE
        && inheritanceState.hasParents;
    //process idclass if any
    Set<String> idProperties = new HashSet<String>();
    IdClass idClass = null;
    if ( !inheritanceState.hasParents ) {
      //look for idClass
      XClass current = inheritanceState.clazz;
      InheritanceState state = inheritanceState;
      do {
        current = state.clazz;
        if ( current.isAnnotationPresent( IdClass.class ) ) {
          idClass = current.getAnnotation( IdClass.class );
          break;
        }
        state = InheritanceState.getSuperclassInheritanceState(
            current, inheritanceStatePerClass, mappings.getReflectionManager()
        );
      }
      while ( state != null );
    }
    if ( idClass != null ) {
      XClass compositeClass = mappings.getReflectionManager().toXClass( idClass.value() );
      boolean isComponent = true;
      boolean propertyAnnotated = entityBinder.isPropertyAnnotated( compositeClass );
      String propertyAccessor = entityBinder.getPropertyAccessor( compositeClass );
      String generatorType = "assigned";
      String generator = BinderHelper.ANNOTATION_STRING_DEFAULT;
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.