Package weave.config

Examples of weave.config.DataConfig$EntityType


      throw new RemoteException("At least one column must be specified.");
   
    if (filters != null)
      filters.assertValid();
   
    DataConfig dataConfig = getDataConfig();
    WeaveRecordList result = new WeaveRecordList();
    Map<Integer, DataEntity> entityLookup = new HashMap<Integer, DataEntity>();
   
    {
      // get all column IDs whether or not they are to be selected.
      Set<Integer> allColumnIds = new HashSet<Integer>();
      if (filters != null)
        allColumnIds.addAll(getReferencedColumnIds(filters));
      for (int id : columns)
        allColumnIds.add(id);
      // get all corresponding entities
      for (DataEntity entity : dataConfig.getEntities(allColumnIds, true))
        entityLookup.put(entity.id, entity);
      // check for missing columns
      for (int id : allColumnIds)
        if (entityLookup.get(id) == null)
          throw new RemoteException("No column with ID=" + id);
View Full Code Here


      metadata.remove(PublicMetadata.TITLE);
    String minStr = metadata.remove(PublicMetadata.MIN);
    String maxStr = metadata.remove(PublicMetadata.MAX);
    String paramsStr = metadata.remove(PrivateMetadata.SQLPARAMS);
   
    DataConfig dataConfig = getDataConfig();
   
    Collection<Integer> ids = dataConfig.searchPublicMetadata(metadata, null);
   
    // attempt recovery for backwards compatibility
    if (ids.size() == 0)
    {
      if (metadata.containsKey(DATATABLE) && metadata.containsKey(NAME))
      {
        // try to find columns sqlTable==dataTable and sqlColumn=name
        Map<String,String> privateMetadata = new HashMap<String,String>();
        String sqlTable = metadata.get(DATATABLE);
        String sqlColumn = metadata.get(NAME);
        for (int i = 0; i < 2; i++)
        {
          if (i == 1)
            sqlTable = sqlTable.toLowerCase();
          privateMetadata.put(PrivateMetadata.SQLTABLE, sqlTable);
          privateMetadata.put(PrivateMetadata.SQLCOLUMN, sqlColumn);
          ids = dataConfig.searchPrivateMetadata(privateMetadata, null);
          if (ids.size() > 0)
            break;
        }
      }
      else if (metadata.containsKey(NAME)
          && Strings.equal(metadata.get(PublicMetadata.DATATYPE), DataType.GEOMETRY))
      {
        metadata.put(PublicMetadata.TITLE, metadata.remove(NAME));
        ids = dataConfig.searchPublicMetadata(metadata, null);
      }
      if (ids.size() == 0)
        throw new RemoteException("No column matches metadata query: " + metadata);
    }
   
View Full Code Here

TOP

Related Classes of weave.config.DataConfig$EntityType

Copyright © 2018 www.massapicom. 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.