Examples of IEntity


Examples of com.semagia.atomico.dm.IEntity

    private static final String _TITLE = "MyTitle";
    private static final long _UPDATED = System.currentTimeMillis();


    public void testValidEntity() {
        IEntity entity = new MyEntity(_ID, _TITLE, _UPDATED);
        assertEquals(_ID, entity.getId());
        assertEquals(_TITLE, entity.getTitle());
        assertEquals(_UPDATED, entity.getUpdated());
    }
View Full Code Here

Examples of com.tll.model.IEntity

    if(search == null || !search.isSet()) {
      payload.getStatus().addMsg(search == null ? "No search criteria specified" : "Unset search criteria",
          MsgLevel.ERROR, MsgAttr.STATUS.flag);
    }
    else {
      IEntity e = null;
      IEntityType et = null;
      if(search instanceof PrimaryKeySearch) {
        final PrimaryKeySearch pks = (PrimaryKeySearch) search;
        e = loadEntityByPrimaryKey(pks, payload.getStatus());
        et = pks.getKey().getEntityType();
      }
      else if(search instanceof BusinessKeySearch) {
        final BusinessKeySearch bks = (BusinessKeySearch) search;
        e = loadEntityByBusinesKey(bks, payload.getStatus());
        et = bks.getEntityType();
      }
      else if(search instanceof EntityNameSearch) {
        final EntityNameSearch ens = (EntityNameSearch) search;
        e = loadEntityByName(ens, payload.getStatus());
        et = ens.getEntityType();
      }
      else {
        // override
        loadImpl(search, payload);
        return;
      }

      if(e != null) {
        assert et != null;
        try {
          final Model m = entityToModel(et, e);
          payload.setModel(m);
          payload.getStatus().addMsg(e.descriptor() + " loaded.", MsgLevel.INFO, MsgAttr.STATUS.flag);
        }
        catch(final Exception ex) {
          RpcServlet.exceptionToStatus(ex, payload.getStatus());
        }
      }
View Full Code Here

Examples of fr.soleil.salsa.entity.IEntity

        if (getModel() != null) {
            for (Object child : selection) {
                if (child instanceof DefaultMutableTreeNode) {
                    ITreeNode node = getModel().getTreeNode((DefaultMutableTreeNode) child);
                    if (node.getData() instanceof IEntity) {
                        IEntity entity = (IEntity) node.getData();
                        if (entity.getDirectory() != null) {
                            nodes.add(node);
                        }
                    }
                }
            }
View Full Code Here

Examples of games.stendhal.client.entity.IEntity

   
    assertEquals("Default cursor", dummy.getCursor(), panel.getCursor());
   
    // Check adding an item to the slot
    RPObject obj = ItemTestHelper.createItem("wedding ring");
    IEntity item = EntityFactory.createEntity(obj);
    /*
     * Set a dummy owner for the panel to simulate something not owned by
     * the User
     */
    panel.setParent(item);
 
View Full Code Here

Examples of org.dmlite.model.IEntity

      String conceptClassName = entities.getConceptConfig()
          .getEntityClass();
      for (Iterator i = element.elementIterator(); i.hasNext();) {
        Element childElement = (Element) i.next();
        IDomainModel domainModel = persistentModel.getDomainModel();
        IEntity entity = domainModel.getModelMeta().createEntity(
            conceptClassName);
        XmlEntity xmlEntity = new XmlEntity(entity, persistentModel);
        xmlEntity.load(childElement);
        entities.add((T)xmlEntity.getEntity());
      }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.spi.IEntity

   *
   * @param type The entity class
   * @return The external form wrapping the given Java type
   */
  public IEntity addEntity(Class<?> type) {
    IEntity entity = buildEntity(type);
    entities.put(type.getName(), entity);
    managedTypes.put(type.getName(), entity);
    return entity;
  }
View Full Code Here

Examples of org.eclipse.persistence.jpa.jpql.tools.spi.IEntity

    if (ExpressionTools.stringIsNotEmpty(identificationVariable) &&
        isValidProposal(identificationVariable, word)) {

      // Resolve the identification variable
      Resolver resolver = queryContext.getResolver(identificationVariable);
      IEntity entity = queryContext.getProvider().getEntity(resolver.getType());

      // The identification variable identifies an entity, add the extra information
      if (entity != null) {
        proposals.addRangeIdentificationVariable(identificationVariable, entity);
      }
View Full Code Here

Examples of org.happyfaces.domain.base.IEntity

                return new DummyPersistenceService();
            }
        };
       
        // test new instance of TestEntity is created when objectId is not set.
        IEntity initEntity = backingBean.initEntity();
        Assert.assertNotNull(initEntity);
        Assert.assertTrue(initEntity instanceof TestEntity);
        Assert.assertNull(initEntity.getId());
        backingBean.setObjectId(22L);
       
        //
        initEntity = backingBean.initEntity();
        Assert.assertNotNull(initEntity);
        Assert.assertTrue(initEntity instanceof TestEntity);
        Assert.assertEquals(Long.valueOf(22L), initEntity.getId());
       
        // not exist
        backingBean.setObjectId(23L);
        initEntity = backingBean.initEntity();
        Assert.assertNull(initEntity);
View Full Code Here

Examples of org.jamesii.core.base.IEntity

  @Override
  @SuppressWarnings("unchecked")
  // Has to be ensured by observer to use, otherwise exception should be thrown
  public void instrumentComputation(IComputationTask computation) {
    IEntity target = getObservationTarget(computation);
    Mediator.create(target);
    target.registerObserver(observerToUse);
    try {
      ((IObserver<IEntity>) observerToUse).update(target,
          new ProcessorObservationHint(this));
    } catch (ClassCastException ex) {
      throw new IllegalArgumentException(
View Full Code Here

Examples of org.jasig.portal.groups.IEntity

    * @param aKey
    * @param aType
    * @return IEntity
    */
   public static IEntity retrieveEntity (String aKey, String aType) {
      IEntity ent = null;
      try {
         Class iEntityClass = Class.forName(aType);
         ent = GroupService.getEntity(aKey, iEntityClass);
      } catch (Exception e) {
         Utility.logMessage("ERROR", "EntityWrapper.retrieveEntity(): ERROR retrieving entity "
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.