Examples of CollectionType


Examples of org.hibernate.type.CollectionType

      return checkComponentNullability( value, (AbstractComponentType) propertyType );
    }
    else if ( propertyType.isCollectionType() ) {

      //persistent collections may have components
      CollectionType collectionType = (CollectionType) propertyType;
      Type collectionElementType = collectionType.getElementType( session.getFactory() );
      if ( collectionElementType.isComponentType() ) {
        //check for all components values in the collection

        AbstractComponentType componentType = (AbstractComponentType) collectionElementType;
        Iterator iter = CascadingAction.getLoadedElementsIterator(session, collectionType, value);
View Full Code Here

Examples of org.hibernate.type.CollectionType

    fromClause.addCollectionJoinFromElementByPath( path, destination );
//    origin.addDestination(destination);
    // Add the query spaces.
    fromClause.getWalker().addQuerySpaces( entityPersister.getQuerySpaces() );

    CollectionType type = queryableCollection.getCollectionType();
    String role = type.getRole();
    String roleAlias = origin.getTableAlias();

    String[] targetColumns = sfh.getCollectionElementColumns( role, roleAlias );
    AssociationType elementAssociationType = sfh.getElementAssociationType( type );
View Full Code Here

Examples of org.hibernate.type.CollectionType

    if (!getDataType().isCollectionType()) {
      throw new SemanticException("Collection expected; [" + propertyName + "] does not refer to a collection property");
    }

    // TODO : most of below was taken verbatim from DotNode; should either delegate this logic or super-type it
    CollectionType type = (CollectionType) getDataType();
    String role = type.getRole();
    QueryableCollection queryableCollection = getSessionFactoryHelper().requireQueryableCollection(role);

    String alias = null// DotNode uses null here...
    String columnTableAlias = getFromElement().getTableAlias();
    int joinType = JoinFragment.INNER_JOIN;
View Full Code Here

Examples of org.hibernate.type.CollectionType

      return checkComponentNullability( value, (AbstractComponentType) propertyType );
    }
    else if ( propertyType.isCollectionType() ) {

      //persistent collections may have components
      CollectionType collectionType = (CollectionType) propertyType;
      Type collectionElementType = collectionType.getElementType( session.getFactory() );
      if ( collectionElementType.isComponentType() ) {
        //check for all components values in the collection

        AbstractComponentType componentType = (AbstractComponentType) collectionElementType;
        Iterator iter = CascadingAction.getLoadedElementsIterator(session, collectionType, value);
View Full Code Here

Examples of org.hibernate.type.CollectionType

    if (!getDataType().isCollectionType()) {
      throw new SemanticException("Collection expected; [" + propertyName + "] does not refer to a collection property");
    }

    // TODO : most of below was taken verbatim from DotNode; should either delegate this logic or super-type it
    CollectionType type = (CollectionType) getDataType();
    String role = type.getRole();
    QueryableCollection queryableCollection = getSessionFactoryHelper().requireQueryableCollection(role);

    String alias = null// DotNode uses null here...
    String columnTableAlias = getFromElement().getTableAlias();
    int joinType = JoinFragment.INNER_JOIN;
View Full Code Here

Examples of org.hibernate.type.CollectionType

    fromClause.addCollectionJoinFromElementByPath( path, destination );
//    origin.addDestination(destination);
    // Add the query spaces.
    fromClause.getWalker().addQuerySpaces( entityPersister.getQuerySpaces() );

    CollectionType type = queryableCollection.getCollectionType();
    String role = type.getRole();
    String roleAlias = origin.getTableAlias();

    String[] targetColumns = sfh.getCollectionElementColumns( role, roleAlias );
    AssociationType elementAssociationType = sfh.getElementAssociationType( type );
View Full Code Here

Examples of org.hibernate.type.CollectionType

      }
     
      // If many-to-many, delete the FK row in the collection table.
      for ( Type type : persister.getPropertyTypes() ) {
        if ( type.isCollectionType() ) {
          final CollectionType cType = (CollectionType) type;
          final AbstractCollectionPersister cPersister = (AbstractCollectionPersister) factory
              .getCollectionPersister( cType.getRole() );
          if ( cPersister.isManyToMany() ) {
            if ( persister.getIdentifierColumnNames().length > 1
                && !dialect.supportsTuplesInSubqueries() ) {
              LOG.warn(
                  "This dialect is unable to cascade the delete into the many-to-many join table" +
View Full Code Here

Examples of org.hibernate.type.CollectionType

      ExpandingQuerySpace lhsQuerySpace,
      AssociationAttributeDefinition attributeDefinition,
      String querySpaceUid,
      FetchStrategy fetchStrategy) {

    final CollectionType fetchedType = (CollectionType) attributeDefinition.getType();
    final CollectionPersister fetchedPersister = attributeDefinition.toCollectionDefinition().getCollectionPersister();

    if ( fetchedPersister == null ) {
      throw new WalkingException(
          String.format(
              "Unable to locate CollectionPersister [%s] for fetch [%s]",
              fetchedType.getRole(),
              attributeDefinition.getName()
          )
      );
    }
View Full Code Here

Examples of org.qi4j.api.type.CollectionType

                {
                    value = new LinkedHashSet( (Collection) value);
                }

                // Check if items are Values
                CollectionType collection = (CollectionType) propertyDescriptor.valueType();
                if( collection.collectedType() instanceof ValueCompositeType )
                {
                    Collection coll = (Collection) value;
                    for( Object instance : coll )
                    {
                        ValueInstance.getValueInstance( (ValueComposite) instance ).prepareToBuild();
View Full Code Here

Examples of org.qi4j.api.type.CollectionType

                        value = (T) Collections.unmodifiableCollection( (Collection<? extends Object>) value );
                        set( value );
                    }
                }

                CollectionType collection = (CollectionType) propertyDescriptor.valueType();
                if( collection.collectedType() instanceof ValueCompositeType )
                {
                    Collection coll = (Collection) value;
                    for( Object instance : coll )
                    {
                        ValueInstance.getValueInstance( (ValueComposite) instance ).prepareBuilderState();
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.