Examples of containsField()


Examples of com.datasalt.pangool.io.Schema.containsField()

      throw new TupleMRException("Already aliases set for schema '" + schemaName +"'");
    }
   
    for (Map.Entry<String,String> entry : aliases.getAliases().entrySet()){
      String alias = entry.getKey();
      if (schema.containsField(alias)){
        throw new TupleMRException("Forbidden alias '" + alias +
            "'. Schema '" + schema + "' already contains a field with that name");
      }
     
      String referenced = entry.getValue();
View Full Code Here

Examples of com.gitblit.tickets.QueryBuilder.containsField()

      activeQuery = queryParam;
    }

    // build Lucene query from defaults and request parameters
    QueryBuilder qb = new QueryBuilder(queryParam);
    if (!qb.containsField(Lucene.rid.name())) {
      // specify the repository
      qb.and(Lucene.rid.matches(getRepositoryModel().getRID()));
    }
    if (!qb.containsField(Lucene.responsible.name())) {
      // specify the responsible
View Full Code Here

Examples of com.massivecraft.mcore.xlib.bson.BSONObject.containsField()

        String lastName = null;
        if ( _nameStack.size() > 0 ){
            lastName = _nameStack.removeLast();
        }
        if ( ! ( o instanceof List ) && lastName != null &&
             o.containsField( "$ref" ) &&
             o.containsField( "$id" ) ){
            return cur().put(lastName, new DBRef( _db, o ) );
        }

        return o;
View Full Code Here

Examples of com.massivecraft.mcore.xlib.mongodb.BasicDBObject.containsField()

  public Long getMtime(Coll<?> coll, String id)
  {
    DBCollection dbcoll = fixColl(coll);
    BasicDBObject found = (BasicDBObject)dbcoll.findOne(new BasicDBObject(ID_FIELD, id), dboKeysMtime);
    if (found == null) return null;
    if ( ! found.containsField(MTIME_FIELD)) return null; // This should not happen! But better to ignore than crash?
    return found.getLong(MTIME_FIELD);
  }
 
  @Override
  public Collection<String> getIds(Coll<?> coll)
View Full Code Here

Examples of com.massivecraft.mcore.xlib.mongodb.DBObject.containsField()

            throw new MongoException( "no _md5 stored" );
       
        DBObject cmd = new BasicDBObject( "filemd5" , _id );
        cmd.put( "root" , _fs._bucketName );
        DBObject res = _fs._db.command( cmd );
        if ( res != null && res.containsField( "md5" ) ) {
            String m = res.get( "md5" ).toString();
            if ( m.equals( _md5 ) )
                return;
            throw new MongoException( "md5 differ.  mine [" + _md5 + "] theirs [" + m + "]" );
        }
View Full Code Here

Examples of com.mongodb.BasicDBObject.containsField()

        // Build timerange.
        BasicDBObject timerangeConfig = (BasicDBObject) config.get("timerange");
        TimeRange timeRange;

        if (!timerangeConfig.containsField("type")) {
            throw new InvalidRangeParametersException("range type not set");
        }

        String rangeType = (String) timerangeConfig.get("type");
View Full Code Here

Examples of com.mongodb.BasicDBObject.containsField()

        BasicDBObject key1 = (BasicDBObject) indexInfos.get(1).get("key");
        BasicDBObject key2 = (BasicDBObject) indexInfos.get(2).get("key");

        assertTrue("No index on the field a", key1.containsField("a") && "1".equals(key1.getString("a")));
        assertTrue("No index on the field b", key2.containsField("b") && "-1".equals(key2.getString("b")));

        DBObject b = dynamicCollection.findOne("testInsertDynamicityEnabledDBAndCollection");
        assertNotNull("No record with 'testInsertDynamicityEnabledDBAndCollection' _id", b);

        b = testCollection.findOne("testInsertDynamicityEnabledDBOnly");
View Full Code Here

Examples of com.mongodb.BasicDBObject.containsField()

        BasicDBObject key1 = (BasicDBObject) indexInfos.get(1).get("key");
        BasicDBObject key2 = (BasicDBObject) indexInfos.get(2).get("key");

        assertTrue("No index on the field a", key1.containsField("a") && "1".equals(key1.getString("a")));
        assertTrue("No index on the field b", key2.containsField("b") && "-1".equals(key2.getString("b")));

        DBObject b = dynamicCollection.findOne("testInsertDynamicityEnabledCollectionAndIndex");
        assertNotNull("No record with 'testInsertDynamicityEnabledCollectionAndIndex' _id", b);

        b = testCollection.findOne("testInsertDynamicityEnabledDBOnly");
View Full Code Here

Examples of com.mongodb.BasicDBObject.containsField()

        List<DBObject> indexInfos = dynamicCollection.getIndexInfo();

        BasicDBObject key1 = (BasicDBObject) indexInfos.get(1).get("key");

        assertFalse("No index on the field a", key1.containsField("a") && "-1".equals(key1.getString("a")));

        DBObject b = dynamicCollection.findOne("testInsertDynamicityEnabledCollectionOnlyAndURIIndex");
        assertNotNull("No record with 'testInsertDynamicityEnabledCollectionOnlyAndURIIndex' _id", b);

        b = testCollection.findOne("testInsertDynamicityEnabledCollectionOnlyAndURIIndex");
View Full Code Here

Examples of com.mongodb.BasicDBObject.containsField()

        BasicDBObject key1 = (BasicDBObject) indexInfos.get(1).get("key");
        BasicDBObject key2 = (BasicDBObject) indexInfos.get(2).get("key");

        assertTrue("No index on the field b", key1.containsField("b") && "-1".equals(key1.getString("b")));
        assertTrue("No index on the field a", key2.containsField("a") && "1".equals(key2.getString("a")));

        DBObject b = collection.findOne("testInsertAutoCreateCollectionAndURIIndex");
        assertNotNull("No record with 'testInsertAutoCreateCollectionAndURIIndex' _id", b);

        b = testCollection.findOne("testInsertAutoCreateCollectionAndURIIndex");
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.