Examples of EntityItem


Examples of com.caucho.amber.entity.EntityItem

  {
    // jpa/0h13, jpa/1160

    EntityType entityType = getEntityType();

    EntityItem item = entityType.getHome().findItem(aConn, rs, index);

    if (item == null)
      return null;

    int offset = entityType.getId().getKeyCount();

    Entity entity = item.getEntity();

    /* XXX: jpa/0s2c
    if (entityType.getDiscriminator() != null) {
      // jpa/0l47
      offset++;
    }
    */
    _index = entity.__caucho_load(aConn, rs, index + offset);

    item.setNumberOfLoadingColumns(_index);

    return item;
  }
View Full Code Here

Examples of com.caucho.amber.entity.EntityItem

        log.finer(L.l("amber Query returning cached getObject({0})", column));

      Object obj = cacheChunk.getObject(_row - 1, column - 1);

      if (obj instanceof EntityItem) {
        EntityItem entityItem = (EntityItem) obj;

        if (_session.isJPA())
          return _session.getEntity(entityItem);
        else
          return _session.loadProxy(entityItem);
View Full Code Here

Examples of com.caucho.amber.entity.EntityItem

    else {
      int index = getColumn(column);

      AmberExpr expr = _resultList.get(column - 1);

      EntityItem item = expr.findItem(_session, _rs, index);

      return item;
    }
    /*
      FromItem item = _fromList.get(column - 1);
View Full Code Here

Examples of com.caucho.amber.entity.EntityItem

        LruCache.Entry<EntityKey,SoftReference<EntityItem>> entry;
        entry = iter.next();

        EntityKey key = entry.getKey();
        SoftReference<EntityItem> valueRef = entry.getValue();
        EntityItem value = valueRef.get();

        if (value == null)
          continue;

        EntityType entityRoot = value.getEntityHome().getEntityType();
        Object entityKey = key.getKey();

        for (int i = 0; i < size; i++) {
          if (completions.get(i).complete(entityRoot, entityKey, value)) {
            // XXX: delete
View Full Code Here

Examples of com.caucho.amber.entity.EntityItem

        LruCache.Entry<EntityKey,SoftReference<EntityItem>> entry;
        entry = iter.next();

        EntityKey key = entry.getKey();
        SoftReference<EntityItem> valueRef = entry.getValue();
        EntityItem value = valueRef.get();

        if (value == null)
          continue;

        AmberEntityHome entityHome = value.getEntityHome();
        EntityType entityRoot = entityHome.getEntityType();
        Object entityKey = key.getKey();

        for (int i = 0; i < size; i++) {
          if (completions.get(i).complete(entityRoot, entityKey, value)) {
View Full Code Here

Examples of com.caucho.amber.entity.EntityItem

      return entity;
    }
   
    _entityKey.init(cl, key);
   
    EntityItem cacheItem = loadCacheItem(cl, key, null);

    if (cacheItem == null)
      return null;

    /*
    boolean isLoad = true;

    // jpa/0h13 as a negative test.
    if (isActiveTransaction())
      isLoad = isEager;
    */
    // jpa/0o03
    boolean isLoad = isEager;

    try {
      entity = cacheItem.createEntity(this, key);

      if (entity == null)
        return null;

      // The entity is added for eager loading
View Full Code Here

Examples of com.caucho.amber.entity.EntityItem

                                  AmberEntityHome entityHome)
    throws AmberException
  {
    _entityKey.init(cl, key);

    EntityItem cacheItem = _persistenceUnit.getEntity(_entityKey);

    if (cacheItem != null)
      return cacheItem;

    if (entityHome == null)
View Full Code Here

Examples of com.caucho.amber.entity.EntityItem

    }

    try {
      AmberEntityHome home = type.getHome();

      EntityItem item = home.findEntityItem(this, key);

      if (item == null)
        return null;

      EntityFactory factory = home.getEntityFactory();
View Full Code Here

Examples of com.caucho.amber.entity.EntityItem

      return null;
    }

    EntityType rootType = entityHome.getRootType();

    EntityItem item = _persistenceUnit.getEntity(rootType, pk);

    if (item == null)
      return null;

    // jpa/0o0b
    if (isDebug)
      return item.getEntity();

    // XXX: jpa/0h31, expires the child cache entity.
    if (isActiveTransaction()) {
      Entity txEntity = getTransactionEntity(cl, pk);

      if (txEntity != null)
        txEntity.__caucho_getEntityState();
      else // jpa/0o0b || ! state.isManaged()) {
        item.getEntity().__caucho_expire();

      return null;
    }

    return item.getEntity();
  }
View Full Code Here

Examples of net.minecraft.entity.item.EntityItem

        GL11.glPushMatrix();
        GL11.glTranslated(0.5, 0.2 + verticalOffset, 0.5);
        GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
        GL11.glTranslatef(0.0F, -0.4F, 0.0F);
        GL11.glScalef(f1, f1, f1);
        EntityItem eItem = (EntityItem) objects[1];
        if (entity != null) {
          entity.worldObj = (Minecraft.getMinecraft() != null) ? Minecraft.getMinecraft().theWorld : null;
          if (entity.worldObj != null) {
            Render renderer = RenderManager.instance.getEntityRenderObject(entity);
            entity.setWorld(eItem.worldObj);
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.