SqlParameter Class
- java.
lang. Object - com.
azure. cosmos. models. SqlParameter
- com.
public final class SqlParameter
Represents a SQL parameter in the SqlQuerySpec used for queries in the Azure Cosmos DB database service.
Constructor Summary
Constructor | Description |
---|---|
SqlParameter() |
Initializes a new instance of the Sql |
SqlParameter(String name, Object value) |
Initializes a new instance of the Sql |
Method Summary
Modifier and Type | Method and Description |
---|---|
T |
getValue(Class<T> classType)
Gets the value of the parameter. |
boolean | equals(Object o) |
String |
getName()
Gets the name of the parameter. |
int | hashCode() |
Sql |
setName(String name)
Sets the name of the parameter. |
Sql |
setValue(Object value)
Sets the value of the parameter. |
Methods inherited from java.lang.Object
Constructor Details
SqlParameter
public SqlParameter()
Initializes a new instance of the SqlParameter class.
SqlParameter
public SqlParameter(String name, Object value)
Initializes a new instance of the SqlParameter class with the name and value of the parameter.
Parameters:
Method Details
getValue
public T
Gets the value of the parameter.
Parameters:
Returns:
equals
public boolean equals(Object o)
Overrides:
SqlParameter.equals(Object o)Parameters:
getName
public String getName()
Gets the name of the parameter.
Returns:
hashCode
public int hashCode()
Overrides:
SqlParameter.hashCode()setName
public SqlParameter setName(String name)
Sets the name of the parameter.
Parameters:
Returns:
setValue
public SqlParameter setValue(Object value)
Sets the value of the parameter.
Parameters:
Returns:
Applies to
Azure SDK for Java