1 10 11 package com.triactive.jdo.store; 12 13 import java.math.BigInteger ; 14 15 16 class SubstringExpression extends CharacterExpression 17 { 18 public SubstringExpression(CharacterExpression str, NumericExpression begin) 19 { 20 super(str.getQueryStatement()); 21 22 st.append("SUBSTRING(") 23 .append(str) 24 .append(" FROM ") 25 .append(begin.add(new IntegerLiteral(qs, BigInteger.ONE))) 26 .append(')'); 27 } 28 29 public SubstringExpression(CharacterExpression str, NumericExpression begin, NumericExpression end) 30 { 31 super(str.getQueryStatement()); 32 33 st.append("SUBSTRING(") 34 .append(str) 35 .append(" FROM ") 36 .append(begin.add(new IntegerLiteral(qs, BigInteger.ONE))) 37 .append(" FOR ") 38 .append(end.sub(begin)) 39 .append(')'); 40 } 41 } 42 | Popular Tags |