/** * Create a new alias based on source code. * * @param schema the schema * @param id the id * @param name the name * @param source the source code * @param force create the object even if the class or method does not exist * @param bufferResultSetToLocalTemp whether the result should be buffered * @return the database object */ public static FunctionAlias newInstanceFromSource( Schema schema, int id, String name, String source, boolean force, boolean bufferResultSetToLocalTemp) { FunctionAlias alias = new FunctionAlias(schema, id, name); alias.source = source; alias.bufferResultSetToLocalTemp = bufferResultSetToLocalTemp; alias.init(force); return alias; }
/** * Create a new alias based on a method name. * * @param schema the schema * @param id the id * @param name the name * @param javaClassMethod the class and method name * @param force create the object even if the class or method does not exist * @param bufferResultSetToLocalTemp whether the result should be buffered * @return the database object */ public static FunctionAlias newInstance( Schema schema, int id, String name, String javaClassMethod, boolean force, boolean bufferResultSetToLocalTemp) { FunctionAlias alias = new FunctionAlias(schema, id, name); int paren = javaClassMethod.indexOf('('); int lastDot = javaClassMethod.lastIndexOf('.', paren < 0 ? javaClassMethod.length() : paren); if (lastDot < 0) { throw DbException.get(ErrorCode.SYNTAX_ERROR_1, javaClassMethod); } alias.className = javaClassMethod.substring(0, lastDot); alias.methodName = javaClassMethod.substring(lastDot + 1); alias.bufferResultSetToLocalTemp = bufferResultSetToLocalTemp; alias.init(force); return alias; }
/** * Create a new alias based on source code. * * @param schema the schema * @param id the id * @param name the name * @param source the source code * @param force create the object even if the class or method does not exist * @param bufferResultSetToLocalTemp whether the result should be buffered * @return the database object */ public static FunctionAlias newInstanceFromSource( Schema schema, int id, String name, String source, boolean force, boolean bufferResultSetToLocalTemp) { FunctionAlias alias = new FunctionAlias(schema, id, name); alias.source = source; alias.bufferResultSetToLocalTemp = bufferResultSetToLocalTemp; alias.init(force); return alias; }
/** * Create a new alias based on source code. * * @param schema the schema * @param id the id * @param name the name * @param source the source code * @param force create the object even if the class or method does not exist * @param bufferResultSetToLocalTemp whether the result should be buffered * @return the database object */ public static FunctionAlias newInstanceFromSource( Schema schema, int id, String name, String source, boolean force, boolean bufferResultSetToLocalTemp) { FunctionAlias alias = new FunctionAlias(schema, id, name); alias.source = source; alias.bufferResultSetToLocalTemp = bufferResultSetToLocalTemp; alias.init(force); return alias; }
/** * Create a new alias based on a method name. * * @param schema the schema * @param id the id * @param name the name * @param javaClassMethod the class and method name * @param force create the object even if the class or method does not exist * @param bufferResultSetToLocalTemp whether the result should be buffered * @return the database object */ public static FunctionAlias newInstance( Schema schema, int id, String name, String javaClassMethod, boolean force, boolean bufferResultSetToLocalTemp) { FunctionAlias alias = new FunctionAlias(schema, id, name); int paren = javaClassMethod.indexOf('('); int lastDot = javaClassMethod.lastIndexOf('.', paren < 0 ? javaClassMethod.length() : paren); if (lastDot < 0) { throw DbException.get(ErrorCode.SYNTAX_ERROR_1, javaClassMethod); } alias.className = javaClassMethod.substring(0, lastDot); alias.methodName = javaClassMethod.substring(lastDot + 1); alias.bufferResultSetToLocalTemp = bufferResultSetToLocalTemp; alias.init(force); return alias; }
/** * Create a new alias based on a method name. * * @param schema the schema * @param id the id * @param name the name * @param javaClassMethod the class and method name * @param force create the object even if the class or method does not exist * @param bufferResultSetToLocalTemp whether the result should be buffered * @return the database object */ public static FunctionAlias newInstance( Schema schema, int id, String name, String javaClassMethod, boolean force, boolean bufferResultSetToLocalTemp) { FunctionAlias alias = new FunctionAlias(schema, id, name); int paren = javaClassMethod.indexOf('('); int lastDot = javaClassMethod.lastIndexOf('.', paren < 0 ? javaClassMethod.length() : paren); if (lastDot < 0) { throw DbException.get(ErrorCode.SYNTAX_ERROR_1, javaClassMethod); } alias.className = javaClassMethod.substring(0, lastDot); alias.methodName = javaClassMethod.substring(lastDot + 1); alias.bufferResultSetToLocalTemp = bufferResultSetToLocalTemp; alias.init(force); return alias; }