Package com.massivecraft.mcore.xlib.mongodb

Examples of com.massivecraft.mcore.xlib.mongodb.BasicDBObject


        }

        @Override
        public void serialize(Object obj, StringBuilder buf) {
            BSONTimestamp t = (BSONTimestamp) obj;
            BasicDBObject temp = new BasicDBObject();
            temp.put("$ts", Integer.valueOf(t.getTime()));
            temp.put("$inc", Integer.valueOf(t.getInc()));
            serializer.serialize(temp, buf);
        }
View Full Code Here


        }

        @Override
        public void serialize(Object obj, StringBuilder buf) {
            Code c = (Code) obj;
            BasicDBObject temp = new BasicDBObject();
            temp.put("$code", c.getCode());
            serializer.serialize(temp, buf);
        }
View Full Code Here

        }

        @Override
        public void serialize(Object obj, StringBuilder buf) {
            CodeWScope c = (CodeWScope) obj;
            BasicDBObject temp = new BasicDBObject();
            temp.put("$code", c.getCode());
            temp.put("$scope", c.getScope());
            serializer.serialize(temp, buf);
        }
View Full Code Here

            SimpleDateFormat format = new SimpleDateFormat(
                    "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
            format.setCalendar(new GregorianCalendar(
                    new SimpleTimeZone(0, "GMT")));
            serializer.serialize(
                    new BasicDBObject("$date", format.format(d)),
                    buf);
        }
View Full Code Here

        }

        @Override
        public void serialize(Object obj, StringBuilder buf) {
            DBRefBase ref = (DBRefBase) obj;
            BasicDBObject temp = new BasicDBObject();
            temp.put("$ref", ref.getRef());
            temp.put("$id", ref.getId());
            serializer.serialize(temp, buf);
        }
View Full Code Here

            super(serializer);
        }

        @Override
        public void serialize(Object obj, StringBuilder buf) {
            serializer.serialize(new BasicDBObject("$maxKey",
                    1), buf);
        }
View Full Code Here

            super(serializer);
        }

        @Override
        public void serialize(Object obj, StringBuilder buf) {
            serializer.serialize(new BasicDBObject("$minKey",
                    1), buf);
        }
View Full Code Here

        }

        @Override
        public void serialize(Object obj, StringBuilder buf) {
            serializer.serialize(
                    new BasicDBObject("$oid", obj.toString()), buf);
        }
View Full Code Here

            super(serializer);
        }

        @Override
        public void serialize(Object obj, StringBuilder buf) {
            DBObject externalForm = new BasicDBObject();
            externalForm.put("$regex", obj.toString());
            if (((Pattern) obj).flags() != 0)
                externalForm.put("$options",
                        Bytes.regexFlags(((Pattern) obj).flags()));
            serializer.serialize(externalForm, buf);
        }
View Full Code Here

        }

        @Override
        public void serialize(Object obj, StringBuilder buf) {
            UUID uuid = (UUID) obj;
            BasicDBObject temp = new BasicDBObject();
            temp.put("$uuid", uuid.toString());
            serializer.serialize(temp, buf);
        }
View Full Code Here

TOP

Related Classes of com.massivecraft.mcore.xlib.mongodb.BasicDBObject

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.