| 1234567891011121314151617181920212223242526272829 |
- package com.cnd3b.common;
- public class StringDsbWhere extends StringDsb{
- public StringBuffer strvalue;
- public StringDsbWhere(){
- strvalue=new StringBuffer(" 1=1 ");
- }
- public StringDsbWhere(String where){
- strvalue=new StringBuffer(" "+ where+" ");
- }
- public StringBuffer and(String str){
- strvalue.append(" and ("+str+")");
- return strvalue;
- }
- public String toString(){
- strvalue.insert(0,"(");
- strvalue.append(")");
- return strvalue.toString();
- }
- public static void main(String[] args) {
- StringDsbWhere stringDsb=new StringDsbWhere();
- stringDsb.and("t1.fname='123'");
- }
- }
|