public class DefaultDocumentValueFactory extends Object implements DocumentValueFactory, Serializable
Modifier and Type | Field and Description |
---|---|
static DocumentValueFactory |
INSTANCE |
Constructor and Description |
---|
DefaultDocumentValueFactory() |
Modifier and Type | Method and Description |
---|---|
Binary |
createBinary(byte type,
byte[] data) |
Boolean |
createBoolean(boolean value) |
Code |
createCode(String code) |
CodeWithScope |
createCode(String code,
Document scope) |
Date |
createDate(long millis) |
Date |
createDate(String iso) |
Double |
createDouble(double value) |
Integer |
createInt(int value) |
Long |
createLong(long value) |
Object |
createNull() |
ObjectId |
createObjectId(byte[] bytes) |
ObjectId |
createObjectId(int time,
int machine,
int process,
int inc) |
ObjectId |
createObjectId(String hex) |
Pattern |
createRegex(String pattern,
int flags) |
Pattern |
createRegex(String pattern,
String flags) |
String |
createString(String value) |
Symbol |
createSymbol(String value) |
Timestamp |
createTimestamp(int time,
int inc) |
UUID |
createUuid(long part1,
long part2) |
UUID |
createUuid(String uuid) |
public static final DocumentValueFactory INSTANCE
public String createString(String value)
createString
in interface DocumentValueFactory
public Integer createInt(int value)
createInt
in interface DocumentValueFactory
public Long createLong(long value)
createLong
in interface DocumentValueFactory
public Boolean createBoolean(boolean value)
createBoolean
in interface DocumentValueFactory
public Double createDouble(double value)
createDouble
in interface DocumentValueFactory
public Date createDate(String iso) throws ParseException
createDate
in interface DocumentValueFactory
ParseException
public Date createDate(long millis)
createDate
in interface DocumentValueFactory
public Timestamp createTimestamp(int time, int inc)
createTimestamp
in interface DocumentValueFactory
public ObjectId createObjectId(String hex)
createObjectId
in interface DocumentValueFactory
public ObjectId createObjectId(byte[] bytes)
createObjectId
in interface DocumentValueFactory
public ObjectId createObjectId(int time, int machine, int process, int inc)
createObjectId
in interface DocumentValueFactory
public Symbol createSymbol(String value)
createSymbol
in interface DocumentValueFactory
public Pattern createRegex(String pattern, String flags)
createRegex
in interface DocumentValueFactory
public Pattern createRegex(String pattern, int flags)
createRegex
in interface DocumentValueFactory
public Object createNull()
createNull
in interface DocumentValueFactory
public Binary createBinary(byte type, byte[] data)
createBinary
in interface DocumentValueFactory
public UUID createUuid(String uuid)
createUuid
in interface DocumentValueFactory
public UUID createUuid(long part1, long part2)
createUuid
in interface DocumentValueFactory
public Code createCode(String code)
createCode
in interface DocumentValueFactory
public CodeWithScope createCode(String code, Document scope)
createCode
in interface DocumentValueFactory
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.