Examples of CollectionType


Examples of org.codehaus.xfire.aegis.type.collection.CollectionType

            Introspector.getBeanInfo(CollectionDTO.class, Object.class).getPropertyDescriptors()[0];
        Type type = creator.createType(pd);
        tm.register(type);
        assertTrue( type instanceof CollectionType );
       
        CollectionType colType = (CollectionType) type;
       
        type = colType.getComponentType();
        assertNotNull(type);
        assertTrue(type.getTypeClass().isAssignableFrom(String.class));
    }
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.collection.CollectionType

       
        Type type = (Type) deps.iterator().next();

        assertTrue( type instanceof CollectionType );
       
        CollectionType colType = (CollectionType) type;
       
        deps = dto.getDependencies();
        assertEquals(1, deps.size());
       
        Type comType = colType.getComponentType();
        assertEquals(String.class, comType.getTypeClass());
    }
View Full Code Here

Examples of org.codehaus.xfire.aegis.type.collection.CollectionType

        Type type = (Type) deps.iterator().next();

        assertTrue( type instanceof CollectionType );
       
        CollectionType colType = (CollectionType) type;
       
        deps = dto.getDependencies();
        assertEquals(1, deps.size());
       
        Type comType = colType.getComponentType();
        assertEquals(Object.class, comType.getTypeClass());
    }
View Full Code Here

Examples of org.exolab.castor.mapping.xml.types.CollectionType

    protected FieldDescriptor createFieldDesc( Class javaClass, FieldMapping fieldMap )
        throws MappingException
    {
       
        FieldDescriptor        fieldDesc;
        CollectionType         colType  = fieldMap.getCollection();
        String                 xmlName  = null;
        NodeType               nodeType = null;
        String                 match    = null;
        XMLFieldDescriptorImpl xmlDesc;
        boolean                isReference = false;
View Full Code Here

Examples of org.hibernate.annotations.CollectionType

              + StringHelper.qualify( entityName, property.getName() )
      );
    }
    result.setIsHibernateExtensionMapping( isHibernateExtensionMapping );

    final CollectionType typeAnnotation = property.getAnnotation( CollectionType.class );
    if ( typeAnnotation != null ) {
      final String typeName = typeAnnotation.type();
      // see if it names a type-def
      final TypeDef typeDef = mappings.getTypeDef( typeName );
      if ( typeDef != null ) {
        result.explicitType = typeDef.getTypeClass();
        result.explicitTypeParameters.putAll( typeDef.getParameters() );
      }
      else {
        result.explicitType = typeName;
        for ( Parameter param : typeAnnotation.parameters() ) {
          result.explicitTypeParameters.setProperty( param.name(), param.value() );
        }
      }
    }
View Full Code Here

Examples of org.hibernate.ogm.type.CollectionType

      //do some stuff
      org.hibernate.type.OneToOneType oneToOneType = (org.hibernate.type.OneToOneType) type;
      return new OneToOneType(oneToOneType, this);
    }
    else if ( type instanceof org.hibernate.type.CollectionType ) {
      return new CollectionType( (org.hibernate.type.CollectionType) type );
    }
    throw log.unableToFindGridType( type.getClass().getName() );
  }
View Full Code Here

Examples of org.hibernate.type.CollectionType

    }

    public EntityCollection getChildCollection(String name) throws LayerException {
      Type type = metadata.getPropertyType(name);
      if (type instanceof CollectionType) {
        CollectionType ct = (CollectionType) type;
        Collection coll = (Collection) metadata.getPropertyValue(object, name, EntityMode.POJO);
        if (coll == null) {
          // normally should not happen, hibernate instantiates it automatically
          coll = (Collection) ct.instantiate(0);
          metadata.setPropertyValue(object, name, coll, EntityMode.POJO);
        }
        String entityName = ct.getAssociatedEntityName((SessionFactoryImplementor) sessionFactory);
        ClassMetadata childMetadata = sessionFactory.getClassMetadata(entityName);
        return new HibernateEntityCollection(metadata, childMetadata, object, coll);
      } else {
        throw new LayerException(ExceptionCode.FEATURE_MODEL_PROBLEM);
      }
View Full Code Here

Examples of org.hibernate.type.CollectionType

    if (propertyName.contains(SEPARATOR)) {
      String directProperty = propertyName.substring(0, propertyName.indexOf(SEPARATOR));
      try {
        Type prop = meta.getPropertyType(directProperty);
        if (prop.isCollectionType()) {
          CollectionType coll = (CollectionType) prop;
          prop = coll.getElementType((SessionFactoryImplementor) sessionFactory);
        }
        ClassMetadata propMeta = sessionFactory.getClassMetadata(prop.getReturnedClass());
        return getPropertyClass(propMeta, propertyName.substring(propertyName.indexOf(SEPARATOR) + 1));
      } catch (HibernateException e) {
        throw new HibernateLayerException(e, ExceptionCode.HIBERNATE_COULD_NOT_RESOLVE, propertyName,
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

      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
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.