Package javax.persistence.metamodel

Examples of javax.persistence.metamodel.Type


        EntityType et = (EntityType)it2.next();
        String entityName = et.getName();
       
        if(datamartEntityName.equals(entityName)){
       
          Type keyT = et.getIdType();
         
          if (keyT instanceof BasicType) {
            //the key has only one field
           
            String name = (et.getId(Object.class)).getName();
View Full Code Here


      try {
         CriteriaBuilder cb = em.getCriteriaBuilder();
         CriteriaQuery cq = cb.createQuery();
         Root root = cq.from(configuration.entityClass());
         Type idType = root.getModel().getIdType();
         SingularAttribute idAttr = root.getModel().getId(idType.getJavaType());
         cq.select(root.get(idAttr));

         for (final Object key : em.createQuery(cq).getResultList()) {
            if (taskContext.isStopped())
               break;
View Full Code Here

                        else if (attribute.getType().equals(java.util.Map.class))
                        {
                            java.lang.reflect.Type[] arguments = ((ParameterizedType) attribute.getGenericType())
                                    .getActualTypeArguments();

                            Type keyType = new TypeBuilder<X>(null, getPersistentAttributeType(attribute))
                                    .buildType(getTypedClass(arguments[0]));
                            pluralAttribute = new DefaultMapAttribute(attributeType, attribute.getName(),
                                    getAttributeType(), managedType, attribute, (Class<Map<T, ?>>) attribute.getType(),
                                    keyType);
                        }
View Full Code Here

TOP

Related Classes of javax.persistence.metamodel.Type

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.