Examples of entity()


Examples of org.hibernate.ejb.metamodel.MetamodelImpl.entity()

    CriteriaBuilderImpl cb = (CriteriaBuilderImpl) em.getCriteriaBuilder();
    MetamodelImpl mm = (MetamodelImpl) em.getMetamodel();

        CriteriaQuery<Integer> cquery = cb.createQuery( Integer.class );
    Root<Product> product = cquery.from( Product.class );
    EntityType<Product> Product_ = mm.entity( Product.class );

    cquery.select(
        cb.toInteger(
            product.get(
                Product_.getSingularAttribute("quantity", Integer.class))
View Full Code Here

Examples of org.hibernate.internal.TypeLocatorImpl.entity()

                Type myType = null;
                //first, check if an explicit type was declared
                String valueClass = ((BasicFieldMetadata) entry.getValue()).getMapFieldValueClass();
                if (valueClass != null) {
                    myType = typeLocator.entity(valueClass);
                }
                if (myType == null) {
                    SupportedFieldType fieldType = ((BasicFieldMetadata) entry.getValue()).getExplicitFieldType();
                    Class<?> basicJavaType = getBasicJavaType(fieldType);
                    if (basicJavaType != null) {
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping.entity()

    * where people can not (or don't want to) use Annotations.
    */
   @Test
   public void testSearchMapping() {
      final SearchMapping mapping = new SearchMapping();
      mapping.entity(BondPVO.class).indexed()
            .property("id", ElementType.METHOD).field()
            .property("name", ElementType.METHOD).field()
            .property("isin", ElementType.METHOD).field();

      final Properties properties = new Properties();
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping.entity()

            amendedProperties.put(Environment.MODEL_MAPPING, mapping);
            indexingProperties = amendedProperties;
         }
         Cache cache = cr.getComponent(Cache.class);
         FieldBridge fb = (FieldBridge) fbClass.getConstructor(Cache.class).newInstance(cache);
         mapping.entity(Util.loadClassStrict("org.infinispan.query.remote.indexing.ProtobufValueWrapper", cl))
               .indexed().classBridgeInstance(fb).norms(Norms.NO).analyze(Analyze.YES).store(Store.YES);
      } catch (Exception e) {
         throw new CacheException("Failed to configure indexing for remote query", e);
      }
      return indexingProperties;
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping.entity()

    * where people can not (or don't want to) use Annotations.
    */
   @Test
   public void testSearchMapping() {
      final SearchMapping mapping = new SearchMapping();
      mapping.entity(BondPVO.class).indexed()
            .property("id", ElementType.METHOD).field()
            .property("name", ElementType.METHOD).field()
            .property("isin", ElementType.METHOD).field();

      final Properties properties = new Properties();
View Full Code Here

Examples of org.hibernate.search.cfg.SearchMapping.entity()

    * where people can not (or don't want to) use Annotations.
    */
   @Test
   public void testSearchMapping() {
      final SearchMapping mapping = new SearchMapping();
      mapping.entity(BondPVO.class).indexed()
            .property("id", ElementType.METHOD).field()
            .property("name", ElementType.METHOD).field()
            .property("isin", ElementType.METHOD).field();

      final Properties properties = new Properties();
View Full Code Here

Examples of org.paquitosoft.lml.model.annotation.PersistentAttribute.entity()

                if (annot == null) {
                    continue;
                }
                String columnName = getColumnName(f);
                boolean readField = true;
                if (annot.entity()) {

                    // If it is a custom type we need to create a instance an populate its identifier
                    List<Field> pkFields = getEntityIdentifierFields(f.getType());               
                    if (pkFields.size() == 1) {
View Full Code Here

Examples of org.universa.tcc.gemda.web.config.ActionConfig.entity()

  }
 
  @SuppressWarnings("unchecked")
  private T getEntidade() {
    ActionConfig actionConfig = this.getClass().getAnnotation(ActionConfig.class);
    if (actionConfig == null || "".equals(actionConfig.entity())) {
      throw new UnsupportedOperationException("N�o foi encontrada a anota��o @ActionConfig() na classe [" + this.getClass().getCanonicalName() + "] ou n�o foi configurada corretamente (Atributo 'entity')");
    } else {
      try {
        PropertyDescriptor prop = BeanUtils.getPropertyDescriptor(this.getClass(), actionConfig.entity());
        return (T) prop.getReadMethod().invoke(this);
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.