Package com.azure.cosmos.models
Class SqlParameter
- java.lang.Object
-
- com.azure.cosmos.models.SqlParameter
-
public final class SqlParameter extends Object
Represents a SQL parameter in the SqlQuerySpec used for queries in the Azure Cosmos DB database service.
-
-
Constructor Summary
Constructors Constructor Description SqlParameter()
Initializes a new instance of the SqlParameter class.SqlParameter(String name, Object value)
Initializes a new instance of the SqlParameter class with the name and value of the parameter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getName()
Gets the name of the parameter.<T> T
getValue(Class<T> classType)
Gets the value of the parameter.int
hashCode()
SqlParameter
setName(String name)
Sets the name of the parameter.SqlParameter
setValue(Object value)
Sets the value of the parameter.
-
-
-
Method Detail
-
getName
public String getName()
Gets the name of the parameter.- Returns:
- the name of the parameter.
-
setName
public SqlParameter setName(String name)
Sets the name of the parameter.- Parameters:
name
- the name of the parameter.- Returns:
- the SqlParameter.
-
getValue
public <T> T getValue(Class<T> classType)
Gets the value of the parameter.- Type Parameters:
T
- the type of the parameter- Parameters:
classType
- the class of the parameter value.- Returns:
- the value of the parameter.
-
setValue
public SqlParameter setValue(Object value)
Sets the value of the parameter.- Parameters:
value
- the value of the parameter.- Returns:
- the SqlParameter.
-
-