Class BindVariable

java.lang.Object
com.invirgance.convirgance.jdbc.sql.BindVariable
All Implemented Interfaces:
NamedSchema

public class BindVariable extends Object implements NamedSchema
A named parameter that can be used when creating SQL queries.

 DatabaseSchemaLayout layout = getHSQLLayout();
 Table table = layout.getCurrentSchema().getTable("customer");
   
 SQLStatement statement = table
        .select()
        .where()
            .equals(table.getColumn("zip"), new BindVariable("zipcode"))
           .done();
 
Author:
jbanes
  • Constructor Details

    • BindVariable

      public BindVariable(String name)
      The name to use for the binding variable. Example: "zipcode"
      Parameters:
      name - A name.
  • Method Details

    • getName

      public String getName()
      Description copied from interface: NamedSchema
      Get the schema name of this database object
      Specified by:
      getName in interface NamedSchema
      Returns:
      name of the object with exact database capitalization
    • getQuotedName

      public String getQuotedName()
      Description copied from interface: NamedSchema
      Get the schema name of this database object quoted for use in a SQL statement
      Specified by:
      getQuotedName in interface NamedSchema
      Returns:
      name of the object quoted for use in a SQL statement
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object