Package simpledao

Examples of simpledao.BoundVariable


        else
        {
          whereSQL.append( " = ? " );
        }
                whereCount ++;
                bindVariables.add( new BoundVariable( whereCount, column, type, value));
            }
/*
                if ( colCount > 0 )
                {
                    selectSQL.append(", " );
View Full Code Here


            }
            sql.append(column);
            valuesSQL.append("?");

            propCount++;
            bindVariables.add(new BoundVariable(propCount, column, type, value));
        }
        sql.append( valuesSQL );
        sql.append( " )");
        return sql.toString();
    }
View Full Code Here

                }
                whereSQL.append(column);
                whereSQL.append(" = ?");

                keyCount++;
                keyBindVariables.add( new BoundVariable( keyCount, column, pd.getPropertyType(), value ) );
            }
            else
            {
                Class type = pd.getPropertyType();
                StringBuffer col = new StringBuffer();
        if (value == null ||
          (type == Integer.class || "int".equals(type.getName())) && ((Integer) value < 0) ||
          ( type == Double.class || "double".equals( type.getName() ) ) && ((Double) value < 0.0d))
        {
          continue;
        }

                if (columnCount > 0)
                {
                    col.append(", ");
                }
                col.append(column);
                col.append(" = ");
                col.append("?");
                columnCount++;
                bindVariables.add(new BoundVariable(columnCount, column, type, value));
                sql.append(col);
            }
        }

        // add the keys to the bind variable list
        for ( BoundVariable bv : keyBindVariables)
        {
            bindVariables.add( new BoundVariable(columnCount + bv.getPosition(), bv.getName(), bv.getType(), bv.getValue() ) );
        }

        sql.append( whereSQL );
        return sql.toString();
    }
View Full Code Here

                    sql.append(" AND ");
                }
                sql.append( column );
                sql.append( " = ? " );
                colCount ++;
                bindVariables.add( new BoundVariable( colCount, column, type, value ));
            }
        }
        return sql.toString();
    }
View Full Code Here

TOP

Related Classes of simpledao.BoundVariable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.