redis.clients.jedis.search.FieldName Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jedis_preview Show documentation
Show all versions of jedis_preview Show documentation
Jedis is a blazingly small and sane Redis java client.
The newest version!
package redis.clients.jedis.search;
import java.util.List;
import redis.clients.jedis.CommandArguments;
import redis.clients.jedis.params.IParams;
import redis.clients.jedis.search.SearchProtocol.SearchKeyword;
public class FieldName implements IParams {
private final String name;
private String attribute;
public FieldName(String name) {
this.name = name;
}
public FieldName(String name, String attribute) {
this.name = name;
this.attribute = attribute;
}
public FieldName as(String attribute) {
if (attribute == null) {
throw new IllegalArgumentException("Setting null as field attribute is not allowed.");
}
if (this.attribute != null) {
throw new IllegalStateException("Attribute for this field is already set.");
}
this.attribute = attribute;
return this;
}
public final String getName() {
return name;
}
public final String getAttribute() {
return attribute;
}
public int addCommandArguments(List