/** * Creates a FunctionResource representing a specific, keyspace-scoped function. * * @param keyspace the keyspace in which the function is scoped * @param name name of the function. * @param argTypes the types of the arguments to the function * @return FunctionResource instance reresenting the function. */ public static FunctionResource function(String keyspace, String name, List<AbstractType<?>> argTypes) { return new FunctionResource(keyspace, name, argTypes); }
/** * Creates a FunctionResource representing the collection of functions scoped * to a specific keyspace. * * @param keyspace name of the keyspace * @return FunctionResource instance representing all of the keyspace's functions */ public static FunctionResource keyspace(String keyspace) { return new FunctionResource(keyspace); }
/** * Creates a FunctionResource representing the collection of functions scoped * to a specific keyspace. * * @param keyspace name of the keyspace * @return FunctionResource instance representing all of the keyspace's functions */ public static FunctionResource keyspace(String keyspace) { return new FunctionResource(keyspace); }
/** * Creates a FunctionResource representing the collection of functions scoped * to a specific keyspace. * * @param keyspace name of the keyspace * @return FunctionResource instance representing all of the keyspace's functions */ public static FunctionResource keyspace(String keyspace) { return new FunctionResource(keyspace); }
/** * Creates a FunctionResource representing a specific, keyspace-scoped function. * * @param keyspace the keyspace in which the function is scoped * @param name name of the function. * @param argTypes the types of the arguments to the function * @return FunctionResource instance reresenting the function. */ public static FunctionResource function(String keyspace, String name, List<AbstractType<?>> argTypes) { return new FunctionResource(keyspace, name, argTypes); }
/** * Creates a FunctionResource representing a specific, keyspace-scoped function. * * @param keyspace the keyspace in which the function is scoped * @param name name of the function. * @param argTypes the types of the arguments to the function * @return FunctionResource instance reresenting the function. */ public static FunctionResource function(String keyspace, String name, List<AbstractType<?>> argTypes) { return new FunctionResource(keyspace, name, argTypes); }
/** * Creates a FunctionResource representing a specific, keyspace-scoped function. * This variant is used to create an instance during parsing of a CQL statement. * It includes transposition of the arg types from CQL types to AbstractType * implementations * * @param keyspace the keyspace in which the function is scoped * @param name name of the function. * @param argTypes the types of the function arguments in raw CQL form * @return FunctionResource instance reresenting the function. */ public static FunctionResource functionFromCql(String keyspace, String name, List<CQL3Type.Raw> argTypes) { if (keyspace == null) throw new InvalidRequestException("In this context function name must be " + "explictly qualified by a keyspace"); List<AbstractType<?>> abstractTypes = new ArrayList<>(); for (CQL3Type.Raw cqlType : argTypes) abstractTypes.add(cqlType.prepare(keyspace).getType()); return new FunctionResource(keyspace, name, abstractTypes); }
/** * Creates a FunctionResource representing a specific, keyspace-scoped function. * This variant is used to create an instance during parsing of a CQL statement. * It includes transposition of the arg types from CQL types to AbstractType * implementations * * @param keyspace the keyspace in which the function is scoped * @param name name of the function. * @param argTypes the types of the function arguments in raw CQL form * @return FunctionResource instance reresenting the function. */ public static FunctionResource functionFromCql(String keyspace, String name, List<CQL3Type.Raw> argTypes) { if (keyspace == null) throw new InvalidRequestException("In this context function name must be " + "explictly qualified by a keyspace"); List<AbstractType<?>> abstractTypes = new ArrayList<>(); for (CQL3Type.Raw cqlType : argTypes) abstractTypes.add(cqlType.prepare(keyspace).getType()); return new FunctionResource(keyspace, name, abstractTypes); }
/** * Creates a FunctionResource representing a specific, keyspace-scoped function. * This variant is used to create an instance during parsing of a CQL statement. * It includes transposition of the arg types from CQL types to AbstractType * implementations * * @param keyspace the keyspace in which the function is scoped * @param name name of the function. * @param argTypes the types of the function arguments in raw CQL form * @return FunctionResource instance reresenting the function. */ public static FunctionResource functionFromCql(String keyspace, String name, List<CQL3Type.Raw> argTypes) { if (keyspace == null) throw new InvalidRequestException("In this context function name must be " + "explictly qualified by a keyspace"); List<AbstractType<?>> abstractTypes = new ArrayList<>(); for (CQL3Type.Raw cqlType : argTypes) abstractTypes.add(cqlType.prepare(keyspace).getType()); return new FunctionResource(keyspace, name, abstractTypes); }