protected void appendExtraWhere(DbSqlContext ctx) { if (extraWhere != null) { if (ctx.length() > 0) { ctx.append(" and"); } String ta = ctx.getTableAlias(prefix); String ew = StringHelper.replaceString(extraWhere, "${ta}", ta); ctx.append(" ").append(ew).append(" "); } }
@Override public void appendWhere(DbSqlContext ctx) { // Only apply inheritance to root node as any join will already have the inheritance join include - see TableJoin if (inheritInfo != null && nodeBeanProp == null) { if (!inheritInfo.isRoot()) { // restrict to this type and sub types of this type. if (ctx.length() > 0) { ctx.append(" and"); } ctx.append(" ").append(ctx.getTableAlias(prefix)).append("."); ctx.append(inheritInfo.getWhere()).append(" "); } } appendExtraWhere(ctx); for (SqlTreeNode aChildren : children) { // recursively add to the where clause any // fixed predicates (extraWhere etc) aChildren.appendWhere(ctx); } }
protected void appendExtraWhere(DbSqlContext ctx) { if (extraWhere != null) { if (ctx.length() > 0) { ctx.append(" and"); } String ta = ctx.getTableAlias(prefix); String ew = StringHelper.replaceString(extraWhere, "${ta}", ta); ctx.append(" ").append(ew).append(" "); } }
@Override public void appendWhere(DbSqlContext ctx) { // Only apply inheritance to root node as any join will already have the inheritance join include - see TableJoin if (inheritInfo != null && nodeBeanProp == null) { if (!inheritInfo.isRoot()) { // restrict to this type and sub types of this type. if (ctx.length() > 0) { ctx.append(" and"); } ctx.append(" ").append(ctx.getTableAlias(prefix)).append("."); ctx.append(inheritInfo.getWhere()).append(" "); } } appendExtraWhere(ctx); for (SqlTreeNode aChildren : children) { // recursively add to the where clause any // fixed predicates (extraWhere etc) aChildren.appendWhere(ctx); } }