Package org.hibernate.mapping

Examples of org.hibernate.mapping.JoinedSubclass


    mappings.addClass( subclass );
  }

  private static void handleJoinedSubclass(PersistentClass model, Mappings mappings,
      Element subnode, java.util.Map inheritedMetas) throws MappingException {
    JoinedSubclass subclass = new JoinedSubclass( model );
    bindJoinedSubclass( subnode, subclass, mappings, inheritedMetas );
    model.addSubclass( subclass );
    mappings.addClass( subclass );
  }
View Full Code Here


    OnDelete onDeleteAnn = clazzToProcess.getAnnotation( OnDelete.class );
    boolean onDeleteAppropriate = false;
    if ( InheritanceType.JOINED.equals( inheritanceState.getType() ) && inheritanceState.hasParents() ) {
      onDeleteAppropriate = true;
      final JoinedSubclass jsc = ( JoinedSubclass ) persistentClass;
      SimpleValue key = new DependantValue( mappings, jsc.getTable(), jsc.getIdentifier() );
      jsc.setKey( key );
      ForeignKey fk = clazzToProcess.getAnnotation( ForeignKey.class );
      if ( fk != null && !BinderHelper.isEmptyAnnotationValue( fk.name() ) ) {
        key.setForeignKeyName( fk.name() );
      }
      if ( onDeleteAnn != null ) {
View Full Code Here

    }
    else if ( InheritanceType.SINGLE_TABLE.equals( inheritanceState.getType() ) ) {
      persistentClass = new SingleTableSubclass( superEntity );
    }
    else if ( InheritanceType.JOINED.equals( inheritanceState.getType() ) ) {
      persistentClass = new JoinedSubclass( superEntity );
    }
    else if ( InheritanceType.TABLE_PER_CLASS.equals( inheritanceState.getType() ) ) {
      persistentClass = new UnionSubclass( superEntity );
    }
    else {
View Full Code Here

    mappings.addClass( subclass );
  }

  private static void handleJoinedSubclass(PersistentClass model, Mappings mappings,
      Element subnode, java.util.Map inheritedMetas) throws MappingException {
    JoinedSubclass subclass = new JoinedSubclass( model );
    bindJoinedSubclass( subnode, subclass, mappings, inheritedMetas );
    model.addSubclass( subclass );
    mappings.addClass( subclass );
  }
View Full Code Here

    mappings.addClass( subclass );
  }

  private static void handleJoinedSubclass(PersistentClass model, Mappings mappings,
      Element subnode, java.util.Map inheritedMetas) throws MappingException {
    JoinedSubclass subclass = new JoinedSubclass( model );
    bindJoinedSubclass( subnode, subclass, mappings, inheritedMetas );
    model.addSubclass( subclass );
    mappings.addClass( subclass );
  }
View Full Code Here

    OnDelete onDeleteAnn = clazzToProcess.getAnnotation( OnDelete.class );
    boolean onDeleteAppropriate = false;
    if ( InheritanceType.JOINED.equals( inheritanceState.getType() ) && inheritanceState.hasParents() ) {
      onDeleteAppropriate = true;
      final JoinedSubclass jsc = ( JoinedSubclass ) persistentClass;
      if ( persistentClass.getEntityPersisterClass() == null ) {
        persistentClass.getRootClass().setEntityPersisterClass( JoinedSubclassEntityPersister.class );
      }
      SimpleValue key = new DependantValue( mappings, jsc.getTable(), jsc.getIdentifier() );
      jsc.setKey( key );
      ForeignKey fk = clazzToProcess.getAnnotation( ForeignKey.class );
      if ( fk != null && !BinderHelper.isEmptyAnnotationValue( fk.name() ) ) {
        key.setForeignKeyName( fk.name() );
      }
      if ( onDeleteAnn != null ) {
View Full Code Here

    }
    else if ( InheritanceType.SINGLE_TABLE.equals( inheritanceState.getType() ) ) {
      persistentClass = new SingleTableSubclass( superEntity );
    }
    else if ( InheritanceType.JOINED.equals( inheritanceState.getType() ) ) {
      persistentClass = new JoinedSubclass( superEntity );
    }
    else if ( InheritanceType.TABLE_PER_CLASS.equals( inheritanceState.getType() ) ) {
      persistentClass = new UnionSubclass( superEntity );
    }
    else {
View Full Code Here

    mappings.addClass( subclass );
  }

  private static void handleJoinedSubclass(PersistentClass model, Mappings mappings,
      Element subnode, java.util.Map inheritedMetas) throws MappingException {
    JoinedSubclass subclass = new JoinedSubclass( model );
    bindJoinedSubclass( subnode, subclass, mappings, inheritedMetas );
    model.addSubclass( subclass );
    mappings.addClass( subclass );
  }
View Full Code Here

    OnDelete onDeleteAnn = clazzToProcess.getAnnotation( OnDelete.class );
    boolean onDeleteAppropriate = false;
    if ( InheritanceType.JOINED.equals( inheritanceState.getType() ) && inheritanceState.hasParents() ) {
      onDeleteAppropriate = true;
      final JoinedSubclass jsc = ( JoinedSubclass ) persistentClass;
      if ( persistentClass.getEntityPersisterClass() == null ) {
        persistentClass.getRootClass().setEntityPersisterClass( JoinedSubclassEntityPersister.class );
      }
      SimpleValue key = new DependantValue( mappings, jsc.getTable(), jsc.getIdentifier() );
      jsc.setKey( key );
      ForeignKey fk = clazzToProcess.getAnnotation( ForeignKey.class );
      if ( fk != null && !BinderHelper.isEmptyAnnotationValue( fk.name() ) ) {
        key.setForeignKeyName( fk.name() );
      }
      if ( onDeleteAnn != null ) {
View Full Code Here

    }
    else if ( InheritanceType.SINGLE_TABLE.equals( inheritanceState.getType() ) ) {
      persistentClass = new SingleTableSubclass( superEntity );
    }
    else if ( InheritanceType.JOINED.equals( inheritanceState.getType() ) ) {
      persistentClass = new JoinedSubclass( superEntity );
    }
    else if ( InheritanceType.TABLE_PER_CLASS.equals( inheritanceState.getType() ) ) {
      persistentClass = new UnionSubclass( superEntity );
    }
    else {
View Full Code Here

TOP

Related Classes of org.hibernate.mapping.JoinedSubclass

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.