org.makumba.db.makumba
Class MultipleAttributeParametrizer

java.lang.Object
  extended by org.makumba.db.makumba.MultipleAttributeParametrizer

public class MultipleAttributeParametrizer
extends Object

Take care of multiple parameters, as a "decorator" of AttributeParametrizer which knows nothing about them


Field Summary
(package private)  boolean acceptColon
           
(package private)  String baseOQL
           
(package private)  ArrayList<String> mixedArgumentNames
           
(package private)  NamedResourceFactory parametrizerFactory
          a cache of attribute parametrizers with the key "length of each argument"
(package private)  NamedResources parametrizers
           
 
Constructor Summary
MultipleAttributeParametrizer(String oql, String colonParams)
           
 
Method Summary
 AttributeParametrizer getAttributeParametrizer(Map args)
          obtain the attribute parametrizer associuated to the length of the given attributes
 Object[] getTransformedParams(Map<String,Object> args)
           
 String getTransformedQuery(Map<String,Object> args)
           
static String multiplyParameter(String oql, String name, int n)
          rewrite an OQL $name with $name_1, $name_2, etc
 Map<String,Object> rewriteAttributes(Map args)
           
 String rewriteOQL(Map args)
          rewrite an OQL string to replace all multiple arguments $xxx with $xxx_1, $xxx_2, etc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mixedArgumentNames

ArrayList<String> mixedArgumentNames

baseOQL

String baseOQL

parametrizers

NamedResources parametrizers

acceptColon

boolean acceptColon

parametrizerFactory

NamedResourceFactory parametrizerFactory
a cache of attribute parametrizers with the key "length of each argument"

Constructor Detail

MultipleAttributeParametrizer

public MultipleAttributeParametrizer(String oql,
                                     String colonParams)
Method Detail

getTransformedQuery

public String getTransformedQuery(Map<String,Object> args)
                           throws LogicException
Throws:
LogicException

getTransformedParams

public Object[] getTransformedParams(Map<String,Object> args)
                              throws LogicException
Throws:
LogicException

getAttributeParametrizer

public AttributeParametrizer getAttributeParametrizer(Map args)
                                               throws LogicException
obtain the attribute parametrizer associuated to the length of the given attributes

Throws:
LogicException

rewriteOQL

public String rewriteOQL(Map args)
                  throws LogicException
rewrite an OQL string to replace all multiple arguments $xxx with $xxx_1, $xxx_2, etc

Throws:
LogicException

multiplyParameter

public static String multiplyParameter(String oql,
                                       String name,
                                       int n)
rewrite an OQL $name with $name_1, $name_2, etc


rewriteAttributes

public Map<String,Object> rewriteAttributes(Map args)
                                     throws LogicException
Throws:
LogicException