1 56 package org.objectstyle.cayenne.access.jdbc; 57 58 import java.io.IOException ; 59 import java.io.Writer ; 60 61 import org.apache.velocity.context.InternalContextAdapter; 62 63 71 public class BindNotEqualDirective extends BindDirective { 72 73 public String getName() { 74 return "bindNotEqual"; 75 } 76 77 protected void render( 78 InternalContextAdapter context, 79 Writer writer, 80 ParameterBinding binding) throws IOException { 81 82 if (binding.getValue() != null) { 83 bind(context, binding); 84 writer.write("<> ?"); 85 } 86 else { 87 writer.write("IS NOT NULL"); 88 } 89 } 90 } 91 | Popular Tags |