Package org.mongojack.internal.update

Examples of org.mongojack.internal.update.SingleUpdateOperationValue


         * @param by
         *            The value to increment by
         * @return this object
         */
        public Builder inc(String field, int by) {
            return addOperation("$inc", field, new SingleUpdateOperationValue(
                    false, false, by));
        }
View Full Code Here


         * @param value
         *            The value to set it to
         * @return this object
         */
        public Builder set(String field, Object value) {
            return addOperation("$set", field, new SingleUpdateOperationValue(
                    false, true, value));
        }
View Full Code Here

         *            The field to unset
         * @return this object
         */
        public Builder unset(String field) {
            return addOperation("$unset", field,
                    new SingleUpdateOperationValue(false, false, 1));
        }
View Full Code Here

         * @param value
         *            The value to add
         * @return this object
         */
        public Builder push(String field, Object value) {
            return addOperation("$push", field, new SingleUpdateOperationValue(
                    true, true, value));
        }
View Full Code Here

         *            The value to add
         * @return this object
         */
        public Builder addToSet(String field, Object value) {
            return addOperation("$addToSet", field,
                    new SingleUpdateOperationValue(true, true, value));
        }
View Full Code Here

         * @param field
         *            The field to remove the value from
         * @return this object
         */
        public Builder popFirst(String field) {
            return addOperation("$pop", field, new SingleUpdateOperationValue(
                    true, false, -1));
        }
View Full Code Here

         * @param field
         *            The field to remove the value from
         * @return this object
         */
        public Builder popLast(String field) {
            return addOperation("$pop", field, new SingleUpdateOperationValue(
                    true, false, 1));
        }
View Full Code Here

         * @param value
         *            The value to remove. This may be another query.
         * @return this object
         */
        public Builder pull(String field, Object value) {
            return addOperation("$pull", field, new SingleUpdateOperationValue(
                    true, true, value));
        }
View Full Code Here

         *            The new field name
         * @return this object
         */
        public Builder rename(String oldFieldName, String newFieldName) {
            return addOperation("$rename", oldFieldName,
                    new SingleUpdateOperationValue(false, false, newFieldName));
        }
View Full Code Here

         * @param value
         *            The value to set
         * @return this object
         */
        public Builder addRawOperation(String op, String field, Object value) {
            return addOperation(op, field, new SingleUpdateOperationValue(
                    false, false, value));
        }
View Full Code Here

TOP

Related Classes of org.mongojack.internal.update.SingleUpdateOperationValue

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.