List of usage examples for com.mongodb ReadPreference valueOf
public static TaggableReadPreference valueOf(final String name, final List<TagSet> tagSetList)
From source file:com.edgytech.umongo.OptionDialog.java
License:Apache License
ReadPreference getReadPreference() { ComboBox readBox = (ComboBox) getBoundUnit(Item.rpPreference); ReadPref rpEnm = ReadPref.values()[readBox.value]; BasicDBObject tag = (BasicDBObject) ((DocBuilderField) getBoundComponentUnit(Item.rpTag)).getDBObject(); if (tag != null) return ReadPreference.valueOf(rpEnm.name(), tag); return ReadPreference.valueOf(rpEnm.name()); }