com.ibm.commerce.member.search

Class WhereClauseFreeFormCondition

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    WhereClauseJoinCondition


    public class WhereClauseFreeFormCondition
    extends WhereClauseCondition
    These objects represent hand-crafted WHERE clause conditions. The client explicitly specifies the WHERE clause SQL, the FROM tables, and the query parameter values.
    Usage:
            Vector vecParameters = new Vector();
            vecParameters.add("-19");               
            WhereClauseCondition cond 
                    = new WhereClauseFreeFormCondition(
                            "EXISTS (SELECT * FROM MBRATTRVAL WHERE MBRATTR_ID = ? AND MEMBER_ID = USERS.USERS_ID)",
                            null,
                            vecParameters);
     

    This sample WHERE clause is used in conjunction with a user query. It will ensure that the retrieved user records will all have value for custom member attribute -19. If this condition had required that other tables be added to the FROM clause, then these could have been included in the second parameter.
    See Also:
    Serialized Form
    • Field Detail

      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The class name.
      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright
        See Also:
        Constant Field Values
    • Constructor Detail

      • WhereClauseFreeFormCondition

        public WhereClauseFreeFormCondition(java.lang.String astrFreeFormWhereClause,
                                            java.util.Set asetFromTables,
                                            java.util.Vector avecWhereClauseParameters)
        Simple constructor allows the client to specify the WHERE clause SQL, the FROM tables, and the parameters to the prepared statement.
        Parameters:
        astrFreeFormWhereClause - The free-form SQL to use in the WHERE clause.
        asetFromTables - The tables to be added to the FROM clause; null if no additional FROM tables are required.
        avecWhereClauseParameters - The parameters required by the SQL; null if no parameters are required.