All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.googlecode.mjorm.query.modifiers.Modifiers Maven / Gradle / Ivy

package com.googlecode.mjorm.query.modifiers;

import java.util.Collection;

import com.googlecode.mjorm.query.modifiers.BitwiseModifier.Operation;

/**
 * Utility class for easily creating {@link Modifier}s.
 */
public class Modifiers {

	/**
	 * {@see AddToSetEachModifier}
	 */
	public static  AddToSetEachModifier addToSetEach(T[] values) {
		return new AddToSetEachModifier(values);
	}

	/**
	 * {@see AddToSetEachModifier}
	 */
	public static  AddToSetEachModifier addToSetEach(Collection values) {
		return new AddToSetEachModifier(values);
	}

	/**
	 * {@see AddToSetModifier}
	 */
	public static  AddToSetModifier addToSet(T value) {
		return new AddToSetModifier(value);
	}

	/**
	 * {@see BitwiseModifier}
	 */
	public static BitwiseModifier bitwise(Operation operation, Number value) {
		return new BitwiseModifier(operation, value);
	}

	/**
	 * {@see BitwiseModifier}
	 */
	public static BitwiseModifier bitwiseOr(Number value) {
		return bitwise(Operation.OR, value);
	}

	/**
	 * {@see BitwiseModifier}
	 */
	public static BitwiseModifier bitwiseAnd(Number value) {
		return bitwise(Operation.AND, value);
	}

	/**
	 * {@see IncrementModifier}
	 */
	public static IncrementModifier inc(Number value) {
		return new IncrementModifier(value);
	}

	/**
	 * {@see PopModifier}
	 */
	public static PopModifier pop() {
		return new PopModifier();
	}

	/**
	 * {@see PullAllModifier}
	 */
	public static  PullAllModifier pullAll(T[] values) {
		return new PullAllModifier(values);
	}

	/**
	 * {@see PullAllModifier}
	 */
	public static  PullAllModifier pullAll(Collection values) {
		return new PullAllModifier(values);
	}

	/**
	 * {@see PullModifier}
	 */
	public static  PullModifier pull(T value) {
		return new PullModifier(value);
	}

	/**
	 * {@see PushAllModifier}
	 */
	public static  PushAllModifier pushAll(T[] values) {
		return new PushAllModifier(values);
	}

	/**
	 * {@see PushAllModifier}
	 */
	public static  PushAllModifier pushAll(Collection values) {
		return new PushAllModifier(values);
	}

	/**
	 * {@see PushModifier}
	 */
	public static  PushModifier push(T value) {
		return new PushModifier(value);
	}

	/**
	 * {@see RenameModifier}
	 */
	public static RenameModifier rename(String value) {
		return new RenameModifier(value);
	}

	/**
	 * {@see SetModifier}
	 */
	public static  SetModifier set(T value) {
		return new SetModifier(value);
	}

	/**
	 * {@see ShiftModifier}
	 */
	public static ShiftModifier shift() {
		return new ShiftModifier();
	}

	/**
	 * {@see UnSetModifier}
	 */
	public static UnSetModifier unset() {
		return new UnSetModifier();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy