Examples of Entity


Examples of org.openbravo.base.model.Entity

   * @see DataSetTable
   */
  public boolean hasData(DataSet dataSet) {
    long totalCnt = 0;
    for (DataSetTable dataSetTable : dataSet.getDataSetTableList()) {
      final Entity entity = ModelProvider.getInstance().getEntityByTableName(
          dataSetTable.getTable().getDBTableName());
      final OBCriteria<BaseOBObject> obc = OBDal.getInstance().createCriteria(entity.getName());
      totalCnt += obc.count();
      if (totalCnt > 0) {
        return true;
      }
    }
View Full Code Here

Examples of org.opencustomer.framework.db.util.engine.configuration.Entity

            throw new TableEngineException("could not load engine", e);
        }
    }
   
    private Entity parseEntity(Node node) throws TableEngineException {
        Entity entity = new Entity();
       
        NamedNodeMap attributes = node.getAttributes();
        for(int i=0; i<attributes.getLength(); i++) {
            Node attributeNode = attributes.item(i);
            if(attributeNode.getNodeType() == Node.ATTRIBUTE_NODE) {
                String name = attributeNode.getNodeName();
                if("class".equals(name)) {
                    try {
                    entity.setClazz((Class<? extends BaseVO>)Class.forName(attributeNode.getNodeValue()));
                    } catch(ClassNotFoundException e) {
                        throw new TableEngineException(e);
                    }
                } else if("alias".equals(name)) {
                    entity.setAlias(attributeNode.getNodeValue());
                } else if("messageKey".equals(name)) {
                    entity.setMessageKey(attributeNode.getNodeValue());
                }
            }
        }
       
        return entity;
View Full Code Here

Examples of org.openrdf.elmo.Entity

    }

    ////////////////////////////////////////////////////////////////////////////

    public MicroblogPost find(final Tweet tweet) {
        Entity e = manager.find(new QName(uriOf(tweet)));
        return null == e
                ? null

                : e instanceof MicroblogPost
                ? (MicroblogPost) e
View Full Code Here

Examples of org.openstreetmap.osmosis.core.domain.v0_6.Entity

        public void process(EntityContainer entityContainer) {
            if (progressListener.isCanceled()) {
                target.cancel();
                throw new OsmosisRuntimeException("Cancelled by user");
            }
            Entity entity = entityContainer.getEntity();
            if (++count % 10 == 0) {
                progressListener.setProgress(count);
            }
            latestChangeset = Math.max(latestChangeset, entity.getChangesetId());
            latestTimestamp = Math.max(latestTimestamp, entity.getTimestamp().getTime());
            Geometry geom = null;
            switch (entity.getType()) {
            case Node:
                nodeCount++;
                geom = parsePoint((Node) entity);
                break;
            case Way:
View Full Code Here

Examples of org.rhq.helpers.perftest.support.config.Entity

        try {
            Map<Entity, String> entityQueries = getEntityQueries(config);

            Map<Class<?>, Set<ColumnValues>> pksToLoad = new HashMap<Class<?>, Set<ColumnValues>>();
            for (Map.Entry<Entity, String> entry : entityQueries.entrySet()) {
                Entity entity = entry.getKey();
                String query = entry.getValue();

                String tableName = MappingTranslator.getTableName(config.getClassForEntity(entity));

                Set<ColumnValues> pks = getPksFromQuery(connection, tableName, query);
View Full Code Here

Examples of org.simpleframework.http.message.Entity

   public void select(Collector collector) throws IOException {
      collector.collect(this);
   }
  
   public void ready(Collector collector) throws IOException {
      Entity entity = collector;
      Channel channel = entity.getChannel();
      Cursor cursor = channel.getCursor();
      Header header = entity.getHeader();
      Body body = entity.getBody();
      List<Part> list = body.getParts();
     
      assertEquals(header.getTarget(), "/index.html");
      assertEquals(header.getMethod(), "POST");
      assertEquals(header.getMajor(), 1);
View Full Code Here

Examples of org.spout.api.entity.Entity

  public static Entity mockEntity() {
    // TODO: this is broken, please fix.
    Engine engine = EngineFaker.setupEngine();

    final Entity entity = Mockito.mock(Entity.class);
    final EntityComponentAnswer componentHolder = new EntityComponentAnswer(entity);

    //Set up component holder methods
    Mockito.when(entity.add(Matchers.argThat(new ClassOrSubclassMatcher<EntityComponent>(EntityComponent.class)))).thenAnswer(componentHolder);
    Mockito.when(entity.get(Matchers.argThat(new ClassOrSubclassMatcher<EntityComponent>(EntityComponent.class)))).thenAnswer(componentHolder);
    Mockito.when(entity.getExact(Matchers.argThat(new ClassOrSubclassMatcher<EntityComponent>(EntityComponent.class)))).thenAnswer(componentHolder);
    Mockito.when(entity.detach(Matchers.argThat(new ClassOrSubclassMatcher<EntityComponent>(EntityComponent.class)))).thenAnswer(componentHolder);
    Mockito.when(entity.getData()).thenReturn(componentHolder.getData());
    Mockito.when(entity.getEngine()).thenAnswer(new EntityEngineAnswer(engine));

    //Set up entity tick
    Mockito.doAnswer(new EntityTickAnswer(entity)).when(entity).onTick(Mockito.anyFloat());

    //Set up event manager
View Full Code Here

Examples of org.springframework.samples.petclinic.Entity

   */
  public static Entity getById(Collection entities, Class entityClass, int entityId)
      throws ObjectRetrievalFailureException {

    for (Iterator it = entities.iterator(); it.hasNext();) {
      Entity entity = (Entity) it.next();
      if (entity.getId().intValue() == entityId && entityClass.isInstance(entity)) {
        return entity;
      }
    }
    throw new ObjectRetrievalFailureException(entityClass, new Integer(entityId));
  }
View Full Code Here

Examples of org.sumus.dwh.datastore.Entity

        insertMethodEntity();
        insertPackageTuple(sourceFolder);
    }

    private void insertPackageEntity() {
        Entity component = new Entity("org.core", getDimension(DataStoreDefinition.MODULES));
        component.addFeature(DataStoreDefinition.NAME.getName(), "org.core");
        component.addFeature(DataStoreDefinition.TYPE.getName(), "Package");
        add(component);
    }
View Full Code Here

Examples of org.w3c.dom.Entity

        }
        case Node.DOCUMENT_NODE : {
            DocumentType      docType;
            DOMImplementation domImpl;
            NamedNodeMap      map;
            Entity            entity;
            Notation          notation;
            int               i;
           
            serializeDocument();
           
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.