public static WindowFrameDef wdwFrame(int p, int f) {
WindowFrameDef wFrmDef = new WindowFrameDef();
BoundaryDef start, end;
if (p == 0) {
start = new CurrentRowDef();
} else {
RangeBoundaryDef startR = new RangeBoundaryDef();
startR.setDirection(Direction.PRECEDING);
startR.setAmt(p);
start = startR;
}
if (f == 0) {
end = new CurrentRowDef();
} else {
RangeBoundaryDef endR = new RangeBoundaryDef();
endR.setDirection(Direction.FOLLOWING);
endR.setAmt(f);
end = endR;