Examples of GenericEntity


Examples of framework.beans.GenericEntity

  protected <T extends GenericEntity> void syncSets(Set<T> entitys, Set<Integer> ids, Class<T> clazz, String entityName) throws ClipsServerException{
    HashSet<Integer>      idset = new HashSet<Integer>(ids);

    for (Iterator<? extends GenericEntity> it = entitys.iterator(); it.hasNext();) {
      GenericEntity  genericEntity = it.next();
      Integer      id = genericEntity.getId();
      if (id == null){
        idset.remove(null);
      }
      else
      {
View Full Code Here

Examples of hu.sztaki.ilab.longneck.process.constraint.GenericEntity

                break;
        }
    }
   
    public GenericEntity getEntity(String packageid, String id, String version) {
        GenericEntity entity = null;
        try {
            entity = entities.get(packageid).getEntity(id, version);
        } catch (NullPointerException ex) {
            throw new RuntimeException("Entity package not found: " + id + ":" + version, ex);
        }
View Full Code Here

Examples of javax.ws.rs.core.GenericEntity

      }
      Class clazz = entity.getClass();
      Type type = null;
      if (entity instanceof GenericEntity)
      {
         GenericEntity gen = (GenericEntity) entity;
         clazz = gen.getRawType();
         type = gen.getType();
      }
      for (MediaType accept : accepts)
      {
         if (providerFactory.getMessageBodyWriter(clazz, type, null, accept) != null)
         {
View Full Code Here

Examples of javax.ws.rs.core.GenericEntity

      }
      Class clazz = entity.getClass();
      Type type = this.genericReturnType;
      if (entity instanceof GenericEntity)
      {
         GenericEntity gen = (GenericEntity) entity;
         clazz = gen.getRawType();
         type = gen.getType();
      }
      for (MediaType accept : accepts)
      {
         if (providerFactory.getMessageBodyWriter(clazz, type, method.getAnnotations(), accept) != null)
         {
View Full Code Here

Examples of javax.ws.rs.core.GenericEntity

      Type generic = genericType;
      Class type = entity.getClass();
      Object ent = entity;
      if (entity instanceof GenericEntity)
      {
         GenericEntity ge = (GenericEntity) entity;
         generic = ge.getType();
         ent = ge.getEntity();
         type = ent.getClass();
      }
      MediaType contentType = resolveContentType();
      MessageBodyWriter writer = providerFactory.getMessageBodyWriter(
              type, generic, annotations, contentType);
View Full Code Here

Examples of javax.ws.rs.core.GenericEntity

        Class<?> entityType = jsonEntity.getClass();

        final boolean genericEntityUsed = jsonEntity instanceof GenericEntity;

        if (genericEntityUsed) {
            GenericEntity ge = (GenericEntity)jsonEntity;
            jsonEntity = ge.getEntity();
            entityGenericType = ge.getType();
            entityType = ge.getRawType();
        }

        final boolean isJavaScript = isJavascript(mediaType);
        final MediaType workerMediaType = isJavaScript ? MediaType.APPLICATION_JSON_TYPE : mediaType;
View Full Code Here

Examples of javax.ws.rs.core.GenericEntity

        if (entity == null)
            return;

        Type entityType = null;
        if (entity instanceof GenericEntity) {
            final GenericEntity ge = (GenericEntity)entity;
            entityType = ge.getType();
            entity = ge.getEntity();
        } else {
            entityType = entity.getClass();
        }
        final Class entityClass = entity.getClass();
View Full Code Here

Examples of javax.ws.rs.core.GenericEntity

            final Object e = cr.getEntity();
            if (e == null)
                throw new IllegalArgumentException("The entity of the client request is null");

            if (e instanceof GenericEntity) {
                final GenericEntity ge = (GenericEntity)e;
                this.entity = ge.getEntity();
                this.entityType = ge.getType();
            } else {
                this.entity = e;
                this.entityType = entity.getClass();
            }
            final Class entityClass = entity.getClass();
View Full Code Here

Examples of javax.ws.rs.core.GenericEntity

    public void setEntity(Object entity, Type entityType) {
        this.originalEntity = this.entity = entity;
        this.entityType = entityType;
        if (this.entity instanceof GenericEntity) {
            final GenericEntity ge = (GenericEntity)this.entity;
            this.entity = ge.getEntity();
            this.entityType = ge.getType();
        }
    }
View Full Code Here

Examples of javax.ws.rs.core.GenericEntity

        Type entityType = entity.getClass();

        // if the entity is generic, get specific type and class
        if (entity instanceof GenericEntity) {
            final GenericEntity generic = (GenericEntity) entity;
            entityType = generic.getType(); // overwrite
            entity = generic.getEntity();
        }

        final Class entityClass = entity.getClass();

        ByteArrayOutputStream out = new ByteArrayOutputStream();
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.