Package org.hibernate.type

Examples of org.hibernate.type.AssociationType


      // ManyToOne corresponding to this persister to fully
      // define the many-to-many; we need that OJA so that we can
      // use its alias here
      // TODO : is there a better way here?
      Iterator itr = associations.iterator();
      AssociationType associationType = ( AssociationType ) collectionPersister.getElementType();
      while ( itr.hasNext() ) {
        OuterJoinableAssociation oja = ( OuterJoinableAssociation ) itr.next();
        if ( oja.getJoinableType() == associationType ) {
          // we found it
          filter += collectionPersister.getManyToManyFilterFragment(
View Full Code Here


      Type type = persister.getElementType();
      if ( type.isAssociationType() ) {
        // a many-to-many;
        // decrement currentDepth here to allow join across the association table
        // without exceeding MAX_FETCH_DEPTH (i.e. the "currentDepth - 1" bit)
        AssociationType associationType = (AssociationType) type;
        String[] aliasedLhsColumns = persister.getElementColumnNames(alias);
        String[] lhsColumns = persister.getElementColumnNames();
        // if the current depth is 0, the root thing being loaded is the
        // many-to-many collection itself.  Here, it is alright to use
        // an inner join...
View Full Code Here

      final int currentDepth) throws MappingException {
    Type[] types = componentType.getSubtypes();
    String[] propertyNames = componentType.getPropertyNames();
    for ( int i = 0; i < types.length; i++ ) {
      if ( types[i].isAssociationType() ) {
        AssociationType associationType = (AssociationType) types[i];
        String[] aliasedLhsColumns = JoinHelper.getAliasedLHSColumnNames(
          associationType, alias, propertyNumber, begin, persister, getFactory()
        );
        String[] lhsColumns = JoinHelper.getLHSColumnNames(
          associationType, propertyNumber, begin, persister, getFactory()
View Full Code Here

    for ( int i=0; i <types.length; i++ ) {
      int length = types[i].getColumnSpan( getFactory() );
      String[] lhsColumns = ArrayHelper.slice(cols, begin, length);

      if ( types[i].isAssociationType() ) {
        AssociationType associationType = (AssociationType) types[i];

        // simple, because we can't have a one-to-one or a collection
        // (or even a property-ref) in a composite-element:
        String[] aliasedLhsColumns = StringHelper.qualify(alias, lhsColumns);
View Full Code Here

      // ManyToOne corresponding to this persister to fully
      // define the many-to-many; we need that OJA so that we can
      // use its alias here
      // TODO : is there a better way here?
      Iterator itr = associations.iterator();
      AssociationType associationType = ( AssociationType ) collectionPersister.getElementType();
      while ( itr.hasNext() ) {
        OuterJoinableAssociation oja = ( OuterJoinableAssociation ) itr.next();
        if ( oja.getJoinableType() == associationType ) {
          // we found it
          filter += collectionPersister.getManyToManyFilterFragment(
View Full Code Here

      Type type = persister.getElementType();
      if ( type.isAssociationType() ) {
        // a many-to-many;
        // decrement currentDepth here to allow join across the association table
        // without exceeding MAX_FETCH_DEPTH (i.e. the "currentDepth - 1" bit)
        AssociationType associationType = (AssociationType) type;
        String[] aliasedLhsColumns = persister.getElementColumnNames(alias);
        String[] lhsColumns = persister.getElementColumnNames();
        // if the current depth is 0, the root thing being loaded is the
        // many-to-many collection itself.  Here, it is alright to use
        // an inner join...
View Full Code Here

      final int currentDepth) throws MappingException {
    Type[] types = componentType.getSubtypes();
    String[] propertyNames = componentType.getPropertyNames();
    for ( int i = 0; i < types.length; i++ ) {
      if ( types[i].isAssociationType() ) {
        AssociationType associationType = (AssociationType) types[i];
        String[] aliasedLhsColumns = JoinHelper.getAliasedLHSColumnNames(
          associationType, alias, propertyNumber, begin, persister, getFactory()
        );
        String[] lhsColumns = JoinHelper.getLHSColumnNames(
          associationType, propertyNumber, begin, persister, getFactory()
View Full Code Here

    for ( int i=0; i <types.length; i++ ) {
      int length = types[i].getColumnSpan( getFactory() );
      String[] lhsColumns = ArrayHelper.slice(cols, begin, length);

      if ( types[i].isAssociationType() ) {
        AssociationType associationType = (AssociationType) types[i];

        // simple, because we can't have a one-to-one or a collection
        // (or even a property-ref) in a composite-element:
        String[] aliasedLhsColumns = StringHelper.qualify(alias, lhsColumns);
View Full Code Here

    String componentPath = "";
    while ( tokens.hasMoreTokens() ) {
      componentPath += tokens.nextToken();
      Type type = persister.toType( componentPath );
      if ( type.isAssociationType() ) {
        AssociationType atype = ( AssociationType ) type;
        persister = ( Queryable ) sessionFactory.getEntityPersister(
            atype.getAssociatedEntityName( sessionFactory )
        );
        componentPath = "";
      }
      else if ( type.isComponentType() ) {
        componentPath += '.';
View Full Code Here

      final Object anything,
      final boolean isCascadeDeleteEnabled) throws HibernateException {

    if (child!=null) {
      if ( type.isAssociationType() ) {
        AssociationType associationType = (AssociationType) type;
        if ( cascadeAssociationNow( associationType ) ) {
          cascadeAssociation(
              parent,
              child,
              type,
View Full Code Here

TOP

Related Classes of org.hibernate.type.AssociationType

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.