Examples of Entity


Examples of Model.Entity

    Graphics2D g2 = (Graphics2D) g;
    // Dessin des entité_
    _listEntity = new ArrayList<PersoGUI>();
    for (ListIterator<Entity> i = Game.getInstance().getListEntity()
        .listIterator(); i.hasNext();) {
      Entity e = i.next();
      if (e.getClass().getSimpleName().equals("Human"))
        _listEntity.add(new HumanGUI(e));
      else if (e.getClass().getSimpleName().equals("Zombie"))
        _listEntity.add(new ZombieGUI(e));
      else if (e.getClass().getSimpleName().equals("Hunter") || e.getClass().getSimpleName().equals("Hero"))
        _listEntity.add(new HunterGUI(e));
      else if (e.getClass().getSimpleName().equals("Medic"))
        _listEntity.add(new MedicGUI(e));
      // else
      // _listEntity.add(new EntityGUI(i.current()));
    }
   
View Full Code Here

Examples of ar.com.AmberSoft.iEvenTask.backend.entities.Entity

@SuppressWarnings({"rawtypes"})
public class UpdateEntityService extends Service {

  @Override
  public Map onExecute(Map params) {
    Entity entity = (Entity) params.get(ParamsConst.ENTITY);
    getSession().saveOrUpdate(entity);
    return null;
  }
View Full Code Here

Examples of ar.com.fdvs.dj.domain.entities.Entity

    log.debug("Registering entities.");
    try {
      if (entities!=null) {
        Iterator it = entities.iterator();
        while (it.hasNext()) {
          Entity entity = (Entity)it.next();
          registerEntity(entity);
        }
      }
    } catch (RuntimeException e) {
      throw new EntitiesRegistrationException(e.getMessage());
View Full Code Here

Examples of artemis.Entity

    }

    @Override
    protected final void processEntities(ImmutableBag<Entity> entities) {
        for(int i = 0, s = entities.size(); s > i; i++) {
            Entity entity = entities.get(i);
            processDelta(entity, acc);
            float remaining = getRemainingDelay(entity);
            if(remaining <= 0) {
                processExpired(entity);
            } else {
View Full Code Here

Examples of aspect.entity.Entity

                            entity.render();
                        }
                        ShaderProgram.unlock();

                        Color c = getPixelColor(new Vector2(getCanvasWidth() / 2, getCanvasHeight() / 2));
                        Entity hit = key.get(c);

                        if (hit instanceof Fighter) {
                            Fighter f = (Fighter) hit;
                            if (f.health > 0) {
                                f.health -= 200 * Time.deltaTime();
 
View Full Code Here

Examples of br.net.woodstock.rockframework.domain.Entity

        BeanDescriptor beanDescriptor = new BeanDescriptorBuilder(src.getClass()).getBeanDescriptor();
        for (PropertyDescriptor propertyDescriptor : beanDescriptor.getProperties()) {
          Class propertyType = propertyDescriptor.getType();
          Object propertyValue = propertyDescriptor.getValue(src);
          if (Entity.class.isAssignableFrom(propertyType)) {
            Entity entity = (Entity) propertyValue;
            if (EntityUtils.isNotEmptyId(entity)) {
              if (!eventSource.contains(entity)) {
                entity = (Entity) eventSource.get(entity.getClass(), (Serializable) entity.getId());
                eventSource.refresh(entity);
              } else {
                eventSource.refresh(entity);
              }
              propertyDescriptor.setValue(src, entity);
View Full Code Here

Examples of brooklyn.entity.Entity

            // Lookup entity from context or flags
            Object context = flags.get(LocationConfigKeys.CALLER_CONTEXT.getName());
            if (context != null && !(context instanceof Entity)) {
                throw new IllegalStateException("Invalid location context: " + context);
            }
            Entity entity = (Entity) context;

            // Configure the entity
            LOG.info("Configuring entity {} via subnet {}", entity, dockerHost.getSubnetTier());
            ((AbstractEntity) entity).setConfigEvenIfOwned(SubnetTier.PORT_FORWARDING_MANAGER, dockerHost.getSubnetTier().getPortForwardManager());
            ((AbstractEntity) entity).setConfigEvenIfOwned(SubnetTier.PORT_FORWARDER, portForwarder);
            if (getOwner().getConfig(WeaveInfrastructure.ENABLED)) {
                WeaveContainer weave = getOwner().getAttribute(WeaveContainer.WEAVE_CONTAINER);
                ((AbstractEntity) entity).setConfigEvenIfOwned(SubnetTier.SUBNET_CIDR, weave.getConfig(WeaveContainer.WEAVE_CIDR));
            } else {
                ((AbstractEntity) entity).setConfigEvenIfOwned(SubnetTier.SUBNET_CIDR, Cidr.UNIVERSAL);
            }
            configureEnrichers((AbstractEntity) entity);

            // Add the entity Dockerfile if configured
            String dockerfile = entity.getConfig(DockerAttributes.DOCKERFILE_URL);
            String imageId = entity.getConfig(DockerAttributes.DOCKER_IMAGE_ID);
            String imageName = DockerUtils.imageName(entity, dockerfile, repository);

            // Lookup image ID or build new image from Dockerfile
            LOG.warn("ImageName for entity {}: {}", entity, imageName);
            String imageList = dockerHost.runDockerCommand("images --no-trunc " + Os.mergePaths(repository, imageName));
            if (Strings.containsLiteral(imageList, imageName)) {
                // Wait until committed before continuing
                waitForImage(imageName);

                // Look up imageId again
                imageList = dockerHost.runDockerCommand("images --no-trunc " + Os.mergePaths(repository, imageName));
                imageId = Strings.getFirstWordAfter(imageList, "latest");
                LOG.info("Found image {} for entity: {}", imageName, imageId);

                // Skip install phase
                ((AbstractEntity) entity).setConfigEvenIfOwned(SoftwareProcess.SKIP_INSTALLATION, true);
            } else {
                // Set commit command at post-install
                insertCallback(entity, SoftwareProcess.POST_INSTALL_COMMAND, DockerCallbacks.commit());

                if (Strings.isNonBlank(dockerfile)) {
                    if (imageId != null) {
                        LOG.warn("Ignoring container imageId {} as dockerfile URL is set: {}", imageId, dockerfile);
                    }
                    imageId = dockerHost.createSshableImage(dockerfile, imageName);
                }
                if (Strings.isBlank(imageId)) {
                    imageId = getOwner().getAttribute(DockerHost.DOCKER_IMAGE_ID);
                }

                // Tag image name and create latch
                images.putIfAbsent(imageName, new CountDownLatch(1));
                dockerHost.runDockerCommand(String.format("tag %s %s:latest", imageId, Os.mergePaths(repository, imageName)));
            }

            // Set subnet address pre install
            insertCallback(entity, SoftwareProcess.PRE_INSTALL_COMMAND, DockerCallbacks.subnetAddress());

            // Look up hardware ID
            String hardwareId = entity.getConfig(DockerAttributes.DOCKER_HARDWARE_ID);
            if (Strings.isEmpty(hardwareId)) {
                hardwareId = getOwner().getConfig(DockerAttributes.DOCKER_HARDWARE_ID);
            }

            // Create new Docker container in the host cluster
            LOG.info("Starting container with imageId {} and hardwareId {} at {}", new Object[] { imageId, hardwareId, machine });
            Map<Object, Object> containerFlags = MutableMap.builder()
                    .putAll(flags)
                    .put("entity", entity)
                    .putIfNotNull("imageId", imageId)
                    .putIfNotNull("hardwareId", hardwareId)
                    .build();
            DynamicCluster cluster = dockerHost.getDockerContainerCluster();
            Entity added = cluster.addNode(machine, containerFlags);
            if (added == null) {
                throw new NoMachinesAvailableException(String.format("Failed to create container at %s", dockerHost.getDockerHostName()));
            } else {
                Entities.start(added, ImmutableList.of(machine));
            }
View Full Code Here

Examples of com.alibaba.druid.mapping.Entity

        if (expr instanceof SQLIdentifierExpr) {
            SQLIdentifierExpr tableExpr = (SQLIdentifierExpr) expr;
            String entityName = tableExpr.getName();

            Entity entity = (Entity) x.getAttribute(MAPPING_ENTITY);

            if (entity == null) {
                entity = visitor.getEntity(entityName);
            }
View Full Code Here

Examples of com.alibaba.json.bvt.serializer.BooleanFieldSerializerTest.Entity

import com.alibaba.json.bvt.serializer.BooleanFieldSerializerTest.Entity;

public class BooleanFieldSerializerTest_primitive extends TestCase {

    public void test_0() {
        Assert.assertEquals("{\"value\":false}", JSON.toJSONString(new Entity(), SerializerFeature.WriteMapNullValue, SerializerFeature.WriteNullBooleanAsFalse));
    }
View Full Code Here

Examples of com.alkacon.acacia.shared.Entity

     * @param changeType the change type
     */
    void internalAddChange(String valuePath, String attributeName, int valueIndex, ChangeType changeType) {

        m_changeTimer = null;
        Entity currentData = Entity.serializeEntity(m_entity);
        if (!currentData.equals(m_current.getEntityData())) {
            m_undo.push(m_current);
            m_current = new Change(currentData, valuePath, attributeName, valueIndex, changeType);
            m_redo.clear();
            fireStateChange();
        }
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.